aptechka 0.2.2 → 0.3.0-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-browser-lib/ComponentElement-B8zjY3Dh.js +92 -0
- package/build-browser-lib/ComponentElement-DuiOKawv.cjs +1 -0
- package/build-browser-lib/Damped-BvkThM-2.cjs +1 -0
- package/build-browser-lib/Damped-DEHDBwBz.js +132 -0
- package/build-browser-lib/WheelControls-BJdZsEkS.js +92 -0
- package/build-browser-lib/WheelControls-CctFwJwY.cjs +1 -0
- package/build-browser-lib/animation/Damped.d.ts +38 -0
- package/build-browser-lib/animation/Tweened.d.ts +30 -0
- package/build-browser-lib/animation/hooks/index.cjs +1 -0
- package/{lib → build-browser-lib}/animation/hooks/index.d.ts +2 -2
- package/build-browser-lib/animation/hooks/index.js +32 -0
- package/build-browser-lib/animation/index.cjs +1 -0
- package/build-browser-lib/animation/index.d.ts +2 -0
- package/build-browser-lib/animation/index.js +98 -0
- package/build-browser-lib/attribute/hooks/index.d.ts +2 -0
- package/{lib → build-browser-lib}/controls/index.cjs +1 -1
- package/{lib → build-browser-lib}/controls/index.js +2 -2
- package/build-browser-lib/createStore-CUWrqVrV.cjs +1 -0
- package/build-browser-lib/createStore-DncUX-yj.js +15 -0
- package/build-browser-lib/element-resizer/hooks/index.cjs +1 -0
- package/build-browser-lib/element-resizer/hooks/index.d.ts +4 -0
- package/build-browser-lib/element-resizer/hooks/index.js +12 -0
- package/build-browser-lib/element-resizer/index.cjs +1 -0
- package/build-browser-lib/element-resizer/index.js +65 -0
- package/build-browser-lib/instantiate-BYzkD4SE.js +72 -0
- package/build-browser-lib/instantiate-DrQ1MNUN.cjs +1 -0
- package/build-browser-lib/intersector/hooks/index.cjs +1 -0
- package/build-browser-lib/intersector/hooks/index.js +12 -0
- package/{lib → build-browser-lib}/jsx/ComponentElement.d.ts +1 -1
- package/build-browser-lib/jsx/hooks/attachInternals.d.ts +1 -0
- package/build-browser-lib/jsx/hooks/attachShadow.d.ts +1 -0
- package/build-browser-lib/jsx/hooks/attachStylesheet.d.ts +2 -0
- package/build-browser-lib/jsx/hooks/createStore.d.ts +3 -0
- package/build-browser-lib/jsx/hooks/index.cjs +1 -0
- package/build-browser-lib/jsx/hooks/index.d.ts +8 -0
- package/build-browser-lib/jsx/hooks/index.js +77 -0
- package/build-browser-lib/jsx/hooks/onConnect.d.ts +2 -0
- package/{lib/jsx/hooks/useContext.d.ts → build-browser-lib/jsx/hooks/onContext.d.ts} +1 -1
- package/build-browser-lib/jsx/hooks/onDisconnect.d.ts +2 -0
- package/build-browser-lib/jsx/hooks/withCurrentComponent.d.ts +2 -0
- package/build-browser-lib/jsx/index.cjs +1 -0
- package/build-browser-lib/jsx/index.js +27 -0
- package/{lib → build-browser-lib}/jsx/type.d.ts +1 -0
- package/build-browser-lib/onConnect-FWEekrNj.js +9 -0
- package/build-browser-lib/onConnect-XY4UppQZ.cjs +1 -0
- package/build-browser-lib/polyfills-CrcS4RcO.cjs +1 -0
- package/build-browser-lib/polyfills-DJUYczFm.js +6 -0
- package/{lib → build-browser-lib}/router/index.cjs +1 -1
- package/{lib → build-browser-lib}/router/index.js +1 -1
- package/build-browser-lib/scroll/ScrollElement.d.ts +73 -0
- package/build-browser-lib/scroll/index.cjs +1 -0
- package/build-browser-lib/scroll/index.js +523 -0
- package/build-browser-lib/store/hooks/index.cjs +1 -0
- package/build-browser-lib/store/hooks/index.d.ts +6 -0
- package/build-browser-lib/store/hooks/index.js +26 -0
- package/build-browser-lib/studio/index.cjs +10 -0
- package/{lib → build-browser-lib}/studio/index.js +102 -105
- package/build-browser-lib/ticker/hooks/index.cjs +1 -0
- package/{lib → build-browser-lib}/ticker/hooks/index.d.ts +1 -1
- package/build-browser-lib/ticker/hooks/index.js +23 -0
- package/build-browser-lib/ticker/index.cjs +1 -0
- package/{lib → build-browser-lib}/ticker/index.d.ts +2 -1
- package/build-browser-lib/ticker/index.js +115 -0
- package/build-browser-lib/utils/index.cjs +1 -0
- package/{lib → build-browser-lib}/utils/index.d.ts +1 -0
- package/{lib → build-browser-lib}/utils/index.js +13 -11
- package/build-browser-lib/utils/polyfills.d.ts +1 -0
- package/build-browser-lib/window-resizer/hooks/index.cjs +1 -0
- package/build-browser-lib/window-resizer/hooks/index.d.ts +2 -0
- package/build-browser-lib/window-resizer/hooks/index.js +9 -0
- package/build-browser-lib/withCurrentComponent-Cd8KOtNf.js +7 -0
- package/build-browser-lib/withCurrentComponent-Cig6ryJK.cjs +1 -0
- package/build-vite-plugin-htmc/index.d.ts +7 -0
- package/build-vite-plugin-htmc/index.js +352 -0
- package/package.json +201 -189
- package/lib/Animated-Bf-gPIQM.cjs +0 -1
- package/lib/Animated-Br_4OSth.js +0 -131
- package/lib/ComponentElement-BUesLP4b.cjs +0 -1
- package/lib/ComponentElement-NMlh1Ptn.js +0 -92
- package/lib/Damped-Fy7tHx4d.js +0 -33
- package/lib/Damped-mdFs8WSd.cjs +0 -1
- package/lib/WheelControls-BN4XGOpG.js +0 -78
- package/lib/WheelControls-Dc1xcVG6.cjs +0 -1
- package/lib/animation/Animated.d.ts +0 -38
- package/lib/animation/Damped.d.ts +0 -11
- package/lib/animation/Tweened.d.ts +0 -15
- package/lib/animation/hooks/index.cjs +0 -1
- package/lib/animation/hooks/index.js +0 -38
- package/lib/animation/index.cjs +0 -1
- package/lib/animation/index.d.ts +0 -3
- package/lib/animation/index.js +0 -44
- package/lib/attribute/hooks/index.d.ts +0 -2
- package/lib/element-resizer/hooks/index.cjs +0 -1
- package/lib/element-resizer/hooks/index.d.ts +0 -4
- package/lib/element-resizer/hooks/index.js +0 -12
- package/lib/element-resizer/index.cjs +0 -1
- package/lib/element-resizer/index.js +0 -65
- package/lib/instantiate-BAz2WZtO.cjs +0 -1
- package/lib/instantiate-BDteLwW6.js +0 -55
- package/lib/intersector/hooks/index.cjs +0 -1
- package/lib/intersector/hooks/index.js +0 -12
- package/lib/jsx/hooks/index.cjs +0 -1
- package/lib/jsx/hooks/index.d.ts +0 -7
- package/lib/jsx/hooks/index.js +0 -76
- package/lib/jsx/hooks/useConnect.d.ts +0 -2
- package/lib/jsx/hooks/useCreate.d.ts +0 -2
- package/lib/jsx/hooks/useDisconnect.d.ts +0 -2
- package/lib/jsx/hooks/useInternals.d.ts +0 -1
- package/lib/jsx/hooks/useShadow.d.ts +0 -1
- package/lib/jsx/hooks/useStylesheet.d.ts +0 -2
- package/lib/jsx/index.cjs +0 -1
- package/lib/jsx/index.js +0 -15
- package/lib/scroll/ScrollElement.d.ts +0 -42
- package/lib/scroll/index.cjs +0 -1
- package/lib/scroll/index.js +0 -476
- package/lib/store/hooks/index.cjs +0 -1
- package/lib/store/hooks/index.d.ts +0 -6
- package/lib/store/hooks/index.js +0 -31
- package/lib/studio/index.cjs +0 -10
- package/lib/ticker/hooks/index.cjs +0 -1
- package/lib/ticker/hooks/index.js +0 -23
- package/lib/ticker/index.cjs +0 -1
- package/lib/ticker/index.js +0 -113
- package/lib/useConnect-CXdqKdRX.js +0 -9
- package/lib/useConnect-DcfeqwzW.cjs +0 -1
- package/lib/useCreate-ClGKVMeG.cjs +0 -1
- package/lib/useCreate-DQSfJu7r.js +0 -7
- package/lib/useDisconnect-D5cBD1bq.js +0 -9
- package/lib/useDisconnect-sA74z4IZ.cjs +0 -1
- package/lib/utils/index.cjs +0 -1
- package/lib/window-resizer/hooks/index.cjs +0 -1
- package/lib/window-resizer/hooks/index.d.ts +0 -2
- package/lib/window-resizer/hooks/index.js +0 -9
- /package/{lib → build-browser-lib}/Composed-ClTo1f0b.js +0 -0
- /package/{lib → build-browser-lib}/Composed-Mdr4ZFbI.cjs +0 -0
- /package/{lib → build-browser-lib}/Derived-Bc88XJ8J.js +0 -0
- /package/{lib → build-browser-lib}/Derived-SjPdLJiZ.cjs +0 -0
- /package/{lib → build-browser-lib}/ElementConstructor-B61ZFTEB.cjs +0 -0
- /package/{lib → build-browser-lib}/ElementConstructor-CvNdPKJy.js +0 -0
- /package/{lib → build-browser-lib}/SourceManager-BoP9RAJr.js +0 -0
- /package/{lib → build-browser-lib}/SourceManager-CI6NfLzW.cjs +0 -0
- /package/{lib → build-browser-lib}/Store-D0_rDIsE.cjs +0 -0
- /package/{lib → build-browser-lib}/Store-JOKrNVEr.js +0 -0
- /package/{lib → build-browser-lib}/Viewport-COsaberc.cjs +0 -0
- /package/{lib → build-browser-lib}/Viewport-CXY5xcGJ.js +0 -0
- /package/{lib → build-browser-lib}/abstract-elements/AbstractButtonElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/abstract-elements/index.cjs +0 -0
- /package/{lib → build-browser-lib}/abstract-elements/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/abstract-elements/index.js +0 -0
- /package/{lib → build-browser-lib}/accordion/AccordionElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/accordion/index.cjs +0 -0
- /package/{lib → build-browser-lib}/accordion/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/accordion/index.js +0 -0
- /package/{lib → build-browser-lib}/attribute/index.cjs +0 -0
- /package/{lib → build-browser-lib}/attribute/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/attribute/index.js +0 -0
- /package/{lib → build-browser-lib}/attributes-69we3byR.js +0 -0
- /package/{lib → build-browser-lib}/attributes-Bf2svn4j.cjs +0 -0
- /package/{lib → build-browser-lib}/browser-0zX67oeU.js +0 -0
- /package/{lib → build-browser-lib}/browser-CpzFX2xg.cjs +0 -0
- /package/{lib → build-browser-lib}/canvas/index.cjs +0 -0
- /package/{lib → build-browser-lib}/canvas/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/canvas/index.js +0 -0
- /package/{lib → build-browser-lib}/connector/index.cjs +0 -0
- /package/{lib → build-browser-lib}/connector/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/connector/index.js +0 -0
- /package/{lib → build-browser-lib}/controls/Controls.d.ts +0 -0
- /package/{lib → build-browser-lib}/controls/KeyboardControls.d.ts +0 -0
- /package/{lib → build-browser-lib}/controls/LinearControls.d.ts +0 -0
- /package/{lib → build-browser-lib}/controls/WheelControls.d.ts +0 -0
- /package/{lib → build-browser-lib}/controls/hooks/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/controls/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/createStylesheet-C0OnN0Br.cjs +0 -0
- /package/{lib → build-browser-lib}/createStylesheet-CD11E4C8.js +0 -0
- /package/{lib → build-browser-lib}/createTheme-B_W5dUY9.cjs +0 -0
- /package/{lib → build-browser-lib}/createTheme-D0IoYkYN.js +0 -0
- /package/{lib → build-browser-lib}/css-unit-parser/index.cjs +0 -0
- /package/{lib → build-browser-lib}/css-unit-parser/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/css-unit-parser/index.js +0 -0
- /package/{lib → build-browser-lib}/custom-element/index.cjs +0 -0
- /package/{lib → build-browser-lib}/custom-element/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/custom-element/index.js +0 -0
- /package/{lib → build-browser-lib}/device/Device.d.ts +0 -0
- /package/{lib → build-browser-lib}/device/Viewport.d.ts +0 -0
- /package/{lib → build-browser-lib}/device/index.cjs +0 -0
- /package/{lib → build-browser-lib}/device/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/device/index.js +0 -0
- /package/{lib → build-browser-lib}/dom-BY7JhTx5.js +0 -0
- /package/{lib → build-browser-lib}/dom-qY2LdCVL.cjs +0 -0
- /package/{lib → build-browser-lib}/easings-BKi40vHz.js +0 -0
- /package/{lib → build-browser-lib}/easings-DsS5-Kqc.cjs +0 -0
- /package/{lib → build-browser-lib}/element-constructor/ElementConstructor.d.ts +0 -0
- /package/{lib → build-browser-lib}/element-constructor/createStylesheet.d.ts +0 -0
- /package/{lib → build-browser-lib}/element-constructor/createTheme.d.ts +0 -0
- /package/{lib → build-browser-lib}/element-constructor/index.cjs +0 -0
- /package/{lib → build-browser-lib}/element-constructor/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/element-constructor/index.js +0 -0
- /package/{lib → build-browser-lib}/element-constructor/knownSvgTags.d.ts +0 -0
- /package/{lib → build-browser-lib}/element-constructor/tags.d.ts +0 -0
- /package/{lib → build-browser-lib}/element-resizer/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/attachments/En3SourceManager.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/core/En3Raycaster.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/core/en3.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/index.cjs +0 -0
- /package/{lib → build-browser-lib}/en3/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/index.js +0 -0
- /package/{lib → build-browser-lib}/en3/instances/en3LazyLoader.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/libs/MeshoptDecoder.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/loaders/en3GLTFLoader.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/loaders/en3TextureLoader.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/objects/En3Clip.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/objects/En3ClipHelpers.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/objects/En3GLTF.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/objects/En3Image.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/objects/En3ImageLike.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/objects/En3SourceConsumer.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/objects/En3Video.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/test/En3HTML.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/test/En3ModifiedMaterial.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/utils/coverTexture.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/utils/dispose.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/utils/getCurrentViewport.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/utils/traverseMaterials.d.ts +0 -0
- /package/{lib → build-browser-lib}/en3/utils/traverseMeshes.d.ts +0 -0
- /package/{lib → build-browser-lib}/events-Crwi8fz6.cjs +0 -0
- /package/{lib → build-browser-lib}/events-_C2CztxR.js +0 -0
- /package/{lib → build-browser-lib}/file-EevnUtRj.cjs +0 -0
- /package/{lib → build-browser-lib}/file-lxi_oXJf.js +0 -0
- /package/{lib → build-browser-lib}/function-C10DGppn.js +0 -0
- /package/{lib → build-browser-lib}/function-MthRj-GJ.cjs +0 -0
- /package/{lib → build-browser-lib}/image/index.cjs +0 -0
- /package/{lib → build-browser-lib}/image/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/image/index.js +0 -0
- /package/{lib → build-browser-lib}/index--wI4MTuv.cjs +0 -0
- /package/{lib → build-browser-lib}/index-Dq6GRJ9W.js +0 -0
- /package/{lib → build-browser-lib}/intersector/hooks/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/intersector/index.cjs +0 -0
- /package/{lib → build-browser-lib}/intersector/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/intersector/index.js +0 -0
- /package/{lib → build-browser-lib}/jsx/h.d.ts +0 -0
- /package/{lib → build-browser-lib}/jsx/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/jsx/instantiate.d.ts +0 -0
- /package/{lib → build-browser-lib}/jsx/register.d.ts +0 -0
- /package/{lib → build-browser-lib}/jsx/render.d.ts +0 -0
- /package/{lib → build-browser-lib}/ladder/index.cjs +0 -0
- /package/{lib → build-browser-lib}/ladder/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/ladder/index.js +0 -0
- /package/{lib → build-browser-lib}/layout-8ryRAMGJ.cjs +0 -0
- /package/{lib → build-browser-lib}/layout-HoBT_Da2.js +0 -0
- /package/{lib → build-browser-lib}/layout-box/index.cjs +0 -0
- /package/{lib → build-browser-lib}/layout-box/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/layout-box/index.js +0 -0
- /package/{lib → build-browser-lib}/loading/index.cjs +0 -0
- /package/{lib → build-browser-lib}/loading/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/loading/index.js +0 -0
- /package/{lib → build-browser-lib}/math-BOBiC4TN.js +0 -0
- /package/{lib → build-browser-lib}/math-GDWEqu7y.cjs +0 -0
- /package/{lib → build-browser-lib}/media/index.cjs +0 -0
- /package/{lib → build-browser-lib}/media/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/media/index.js +0 -0
- /package/{lib → build-browser-lib}/modal/ModalElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/modal/index.cjs +0 -0
- /package/{lib → build-browser-lib}/modal/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/modal/index.js +0 -0
- /package/{lib → build-browser-lib}/morph/Link.d.ts +0 -0
- /package/{lib → build-browser-lib}/morph/Morph.d.ts +0 -0
- /package/{lib → build-browser-lib}/morph/index.cjs +0 -0
- /package/{lib → build-browser-lib}/morph/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/morph/index.js +0 -0
- /package/{lib → build-browser-lib}/notifier/index.cjs +0 -0
- /package/{lib → build-browser-lib}/notifier/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/notifier/index.js +0 -0
- /package/{lib → build-browser-lib}/number-Bo5RdrA1.js +0 -0
- /package/{lib → build-browser-lib}/number-yVpzMdbQ.cjs +0 -0
- /package/{lib → build-browser-lib}/object-BZELAoVj.cjs +0 -0
- /package/{lib → build-browser-lib}/object-R34VLqhp.js +0 -0
- /package/{lib → build-browser-lib}/order/index.cjs +0 -0
- /package/{lib → build-browser-lib}/order/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/order/index.js +0 -0
- /package/{lib → build-browser-lib}/popover/PopoverButtonElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/popover/PopoverElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/popover/index.cjs +0 -0
- /package/{lib → build-browser-lib}/popover/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/popover/index.js +0 -0
- /package/{lib → build-browser-lib}/resized/index.cjs +0 -0
- /package/{lib → build-browser-lib}/resized/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/resized/index.js +0 -0
- /package/{lib → build-browser-lib}/router/Link.d.ts +0 -0
- /package/{lib → build-browser-lib}/router/Route.d.ts +0 -0
- /package/{lib → build-browser-lib}/router/Router.d.ts +0 -0
- /package/{lib → build-browser-lib}/router/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/scroll/ScrollUserElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/scroll/ScrollbarElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/scroll/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/scroll-entries/index.cjs +0 -0
- /package/{lib → build-browser-lib}/scroll-entries/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/scroll-entries/index.js +0 -0
- /package/{lib → build-browser-lib}/select/SelectElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/select/SelectHeadElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/select/SelectOptionElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/select/SelectUserElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/select/index.cjs +0 -0
- /package/{lib → build-browser-lib}/select/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/select/index.js +0 -0
- /package/{lib → build-browser-lib}/slicer/DecoderElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/slicer/Letter.d.ts +0 -0
- /package/{lib → build-browser-lib}/slicer/SlicerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/slicer/Word.d.ts +0 -0
- /package/{lib → build-browser-lib}/slicer/index.cjs +0 -0
- /package/{lib → build-browser-lib}/slicer/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/slicer/index.js +0 -0
- /package/{lib → build-browser-lib}/source/SourceClass.d.ts +0 -0
- /package/{lib → build-browser-lib}/source/SourceElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/source/SourceManager.d.ts +0 -0
- /package/{lib → build-browser-lib}/source/SourceSet.d.ts +0 -0
- /package/{lib → build-browser-lib}/source/index.cjs +0 -0
- /package/{lib → build-browser-lib}/source/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/source/index.js +0 -0
- /package/{lib → build-browser-lib}/store/Composed.d.ts +0 -0
- /package/{lib → build-browser-lib}/store/CumulativeResource.d.ts +0 -0
- /package/{lib → build-browser-lib}/store/Derived.d.ts +0 -0
- /package/{lib → build-browser-lib}/store/DerivedArray.d.ts +0 -0
- /package/{lib → build-browser-lib}/store/Resource.d.ts +0 -0
- /package/{lib → build-browser-lib}/store/Store.d.ts +0 -0
- /package/{lib → build-browser-lib}/store/StoreRegistry.d.ts +0 -0
- /package/{lib → build-browser-lib}/store/index.cjs +0 -0
- /package/{lib → build-browser-lib}/store/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/store/index.js +0 -0
- /package/{lib → build-browser-lib}/string-3lAkpJJP.js +0 -0
- /package/{lib → build-browser-lib}/string-vBu90jhV.cjs +0 -0
- /package/{lib → build-browser-lib}/studio/StudioElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/studioStorage.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerBooleanManagerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerColorManagerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerFieldElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerFolderElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerLinkManagerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerNumberManagerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerRangeManagerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerSelectManagerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerStoreManagerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/TweakerStringManagerElement.d.ts +0 -0
- /package/{lib → build-browser-lib}/studio/tweaker/tweakerManagerConstructors.d.ts +0 -0
- /package/{lib → build-browser-lib}/style-At6aDoqG.cjs +0 -0
- /package/{lib → build-browser-lib}/style-j2TwriJ_.js +0 -0
- /package/{lib → build-browser-lib}/tags-C2jg1zYB.js +0 -0
- /package/{lib → build-browser-lib}/tags-DX-eNxbA.cjs +0 -0
- /package/{lib → build-browser-lib}/theme/index.cjs +0 -0
- /package/{lib → build-browser-lib}/theme/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/theme/index.js +0 -0
- /package/{lib → build-browser-lib}/utils/array.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/attributes.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/browser.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/canvas.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/collisions.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/coordinates.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/cssom.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/decoding.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/dom.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/easings.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/events.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/file.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/function.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/layout.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/math.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/number.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/object.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/string.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/style.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/ts-shape.d.ts +0 -0
- /package/{lib → build-browser-lib}/utils/ts-utility.d.ts +0 -0
- /package/{lib → build-browser-lib}/video/index.cjs +0 -0
- /package/{lib → build-browser-lib}/video/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/video/index.js +0 -0
- /package/{lib → build-browser-lib}/window-resizer/index.cjs +0 -0
- /package/{lib → build-browser-lib}/window-resizer/index.d.ts +0 -0
- /package/{lib → build-browser-lib}/window-resizer/index.js +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
var x = (h, s, t) => {
|
|
2
|
+
if (!s.has(h))
|
|
3
|
+
throw TypeError("Cannot " + t);
|
|
4
|
+
};
|
|
5
|
+
var i = (h, s, t) => (x(h, s, "read from private field"), t ? t.call(h) : s.get(h)), r = (h, s, t) => {
|
|
6
|
+
if (s.has(h))
|
|
7
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
+
s instanceof WeakSet ? s.add(h) : s.set(h, t);
|
|
9
|
+
}, e = (h, s, t, n) => (x(h, s, "write to private field"), n ? n.call(h, t) : s.set(h, t), t);
|
|
10
|
+
var L = (h, s, t) => (x(h, s, "access private method"), t);
|
|
11
|
+
import { intersector as S } from "../intersector/index.js";
|
|
12
|
+
import { i as q } from "../browser-0zX67oeU.js";
|
|
13
|
+
var b, u, y, f, d, l, o, F;
|
|
14
|
+
class B {
|
|
15
|
+
constructor(s, t) {
|
|
16
|
+
r(this, b, void 0);
|
|
17
|
+
r(this, u, void 0);
|
|
18
|
+
r(this, y, void 0);
|
|
19
|
+
r(this, f, 0);
|
|
20
|
+
r(this, d, 0);
|
|
21
|
+
r(this, l, 0);
|
|
22
|
+
r(this, o, !1);
|
|
23
|
+
r(this, F, (s) => {
|
|
24
|
+
e(this, o, s.isIntersecting);
|
|
25
|
+
});
|
|
26
|
+
e(this, b, s), e(this, u, t == null ? void 0 : t.maxFPS), e(this, y, (t == null ? void 0 : t.order) || 0), t != null && t.culling && q ? S.subscribe(t.culling, i(this, F)) : e(this, o, !0);
|
|
27
|
+
}
|
|
28
|
+
get callback() {
|
|
29
|
+
return i(this, b);
|
|
30
|
+
}
|
|
31
|
+
get order() {
|
|
32
|
+
return i(this, y);
|
|
33
|
+
}
|
|
34
|
+
sync(s) {
|
|
35
|
+
e(this, f, s - i(this, l));
|
|
36
|
+
}
|
|
37
|
+
tick(s) {
|
|
38
|
+
if (e(this, l, Math.max(0, s - i(this, f))), i(this, d) || e(this, d, s), i(this, u))
|
|
39
|
+
if (i(this, l) >= 1e3 / i(this, u))
|
|
40
|
+
e(this, f, s - i(this, l) % i(this, u));
|
|
41
|
+
else
|
|
42
|
+
return;
|
|
43
|
+
else
|
|
44
|
+
e(this, f, s);
|
|
45
|
+
i(this, o) && i(this, b).call(this, {
|
|
46
|
+
elapsed: i(this, l),
|
|
47
|
+
timestamp: s,
|
|
48
|
+
startTimestamp: i(this, d)
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
destroy() {
|
|
52
|
+
S.unsubscribe(i(this, F));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
b = new WeakMap(), u = new WeakMap(), y = new WeakMap(), f = new WeakMap(), d = new WeakMap(), l = new WeakMap(), o = new WeakMap(), F = new WeakMap();
|
|
56
|
+
var k, m, a, g, c, w, I, v, E, T, A;
|
|
57
|
+
class C {
|
|
58
|
+
constructor() {
|
|
59
|
+
r(this, w);
|
|
60
|
+
r(this, v);
|
|
61
|
+
r(this, k, 0);
|
|
62
|
+
r(this, m, 0);
|
|
63
|
+
r(this, a, void 0);
|
|
64
|
+
r(this, g, !1);
|
|
65
|
+
r(this, c, []);
|
|
66
|
+
r(this, T, (s) => {
|
|
67
|
+
if (i(this, g)) {
|
|
68
|
+
e(this, g, !1), e(this, k, s - i(this, m));
|
|
69
|
+
for (const t of i(this, c))
|
|
70
|
+
t.sync(i(this, m));
|
|
71
|
+
}
|
|
72
|
+
e(this, a, requestAnimationFrame(i(this, T))), e(this, m, s - i(this, k));
|
|
73
|
+
for (const t of i(this, c))
|
|
74
|
+
t.tick(i(this, m));
|
|
75
|
+
});
|
|
76
|
+
r(this, A, () => {
|
|
77
|
+
document.hidden && e(this, g, !0);
|
|
78
|
+
});
|
|
79
|
+
q && document.addEventListener(
|
|
80
|
+
"visibilitychange",
|
|
81
|
+
i(this, A)
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
subscribe(s, t) {
|
|
85
|
+
if (!i(this, c).find((n) => n.callback === s)) {
|
|
86
|
+
const n = new B(s, t);
|
|
87
|
+
n.sync(performance.now()), i(this, c).push(n), e(this, c, i(this, c).sort((P, V) => P.order - V.order));
|
|
88
|
+
}
|
|
89
|
+
return L(this, w, I).call(this), () => this.unsubscribe(s);
|
|
90
|
+
}
|
|
91
|
+
unsubscribe(s) {
|
|
92
|
+
const t = i(this, c).filter(
|
|
93
|
+
(n) => n.callback === s
|
|
94
|
+
);
|
|
95
|
+
t.length && (t.forEach((n) => n.destroy()), e(this, c, i(this, c).filter(
|
|
96
|
+
(n) => n.callback !== s
|
|
97
|
+
)), i(this, c).length || L(this, v, E).call(this));
|
|
98
|
+
}
|
|
99
|
+
destroy() {
|
|
100
|
+
q && (L(this, v, E).call(this), document.removeEventListener(
|
|
101
|
+
"visibilitychange",
|
|
102
|
+
i(this, A)
|
|
103
|
+
));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
k = new WeakMap(), m = new WeakMap(), a = new WeakMap(), g = new WeakMap(), c = new WeakMap(), w = new WeakSet(), I = function() {
|
|
107
|
+
i(this, c).length && !i(this, a) && e(this, a, requestAnimationFrame(i(this, T)));
|
|
108
|
+
}, v = new WeakSet(), E = function() {
|
|
109
|
+
i(this, a) && (cancelAnimationFrame(i(this, a)), e(this, a, void 0));
|
|
110
|
+
}, T = new WeakMap(), A = new WeakMap();
|
|
111
|
+
const j = new C();
|
|
112
|
+
export {
|
|
113
|
+
C as Ticker,
|
|
114
|
+
j as ticker
|
|
115
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),x=require("../browser-CpzFX2xg.cjs"),p=require("../dom-qY2LdCVL.cjs"),a=require("../easings-DsS5-Kqc.cjs"),y=require("../events-Crwi8fz6.cjs"),E=require("../file-EevnUtRj.cjs"),g=require("../function-MthRj-GJ.cjs"),h=require("../layout-8ryRAMGJ.cjs"),o=require("../math-GDWEqu7y.cjs"),f=require("../number-yVpzMdbQ.cjs"),u=require("../object-BZELAoVj.cjs"),I=require("../polyfills-CrcS4RcO.cjs"),l=require("../string-vBu90jhV.cjs"),C=require("../style-At6aDoqG.cjs");function S(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function w(t,e){const n=t.measureText(e),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent,s=n.width;return{height:i,width:s}}function Q(t){return Math.floor(t)+.5}function T(t,e,n,i,s,r){let m=t/e,O=n/i,c=0,d=0;return s=typeof s=="undefined"?.5:s,r=typeof r=="undefined"?.5:r,m>O?(c=i,d=i*m):(d=n,c=n/m),[(n-d)*s,(i-c)*r,d,c]}function v(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function q(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function D(t,e,n=!1){let i=t.x-e.width/2,s=e.height/2-t.y;return n&&(i=i/(e.width/2),s=s/(e.height/2)),{x:i,y:s}}function P(t,e){const n=t.x/e.x,i=t.y/e.y;return{x:n,y:i}}function R(t,e){return e=e||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-e.x)/e.width*e.width,y:(t.y-e.y)/e.height*e.height}}function A(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(i=>{i instanceof CSSStyleRule&&i.selectorText===":root"&&t.forEach(s=>{const r=i.styleMap.get(s);r?e[s]=r.toString():console.warn(`variable named ${s} not found`)})})}),e}function N(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function z(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}exports.parseAttribute=b.parseAttribute;exports.parseAttributeValue=b.parseAttributeValue;exports.isBrowser=x.isBrowser;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getElement=p.getElement;exports.easeInCubic=a.easeInCubic;exports.easeInExpo=a.easeInExpo;exports.easeInOutCubic=a.easeInOutCubic;exports.easeInOutExpo=a.easeInOutExpo;exports.easeInOutQuad=a.easeInOutQuad;exports.easeInOutQuart=a.easeInOutQuart;exports.easeInOutQuint=a.easeInOutQuint;exports.easeInQuad=a.easeInQuad;exports.easeInQuart=a.easeInQuart;exports.easeInQuint=a.easeInQuint;exports.easeOutCubic=a.easeOutCubic;exports.easeOutExpo=a.easeOutExpo;exports.easeOutQuad=a.easeOutQuad;exports.easeOutQuart=a.easeOutQuart;exports.easeOutQuint=a.easeOutQuint;exports.linear=a.linear;exports.dispatchSizeChangeEvent=y.dispatchSizeChangeEvent;exports.createJSONAndSave=E.createJSONAndSave;exports.debounce=g.debounce;exports.throttle=g.throttle;exports.getCumulativeOffsetLeft=h.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=h.getCumulativeOffsetTop;exports.getCumulativePosition=h.getCumulativePosition;exports.calculateDistance=o.calculateDistance;exports.calculateDistanceWithRadius=o.calculateDistanceWithRadius;exports.clamp=o.clamp;exports.damp=o.damp;exports.lerp=o.lerp;exports.mapRange=o.mapRange;exports.round=o.round;exports.smootherstep=o.smootherstep;exports.smoothstep=o.smoothstep;exports.step=o.step;exports.preciseNumber=f.preciseNumber;exports.roundNumberTo=f.roundNumberTo;exports.cloneDeep=u.cloneDeep;exports.compareObjects=u.compareObjects;exports.isESClass=u.isESClass;exports.isNullish=u.isNullish;exports.isObject=u.isObject;exports.mergeDeep=u.mergeDeep;exports.mixin=u.mixin;exports.omit=u.omit;exports.pick=u.pick;exports.nullishCoalescing=I.nullishCoalescing;exports.camelToKebab=l.camelToKebab;exports.capitalize=l.capitalize;exports.generateId=l.generateId;exports.kebabToCamel=l.kebabToCamel;exports.snakeToDotted=l.snakeToDotted;exports.toPascalCase=l.toPascalCase;exports.uncapitalize=l.uncapitalize;exports.getElementTransitionDurationMS=C.getElementTransitionDurationMS;exports.getElementTransitionDurationS=C.getElementTransitionDurationS;exports.cover=T;exports.decode=z;exports.dotCircleCollision=q;exports.dotRectCollision=v;exports.encode=N;exports.fixPosition=Q;exports.getPointerPosition=R;exports.getRootVariables=A;exports.insert=S;exports.measureText=w;exports.normalize=P;exports.screenToCartesian=D;
|
|
@@ -15,6 +15,7 @@ export { getCumulativePosition, getCumulativeOffsetLeft, getCumulativeOffsetTop,
|
|
|
15
15
|
export { lerp, damp, step, round, clamp, mapRange, smoothstep, smootherstep, calculateDistance, calculateDistanceWithRadius, } from './math';
|
|
16
16
|
export { preciseNumber, roundNumberTo } from './number';
|
|
17
17
|
export { isObject, cloneDeep, mergeDeep, isNullish, compareObjects, pick, omit, isESClass, mixin, } from './object';
|
|
18
|
+
export { nullishCoalescing } from './polyfills';
|
|
18
19
|
export { kebabToCamel, camelToKebab, snakeToDotted, toPascalCase, capitalize, uncapitalize, generateId, } from './string';
|
|
19
20
|
export { getElementTransitionDurationMS, getElementTransitionDurationS, } from './style';
|
|
20
21
|
export type { Axes2D, Axes3D, Dot2D, Rect2D, Circle, Dot3D, Rect3D, } from './ts-shape';
|
|
@@ -9,8 +9,9 @@ import { g as se, a as ne, b as oe } from "../layout-HoBT_Da2.js";
|
|
|
9
9
|
import { e as re, f as ue, c as le, d as ce, l as de, m as me, r as pe, b as fe, a as xe, s as he } from "../math-BOBiC4TN.js";
|
|
10
10
|
import { p as be, r as ye } from "../number-Bo5RdrA1.js";
|
|
11
11
|
import { c as Ce, d as Oe, i as Ee, b as Se, a as Ie, m as Re, e as Qe, o as ve, p as De } from "../object-R34VLqhp.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { n as Pe } from "../polyfills-DJUYczFm.js";
|
|
13
|
+
import { c as ke, a as Be, g as Me, k as Ne, s as je, t as ze, u as Ue } from "../string-3lAkpJJP.js";
|
|
14
|
+
import { g as qe, a as Je } from "../style-j2TwriJ_.js";
|
|
14
15
|
function c(t, e, ...a) {
|
|
15
16
|
return [...t.slice(0, e), ...a, ...t.slice(e)];
|
|
16
17
|
}
|
|
@@ -80,8 +81,8 @@ function C(t) {
|
|
|
80
81
|
export {
|
|
81
82
|
re as calculateDistance,
|
|
82
83
|
ue as calculateDistanceWithRadius,
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
ke as camelToKebab,
|
|
85
|
+
Be as capitalize,
|
|
85
86
|
le as clamp,
|
|
86
87
|
Ce as cloneDeep,
|
|
87
88
|
Oe as compareObjects,
|
|
@@ -112,13 +113,13 @@ export {
|
|
|
112
113
|
D as findParentElement,
|
|
113
114
|
T as findScrollParentElement,
|
|
114
115
|
m as fixPosition,
|
|
115
|
-
|
|
116
|
+
Me as generateId,
|
|
116
117
|
se as getCumulativeOffsetLeft,
|
|
117
118
|
ne as getCumulativeOffsetTop,
|
|
118
119
|
oe as getCumulativePosition,
|
|
119
120
|
P as getElement,
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
qe as getElementTransitionDurationMS,
|
|
122
|
+
Je as getElementTransitionDurationS,
|
|
122
123
|
b as getPointerPosition,
|
|
123
124
|
y as getRootVariables,
|
|
124
125
|
c as insert,
|
|
@@ -126,7 +127,7 @@ export {
|
|
|
126
127
|
Ee as isESClass,
|
|
127
128
|
Se as isNullish,
|
|
128
129
|
Ie as isObject,
|
|
129
|
-
|
|
130
|
+
Ne as kebabToCamel,
|
|
130
131
|
de as lerp,
|
|
131
132
|
X as linear,
|
|
132
133
|
me as mapRange,
|
|
@@ -134,6 +135,7 @@ export {
|
|
|
134
135
|
Re as mergeDeep,
|
|
135
136
|
Qe as mixin,
|
|
136
137
|
g as normalize,
|
|
138
|
+
Pe as nullishCoalescing,
|
|
137
139
|
ve as omit,
|
|
138
140
|
S as parseAttribute,
|
|
139
141
|
I as parseAttributeValue,
|
|
@@ -144,9 +146,9 @@ export {
|
|
|
144
146
|
h as screenToCartesian,
|
|
145
147
|
fe as smootherstep,
|
|
146
148
|
xe as smoothstep,
|
|
147
|
-
|
|
149
|
+
je as snakeToDotted,
|
|
148
150
|
he as step,
|
|
149
151
|
te as throttle,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
+
ze as toPascalCase,
|
|
153
|
+
Ue as uncapitalize
|
|
152
154
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nullishCoalescing<D, V = D>(value: V, defaultValue: D): D | (V & ({} | null));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../Store-D0_rDIsE.cjs");const n=require("../../onConnect-XY4UppQZ.cjs"),i=require("../index.cjs");function o(...e){n.onConnect(()=>i.windowResizer.subscribe(...e))}exports.onWindowResize=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./ComponentElement-DuiOKawv.cjs");function e(n){return n(t.currentComponentElement)}exports.withCurrentComponent=e;
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
var __accessCheck = (obj, member, msg) => {
|
|
2
|
+
if (!member.has(obj))
|
|
3
|
+
throw TypeError("Cannot " + msg);
|
|
4
|
+
};
|
|
5
|
+
var __privateGet = (obj, member, getter) => {
|
|
6
|
+
__accessCheck(obj, member, "read from private field");
|
|
7
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
8
|
+
};
|
|
9
|
+
var __privateAdd = (obj, member, value) => {
|
|
10
|
+
if (member.has(obj))
|
|
11
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13
|
+
};
|
|
14
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
15
|
+
__accessCheck(obj, member, "write to private field");
|
|
16
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
17
|
+
return value;
|
|
18
|
+
};
|
|
19
|
+
var __privateMethod = (obj, member, method) => {
|
|
20
|
+
__accessCheck(obj, member, "access private method");
|
|
21
|
+
return method;
|
|
22
|
+
};
|
|
23
|
+
var _plugin, _srcPath, _componentsPath, _publicPath, _currentComponentHTMLFilePaths, _currentComponentFolderPaths, _dom, _layout, _bracketsRegExp, _transform, transform_fn, _attributes, attributes_fn, _nest, nest_fn, _resources, resources_fn, _joinPaths, joinPaths_fn;
|
|
24
|
+
import { normalizePath } from "vite";
|
|
25
|
+
import { resolve, join } from "path";
|
|
26
|
+
import { parseHTML } from "linkedom";
|
|
27
|
+
import { existsSync, readdir, readFileSync } from "fs";
|
|
28
|
+
class HTMC {
|
|
29
|
+
constructor(options) {
|
|
30
|
+
__privateAdd(this, _transform);
|
|
31
|
+
__privateAdd(this, _attributes);
|
|
32
|
+
__privateAdd(this, _nest);
|
|
33
|
+
__privateAdd(this, _resources);
|
|
34
|
+
__privateAdd(this, _joinPaths);
|
|
35
|
+
__privateAdd(this, _plugin, void 0);
|
|
36
|
+
__privateAdd(this, _srcPath, void 0);
|
|
37
|
+
__privateAdd(this, _componentsPath, void 0);
|
|
38
|
+
__privateAdd(this, _publicPath, void 0);
|
|
39
|
+
__privateAdd(this, _currentComponentHTMLFilePaths, /* @__PURE__ */ new Set());
|
|
40
|
+
__privateAdd(this, _currentComponentFolderPaths, /* @__PURE__ */ new Set());
|
|
41
|
+
__privateAdd(this, _dom, null);
|
|
42
|
+
__privateAdd(this, _layout, void 0);
|
|
43
|
+
__privateAdd(this, _bracketsRegExp, new RegExp("({{[^}]*}})", "g"));
|
|
44
|
+
__privateSet(this, _srcPath, normalizePath(
|
|
45
|
+
resolve(process.cwd(), (options == null ? void 0 : options.srcFolderName) || "src")
|
|
46
|
+
));
|
|
47
|
+
__privateSet(this, _componentsPath, __privateMethod(this, _joinPaths, joinPaths_fn).call(this, __privateGet(this, _srcPath), "components"));
|
|
48
|
+
__privateSet(this, _publicPath, __privateMethod(this, _joinPaths, joinPaths_fn).call(this, __privateGet(this, _srcPath), "static"));
|
|
49
|
+
const layoutPath = __privateMethod(this, _joinPaths, joinPaths_fn).call(this, __privateGet(this, _srcPath), "components", "layout");
|
|
50
|
+
if (existsSync(layoutPath)) {
|
|
51
|
+
__privateSet(this, _layout, `
|
|
52
|
+
<component name="layout">
|
|
53
|
+
@
|
|
54
|
+
</component>
|
|
55
|
+
`);
|
|
56
|
+
} else {
|
|
57
|
+
__privateSet(this, _layout, `
|
|
58
|
+
<!doctype html>
|
|
59
|
+
<html>
|
|
60
|
+
<head></head>
|
|
61
|
+
<body>
|
|
62
|
+
@
|
|
63
|
+
</body>
|
|
64
|
+
</html>
|
|
65
|
+
`);
|
|
66
|
+
}
|
|
67
|
+
const pages = {};
|
|
68
|
+
readdir(__privateGet(this, _srcPath), { recursive: true }, (_, files) => {
|
|
69
|
+
files.forEach((f) => {
|
|
70
|
+
if (typeof f === "string") {
|
|
71
|
+
if (!f.includes("components") && f.includes("html")) {
|
|
72
|
+
pages[f] = __privateMethod(this, _joinPaths, joinPaths_fn).call(this, __privateGet(this, _srcPath), f);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
__privateSet(this, _plugin, {
|
|
78
|
+
name: "vite-plugin-htmc",
|
|
79
|
+
config: (config, env) => {
|
|
80
|
+
var _a, _b, _c, _d;
|
|
81
|
+
if (env.mode === "production" && env.command === "serve") {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
config.root = __privateGet(this, _srcPath);
|
|
85
|
+
config.publicDir = __privateGet(this, _publicPath);
|
|
86
|
+
config.resolve = {
|
|
87
|
+
...config.resolve,
|
|
88
|
+
alias: {
|
|
89
|
+
...(_a = config.resolve) == null ? void 0 : _a.alias,
|
|
90
|
+
"@components": __privateGet(this, _componentsPath)
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
config.build = {
|
|
94
|
+
assetsInlineLimit: 0,
|
|
95
|
+
emptyOutDir: true,
|
|
96
|
+
modulePreload: false,
|
|
97
|
+
...config.build,
|
|
98
|
+
rollupOptions: {
|
|
99
|
+
...(_b = config.build) == null ? void 0 : _b.rollupOptions,
|
|
100
|
+
input: {
|
|
101
|
+
...pages
|
|
102
|
+
},
|
|
103
|
+
output: {
|
|
104
|
+
dir: resolve(process.cwd(), (options == null ? void 0 : options.distFolderName) || "dist"),
|
|
105
|
+
chunkFileNames: () => {
|
|
106
|
+
return "assets/[name].js";
|
|
107
|
+
},
|
|
108
|
+
assetFileNames: () => {
|
|
109
|
+
return "assets/[name].[ext]";
|
|
110
|
+
},
|
|
111
|
+
entryFileNames: (e) => {
|
|
112
|
+
return `assets/${e.name.replace(".html", "")}.js`;
|
|
113
|
+
},
|
|
114
|
+
manualChunks: (options == null ? void 0 : options.assets) ? (e) => {
|
|
115
|
+
if ((options == null ? void 0 : options.assets) === "split") {
|
|
116
|
+
if (e.endsWith("ts") || e.endsWith("css")) {
|
|
117
|
+
return e.split("/").slice(-2).join("/").split(".")[0];
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
if (e.endsWith("ts")) {
|
|
121
|
+
return "scripts";
|
|
122
|
+
} else if (e.endsWith("css")) {
|
|
123
|
+
return "styles";
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
} : void 0,
|
|
127
|
+
...(_d = (_c = config.build) == null ? void 0 : _c.rollupOptions) == null ? void 0 : _d.output
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
},
|
|
132
|
+
handleHotUpdate: ({ file, server }) => {
|
|
133
|
+
if (__privateGet(this, _currentComponentHTMLFilePaths).has(file)) {
|
|
134
|
+
server.hot.send({
|
|
135
|
+
type: "full-reload",
|
|
136
|
+
path: "*"
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
transformIndexHtml: {
|
|
141
|
+
order: "pre",
|
|
142
|
+
handler: async (html, ctx) => {
|
|
143
|
+
var _a;
|
|
144
|
+
if (ctx.originalUrl) {
|
|
145
|
+
const splitted = ctx.originalUrl.split("?")[0].split(".");
|
|
146
|
+
if (splitted.length > 1) {
|
|
147
|
+
const last = splitted[splitted.length - 1];
|
|
148
|
+
if (last !== "html") {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
__privateGet(this, _currentComponentHTMLFilePaths).clear();
|
|
154
|
+
__privateGet(this, _currentComponentFolderPaths).clear();
|
|
155
|
+
const isComponent = (_a = ctx.originalUrl) == null ? void 0 : _a.includes("/components/");
|
|
156
|
+
if (isComponent) {
|
|
157
|
+
let name = ctx.originalUrl.split("/components/")[1].split("?")[0].split("#")[0];
|
|
158
|
+
html = __privateGet(this, _layout).replace("@", `<component name="${name}" />`);
|
|
159
|
+
}
|
|
160
|
+
__privateGet(this, _currentComponentHTMLFilePaths).add(ctx.filename);
|
|
161
|
+
__privateSet(this, _dom, parseHTML(html));
|
|
162
|
+
__privateMethod(this, _transform, transform_fn).call(this);
|
|
163
|
+
__privateMethod(this, _resources, resources_fn).call(this);
|
|
164
|
+
const res = `<!DOCTYPE html>
|
|
165
|
+
` + __privateGet(this, _dom).document.documentElement.outerHTML;
|
|
166
|
+
return res;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
get plugin() {
|
|
172
|
+
return __privateGet(this, _plugin);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
_plugin = new WeakMap();
|
|
176
|
+
_srcPath = new WeakMap();
|
|
177
|
+
_componentsPath = new WeakMap();
|
|
178
|
+
_publicPath = new WeakMap();
|
|
179
|
+
_currentComponentHTMLFilePaths = new WeakMap();
|
|
180
|
+
_currentComponentFolderPaths = new WeakMap();
|
|
181
|
+
_dom = new WeakMap();
|
|
182
|
+
_layout = new WeakMap();
|
|
183
|
+
_bracketsRegExp = new WeakMap();
|
|
184
|
+
_transform = new WeakSet();
|
|
185
|
+
transform_fn = function() {
|
|
186
|
+
let components = [];
|
|
187
|
+
do {
|
|
188
|
+
components = [...__privateGet(this, _dom).document.getElementsByTagName("component")];
|
|
189
|
+
components.forEach((component) => {
|
|
190
|
+
const name = component.getAttribute("name");
|
|
191
|
+
const folderPath = __privateMethod(this, _joinPaths, joinPaths_fn).call(this, __privateGet(this, _srcPath), "components", name, "/");
|
|
192
|
+
if (existsSync(folderPath)) {
|
|
193
|
+
const indexHTMLPath = normalizePath(folderPath + "/index.html");
|
|
194
|
+
if (existsSync(indexHTMLPath)) {
|
|
195
|
+
__privateGet(this, _currentComponentHTMLFilePaths).add(indexHTMLPath);
|
|
196
|
+
const componentHTML = readFileSync(indexHTMLPath, {
|
|
197
|
+
encoding: "utf-8"
|
|
198
|
+
});
|
|
199
|
+
const componentEmptyElement = __privateGet(this, _dom).document.createElement(
|
|
200
|
+
null
|
|
201
|
+
);
|
|
202
|
+
componentEmptyElement.innerHTML = componentHTML.replace(/<!DOCTYPE\s+html>/i, "").trim();
|
|
203
|
+
__privateMethod(this, _attributes, attributes_fn).call(this, component, componentEmptyElement);
|
|
204
|
+
const outerHTML = Array.from(
|
|
205
|
+
componentEmptyElement.childNodes
|
|
206
|
+
).reduce((p, c) => {
|
|
207
|
+
if (c instanceof __privateGet(this, _dom).Element) {
|
|
208
|
+
__privateMethod(this, _nest, nest_fn).call(this, component, c);
|
|
209
|
+
return p + c.outerHTML;
|
|
210
|
+
} else {
|
|
211
|
+
return p + (c.textContent || "");
|
|
212
|
+
}
|
|
213
|
+
}, "");
|
|
214
|
+
component.outerHTML = outerHTML;
|
|
215
|
+
}
|
|
216
|
+
const componentsNames = folderPath.split(__privateGet(this, _componentsPath))[1].slice(1, -1).split("/");
|
|
217
|
+
componentsNames.reduce((p, c) => {
|
|
218
|
+
const componentFolderPath = normalizePath(`${p}/${c}/`);
|
|
219
|
+
__privateGet(this, _currentComponentFolderPaths).add(componentFolderPath);
|
|
220
|
+
return componentFolderPath;
|
|
221
|
+
}, __privateGet(this, _componentsPath));
|
|
222
|
+
} else {
|
|
223
|
+
component.setAttribute("not-found", "");
|
|
224
|
+
component.textContent = "Компонент не найден";
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
} while (components.length && components.filter((c) => c.hasAttribute("not-found")).length !== components.length);
|
|
228
|
+
};
|
|
229
|
+
_attributes = new WeakSet();
|
|
230
|
+
attributes_fn = function(component, componentElement) {
|
|
231
|
+
const allElements = componentElement.querySelectorAll("*");
|
|
232
|
+
const elements = [];
|
|
233
|
+
for (let i = 0; i < allElements.length; i++) {
|
|
234
|
+
const element = allElements[i];
|
|
235
|
+
const attributes = element.attributes;
|
|
236
|
+
for (let j = 0; j < attributes.length; j++) {
|
|
237
|
+
const attributeName = attributes[j].name;
|
|
238
|
+
if (attributeName.startsWith("{{") && attributeName.endsWith("}}")) {
|
|
239
|
+
const normalAttributeName = attributeName.slice(2, -2);
|
|
240
|
+
const attributeValue = attributes[j].value;
|
|
241
|
+
element.removeAttribute(attributeName);
|
|
242
|
+
if (attributeValue) {
|
|
243
|
+
element.setAttribute(normalAttributeName, attributeValue);
|
|
244
|
+
}
|
|
245
|
+
elements.push({
|
|
246
|
+
element,
|
|
247
|
+
attributeName: normalAttributeName,
|
|
248
|
+
defaultValue: attributeValue
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
for (const attr of component.attributes) {
|
|
254
|
+
if (attr.name !== "name" && attr.value) {
|
|
255
|
+
elements.forEach((element) => {
|
|
256
|
+
if (element.attributeName === attr.name) {
|
|
257
|
+
const currentValue = element.element.getAttribute(element.attributeName) || "";
|
|
258
|
+
element.element.setAttribute(
|
|
259
|
+
element.attributeName,
|
|
260
|
+
`${currentValue}${currentValue ? " " : ""}${attr.value}`
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
for (const attr of component.attributes) {
|
|
267
|
+
if (attr.name !== "name") {
|
|
268
|
+
componentElement.innerHTML = componentElement.innerHTML.replace(
|
|
269
|
+
new RegExp(`{{\\s*${attr.name}\\s*(?:\\|\\|\\s*([^}]*))?\\s*}}`, "g"),
|
|
270
|
+
attr.value
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
componentElement.innerHTML = componentElement.innerHTML.replace(
|
|
275
|
+
__privateGet(this, _bracketsRegExp),
|
|
276
|
+
(v) => {
|
|
277
|
+
const content = v.slice(2, -2).split("||");
|
|
278
|
+
if (content.length > 1) {
|
|
279
|
+
return content[1].trim();
|
|
280
|
+
}
|
|
281
|
+
return "";
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
};
|
|
285
|
+
_nest = new WeakSet();
|
|
286
|
+
nest_fn = function(component, componentElement) {
|
|
287
|
+
let nestInserts = [...component.children].filter(
|
|
288
|
+
(element) => element.hasAttribute("nest")
|
|
289
|
+
);
|
|
290
|
+
nestInserts.forEach((insert) => {
|
|
291
|
+
insert.remove();
|
|
292
|
+
});
|
|
293
|
+
const defaultInserts = component.innerHTML;
|
|
294
|
+
const nestElements = componentElement.querySelectorAll("nest");
|
|
295
|
+
nestElements.forEach((nestElement) => {
|
|
296
|
+
const name = nestElement.getAttribute("name");
|
|
297
|
+
if (name && name !== "default") {
|
|
298
|
+
const inserts = nestInserts.filter(
|
|
299
|
+
(insert) => insert.getAttribute("nest") === name
|
|
300
|
+
);
|
|
301
|
+
inserts.forEach((insert) => insert.removeAttribute("nest"));
|
|
302
|
+
nestElement.outerHTML = inserts.reduce((p, c) => p + c.outerHTML, "");
|
|
303
|
+
nestInserts = nestInserts.filter((insert) => !inserts.includes(insert));
|
|
304
|
+
} else {
|
|
305
|
+
const inserts = nestInserts.filter(
|
|
306
|
+
(insert) => !insert.getAttribute("nest") || insert.getAttribute("nest") === "default"
|
|
307
|
+
);
|
|
308
|
+
inserts.forEach((insert) => insert.removeAttribute("nest"));
|
|
309
|
+
nestElement.outerHTML = inserts.reduce((p, c) => p + c.outerHTML, "") + defaultInserts;
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
};
|
|
313
|
+
_resources = new WeakSet();
|
|
314
|
+
resources_fn = function() {
|
|
315
|
+
const document = __privateGet(this, _dom).document;
|
|
316
|
+
let head = document.querySelector("head");
|
|
317
|
+
if (!head) {
|
|
318
|
+
head = document.createElement("head");
|
|
319
|
+
document.prepend(head);
|
|
320
|
+
}
|
|
321
|
+
const exts = ["js", "ts", "css"];
|
|
322
|
+
__privateGet(this, _currentComponentFolderPaths).forEach((folderPath) => {
|
|
323
|
+
const url = folderPath.split(__privateGet(this, _srcPath))[1];
|
|
324
|
+
exts.forEach((ext) => {
|
|
325
|
+
const urlPath = url + "index." + ext;
|
|
326
|
+
const filePath = __privateMethod(this, _joinPaths, joinPaths_fn).call(this, __privateGet(this, _srcPath), urlPath);
|
|
327
|
+
if (existsSync(filePath)) {
|
|
328
|
+
if (ext === "css") {
|
|
329
|
+
const element = document.createElement("link");
|
|
330
|
+
element.rel = "stylesheet";
|
|
331
|
+
element.href = urlPath;
|
|
332
|
+
head.appendChild(element);
|
|
333
|
+
} else {
|
|
334
|
+
const element = document.createElement("script");
|
|
335
|
+
element.type = "module";
|
|
336
|
+
element.src = urlPath;
|
|
337
|
+
head.appendChild(element);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
_joinPaths = new WeakSet();
|
|
344
|
+
joinPaths_fn = function(...paths) {
|
|
345
|
+
return normalizePath(join(...paths));
|
|
346
|
+
};
|
|
347
|
+
function htmc(options) {
|
|
348
|
+
return new HTMC(options).plugin;
|
|
349
|
+
}
|
|
350
|
+
export {
|
|
351
|
+
htmc
|
|
352
|
+
};
|