JSPM

xtal-element

0.0.432
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 244
  • Score
    100M100P100Q103802F
  • License MIT

Some opinionated web component base classes.

Package Exports

  • xtal-element
  • xtal-element/lib/DOMKeyPE.js
  • xtal-element/lib/DOMKeyPEA.js
  • xtal-element/lib/GroupedSiblings.js
  • xtal-element/lib/GroupedSiblingsWithRefs.js
  • xtal-element/lib/Rx.js
  • xtal-element/lib/RxSuppl.js
  • xtal-element/lib/X.js
  • xtal-element/lib/XtalCore.js
  • xtal-element/lib/XtalPattern.js
  • xtal-element/lib/applyMixins.js
  • xtal-element/lib/attr.js
  • xtal-element/lib/base-link-id.js
  • xtal-element/lib/createNestedProp.js
  • xtal-element/lib/debounce.js
  • xtal-element/lib/define.js
  • xtal-element/lib/destruct.js
  • xtal-element/lib/getDestructArgs.js
  • xtal-element/lib/getProcessor.js
  • xtal-element/lib/getSlicedPropDefs.js
  • xtal-element/lib/html.js
  • xtal-element/lib/initInternals.js
  • xtal-element/lib/intersection.js
  • xtal-element/lib/letThereBeProps.js
  • xtal-element/lib/mergeProps.js
  • xtal-element/lib/nudge.js
  • xtal-element/lib/observeCssSelector.js
  • xtal-element/lib/passAttrToProp.js
  • xtal-element/lib/pinTheDOMToKeys.js
  • xtal-element/lib/propUp.js
  • xtal-element/lib/structuralClone.js
  • xtal-element/lib/substrBefore.js
  • xtal-element/lib/with-path.js
  • xtal-element/lib/zzz.js

Readme

preramble
We hold these truths to be self-evident, after bumbling around for months and months:
All UI Libraries Are Created Equal

The great thing about web components is that little web components built with tagged template literals can connect with little web components built with Elm, and web components will be judged by the content they provide, rather than superficial internal technical library choices.

For example, an interesting duality paradox that has existed for a number of years has been between OOP vs functional programming. Efforts to "embrace the duality paradox" like Scala and F# always appealed to me. The "hooks" initiative adds an interesting twist to the debate, and might strike the right balance for some types of components. Evidently, the result has been less boilerplate code, which can only be good. Perhaps the learning curve is lower as well, and that's great.

xtal-element takes the view that classes are a great addition to the JavaScript language, even if they don't solve every issue perfectly. Some points raised by the React team do hit home with me regarding classes. So xtal-element encourages use of classes in a way that might avoid some of the pitfalls, while benefitting from the really nice features of classes, namely:

  1. Support for easily tweaking one custom element with another (method overriding).
  2. Taking advantage of the nice way classes can help organize data and functionality together.
JSON and HTML Modules will land on Planet Earth someday
I am FROOP