@tachui/core 0.7.0-alpha1 → 0.7.1-alpha
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/README.md +195 -0
- package/dist/ScrollView-h-6wYMAm.js +515 -0
- package/dist/Spacer-BbteDQ9I.js +5337 -0
- package/dist/binding-CmdpowkI.js +2276 -0
- package/dist/bundles/minimal.d.ts +30 -4
- package/dist/bundles/minimal.d.ts.map +1 -1
- package/dist/common.js +825 -954
- package/dist/compiler/index.js +1386 -10
- package/dist/components/index.js +4166 -101
- package/dist/concatenated-component-DPcl2TEO.js +6779 -0
- package/dist/{runtime/context.js → context--zQFIImS.js} +65 -71
- package/dist/debug.js +0 -1
- package/dist/dom-bridge-Cx-s6Ihx.js +406 -0
- package/dist/effect-CytAc9em.js +66 -0
- package/dist/essential.js +825 -954
- package/dist/index-Nfi2SBQh.js +3268 -0
- package/dist/index.js +825 -954
- package/dist/minimal-prod.js +162 -191
- package/dist/minimal.js +183 -957
- package/dist/modifiers/responsive/index.d.ts +10 -9
- package/dist/modifiers/responsive/index.d.ts.map +1 -1
- package/dist/plugins/index.js +543 -32
- package/dist/reactive/index.js +490 -93
- package/dist/runtime/dom-bridge.js +12 -239
- package/dist/runtime/renderer.js +8 -388
- package/dist/scheduler-7SvC3a21.js +814 -0
- package/dist/validation/index.js +6614 -198
- package/dist/viewport/index.js +2002 -83
- package/package.json +3 -4
- package/dist/assets/Asset.cjs +0 -2
- package/dist/assets/Asset.cjs.map +0 -1
- package/dist/assets/Asset.js +0 -9
- package/dist/assets/Asset.js.map +0 -1
- package/dist/assets/AssetCollection.cjs +0 -2
- package/dist/assets/AssetCollection.cjs.map +0 -1
- package/dist/assets/AssetCollection.js +0 -44
- package/dist/assets/AssetCollection.js.map +0 -1
- package/dist/assets/ColorAsset.cjs +0 -2
- package/dist/assets/ColorAsset.cjs.map +0 -1
- package/dist/assets/ColorAsset.js +0 -114
- package/dist/assets/ColorAsset.js.map +0 -1
- package/dist/assets/FontAsset.cjs +0 -9
- package/dist/assets/FontAsset.cjs.map +0 -1
- package/dist/assets/FontAsset.js +0 -173
- package/dist/assets/FontAsset.js.map +0 -1
- package/dist/assets/ImageAsset.cjs +0 -2
- package/dist/assets/ImageAsset.cjs.map +0 -1
- package/dist/assets/ImageAsset.js +0 -39
- package/dist/assets/ImageAsset.js.map +0 -1
- package/dist/assets/index.cjs +0 -2
- package/dist/assets/index.cjs.map +0 -1
- package/dist/assets/index.js +0 -119
- package/dist/assets/index.js.map +0 -1
- package/dist/common.cjs +0 -2
- package/dist/common.cjs.map +0 -1
- package/dist/common.js.map +0 -1
- package/dist/compiler/advanced-parser.cjs +0 -5
- package/dist/compiler/advanced-parser.cjs.map +0 -1
- package/dist/compiler/advanced-parser.js +0 -440
- package/dist/compiler/advanced-parser.js.map +0 -1
- package/dist/compiler/codegen.cjs +0 -6
- package/dist/compiler/codegen.cjs.map +0 -1
- package/dist/compiler/codegen.js +0 -241
- package/dist/compiler/codegen.js.map +0 -1
- package/dist/compiler/enhanced-codegen.cjs +0 -6
- package/dist/compiler/enhanced-codegen.cjs.map +0 -1
- package/dist/compiler/enhanced-codegen.js +0 -347
- package/dist/compiler/enhanced-codegen.js.map +0 -1
- package/dist/compiler/index.cjs +0 -2
- package/dist/compiler/index.cjs.map +0 -1
- package/dist/compiler/index.js.map +0 -1
- package/dist/compiler/parser.cjs +0 -5
- package/dist/compiler/parser.cjs.map +0 -1
- package/dist/compiler/parser.js +0 -275
- package/dist/compiler/parser.js.map +0 -1
- package/dist/compiler/plugin.cjs +0 -33
- package/dist/compiler/plugin.cjs.map +0 -1
- package/dist/compiler/plugin.js +0 -103
- package/dist/compiler/plugin.js.map +0 -1
- package/dist/components/BasicInput.cjs +0 -2
- package/dist/components/BasicInput.cjs.map +0 -1
- package/dist/components/BasicInput.js +0 -182
- package/dist/components/BasicInput.js.map +0 -1
- package/dist/components/Button.cjs +0 -7
- package/dist/components/Button.cjs.map +0 -1
- package/dist/components/Button.js +0 -408
- package/dist/components/Button.js.map +0 -1
- package/dist/components/Divider.cjs +0 -2
- package/dist/components/Divider.cjs.map +0 -1
- package/dist/components/Divider.js +0 -187
- package/dist/components/Divider.js.map +0 -1
- package/dist/components/EnhancedLink.cjs +0 -2
- package/dist/components/EnhancedLink.cjs.map +0 -1
- package/dist/components/EnhancedLink.js +0 -345
- package/dist/components/EnhancedLink.js.map +0 -1
- package/dist/components/Form.cjs +0 -2
- package/dist/components/Form.cjs.map +0 -1
- package/dist/components/Form.js +0 -244
- package/dist/components/Form.js.map +0 -1
- package/dist/components/Grid.cjs +0 -2
- package/dist/components/Grid.cjs.map +0 -1
- package/dist/components/Grid.js +0 -1045
- package/dist/components/Grid.js.map +0 -1
- package/dist/components/GridResponsive.cjs +0 -2
- package/dist/components/GridResponsive.cjs.map +0 -1
- package/dist/components/GridResponsive.js +0 -382
- package/dist/components/GridResponsive.js.map +0 -1
- package/dist/components/Image.cjs +0 -2
- package/dist/components/Image.cjs.map +0 -1
- package/dist/components/Image.js +0 -212
- package/dist/components/Image.js.map +0 -1
- package/dist/components/List.cjs +0 -2
- package/dist/components/List.cjs.map +0 -1
- package/dist/components/List.js +0 -561
- package/dist/components/List.js.map +0 -1
- package/dist/components/Menu.cjs +0 -2
- package/dist/components/Menu.cjs.map +0 -1
- package/dist/components/Menu.js +0 -443
- package/dist/components/Menu.js.map +0 -1
- package/dist/components/Picker.cjs +0 -2
- package/dist/components/Picker.cjs.map +0 -1
- package/dist/components/Picker.js +0 -478
- package/dist/components/Picker.js.map +0 -1
- package/dist/components/ScrollView.cjs +0 -6
- package/dist/components/ScrollView.cjs.map +0 -1
- package/dist/components/ScrollView.js +0 -363
- package/dist/components/ScrollView.js.map +0 -1
- package/dist/components/Section.cjs +0 -2
- package/dist/components/Section.cjs.map +0 -1
- package/dist/components/Section.js +0 -323
- package/dist/components/Section.js.map +0 -1
- package/dist/components/Show.cjs +0 -2
- package/dist/components/Show.cjs.map +0 -1
- package/dist/components/Show.js +0 -112
- package/dist/components/Show.js.map +0 -1
- package/dist/components/Spacer.cjs +0 -2
- package/dist/components/Spacer.cjs.map +0 -1
- package/dist/components/Spacer.js +0 -53
- package/dist/components/Spacer.js.map +0 -1
- package/dist/components/Text.cjs +0 -2
- package/dist/components/Text.cjs.map +0 -1
- package/dist/components/Text.js +0 -193
- package/dist/components/Text.js.map +0 -1
- package/dist/components/Toggle.cjs +0 -2
- package/dist/components/Toggle.cjs.map +0 -1
- package/dist/components/Toggle.js +0 -477
- package/dist/components/Toggle.js.map +0 -1
- package/dist/components/index.cjs +0 -2
- package/dist/components/index.cjs.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/wrapper.cjs +0 -2
- package/dist/components/wrapper.cjs.map +0 -1
- package/dist/components/wrapper.js +0 -484
- package/dist/components/wrapper.js.map +0 -1
- package/dist/concatenation/concatenatable.cjs +0 -2
- package/dist/concatenation/concatenatable.cjs.map +0 -1
- package/dist/concatenation/concatenatable.js +0 -118
- package/dist/concatenation/concatenatable.js.map +0 -1
- package/dist/concatenation/concatenated-component.cjs +0 -2
- package/dist/concatenation/concatenated-component.cjs.map +0 -1
- package/dist/concatenation/concatenated-component.js +0 -276
- package/dist/concatenation/concatenated-component.js.map +0 -1
- package/dist/concatenation/text-optimizer.cjs +0 -2
- package/dist/concatenation/text-optimizer.cjs.map +0 -1
- package/dist/concatenation/text-optimizer.js +0 -236
- package/dist/concatenation/text-optimizer.js.map +0 -1
- package/dist/concatenation/types.cjs +0 -2
- package/dist/concatenation/types.cjs.map +0 -1
- package/dist/concatenation/types.js +0 -13
- package/dist/concatenation/types.js.map +0 -1
- package/dist/constants/frame-utils.cjs +0 -2
- package/dist/constants/frame-utils.cjs.map +0 -1
- package/dist/constants/frame-utils.js +0 -116
- package/dist/constants/frame-utils.js.map +0 -1
- package/dist/constants/layout.cjs +0 -2
- package/dist/constants/layout.cjs.map +0 -1
- package/dist/constants/layout.js +0 -46
- package/dist/constants/layout.js.map +0 -1
- package/dist/css-classes/component-base.cjs +0 -2
- package/dist/css-classes/component-base.cjs.map +0 -1
- package/dist/css-classes/component-base.js +0 -62
- package/dist/css-classes/component-base.js.map +0 -1
- package/dist/css-classes/css-class-manager.cjs +0 -2
- package/dist/css-classes/css-class-manager.cjs.map +0 -1
- package/dist/css-classes/css-class-manager.js +0 -209
- package/dist/css-classes/css-class-manager.js.map +0 -1
- package/dist/css-classes/dom-integration.cjs +0 -2
- package/dist/css-classes/dom-integration.cjs.map +0 -1
- package/dist/css-classes/dom-integration.js +0 -67
- package/dist/css-classes/dom-integration.js.map +0 -1
- package/dist/css-classes/enhanced-renderer.cjs +0 -2
- package/dist/css-classes/enhanced-renderer.cjs.map +0 -1
- package/dist/css-classes/enhanced-renderer.js +0 -73
- package/dist/css-classes/enhanced-renderer.js.map +0 -1
- package/dist/css-classes/utilities.cjs +0 -2
- package/dist/css-classes/utilities.cjs.map +0 -1
- package/dist/css-classes/utilities.js +0 -41
- package/dist/css-classes/utilities.js.map +0 -1
- package/dist/debug.cjs +0 -52
- package/dist/debug.cjs.map +0 -1
- package/dist/debug.js.map +0 -1
- package/dist/essential.cjs +0 -2
- package/dist/essential.cjs.map +0 -1
- package/dist/essential.js.map +0 -1
- package/dist/gradients/css-generator.cjs +0 -2
- package/dist/gradients/css-generator.cjs.map +0 -1
- package/dist/gradients/css-generator.js +0 -100
- package/dist/gradients/css-generator.js.map +0 -1
- package/dist/gradients/examples.cjs +0 -2
- package/dist/gradients/examples.cjs.map +0 -1
- package/dist/gradients/examples.js +0 -555
- package/dist/gradients/examples.js.map +0 -1
- package/dist/gradients/gradient-asset.cjs +0 -2
- package/dist/gradients/gradient-asset.cjs.map +0 -1
- package/dist/gradients/gradient-asset.js +0 -22
- package/dist/gradients/gradient-asset.js.map +0 -1
- package/dist/gradients/index.cjs +0 -2
- package/dist/gradients/index.cjs.map +0 -1
- package/dist/gradients/index.js +0 -78
- package/dist/gradients/index.js.map +0 -1
- package/dist/gradients/performance.cjs +0 -2
- package/dist/gradients/performance.cjs.map +0 -1
- package/dist/gradients/performance.js +0 -237
- package/dist/gradients/performance.js.map +0 -1
- package/dist/gradients/presets.cjs +0 -2
- package/dist/gradients/presets.cjs.map +0 -1
- package/dist/gradients/presets.js +0 -254
- package/dist/gradients/presets.js.map +0 -1
- package/dist/gradients/reactive.cjs +0 -2
- package/dist/gradients/reactive.cjs.map +0 -1
- package/dist/gradients/reactive.js +0 -239
- package/dist/gradients/reactive.js.map +0 -1
- package/dist/gradients/state-gradient-asset.cjs +0 -2
- package/dist/gradients/state-gradient-asset.cjs.map +0 -1
- package/dist/gradients/state-gradient-asset.js +0 -111
- package/dist/gradients/state-gradient-asset.js.map +0 -1
- package/dist/gradients/utils.cjs +0 -2
- package/dist/gradients/utils.cjs.map +0 -1
- package/dist/gradients/utils.js +0 -385
- package/dist/gradients/utils.js.map +0 -1
- package/dist/gradients/validation.cjs +0 -2
- package/dist/gradients/validation.cjs.map +0 -1
- package/dist/gradients/validation.js +0 -209
- package/dist/gradients/validation.js.map +0 -1
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index2.cjs +0 -2
- package/dist/index2.cjs.map +0 -1
- package/dist/index2.js +0 -293
- package/dist/index2.js.map +0 -1
- package/dist/lifecycle/hooks.cjs +0 -2
- package/dist/lifecycle/hooks.cjs.map +0 -1
- package/dist/lifecycle/hooks.js +0 -159
- package/dist/lifecycle/hooks.js.map +0 -1
- package/dist/minimal-prod.cjs +0 -2
- package/dist/minimal-prod.cjs.map +0 -1
- package/dist/minimal-prod.js.map +0 -1
- package/dist/minimal.cjs +0 -2
- package/dist/minimal.cjs.map +0 -1
- package/dist/minimal.js.map +0 -1
- package/dist/modifiers/as-html-validator.cjs +0 -2
- package/dist/modifiers/as-html-validator.cjs.map +0 -1
- package/dist/modifiers/as-html-validator.js +0 -47
- package/dist/modifiers/as-html-validator.js.map +0 -1
- package/dist/modifiers/as-html.cjs +0 -2
- package/dist/modifiers/as-html.cjs.map +0 -1
- package/dist/modifiers/as-html.js +0 -71
- package/dist/modifiers/as-html.js.map +0 -1
- package/dist/modifiers/attributes.cjs +0 -2
- package/dist/modifiers/attributes.cjs.map +0 -1
- package/dist/modifiers/attributes.js +0 -272
- package/dist/modifiers/attributes.js.map +0 -1
- package/dist/modifiers/backdrop.cjs +0 -2
- package/dist/modifiers/backdrop.cjs.map +0 -1
- package/dist/modifiers/backdrop.js +0 -109
- package/dist/modifiers/backdrop.js.map +0 -1
- package/dist/modifiers/background.cjs +0 -2
- package/dist/modifiers/background.cjs.map +0 -1
- package/dist/modifiers/background.js +0 -67
- package/dist/modifiers/background.js.map +0 -1
- package/dist/modifiers/base.cjs +0 -25
- package/dist/modifiers/base.cjs.map +0 -1
- package/dist/modifiers/base.js +0 -745
- package/dist/modifiers/base.js.map +0 -1
- package/dist/modifiers/basic-sanitizer.cjs +0 -2
- package/dist/modifiers/basic-sanitizer.cjs.map +0 -1
- package/dist/modifiers/basic-sanitizer.js +0 -162
- package/dist/modifiers/basic-sanitizer.js.map +0 -1
- package/dist/modifiers/border.cjs +0 -2
- package/dist/modifiers/border.cjs.map +0 -1
- package/dist/modifiers/border.js +0 -160
- package/dist/modifiers/border.js.map +0 -1
- package/dist/modifiers/builder.cjs +0 -2
- package/dist/modifiers/builder.cjs.map +0 -1
- package/dist/modifiers/builder.js +0 -930
- package/dist/modifiers/builder.js.map +0 -1
- package/dist/modifiers/core.cjs +0 -2
- package/dist/modifiers/core.cjs.map +0 -1
- package/dist/modifiers/core.js +0 -398
- package/dist/modifiers/core.js.map +0 -1
- package/dist/modifiers/css.cjs +0 -2
- package/dist/modifiers/css.cjs.map +0 -1
- package/dist/modifiers/css.js +0 -50
- package/dist/modifiers/css.js.map +0 -1
- package/dist/modifiers/effects.cjs +0 -2
- package/dist/modifiers/effects.cjs.map +0 -1
- package/dist/modifiers/effects.js +0 -178
- package/dist/modifiers/effects.js.map +0 -1
- package/dist/modifiers/elements.cjs +0 -2
- package/dist/modifiers/elements.cjs.map +0 -1
- package/dist/modifiers/elements.js +0 -216
- package/dist/modifiers/elements.js.map +0 -1
- package/dist/modifiers/filters.cjs +0 -2
- package/dist/modifiers/filters.cjs.map +0 -1
- package/dist/modifiers/filters.js +0 -223
- package/dist/modifiers/filters.js.map +0 -1
- package/dist/modifiers/flexbox.cjs +0 -2
- package/dist/modifiers/flexbox.cjs.map +0 -1
- package/dist/modifiers/flexbox.js +0 -56
- package/dist/modifiers/flexbox.js.map +0 -1
- package/dist/modifiers/font.cjs +0 -2
- package/dist/modifiers/font.cjs.map +0 -1
- package/dist/modifiers/font.js +0 -60
- package/dist/modifiers/font.js.map +0 -1
- package/dist/modifiers/grid.cjs +0 -2
- package/dist/modifiers/grid.cjs.map +0 -1
- package/dist/modifiers/grid.js +0 -92
- package/dist/modifiers/grid.js.map +0 -1
- package/dist/modifiers/margin.cjs +0 -2
- package/dist/modifiers/margin.cjs.map +0 -1
- package/dist/modifiers/margin.js +0 -65
- package/dist/modifiers/margin.js.map +0 -1
- package/dist/modifiers/padding.cjs +0 -2
- package/dist/modifiers/padding.cjs.map +0 -1
- package/dist/modifiers/padding.js +0 -109
- package/dist/modifiers/padding.js.map +0 -1
- package/dist/modifiers/registry.cjs +0 -2
- package/dist/modifiers/registry.cjs.map +0 -1
- package/dist/modifiers/registry.js +0 -163
- package/dist/modifiers/registry.js.map +0 -1
- package/dist/modifiers/responsive/advanced-utilities.cjs +0 -2
- package/dist/modifiers/responsive/advanced-utilities.cjs.map +0 -1
- package/dist/modifiers/responsive/advanced-utilities.js +0 -291
- package/dist/modifiers/responsive/advanced-utilities.js.map +0 -1
- package/dist/modifiers/responsive/breakpoints.cjs +0 -2
- package/dist/modifiers/responsive/breakpoints.cjs.map +0 -1
- package/dist/modifiers/responsive/breakpoints.js +0 -168
- package/dist/modifiers/responsive/breakpoints.js.map +0 -1
- package/dist/modifiers/responsive/css-generator.cjs +0 -5
- package/dist/modifiers/responsive/css-generator.cjs.map +0 -1
- package/dist/modifiers/responsive/css-generator.js +0 -261
- package/dist/modifiers/responsive/css-generator.js.map +0 -1
- package/dist/modifiers/responsive/dev-tools.cjs +0 -77
- package/dist/modifiers/responsive/dev-tools.cjs.map +0 -1
- package/dist/modifiers/responsive/dev-tools.js +0 -380
- package/dist/modifiers/responsive/dev-tools.js.map +0 -1
- package/dist/modifiers/responsive/layout-patterns.cjs +0 -2
- package/dist/modifiers/responsive/layout-patterns.cjs.map +0 -1
- package/dist/modifiers/responsive/layout-patterns.js +0 -254
- package/dist/modifiers/responsive/layout-patterns.js.map +0 -1
- package/dist/modifiers/responsive/performance.cjs +0 -3
- package/dist/modifiers/responsive/performance.cjs.map +0 -1
- package/dist/modifiers/responsive/performance.js +0 -212
- package/dist/modifiers/responsive/performance.js.map +0 -1
- package/dist/modifiers/responsive/responsive-builder.cjs +0 -2
- package/dist/modifiers/responsive/responsive-builder.cjs.map +0 -1
- package/dist/modifiers/responsive/responsive-builder.js +0 -272
- package/dist/modifiers/responsive/responsive-builder.js.map +0 -1
- package/dist/modifiers/responsive/responsive-modifier.cjs +0 -3
- package/dist/modifiers/responsive/responsive-modifier.cjs.map +0 -1
- package/dist/modifiers/responsive/responsive-modifier.js +0 -204
- package/dist/modifiers/responsive/responsive-modifier.js.map +0 -1
- package/dist/modifiers/responsive/types.cjs +0 -2
- package/dist/modifiers/responsive/types.cjs.map +0 -1
- package/dist/modifiers/responsive/types.js +0 -26
- package/dist/modifiers/responsive/types.js.map +0 -1
- package/dist/modifiers/responsive/utilities.cjs +0 -16
- package/dist/modifiers/responsive/utilities.cjs.map +0 -1
- package/dist/modifiers/responsive/utilities.js +0 -273
- package/dist/modifiers/responsive/utilities.js.map +0 -1
- package/dist/modifiers/scroll.cjs +0 -2
- package/dist/modifiers/scroll.cjs.map +0 -1
- package/dist/modifiers/scroll.js +0 -82
- package/dist/modifiers/scroll.js.map +0 -1
- package/dist/modifiers/shadows.cjs +0 -2
- package/dist/modifiers/shadows.cjs.map +0 -1
- package/dist/modifiers/shadows.js +0 -147
- package/dist/modifiers/shadows.js.map +0 -1
- package/dist/modifiers/size.cjs +0 -2
- package/dist/modifiers/size.cjs.map +0 -1
- package/dist/modifiers/size.js +0 -74
- package/dist/modifiers/size.js.map +0 -1
- package/dist/modifiers/text.cjs +0 -2
- package/dist/modifiers/text.cjs.map +0 -1
- package/dist/modifiers/text.js +0 -166
- package/dist/modifiers/text.js.map +0 -1
- package/dist/modifiers/transformations.cjs +0 -2
- package/dist/modifiers/transformations.cjs.map +0 -1
- package/dist/modifiers/transformations.js +0 -216
- package/dist/modifiers/transformations.js.map +0 -1
- package/dist/modifiers/transitions.cjs +0 -2
- package/dist/modifiers/transitions.cjs.map +0 -1
- package/dist/modifiers/transitions.js +0 -102
- package/dist/modifiers/transitions.js.map +0 -1
- package/dist/modifiers/types.cjs +0 -2
- package/dist/modifiers/types.cjs.map +0 -1
- package/dist/modifiers/types.js +0 -5
- package/dist/modifiers/types.js.map +0 -1
- package/dist/modifiers/typography.cjs +0 -2
- package/dist/modifiers/typography.cjs.map +0 -1
- package/dist/modifiers/typography.js +0 -76
- package/dist/modifiers/typography.js.map +0 -1
- package/dist/modifiers/utility.cjs +0 -2
- package/dist/modifiers/utility.cjs.map +0 -1
- package/dist/modifiers/utility.js +0 -71
- package/dist/modifiers/utility.js.map +0 -1
- package/dist/modifiers/utils.cjs +0 -2
- package/dist/modifiers/utils.cjs.map +0 -1
- package/dist/modifiers/utils.js +0 -250
- package/dist/modifiers/utils.js.map +0 -1
- package/dist/plugins/index.cjs +0 -2
- package/dist/plugins/index.cjs.map +0 -1
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/legacy-adapter.cjs +0 -2
- package/dist/plugins/legacy-adapter.cjs.map +0 -1
- package/dist/plugins/legacy-adapter.js +0 -30
- package/dist/plugins/legacy-adapter.js.map +0 -1
- package/dist/plugins/simplified-component-registry.cjs +0 -2
- package/dist/plugins/simplified-component-registry.cjs.map +0 -1
- package/dist/plugins/simplified-component-registry.js +0 -71
- package/dist/plugins/simplified-component-registry.js.map +0 -1
- package/dist/plugins/simplified-error-handler.cjs +0 -2
- package/dist/plugins/simplified-error-handler.cjs.map +0 -1
- package/dist/plugins/simplified-error-handler.js +0 -154
- package/dist/plugins/simplified-error-handler.js.map +0 -1
- package/dist/plugins/simplified-lazy-loader.cjs +0 -2
- package/dist/plugins/simplified-lazy-loader.cjs.map +0 -1
- package/dist/plugins/simplified-lazy-loader.js +0 -129
- package/dist/plugins/simplified-lazy-loader.js.map +0 -1
- package/dist/plugins/simplified-plugin-manager.cjs +0 -2
- package/dist/plugins/simplified-plugin-manager.cjs.map +0 -1
- package/dist/plugins/simplified-plugin-manager.js +0 -51
- package/dist/plugins/simplified-plugin-manager.js.map +0 -1
- package/dist/plugins/simplified-tachui-instance.cjs +0 -2
- package/dist/plugins/simplified-tachui-instance.cjs.map +0 -1
- package/dist/plugins/simplified-tachui-instance.js +0 -88
- package/dist/plugins/simplified-tachui-instance.js.map +0 -1
- package/dist/plugins/simplified-types.cjs +0 -2
- package/dist/plugins/simplified-types.cjs.map +0 -1
- package/dist/plugins/simplified-types.js +0 -9
- package/dist/plugins/simplified-types.js.map +0 -1
- package/dist/plugins/simplified-utils.cjs +0 -2
- package/dist/plugins/simplified-utils.cjs.map +0 -1
- package/dist/plugins/simplified-utils.js +0 -40
- package/dist/plugins/simplified-utils.js.map +0 -1
- package/dist/reactive/cleanup.cjs +0 -2
- package/dist/reactive/cleanup.cjs.map +0 -1
- package/dist/reactive/cleanup.js +0 -62
- package/dist/reactive/cleanup.js.map +0 -1
- package/dist/reactive/computed.cjs +0 -2
- package/dist/reactive/computed.cjs.map +0 -1
- package/dist/reactive/computed.js +0 -121
- package/dist/reactive/computed.js.map +0 -1
- package/dist/reactive/context.cjs +0 -2
- package/dist/reactive/context.cjs.map +0 -1
- package/dist/reactive/context.js +0 -143
- package/dist/reactive/context.js.map +0 -1
- package/dist/reactive/effect.cjs +0 -2
- package/dist/reactive/effect.cjs.map +0 -1
- package/dist/reactive/effect.js +0 -67
- package/dist/reactive/effect.js.map +0 -1
- package/dist/reactive/enhanced-effect.cjs +0 -2
- package/dist/reactive/enhanced-effect.cjs.map +0 -1
- package/dist/reactive/enhanced-effect.js +0 -153
- package/dist/reactive/enhanced-effect.js.map +0 -1
- package/dist/reactive/enhanced-signal.cjs +0 -2
- package/dist/reactive/enhanced-signal.cjs.map +0 -1
- package/dist/reactive/enhanced-signal.js +0 -117
- package/dist/reactive/enhanced-signal.js.map +0 -1
- package/dist/reactive/equality.cjs +0 -2
- package/dist/reactive/equality.cjs.map +0 -1
- package/dist/reactive/equality.js +0 -66
- package/dist/reactive/equality.js.map +0 -1
- package/dist/reactive/index.cjs +0 -2
- package/dist/reactive/index.cjs.map +0 -1
- package/dist/reactive/index.js.map +0 -1
- package/dist/reactive/migration.cjs +0 -18
- package/dist/reactive/migration.cjs.map +0 -1
- package/dist/reactive/migration.js +0 -164
- package/dist/reactive/migration.js.map +0 -1
- package/dist/reactive/ownership.cjs +0 -2
- package/dist/reactive/ownership.cjs.map +0 -1
- package/dist/reactive/ownership.js +0 -34
- package/dist/reactive/ownership.js.map +0 -1
- package/dist/reactive/scheduler.cjs +0 -2
- package/dist/reactive/scheduler.cjs.map +0 -1
- package/dist/reactive/scheduler.js +0 -111
- package/dist/reactive/scheduler.js.map +0 -1
- package/dist/reactive/signal.cjs +0 -2
- package/dist/reactive/signal.cjs.map +0 -1
- package/dist/reactive/signal.js +0 -96
- package/dist/reactive/signal.js.map +0 -1
- package/dist/reactive/theme.cjs +0 -2
- package/dist/reactive/theme.cjs.map +0 -1
- package/dist/reactive/theme.js +0 -27
- package/dist/reactive/theme.js.map +0 -1
- package/dist/reactive/types.cjs +0 -2
- package/dist/reactive/types.cjs.map +0 -1
- package/dist/reactive/types.js +0 -5
- package/dist/reactive/types.js.map +0 -1
- package/dist/reactive/unified-scheduler.cjs +0 -2
- package/dist/reactive/unified-scheduler.cjs.map +0 -1
- package/dist/reactive/unified-scheduler.js +0 -219
- package/dist/reactive/unified-scheduler.js.map +0 -1
- package/dist/runtime/component-context.cjs +0 -2
- package/dist/runtime/component-context.cjs.map +0 -1
- package/dist/runtime/component-context.js +0 -177
- package/dist/runtime/component-context.js.map +0 -1
- package/dist/runtime/component.cjs +0 -2
- package/dist/runtime/component.cjs.map +0 -1
- package/dist/runtime/component.js +0 -238
- package/dist/runtime/component.js.map +0 -1
- package/dist/runtime/context.cjs +0 -2
- package/dist/runtime/context.cjs.map +0 -1
- package/dist/runtime/context.js.map +0 -1
- package/dist/runtime/dev-tools.cjs +0 -2
- package/dist/runtime/dev-tools.cjs.map +0 -1
- package/dist/runtime/dev-tools.js +0 -391
- package/dist/runtime/dev-tools.js.map +0 -1
- package/dist/runtime/development-warnings.cjs +0 -2
- package/dist/runtime/development-warnings.cjs.map +0 -1
- package/dist/runtime/development-warnings.js +0 -69
- package/dist/runtime/development-warnings.js.map +0 -1
- package/dist/runtime/dom-bridge.cjs +0 -2
- package/dist/runtime/dom-bridge.cjs.map +0 -1
- package/dist/runtime/dom-bridge.js.map +0 -1
- package/dist/runtime/element-override.cjs +0 -2
- package/dist/runtime/element-override.cjs.map +0 -1
- package/dist/runtime/element-override.js +0 -214
- package/dist/runtime/element-override.js.map +0 -1
- package/dist/runtime/error-boundary.cjs +0 -2
- package/dist/runtime/error-boundary.cjs.map +0 -1
- package/dist/runtime/error-boundary.js +0 -559
- package/dist/runtime/error-boundary.js.map +0 -1
- package/dist/runtime/error-recovery.cjs +0 -2
- package/dist/runtime/error-recovery.cjs.map +0 -1
- package/dist/runtime/error-recovery.js +0 -385
- package/dist/runtime/error-recovery.js.map +0 -1
- package/dist/runtime/error-reporting.cjs +0 -3
- package/dist/runtime/error-reporting.cjs.map +0 -1
- package/dist/runtime/error-reporting.js +0 -479
- package/dist/runtime/error-reporting.js.map +0 -1
- package/dist/runtime/error-utils.cjs +0 -3
- package/dist/runtime/error-utils.cjs.map +0 -1
- package/dist/runtime/error-utils.js +0 -352
- package/dist/runtime/error-utils.js.map +0 -1
- package/dist/runtime/lazy-component.cjs +0 -2
- package/dist/runtime/lazy-component.cjs.map +0 -1
- package/dist/runtime/lazy-component.js +0 -129
- package/dist/runtime/lazy-component.js.map +0 -1
- package/dist/runtime/lifecycle.cjs +0 -2
- package/dist/runtime/lifecycle.cjs.map +0 -1
- package/dist/runtime/lifecycle.js +0 -7
- package/dist/runtime/lifecycle.js.map +0 -1
- package/dist/runtime/mounting.cjs +0 -2
- package/dist/runtime/mounting.cjs.map +0 -1
- package/dist/runtime/mounting.js +0 -12
- package/dist/runtime/mounting.js.map +0 -1
- package/dist/runtime/optimization.cjs +0 -2
- package/dist/runtime/optimization.cjs.map +0 -1
- package/dist/runtime/optimization.js +0 -6
- package/dist/runtime/optimization.js.map +0 -1
- package/dist/runtime/performance.cjs +0 -2
- package/dist/runtime/performance.cjs.map +0 -1
- package/dist/runtime/performance.js +0 -399
- package/dist/runtime/performance.js.map +0 -1
- package/dist/runtime/props.cjs +0 -2
- package/dist/runtime/props.cjs.map +0 -1
- package/dist/runtime/props.js +0 -265
- package/dist/runtime/props.js.map +0 -1
- package/dist/runtime/renderer.cjs +0 -2
- package/dist/runtime/renderer.cjs.map +0 -1
- package/dist/runtime/renderer.js.map +0 -1
- package/dist/runtime/semantic-role-manager.cjs +0 -2
- package/dist/runtime/semantic-role-manager.cjs.map +0 -1
- package/dist/runtime/semantic-role-manager.js +0 -82
- package/dist/runtime/semantic-role-manager.js.map +0 -1
- package/dist/state/binding.cjs +0 -2
- package/dist/state/binding.cjs.map +0 -1
- package/dist/state/binding.js +0 -155
- package/dist/state/binding.js.map +0 -1
- package/dist/state/environment.cjs +0 -2
- package/dist/state/environment.cjs.map +0 -1
- package/dist/state/environment.js +0 -115
- package/dist/state/environment.js.map +0 -1
- package/dist/state/index.cjs +0 -2
- package/dist/state/index.cjs.map +0 -1
- package/dist/state/index.js +0 -63
- package/dist/state/index.js.map +0 -1
- package/dist/state/observed-object.cjs +0 -2
- package/dist/state/observed-object.cjs.map +0 -1
- package/dist/state/observed-object.js +0 -163
- package/dist/state/observed-object.js.map +0 -1
- package/dist/state/state-manager.cjs +0 -2
- package/dist/state/state-manager.cjs.map +0 -1
- package/dist/state/state-manager.js +0 -233
- package/dist/state/state-manager.js.map +0 -1
- package/dist/state/state.cjs +0 -2
- package/dist/state/state.cjs.map +0 -1
- package/dist/state/state.js +0 -159
- package/dist/state/state.js.map +0 -1
- package/dist/sui-compat.cjs +0 -2
- package/dist/sui-compat.cjs.map +0 -1
- package/dist/sui-compat.js +0 -88
- package/dist/sui-compat.js.map +0 -1
- package/dist/validation/advanced-debugging.cjs +0 -44
- package/dist/validation/advanced-debugging.cjs.map +0 -1
- package/dist/validation/advanced-debugging.js +0 -455
- package/dist/validation/advanced-debugging.js.map +0 -1
- package/dist/validation/build-time/detection.cjs +0 -2
- package/dist/validation/build-time/detection.cjs.map +0 -1
- package/dist/validation/build-time/detection.js +0 -199
- package/dist/validation/build-time/detection.js.map +0 -1
- package/dist/validation/build-time/index.cjs +0 -2
- package/dist/validation/build-time/index.cjs.map +0 -1
- package/dist/validation/build-time/index.js +0 -122
- package/dist/validation/build-time/index.js.map +0 -1
- package/dist/validation/build-time/plugins.cjs +0 -3
- package/dist/validation/build-time/plugins.cjs.map +0 -1
- package/dist/validation/build-time/plugins.js +0 -282
- package/dist/validation/build-time/plugins.js.map +0 -1
- package/dist/validation/build-time/rules.cjs +0 -2
- package/dist/validation/build-time/rules.cjs.map +0 -1
- package/dist/validation/build-time/rules.js +0 -576
- package/dist/validation/build-time/rules.js.map +0 -1
- package/dist/validation/build-time/transformer.cjs +0 -3
- package/dist/validation/build-time/transformer.cjs.map +0 -1
- package/dist/validation/build-time/transformer.js +0 -177
- package/dist/validation/build-time/transformer.js.map +0 -1
- package/dist/validation/comprehensive.cjs +0 -9
- package/dist/validation/comprehensive.cjs.map +0 -1
- package/dist/validation/comprehensive.js +0 -916
- package/dist/validation/comprehensive.js.map +0 -1
- package/dist/validation/debug-tools.cjs +0 -16
- package/dist/validation/debug-tools.cjs.map +0 -1
- package/dist/validation/debug-tools.js +0 -405
- package/dist/validation/debug-tools.js.map +0 -1
- package/dist/validation/developer-experience.cjs +0 -17
- package/dist/validation/developer-experience.cjs.map +0 -1
- package/dist/validation/developer-experience.js +0 -433
- package/dist/validation/developer-experience.js.map +0 -1
- package/dist/validation/documentation-integration.cjs +0 -7
- package/dist/validation/documentation-integration.cjs.map +0 -1
- package/dist/validation/documentation-integration.js +0 -440
- package/dist/validation/documentation-integration.js.map +0 -1
- package/dist/validation/enhanced-runtime.cjs +0 -6
- package/dist/validation/enhanced-runtime.cjs.map +0 -1
- package/dist/validation/enhanced-runtime.js +0 -465
- package/dist/validation/enhanced-runtime.js.map +0 -1
- package/dist/validation/error-reporting.cjs +0 -32
- package/dist/validation/error-reporting.cjs.map +0 -1
- package/dist/validation/error-reporting.js +0 -370
- package/dist/validation/error-reporting.js.map +0 -1
- package/dist/validation/ide-integration.cjs +0 -85
- package/dist/validation/ide-integration.cjs.map +0 -1
- package/dist/validation/ide-integration.js +0 -557
- package/dist/validation/ide-integration.js.map +0 -1
- package/dist/validation/index.cjs +0 -6
- package/dist/validation/index.cjs.map +0 -1
- package/dist/validation/index.js.map +0 -1
- package/dist/validation/lifecycle-validation.cjs +0 -2
- package/dist/validation/lifecycle-validation.cjs.map +0 -1
- package/dist/validation/lifecycle-validation.js +0 -314
- package/dist/validation/lifecycle-validation.js.map +0 -1
- package/dist/validation/performance-optimizer.cjs +0 -2
- package/dist/validation/performance-optimizer.cjs.map +0 -1
- package/dist/validation/performance-optimizer.js +0 -338
- package/dist/validation/performance-optimizer.js.map +0 -1
- package/dist/validation/plugin-registration.cjs +0 -2
- package/dist/validation/plugin-registration.cjs.map +0 -1
- package/dist/validation/plugin-registration.js +0 -126
- package/dist/validation/plugin-registration.js.map +0 -1
- package/dist/validation/production-bypass.cjs +0 -2
- package/dist/validation/production-bypass.cjs.map +0 -1
- package/dist/validation/production-bypass.js +0 -218
- package/dist/validation/production-bypass.js.map +0 -1
- package/dist/validation/simple.cjs +0 -9
- package/dist/validation/simple.cjs.map +0 -1
- package/dist/validation/simple.js +0 -146
- package/dist/validation/simple.js.map +0 -1
- package/dist/viewport/adapters/web-adapter.cjs +0 -70
- package/dist/viewport/adapters/web-adapter.cjs.map +0 -1
- package/dist/viewport/adapters/web-adapter.js +0 -823
- package/dist/viewport/adapters/web-adapter.js.map +0 -1
- package/dist/viewport/components.cjs +0 -2
- package/dist/viewport/components.cjs.map +0 -1
- package/dist/viewport/components.js +0 -298
- package/dist/viewport/components.js.map +0 -1
- package/dist/viewport/environment.cjs +0 -2
- package/dist/viewport/environment.cjs.map +0 -1
- package/dist/viewport/environment.js +0 -86
- package/dist/viewport/environment.js.map +0 -1
- package/dist/viewport/index.cjs +0 -2
- package/dist/viewport/index.cjs.map +0 -1
- package/dist/viewport/index.js.map +0 -1
- package/dist/viewport/platform-detection.cjs +0 -2
- package/dist/viewport/platform-detection.cjs.map +0 -1
- package/dist/viewport/platform-detection.js +0 -205
- package/dist/viewport/platform-detection.js.map +0 -1
- package/dist/viewport/types.cjs +0 -2
- package/dist/viewport/types.cjs.map +0 -1
- package/dist/viewport/types.js +0 -13
- package/dist/viewport/types.js.map +0 -1
- package/dist/viewport/viewport-manager.cjs +0 -2
- package/dist/viewport/viewport-manager.cjs.map +0 -1
- package/dist/viewport/viewport-manager.js +0 -524
- package/dist/viewport/viewport-manager.js.map +0 -1
- package/src/assets/Asset.ts +0 -11
- package/src/assets/AssetCollection.ts +0 -99
- package/src/assets/ColorAsset.ts +0 -210
- package/src/assets/FontAsset.ts +0 -380
- package/src/assets/ImageAsset.ts +0 -91
- package/src/assets/README.md +0 -190
- package/src/assets/index.ts +0 -175
- package/src/assets/test-assets.ts +0 -69
- package/src/assets/test-integration.ts +0 -46
- package/src/assets/test-simple.ts +0 -28
- package/src/assets/types.ts +0 -79
- package/src/bundles/common.ts +0 -30
- package/src/bundles/complete.ts +0 -29
- package/src/bundles/essential.ts +0 -26
- package/src/bundles/minimal.ts +0 -26
- package/src/bundles/production-minimal.ts +0 -67
- package/src/compiler/advanced-parser.ts +0 -871
- package/src/compiler/codegen.ts +0 -450
- package/src/compiler/enhanced-codegen.ts +0 -729
- package/src/compiler/index.ts +0 -25
- package/src/compiler/parser.ts +0 -461
- package/src/compiler/plugin.ts +0 -181
- package/src/compiler/types.ts +0 -177
- package/src/components/BasicInput.ts +0 -352
- package/src/components/Button.ts +0 -963
- package/src/components/Divider.ts +0 -341
- package/src/components/EnhancedLink.ts +0 -676
- package/src/components/Form.ts +0 -414
- package/src/components/Grid.ts +0 -2507
- package/src/components/GridResponsive.ts +0 -637
- package/src/components/Image.ts +0 -426
- package/src/components/List.ts +0 -1084
- package/src/components/Menu.ts +0 -807
- package/src/components/Picker.ts +0 -678
- package/src/components/ScrollView.ts +0 -725
- package/src/components/Section.ts +0 -472
- package/src/components/Show.ts +0 -205
- package/src/components/Spacer.ts +0 -93
- package/src/components/Text.ts +0 -447
- package/src/components/Toggle.ts +0 -700
- package/src/components/index.ts +0 -231
- package/src/components/wrapper.ts +0 -828
- package/src/concatenation/concatenatable.ts +0 -211
- package/src/concatenation/concatenated-component.ts +0 -471
- package/src/concatenation/index.ts +0 -41
- package/src/concatenation/styles.css +0 -120
- package/src/concatenation/text-optimizer.ts +0 -440
- package/src/concatenation/types.ts +0 -116
- package/src/constants/README.md +0 -339
- package/src/constants/__tests__/frame-utils.test.ts +0 -276
- package/src/constants/__tests__/layout.test.ts +0 -215
- package/src/constants/frame-utils.ts +0 -174
- package/src/constants/index.ts +0 -8
- package/src/constants/layout.ts +0 -120
- package/src/css-classes/component-base.ts +0 -117
- package/src/css-classes/css-class-manager.ts +0 -372
- package/src/css-classes/dom-integration.ts +0 -162
- package/src/css-classes/enhanced-renderer.ts +0 -166
- package/src/css-classes/index.ts +0 -45
- package/src/css-classes/types.ts +0 -73
- package/src/css-classes/utilities.ts +0 -175
- package/src/debug/index.ts +0 -267
- package/src/developer-experience/enhanced-errors.ts +0 -556
- package/src/developer-experience/enhanced-types.ts +0 -427
- package/src/developer-experience/index.ts +0 -220
- package/src/globals.d.ts +0 -43
- package/src/gradients/__tests__/angular-gradient.test.ts +0 -111
- package/src/gradients/__tests__/background-modifier.test.ts +0 -81
- package/src/gradients/__tests__/comprehensive-gradients.test.ts +0 -296
- package/src/gradients/__tests__/gradient-asset.test.ts +0 -144
- package/src/gradients/__tests__/linear-gradient.test.ts +0 -92
- package/src/gradients/__tests__/phase4-features.test.ts +0 -386
- package/src/gradients/__tests__/radial-gradient.test.ts +0 -110
- package/src/gradients/__tests__/repeating-gradients.test.ts +0 -125
- package/src/gradients/__tests__/state-background-modifier.test.ts +0 -340
- package/src/gradients/__tests__/state-gradient-asset.test.ts +0 -262
- package/src/gradients/__tests__/state-gradient-integration.test.ts +0 -277
- package/src/gradients/css-generator.ts +0 -158
- package/src/gradients/examples.ts +0 -632
- package/src/gradients/gradient-asset.ts +0 -30
- package/src/gradients/index.ts +0 -85
- package/src/gradients/performance.ts +0 -521
- package/src/gradients/presets.ts +0 -422
- package/src/gradients/reactive.ts +0 -470
- package/src/gradients/state-gradient-asset.ts +0 -179
- package/src/gradients/types.ts +0 -148
- package/src/gradients/utils.ts +0 -579
- package/src/gradients/validation.ts +0 -489
- package/src/index.ts +0 -168
- package/src/lifecycle/hooks.ts +0 -332
- package/src/modifiers/__tests__/as-html-integration.test.ts +0 -204
- package/src/modifiers/__tests__/as-html.test.ts +0 -437
- package/src/modifiers/__tests__/basic-sanitizer-security.test.ts +0 -294
- package/src/modifiers/__tests__/border.test.ts +0 -371
- package/src/modifiers/__tests__/margin-string-support.test.ts +0 -41
- package/src/modifiers/__tests__/padding-string-support.test.ts +0 -41
- package/src/modifiers/as-html-validator.ts +0 -68
- package/src/modifiers/as-html.ts +0 -216
- package/src/modifiers/attributes.ts +0 -574
- package/src/modifiers/backdrop.ts +0 -290
- package/src/modifiers/background.ts +0 -165
- package/src/modifiers/base.ts +0 -1815
- package/src/modifiers/basic-sanitizer.ts +0 -227
- package/src/modifiers/border.ts +0 -574
- package/src/modifiers/builder.ts +0 -1747
- package/src/modifiers/core.ts +0 -521
- package/src/modifiers/css.ts +0 -148
- package/src/modifiers/effects.ts +0 -412
- package/src/modifiers/elements.ts +0 -541
- package/src/modifiers/filters.ts +0 -501
- package/src/modifiers/flexbox.ts +0 -180
- package/src/modifiers/font.ts +0 -149
- package/src/modifiers/grid.ts +0 -238
- package/src/modifiers/index.ts +0 -481
- package/src/modifiers/margin.ts +0 -218
- package/src/modifiers/padding.ts +0 -318
- package/src/modifiers/registry.ts +0 -444
- package/src/modifiers/responsive/__tests__/advanced-media-queries.test.ts +0 -392
- package/src/modifiers/responsive/__tests__/advanced-utilities.test.ts +0 -368
- package/src/modifiers/responsive/__tests__/comprehensive-browser-tests.test.ts +0 -556
- package/src/modifiers/responsive/__tests__/layout-patterns.test.ts +0 -558
- package/src/modifiers/responsive/advanced-utilities.ts +0 -562
- package/src/modifiers/responsive/breakpoints.ts +0 -330
- package/src/modifiers/responsive/css-generator.ts +0 -432
- package/src/modifiers/responsive/dev-tools.ts +0 -650
- package/src/modifiers/responsive/index.ts +0 -119
- package/src/modifiers/responsive/layout-patterns.ts +0 -592
- package/src/modifiers/responsive/performance.ts +0 -385
- package/src/modifiers/responsive/responsive-builder.ts +0 -620
- package/src/modifiers/responsive/responsive-modifier.ts +0 -410
- package/src/modifiers/responsive/types.ts +0 -226
- package/src/modifiers/responsive/utilities.ts +0 -478
- package/src/modifiers/scroll.ts +0 -297
- package/src/modifiers/shadows.ts +0 -321
- package/src/modifiers/size.ts +0 -208
- package/src/modifiers/text.ts +0 -416
- package/src/modifiers/transformations.ts +0 -640
- package/src/modifiers/transitions.ts +0 -218
- package/src/modifiers/types.ts +0 -889
- package/src/modifiers/typography.ts +0 -341
- package/src/modifiers/utility.ts +0 -209
- package/src/modifiers/utils.ts +0 -413
- package/src/plugins/__tests__/simplified-plugin-system.test.ts +0 -190
- package/src/plugins/component-loader-registry.ts +0 -371
- package/src/plugins/index.ts +0 -61
- package/src/plugins/legacy-adapter.ts +0 -84
- package/src/plugins/simplified-component-registry.ts +0 -130
- package/src/plugins/simplified-error-handler.ts +0 -372
- package/src/plugins/simplified-index.ts +0 -61
- package/src/plugins/simplified-lazy-loader.ts +0 -242
- package/src/plugins/simplified-plugin-manager.ts +0 -93
- package/src/plugins/simplified-tachui-instance.ts +0 -142
- package/src/plugins/simplified-types.ts +0 -79
- package/src/plugins/simplified-utils.ts +0 -118
- package/src/reactive/cleanup.ts +0 -241
- package/src/reactive/computed.ts +0 -281
- package/src/reactive/context.ts +0 -287
- package/src/reactive/effect.ts +0 -194
- package/src/reactive/enhanced-effect.ts +0 -318
- package/src/reactive/enhanced-signal.ts +0 -227
- package/src/reactive/equality.ts +0 -188
- package/src/reactive/globals.d.ts +0 -5
- package/src/reactive/index.ts +0 -150
- package/src/reactive/migration.ts +0 -335
- package/src/reactive/ownership.ts +0 -182
- package/src/reactive/scheduler.ts +0 -300
- package/src/reactive/signal.ts +0 -201
- package/src/reactive/theme.ts +0 -49
- package/src/reactive/types.ts +0 -103
- package/src/reactive/unified-scheduler.ts +0 -357
- package/src/runtime/component-context.ts +0 -343
- package/src/runtime/component.ts +0 -499
- package/src/runtime/context.ts +0 -527
- package/src/runtime/dev-tools.ts +0 -752
- package/src/runtime/development-warnings.ts +0 -114
- package/src/runtime/dom-bridge.ts +0 -570
- package/src/runtime/element-override.ts +0 -282
- package/src/runtime/error-boundary.ts +0 -955
- package/src/runtime/error-recovery.ts +0 -638
- package/src/runtime/error-reporting.ts +0 -808
- package/src/runtime/error-utils.ts +0 -698
- package/src/runtime/index.ts +0 -202
- package/src/runtime/lazy-component.ts +0 -268
- package/src/runtime/lifecycle.ts +0 -10
- package/src/runtime/mounting.ts +0 -17
- package/src/runtime/optimization.ts +0 -13
- package/src/runtime/performance.ts +0 -693
- package/src/runtime/props.ts +0 -434
- package/src/runtime/refs.ts +0 -13
- package/src/runtime/renderer.ts +0 -674
- package/src/runtime/semantic-role-manager.ts +0 -140
- package/src/runtime/types.ts +0 -282
- package/src/state/binding.ts +0 -381
- package/src/state/environment-object.ts +0 -444
- package/src/state/environment.ts +0 -351
- package/src/state/index.ts +0 -179
- package/src/state/observed-object.ts +0 -405
- package/src/state/state-manager.ts +0 -366
- package/src/state/state.ts +0 -339
- package/src/state/types.ts +0 -192
- package/src/sui-compat.ts +0 -163
- package/src/validation/__tests__/phase-1d-integration.test.ts +0 -558
- package/src/validation/advanced-debugging.ts +0 -860
- package/src/validation/build-time/detection.ts +0 -373
- package/src/validation/build-time/index.ts +0 -222
- package/src/validation/build-time/plugins.ts +0 -515
- package/src/validation/build-time/rules.ts +0 -624
- package/src/validation/build-time/transformer.ts +0 -372
- package/src/validation/build-time/types.ts +0 -232
- package/src/validation/comprehensive.ts +0 -1272
- package/src/validation/debug-tools.ts +0 -724
- package/src/validation/developer-experience.ts +0 -712
- package/src/validation/documentation-integration.ts +0 -835
- package/src/validation/enhanced-runtime.ts +0 -765
- package/src/validation/error-reporting.ts +0 -587
- package/src/validation/ide-integration.ts +0 -845
- package/src/validation/index.ts +0 -353
- package/src/validation/lifecycle-validation.ts +0 -636
- package/src/validation/performance-optimizer.ts +0 -599
- package/src/validation/plugin-registration.ts +0 -249
- package/src/validation/production-bypass.ts +0 -466
- package/src/validation/simple.ts +0 -465
- package/src/viewport/adapters/web-adapter.ts +0 -1385
- package/src/viewport/components.ts +0 -505
- package/src/viewport/environment.ts +0 -173
- package/src/viewport/index.ts +0 -290
- package/src/viewport/platform-detection.ts +0 -431
- package/src/viewport/types.ts +0 -371
- package/src/viewport/viewport-manager.ts +0 -979
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"advanced-utilities.js","sources":["../../../src/modifiers/responsive/advanced-utilities.ts"],"sourcesContent":["/**\n * Advanced Responsive Utilities\n * \n * Provides programmatic access to responsive behavior, advanced hooks,\n * and complex responsive logic utilities for sophisticated applications.\n */\n\nimport { createSignal, createComputed, createEffect, createMemo, Signal } from '../../reactive'\nimport { \n ResponsiveValue, \n BreakpointKey, \n BreakpointContext,\n isResponsiveValue \n} from './types'\nimport { \n getCurrentBreakpoint, \n getBreakpointIndex, \n createBreakpointContext,\n getCurrentBreakpointConfig \n} from './breakpoints'\n\n/**\n * Advanced breakpoint utilities with enhanced functionality\n */\nexport class AdvancedBreakpointUtils {\n /**\n * Create a responsive value resolver with custom logic\n */\n static createResponsiveResolver<T>(\n getValue: (breakpoint: BreakpointKey, context: BreakpointContext) => T,\n dependencies: Signal<any>[] = []\n ): Signal<T> {\n const currentBreakpoint = getCurrentBreakpoint()\n \n return createComputed(() => {\n // Include dependencies in computation\n dependencies.forEach(dep => dep())\n \n const breakpoint = currentBreakpoint()\n const context = createBreakpointContext()\n return getValue(breakpoint, context)\n })\n }\n \n /**\n * Create responsive value that interpolates between breakpoints\n */\n static createInterpolatedValue(\n values: Partial<Record<BreakpointKey, number>>,\n options: {\n smoothing?: 'linear' | 'ease' | 'ease-in' | 'ease-out'\n clamp?: boolean\n } = {}\n ): Signal<number> {\n const { smoothing = 'linear', clamp = true } = options\n \n return createComputed(() => {\n const context = createBreakpointContext()\n const width = context.width\n const breakpointConfig = getCurrentBreakpointConfig()\n \n // Convert breakpoint values to numeric widths\n const sortedPoints: Array<{ width: number; value: number }> = []\n \n for (const [bp, value] of Object.entries(values)) {\n if (value !== undefined) {\n const bpWidth = bp === 'base' ? 0 : parseInt(breakpointConfig[bp as BreakpointKey] || '0')\n sortedPoints.push({ width: bpWidth, value })\n }\n }\n \n sortedPoints.sort((a, b) => a.width - b.width)\n \n if (sortedPoints.length === 0) return 0\n if (sortedPoints.length === 1) return sortedPoints[0].value\n \n // Find interpolation points\n let lowerPoint = sortedPoints[0]\n let upperPoint = sortedPoints[sortedPoints.length - 1]\n \n for (let i = 0; i < sortedPoints.length - 1; i++) {\n if (width >= sortedPoints[i].width && width <= sortedPoints[i + 1].width) {\n lowerPoint = sortedPoints[i]\n upperPoint = sortedPoints[i + 1]\n break\n }\n }\n \n // Handle edge cases\n if (clamp) {\n if (width <= lowerPoint.width) return lowerPoint.value\n if (width >= upperPoint.width) return upperPoint.value\n }\n \n // Calculate interpolation factor\n const factor = (width - lowerPoint.width) / (upperPoint.width - lowerPoint.width)\n \n // Apply smoothing function\n let smoothedFactor = factor\n switch (smoothing) {\n case 'ease':\n smoothedFactor = 0.5 - 0.5 * Math.cos(factor * Math.PI)\n break\n case 'ease-in':\n smoothedFactor = factor * factor\n break\n case 'ease-out':\n smoothedFactor = 1 - (1 - factor) * (1 - factor)\n break\n case 'linear':\n default:\n smoothedFactor = factor\n break\n }\n \n // Interpolate value\n return lowerPoint.value + (upperPoint.value - lowerPoint.value) * smoothedFactor\n }) as Signal<number>\n }\n \n /**\n * Create conditional responsive behavior\n */\n static createConditionalResponsive<T>(\n condition: (context: BreakpointContext) => boolean,\n trueValue: ResponsiveValue<T>,\n falseValue: ResponsiveValue<T>\n ): Signal<T> {\n const currentBreakpoint = getCurrentBreakpoint()\n \n return createComputed(() => {\n const context = createBreakpointContext()\n const shouldUseTrue = condition(context)\n const activeValue = shouldUseTrue ? trueValue : falseValue\n \n return this.resolveResponsiveValue(activeValue, currentBreakpoint())\n })\n }\n \n /**\n * Resolve responsive value at specific breakpoint\n */\n private static resolveResponsiveValue<T>(\n value: ResponsiveValue<T>,\n breakpoint: BreakpointKey\n ): T {\n if (!isResponsiveValue(value)) {\n return value as T\n }\n \n const responsiveObj = value as Partial<Record<BreakpointKey, T>>\n const breakpointOrder: BreakpointKey[] = ['base', 'sm', 'md', 'lg', 'xl', '2xl']\n const currentIndex = breakpointOrder.indexOf(breakpoint)\n \n // Search backwards from current breakpoint\n for (let i = currentIndex; i >= 0; i--) {\n const bp = breakpointOrder[i]\n if (responsiveObj[bp] !== undefined) {\n return responsiveObj[bp]!\n }\n }\n \n // Fallback to any defined value\n for (const bp of breakpointOrder) {\n if (responsiveObj[bp] !== undefined) {\n return responsiveObj[bp]!\n }\n }\n \n throw new Error('No responsive value found')\n }\n}\n\n/**\n * Advanced responsive hooks for complex scenarios\n */\nexport class ResponsiveHooks {\n /**\n * Hook for responsive arrays (e.g., responsive grid columns data)\n */\n static useResponsiveArray<T>(\n arrays: Partial<Record<BreakpointKey, T[]>>\n ): Signal<T[]> {\n const currentBreakpoint = getCurrentBreakpoint()\n \n return createComputed(() => {\n const breakpoint = currentBreakpoint()\n return AdvancedBreakpointUtils['resolveResponsiveValue'](arrays, breakpoint) || []\n })\n }\n \n /**\n * Hook for responsive object selection\n */\n static useResponsiveObject<T extends Record<string, any>>(\n objects: Partial<Record<BreakpointKey, T>>\n ): Signal<T | null> {\n const currentBreakpoint = getCurrentBreakpoint()\n \n return createComputed(() => {\n const breakpoint = currentBreakpoint()\n try {\n return AdvancedBreakpointUtils['resolveResponsiveValue'](objects, breakpoint)\n } catch {\n return null\n }\n })\n }\n \n /**\n * Hook for responsive function selection and execution\n */\n static useResponsiveFunction<TArgs extends any[], TReturn>(\n functions: Partial<Record<BreakpointKey, (...args: TArgs) => TReturn>>\n ): Signal<((...args: TArgs) => TReturn) | null> {\n const currentBreakpoint = getCurrentBreakpoint()\n \n return createComputed(() => {\n const breakpoint = currentBreakpoint()\n try {\n return AdvancedBreakpointUtils['resolveResponsiveValue'](functions, breakpoint)\n } catch {\n return null\n }\n })\n }\n \n /**\n * Hook for responsive state management\n */\n static useResponsiveState<T>(\n initialValues: Partial<Record<BreakpointKey, T>>\n ): [Signal<T | undefined>, (value: T | Partial<Record<BreakpointKey, T>>) => void] {\n const [state, setState] = createSignal<Partial<Record<BreakpointKey, T>>>(initialValues)\n const currentBreakpoint = getCurrentBreakpoint()\n \n const currentValue = createComputed(() => {\n const stateObj = state()\n const breakpoint = currentBreakpoint()\n \n try {\n return AdvancedBreakpointUtils['resolveResponsiveValue'](stateObj, breakpoint)\n } catch {\n return undefined\n }\n })\n \n const setResponsiveState = (value: T | Partial<Record<BreakpointKey, T>>) => {\n if (isResponsiveValue(value)) {\n setState(value as Partial<Record<BreakpointKey, T>>)\n } else {\n setState({ [currentBreakpoint()]: value as T })\n }\n }\n \n return [currentValue, setResponsiveState]\n }\n \n /**\n * Hook for responsive computations with memoization\n */\n static useResponsiveComputation<T>(\n computation: (context: BreakpointContext) => T,\n dependencies: Signal<any>[] = []\n ): Signal<T> {\n return createMemo(() => {\n // Include dependencies\n dependencies.forEach(dep => dep())\n \n const context = createBreakpointContext()\n return computation(context)\n })\n }\n \n /**\n * Hook for responsive side effects\n */\n static useResponsiveEffect(\n effect: (context: BreakpointContext, prevContext?: BreakpointContext) => void | (() => void),\n dependencies: Signal<any>[] = []\n ): void {\n let cleanup: (() => void) | undefined\n let prevContext: BreakpointContext | undefined\n \n createEffect(() => {\n // Include dependencies\n dependencies.forEach(dep => dep())\n \n const context = createBreakpointContext()\n \n // Run cleanup from previous effect\n if (cleanup) {\n cleanup()\n cleanup = undefined\n }\n \n // Run the effect\n const result = effect(context, prevContext)\n \n if (typeof result === 'function') {\n cleanup = result\n }\n \n prevContext = context\n })\n }\n}\n\n/**\n * Responsive breakpoint targeting utilities\n */\nexport class ResponsiveTargeting {\n /**\n * Execute callback only on specific breakpoints\n */\n static onBreakpoints(\n breakpoints: BreakpointKey[],\n callback: (context: BreakpointContext) => void | (() => void)\n ): () => void {\n let cleanup: (() => void) | undefined\n \n createEffect(() => {\n const context = createBreakpointContext()\n \n if (breakpoints.includes(context.current)) {\n // Run cleanup from previous execution\n if (cleanup) {\n cleanup()\n cleanup = undefined\n }\n \n // Execute callback\n const result = callback(context)\n if (typeof result === 'function') {\n cleanup = result\n }\n }\n })\n \n return () => {\n if (cleanup) cleanup()\n }\n }\n \n /**\n * Execute callback when breakpoint changes\n */\n static onBreakpointChange(\n callback: (newBreakpoint: BreakpointKey, oldBreakpoint: BreakpointKey, context: BreakpointContext) => void\n ): () => void {\n let oldBreakpoint: BreakpointKey | undefined\n \n createEffect(() => {\n const context = createBreakpointContext()\n const newBreakpoint = context.current\n \n if (oldBreakpoint && oldBreakpoint !== newBreakpoint) {\n callback(newBreakpoint, oldBreakpoint, context)\n }\n \n oldBreakpoint = newBreakpoint\n })\n \n return () => {\n // No-op for now since createEffect doesn't return dispose function\n }\n }\n \n /**\n * Execute callback when entering/leaving specific breakpoint ranges\n */\n static onBreakpointRange(\n minBreakpoint: BreakpointKey,\n maxBreakpoint: BreakpointKey,\n callbacks: {\n onEnter?: (context: BreakpointContext) => void | (() => void)\n onLeave?: (context: BreakpointContext) => void\n onWithin?: (context: BreakpointContext) => void | (() => void)\n }\n ): () => void {\n let isWithinRange = false\n let withinCleanup: (() => void) | undefined\n let enterCleanup: (() => void) | undefined\n \n createEffect(() => {\n const context = createBreakpointContext()\n const currentIndex = getBreakpointIndex(context.current)\n const minIndex = getBreakpointIndex(minBreakpoint)\n const maxIndex = getBreakpointIndex(maxBreakpoint)\n \n const nowWithinRange = currentIndex >= minIndex && currentIndex <= maxIndex\n \n if (nowWithinRange && !isWithinRange) {\n // Entering range\n if (callbacks.onEnter) {\n const result = callbacks.onEnter(context)\n if (typeof result === 'function') {\n enterCleanup = result\n }\n }\n isWithinRange = true\n } else if (!nowWithinRange && isWithinRange) {\n // Leaving range\n if (enterCleanup) {\n enterCleanup()\n enterCleanup = undefined\n }\n if (withinCleanup) {\n withinCleanup()\n withinCleanup = undefined\n }\n if (callbacks.onLeave) {\n callbacks.onLeave(context)\n }\n isWithinRange = false\n }\n \n if (nowWithinRange && callbacks.onWithin) {\n // Within range\n if (withinCleanup) {\n withinCleanup()\n withinCleanup = undefined\n }\n \n const result = callbacks.onWithin(context)\n if (typeof result === 'function') {\n withinCleanup = result\n }\n }\n })\n \n return () => {\n if (enterCleanup) enterCleanup()\n if (withinCleanup) withinCleanup()\n }\n }\n}\n\n/**\n * Responsive data management utilities\n */\nexport class ResponsiveDataUtils {\n /**\n * Create responsive pagination\n */\n static createResponsivePagination<T>(\n data: T[],\n itemsPerPage: ResponsiveValue<number>\n ): {\n currentPage: Signal<number>\n totalPages: Signal<number>\n currentItems: Signal<T[]>\n setPage: (page: number) => void\n nextPage: () => void\n prevPage: () => void\n hasNext: Signal<boolean>\n hasPrev: Signal<boolean>\n } {\n const [currentPage, setCurrentPage] = createSignal(1)\n const currentBreakpoint = getCurrentBreakpoint()\n \n const itemsPerPageResolved = createComputed(() => {\n const breakpoint = currentBreakpoint()\n return AdvancedBreakpointUtils['resolveResponsiveValue'](itemsPerPage, breakpoint)\n }) as Signal<number>\n \n const totalPages = createComputed(() => {\n return Math.ceil(data.length / itemsPerPageResolved())\n }) as Signal<number>\n \n const currentItems = createComputed(() => {\n const itemsCount = itemsPerPageResolved()\n const page = currentPage()\n const startIndex = (page - 1) * itemsCount\n const endIndex = startIndex + itemsCount\n return data.slice(startIndex, endIndex)\n }) as Signal<T[]>\n \n const hasNext = createComputed(() => currentPage() < totalPages()) as Signal<boolean>\n const hasPrev = createComputed(() => currentPage() > 1) as Signal<boolean>\n \n const setPage = (page: number) => {\n const maxPage = totalPages()\n setCurrentPage(Math.max(1, Math.min(page, maxPage)))\n }\n \n const nextPage = () => {\n if (hasNext()) {\n setCurrentPage(currentPage() + 1)\n }\n }\n \n const prevPage = () => {\n if (hasPrev()) {\n setCurrentPage(currentPage() - 1)\n }\n }\n \n // Reset to page 1 when items per page changes\n createEffect(() => {\n itemsPerPageResolved() // Subscribe to changes\n setCurrentPage(1)\n })\n \n return {\n currentPage: currentPage as Signal<number>,\n totalPages,\n currentItems,\n setPage,\n nextPage,\n prevPage,\n hasNext,\n hasPrev\n }\n }\n \n /**\n * Create responsive filtering\n */\n static createResponsiveFilter<T>(\n data: T[],\n filters: Partial<Record<BreakpointKey, (item: T) => boolean>>\n ): Signal<T[]> {\n const currentBreakpoint = getCurrentBreakpoint()\n \n return createComputed(() => {\n const breakpoint = currentBreakpoint()\n const filter = AdvancedBreakpointUtils['resolveResponsiveValue'](filters, breakpoint)\n \n if (!filter) return data\n return data.filter(filter)\n }) as Signal<T[]>\n }\n \n /**\n * Create responsive sorting\n */\n static createResponsiveSort<T>(\n data: T[],\n sorters: Partial<Record<BreakpointKey, (a: T, b: T) => number>>\n ): Signal<T[]> {\n const currentBreakpoint = getCurrentBreakpoint()\n \n return createComputed(() => {\n const breakpoint = currentBreakpoint()\n const sorter = AdvancedBreakpointUtils['resolveResponsiveValue'](sorters, breakpoint)\n \n if (!sorter) return data\n return [...data].sort(sorter)\n }) as Signal<T[]>\n }\n}\n\n/**\n * Export all advanced utilities\n */\nexport const ResponsiveAdvanced = {\n Breakpoints: AdvancedBreakpointUtils,\n Hooks: ResponsiveHooks,\n Targeting: ResponsiveTargeting,\n Data: ResponsiveDataUtils\n}"],"names":["AdvancedBreakpointUtils","getValue","dependencies","currentBreakpoint","getCurrentBreakpoint","createComputed","dep","breakpoint","context","createBreakpointContext","values","options","smoothing","clamp","width","breakpointConfig","getCurrentBreakpointConfig","sortedPoints","bp","value","bpWidth","a","b","lowerPoint","upperPoint","i","factor","smoothedFactor","condition","trueValue","falseValue","activeValue","isResponsiveValue","responsiveObj","breakpointOrder","currentIndex","ResponsiveHooks","arrays","objects","functions","initialValues","state","setState","createSignal","stateObj","computation","createMemo","effect","cleanup","prevContext","createEffect","result","ResponsiveTargeting","breakpoints","callback","oldBreakpoint","newBreakpoint","minBreakpoint","maxBreakpoint","callbacks","isWithinRange","withinCleanup","enterCleanup","getBreakpointIndex","minIndex","maxIndex","nowWithinRange","ResponsiveDataUtils","data","itemsPerPage","currentPage","setCurrentPage","itemsPerPageResolved","totalPages","currentItems","itemsCount","startIndex","endIndex","hasNext","hasPrev","setPage","page","maxPage","nextPage","prevPage","filters","filter","sorters","sorter","ResponsiveAdvanced"],"mappings":";;;;;;;;;AAwBO,MAAMA,EAAwB;AAAA;AAAA;AAAA;AAAA,EAInC,OAAO,yBACLC,GACAC,IAA8B,IACnB;AACX,UAAMC,IAAoBC,EAAA;AAE1B,WAAOC,EAAe,MAAM;AAE1B,MAAAH,EAAa,QAAQ,CAAAI,MAAOA,EAAA,CAAK;AAEjC,YAAMC,IAA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ACE,CAAC,GAAGpB,CAAI,EAAE,KAAKoB,CAAM,IADRpB;AAAA,IAEtB,CAAC;AAAA,EACH;AACF;AAKO,MAAMqB,IAAqB;AAAA,EAChC,aAAazF;AAAA,EACb,OAAOoC;AAAA,EACP,WAAWgB;AAAA,EACX,MAAMe;AACR;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./types.cjs");require("../../reactive/cleanup.cjs");require("../../reactive/unified-scheduler.cjs");const m=require("../../reactive/signal.cjs");require("../../reactive/scheduler.cjs");require("../../reactive/theme.cjs");let a={...d.DEFAULT_BREAKPOINTS};const[k,w]=m.createSignal("base"),[h,B]=m.createSignal({width:0,height:0});function b(t){V(t),a={...d.DEFAULT_BREAKPOINTS,...t},s(),typeof window<"u"&&window.addEventListener("resize",s)}function v(){return{...a}}function y(){return k}function C(){return h}function $(){typeof window>"u"||(f(),s(),window.addEventListener("resize",()=>{f(),s()}),window.addEventListener("orientationchange",()=>{setTimeout(()=>{f(),s()},100)}))}function I(){const t=k(),n=h();return{current:t,width:n.width,height:n.height,isAbove:e=>x(t,e),isBelow:e=>g(t,e),isBetween:(e,i)=>x(t,e)&&g(t,i),matches:e=>window.matchMedia(e).matches}}function u(t){const n=a[t];return n.endsWith("px")?parseInt(n,10):n.endsWith("em")||n.endsWith("rem")?parseInt(n,10)*16:parseInt(n,10)||0}function r(t){return["base","sm","md","lg","xl","2xl"].indexOf(t)}function x(t,n){return r(t)>r(n)}function g(t,n){return r(t)<r(n)}function S(t){return t==="base"?"":`(min-width: ${a[t]})`}function E(t,n){const e=[];if(t!=="base"&&e.push(`(min-width: ${a[t]})`),n&&n!=="2xl"){const i=["sm","md","lg","xl","2xl"],o=i.indexOf(n);if(o>=0&&o<i.length-1){const c=i[o+1],p=`${u(c)-1}px`;e.push(`(max-width: ${p})`)}}return e.length>0?e.join(" and "):""}function l(){return["base","sm","md","lg","xl","2xl"]}function A(t){const n=l(),e=n.indexOf(t);return e>=0?n.slice(e+1):[]}function O(t){const n=l(),e=n.indexOf(t);return e>0?n.slice(0,e):[]}function s(){if(typeof window>"u")return;const t=window.innerWidth,n=l().reverse();for(const e of n)if(e==="base"||t>=u(e)){w(e);return}w("base")}function f(){typeof window<"u"&&B({width:window.innerWidth,height:window.innerHeight})}function V(t){for(const[e,i]of Object.entries(t)){if(!d.isValidBreakpointKey(e))throw new Error(`Invalid breakpoint key: "${e}". Valid keys are: base, sm, md, lg, xl, 2xl`);if(typeof i!="string")throw new Error(`Breakpoint value for "${e}" must be a string (e.g., "768px")`);if(!i.match(/^\d+(\.\d+)?(px|em|rem|%)$/))throw new Error(`Invalid breakpoint value for "${e}": "${i}". Must be a valid CSS length (e.g., "768px", "48em")`)}const n=Object.keys(t).filter(d.isValidBreakpointKey).sort((e,i)=>r(e)-r(i));for(let e=1;e<n.length;e++){const i=n[e-1],o=n[e],c=t[i],p=t[o];if(u(i)>=parseInt(p,10))throw new Error(`Breakpoint "${o}" (${p}) must be larger than "${i}" (${c})`)}}const T={tailwind:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},bootstrap:{sm:"576px",md:"768px",lg:"992px",xl:"1200px","2xl":"1400px"},material:{sm:"600px",md:"960px",lg:"1280px",xl:"1920px","2xl":"2560px"},mobileFocus:{sm:"480px",md:"768px",lg:"1024px",xl:"1200px","2xl":"1440px"}};exports.BreakpointPresets=T;exports.breakpointToPixels=u;exports.configureBreakpoints=b;exports.createBreakpointContext=I;exports.generateMediaQuery=S;exports.generateRangeMediaQuery=E;exports.getBreakpointIndex=r;exports.getBreakpointsAbove=A;exports.getBreakpointsBelow=O;exports.getCurrentBreakpoint=y;exports.getCurrentBreakpointConfig=v;exports.getSortedBreakpoints=l;exports.getViewportDimensions=C;exports.initializeResponsiveSystem=$;exports.isBreakpointAbove=x;exports.isBreakpointBelow=g;
|
|
2
|
-
//# sourceMappingURL=breakpoints.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoints.cjs","sources":["../../../src/modifiers/responsive/breakpoints.ts"],"sourcesContent":["/**\n * Breakpoint Configuration System\n * \n * Manages responsive breakpoint configuration, validation, and utilities.\n * Supports both default Tailwind-inspired breakpoints and custom configurations.\n */\n\nimport { \n BreakpointKey, \n BreakpointConfig, \n DEFAULT_BREAKPOINTS,\n BreakpointContext,\n isValidBreakpointKey\n} from './types'\nimport { createSignal, Signal } from '../../reactive'\n\n/**\n * Global breakpoint configuration state\n */\nlet currentBreakpointConfig: Required<BreakpointConfig> = { ...DEFAULT_BREAKPOINTS }\n\n/**\n * Current active breakpoint signal\n */\nconst [currentBreakpoint, setCurrentBreakpoint] = createSignal<BreakpointKey>('base')\n\n/**\n * Current viewport dimensions signal\n */\nconst [viewportDimensions, setViewportDimensions] = createSignal({ width: 0, height: 0 })\n\n/**\n * Configure global breakpoints for the application\n */\nexport function configureBreakpoints(config: Partial<BreakpointConfig>): void {\n // Validate breakpoint configuration\n validateBreakpointConfig(config)\n \n // Update global configuration\n currentBreakpointConfig = {\n ...DEFAULT_BREAKPOINTS,\n ...config\n }\n \n // Re-evaluate current breakpoint\n updateCurrentBreakpoint()\n \n if (typeof window !== 'undefined') {\n // Update breakpoint on window resize\n window.addEventListener('resize', updateCurrentBreakpoint)\n }\n}\n\n/**\n * Get the current breakpoint configuration\n */\nexport function getCurrentBreakpointConfig(): Required<BreakpointConfig> {\n return { ...currentBreakpointConfig }\n}\n\n/**\n * Get the current active breakpoint\n */\nexport function getCurrentBreakpoint(): Signal<BreakpointKey> {\n return currentBreakpoint as Signal<BreakpointKey>\n}\n\n/**\n * Get current viewport dimensions\n */\nexport function getViewportDimensions(): Signal<{ width: number; height: number }> {\n return viewportDimensions as Signal<{ width: number; height: number }>\n}\n\n/**\n * Initialize the responsive system (should be called once on app startup)\n */\nexport function initializeResponsiveSystem(): void {\n if (typeof window === 'undefined') {\n return // Skip on server-side\n }\n \n // Set initial viewport dimensions\n updateViewportDimensions()\n updateCurrentBreakpoint()\n \n // Listen for window resize events\n window.addEventListener('resize', () => {\n updateViewportDimensions()\n updateCurrentBreakpoint()\n })\n \n // Listen for orientation changes\n window.addEventListener('orientationchange', () => {\n // Delay to ensure accurate dimensions after orientation change\n setTimeout(() => {\n updateViewportDimensions()\n updateCurrentBreakpoint()\n }, 100)\n })\n}\n\n/**\n * Create a breakpoint context for utilities\n */\nexport function createBreakpointContext(): BreakpointContext {\n const current = currentBreakpoint()\n const dimensions = viewportDimensions()\n \n return {\n current,\n width: dimensions.width,\n height: dimensions.height,\n isAbove: (breakpoint: BreakpointKey) => isBreakpointAbove(current, breakpoint),\n isBelow: (breakpoint: BreakpointKey) => isBreakpointBelow(current, breakpoint),\n isBetween: (min: BreakpointKey, max: BreakpointKey) => \n isBreakpointAbove(current, min) && isBreakpointBelow(current, max),\n matches: (query: string) => window.matchMedia(query).matches\n }\n}\n\n/**\n * Convert breakpoint value to numeric pixels for comparison\n */\nexport function breakpointToPixels(breakpoint: BreakpointKey): number {\n const value = currentBreakpointConfig[breakpoint]\n \n // Handle different CSS units\n if (value.endsWith('px')) {\n return parseInt(value, 10)\n } else if (value.endsWith('em')) {\n return parseInt(value, 10) * 16 // Assume 16px base font size\n } else if (value.endsWith('rem')) {\n return parseInt(value, 10) * 16 // Assume 16px base font size\n }\n \n // Fallback to direct number conversion\n return parseInt(value, 10) || 0\n}\n\n/**\n * Get breakpoint index for comparison (base = 0, sm = 1, etc.)\n */\nexport function getBreakpointIndex(breakpoint: BreakpointKey): number {\n const order: BreakpointKey[] = ['base', 'sm', 'md', 'lg', 'xl', '2xl']\n return order.indexOf(breakpoint)\n}\n\n/**\n * Check if breakpoint A is above breakpoint B\n */\nexport function isBreakpointAbove(a: BreakpointKey, b: BreakpointKey): boolean {\n return getBreakpointIndex(a) > getBreakpointIndex(b)\n}\n\n/**\n * Check if breakpoint A is below breakpoint B\n */\nexport function isBreakpointBelow(a: BreakpointKey, b: BreakpointKey): boolean {\n return getBreakpointIndex(a) < getBreakpointIndex(b)\n}\n\n/**\n * Generate CSS media query string for a breakpoint\n */\nexport function generateMediaQuery(breakpoint: BreakpointKey): string {\n if (breakpoint === 'base') {\n return '' // No media query for base (mobile-first)\n }\n \n const minWidth = currentBreakpointConfig[breakpoint]\n return `(min-width: ${minWidth})`\n}\n\n/**\n * Generate CSS media query for a range of breakpoints\n */\nexport function generateRangeMediaQuery(min: BreakpointKey, max?: BreakpointKey): string {\n const queries: string[] = []\n \n if (min !== 'base') {\n queries.push(`(min-width: ${currentBreakpointConfig[min]})`)\n }\n \n if (max && max !== '2xl') {\n const maxBreakpoints: BreakpointKey[] = ['sm', 'md', 'lg', 'xl', '2xl']\n const maxIndex = maxBreakpoints.indexOf(max)\n if (maxIndex >= 0 && maxIndex < maxBreakpoints.length - 1) {\n const nextBreakpoint = maxBreakpoints[maxIndex + 1]\n const maxWidth = `${breakpointToPixels(nextBreakpoint) - 1}px`\n queries.push(`(max-width: ${maxWidth})`)\n }\n }\n \n return queries.length > 0 ? queries.join(' and ') : ''\n}\n\n/**\n * Get all breakpoints sorted by size\n */\nexport function getSortedBreakpoints(): BreakpointKey[] {\n return ['base', 'sm', 'md', 'lg', 'xl', '2xl']\n}\n\n/**\n * Get breakpoints above a given breakpoint\n */\nexport function getBreakpointsAbove(breakpoint: BreakpointKey): BreakpointKey[] {\n const sorted = getSortedBreakpoints()\n const index = sorted.indexOf(breakpoint)\n return index >= 0 ? sorted.slice(index + 1) : []\n}\n\n/**\n * Get breakpoints below a given breakpoint\n */\nexport function getBreakpointsBelow(breakpoint: BreakpointKey): BreakpointKey[] {\n const sorted = getSortedBreakpoints()\n const index = sorted.indexOf(breakpoint)\n return index > 0 ? sorted.slice(0, index) : []\n}\n\n/**\n * Resolve current breakpoint based on viewport width\n */\nfunction updateCurrentBreakpoint(): void {\n if (typeof window === 'undefined') {\n return\n }\n \n const width = window.innerWidth\n const breakpoints = getSortedBreakpoints().reverse() // Start from largest\n \n for (const breakpoint of breakpoints) {\n if (breakpoint === 'base' || width >= breakpointToPixels(breakpoint)) {\n setCurrentBreakpoint(breakpoint)\n return\n }\n }\n \n setCurrentBreakpoint('base')\n}\n\n/**\n * Update viewport dimensions\n */\nfunction updateViewportDimensions(): void {\n if (typeof window !== 'undefined') {\n setViewportDimensions({\n width: window.innerWidth,\n height: window.innerHeight\n })\n }\n}\n\n/**\n * Validate breakpoint configuration\n */\nfunction validateBreakpointConfig(config: Partial<BreakpointConfig>): void {\n for (const [key, value] of Object.entries(config)) {\n if (!isValidBreakpointKey(key)) {\n throw new Error(`Invalid breakpoint key: \"${key}\". Valid keys are: base, sm, md, lg, xl, 2xl`)\n }\n \n if (typeof value !== 'string') {\n throw new Error(`Breakpoint value for \"${key}\" must be a string (e.g., \"768px\")`)\n }\n \n if (!value.match(/^\\d+(\\.\\d+)?(px|em|rem|%)$/)) {\n throw new Error(`Invalid breakpoint value for \"${key}\": \"${value}\". Must be a valid CSS length (e.g., \"768px\", \"48em\")`)\n }\n }\n \n // Validate that breakpoints are in ascending order\n const sortedKeys = Object.keys(config).filter(isValidBreakpointKey).sort((a, b) => {\n return getBreakpointIndex(a as BreakpointKey) - getBreakpointIndex(b as BreakpointKey)\n })\n \n for (let i = 1; i < sortedKeys.length; i++) {\n const prev = sortedKeys[i - 1] as BreakpointKey\n const current = sortedKeys[i] as BreakpointKey\n const prevValue = config[prev]!\n const currentValue = config[current]!\n \n if (breakpointToPixels(prev) >= parseInt(currentValue, 10)) {\n throw new Error(`Breakpoint \"${current}\" (${currentValue}) must be larger than \"${prev}\" (${prevValue})`)\n }\n }\n}\n\n/**\n * Create common breakpoint configurations\n */\nexport const BreakpointPresets = {\n // Tailwind CSS (default)\n tailwind: {\n sm: '640px',\n md: '768px',\n lg: '1024px',\n xl: '1280px',\n '2xl': '1536px'\n } as BreakpointConfig,\n \n // Bootstrap\n bootstrap: {\n sm: '576px',\n md: '768px',\n lg: '992px',\n xl: '1200px',\n '2xl': '1400px'\n } as BreakpointConfig,\n \n // Material Design\n material: {\n sm: '600px',\n md: '960px',\n lg: '1280px',\n xl: '1920px',\n '2xl': '2560px'\n } as BreakpointConfig,\n \n // Custom mobile-first\n mobileFocus: {\n sm: '480px',\n md: '768px',\n lg: '1024px',\n xl: '1200px',\n '2xl': '1440px'\n } as BreakpointConfig\n} as const"],"names":["currentBreakpointConfig","DEFAULT_BREAKPOINTS","currentBreakpoint","setCurrentBreakpoint","createSignal","viewportDimensions","setViewportDimensions","configureBreakpoints","config","validateBreakpointConfig","updateCurrentBreakpoint","getCurrentBreakpointConfig","getCurrentBreakpoint","getViewportDimensions","initializeResponsiveSystem","updateViewportDimensions","createBreakpointContext","current","dimensions","breakpoint","isBreakpointAbove","isBreakpointBelow","min","max","query","breakpointToPixels","value","getBreakpointIndex","a","b","generateMediaQuery","generateRangeMediaQuery","queries","maxBreakpoints","maxIndex","nextBreakpoint","maxWidth","getSortedBreakpoints","getBreakpointsAbove","sorted","index","getBreakpointsBelow","width","breakpoints","key","isValidBreakpointKey","sortedKeys","i","prev","prevValue","currentValue","BreakpointPresets"],"mappings":"8TAmBA,IAAIA,EAAsD,CAAE,GAAGC,qBAAA,EAK/D,KAAM,CAACC,EAAmBC,CAAoB,EAAIC,EAAAA,aAA4B,MAAM,EAK9E,CAACC,EAAoBC,CAAqB,EAAIF,EAAAA,aAAa,CAAE,MAAO,EAAG,OAAQ,EAAG,EAKjF,SAASG,EAAqBC,EAAyC,CAE5EC,EAAyBD,CAAM,EAG/BR,EAA0B,CACxB,GAAGC,EAAAA,oBACH,GAAGO,CAAA,EAILE,EAAA,EAEI,OAAO,OAAW,KAEpB,OAAO,iBAAiB,SAAUA,CAAuB,CAE7D,CAKO,SAASC,GAAyD,CACvE,MAAO,CAAE,GAAGX,CAAA,CACd,CAKO,SAASY,GAA8C,CAC5D,OAAOV,CACT,CAKO,SAASW,GAAmE,CACjF,OAAOR,CACT,CAKO,SAASS,GAAmC,CAC7C,OAAO,OAAW,MAKtBC,EAAA,EACAL,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EFAULT_BREAKPOINTS as h, isValidBreakpointKey as f } from "./types.js";
|
|
2
|
-
import "../../reactive/cleanup.js";
|
|
3
|
-
import "../../reactive/unified-scheduler.js";
|
|
4
|
-
import { createSignal as g } from "../../reactive/signal.js";
|
|
5
|
-
import "../../reactive/scheduler.js";
|
|
6
|
-
import "../../reactive/theme.js";
|
|
7
|
-
let a = { ...h };
|
|
8
|
-
const [k, x] = g("base"), [B, b] = g({ width: 0, height: 0 });
|
|
9
|
-
function O(t) {
|
|
10
|
-
v(t), a = {
|
|
11
|
-
...h,
|
|
12
|
-
...t
|
|
13
|
-
}, s(), typeof window < "u" && window.addEventListener("resize", s);
|
|
14
|
-
}
|
|
15
|
-
function V() {
|
|
16
|
-
return { ...a };
|
|
17
|
-
}
|
|
18
|
-
function S() {
|
|
19
|
-
return k;
|
|
20
|
-
}
|
|
21
|
-
function A() {
|
|
22
|
-
return B;
|
|
23
|
-
}
|
|
24
|
-
function D() {
|
|
25
|
-
typeof window > "u" || (u(), s(), window.addEventListener("resize", () => {
|
|
26
|
-
u(), s();
|
|
27
|
-
}), window.addEventListener("orientationchange", () => {
|
|
28
|
-
setTimeout(() => {
|
|
29
|
-
u(), s();
|
|
30
|
-
}, 100);
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
function L() {
|
|
34
|
-
const t = k(), n = B();
|
|
35
|
-
return {
|
|
36
|
-
current: t,
|
|
37
|
-
width: n.width,
|
|
38
|
-
height: n.height,
|
|
39
|
-
isAbove: (e) => m(t, e),
|
|
40
|
-
isBelow: (e) => w(t, e),
|
|
41
|
-
isBetween: (e, i) => m(t, e) && w(t, i),
|
|
42
|
-
matches: (e) => window.matchMedia(e).matches
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
function c(t) {
|
|
46
|
-
const n = a[t];
|
|
47
|
-
return n.endsWith("px") ? parseInt(n, 10) : n.endsWith("em") || n.endsWith("rem") ? parseInt(n, 10) * 16 : parseInt(n, 10) || 0;
|
|
48
|
-
}
|
|
49
|
-
function o(t) {
|
|
50
|
-
return ["base", "sm", "md", "lg", "xl", "2xl"].indexOf(t);
|
|
51
|
-
}
|
|
52
|
-
function m(t, n) {
|
|
53
|
-
return o(t) > o(n);
|
|
54
|
-
}
|
|
55
|
-
function w(t, n) {
|
|
56
|
-
return o(t) < o(n);
|
|
57
|
-
}
|
|
58
|
-
function M(t) {
|
|
59
|
-
return t === "base" ? "" : `(min-width: ${a[t]})`;
|
|
60
|
-
}
|
|
61
|
-
function T(t, n) {
|
|
62
|
-
const e = [];
|
|
63
|
-
if (t !== "base" && e.push(`(min-width: ${a[t]})`), n && n !== "2xl") {
|
|
64
|
-
const i = ["sm", "md", "lg", "xl", "2xl"], r = i.indexOf(n);
|
|
65
|
-
if (r >= 0 && r < i.length - 1) {
|
|
66
|
-
const p = i[r + 1], d = `${c(p) - 1}px`;
|
|
67
|
-
e.push(`(max-width: ${d})`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return e.length > 0 ? e.join(" and ") : "";
|
|
71
|
-
}
|
|
72
|
-
function l() {
|
|
73
|
-
return ["base", "sm", "md", "lg", "xl", "2xl"];
|
|
74
|
-
}
|
|
75
|
-
function j(t) {
|
|
76
|
-
const n = l(), e = n.indexOf(t);
|
|
77
|
-
return e >= 0 ? n.slice(e + 1) : [];
|
|
78
|
-
}
|
|
79
|
-
function z(t) {
|
|
80
|
-
const n = l(), e = n.indexOf(t);
|
|
81
|
-
return e > 0 ? n.slice(0, e) : [];
|
|
82
|
-
}
|
|
83
|
-
function s() {
|
|
84
|
-
if (typeof window > "u")
|
|
85
|
-
return;
|
|
86
|
-
const t = window.innerWidth, n = l().reverse();
|
|
87
|
-
for (const e of n)
|
|
88
|
-
if (e === "base" || t >= c(e)) {
|
|
89
|
-
x(e);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
x("base");
|
|
93
|
-
}
|
|
94
|
-
function u() {
|
|
95
|
-
typeof window < "u" && b({
|
|
96
|
-
width: window.innerWidth,
|
|
97
|
-
height: window.innerHeight
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function v(t) {
|
|
101
|
-
for (const [e, i] of Object.entries(t)) {
|
|
102
|
-
if (!f(e))
|
|
103
|
-
throw new Error(`Invalid breakpoint key: "${e}". Valid keys are: base, sm, md, lg, xl, 2xl`);
|
|
104
|
-
if (typeof i != "string")
|
|
105
|
-
throw new Error(`Breakpoint value for "${e}" must be a string (e.g., "768px")`);
|
|
106
|
-
if (!i.match(/^\d+(\.\d+)?(px|em|rem|%)$/))
|
|
107
|
-
throw new Error(`Invalid breakpoint value for "${e}": "${i}". Must be a valid CSS length (e.g., "768px", "48em")`);
|
|
108
|
-
}
|
|
109
|
-
const n = Object.keys(t).filter(f).sort((e, i) => o(e) - o(i));
|
|
110
|
-
for (let e = 1; e < n.length; e++) {
|
|
111
|
-
const i = n[e - 1], r = n[e], p = t[i], d = t[r];
|
|
112
|
-
if (c(i) >= parseInt(d, 10))
|
|
113
|
-
throw new Error(`Breakpoint "${r}" (${d}) must be larger than "${i}" (${p})`);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
const K = {
|
|
117
|
-
// Tailwind CSS (default)
|
|
118
|
-
tailwind: {
|
|
119
|
-
sm: "640px",
|
|
120
|
-
md: "768px",
|
|
121
|
-
lg: "1024px",
|
|
122
|
-
xl: "1280px",
|
|
123
|
-
"2xl": "1536px"
|
|
124
|
-
},
|
|
125
|
-
// Bootstrap
|
|
126
|
-
bootstrap: {
|
|
127
|
-
sm: "576px",
|
|
128
|
-
md: "768px",
|
|
129
|
-
lg: "992px",
|
|
130
|
-
xl: "1200px",
|
|
131
|
-
"2xl": "1400px"
|
|
132
|
-
},
|
|
133
|
-
// Material Design
|
|
134
|
-
material: {
|
|
135
|
-
sm: "600px",
|
|
136
|
-
md: "960px",
|
|
137
|
-
lg: "1280px",
|
|
138
|
-
xl: "1920px",
|
|
139
|
-
"2xl": "2560px"
|
|
140
|
-
},
|
|
141
|
-
// Custom mobile-first
|
|
142
|
-
mobileFocus: {
|
|
143
|
-
sm: "480px",
|
|
144
|
-
md: "768px",
|
|
145
|
-
lg: "1024px",
|
|
146
|
-
xl: "1200px",
|
|
147
|
-
"2xl": "1440px"
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
export {
|
|
151
|
-
K as BreakpointPresets,
|
|
152
|
-
c as breakpointToPixels,
|
|
153
|
-
O as configureBreakpoints,
|
|
154
|
-
L as createBreakpointContext,
|
|
155
|
-
M as generateMediaQuery,
|
|
156
|
-
T as generateRangeMediaQuery,
|
|
157
|
-
o as getBreakpointIndex,
|
|
158
|
-
j as getBreakpointsAbove,
|
|
159
|
-
z as getBreakpointsBelow,
|
|
160
|
-
S as getCurrentBreakpoint,
|
|
161
|
-
V as getCurrentBreakpointConfig,
|
|
162
|
-
l as getSortedBreakpoints,
|
|
163
|
-
A as getViewportDimensions,
|
|
164
|
-
D as initializeResponsiveSystem,
|
|
165
|
-
m as isBreakpointAbove,
|
|
166
|
-
w as isBreakpointBelow
|
|
167
|
-
};
|
|
168
|
-
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoints.js","sources":["../../../src/modifiers/responsive/breakpoints.ts"],"sourcesContent":["/**\n * Breakpoint Configuration System\n * \n * Manages responsive breakpoint configuration, validation, and utilities.\n * Supports both default Tailwind-inspired breakpoints and custom configurations.\n */\n\nimport { \n BreakpointKey, \n BreakpointConfig, \n DEFAULT_BREAKPOINTS,\n BreakpointContext,\n isValidBreakpointKey\n} from './types'\nimport { createSignal, Signal } from '../../reactive'\n\n/**\n * Global breakpoint configuration state\n */\nlet currentBreakpointConfig: Required<BreakpointConfig> = { ...DEFAULT_BREAKPOINTS }\n\n/**\n * Current active breakpoint signal\n */\nconst [currentBreakpoint, setCurrentBreakpoint] = createSignal<BreakpointKey>('base')\n\n/**\n * Current viewport dimensions signal\n */\nconst [viewportDimensions, setViewportDimensions] = createSignal({ width: 0, height: 0 })\n\n/**\n * Configure global breakpoints for the application\n */\nexport function configureBreakpoints(config: Partial<BreakpointConfig>): void {\n // Validate breakpoint configuration\n validateBreakpointConfig(config)\n \n // Update global configuration\n currentBreakpointConfig = {\n ...DEFAULT_BREAKPOINTS,\n ...config\n }\n \n // Re-evaluate current breakpoint\n updateCurrentBreakpoint()\n \n if (typeof window !== 'undefined') {\n // Update breakpoint on window resize\n window.addEventListener('resize', updateCurrentBreakpoint)\n }\n}\n\n/**\n * Get the current breakpoint configuration\n */\nexport function getCurrentBreakpointConfig(): Required<BreakpointConfig> {\n return { ...currentBreakpointConfig }\n}\n\n/**\n * Get the current active breakpoint\n */\nexport function getCurrentBreakpoint(): Signal<BreakpointKey> {\n return currentBreakpoint as Signal<BreakpointKey>\n}\n\n/**\n * Get current viewport dimensions\n */\nexport function getViewportDimensions(): Signal<{ width: number; height: number }> {\n return viewportDimensions as Signal<{ width: number; height: number }>\n}\n\n/**\n * Initialize the responsive system (should be called once on app startup)\n */\nexport function initializeResponsiveSystem(): void {\n if (typeof window === 'undefined') {\n return // Skip on server-side\n }\n \n // Set initial viewport dimensions\n updateViewportDimensions()\n updateCurrentBreakpoint()\n \n // Listen for window resize events\n window.addEventListener('resize', () => {\n updateViewportDimensions()\n updateCurrentBreakpoint()\n })\n \n // Listen for orientation changes\n window.addEventListener('orientationchange', () => {\n // Delay to ensure accurate dimensions after orientation change\n setTimeout(() => {\n updateViewportDimensions()\n updateCurrentBreakpoint()\n }, 100)\n })\n}\n\n/**\n * Create a breakpoint context for utilities\n */\nexport function createBreakpointContext(): BreakpointContext {\n const current = currentBreakpoint()\n const dimensions = viewportDimensions()\n \n return {\n current,\n width: dimensions.width,\n height: dimensions.height,\n isAbove: (breakpoint: BreakpointKey) => isBreakpointAbove(current, breakpoint),\n isBelow: (breakpoint: BreakpointKey) => isBreakpointBelow(current, breakpoint),\n isBetween: (min: BreakpointKey, max: BreakpointKey) => \n isBreakpointAbove(current, min) && isBreakpointBelow(current, max),\n matches: (query: string) => window.matchMedia(query).matches\n }\n}\n\n/**\n * Convert breakpoint value to numeric pixels for comparison\n */\nexport function breakpointToPixels(breakpoint: BreakpointKey): number {\n const value = currentBreakpointConfig[breakpoint]\n \n // Handle different CSS units\n if (value.endsWith('px')) {\n return parseInt(value, 10)\n } else if (value.endsWith('em')) {\n return parseInt(value, 10) * 16 // Assume 16px base font size\n } else if (value.endsWith('rem')) {\n return parseInt(value, 10) * 16 // Assume 16px base font size\n }\n \n // Fallback to direct number conversion\n return parseInt(value, 10) || 0\n}\n\n/**\n * Get breakpoint index for comparison (base = 0, sm = 1, etc.)\n */\nexport function getBreakpointIndex(breakpoint: BreakpointKey): number {\n const order: BreakpointKey[] = ['base', 'sm', 'md', 'lg', 'xl', '2xl']\n return order.indexOf(breakpoint)\n}\n\n/**\n * Check if breakpoint A is above breakpoint B\n */\nexport function isBreakpointAbove(a: BreakpointKey, b: BreakpointKey): boolean {\n return getBreakpointIndex(a) > getBreakpointIndex(b)\n}\n\n/**\n * Check if breakpoint A is below breakpoint B\n */\nexport function isBreakpointBelow(a: BreakpointKey, b: BreakpointKey): boolean {\n return getBreakpointIndex(a) < getBreakpointIndex(b)\n}\n\n/**\n * Generate CSS media query string for a breakpoint\n */\nexport function generateMediaQuery(breakpoint: BreakpointKey): string {\n if (breakpoint === 'base') {\n return '' // No media query for base (mobile-first)\n }\n \n const minWidth = currentBreakpointConfig[breakpoint]\n return `(min-width: ${minWidth})`\n}\n\n/**\n * Generate CSS media query for a range of breakpoints\n */\nexport function generateRangeMediaQuery(min: BreakpointKey, max?: BreakpointKey): string {\n const queries: string[] = []\n \n if (min !== 'base') {\n queries.push(`(min-width: ${currentBreakpointConfig[min]})`)\n }\n \n if (max && max !== '2xl') {\n const maxBreakpoints: BreakpointKey[] = ['sm', 'md', 'lg', 'xl', '2xl']\n const maxIndex = maxBreakpoints.indexOf(max)\n if (maxIndex >= 0 && maxIndex < maxBreakpoints.length - 1) {\n const nextBreakpoint = maxBreakpoints[maxIndex + 1]\n const maxWidth = `${breakpointToPixels(nextBreakpoint) - 1}px`\n queries.push(`(max-width: ${maxWidth})`)\n }\n }\n \n return queries.length > 0 ? queries.join(' and ') : ''\n}\n\n/**\n * Get all breakpoints sorted by size\n */\nexport function getSortedBreakpoints(): BreakpointKey[] {\n return ['base', 'sm', 'md', 'lg', 'xl', '2xl']\n}\n\n/**\n * Get breakpoints above a given breakpoint\n */\nexport function getBreakpointsAbove(breakpoint: BreakpointKey): BreakpointKey[] {\n const sorted = getSortedBreakpoints()\n const index = sorted.indexOf(breakpoint)\n return index >= 0 ? sorted.slice(index + 1) : []\n}\n\n/**\n * Get breakpoints below a given breakpoint\n */\nexport function getBreakpointsBelow(breakpoint: BreakpointKey): BreakpointKey[] {\n const sorted = getSortedBreakpoints()\n const index = sorted.indexOf(breakpoint)\n return index > 0 ? sorted.slice(0, index) : []\n}\n\n/**\n * Resolve current breakpoint based on viewport width\n */\nfunction updateCurrentBreakpoint(): void {\n if (typeof window === 'undefined') {\n return\n }\n \n const width = window.innerWidth\n const breakpoints = getSortedBreakpoints().reverse() // Start from largest\n \n for (const breakpoint of breakpoints) {\n if (breakpoint === 'base' || width >= breakpointToPixels(breakpoint)) {\n setCurrentBreakpoint(breakpoint)\n return\n }\n }\n \n setCurrentBreakpoint('base')\n}\n\n/**\n * Update viewport dimensions\n */\nfunction updateViewportDimensions(): void {\n if (typeof window !== 'undefined') {\n setViewportDimensions({\n width: window.innerWidth,\n height: window.innerHeight\n })\n }\n}\n\n/**\n * Validate breakpoint configuration\n */\nfunction validateBreakpointConfig(config: Partial<BreakpointConfig>): void {\n for (const [key, value] of Object.entries(config)) {\n if (!isValidBreakpointKey(key)) {\n throw new Error(`Invalid breakpoint key: \"${key}\". Valid keys are: base, sm, md, lg, xl, 2xl`)\n }\n \n if (typeof value !== 'string') {\n throw new Error(`Breakpoint value for \"${key}\" must be a string (e.g., \"768px\")`)\n }\n \n if (!value.match(/^\\d+(\\.\\d+)?(px|em|rem|%)$/)) {\n throw new Error(`Invalid breakpoint value for \"${key}\": \"${value}\". Must be a valid CSS length (e.g., \"768px\", \"48em\")`)\n }\n }\n \n // Validate that breakpoints are in ascending order\n const sortedKeys = Object.keys(config).filter(isValidBreakpointKey).sort((a, b) => {\n return getBreakpointIndex(a as BreakpointKey) - getBreakpointIndex(b as BreakpointKey)\n })\n \n for (let i = 1; i < sortedKeys.length; i++) {\n const prev = sortedKeys[i - 1] as BreakpointKey\n const current = sortedKeys[i] as BreakpointKey\n const prevValue = config[prev]!\n const currentValue = config[current]!\n \n if (breakpointToPixels(prev) >= parseInt(currentValue, 10)) {\n throw new Error(`Breakpoint \"${current}\" (${currentValue}) must be larger than \"${prev}\" (${prevValue})`)\n }\n }\n}\n\n/**\n * Create common breakpoint configurations\n */\nexport const BreakpointPresets = {\n // Tailwind CSS (default)\n tailwind: {\n sm: '640px',\n md: '768px',\n lg: '1024px',\n xl: '1280px',\n '2xl': '1536px'\n } as BreakpointConfig,\n \n // Bootstrap\n bootstrap: {\n sm: '576px',\n md: '768px',\n lg: '992px',\n xl: '1200px',\n '2xl': '1400px'\n } as BreakpointConfig,\n \n // Material Design\n material: {\n sm: '600px',\n md: '960px',\n lg: '1280px',\n xl: '1920px',\n '2xl': '2560px'\n } as BreakpointConfig,\n \n // Custom mobile-first\n mobileFocus: {\n sm: '480px',\n md: '768px',\n lg: '1024px',\n xl: '1200px',\n '2xl': '1440px'\n } as BreakpointConfig\n} as const"],"names":["currentBreakpointConfig","DEFAULT_BREAKPOINTS","currentBreakpoint","setCurrentBreakpoint","createSignal","viewportDimensions","setViewportDimensions","configureBreakpoints","config","validateBreakpointConfig","updateCurrentBreakpoint","getCurrentBreakpointConfig","getCurrentBreakpoint","getViewportDimensions","initializeResponsiveSystem","updateViewportDimensions","createBreakpointContext","current","dimensions","breakpoint","isBreakpointAbove","isBreakpointBelow","min","max","query","breakpointToPixels","value","getBreakpointIndex","a","b","generateMediaQuery","generateRangeMediaQuery","queries","maxBreakpoints","maxIndex","nextBreakpoint","maxWidth","getSortedBreakpoints","getBreakpointsAbove","sorted","index","getBreakpointsBelow","width","breakpoints","key","isValidBreakpointKey","sortedKeys","i","prev","prevValue","currentValue","BreakpointPresets"],"mappings":";;;;;;AAmBA,IAAIA,IAAsD,EAAE,GAAGC,EAAA;AAK/D,MAAM,CAACC,GAAmBC,CAAoB,IAAIC,EAA4B,MAAM,GAK9E,CAACC,GAAoBC,CAAqB,IAAIF,EAAa,EAAE,OAAO,GAAG,QAAQ,GAAG;AAKjF,SAASG,EAAqBC,GAAyC;AAE5E,EAAAC,EAAyBD,CAAM,GAG/BR,IAA0B;AAAA,IACxB,GAAGC;AAAA,IACH,GAAGO;AAAA,EAAA,GAILE,EAAA,GAEI,OAAO,SAAW,OAEpB,OAAO,iBAAiB,UAAUA,CAAuB;AAE7D;AAKO,SAASC,IAAyD;AACvE,SAAO,EAAE,GAAGX,EAAA;AACd;AAKO,SAASY,IAA8C;AAC5D,SAAOV;AACT;AAKO,SAASW,IAAmE;AACjF,SAAOR;AACT;AAKO,SAASS,IAAmC;AACjD,EAAI,OAAO,SAAW,QAKtBC,EAAA,GACAL,EAAA,GAGA,OAAO,iBAAiB,UAAU,MAAM;AACtC,IAAAK,EAAA,GACAL,EAAA;AAAA,EACF,CAAC,GAGD,OAAO,iBAAiB,qBAAqB,MAAM;AAEjD,eAAW,MAAM;AACf,MAAAK,EAAA,GACAL,EAAA;AAAA,IACF,GAAG,GAAG;AAAA,EACR,CAAC;AACH;AAKO,SAASM,IAA6C;AAC3D,QAAMC,IAAUf,EAAA,GACVgB,IAAab,EAAA;AAEnB,SAAO;AAAA,IACL,SAAAY;AAAA,IACA,OAAOC,EAAW;AAAA,IAClB,QAAQA,EAAW;AAAA,IACnB,SAAS,CAACC,MAA8BC,EAAkBH,GAASE,CAAU;AAAA,IAC7E,SAAS,CAACA,MAA8BE,EAAkBJ,GAASE,CAAU;AAAA,IAC7E,WAAW,CAACG,GAAoBC,MAC9BH,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,EAE3H;AAGA,QAAMoB,IAAa,OAAO,KAAKtC,CAAM,EAAE,OAAOqC,CAAoB,EAAE,KAAK,CAACjB,GAAGC,MACpEF,EAAmBC,CAAkB,IAAID,EAAmBE,CAAkB,CACtF;AAED,WAASkB,IAAI,GAAGA,IAAID,EAAW,QAAQC,KAAK;AAC1C,UAAMC,IAAOF,EAAWC,IAAI,CAAC,GACvB9B,IAAU6B,EAAWC,CAAC,GACtBE,IAAYzC,EAAOwC,CAAI,GACvBE,IAAe1C,EAAOS,CAAO;AAEnC,QAAIQ,EAAmBuB,CAAI,KAAK,SAASE,GAAc,EAAE;AACvD,YAAM,IAAI,MAAM,eAAejC,CAAO,MAAMiC,CAAY,0BAA0BF,CAAI,MAAMC,CAAS,GAAG;AAAA,EAE5G;AACF;AAKO,MAAME,IAAoB;AAAA;AAAA,EAE/B,UAAU;AAAA,IACR,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,EAAA;AAAA;AAAA,EAIT,WAAW;AAAA,IACT,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,EAAA;AAAA;AAAA,EAIT,UAAU;AAAA,IACR,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,EAAA;AAAA;AAAA,EAIT,aAAa;AAAA,IACX,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,EAAA;AAEX;"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./types.cjs"),h=require("./breakpoints.cjs");var m=Object.defineProperty,$=(l,e,t)=>e in l?m(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t,f=(l,e,t)=>$(l,typeof e!="symbol"?e+"":e,t);class g{constructor(e){f(this,"options"),this.options={generateMinified:!1,includeComments:!0,optimizeOutput:!0,mobileFirst:!0,...e}}generateResponsiveCSS(e){const t=[],s=[],r={};let o=!1;for(const[n,c]of Object.entries(e))if(y.isResponsiveValue(c)){o=!0;const i=this.generatePropertyMediaQueries(n,c);t.push(...i.mediaQueries),i.baseStyles&&Object.assign(r,i.baseStyles)}else r[this.toCSSPropertyName(n)]=this.formatCSSValue(n,c);return s.push(...this.generateCSSRules(t,r)),{cssRules:s,mediaQueries:t,fallbackStyles:r,hasResponsiveStyles:o}}generatePropertyMediaQueries(e,t){const s=[],r={},o=h.getSortedBreakpoints();for(const n of o){const c=t[n];if(c===void 0)continue;const i=this.toCSSPropertyName(e),u=this.formatCSSValue(e,c);if(n==="base")r[i]=u;else{const a=h.generateMediaQuery(n),d={[i]:u};s.push({breakpoint:n,query:a,styles:d,selector:this.options.selector})}}return{mediaQueries:s,baseStyles:Object.keys(r).length>0?r:void 0}}generateCSSRules(e,t){const s=[];if(Object.keys(t).length>0){const o=this.generateCSSRule(this.options.selector,t);s.push(o)}const r=this.groupQueriesByMediaQuery(e);for(const[o,n]of Object.entries(r)){if(o==="")continue;const c={};for(const u of n)Object.assign(c,u.styles);const i=this.generateMediaQueryRule(o,this.options.selector,c);s.push(i)}return s}groupQueriesByMediaQuery(e){const t={};for(const s of e)t[s.query]||(t[s.query]=[]),t[s.query].push(s);return t}generateCSSRule(e,t){const{generateMinified:s,includeComments:r}=this.options,o=s?"":" ",n=s?"":`
|
|
2
|
-
`,c=s?"":" ";let i=`${e}${c}{${n}`;for(const[u,a]of Object.entries(t))i+=`${o}${u}:${c}${a};${n}`;return i+=`}${n}`,r&&!s&&(i=`/* Base styles (mobile-first) */${n}${i}`),i}generateMediaQueryRule(e,t,s){const{generateMinified:r,includeComments:o}=this.options,n=r?"":" ",c=r?"":" ",i=r?"":`
|
|
3
|
-
`,u=r?"":" ";let a=`@media ${e}${u}{${i}`;a+=`${n}${t}${u}{${i}`;for(const[d,p]of Object.entries(s))a+=`${c}${d}:${u}${p};${i}`;return a+=`${n}}${i}`,a+=`}${i}`,o&&!r&&(a=`/* ${this.getBreakpointFromQuery(e)} styles */${i}${a}`),a}toCSSProperty(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}formatCSSValue(e,t){if(t==null)return"inherit";if(typeof t=="number"){const s=["opacity","z-index","font-weight","line-height","flex-grow","flex-shrink","order","grid-column-start","grid-column-end","grid-row-start","grid-row-end"],r=this.toCSSProperty(e);if(s.includes(r))return this.addImportantIfNeeded(e,t.toString());if(["width","height","min-width","max-width","min-height","max-height","padding","margin","border-width","border-radius","top","right","bottom","left","font-size","letter-spacing","text-indent"].some(n=>r.includes(n)))return this.addImportantIfNeeded(e,`${t}px`)}return this.addImportantIfNeeded(e,t.toString())}addImportantIfNeeded(e,t){const s=["flexDirection","flex-direction","justifyContent","justify-content","alignItems","align-items","display"],r=this.toCSSProperty(e);return s.includes(e)||s.includes(r)?`${t} !important`:t}toCSSPropertyName(e){return this.toCSSProperty(e)}getBreakpointFromQuery(e){const t=h.getCurrentBreakpointConfig();for(const[s,r]of Object.entries(t))if(e.includes(r))return s;return"custom"}}function b(l,e,t,s){if(!y.isResponsiveValue(t)){const c=e.replace(/[A-Z]/g,u=>`-${u.toLowerCase()}`),i=typeof t=="number"?`${t}px`:t.toString();return[`${l} { ${c}: ${i}; }`]}const r=new g({selector:l,...s}),o={[e]:t};return r.generateResponsiveCSS(o).cssRules}function C(l,e,t){const{generateMinified:s=!1}=t||{},r=s?"":" ",o=s?"":`
|
|
4
|
-
`,n=s?"":" ";let c=`@media ${e.query}${n}{${o}`;c+=`${r}${l}${n}{${o}`;for(const[i,u]of Object.entries(e.styles)){const a=i.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`),d=typeof u=="number"?`${u}px`:u.toString();c+=`${r}${r}${a}:${n}${d};${o}`}return c+=`${r}}${o}`,c+=`}${o}`,c}class S{static getStyleSheet(){if(this.styleSheet)return this.styleSheet;const e=document.createElement("style");return e.setAttribute("data-tachui-responsive","true"),document.head.appendChild(e),this.styleSheet=e.sheet,this.styleSheet}static injectCSS(e){if(typeof document>"u")return;const t=this.getStyleSheet();for(const s of e)if(!this.injectedRules.has(s))try{t.insertRule(s,t.cssRules.length),this.injectedRules.add(s)}catch(r){console.warn("Failed to inject CSS rule:",s,r)}}static clearCSS(){if(this.styleSheet){for(;this.styleSheet.cssRules.length>0;)this.styleSheet.deleteRule(0);this.injectedRules.clear()}}static hasRule(e){return this.injectedRules.has(e)}}f(S,"styleSheet",null);f(S,"injectedRules",new Set);exports.CSSInjector=S;exports.ResponsiveCSSGenerator=g;exports.generateCustomMediaQuery=C;exports.generateResponsiveProperty=b;
|
|
5
|
-
//# sourceMappingURL=css-generator.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css-generator.cjs","sources":["../../../src/modifiers/responsive/css-generator.ts"],"sourcesContent":["/**\n * Responsive CSS Generation Engine\n * \n * Generates optimized CSS media queries from responsive modifier configurations.\n * Supports mobile-first design patterns and advanced media query features.\n */\n\nimport {\n BreakpointKey,\n ResponsiveValue,\n ResponsiveStyleConfig,\n MediaQueryConfig,\n GeneratedMediaQuery,\n ResponsiveModifierResult,\n isResponsiveValue\n} from './types'\nimport {\n generateMediaQuery,\n getCurrentBreakpointConfig,\n getSortedBreakpoints\n} from './breakpoints'\n\n/**\n * CSS generation options\n */\nexport interface CSSGenerationOptions {\n selector: string // CSS selector for the element\n generateMinified?: boolean // Generate minified CSS\n includeComments?: boolean // Include helpful comments\n optimizeOutput?: boolean // Optimize and deduplicate CSS\n mobileFirst?: boolean // Use mobile-first approach (default: true)\n}\n\n/**\n * Main CSS generation class\n */\nexport class ResponsiveCSSGenerator {\n private options: Required<CSSGenerationOptions>\n \n constructor(options: CSSGenerationOptions) {\n this.options = {\n generateMinified: false,\n includeComments: true,\n optimizeOutput: true,\n mobileFirst: true,\n ...options\n }\n }\n \n /**\n * Generate complete responsive CSS from a style configuration\n */\n generateResponsiveCSS(config: ResponsiveStyleConfig): ResponsiveModifierResult {\n const mediaQueries: GeneratedMediaQuery[] = []\n const cssRules: string[] = []\n const fallbackStyles: Record<string, string | number> = {}\n let hasResponsiveStyles = false\n \n // Process each property in the configuration\n for (const [property, value] of Object.entries(config)) {\n if (isResponsiveValue(value)) {\n hasResponsiveStyles = true\n const result = this.generatePropertyMediaQueries(property, value)\n mediaQueries.push(...result.mediaQueries)\n \n // Add base styles to fallback\n if (result.baseStyles) {\n Object.assign(fallbackStyles, result.baseStyles)\n }\n } else {\n // Non-responsive property - add to fallback styles\n fallbackStyles[this.toCSSPropertyName(property)] = this.formatCSSValue(property, value)\n }\n }\n \n // Generate CSS rules from media queries\n cssRules.push(...this.generateCSSRules(mediaQueries, fallbackStyles))\n \n return {\n cssRules,\n mediaQueries,\n fallbackStyles,\n hasResponsiveStyles\n }\n }\n \n /**\n * Generate media queries for a single property\n */\n private generatePropertyMediaQueries(\n property: string, \n value: Partial<Record<BreakpointKey, any>>\n ): { mediaQueries: GeneratedMediaQuery[]; baseStyles?: Record<string, string | number> } {\n const mediaQueries: GeneratedMediaQuery[] = []\n const baseStyles: Record<string, string | number> = {}\n const sortedBreakpoints = getSortedBreakpoints()\n \n for (const breakpoint of sortedBreakpoints) {\n const breakpointValue = value[breakpoint]\n if (breakpointValue === undefined) continue\n \n const cssProperty = this.toCSSPropertyName(property)\n const cssValue = this.formatCSSValue(property, breakpointValue)\n \n if (breakpoint === 'base') {\n // Base styles (no media query needed for mobile-first)\n baseStyles[cssProperty] = cssValue\n } else {\n // Generate media query for this breakpoint\n const query = generateMediaQuery(breakpoint)\n const styles = { [cssProperty]: cssValue }\n \n mediaQueries.push({\n breakpoint,\n query,\n styles,\n selector: this.options.selector\n })\n }\n }\n \n return { mediaQueries, baseStyles: Object.keys(baseStyles).length > 0 ? baseStyles : undefined }\n }\n \n /**\n * Generate CSS rules from media queries and base styles\n */\n private generateCSSRules(\n mediaQueries: GeneratedMediaQuery[], \n baseStyles: Record<string, string | number>\n ): string[] {\n const rules: string[] = []\n \n // Generate base styles rule (mobile-first)\n if (Object.keys(baseStyles).length > 0) {\n const baseRule = this.generateCSSRule(this.options.selector, baseStyles)\n rules.push(baseRule)\n }\n \n // Generate media query rules\n const groupedQueries = this.groupQueriesByMediaQuery(mediaQueries)\n \n for (const [query, queryMediaQueries] of Object.entries(groupedQueries)) {\n if (query === '') continue // Skip empty queries (base styles)\n \n // Combine all styles for this media query\n const combinedStyles: Record<string, string | number> = {}\n for (const mq of queryMediaQueries) {\n Object.assign(combinedStyles, mq.styles)\n }\n \n const mediaRule = this.generateMediaQueryRule(query, this.options.selector, combinedStyles)\n rules.push(mediaRule)\n }\n \n return rules\n }\n \n /**\n * Group media queries by their query string for optimization\n */\n private groupQueriesByMediaQuery(mediaQueries: GeneratedMediaQuery[]): Record<string, GeneratedMediaQuery[]> {\n const grouped: Record<string, GeneratedMediaQuery[]> = {}\n \n for (const mq of mediaQueries) {\n if (!grouped[mq.query]) {\n grouped[mq.query] = []\n }\n grouped[mq.query].push(mq)\n }\n \n return grouped\n }\n \n /**\n * Generate a single CSS rule\n */\n private generateCSSRule(selector: string, styles: Record<string, string | number>): string {\n const { generateMinified, includeComments } = this.options\n const indent = generateMinified ? '' : ' '\n const newline = generateMinified ? '' : '\\n'\n const space = generateMinified ? '' : ' '\n \n let rule = `${selector}${space}{${newline}`\n \n for (const [property, value] of Object.entries(styles)) {\n rule += `${indent}${property}:${space}${value};${newline}`\n }\n \n rule += `}${newline}`\n \n if (includeComments && !generateMinified) {\n rule = `/* Base styles (mobile-first) */${newline}${rule}`\n }\n \n return rule\n }\n \n /**\n * Generate a CSS media query rule\n */\n private generateMediaQueryRule(\n query: string, \n selector: string, \n styles: Record<string, string | number>\n ): string {\n const { generateMinified, includeComments } = this.options\n const indent = generateMinified ? '' : ' '\n const doubleIndent = generateMinified ? '' : ' '\n const newline = generateMinified ? '' : '\\n'\n const space = generateMinified ? '' : ' '\n \n let rule = `@media ${query}${space}{${newline}`\n rule += `${indent}${selector}${space}{${newline}`\n \n for (const [property, value] of Object.entries(styles)) {\n rule += `${doubleIndent}${property}:${space}${value};${newline}`\n }\n \n rule += `${indent}}${newline}`\n rule += `}${newline}`\n \n if (includeComments && !generateMinified) {\n const breakpoint = this.getBreakpointFromQuery(query)\n rule = `/* ${breakpoint} styles */${newline}${rule}`\n }\n \n return rule\n }\n \n /**\n * Convert camelCase property to CSS kebab-case\n */\n private toCSSProperty(property: string): string {\n return property.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`)\n }\n \n /**\n * Format CSS value with appropriate units and validation\n */\n private formatCSSValue(property: string, value: any): string {\n if (value === null || value === undefined) {\n return 'inherit'\n }\n \n // Handle numeric values that need units\n if (typeof value === 'number') {\n const unitlessProperties = [\n 'opacity', 'z-index', 'font-weight', 'line-height', \n 'flex-grow', 'flex-shrink', 'order', 'grid-column-start',\n 'grid-column-end', 'grid-row-start', 'grid-row-end'\n ]\n \n const cssProperty = this.toCSSProperty(property)\n if (unitlessProperties.includes(cssProperty)) {\n return this.addImportantIfNeeded(property, value.toString())\n }\n \n // Add px unit for dimension properties\n const dimensionProperties = [\n 'width', 'height', 'min-width', 'max-width', 'min-height', 'max-height',\n 'padding', 'margin', 'border-width', 'border-radius', 'top', 'right', \n 'bottom', 'left', 'font-size', 'letter-spacing', 'text-indent'\n ]\n \n if (dimensionProperties.some(prop => cssProperty.includes(prop))) {\n return this.addImportantIfNeeded(property, `${value}px`)\n }\n }\n \n return this.addImportantIfNeeded(property, value.toString())\n }\n\n /**\n * Add !important for properties that need to override base component styles\n */\n private addImportantIfNeeded(property: string, value: string): string {\n const conflictingProperties = [\n 'flexDirection', 'flex-direction',\n 'justifyContent', 'justify-content', \n 'alignItems', 'align-items',\n 'display'\n ]\n \n const cssProperty = this.toCSSProperty(property)\n if (conflictingProperties.includes(property) || conflictingProperties.includes(cssProperty)) {\n return `${value} !important`\n }\n \n return value\n }\n\n /**\n * Convert property name to appropriate CSS property (including custom properties)\n */\n private toCSSPropertyName(property: string): string {\n return this.toCSSProperty(property)\n }\n \n /**\n * Extract breakpoint name from media query for comments\n */\n private getBreakpointFromQuery(query: string): string {\n const breakpointConfig = getCurrentBreakpointConfig()\n \n for (const [breakpoint, value] of Object.entries(breakpointConfig)) {\n if (query.includes(value)) {\n return breakpoint\n }\n }\n \n return 'custom'\n }\n}\n\n/**\n * Utility function to generate responsive CSS for a single property\n */\nexport function generateResponsiveProperty(\n selector: string,\n property: string,\n value: ResponsiveValue<any>,\n options?: Partial<CSSGenerationOptions>\n): string[] {\n if (!isResponsiveValue(value)) {\n // Non-responsive value - return simple CSS rule\n const cssProperty = property.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`)\n const cssValue = typeof value === 'number' ? `${value}px` : value.toString()\n return [`${selector} { ${cssProperty}: ${cssValue}; }`]\n }\n \n const generator = new ResponsiveCSSGenerator({ selector, ...options })\n const config = { [property]: value }\n const result = generator.generateResponsiveCSS(config)\n \n return result.cssRules\n}\n\n/**\n * Utility function to generate media query for custom conditions\n */\nexport function generateCustomMediaQuery(\n selector: string,\n mediaQueryConfig: MediaQueryConfig,\n options?: Partial<CSSGenerationOptions>\n): string {\n const { generateMinified = false } = options || {}\n const indent = generateMinified ? '' : ' '\n const newline = generateMinified ? '' : '\\n'\n const space = generateMinified ? '' : ' '\n \n let rule = `@media ${mediaQueryConfig.query}${space}{${newline}`\n rule += `${indent}${selector}${space}{${newline}`\n \n for (const [property, value] of Object.entries(mediaQueryConfig.styles)) {\n const cssProperty = property.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`)\n const cssValue = typeof value === 'number' ? `${value}px` : value.toString()\n rule += `${indent}${indent}${cssProperty}:${space}${cssValue};${newline}`\n }\n \n rule += `${indent}}${newline}`\n rule += `}${newline}`\n \n return rule\n}\n\n/**\n * CSS injection utilities for runtime application\n */\nexport class CSSInjector {\n private static styleSheet: CSSStyleSheet | null = null\n private static injectedRules = new Set<string>()\n \n /**\n * Get or create the tachUI responsive stylesheet\n */\n private static getStyleSheet(): CSSStyleSheet {\n if (this.styleSheet) {\n return this.styleSheet\n }\n \n const style = document.createElement('style')\n style.setAttribute('data-tachui-responsive', 'true')\n document.head.appendChild(style)\n \n this.styleSheet = style.sheet as CSSStyleSheet\n return this.styleSheet\n }\n\n /**\n * Inject CSS rules into the document\n */\n static injectCSS(rules: string[]): void {\n if (typeof document === 'undefined') {\n return // Skip on server-side\n }\n \n const styleSheet = this.getStyleSheet()\n \n for (const rule of rules) {\n if (this.injectedRules.has(rule)) {\n continue // Skip duplicate rules\n }\n \n try {\n styleSheet.insertRule(rule, styleSheet.cssRules.length)\n this.injectedRules.add(rule)\n } catch (error) {\n console.warn('Failed to inject CSS rule:', rule, error)\n }\n }\n }\n \n /**\n * Clear all injected responsive CSS\n */\n static clearCSS(): void {\n if (this.styleSheet) {\n while (this.styleSheet.cssRules.length > 0) {\n this.styleSheet.deleteRule(0)\n }\n this.injectedRules.clear()\n }\n }\n \n /**\n * Check if a rule has been injected\n */\n static hasRule(rule: string): boolean {\n return this.injectedRules.has(rule)\n }\n}"],"names":["ResponsiveCSSGenerator","options","__publicField","config","mediaQueries","cssRules","fallbackStyles","hasResponsiveStyles","property","value","isResponsiveValue","result","baseStyles","sortedBreakpoints","getSortedBreakpoints","breakpoint","breakpointValue","cssProperty","cssValue","query","generateMediaQuery","styles","rules","baseRule","groupedQueries","queryMediaQueries","combinedStyles","mq","mediaRule","grouped","selector","generateMinified","includeComments","indent","newline","space","rule","doubleIndent","match","unitlessProperties","prop","conflictingProperties","breakpointConfig","getCurrentBreakpointConfig","generateResponsiveProperty","generator","generateCustomMediaQuery","mediaQueryConfig","CSSInjector","style","styleSheet","error"],"mappings":"0SAoCO,MAAMA,CAAuB,CAGlC,YAAYC,EAA+B,CAF3CC,EAAA,KAAQ,SAAA,EAGN,KAAK,QAAU,CACb,iBAAkB,GAClB,gBAAiB,GACjB,eAAgB,GAChB,Y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AI,KAAK,WAAY,CACnB,KAAO,KAAK,WAAW,SAAS,OAAS,GACvC,KAAK,WAAW,WAAW,CAAC,EAE9B,KAAK,cAAc,MAAA,CACrB,CACF,CAKA,OAAO,QAAQf,EAAuB,CACpC,OAAO,KAAK,cAAc,IAAIA,CAAI,CACpC,CACF,CA7DElC,EADW8C,EACI,aAAmC,IAAA,EAClD9C,EAFW8C,EAEI,gBAAgB,IAAI,GAAY"}
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { isResponsiveValue as h } from "./types.js";
|
|
2
|
-
import { getSortedBreakpoints as y, generateMediaQuery as g, getCurrentBreakpointConfig as m } from "./breakpoints.js";
|
|
3
|
-
var $ = Object.defineProperty, b = (a, e, t) => e in a ? $(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, f = (a, e, t) => b(a, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
class C {
|
|
5
|
-
constructor(e) {
|
|
6
|
-
f(this, "options"), this.options = {
|
|
7
|
-
generateMinified: !1,
|
|
8
|
-
includeComments: !0,
|
|
9
|
-
optimizeOutput: !0,
|
|
10
|
-
mobileFirst: !0,
|
|
11
|
-
...e
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generate complete responsive CSS from a style configuration
|
|
16
|
-
*/
|
|
17
|
-
generateResponsiveCSS(e) {
|
|
18
|
-
const t = [], s = [], r = {};
|
|
19
|
-
let o = !1;
|
|
20
|
-
for (const [n, c] of Object.entries(e))
|
|
21
|
-
if (h(c)) {
|
|
22
|
-
o = !0;
|
|
23
|
-
const i = this.generatePropertyMediaQueries(n, c);
|
|
24
|
-
t.push(...i.mediaQueries), i.baseStyles && Object.assign(r, i.baseStyles);
|
|
25
|
-
} else
|
|
26
|
-
r[this.toCSSPropertyName(n)] = this.formatCSSValue(n, c);
|
|
27
|
-
return s.push(...this.generateCSSRules(t, r)), {
|
|
28
|
-
cssRules: s,
|
|
29
|
-
mediaQueries: t,
|
|
30
|
-
fallbackStyles: r,
|
|
31
|
-
hasResponsiveStyles: o
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Generate media queries for a single property
|
|
36
|
-
*/
|
|
37
|
-
generatePropertyMediaQueries(e, t) {
|
|
38
|
-
const s = [], r = {}, o = y();
|
|
39
|
-
for (const n of o) {
|
|
40
|
-
const c = t[n];
|
|
41
|
-
if (c === void 0) continue;
|
|
42
|
-
const i = this.toCSSPropertyName(e), u = this.formatCSSValue(e, c);
|
|
43
|
-
if (n === "base")
|
|
44
|
-
r[i] = u;
|
|
45
|
-
else {
|
|
46
|
-
const l = g(n), d = { [i]: u };
|
|
47
|
-
s.push({
|
|
48
|
-
breakpoint: n,
|
|
49
|
-
query: l,
|
|
50
|
-
styles: d,
|
|
51
|
-
selector: this.options.selector
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return { mediaQueries: s, baseStyles: Object.keys(r).length > 0 ? r : void 0 };
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Generate CSS rules from media queries and base styles
|
|
59
|
-
*/
|
|
60
|
-
generateCSSRules(e, t) {
|
|
61
|
-
const s = [];
|
|
62
|
-
if (Object.keys(t).length > 0) {
|
|
63
|
-
const o = this.generateCSSRule(this.options.selector, t);
|
|
64
|
-
s.push(o);
|
|
65
|
-
}
|
|
66
|
-
const r = this.groupQueriesByMediaQuery(e);
|
|
67
|
-
for (const [o, n] of Object.entries(r)) {
|
|
68
|
-
if (o === "") continue;
|
|
69
|
-
const c = {};
|
|
70
|
-
for (const u of n)
|
|
71
|
-
Object.assign(c, u.styles);
|
|
72
|
-
const i = this.generateMediaQueryRule(o, this.options.selector, c);
|
|
73
|
-
s.push(i);
|
|
74
|
-
}
|
|
75
|
-
return s;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Group media queries by their query string for optimization
|
|
79
|
-
*/
|
|
80
|
-
groupQueriesByMediaQuery(e) {
|
|
81
|
-
const t = {};
|
|
82
|
-
for (const s of e)
|
|
83
|
-
t[s.query] || (t[s.query] = []), t[s.query].push(s);
|
|
84
|
-
return t;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Generate a single CSS rule
|
|
88
|
-
*/
|
|
89
|
-
generateCSSRule(e, t) {
|
|
90
|
-
const { generateMinified: s, includeComments: r } = this.options, o = s ? "" : " ", n = s ? "" : `
|
|
91
|
-
`, c = s ? "" : " ";
|
|
92
|
-
let i = `${e}${c}{${n}`;
|
|
93
|
-
for (const [u, l] of Object.entries(t))
|
|
94
|
-
i += `${o}${u}:${c}${l};${n}`;
|
|
95
|
-
return i += `}${n}`, r && !s && (i = `/* Base styles (mobile-first) */${n}${i}`), i;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Generate a CSS media query rule
|
|
99
|
-
*/
|
|
100
|
-
generateMediaQueryRule(e, t, s) {
|
|
101
|
-
const { generateMinified: r, includeComments: o } = this.options, n = r ? "" : " ", c = r ? "" : " ", i = r ? "" : `
|
|
102
|
-
`, u = r ? "" : " ";
|
|
103
|
-
let l = `@media ${e}${u}{${i}`;
|
|
104
|
-
l += `${n}${t}${u}{${i}`;
|
|
105
|
-
for (const [d, p] of Object.entries(s))
|
|
106
|
-
l += `${c}${d}:${u}${p};${i}`;
|
|
107
|
-
return l += `${n}}${i}`, l += `}${i}`, o && !r && (l = `/* ${this.getBreakpointFromQuery(e)} styles */${i}${l}`), l;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Convert camelCase property to CSS kebab-case
|
|
111
|
-
*/
|
|
112
|
-
toCSSProperty(e) {
|
|
113
|
-
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Format CSS value with appropriate units and validation
|
|
117
|
-
*/
|
|
118
|
-
formatCSSValue(e, t) {
|
|
119
|
-
if (t == null)
|
|
120
|
-
return "inherit";
|
|
121
|
-
if (typeof t == "number") {
|
|
122
|
-
const s = [
|
|
123
|
-
"opacity",
|
|
124
|
-
"z-index",
|
|
125
|
-
"font-weight",
|
|
126
|
-
"line-height",
|
|
127
|
-
"flex-grow",
|
|
128
|
-
"flex-shrink",
|
|
129
|
-
"order",
|
|
130
|
-
"grid-column-start",
|
|
131
|
-
"grid-column-end",
|
|
132
|
-
"grid-row-start",
|
|
133
|
-
"grid-row-end"
|
|
134
|
-
], r = this.toCSSProperty(e);
|
|
135
|
-
if (s.includes(r))
|
|
136
|
-
return this.addImportantIfNeeded(e, t.toString());
|
|
137
|
-
if ([
|
|
138
|
-
"width",
|
|
139
|
-
"height",
|
|
140
|
-
"min-width",
|
|
141
|
-
"max-width",
|
|
142
|
-
"min-height",
|
|
143
|
-
"max-height",
|
|
144
|
-
"padding",
|
|
145
|
-
"margin",
|
|
146
|
-
"border-width",
|
|
147
|
-
"border-radius",
|
|
148
|
-
"top",
|
|
149
|
-
"right",
|
|
150
|
-
"bottom",
|
|
151
|
-
"left",
|
|
152
|
-
"font-size",
|
|
153
|
-
"letter-spacing",
|
|
154
|
-
"text-indent"
|
|
155
|
-
].some((n) => r.includes(n)))
|
|
156
|
-
return this.addImportantIfNeeded(e, `${t}px`);
|
|
157
|
-
}
|
|
158
|
-
return this.addImportantIfNeeded(e, t.toString());
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Add !important for properties that need to override base component styles
|
|
162
|
-
*/
|
|
163
|
-
addImportantIfNeeded(e, t) {
|
|
164
|
-
const s = [
|
|
165
|
-
"flexDirection",
|
|
166
|
-
"flex-direction",
|
|
167
|
-
"justifyContent",
|
|
168
|
-
"justify-content",
|
|
169
|
-
"alignItems",
|
|
170
|
-
"align-items",
|
|
171
|
-
"display"
|
|
172
|
-
], r = this.toCSSProperty(e);
|
|
173
|
-
return s.includes(e) || s.includes(r) ? `${t} !important` : t;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Convert property name to appropriate CSS property (including custom properties)
|
|
177
|
-
*/
|
|
178
|
-
toCSSPropertyName(e) {
|
|
179
|
-
return this.toCSSProperty(e);
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Extract breakpoint name from media query for comments
|
|
183
|
-
*/
|
|
184
|
-
getBreakpointFromQuery(e) {
|
|
185
|
-
const t = m();
|
|
186
|
-
for (const [s, r] of Object.entries(t))
|
|
187
|
-
if (e.includes(r))
|
|
188
|
-
return s;
|
|
189
|
-
return "custom";
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
function j(a, e, t, s) {
|
|
193
|
-
if (!h(t)) {
|
|
194
|
-
const c = e.replace(/[A-Z]/g, (u) => `-${u.toLowerCase()}`), i = typeof t == "number" ? `${t}px` : t.toString();
|
|
195
|
-
return [`${a} { ${c}: ${i}; }`];
|
|
196
|
-
}
|
|
197
|
-
const r = new C({ selector: a, ...s }), o = { [e]: t };
|
|
198
|
-
return r.generateResponsiveCSS(o).cssRules;
|
|
199
|
-
}
|
|
200
|
-
function w(a, e, t) {
|
|
201
|
-
const { generateMinified: s = !1 } = t || {}, r = s ? "" : " ", o = s ? "" : `
|
|
202
|
-
`, n = s ? "" : " ";
|
|
203
|
-
let c = `@media ${e.query}${n}{${o}`;
|
|
204
|
-
c += `${r}${a}${n}{${o}`;
|
|
205
|
-
for (const [i, u] of Object.entries(e.styles)) {
|
|
206
|
-
const l = i.replace(/[A-Z]/g, (p) => `-${p.toLowerCase()}`), d = typeof u == "number" ? `${u}px` : u.toString();
|
|
207
|
-
c += `${r}${r}${l}:${n}${d};${o}`;
|
|
208
|
-
}
|
|
209
|
-
return c += `${r}}${o}`, c += `}${o}`, c;
|
|
210
|
-
}
|
|
211
|
-
class S {
|
|
212
|
-
/**
|
|
213
|
-
* Get or create the tachUI responsive stylesheet
|
|
214
|
-
*/
|
|
215
|
-
static getStyleSheet() {
|
|
216
|
-
if (this.styleSheet)
|
|
217
|
-
return this.styleSheet;
|
|
218
|
-
const e = document.createElement("style");
|
|
219
|
-
return e.setAttribute("data-tachui-responsive", "true"), document.head.appendChild(e), this.styleSheet = e.sheet, this.styleSheet;
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Inject CSS rules into the document
|
|
223
|
-
*/
|
|
224
|
-
static injectCSS(e) {
|
|
225
|
-
if (typeof document > "u")
|
|
226
|
-
return;
|
|
227
|
-
const t = this.getStyleSheet();
|
|
228
|
-
for (const s of e)
|
|
229
|
-
if (!this.injectedRules.has(s))
|
|
230
|
-
try {
|
|
231
|
-
t.insertRule(s, t.cssRules.length), this.injectedRules.add(s);
|
|
232
|
-
} catch (r) {
|
|
233
|
-
console.warn("Failed to inject CSS rule:", s, r);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Clear all injected responsive CSS
|
|
238
|
-
*/
|
|
239
|
-
static clearCSS() {
|
|
240
|
-
if (this.styleSheet) {
|
|
241
|
-
for (; this.styleSheet.cssRules.length > 0; )
|
|
242
|
-
this.styleSheet.deleteRule(0);
|
|
243
|
-
this.injectedRules.clear();
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Check if a rule has been injected
|
|
248
|
-
*/
|
|
249
|
-
static hasRule(e) {
|
|
250
|
-
return this.injectedRules.has(e);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
f(S, "styleSheet", null);
|
|
254
|
-
f(S, "injectedRules", /* @__PURE__ */ new Set());
|
|
255
|
-
export {
|
|
256
|
-
S as CSSInjector,
|
|
257
|
-
C as ResponsiveCSSGenerator,
|
|
258
|
-
w as generateCustomMediaQuery,
|
|
259
|
-
j as generateResponsiveProperty
|
|
260
|
-
};
|
|
261
|
-
//# sourceMappingURL=css-generator.js.map
|