@easemate/web-kit 0.2.0 → 0.3.0
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/decorators.cjs +921 -0
- package/build/decorators.cjs.map +1 -0
- package/build/decorators.d.cts +123 -0
- package/build/decorators.d.ts +123 -0
- package/build/decorators.js +889 -0
- package/build/decorators.js.map +1 -0
- package/build/elements.cjs +27604 -0
- package/build/elements.cjs.map +1 -0
- package/build/elements.d.cts +373 -0
- package/build/elements.d.ts +373 -0
- package/build/elements.js +27528 -0
- package/build/elements.js.map +1 -0
- package/build/{elements/monitor/index.d.ts → index-31iOHBv0.d.cts} +26 -5
- package/build/{elements/monitor/index.d.cts → index-31iOHBv0.d.ts} +26 -5
- package/build/{elements/panel/index.d.cts → index-NzGpn7ai.d.cts} +6 -3
- package/build/{elements/panel/index.d.ts → index-NzGpn7ai.d.ts} +6 -3
- package/build/{elements/state/index.d.ts → index-qZoNKsHn.d.cts} +46 -5
- package/build/{elements/state/index.d.cts → index-qZoNKsHn.d.ts} +46 -5
- package/build/index.cjs +38651 -38
- package/build/index.cjs.map +1 -0
- package/build/index.d.cts +85 -6
- package/build/index.d.ts +85 -6
- package/build/index.js +38535 -12
- package/build/index.js.map +1 -0
- package/build/init-B7gNNyTd.d.ts +235 -0
- package/build/init-DwVGVxkx.d.cts +235 -0
- package/build/jsx.cjs +31 -0
- package/build/jsx.cjs.map +1 -0
- package/build/jsx.d.cts +317 -0
- package/build/jsx.d.ts +317 -0
- package/build/jsx.js +6 -0
- package/build/jsx.js.map +1 -0
- package/build/outside-click-rZ3Di_WX.d.cts +16 -0
- package/build/outside-click-rZ3Di_WX.d.ts +16 -0
- package/build/react.cjs +37827 -0
- package/build/react.cjs.map +1 -0
- package/build/react.d.cts +356 -0
- package/build/react.d.ts +356 -0
- package/build/react.js +37802 -0
- package/build/react.js.map +1 -0
- package/build/register.cjs +35832 -36
- package/build/register.cjs.map +1 -0
- package/build/register.d.cts +4 -33
- package/build/register.d.ts +4 -33
- package/build/register.js +35831 -35
- package/build/register.js.map +1 -0
- package/build/register.server.cjs +19 -0
- package/build/register.server.cjs.map +1 -0
- package/build/register.server.d.cts +2 -0
- package/build/register.server.d.ts +2 -0
- package/build/register.server.js +1 -0
- package/build/register.server.js.map +1 -0
- package/build/registry-9GX9KTG1.d.cts +264 -0
- package/build/registry-9GX9KTG1.d.ts +264 -0
- package/build/template-helpers-CguLXtLD.d.cts +10 -0
- package/build/template-helpers-CguLXtLD.d.ts +10 -0
- package/build/theme.cjs +746 -0
- package/build/theme.cjs.map +1 -0
- package/build/{theme/index.d.cts → theme.d.cts} +41 -21
- package/build/{theme/index.d.ts → theme.d.ts} +41 -21
- package/build/theme.js +692 -0
- package/build/theme.js.map +1 -0
- package/build/utils.cjs +205 -0
- package/build/utils.cjs.map +1 -0
- package/build/utils.d.cts +26 -0
- package/build/utils.d.ts +26 -0
- package/build/utils.js +167 -0
- package/build/utils.js.map +1 -0
- package/package.json +47 -33
- package/build/components/code/index.cjs +0 -152
- package/build/components/code/index.d.cts +0 -11
- package/build/components/code/index.d.ts +0 -11
- package/build/components/code/index.js +0 -148
- package/build/components/code/utils/highlight-api.cjs +0 -18
- package/build/components/code/utils/highlight-api.d.cts +0 -7
- package/build/components/code/utils/highlight-api.d.ts +0 -7
- package/build/components/code/utils/highlight-api.js +0 -14
- package/build/components/code/utils/syntax-grammars.cjs +0 -62
- package/build/components/code/utils/syntax-grammars.d.cts +0 -7
- package/build/components/code/utils/syntax-grammars.d.ts +0 -7
- package/build/components/code/utils/syntax-grammars.js +0 -59
- package/build/components/code/utils/syntax-highlighter-theme.cjs +0 -27
- package/build/components/code/utils/syntax-highlighter-theme.d.cts +0 -3
- package/build/components/code/utils/syntax-highlighter-theme.d.ts +0 -3
- package/build/components/code/utils/syntax-highlighter-theme.js +0 -23
- package/build/components/code/utils/syntax-highlighter-types.cjs +0 -2
- package/build/components/code/utils/syntax-highlighter-types.d.cts +0 -12
- package/build/components/code/utils/syntax-highlighter-types.d.ts +0 -12
- package/build/components/code/utils/syntax-highlighter-types.js +0 -1
- package/build/components/code/utils/syntax-tokenizer.cjs +0 -63
- package/build/components/code/utils/syntax-tokenizer.d.cts +0 -3
- package/build/components/code/utils/syntax-tokenizer.d.ts +0 -3
- package/build/components/code/utils/syntax-tokenizer.js +0 -58
- package/build/components/curve/bezier-conversion.cjs +0 -23
- package/build/components/curve/bezier-conversion.d.cts +0 -2
- package/build/components/curve/bezier-conversion.d.ts +0 -2
- package/build/components/curve/bezier-conversion.js +0 -19
- package/build/components/curve/canvas-controls.cjs +0 -300
- package/build/components/curve/canvas-controls.d.cts +0 -12
- package/build/components/curve/canvas-controls.d.ts +0 -12
- package/build/components/curve/canvas-controls.js +0 -296
- package/build/components/curve/canvas.cjs +0 -1208
- package/build/components/curve/canvas.d.cts +0 -24
- package/build/components/curve/canvas.d.ts +0 -24
- package/build/components/curve/canvas.js +0 -1204
- package/build/components/curve/constants.cjs +0 -203
- package/build/components/curve/constants.d.cts +0 -23
- package/build/components/curve/constants.d.ts +0 -23
- package/build/components/curve/constants.js +0 -200
- package/build/components/curve/controls.cjs +0 -942
- package/build/components/curve/controls.d.cts +0 -37
- package/build/components/curve/controls.d.ts +0 -37
- package/build/components/curve/controls.js +0 -938
- package/build/components/curve/index.cjs +0 -335
- package/build/components/curve/index.d.cts +0 -31
- package/build/components/curve/index.d.ts +0 -31
- package/build/components/curve/index.js +0 -330
- package/build/components/curve/output.cjs +0 -141
- package/build/components/curve/output.d.cts +0 -19
- package/build/components/curve/output.d.ts +0 -19
- package/build/components/curve/output.js +0 -137
- package/build/components/curve/styles.cjs +0 -493
- package/build/components/curve/styles.d.cts +0 -6
- package/build/components/curve/styles.d.ts +0 -6
- package/build/components/curve/styles.js +0 -490
- package/build/components/curve/svg-renderer.cjs +0 -185
- package/build/components/curve/svg-renderer.d.cts +0 -9
- package/build/components/curve/svg-renderer.d.ts +0 -9
- package/build/components/curve/svg-renderer.js +0 -175
- package/build/components/curve/toolbar.cjs +0 -368
- package/build/components/curve/toolbar.d.cts +0 -26
- package/build/components/curve/toolbar.d.ts +0 -26
- package/build/components/curve/toolbar.js +0 -364
- package/build/components/curve/types.cjs +0 -10
- package/build/components/curve/types.d.cts +0 -33
- package/build/components/curve/types.d.ts +0 -33
- package/build/components/curve/types.js +0 -7
- package/build/components/curve/utils.cjs +0 -541
- package/build/components/curve/utils.d.cts +0 -33
- package/build/components/curve/utils.d.ts +0 -33
- package/build/components/curve/utils.js +0 -521
- package/build/components/index.cjs +0 -18
- package/build/components/index.d.cts +0 -2
- package/build/components/index.d.ts +0 -2
- package/build/components/index.js +0 -2
- package/build/decorators/Component.cjs +0 -127
- package/build/decorators/Component.d.cts +0 -28
- package/build/decorators/Component.d.ts +0 -28
- package/build/decorators/Component.js +0 -123
- package/build/decorators/Listen.cjs +0 -154
- package/build/decorators/Listen.d.cts +0 -18
- package/build/decorators/Listen.d.ts +0 -18
- package/build/decorators/Listen.js +0 -151
- package/build/decorators/OutsideClick.cjs +0 -64
- package/build/decorators/OutsideClick.d.cts +0 -16
- package/build/decorators/OutsideClick.d.ts +0 -16
- package/build/decorators/OutsideClick.js +0 -59
- package/build/decorators/Prop.cjs +0 -273
- package/build/decorators/Prop.d.cts +0 -22
- package/build/decorators/Prop.d.ts +0 -22
- package/build/decorators/Prop.js +0 -270
- package/build/decorators/Query.cjs +0 -79
- package/build/decorators/Query.d.cts +0 -27
- package/build/decorators/Query.d.ts +0 -27
- package/build/decorators/Query.js +0 -76
- package/build/decorators/Watch.cjs +0 -52
- package/build/decorators/Watch.d.cts +0 -11
- package/build/decorators/Watch.d.ts +0 -11
- package/build/decorators/Watch.js +0 -49
- package/build/decorators/index.cjs +0 -15
- package/build/decorators/index.d.cts +0 -6
- package/build/decorators/index.d.ts +0 -6
- package/build/decorators/index.js +0 -6
- package/build/elements/button/index.cjs +0 -214
- package/build/elements/button/index.d.cts +0 -11
- package/build/elements/button/index.d.ts +0 -11
- package/build/elements/button/index.js +0 -210
- package/build/elements/checkbox/index.cjs +0 -316
- package/build/elements/checkbox/index.d.cts +0 -14
- package/build/elements/checkbox/index.d.ts +0 -14
- package/build/elements/checkbox/index.js +0 -312
- package/build/elements/color/index.cjs +0 -154
- package/build/elements/color/index.d.cts +0 -18
- package/build/elements/color/index.d.ts +0 -18
- package/build/elements/color/index.js +0 -150
- package/build/elements/color/picker.cjs +0 -544
- package/build/elements/color/picker.d.cts +0 -37
- package/build/elements/color/picker.d.ts +0 -37
- package/build/elements/color/picker.js +0 -540
- package/build/elements/color/utils.cjs +0 -235
- package/build/elements/color/utils.d.cts +0 -37
- package/build/elements/color/utils.d.ts +0 -37
- package/build/elements/color/utils.js +0 -218
- package/build/elements/dropdown/index.cjs +0 -875
- package/build/elements/dropdown/index.d.cts +0 -30
- package/build/elements/dropdown/index.d.ts +0 -30
- package/build/elements/dropdown/index.js +0 -871
- package/build/elements/field/index.cjs +0 -82
- package/build/elements/field/index.d.cts +0 -4
- package/build/elements/field/index.d.ts +0 -4
- package/build/elements/field/index.js +0 -78
- package/build/elements/icons/animation/chevron.cjs +0 -57
- package/build/elements/icons/animation/chevron.d.cts +0 -10
- package/build/elements/icons/animation/chevron.d.ts +0 -10
- package/build/elements/icons/animation/chevron.js +0 -53
- package/build/elements/icons/animation/clear.cjs +0 -74
- package/build/elements/icons/animation/clear.d.cts +0 -3
- package/build/elements/icons/animation/clear.d.ts +0 -3
- package/build/elements/icons/animation/clear.js +0 -70
- package/build/elements/icons/animation/grid.cjs +0 -77
- package/build/elements/icons/animation/grid.d.cts +0 -8
- package/build/elements/icons/animation/grid.d.ts +0 -8
- package/build/elements/icons/animation/grid.js +0 -73
- package/build/elements/icons/animation/loading.cjs +0 -68
- package/build/elements/icons/animation/loading.d.cts +0 -3
- package/build/elements/icons/animation/loading.d.ts +0 -3
- package/build/elements/icons/animation/loading.js +0 -64
- package/build/elements/icons/animation/snap.cjs +0 -133
- package/build/elements/icons/animation/snap.d.cts +0 -8
- package/build/elements/icons/animation/snap.d.ts +0 -8
- package/build/elements/icons/animation/snap.js +0 -129
- package/build/elements/icons/index.cjs +0 -40
- package/build/elements/icons/index.d.cts +0 -24
- package/build/elements/icons/index.d.ts +0 -24
- package/build/elements/icons/index.js +0 -24
- package/build/elements/icons/interface/anchor-add.cjs +0 -35
- package/build/elements/icons/interface/anchor-add.d.cts +0 -3
- package/build/elements/icons/interface/anchor-add.d.ts +0 -3
- package/build/elements/icons/interface/anchor-add.js +0 -31
- package/build/elements/icons/interface/anchor-remove.cjs +0 -34
- package/build/elements/icons/interface/anchor-remove.d.cts +0 -3
- package/build/elements/icons/interface/anchor-remove.d.ts +0 -3
- package/build/elements/icons/interface/anchor-remove.js +0 -30
- package/build/elements/icons/interface/arrow-up.cjs +0 -30
- package/build/elements/icons/interface/arrow-up.d.cts +0 -3
- package/build/elements/icons/interface/arrow-up.d.ts +0 -3
- package/build/elements/icons/interface/arrow-up.js +0 -26
- package/build/elements/icons/interface/arrows-vertical.cjs +0 -30
- package/build/elements/icons/interface/arrows-vertical.d.cts +0 -3
- package/build/elements/icons/interface/arrows-vertical.d.ts +0 -3
- package/build/elements/icons/interface/arrows-vertical.js +0 -26
- package/build/elements/icons/interface/bezier-angle.cjs +0 -33
- package/build/elements/icons/interface/bezier-angle.d.cts +0 -3
- package/build/elements/icons/interface/bezier-angle.d.ts +0 -3
- package/build/elements/icons/interface/bezier-angle.js +0 -29
- package/build/elements/icons/interface/bezier-distribute.cjs +0 -34
- package/build/elements/icons/interface/bezier-distribute.d.cts +0 -3
- package/build/elements/icons/interface/bezier-distribute.d.ts +0 -3
- package/build/elements/icons/interface/bezier-distribute.js +0 -30
- package/build/elements/icons/interface/bezier-length.cjs +0 -31
- package/build/elements/icons/interface/bezier-length.d.cts +0 -3
- package/build/elements/icons/interface/bezier-length.d.ts +0 -3
- package/build/elements/icons/interface/bezier-length.js +0 -27
- package/build/elements/icons/interface/bezier-mirror.cjs +0 -31
- package/build/elements/icons/interface/bezier-mirror.d.cts +0 -3
- package/build/elements/icons/interface/bezier-mirror.d.ts +0 -3
- package/build/elements/icons/interface/bezier-mirror.js +0 -27
- package/build/elements/icons/interface/bezier.cjs +0 -26
- package/build/elements/icons/interface/bezier.d.cts +0 -3
- package/build/elements/icons/interface/bezier.d.ts +0 -3
- package/build/elements/icons/interface/bezier.js +0 -22
- package/build/elements/icons/interface/check.cjs +0 -30
- package/build/elements/icons/interface/check.d.cts +0 -3
- package/build/elements/icons/interface/check.d.ts +0 -3
- package/build/elements/icons/interface/check.js +0 -26
- package/build/elements/icons/interface/circle-arrow-left.cjs +0 -30
- package/build/elements/icons/interface/circle-arrow-left.d.cts +0 -3
- package/build/elements/icons/interface/circle-arrow-left.d.ts +0 -3
- package/build/elements/icons/interface/circle-arrow-left.js +0 -26
- package/build/elements/icons/interface/circle-arrow-right.cjs +0 -30
- package/build/elements/icons/interface/circle-arrow-right.d.cts +0 -3
- package/build/elements/icons/interface/circle-arrow-right.d.ts +0 -3
- package/build/elements/icons/interface/circle-arrow-right.js +0 -26
- package/build/elements/icons/interface/code.cjs +0 -30
- package/build/elements/icons/interface/code.d.cts +0 -3
- package/build/elements/icons/interface/code.d.ts +0 -3
- package/build/elements/icons/interface/code.js +0 -26
- package/build/elements/icons/interface/dots.cjs +0 -32
- package/build/elements/icons/interface/dots.d.cts +0 -3
- package/build/elements/icons/interface/dots.d.ts +0 -3
- package/build/elements/icons/interface/dots.js +0 -28
- package/build/elements/icons/interface/mention.cjs +0 -30
- package/build/elements/icons/interface/mention.d.cts +0 -3
- package/build/elements/icons/interface/mention.d.ts +0 -3
- package/build/elements/icons/interface/mention.js +0 -26
- package/build/elements/icons/interface/minus.cjs +0 -30
- package/build/elements/icons/interface/minus.d.cts +0 -3
- package/build/elements/icons/interface/minus.d.ts +0 -3
- package/build/elements/icons/interface/minus.js +0 -26
- package/build/elements/icons/interface/picker.cjs +0 -34
- package/build/elements/icons/interface/picker.d.cts +0 -3
- package/build/elements/icons/interface/picker.d.ts +0 -3
- package/build/elements/icons/interface/picker.js +0 -30
- package/build/elements/icons/interface/plus.cjs +0 -30
- package/build/elements/icons/interface/plus.d.cts +0 -3
- package/build/elements/icons/interface/plus.d.ts +0 -3
- package/build/elements/icons/interface/plus.js +0 -26
- package/build/elements/icons/interface/settings.cjs +0 -30
- package/build/elements/icons/interface/settings.d.cts +0 -3
- package/build/elements/icons/interface/settings.d.ts +0 -3
- package/build/elements/icons/interface/settings.js +0 -26
- package/build/elements/index.cjs +0 -65
- package/build/elements/index.d.cts +0 -23
- package/build/elements/index.d.ts +0 -23
- package/build/elements/index.js +0 -23
- package/build/elements/input/index.cjs +0 -273
- package/build/elements/input/index.d.cts +0 -17
- package/build/elements/input/index.d.ts +0 -17
- package/build/elements/input/index.js +0 -269
- package/build/elements/logo/index.cjs +0 -732
- package/build/elements/logo/index.d.cts +0 -17
- package/build/elements/logo/index.d.ts +0 -17
- package/build/elements/logo/index.js +0 -728
- package/build/elements/monitor/fps.cjs +0 -432
- package/build/elements/monitor/fps.d.cts +0 -21
- package/build/elements/monitor/fps.d.ts +0 -21
- package/build/elements/monitor/fps.js +0 -428
- package/build/elements/monitor/index.cjs +0 -670
- package/build/elements/monitor/index.js +0 -666
- package/build/elements/number/index.cjs +0 -173
- package/build/elements/number/index.d.cts +0 -19
- package/build/elements/number/index.d.ts +0 -19
- package/build/elements/number/index.js +0 -169
- package/build/elements/origin/index.cjs +0 -169
- package/build/elements/origin/index.d.cts +0 -12
- package/build/elements/origin/index.d.ts +0 -12
- package/build/elements/origin/index.js +0 -165
- package/build/elements/panel/index.cjs +0 -496
- package/build/elements/panel/index.js +0 -492
- package/build/elements/popover/index.cjs +0 -209
- package/build/elements/popover/index.d.cts +0 -19
- package/build/elements/popover/index.d.ts +0 -19
- package/build/elements/popover/index.js +0 -205
- package/build/elements/radio/index.cjs +0 -301
- package/build/elements/radio/index.d.cts +0 -13
- package/build/elements/radio/index.d.ts +0 -13
- package/build/elements/radio/index.js +0 -283
- package/build/elements/radio/input.cjs +0 -329
- package/build/elements/radio/input.d.cts +0 -15
- package/build/elements/radio/input.d.ts +0 -15
- package/build/elements/radio/input.js +0 -325
- package/build/elements/radio/option.cjs +0 -15
- package/build/elements/radio/option.d.cts +0 -3
- package/build/elements/radio/option.d.ts +0 -3
- package/build/elements/radio/option.js +0 -11
- package/build/elements/shared.cjs +0 -66
- package/build/elements/shared.d.cts +0 -40
- package/build/elements/shared.d.ts +0 -40
- package/build/elements/shared.js +0 -59
- package/build/elements/slider/index.cjs +0 -232
- package/build/elements/slider/index.d.cts +0 -20
- package/build/elements/slider/index.d.ts +0 -20
- package/build/elements/slider/index.js +0 -228
- package/build/elements/state/index.cjs +0 -274
- package/build/elements/state/index.js +0 -270
- package/build/elements/toggle/index.cjs +0 -151
- package/build/elements/toggle/index.d.cts +0 -9
- package/build/elements/toggle/index.d.ts +0 -9
- package/build/elements/toggle/index.js +0 -147
- package/build/elements/tooltip/index.cjs +0 -187
- package/build/elements/tooltip/index.d.cts +0 -17
- package/build/elements/tooltip/index.d.ts +0 -17
- package/build/elements/tooltip/index.js +0 -183
- package/build/init.cjs +0 -325
- package/build/init.d.cts +0 -157
- package/build/init.d.ts +0 -157
- package/build/init.js +0 -289
- package/build/internal/component-loaders.cjs +0 -208
- package/build/internal/component-loaders.d.cts +0 -52
- package/build/internal/component-loaders.d.ts +0 -52
- package/build/internal/component-loaders.js +0 -169
- package/build/internal/fonts.cjs +0 -128
- package/build/internal/fonts.d.cts +0 -32
- package/build/internal/fonts.d.ts +0 -32
- package/build/internal/fonts.js +0 -123
- package/build/internal/lazy-load.cjs +0 -89
- package/build/internal/lazy-load.d.cts +0 -32
- package/build/internal/lazy-load.d.ts +0 -32
- package/build/internal/lazy-load.js +0 -86
- package/build/internal/style-inject.cjs +0 -236
- package/build/internal/style-inject.d.cts +0 -44
- package/build/internal/style-inject.d.ts +0 -44
- package/build/internal/style-inject.js +0 -226
- package/build/react/events.cjs +0 -25
- package/build/react/events.d.cts +0 -39
- package/build/react/events.d.ts +0 -39
- package/build/react/events.js +0 -22
- package/build/react/index.cjs +0 -19
- package/build/react/index.d.cts +0 -13
- package/build/react/index.d.ts +0 -13
- package/build/react/index.js +0 -12
- package/build/react/provider.cjs +0 -134
- package/build/react/provider.d.cts +0 -81
- package/build/react/provider.d.ts +0 -81
- package/build/react/provider.js +0 -98
- package/build/react/types.cjs +0 -8
- package/build/react/types.d.cts +0 -55
- package/build/react/types.d.ts +0 -55
- package/build/react/types.js +0 -7
- package/build/react/use-ease-state.cjs +0 -129
- package/build/react/use-ease-state.d.cts +0 -95
- package/build/react/use-ease-state.d.ts +0 -95
- package/build/react/use-ease-state.js +0 -126
- package/build/react/use-web-kit.cjs +0 -150
- package/build/react/use-web-kit.d.cts +0 -80
- package/build/react/use-web-kit.d.ts +0 -80
- package/build/react/use-web-kit.js +0 -114
- package/build/theme/index.cjs +0 -452
- package/build/theme/index.js +0 -423
- package/build/theme/presets.cjs +0 -54
- package/build/theme/presets.d.cts +0 -19
- package/build/theme/presets.d.ts +0 -19
- package/build/theme/presets.js +0 -51
- package/build/theme/registry.cjs +0 -204
- package/build/theme/registry.d.cts +0 -99
- package/build/theme/registry.d.ts +0 -99
- package/build/theme/registry.js +0 -194
- package/build/theme/tokens.cjs +0 -148
- package/build/theme/tokens.d.cts +0 -163
- package/build/theme/tokens.d.ts +0 -163
- package/build/theme/tokens.js +0 -145
- package/build/utils/dismiss-controller.cjs +0 -77
- package/build/utils/dismiss-controller.d.cts +0 -14
- package/build/utils/dismiss-controller.d.ts +0 -14
- package/build/utils/dismiss-controller.js +0 -73
- package/build/utils/index.cjs +0 -18
- package/build/utils/index.d.cts +0 -3
- package/build/utils/index.d.ts +0 -3
- package/build/utils/index.js +0 -3
- package/build/utils/outside-click.cjs +0 -82
- package/build/utils/outside-click.d.cts +0 -18
- package/build/utils/outside-click.d.ts +0 -18
- package/build/utils/outside-click.js +0 -74
- package/build/utils/template-helpers.cjs +0 -39
- package/build/utils/template-helpers.d.cts +0 -13
- package/build/utils/template-helpers.d.ts +0 -13
- package/build/utils/template-helpers.js +0 -28
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lazy loading utilities using MutationObserver.
|
|
3
|
-
*/
|
|
4
|
-
import { COMPONENT_LOADERS, WEB_KIT_ALL_TAGS } from "./component-loaders.js";
|
|
5
|
-
import { isBrowser } from "./style-inject.js";
|
|
6
|
-
/**
|
|
7
|
-
* Create a lazy loader that auto-registers components when they appear in DOM.
|
|
8
|
-
*/
|
|
9
|
-
export function createLazyLoader(config = {}) {
|
|
10
|
-
if (!isBrowser()) {
|
|
11
|
-
return {
|
|
12
|
-
dispose: () => { },
|
|
13
|
-
load: async () => { }
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
const { root = document, include, exclude, preload } = config;
|
|
17
|
-
// Determine which tags to watch
|
|
18
|
-
let watchTags = new Set([...WEB_KIT_ALL_TAGS]);
|
|
19
|
-
if (include && include.length > 0) {
|
|
20
|
-
watchTags = new Set(include.filter((tag) => WEB_KIT_ALL_TAGS.includes(tag)));
|
|
21
|
-
}
|
|
22
|
-
if (exclude && exclude.length > 0) {
|
|
23
|
-
for (const tag of exclude) {
|
|
24
|
-
watchTags.delete(tag);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
// Track loaded components
|
|
28
|
-
const loaded = new Set();
|
|
29
|
-
// Load a component
|
|
30
|
-
const load = async (tag) => {
|
|
31
|
-
if (loaded.has(tag)) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const loader = COMPONENT_LOADERS[tag];
|
|
35
|
-
if (loader) {
|
|
36
|
-
loaded.add(tag);
|
|
37
|
-
await loader();
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
// Check if an element or its descendants need loading
|
|
41
|
-
const checkElement = (element) => {
|
|
42
|
-
const tagName = element.tagName.toLowerCase();
|
|
43
|
-
if (watchTags.has(tagName) && !loaded.has(tagName)) {
|
|
44
|
-
void load(tagName);
|
|
45
|
-
}
|
|
46
|
-
// Check children
|
|
47
|
-
for (const child of element.querySelectorAll('*')) {
|
|
48
|
-
const childTag = child.tagName.toLowerCase();
|
|
49
|
-
if (watchTags.has(childTag) && !loaded.has(childTag)) {
|
|
50
|
-
void load(childTag);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
// Create observer
|
|
55
|
-
const observer = new MutationObserver((mutations) => {
|
|
56
|
-
for (const mutation of mutations) {
|
|
57
|
-
for (const node of mutation.addedNodes) {
|
|
58
|
-
if (node instanceof Element) {
|
|
59
|
-
checkElement(node);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
// Start observing
|
|
65
|
-
const target = root instanceof Document ? root.documentElement : root;
|
|
66
|
-
observer.observe(target, {
|
|
67
|
-
childList: true,
|
|
68
|
-
subtree: true
|
|
69
|
-
});
|
|
70
|
-
// Check existing elements
|
|
71
|
-
checkElement(target);
|
|
72
|
-
// Preload specified tags
|
|
73
|
-
if (preload && preload.length > 0) {
|
|
74
|
-
for (const tag of preload) {
|
|
75
|
-
if (WEB_KIT_ALL_TAGS.includes(tag)) {
|
|
76
|
-
void load(tag);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
dispose: () => {
|
|
82
|
-
observer.disconnect();
|
|
83
|
-
},
|
|
84
|
-
load
|
|
85
|
-
};
|
|
86
|
-
}
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Style injection utilities for runtime CSS application.
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MAIN_CSS = exports.BASE_CSS = exports.RESET_CSS = exports.isBrowser = void 0;
|
|
7
|
-
exports.injectStyle = injectStyle;
|
|
8
|
-
exports.removeStyle = removeStyle;
|
|
9
|
-
exports.hasStyle = hasStyle;
|
|
10
|
-
exports.getPresetCSS = getPresetCSS;
|
|
11
|
-
exports.injectPreset = injectPreset;
|
|
12
|
-
exports.removePreset = removePreset;
|
|
13
|
-
const STYLE_ID_PREFIX = 'ease-webkit-';
|
|
14
|
-
/**
|
|
15
|
-
* Check if we're in a browser environment.
|
|
16
|
-
*/
|
|
17
|
-
const isBrowser = () => typeof document !== 'undefined' && typeof window !== 'undefined';
|
|
18
|
-
exports.isBrowser = isBrowser;
|
|
19
|
-
/**
|
|
20
|
-
* Inject a style tag with the given CSS content.
|
|
21
|
-
*/
|
|
22
|
-
function injectStyle(id, css, nonce) {
|
|
23
|
-
if (!(0, exports.isBrowser)()) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const fullId = STYLE_ID_PREFIX + id;
|
|
27
|
-
// Check if already injected
|
|
28
|
-
let style = document.getElementById(fullId);
|
|
29
|
-
if (style) {
|
|
30
|
-
// Update content if different
|
|
31
|
-
if (style.textContent !== css) {
|
|
32
|
-
style.textContent = css;
|
|
33
|
-
}
|
|
34
|
-
return style;
|
|
35
|
-
}
|
|
36
|
-
// Create new style element
|
|
37
|
-
style = document.createElement('style');
|
|
38
|
-
style.id = fullId;
|
|
39
|
-
style.textContent = css;
|
|
40
|
-
if (nonce) {
|
|
41
|
-
style.nonce = nonce;
|
|
42
|
-
}
|
|
43
|
-
document.head.appendChild(style);
|
|
44
|
-
return style;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Remove an injected style tag.
|
|
48
|
-
*/
|
|
49
|
-
function removeStyle(id) {
|
|
50
|
-
if (!(0, exports.isBrowser)()) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const fullId = STYLE_ID_PREFIX + id;
|
|
54
|
-
const style = document.getElementById(fullId);
|
|
55
|
-
if (style) {
|
|
56
|
-
style.remove();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Check if a style is already injected.
|
|
61
|
-
*/
|
|
62
|
-
function hasStyle(id) {
|
|
63
|
-
if (!(0, exports.isBrowser)()) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
const fullId = STYLE_ID_PREFIX + id;
|
|
67
|
-
return document.getElementById(fullId) !== null;
|
|
68
|
-
}
|
|
69
|
-
// --------------------------
|
|
70
|
-
// Preset styles
|
|
71
|
-
// --------------------------
|
|
72
|
-
/**
|
|
73
|
-
* Minimal reset styles (box-sizing, etc.)
|
|
74
|
-
*/
|
|
75
|
-
exports.RESET_CSS = `
|
|
76
|
-
@layer ease-reset {
|
|
77
|
-
*,
|
|
78
|
-
*::after,
|
|
79
|
-
*::before {
|
|
80
|
-
box-sizing: border-box;
|
|
81
|
-
transition-timing-function: cubic-bezier(0.25, 0, 0.5, 1);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
:where(html) {
|
|
85
|
-
color-scheme: light dark;
|
|
86
|
-
hanging-punctuation: first allow-end last;
|
|
87
|
-
interpolate-size: allow-keywords;
|
|
88
|
-
scroll-behavior: smooth;
|
|
89
|
-
scrollbar-gutter: stable;
|
|
90
|
-
text-size-adjust: none;
|
|
91
|
-
-webkit-text-size-adjust: none;
|
|
92
|
-
-webkit-tap-highlight-color: transparent;
|
|
93
|
-
-webkit-font-smoothing: antialiased;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:where(html.translated-rtl) {
|
|
97
|
-
direction: rtl;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
@media (prefers-reduced-motion: reduce) {
|
|
101
|
-
:where(html) {
|
|
102
|
-
scroll-behavior: auto;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
:where(body) {
|
|
107
|
-
min-block-size: 100svb;
|
|
108
|
-
min-inline-size: 300px;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
:where(canvas, img, picture, svg, video) {
|
|
112
|
-
block-size: auto;
|
|
113
|
-
border: none;
|
|
114
|
-
display: block;
|
|
115
|
-
max-inline-size: 100%;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:where(button) {
|
|
119
|
-
cursor: pointer;
|
|
120
|
-
user-select: none;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
:where(textarea) {
|
|
124
|
-
resize: vertical;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
:where(textarea:not([rows])) {
|
|
128
|
-
field-sizing: content;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
:where(fieldset, iframe) {
|
|
132
|
-
border: none;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
:where(p, li, h1, h2, h3, h4, h5, h6) {
|
|
136
|
-
overflow-wrap: break-word;
|
|
137
|
-
text-wrap: pretty;
|
|
138
|
-
margin: 0;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
:where(abbr[title]) {
|
|
142
|
-
border: none;
|
|
143
|
-
text-decoration: none;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
:where(cite) {
|
|
147
|
-
font-style: inherit;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
:where(small) {
|
|
151
|
-
font-size: inherit;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
:where(li, ol, ul) {
|
|
155
|
-
list-style: none;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
:where(nav:not([role='list'])):is(ul, li, ol, ul) {
|
|
159
|
-
margin: 0;
|
|
160
|
-
padding: 0;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
:where(dialog, [popover]) {
|
|
164
|
-
background: transparent;
|
|
165
|
-
border: none;
|
|
166
|
-
color: inherit;
|
|
167
|
-
margin: auto;
|
|
168
|
-
max-block-size: none;
|
|
169
|
-
max-inline-size: none;
|
|
170
|
-
position: fixed;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
:where([popover]) {
|
|
174
|
-
inset: auto;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
:where(dialog:not([open], [popover]), [popover]:not(:popover-open)) {
|
|
178
|
-
display: none;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
:where([hidden]:not([hidden='until-found'])) {
|
|
182
|
-
display: none;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
`.trim();
|
|
186
|
-
/**
|
|
187
|
-
* Base body/html styles for dark theme.
|
|
188
|
-
*/
|
|
189
|
-
exports.BASE_CSS = `
|
|
190
|
-
html,
|
|
191
|
-
body {
|
|
192
|
-
background-color: var(--color-gray-900);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
body {
|
|
196
|
-
font-family: var(--ease-font-family, 'Instrument Sans', sans-serif);
|
|
197
|
-
font-optical-sizing: auto;
|
|
198
|
-
font-weight: 400;
|
|
199
|
-
font-style: normal;
|
|
200
|
-
font-variation-settings: 'wdth' 100;
|
|
201
|
-
min-height: 100dvh;
|
|
202
|
-
color: var(--color-gray-600);
|
|
203
|
-
}
|
|
204
|
-
`.trim();
|
|
205
|
-
/**
|
|
206
|
-
* Combined main styles (reset + base).
|
|
207
|
-
*/
|
|
208
|
-
exports.MAIN_CSS = `${exports.RESET_CSS}\n\n${exports.BASE_CSS}`;
|
|
209
|
-
/**
|
|
210
|
-
* Get CSS content for a preset.
|
|
211
|
-
*/
|
|
212
|
-
function getPresetCSS(preset) {
|
|
213
|
-
switch (preset) {
|
|
214
|
-
case 'reset':
|
|
215
|
-
return exports.RESET_CSS;
|
|
216
|
-
case 'base':
|
|
217
|
-
return exports.BASE_CSS;
|
|
218
|
-
case 'main':
|
|
219
|
-
return exports.MAIN_CSS;
|
|
220
|
-
default:
|
|
221
|
-
return '';
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Inject preset styles.
|
|
226
|
-
*/
|
|
227
|
-
function injectPreset(preset, nonce) {
|
|
228
|
-
const css = getPresetCSS(preset);
|
|
229
|
-
return injectStyle(preset, css, nonce);
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Remove preset styles.
|
|
233
|
-
*/
|
|
234
|
-
function removePreset(preset) {
|
|
235
|
-
removeStyle(preset);
|
|
236
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Style injection utilities for runtime CSS application.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Check if we're in a browser environment.
|
|
6
|
-
*/
|
|
7
|
-
export declare const isBrowser: () => boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Inject a style tag with the given CSS content.
|
|
10
|
-
*/
|
|
11
|
-
export declare function injectStyle(id: string, css: string, nonce?: string): HTMLStyleElement | null;
|
|
12
|
-
/**
|
|
13
|
-
* Remove an injected style tag.
|
|
14
|
-
*/
|
|
15
|
-
export declare function removeStyle(id: string): void;
|
|
16
|
-
/**
|
|
17
|
-
* Check if a style is already injected.
|
|
18
|
-
*/
|
|
19
|
-
export declare function hasStyle(id: string): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Minimal reset styles (box-sizing, etc.)
|
|
22
|
-
*/
|
|
23
|
-
export declare const RESET_CSS: string;
|
|
24
|
-
/**
|
|
25
|
-
* Base body/html styles for dark theme.
|
|
26
|
-
*/
|
|
27
|
-
export declare const BASE_CSS: string;
|
|
28
|
-
/**
|
|
29
|
-
* Combined main styles (reset + base).
|
|
30
|
-
*/
|
|
31
|
-
export declare const MAIN_CSS: string;
|
|
32
|
-
export type StylePreset = 'reset' | 'base' | 'main';
|
|
33
|
-
/**
|
|
34
|
-
* Get CSS content for a preset.
|
|
35
|
-
*/
|
|
36
|
-
export declare function getPresetCSS(preset: StylePreset): string;
|
|
37
|
-
/**
|
|
38
|
-
* Inject preset styles.
|
|
39
|
-
*/
|
|
40
|
-
export declare function injectPreset(preset: StylePreset, nonce?: string): HTMLStyleElement | null;
|
|
41
|
-
/**
|
|
42
|
-
* Remove preset styles.
|
|
43
|
-
*/
|
|
44
|
-
export declare function removePreset(preset: StylePreset): void;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Style injection utilities for runtime CSS application.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Check if we're in a browser environment.
|
|
6
|
-
*/
|
|
7
|
-
export declare const isBrowser: () => boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Inject a style tag with the given CSS content.
|
|
10
|
-
*/
|
|
11
|
-
export declare function injectStyle(id: string, css: string, nonce?: string): HTMLStyleElement | null;
|
|
12
|
-
/**
|
|
13
|
-
* Remove an injected style tag.
|
|
14
|
-
*/
|
|
15
|
-
export declare function removeStyle(id: string): void;
|
|
16
|
-
/**
|
|
17
|
-
* Check if a style is already injected.
|
|
18
|
-
*/
|
|
19
|
-
export declare function hasStyle(id: string): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Minimal reset styles (box-sizing, etc.)
|
|
22
|
-
*/
|
|
23
|
-
export declare const RESET_CSS: string;
|
|
24
|
-
/**
|
|
25
|
-
* Base body/html styles for dark theme.
|
|
26
|
-
*/
|
|
27
|
-
export declare const BASE_CSS: string;
|
|
28
|
-
/**
|
|
29
|
-
* Combined main styles (reset + base).
|
|
30
|
-
*/
|
|
31
|
-
export declare const MAIN_CSS: string;
|
|
32
|
-
export type StylePreset = 'reset' | 'base' | 'main';
|
|
33
|
-
/**
|
|
34
|
-
* Get CSS content for a preset.
|
|
35
|
-
*/
|
|
36
|
-
export declare function getPresetCSS(preset: StylePreset): string;
|
|
37
|
-
/**
|
|
38
|
-
* Inject preset styles.
|
|
39
|
-
*/
|
|
40
|
-
export declare function injectPreset(preset: StylePreset, nonce?: string): HTMLStyleElement | null;
|
|
41
|
-
/**
|
|
42
|
-
* Remove preset styles.
|
|
43
|
-
*/
|
|
44
|
-
export declare function removePreset(preset: StylePreset): void;
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Style injection utilities for runtime CSS application.
|
|
3
|
-
*/
|
|
4
|
-
const STYLE_ID_PREFIX = 'ease-webkit-';
|
|
5
|
-
/**
|
|
6
|
-
* Check if we're in a browser environment.
|
|
7
|
-
*/
|
|
8
|
-
export const isBrowser = () => typeof document !== 'undefined' && typeof window !== 'undefined';
|
|
9
|
-
/**
|
|
10
|
-
* Inject a style tag with the given CSS content.
|
|
11
|
-
*/
|
|
12
|
-
export function injectStyle(id, css, nonce) {
|
|
13
|
-
if (!isBrowser()) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
const fullId = STYLE_ID_PREFIX + id;
|
|
17
|
-
// Check if already injected
|
|
18
|
-
let style = document.getElementById(fullId);
|
|
19
|
-
if (style) {
|
|
20
|
-
// Update content if different
|
|
21
|
-
if (style.textContent !== css) {
|
|
22
|
-
style.textContent = css;
|
|
23
|
-
}
|
|
24
|
-
return style;
|
|
25
|
-
}
|
|
26
|
-
// Create new style element
|
|
27
|
-
style = document.createElement('style');
|
|
28
|
-
style.id = fullId;
|
|
29
|
-
style.textContent = css;
|
|
30
|
-
if (nonce) {
|
|
31
|
-
style.nonce = nonce;
|
|
32
|
-
}
|
|
33
|
-
document.head.appendChild(style);
|
|
34
|
-
return style;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Remove an injected style tag.
|
|
38
|
-
*/
|
|
39
|
-
export function removeStyle(id) {
|
|
40
|
-
if (!isBrowser()) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const fullId = STYLE_ID_PREFIX + id;
|
|
44
|
-
const style = document.getElementById(fullId);
|
|
45
|
-
if (style) {
|
|
46
|
-
style.remove();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Check if a style is already injected.
|
|
51
|
-
*/
|
|
52
|
-
export function hasStyle(id) {
|
|
53
|
-
if (!isBrowser()) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
const fullId = STYLE_ID_PREFIX + id;
|
|
57
|
-
return document.getElementById(fullId) !== null;
|
|
58
|
-
}
|
|
59
|
-
// --------------------------
|
|
60
|
-
// Preset styles
|
|
61
|
-
// --------------------------
|
|
62
|
-
/**
|
|
63
|
-
* Minimal reset styles (box-sizing, etc.)
|
|
64
|
-
*/
|
|
65
|
-
export const RESET_CSS = `
|
|
66
|
-
@layer ease-reset {
|
|
67
|
-
*,
|
|
68
|
-
*::after,
|
|
69
|
-
*::before {
|
|
70
|
-
box-sizing: border-box;
|
|
71
|
-
transition-timing-function: cubic-bezier(0.25, 0, 0.5, 1);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
:where(html) {
|
|
75
|
-
color-scheme: light dark;
|
|
76
|
-
hanging-punctuation: first allow-end last;
|
|
77
|
-
interpolate-size: allow-keywords;
|
|
78
|
-
scroll-behavior: smooth;
|
|
79
|
-
scrollbar-gutter: stable;
|
|
80
|
-
text-size-adjust: none;
|
|
81
|
-
-webkit-text-size-adjust: none;
|
|
82
|
-
-webkit-tap-highlight-color: transparent;
|
|
83
|
-
-webkit-font-smoothing: antialiased;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
:where(html.translated-rtl) {
|
|
87
|
-
direction: rtl;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
@media (prefers-reduced-motion: reduce) {
|
|
91
|
-
:where(html) {
|
|
92
|
-
scroll-behavior: auto;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:where(body) {
|
|
97
|
-
min-block-size: 100svb;
|
|
98
|
-
min-inline-size: 300px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
:where(canvas, img, picture, svg, video) {
|
|
102
|
-
block-size: auto;
|
|
103
|
-
border: none;
|
|
104
|
-
display: block;
|
|
105
|
-
max-inline-size: 100%;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
:where(button) {
|
|
109
|
-
cursor: pointer;
|
|
110
|
-
user-select: none;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:where(textarea) {
|
|
114
|
-
resize: vertical;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
:where(textarea:not([rows])) {
|
|
118
|
-
field-sizing: content;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
:where(fieldset, iframe) {
|
|
122
|
-
border: none;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:where(p, li, h1, h2, h3, h4, h5, h6) {
|
|
126
|
-
overflow-wrap: break-word;
|
|
127
|
-
text-wrap: pretty;
|
|
128
|
-
margin: 0;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
:where(abbr[title]) {
|
|
132
|
-
border: none;
|
|
133
|
-
text-decoration: none;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
:where(cite) {
|
|
137
|
-
font-style: inherit;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
:where(small) {
|
|
141
|
-
font-size: inherit;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
:where(li, ol, ul) {
|
|
145
|
-
list-style: none;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
:where(nav:not([role='list'])):is(ul, li, ol, ul) {
|
|
149
|
-
margin: 0;
|
|
150
|
-
padding: 0;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
:where(dialog, [popover]) {
|
|
154
|
-
background: transparent;
|
|
155
|
-
border: none;
|
|
156
|
-
color: inherit;
|
|
157
|
-
margin: auto;
|
|
158
|
-
max-block-size: none;
|
|
159
|
-
max-inline-size: none;
|
|
160
|
-
position: fixed;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
:where([popover]) {
|
|
164
|
-
inset: auto;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
:where(dialog:not([open], [popover]), [popover]:not(:popover-open)) {
|
|
168
|
-
display: none;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
:where([hidden]:not([hidden='until-found'])) {
|
|
172
|
-
display: none;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
`.trim();
|
|
176
|
-
/**
|
|
177
|
-
* Base body/html styles for dark theme.
|
|
178
|
-
*/
|
|
179
|
-
export const BASE_CSS = `
|
|
180
|
-
html,
|
|
181
|
-
body {
|
|
182
|
-
background-color: var(--color-gray-900);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
body {
|
|
186
|
-
font-family: var(--ease-font-family, 'Instrument Sans', sans-serif);
|
|
187
|
-
font-optical-sizing: auto;
|
|
188
|
-
font-weight: 400;
|
|
189
|
-
font-style: normal;
|
|
190
|
-
font-variation-settings: 'wdth' 100;
|
|
191
|
-
min-height: 100dvh;
|
|
192
|
-
color: var(--color-gray-600);
|
|
193
|
-
}
|
|
194
|
-
`.trim();
|
|
195
|
-
/**
|
|
196
|
-
* Combined main styles (reset + base).
|
|
197
|
-
*/
|
|
198
|
-
export const MAIN_CSS = `${RESET_CSS}\n\n${BASE_CSS}`;
|
|
199
|
-
/**
|
|
200
|
-
* Get CSS content for a preset.
|
|
201
|
-
*/
|
|
202
|
-
export function getPresetCSS(preset) {
|
|
203
|
-
switch (preset) {
|
|
204
|
-
case 'reset':
|
|
205
|
-
return RESET_CSS;
|
|
206
|
-
case 'base':
|
|
207
|
-
return BASE_CSS;
|
|
208
|
-
case 'main':
|
|
209
|
-
return MAIN_CSS;
|
|
210
|
-
default:
|
|
211
|
-
return '';
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Inject preset styles.
|
|
216
|
-
*/
|
|
217
|
-
export function injectPreset(preset, nonce) {
|
|
218
|
-
const css = getPresetCSS(preset);
|
|
219
|
-
return injectStyle(preset, css, nonce);
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Remove preset styles.
|
|
223
|
-
*/
|
|
224
|
-
export function removePreset(preset) {
|
|
225
|
-
removeStyle(preset);
|
|
226
|
-
}
|
package/build/react/events.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* React event handling utilities for @easemate/web-kit
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createEventHandler = createEventHandler;
|
|
7
|
-
/**
|
|
8
|
-
* Creates a type-safe event handler for control-change events.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <ease-slider
|
|
13
|
-
* name="opacity"
|
|
14
|
-
* value={0.5}
|
|
15
|
-
* onControlChange={createEventHandler<number>((value, name) => {
|
|
16
|
-
* console.log(`${name} changed to ${value}`);
|
|
17
|
-
* })}
|
|
18
|
-
* />
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
function createEventHandler(callback) {
|
|
22
|
-
return (e) => {
|
|
23
|
-
callback(e.detail.value, e.detail.name, e.detail.event);
|
|
24
|
-
};
|
|
25
|
-
}
|
package/build/react/events.d.cts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React event handling utilities for @easemate/web-kit
|
|
3
|
-
*/
|
|
4
|
-
import type { TabChangeEventDetail } from '../elements/panel';
|
|
5
|
-
import type { ControlEventDetail } from '../elements/shared';
|
|
6
|
-
import type { StateChangeEventDetail } from '../elements/state';
|
|
7
|
-
/**
|
|
8
|
-
* Control change event type for React
|
|
9
|
-
*/
|
|
10
|
-
export interface ControlChangeEvent<T = unknown> extends CustomEvent<ControlEventDetail<T>> {
|
|
11
|
-
detail: ControlEventDetail<T>;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* State change event type for React
|
|
15
|
-
*/
|
|
16
|
-
export interface StateChangeEvent extends CustomEvent<StateChangeEventDetail> {
|
|
17
|
-
detail: StateChangeEventDetail;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Tab change event type for React
|
|
21
|
-
*/
|
|
22
|
-
export interface TabChangeEvent extends CustomEvent<TabChangeEventDetail> {
|
|
23
|
-
detail: TabChangeEventDetail;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Creates a type-safe event handler for control-change events.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* <ease-slider
|
|
31
|
-
* name="opacity"
|
|
32
|
-
* value={0.5}
|
|
33
|
-
* onControlChange={createEventHandler<number>((value, name) => {
|
|
34
|
-
* console.log(`${name} changed to ${value}`);
|
|
35
|
-
* })}
|
|
36
|
-
* />
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare function createEventHandler<T = unknown>(callback: (value: T, name: string | undefined, event: Event) => void): (e: CustomEvent<ControlEventDetail<T>>) => void;
|