wuse v1.0.0
WUSE
Wuse (Web Using Shadow Elements) is a Web Components library that encapsulates the usage of the Custom Elements Registry and the Shadow DOM features of ES6. Additionally, it offers an IoC event-driven lifecycle, a pure javascript approach to markup and styles generation, optional reactivity for fields, and much more.
This is a work in progress, with a lot of things in an experimental stage. More documentation, tests and examples to come.
MOTIVATION
"If you want more effective programmers, you will discover that they should not waste their time debugging, they should not introduce the bugs to starth with."
- Edger Dijkstra, The Humble Programmer, 1972
CHARACTERISTICS
- no external dependencies (none in runtime and only esbuild if you want to build from source)
- self-documenting api (descriptive "long" function names)
- full unit testing (630+ tests cases)
markdown documentation(public api in minimallistic style, inspired by decades of repeating RTFM)extensive example library(39 demos: 16 simple samples and 23 with third party libraries)
FEATURES
#NATURAL-WAY
Wuse exposes a more natural way of working with the browser instead of hiding the way it works:
- wraps the Custom Element Registry usage: just create your class extending from a Wuse HTML Element class, register it and then instantiate it as you need (class names are converted into valid custom elements, ex: 'My_Element' class is converted into 'my-element' tag)
- creates a functional structure over the Shadow DOM: a root element, a style element and a main element
- does not block nor interfere with direct DOM access (for example, this is good when dealing with legacy webs, allowing progressive migrations)#FULL-CONTROL
Wuse gives you the power to control everything in your web development:
- allows all-in-one markup, styles and scripting definitions: you can define your custom element in a single ES6 class file
- allows to retain control on the Element lifecycle: you can hook up to 14 different events
- allows optional field reactivity with free control on the behaviour: you can structure the code the way you want#NO-BUILDS
Wuse does not require any build step to be performed.
HiSTORY
- 1.0.0 2023-jan-28
- version bump
- 0.9.9 2023-jan-16
- added
hasCSSNestedRuleBySelectorsandreplaceCSSNestedRuleBySelectorsto theStructuredElementclass - added Javascript & Web Helpers API initial documentation
- added
Indeterminate_ProgressBardemo
- added
- 0.9.8 2023-jan-11
- renamed
BaseElementtoStructuredElement - added Structured Element API initial documentation
- added
Spinner_Paneldemo
- renamed
- 0.9.7 2023-jan-04
- added
getRawContentto theBaseElementclass - moved testing related files into
testssubdirectory insidesrcdirectory
- added
- 0.9.6 2022-dec-30
- improved SVG support
- added
SVG_ForeignObjectdemo - added
test.unimubernim file to serve testing with enhanced capabilities (that means support for theSHUTDOWNbutton in thetests.htmlfile)
- 0.9.5 2022-dec-02
- added
hasRawContentto theBaseElementclass - added
docsdirectory with some initial documentation
- added
- 0.9.4 2022-nov-23
- added recursive element definition support via the walrus operator
:= - added
Animate_JsFunction_Sampledemo
- added recursive element definition support via the walrus operator
- 0.9.3 2022-nov-19
- added
nextgetter to theNodeManagerclass - added
MetroUI_ShortcutButton_Sampledemo
- added
- 0.9.2 2022-nov-15
- added
allowsRawContentto theBaseElementclass - added
Concise_AlertBox_Sampledemo
- added
- 0.9.1 2022-nov-13
- added
htmlToShorthandto theCoreClassclass - now static
registerof theBaseElementclass is fluent - added
Mini_MenuDrawer_Sampledemo
- added
- 0.9.0 2022-nov-11
- extracted
ChildrenHolderclass to an external file - extracted
RulesHolderclass to an external file - extracted
FieldsHolderclass to an external file - now
setAttributesAsKeysflag is set on by default - removed incorporated rules in children
- extracted
- 0.8.9 2022-nov-09
- added
isMainIdentifiedandremoveFromParentto theBaseElementclass - added
MDL_ContactChip_Sampledemo
- added
- 0.8.8 2022-nov-08
- added
setMainEventHandleranddropMainEventHandlerto theBaseElementclass - added
Materialize_FloatingButton_Sampledemo
- added
- 0.8.7 2022-nov-07
- added main element events support in the
BaseElementclass - added
Wing_Grid960_Sampledemo
- added main element events support in the
- 0.8.6 2022-nov-03
- added
defineReadOnlyMembersto theJavascriptHelpersclass - added
changeDOMElementTagto theWebHelpersclass - added
Turret_FormInputs_Sampledemo
- added
- 0.8.5 2022-oct-31
- added
adoptCSSStyleSheetto theBaseElementclass - added
Picnic_StackToggle_Sampledemo
- added
- 0.8.4 2022-oct-28
- added
getChildElementsCount,getCSSRulesCountandgetInstanceFieldsCountto theBaseElementclass - added
buildDOMElementandbuildDOMFragmentto theWebHelpersclass - added
Primer_SideNavigation_Sampledemo
- added
- 0.8.3 2022-oct-27
- added
selectChildElementsto theBaseElementclass - added
Progressive_Listdemo
- added
- 0.8.2 2022-oct-25
- added
isReactiveFieldto theBaseElementclass - added
Tachyons_BasicBanner_Sampledemo
- added
- 0.8.1 2022-oct-24
- added
removeMainAttributeto theBaseElementclass - added
Development_Consoledemo
- added
- 0.8.0 2022-oct-22
- added
encloseRenderingEventsto theBaseElementclass (this implies noon_prerenderandon_postrenderevents by default) - now
restoreOnReconstructflag is set on by default (this means noon_reconstructevent by default) - now
fireSpecificRedrawEventsflags are not set by default (this means noon_reloadandon_repaintevents by default) - removed
instantiatefromCoreClassin favor ofcreateusage and theBaseElementowncreateroutine
- added
- 0.7.9 2022-oct-21
- extracted
CoreClassclass to an external file - added
CoreClassclass unit test - added
transferCSSRuleBySelectorto theBaseElementclass - added
UIkit_Sortable_Groupdemo
- extracted
- 0.7.8 2022-oct-19
- added
isHTMLVoidTagto theWebHelpersclass - added
transferChildElementByIdto theBaseElementclass - added
Transfer_Childdemo
- added
- 0.7.7 2022-oct-17
- added
fireSpecificRedrawEventsto theBaseElementclass - added
Spectre_Timeline_Sampledemo
- added
- 0.7.6 2022-oct-15
- renamed all the es6 modules to the .mjs file extension
- splitted demos at directory examples into simple-samples and third-party subdirectories
- added
Siimple_SignIn_Sampleexample
- 0.7.5 2022-oct-14
- added
snapshotInstanceFieldsto theBaseElementclass - added
Canvas_Text_Wrapperexample
- added
- 0.7.4 2022-oct-12
- added
restoreOnReconstructto theBaseElementclass (if you set this behaviour thenon_reconstructwon't fire) - added
prepareto thePartsHolderclass - added
isHTMLAttributeto theWebHelpersclass - added
MISNAMED_FIELDerror to theRuntimeErrorsclass - added
ChartJS_VerticalBars_Sampleexample
- added
- 0.7.3 2022-oct-10
- added
dropAllFields,addMainClass,removeMainClassandtoggleMainClassto theBaseElementclass - added
FomanticUI_Messages_Sampleexample
- added
- 0.7.2 2022-oct-08
- added
removeAllChildElementsandremoveAllCSSRulesto theBaseElementclass - added
clearto thePartsHolderclass - added
elementsetter to theNodeManagerclass - now the instantiators methods accept an HTMLElement node as the targeted parent
- added
Foundation_Accordion_Sampleexample
- added
- 0.7.1 2022-oct-05
- added
on_content_verificationto theContentManagerclass - added
wuse.dbg.jsto the build generation and distribution directory (comes unmified and with DEBUG and MEASURE flags turned on by default) - added
Milligram_Form_Sampleexample
- added
- 0.7.0 2022-oct-03
- added
createto theWuseclass - added static
registerandcreateto theBaseElementclass - added
createInstanceto theElementClassesclass - now you can pass parameters to manually instantiated elements
- added
areOfto theJavascriptHelpersclass - added
getIndexOfto thePartsHolderclass - removed freeze and defreeze from the reactive field actions
- added
Skeleton_Grid_Sampleexample
- added
- 0.6.9 2022-sep-30
- added
makeReadonlyFieldto theBaseElementclass - added
Bulma_Breadcrumb_Sampleexample
- added
- 0.6.8 2022-sep-28
- added
isIntegerNumberto theJavascriptHelpersclass - added
Regular_vs_Reactiveexample
- added
- 0.6.7 2022-sep-26
- added
on_snapshot_partandon_recall_partto thePartsHolderclass - added
TAKEN_IDerror to theRuntimeErrorsclass
- added
- 0.6.6 2022-sep-22
- added
dropFieldto theBaseElementclass - extracted
ReactiveFieldclass to an external file - added
ReactiveFieldclass unit test
- added
- 0.6.5 2022-sep-20
- added
nameFiliatedKey,rememberFiliatedKeyandhasFiliatedKeyto theStateManagerclass - added
deriveChildrenStoreKeyto theBaseElementclass - now children custom elements are assumed to be Wuse elements so automatically by default a filiated wusekey is added if not already present
- added
- 0.6.4 2022-sep-18
- added
slotsInvalidatorto theWuseRenderingRoutinesclass - added
PureCSS_DropdownMenu_Sampleexample
- added
- 0.6.3 2022-sep-15
- added
Bootstrap_Radiogroup_Sampleexample - changed
ALREADY_REGISTEREDerror to a warning
- added
- 0.6.2 2022-sep-14
- added
BAD_TARGETwarning to theRuntimeErrorsclass - added
jQueryUI_Datepicker_Sampleexample
- added
- 0.6.1 2022-sep-10
- extracted
StateManagerclass to an external file - added
StateManagerclass unit test - added
replaceCSSRuleBySelectorto theBaseElementclass
- extracted
- 0.6.0 2022-sep-06
- improved state management
- adjusted instantiation process events nomenclature renaming them to
on_element_instantiatedandon_bad_target - added
WUSEKEY_ATTRIBUTEandWUSENODE_ATTRIBUTEto theStringConstantsclass
- 0.5.9 2022-aug-31
- added
hasField,hasCSSRuleBySelectorandremoveCSSRuleBySelectorto theBaseElementclass
- added
- 0.5.8 2022-aug-30
- added
isHTMLTagto theWebHelpersclass - added
UNKNOWN_TAGwarning to theRuntimeErrorsclass - added
getMainAttributeto theBaseElementclass - extracted
ElementEventsclass to an external file - added
ElementEventsclass unit test - added
Plain_Progress_Barexample
- added
- 0.5.7 2022-aug-26
- added
removeChildElementByIdto theBaseElementclass - added
removeto thePartsHolderclass
- added
- 0.5.6 2022-aug-23
- added
ALREADY_REGISTEREDerror to theRuntimeErrorsclass - added
Command_Lineexample - now version constant is been taken from the
package.jsonfile
- added
- 0.5.5 2022-aug-22
- extracted
StringHashingclass to an external file - added
StringHashingclass unit test
- extracted
- 0.5.4 2022-aug-20
- added
lockChildElements,unlockChildElements,lockCSSRules,unlockCSSRules,lockFieldsandunlockFieldsto theBaseElementclass - added
lockedandon_forbidden_changeto thePartsHolderclass - added
LOCKED_DEFINITIONerror to theRuntimeErrorsclass
- added
- 0.5.3 2022-aug-19
- added
suspendRender,resumeRenderandisRenderSuspendedto theBaseElementclass
- added
- 0.5.2 2022-aug-16
- extracted
InitializationRoutinesclass to an external file - added
Templates_And_Slotsexample
- extracted
- 0.5.1 2022-aug-13
- extracted
ElementModesclass to an external file - added
ElementModesclass unit test - added
Performing_100K_Updatesexample
- extracted
- 0.5.0 2022-aug-12
- added
removeFromElementsStoreto theBaseElementclass - removed
keepDataStoredto therestoreFromElementsStoremethod of theBaseElementclass - added
makeStateto theElementPartsclass - added
INVALID_STATEerror to theRuntimeErrorsclass - added
Element_Eventsexample
- added
- 0.4.5 2022-aug-10
- added
forceargument to theprocessmethod of theContentManagerclass - refactored
Wuseclass
- added
- 0.4.4 2022-aug-08
- added
EMPTY_STRINGto theJavascriptHelpersclass - improved
BaseElementclass
- added
- 0.4.3 2022-aug-05
- extracted
BaseElementclass to an external file
- extracted
- 0.4.2 2022-aug-04
- added
ElementPartsclass unit test - added
PartsHolderclass unit test
- added
- 0.4.1 2022-aug-02
- added
cloneObjectandforEachOwnPropertyto theJavascriptHelpersclass - extracted
ElementPartsclass to an external file - extracted
PartsHolderclass to an external file
- added
- 0.4.0 2022-jul-31
- extracted
TextReplacementsclass to an external file - added
TextReplacementsclass unit test
- extracted
- 0.3.9 2022-jul-28
- added
onElementInstantiatedandonBadTargetevents to the instantiation process - added
Simple_Buttonexample - extracted
RenderingRoutinesclass to an external file - added
RenderingRoutinesclass unit test
- added
- 0.3.8 2022-jul-27
- extracted
TemplateImporterclass to an external file - added
TemplateImporterclass unit test - improved custom browser tester
- updated the
package.jsonfile
- extracted
- 0.3.7 2022-jul-26
- extracted
ElementClassesclass to an external file - added
ElementClassesclass unit test - added
ensureFunction,isAssignedObject,isAssignedArray,isNonEmptyArrayandnoopto theJavascriptHelpersclass - added
UNREGISTRABLE_CLASSerror to theRuntimeErrorsclass - improved custom browser tester
- added the
package.jsonfile - published on npm registry
- extracted
- 0.3.6 2022-jul-22
- extracted
StringConstantsclass to an external file - extracted
JavascriptHelpersclass to an external file - added
JavascriptHelpersclass unit test - extracted
PerformanceMeasurementclass to an external file - added
PerformanceMeasurementclass unit test - improved custom browser tester
- extracted
- 0.3.5 2022-jul-20
- extracted
NodeManagerclass to an external file - added
NodeManagerclass unit test - extracted
ContentManagerclass to an external file - added
ContentManagerclass unit test - improved custom browser tester
- extracted
- 0.3.4 2022-jul-18
- extracted
EqualityAnalyzerclass to an external file - added
EqualityAnalyzerclass unit test - extracted
SimpleStorageclass to an external file - added
SimpleStorageclass unit test
- extracted
- 0.3.3 2022-jul-15
- added support for text nodes in the shorthand notation via
^text^pseudo-node type (ex. '^text^=this is a text node'; note that this, of course, does not combine with named slots) - added support for html encoded text in the shorthand notation via the
&content prefix (ex. 'label=&this tags will be read as plain text', note if you need start a content with '&' use double '&&') - added
removeChildrenandhtmlEncoderoutines to theWebHelpersclass - added
INVALID_TEMPLATEruntime error
- added support for text nodes in the shorthand notation via
- 0.3.2 2022-jul-14
- extracted
WebHelpersclass to an external file - added
WebHelpersclass unit test - extracted
RuntimeErrorsclass to an external file - added
RuntimeErrorsclass unit test - added custom browser tester
- extracted
- 0.3.1 2022-jul-13
- added
appendCSSNestedRuleandprependCSSNestedRuleto support flat nested css rules - now appended/prepended css rules are joined up to the last/first rule in the list respectively if the selector is the same
- added
getCSSVendorPrefixto theWebHelpersclass - added
Marquee_Cloneto theexamplesdirectory
- added
- 0.3.0 2022-jul-11
- initial release
- 0.2.0 2022-jul-02
- more features
- 0.1.0 2022-jun-22
- started coding
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago