@tachui/core 0.7.0-alpha1 → 0.8.0-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/bundles/common.d.ts +1 -1
- package/dist/bundles/common.d.ts.map +1 -1
- package/dist/bundles/minimal.d.ts +17 -5
- package/dist/bundles/minimal.d.ts.map +1 -1
- package/dist/bundles/production-minimal.d.ts +2 -16
- package/dist/bundles/production-minimal.d.ts.map +1 -1
- package/dist/common.js +402 -955
- package/dist/compiler/advanced-parser.d.ts.map +1 -1
- package/dist/compiler/index.js +1392 -10
- package/dist/component-XAzF1xqs.js +487 -0
- package/dist/component-base-x2XmHFjy.js +255 -0
- package/dist/components/index.d.ts +4 -38
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +7 -102
- package/dist/components/wrapper.d.ts +5 -152
- package/dist/components/wrapper.d.ts.map +1 -1
- package/dist/concatenated-component-ByPl3_FF.js +2933 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/layout.d.ts +47 -4
- package/dist/constants/layout.d.ts.map +1 -1
- package/dist/constants/layout.js +52 -14
- package/dist/css-classes/index.js +176 -0
- package/dist/dom-bridge-CAa1N2zX.js +406 -0
- package/dist/effect-B9Knft0b.js +66 -0
- package/dist/essential.js +394 -953
- package/dist/index-DCPJFUm9.js +1407 -0
- package/dist/index-DIvMCJQO.js +268 -0
- package/dist/index-vdsiw6gQ.js +777 -0
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +394 -953
- package/dist/minimal-prod.js +107 -190
- package/dist/minimal.js +115 -955
- package/dist/modifiers/background.d.ts +41 -11
- package/dist/modifiers/background.d.ts.map +1 -1
- package/dist/modifiers/base.d.ts +6 -33
- package/dist/modifiers/base.d.ts.map +1 -1
- package/dist/modifiers/base.js +275 -533
- package/dist/modifiers/builder.d.ts +103 -195
- package/dist/modifiers/builder.d.ts.map +1 -1
- package/dist/modifiers/builder.js +7 -928
- package/dist/modifiers/core.d.ts +9 -401
- package/dist/modifiers/core.d.ts.map +1 -1
- package/dist/modifiers/{utils.d.ts → factories.d.ts} +18 -5
- package/dist/modifiers/factories.d.ts.map +1 -0
- package/dist/modifiers/index.d.ts +8 -52
- package/dist/modifiers/index.d.ts.map +1 -1
- package/dist/modifiers/index.js +38 -0
- package/dist/modifiers/presets.d.ts +368 -0
- package/dist/modifiers/presets.d.ts.map +1 -0
- package/dist/modifiers/registry.js +8 -161
- package/dist/modifiers/types.d.ts +39 -211
- package/dist/modifiers/types.d.ts.map +1 -1
- package/dist/modifiers/types.js +0 -1
- package/dist/performance-optimizer-stub-CtfXUwl4.js +38 -0
- package/dist/plugins/index.d.ts +5 -6
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +393 -32
- package/dist/plugins/simplified-index.d.ts +5 -6
- package/dist/plugins/simplified-index.d.ts.map +1 -1
- package/dist/production-minimal-BY_gMc-l.js +2532 -0
- package/dist/reactive/index.js +489 -91
- package/dist/reactive/types.js +0 -1
- package/dist/runtime/dom-bridge.js +12 -239
- package/dist/runtime/element-override.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +0 -7
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/renderer.d.ts.map +1 -1
- package/dist/runtime/renderer.js +7 -388
- package/dist/runtime/semantic-role-manager.d.ts.map +1 -1
- package/dist/runtime/types.js +1 -0
- package/dist/scheduler-BKeqwrYE.js +814 -0
- package/dist/validation/build-time-stub.d.ts +33 -0
- package/dist/validation/build-time-stub.d.ts.map +1 -0
- package/dist/validation/debug-tools-stub.d.ts +67 -0
- package/dist/validation/debug-tools-stub.d.ts.map +1 -0
- package/dist/validation/index.d.ts +23 -78
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +788 -233
- package/dist/validation/lifecycle-validation.d.ts.map +1 -1
- package/dist/validation/performance-optimizer-stub.d.ts +50 -0
- package/dist/validation/performance-optimizer-stub.d.ts.map +1 -0
- package/dist/validation/plugin-registration.d.ts +5 -1
- package/dist/validation/plugin-registration.d.ts.map +1 -1
- package/dist/validation/production-bypass-core.d.ts +69 -0
- package/dist/validation/production-bypass-core.d.ts.map +1 -0
- package/package.json +43 -8
- 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.d.ts +0 -116
- package/dist/components/BasicInput.d.ts.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.d.ts +0 -252
- package/dist/components/Button.d.ts.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.d.ts +0 -141
- package/dist/components/Divider.d.ts.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.d.ts +0 -365
- package/dist/components/EnhancedLink.d.ts.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.d.ts +0 -141
- package/dist/components/Form.d.ts.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.d.ts +0 -698
- package/dist/components/Grid.d.ts.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.d.ts +0 -214
- package/dist/components/GridResponsive.d.ts.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.d.ts +0 -162
- package/dist/components/Image.d.ts.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.d.ts +0 -287
- package/dist/components/List.d.ts.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.d.ts +0 -159
- package/dist/components/Menu.d.ts.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.d.ts +0 -153
- package/dist/components/Picker.d.ts.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.d.ts +0 -222
- package/dist/components/ScrollView.d.ts.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.d.ts +0 -153
- package/dist/components/Section.d.ts.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.d.ts +0 -64
- package/dist/components/Show.d.ts.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.d.ts +0 -35
- package/dist/components/Spacer.d.ts.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.d.ts +0 -242
- package/dist/components/Text.d.ts.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.d.ts +0 -207
- package/dist/components/Toggle.d.ts.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.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/index.d.ts +0 -61
- package/dist/debug/index.d.ts.map +0 -1
- package/dist/debug.cjs +0 -52
- package/dist/debug.cjs.map +0 -1
- package/dist/debug.js +0 -179
- package/dist/debug.js.map +0 -1
- package/dist/developer-experience/enhanced-errors.d.ts +0 -128
- package/dist/developer-experience/enhanced-errors.d.ts.map +0 -1
- package/dist/developer-experience/enhanced-types.d.ts +0 -281
- package/dist/developer-experience/enhanced-types.d.ts.map +0 -1
- package/dist/developer-experience/index.d.ts +0 -44
- package/dist/developer-experience/index.d.ts.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.d.ts +0 -203
- package/dist/modifiers/attributes.d.ts.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.d.ts +0 -59
- package/dist/modifiers/backdrop.d.ts.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.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.d.ts +0 -217
- package/dist/modifiers/border.d.ts.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.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.d.ts +0 -159
- package/dist/modifiers/effects.d.ts.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.d.ts +0 -240
- package/dist/modifiers/elements.d.ts.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.d.ts +0 -275
- package/dist/modifiers/filters.d.ts.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.d.ts +0 -82
- package/dist/modifiers/flexbox.d.ts.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.d.ts +0 -71
- package/dist/modifiers/font.d.ts.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.d.ts +0 -92
- package/dist/modifiers/grid.d.ts.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.d.ts +0 -128
- package/dist/modifiers/margin.d.ts.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.d.ts +0 -204
- package/dist/modifiers/padding.d.ts.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.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.d.ts +0 -118
- package/dist/modifiers/responsive/advanced-utilities.d.ts.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.d.ts +0 -81
- package/dist/modifiers/responsive/breakpoints.d.ts.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.d.ts +0 -100
- package/dist/modifiers/responsive/css-generator.d.ts.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.d.ts +0 -107
- package/dist/modifiers/responsive/dev-tools.d.ts.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/index.d.ts +0 -28
- package/dist/modifiers/responsive/index.d.ts.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.d.ts +0 -230
- package/dist/modifiers/responsive/layout-patterns.d.ts.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.d.ts +0 -130
- package/dist/modifiers/responsive/performance.d.ts.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.d.ts +0 -133
- package/dist/modifiers/responsive/responsive-builder.d.ts.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.d.ts +0 -123
- package/dist/modifiers/responsive/responsive-modifier.d.ts.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.d.ts +0 -183
- package/dist/modifiers/responsive/types.d.ts.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.d.ts +0 -149
- package/dist/modifiers/responsive/utilities.d.ts.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.d.ts +0 -143
- package/dist/modifiers/scroll.d.ts.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.d.ts +0 -114
- package/dist/modifiers/shadows.d.ts.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.d.ts +0 -113
- package/dist/modifiers/size.d.ts.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.d.ts +0 -147
- package/dist/modifiers/text.d.ts.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.d.ts +0 -329
- package/dist/modifiers/transformations.d.ts.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.d.ts +0 -98
- package/dist/modifiers/transitions.d.ts.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.map +0 -1
- package/dist/modifiers/typography.cjs +0 -2
- package/dist/modifiers/typography.cjs.map +0 -1
- package/dist/modifiers/typography.d.ts +0 -192
- package/dist/modifiers/typography.d.ts.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.d.ts +0 -69
- package/dist/modifiers/utility.d.ts.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.d.ts.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.d.ts +0 -83
- package/dist/plugins/simplified-error-handler.d.ts.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.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 +0 -289
- 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.d.ts +0 -240
- package/dist/runtime/dev-tools.d.ts.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.d.ts +0 -42
- package/dist/runtime/development-warnings.d.ts.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.d.ts +0 -302
- package/dist/runtime/error-boundary.d.ts.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.d.ts +0 -267
- package/dist/runtime/error-recovery.d.ts.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.d.ts +0 -287
- package/dist/runtime/error-reporting.d.ts.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.d.ts +0 -204
- package/dist/runtime/error-utils.d.ts.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.d.ts +0 -217
- package/dist/runtime/performance.d.ts.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.d.ts +0 -110
- package/dist/sui-compat.d.ts.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.d.ts +0 -319
- package/dist/validation/advanced-debugging.d.ts.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.d.ts +0 -32
- package/dist/validation/build-time/detection.d.ts.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.d.ts +0 -84
- package/dist/validation/build-time/index.d.ts.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.d.ts +0 -75
- package/dist/validation/build-time/plugins.d.ts.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.d.ts +0 -73
- package/dist/validation/build-time/rules.d.ts.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.d.ts +0 -23
- package/dist/validation/build-time/transformer.d.ts.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/build-time/types.d.ts +0 -212
- package/dist/validation/build-time/types.d.ts.map +0 -1
- package/dist/validation/comprehensive.cjs +0 -9
- package/dist/validation/comprehensive.cjs.map +0 -1
- package/dist/validation/comprehensive.d.ts +0 -160
- package/dist/validation/comprehensive.d.ts.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.d.ts +0 -251
- package/dist/validation/debug-tools.d.ts.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.d.ts +0 -243
- package/dist/validation/developer-experience.d.ts.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.d.ts +0 -269
- package/dist/validation/documentation-integration.d.ts.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.d.ts +0 -279
- package/dist/validation/enhanced-runtime.d.ts.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.d.ts +0 -186
- package/dist/validation/error-reporting.d.ts.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.d.ts +0 -328
- package/dist/validation/ide-integration.d.ts.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.d.ts +0 -218
- package/dist/validation/performance-optimizer.d.ts.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.d.ts +0 -175
- package/dist/validation/production-bypass.d.ts.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.d.ts +0 -111
- package/dist/validation/simple.d.ts.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.d.ts +0 -227
- package/dist/viewport/adapters/web-adapter.d.ts.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.d.ts +0 -131
- package/dist/viewport/components.d.ts.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.d.ts +0 -75
- package/dist/viewport/environment.d.ts.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.d.ts +0 -138
- package/dist/viewport/index.d.ts.map +0 -1
- package/dist/viewport/index.js +0 -166
- 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.d.ts +0 -59
- package/dist/viewport/platform-detection.d.ts.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.d.ts +0 -301
- package/dist/viewport/types.d.ts.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.d.ts +0 -118
- package/dist/viewport/viewport-manager.d.ts.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
package/dist/compiler/index.js
CHANGED
|
@@ -1,13 +1,1395 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var u = Object.defineProperty, m = (r, e, t) => e in r ? u(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, c = (r, e, t) => m(r, typeof e != "symbol" ? e + "" : e, t);
|
|
2
|
+
class f {
|
|
3
|
+
constructor(e, t) {
|
|
4
|
+
c(this, "code"), c(this, "filename"), c(this, "position", 0), c(this, "line", 1), c(this, "column", 1), this.code = e, this.filename = t;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Parse advanced SwiftUI syntax into enhanced AST
|
|
8
|
+
*/
|
|
9
|
+
parse() {
|
|
10
|
+
const e = [];
|
|
11
|
+
for (; !this.isAtEnd() && (this.skipWhitespace(), !this.isAtEnd()); ) {
|
|
12
|
+
const t = this.parseAdvancedNode();
|
|
13
|
+
t && e.push(t);
|
|
14
|
+
}
|
|
15
|
+
return e;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parse advanced AST nodes including conditionals and loops
|
|
19
|
+
*/
|
|
20
|
+
parseAdvancedNode() {
|
|
21
|
+
const e = this.currentPosition(), t = this.position;
|
|
22
|
+
return this.match("if") ? this.parseConditional(e) : this.match("ForEach") ? this.parseForEach(e) : this.peek() === "@" ? this.parsePropertyWrapper(e) : this.peek() === "$" ? this.parseStateBinding(e) : this.isComponentStart() ? this.parseEnhancedComponent(e) : (this.position === t && this.advance(), null);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Parse conditional rendering (if/else)
|
|
26
|
+
*/
|
|
27
|
+
parseConditional(e) {
|
|
28
|
+
this.skipWhitespace();
|
|
29
|
+
const t = this.parseComplexExpression();
|
|
30
|
+
if (!t)
|
|
31
|
+
throw new Error(`Expected condition after 'if' at line ${this.line}`);
|
|
32
|
+
this.skipWhitespace();
|
|
33
|
+
const i = [];
|
|
34
|
+
if (this.peek() === "{") {
|
|
35
|
+
for (this.advance(), this.skipWhitespace(); !this.isAtEnd() && this.peek() !== "}"; ) {
|
|
36
|
+
const a = this.parseAdvancedNode();
|
|
37
|
+
a && i.push(a), this.skipWhitespace();
|
|
38
|
+
}
|
|
39
|
+
this.peek() === "}" && this.advance();
|
|
40
|
+
}
|
|
41
|
+
let s;
|
|
42
|
+
if (this.skipWhitespace(), this.match("else") && (s = [], this.skipWhitespace(), this.peek() === "{")) {
|
|
43
|
+
for (this.advance(), this.skipWhitespace(); !this.isAtEnd() && this.peek() !== "}"; ) {
|
|
44
|
+
const a = this.parseAdvancedNode();
|
|
45
|
+
a && s.push(a), this.skipWhitespace();
|
|
46
|
+
}
|
|
47
|
+
this.peek() === "}" && this.advance();
|
|
48
|
+
}
|
|
49
|
+
const n = {
|
|
50
|
+
type: "Conditional",
|
|
51
|
+
condition: t,
|
|
52
|
+
thenBody: i,
|
|
53
|
+
loc: {
|
|
54
|
+
start: e,
|
|
55
|
+
end: this.currentPosition(),
|
|
56
|
+
source: this.filename
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return s !== void 0 && (n.elseBody = s), n;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Parse ForEach loops for list rendering
|
|
63
|
+
*/
|
|
64
|
+
parseForEach(e) {
|
|
65
|
+
if (this.skipWhitespace(), this.peek() !== "(")
|
|
66
|
+
throw new Error(`Expected '(' after ForEach at line ${this.line}`);
|
|
67
|
+
this.advance(), this.skipWhitespace();
|
|
68
|
+
const t = this.parseComplexExpression();
|
|
69
|
+
if (!t)
|
|
70
|
+
throw new Error(
|
|
71
|
+
`Expected iterable expression in ForEach at line ${this.line}`
|
|
72
|
+
);
|
|
73
|
+
this.skipWhitespace(), this.peek() === "," && (this.advance(), this.skipWhitespace()), this.match("id:") && (this.skipWhitespace(), this.parseComplexExpression()), this.skipWhitespace(), this.peek() === ")" && this.advance(), this.skipWhitespace();
|
|
74
|
+
let i = "item";
|
|
75
|
+
if (this.peek() === "{") {
|
|
76
|
+
this.advance(), this.skipWhitespace();
|
|
77
|
+
const n = this.position, a = this.parseIdentifier();
|
|
78
|
+
a && this.match("in") ? i = a : this.position = n;
|
|
79
|
+
}
|
|
80
|
+
const s = [];
|
|
81
|
+
for (; !this.isAtEnd() && this.peek() !== "}"; ) {
|
|
82
|
+
const n = this.parseAdvancedNode();
|
|
83
|
+
n && s.push(n), this.skipWhitespace();
|
|
84
|
+
}
|
|
85
|
+
return this.peek() === "}" && this.advance(), {
|
|
86
|
+
type: "ForEach",
|
|
87
|
+
iterable: t,
|
|
88
|
+
itemIdentifier: i,
|
|
89
|
+
body: s,
|
|
90
|
+
loc: {
|
|
91
|
+
start: e,
|
|
92
|
+
end: this.currentPosition(),
|
|
93
|
+
source: this.filename
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Parse property wrappers (@State, @Computed, etc.)
|
|
99
|
+
*/
|
|
100
|
+
parsePropertyWrapper(e) {
|
|
101
|
+
this.advance();
|
|
102
|
+
const t = this.parseIdentifier();
|
|
103
|
+
if (!t || !["State", "Computed", "Effect"].includes(t))
|
|
104
|
+
throw new Error(
|
|
105
|
+
`Unknown property wrapper @${t} at line ${this.line}`
|
|
106
|
+
);
|
|
107
|
+
this.skipWhitespace();
|
|
108
|
+
const i = this.parseIdentifier();
|
|
109
|
+
if (!i)
|
|
110
|
+
throw new Error(
|
|
111
|
+
`Expected identifier after @${t} at line ${this.line}`
|
|
112
|
+
);
|
|
113
|
+
let s;
|
|
114
|
+
if (this.skipWhitespace(), this.peek() === "=") {
|
|
115
|
+
this.advance(), this.skipWhitespace();
|
|
116
|
+
const a = this.parseComplexExpression();
|
|
117
|
+
a && (s = a);
|
|
118
|
+
}
|
|
119
|
+
const n = {
|
|
120
|
+
type: "PropertyWrapper",
|
|
121
|
+
wrapper: t,
|
|
122
|
+
identifier: i,
|
|
123
|
+
loc: {
|
|
124
|
+
start: e,
|
|
125
|
+
end: this.currentPosition(),
|
|
126
|
+
source: this.filename
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
return s !== void 0 && (n.initialValue = s), n;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Parse state bindings ($variable)
|
|
133
|
+
*/
|
|
134
|
+
parseStateBinding(e) {
|
|
135
|
+
this.advance();
|
|
136
|
+
const t = this.parseIdentifier();
|
|
137
|
+
if (!t)
|
|
138
|
+
throw new Error(`Expected identifier after '$' at line ${this.line}`);
|
|
139
|
+
return {
|
|
140
|
+
type: "StateBinding",
|
|
141
|
+
identifier: t,
|
|
142
|
+
loc: {
|
|
143
|
+
start: e,
|
|
144
|
+
end: this.currentPosition(),
|
|
145
|
+
source: this.filename
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Parse enhanced components with complex modifier chains
|
|
151
|
+
*/
|
|
152
|
+
parseEnhancedComponent(e) {
|
|
153
|
+
const t = this.parseIdentifier();
|
|
154
|
+
this.skipWhitespace();
|
|
155
|
+
const i = [], s = [];
|
|
156
|
+
if (this.peek() === "(") {
|
|
157
|
+
for (this.advance(), this.skipWhitespace(); !this.isAtEnd() && this.peek() !== ")"; ) {
|
|
158
|
+
const n = this.parseComplexExpression();
|
|
159
|
+
n && i.push(n), this.skipWhitespace(), this.peek() === "," && (this.advance(), this.skipWhitespace());
|
|
160
|
+
}
|
|
161
|
+
this.peek() === ")" && this.advance();
|
|
162
|
+
} else if (this.peek() === "{") {
|
|
163
|
+
for (this.advance(), this.skipWhitespace(); !this.isAtEnd() && this.peek() !== "}"; ) {
|
|
164
|
+
const n = this.parseAdvancedNode();
|
|
165
|
+
n && i.push(n), this.skipWhitespace();
|
|
166
|
+
}
|
|
167
|
+
this.peek() === "}" && this.advance();
|
|
168
|
+
}
|
|
169
|
+
for (this.skipWhitespace(); this.peek() === "."; ) {
|
|
170
|
+
const n = this.parseAdvancedModifier();
|
|
171
|
+
n && s.push(n), this.skipWhitespace();
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
type: "Component",
|
|
175
|
+
name: t,
|
|
176
|
+
children: i,
|
|
177
|
+
modifiers: s,
|
|
178
|
+
loc: {
|
|
179
|
+
start: e,
|
|
180
|
+
end: this.currentPosition(),
|
|
181
|
+
source: this.filename
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Parse advanced modifiers with complex expressions
|
|
187
|
+
*/
|
|
188
|
+
parseAdvancedModifier() {
|
|
189
|
+
if (this.peek() !== ".") return null;
|
|
190
|
+
const e = this.currentPosition();
|
|
191
|
+
this.advance();
|
|
192
|
+
const t = this.parseIdentifier();
|
|
193
|
+
if (!t) return null;
|
|
194
|
+
const i = [];
|
|
195
|
+
if (this.peek() === "(") {
|
|
196
|
+
for (this.advance(), this.skipWhitespace(); !this.isAtEnd() && this.peek() !== ")"; ) {
|
|
197
|
+
const s = this.parseComplexExpression();
|
|
198
|
+
s && i.push(s), this.skipWhitespace(), this.peek() === "," && (this.advance(), this.skipWhitespace());
|
|
199
|
+
}
|
|
200
|
+
this.peek() === ")" && this.advance();
|
|
201
|
+
}
|
|
202
|
+
return {
|
|
203
|
+
type: "Modifier",
|
|
204
|
+
name: t,
|
|
205
|
+
arguments: i,
|
|
206
|
+
loc: {
|
|
207
|
+
start: e,
|
|
208
|
+
end: this.currentPosition(),
|
|
209
|
+
source: this.filename
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Parse complex expressions including function calls, property access, etc.
|
|
215
|
+
*/
|
|
216
|
+
parseComplexExpression() {
|
|
217
|
+
this.skipWhitespace();
|
|
218
|
+
const e = this.currentPosition();
|
|
219
|
+
if (this.peek() === '"' || this.peek() === "'")
|
|
220
|
+
return this.parseStringLiteral(e);
|
|
221
|
+
if (this.isDigit(this.peek()))
|
|
222
|
+
return this.parseNumberLiteral(e);
|
|
223
|
+
if (this.match("true") || this.match("false") || this.match("null")) {
|
|
224
|
+
const i = this.code.slice(e.offset, this.position);
|
|
225
|
+
return {
|
|
226
|
+
type: "Literal",
|
|
227
|
+
value: i === "true" ? !0 : i === "false" ? !1 : null,
|
|
228
|
+
raw: i,
|
|
229
|
+
loc: {
|
|
230
|
+
start: e,
|
|
231
|
+
end: this.currentPosition(),
|
|
232
|
+
source: this.filename
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
const t = this.parseIdentifier();
|
|
237
|
+
return t ? (this.skipWhitespace(), this.peek() === "(" ? this.parseFunctionCall(t, e) : this.peek() === "." ? this.parsePropertyAccess(t, e) : {
|
|
238
|
+
type: "Identifier",
|
|
239
|
+
name: t,
|
|
240
|
+
loc: {
|
|
241
|
+
start: e,
|
|
242
|
+
end: this.currentPosition(),
|
|
243
|
+
source: this.filename
|
|
244
|
+
}
|
|
245
|
+
}) : this.peek() === "[" ? this.parseArrayLiteral(e) : null;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Parse function calls with arguments
|
|
249
|
+
*/
|
|
250
|
+
parseFunctionCall(e, t) {
|
|
251
|
+
this.advance(), this.skipWhitespace();
|
|
252
|
+
const i = [];
|
|
253
|
+
for (; !this.isAtEnd() && this.peek() !== ")"; ) {
|
|
254
|
+
const s = this.parseComplexExpression();
|
|
255
|
+
s && i.push(s), this.skipWhitespace(), this.peek() === "," && (this.advance(), this.skipWhitespace());
|
|
256
|
+
}
|
|
257
|
+
return this.peek() === ")" && this.advance(), {
|
|
258
|
+
type: "CallExpression",
|
|
259
|
+
callee: { type: "Identifier", name: e },
|
|
260
|
+
arguments: i,
|
|
261
|
+
loc: {
|
|
262
|
+
start: t,
|
|
263
|
+
end: this.currentPosition(),
|
|
264
|
+
source: this.filename
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Parse property access (obj.prop)
|
|
270
|
+
*/
|
|
271
|
+
parsePropertyAccess(e, t) {
|
|
272
|
+
let i = e;
|
|
273
|
+
for (; this.peek() === "."; ) {
|
|
274
|
+
this.advance();
|
|
275
|
+
const s = this.parseIdentifier();
|
|
276
|
+
s && (i = `${i}.${s}`);
|
|
277
|
+
}
|
|
278
|
+
return {
|
|
279
|
+
type: "MemberExpression",
|
|
280
|
+
object: e,
|
|
281
|
+
property: i.split(".").slice(1).join("."),
|
|
282
|
+
loc: {
|
|
283
|
+
start: t,
|
|
284
|
+
end: this.currentPosition(),
|
|
285
|
+
source: this.filename
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Parse array literals [1, 2, 3]
|
|
291
|
+
*/
|
|
292
|
+
parseArrayLiteral(e) {
|
|
293
|
+
this.advance(), this.skipWhitespace();
|
|
294
|
+
const t = [];
|
|
295
|
+
for (; !this.isAtEnd() && this.peek() !== "]"; ) {
|
|
296
|
+
const i = this.parseComplexExpression();
|
|
297
|
+
i && t.push(i), this.skipWhitespace(), this.peek() === "," && (this.advance(), this.skipWhitespace());
|
|
298
|
+
}
|
|
299
|
+
return this.peek() === "]" && this.advance(), {
|
|
300
|
+
type: "ArrayExpression",
|
|
301
|
+
elements: t,
|
|
302
|
+
loc: {
|
|
303
|
+
start: e,
|
|
304
|
+
end: this.currentPosition(),
|
|
305
|
+
source: this.filename
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
// Helper methods (reuse from basic parser with enhancements)
|
|
310
|
+
parseStringLiteral(e) {
|
|
311
|
+
const t = this.peek();
|
|
312
|
+
this.advance();
|
|
313
|
+
let i = "";
|
|
314
|
+
for (; !this.isAtEnd() && this.peek() !== t; )
|
|
315
|
+
if (this.peek() === "\\") {
|
|
316
|
+
this.advance();
|
|
317
|
+
const s = this.peek();
|
|
318
|
+
switch (s) {
|
|
319
|
+
case "n":
|
|
320
|
+
i += `
|
|
321
|
+
`;
|
|
322
|
+
break;
|
|
323
|
+
case "t":
|
|
324
|
+
i += " ";
|
|
325
|
+
break;
|
|
326
|
+
case "r":
|
|
327
|
+
i += "\r";
|
|
328
|
+
break;
|
|
329
|
+
case "\\":
|
|
330
|
+
i += "\\";
|
|
331
|
+
break;
|
|
332
|
+
case '"':
|
|
333
|
+
i += '"';
|
|
334
|
+
break;
|
|
335
|
+
case "'":
|
|
336
|
+
i += "'";
|
|
337
|
+
break;
|
|
338
|
+
default:
|
|
339
|
+
i += s;
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
this.advance();
|
|
343
|
+
} else
|
|
344
|
+
i += this.peek(), this.advance();
|
|
345
|
+
return this.peek() === t && this.advance(), {
|
|
346
|
+
type: "Literal",
|
|
347
|
+
value: i,
|
|
348
|
+
raw: this.code.slice(e.offset, this.position),
|
|
349
|
+
loc: {
|
|
350
|
+
start: e,
|
|
351
|
+
end: this.currentPosition(),
|
|
352
|
+
source: this.filename
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
parseNumberLiteral(e) {
|
|
357
|
+
let t = "";
|
|
358
|
+
for (; !this.isAtEnd() && (this.isDigit(this.peek()) || this.peek() === "."); )
|
|
359
|
+
t += this.peek(), this.advance();
|
|
360
|
+
return {
|
|
361
|
+
type: "Literal",
|
|
362
|
+
value: t.includes(".") ? parseFloat(t) : parseInt(t, 10),
|
|
363
|
+
raw: t,
|
|
364
|
+
loc: {
|
|
365
|
+
start: e,
|
|
366
|
+
end: this.currentPosition(),
|
|
367
|
+
source: this.filename
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
parseIdentifier() {
|
|
372
|
+
if (!this.isAlpha(this.peek()) && this.peek() !== "_")
|
|
373
|
+
return null;
|
|
374
|
+
let e = "";
|
|
375
|
+
for (; !this.isAtEnd() && (this.isAlphaNumeric(this.peek()) || this.peek() === "_"); )
|
|
376
|
+
e += this.peek(), this.advance();
|
|
377
|
+
return e;
|
|
378
|
+
}
|
|
379
|
+
// Utility methods
|
|
380
|
+
isComponentStart() {
|
|
381
|
+
const e = this.position, t = this.line, i = this.column, s = this.parseIdentifier();
|
|
382
|
+
return this.position = e, this.line = t, this.column = i, s ? [
|
|
383
|
+
"VStack",
|
|
384
|
+
"HStack",
|
|
385
|
+
"ZStack",
|
|
386
|
+
"List",
|
|
387
|
+
"Form",
|
|
388
|
+
"NavigationStack",
|
|
389
|
+
"Text",
|
|
390
|
+
"Button",
|
|
391
|
+
"Image",
|
|
392
|
+
"TextField",
|
|
393
|
+
"Toggle",
|
|
394
|
+
"Slider",
|
|
395
|
+
// ScrollView moved to @tachui/mobile
|
|
396
|
+
"LazyVStack",
|
|
397
|
+
"LazyHStack"
|
|
398
|
+
].includes(s) : !1;
|
|
399
|
+
}
|
|
400
|
+
match(e) {
|
|
401
|
+
return this.code.slice(this.position, this.position + e.length) === e ? (this.position += e.length, this.column += e.length, !0) : !1;
|
|
402
|
+
}
|
|
403
|
+
skipWhitespace() {
|
|
404
|
+
for (; !this.isAtEnd() && this.isWhitespace(this.peek()); )
|
|
405
|
+
this.peek() === `
|
|
406
|
+
` ? (this.line++, this.column = 1) : this.column++, this.position++;
|
|
407
|
+
}
|
|
408
|
+
peek() {
|
|
409
|
+
return this.isAtEnd() ? "\0" : this.code[this.position];
|
|
410
|
+
}
|
|
411
|
+
advance() {
|
|
412
|
+
const e = this.peek();
|
|
413
|
+
return this.isAtEnd() || (this.position++, e === `
|
|
414
|
+
` ? (this.line++, this.column = 1) : this.column++), e;
|
|
415
|
+
}
|
|
416
|
+
isAtEnd() {
|
|
417
|
+
return this.position >= this.code.length;
|
|
418
|
+
}
|
|
419
|
+
isWhitespace(e) {
|
|
420
|
+
return /\s/.test(e);
|
|
421
|
+
}
|
|
422
|
+
isAlpha(e) {
|
|
423
|
+
return /[a-zA-Z]/.test(e);
|
|
424
|
+
}
|
|
425
|
+
isDigit(e) {
|
|
426
|
+
return /[0-9]/.test(e);
|
|
427
|
+
}
|
|
428
|
+
isAlphaNumeric(e) {
|
|
429
|
+
return this.isAlpha(e) || this.isDigit(e);
|
|
430
|
+
}
|
|
431
|
+
currentPosition() {
|
|
432
|
+
return {
|
|
433
|
+
line: this.line,
|
|
434
|
+
column: this.column,
|
|
435
|
+
offset: this.position
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
function A(r, e) {
|
|
440
|
+
return new f(r, e).parse();
|
|
441
|
+
}
|
|
442
|
+
var g = Object.defineProperty, L = (r, e, t) => e in r ? g(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, p = (r, e, t) => L(r, typeof e != "symbol" ? e + "" : e, t);
|
|
443
|
+
function k(r, e = {}) {
|
|
444
|
+
return new E(e).generate(r);
|
|
445
|
+
}
|
|
446
|
+
class E {
|
|
447
|
+
constructor(e) {
|
|
448
|
+
p(this, "options"), p(this, "imports", /* @__PURE__ */ new Set()), p(this, "variables", []), p(this, "code", []), p(this, "indentLevel", 0), this.options = e;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Generate complete code from AST nodes
|
|
452
|
+
*/
|
|
453
|
+
generate(e) {
|
|
454
|
+
return this.reset(), this.addImport("createSignal", "@tachui/core/reactive"), this.addImport("createEffect", "@tachui/core/reactive"), this.addImport("createComputed", "@tachui/core/reactive"), e.forEach((i) => this.generateNode(i)), {
|
|
455
|
+
code: this.buildFinalCode(),
|
|
456
|
+
map: this.options.sourceMaps ? this.generateSourceMap() : void 0
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Generate code for a single AST node
|
|
461
|
+
*/
|
|
462
|
+
generateNode(e) {
|
|
463
|
+
switch (e.type) {
|
|
464
|
+
case "Component":
|
|
465
|
+
this.generateComponent(e);
|
|
466
|
+
break;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Generate code for a component node
|
|
471
|
+
*/
|
|
472
|
+
generateComponent(e) {
|
|
473
|
+
switch (e.name) {
|
|
474
|
+
case "VStack":
|
|
475
|
+
case "HStack":
|
|
476
|
+
case "ZStack":
|
|
477
|
+
this.generateStackComponent(e);
|
|
478
|
+
break;
|
|
479
|
+
case "Text":
|
|
480
|
+
this.generateTextComponent(e);
|
|
481
|
+
break;
|
|
482
|
+
case "Button":
|
|
483
|
+
this.generateButtonComponent(e);
|
|
484
|
+
break;
|
|
485
|
+
case "List":
|
|
486
|
+
this.generateListComponent(e);
|
|
487
|
+
break;
|
|
488
|
+
default:
|
|
489
|
+
this.generateGenericComponent(e);
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Generate code for stack components (VStack, HStack, ZStack)
|
|
495
|
+
*/
|
|
496
|
+
generateStackComponent(e) {
|
|
497
|
+
const t = e.name.toLowerCase().replace("stack", ""), i = this.createVariable("container");
|
|
498
|
+
this.addLine(`// ${e.name} component`), this.addLine(`const ${i} = document.createElement('div')`), this.addLine(
|
|
499
|
+
`${i}.className = 'tachui-${t} ${this.generateStackClasses(e.name)}'`
|
|
500
|
+
);
|
|
501
|
+
const s = this.generateModifierStyles(e.modifiers);
|
|
502
|
+
s.length > 0 && (this.addLine(`Object.assign(${i}.style, {`), this.indent(), s.forEach((n) => this.addLine(`${n},`)), this.dedent(), this.addLine("})")), e.children.forEach((n) => {
|
|
503
|
+
this.generateNode(n);
|
|
504
|
+
const a = this.getLastVariable();
|
|
505
|
+
a && this.addLine(`${i}.appendChild(${a})`);
|
|
506
|
+
}), this.addEmptyLine();
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Generate code for Text component
|
|
510
|
+
*/
|
|
511
|
+
generateTextComponent(e) {
|
|
512
|
+
const t = this.createVariable("textElement"), i = this.getTextContent(e.children);
|
|
513
|
+
this.addLine("// Text component"), this.addLine(`const ${t} = document.createElement('span')`), this.addLine(`${t}.className = 'tachui-text'`), this.isReactiveExpression(i) ? (this.addLine("createEffect(() => {"), this.indent(), this.addLine(`${t}.textContent = ${i}`), this.dedent(), this.addLine("})")) : this.addLine(`${t}.textContent = ${i}`);
|
|
514
|
+
const s = this.generateModifierStyles(e.modifiers);
|
|
515
|
+
s.length > 0 && (this.addLine(`Object.assign(${t}.style, {`), this.indent(), s.forEach((n) => this.addLine(`${n},`)), this.dedent(), this.addLine("})")), this.addEmptyLine();
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Generate code for Button component
|
|
519
|
+
*/
|
|
520
|
+
generateButtonComponent(e) {
|
|
521
|
+
const t = this.createVariable("buttonElement"), i = this.getTextContent(e.children);
|
|
522
|
+
this.addLine("// Button component"), this.addLine(`const ${t} = document.createElement('button')`), this.addLine(`${t}.className = 'tachui-button'`), this.addLine(`${t}.textContent = ${i}`);
|
|
523
|
+
const s = this.generateModifierStyles(e.modifiers), n = this.generateEventHandlers(e.modifiers);
|
|
524
|
+
s.length > 0 && (this.addLine(`Object.assign(${t}.style, {`), this.indent(), s.forEach((a) => this.addLine(`${a},`)), this.dedent(), this.addLine("})")), n.forEach((a) => this.addLine(a)), this.addEmptyLine();
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Generate code for List component
|
|
528
|
+
*/
|
|
529
|
+
generateListComponent(e) {
|
|
530
|
+
const t = this.createVariable("listElement");
|
|
531
|
+
this.addLine("// List component"), this.addLine(`const ${t} = document.createElement('div')`), this.addLine(`${t}.className = 'tachui-list'`), e.children.forEach((i) => {
|
|
532
|
+
this.generateNode(i);
|
|
533
|
+
const s = this.getLastVariable();
|
|
534
|
+
s && this.addLine(`${t}.appendChild(${s})`);
|
|
535
|
+
}), this.addEmptyLine();
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Generate code for generic/custom components
|
|
539
|
+
*/
|
|
540
|
+
generateGenericComponent(e) {
|
|
541
|
+
const t = this.createVariable("element");
|
|
542
|
+
this.addLine(`// ${e.name} component`), this.addLine(`const ${t} = document.createElement('div')`), this.addLine(`${t}.className = 'tachui-${e.name.toLowerCase()}'`);
|
|
543
|
+
const i = this.generateModifierStyles(e.modifiers);
|
|
544
|
+
i.length > 0 && (this.addLine(`Object.assign(${t}.style, {`), this.indent(), i.forEach((s) => this.addLine(`${s},`)), this.dedent(), this.addLine("})")), this.addEmptyLine();
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Generate CSS classes for stack layouts
|
|
548
|
+
*/
|
|
549
|
+
generateStackClasses(e) {
|
|
550
|
+
switch (e) {
|
|
551
|
+
case "VStack":
|
|
552
|
+
return "flex flex-col";
|
|
553
|
+
case "HStack":
|
|
554
|
+
return "flex flex-row";
|
|
555
|
+
case "ZStack":
|
|
556
|
+
return "relative";
|
|
557
|
+
default:
|
|
558
|
+
return "flex";
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Generate styles from modifiers
|
|
563
|
+
*/
|
|
564
|
+
generateModifierStyles(e) {
|
|
565
|
+
const t = [];
|
|
566
|
+
return e.forEach((i) => {
|
|
567
|
+
const s = this.convertModifierToStyle(i);
|
|
568
|
+
s && t.push(s);
|
|
569
|
+
}), t;
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Generate event handlers from modifiers
|
|
573
|
+
*/
|
|
574
|
+
generateEventHandlers(e) {
|
|
575
|
+
const t = [];
|
|
576
|
+
return e.forEach((i) => {
|
|
577
|
+
if (i.name === "onTapGesture" && i.arguments.length > 0) {
|
|
578
|
+
const s = this.expressionToString(i.arguments[0]);
|
|
579
|
+
t.push(`${this.getLastVariable()}.addEventListener('click', ${s})`);
|
|
580
|
+
}
|
|
581
|
+
}), t;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Convert modifier to CSS style property
|
|
585
|
+
*/
|
|
586
|
+
convertModifierToStyle(e) {
|
|
587
|
+
const t = e.arguments;
|
|
588
|
+
switch (e.name) {
|
|
589
|
+
case "padding":
|
|
590
|
+
return `padding: ${t.length > 0 ? this.expressionToString(t[0]) : '"8px"'}`;
|
|
591
|
+
case "background":
|
|
592
|
+
if (t.length > 0)
|
|
593
|
+
return `backgroundColor: ${this.expressionToString(t[0])}`;
|
|
594
|
+
break;
|
|
595
|
+
case "foregroundColor":
|
|
596
|
+
if (t.length > 0)
|
|
597
|
+
return `color: ${this.expressionToString(t[0])}`;
|
|
598
|
+
break;
|
|
599
|
+
case "font":
|
|
600
|
+
if (t.length > 0)
|
|
601
|
+
return `fontSize: ${this.expressionToString(t[0])}`;
|
|
602
|
+
break;
|
|
603
|
+
case "cornerRadius":
|
|
604
|
+
if (t.length > 0)
|
|
605
|
+
return `borderRadius: ${this.expressionToString(t[0])}px`;
|
|
606
|
+
break;
|
|
607
|
+
case "opacity":
|
|
608
|
+
if (t.length > 0)
|
|
609
|
+
return `opacity: ${this.expressionToString(t[0])}`;
|
|
610
|
+
break;
|
|
611
|
+
case "frame":
|
|
612
|
+
if (t.length >= 2)
|
|
613
|
+
return null;
|
|
614
|
+
break;
|
|
615
|
+
}
|
|
616
|
+
return null;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Helper methods
|
|
620
|
+
*/
|
|
621
|
+
getTextContent(e) {
|
|
622
|
+
if (e.length === 0) return '""';
|
|
623
|
+
const t = e[0];
|
|
624
|
+
return t.type === "Literal" ? `"${t.value}"` : this.expressionToString(t);
|
|
625
|
+
}
|
|
626
|
+
expressionToString(e) {
|
|
627
|
+
switch (e.type) {
|
|
628
|
+
case "Literal": {
|
|
629
|
+
const t = e;
|
|
630
|
+
return typeof t.value == "string" ? `"${t.value}"` : String(t.value);
|
|
631
|
+
}
|
|
632
|
+
case "Identifier":
|
|
633
|
+
return e.name;
|
|
634
|
+
default:
|
|
635
|
+
return '""';
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
isReactiveExpression(e) {
|
|
639
|
+
return e.includes("()") || !e.startsWith('"') && !e.match(/^\d+$/);
|
|
640
|
+
}
|
|
641
|
+
createVariable(e) {
|
|
642
|
+
const t = `${e}${this.variables.length + 1}`;
|
|
643
|
+
return this.variables.push(t), t;
|
|
644
|
+
}
|
|
645
|
+
getLastVariable() {
|
|
646
|
+
return this.variables.length > 0 ? this.variables[this.variables.length - 1] : null;
|
|
647
|
+
}
|
|
648
|
+
addImport(e, t) {
|
|
649
|
+
this.imports.add(`import { ${e} } from '${t}'`);
|
|
650
|
+
}
|
|
651
|
+
addLine(e) {
|
|
652
|
+
const t = " ".repeat(this.indentLevel);
|
|
653
|
+
this.code.push(t + e);
|
|
654
|
+
}
|
|
655
|
+
addEmptyLine() {
|
|
656
|
+
this.code.push("");
|
|
657
|
+
}
|
|
658
|
+
indent() {
|
|
659
|
+
this.indentLevel++;
|
|
660
|
+
}
|
|
661
|
+
dedent() {
|
|
662
|
+
this.indentLevel = Math.max(0, this.indentLevel - 1);
|
|
663
|
+
}
|
|
664
|
+
buildFinalCode() {
|
|
665
|
+
const e = Array.from(this.imports).join(`
|
|
666
|
+
`), t = this.code.join(`
|
|
667
|
+
`);
|
|
668
|
+
return `${e}
|
|
669
|
+
|
|
670
|
+
${t}`;
|
|
671
|
+
}
|
|
672
|
+
generateSourceMap() {
|
|
673
|
+
return null;
|
|
674
|
+
}
|
|
675
|
+
reset() {
|
|
676
|
+
this.imports.clear(), this.variables = [], this.code = [], this.indentLevel = 0;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
var v = Object.defineProperty, $ = (r, e, t) => e in r ? v(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, d = (r, e, t) => $(r, typeof e != "symbol" ? e + "" : e, t);
|
|
680
|
+
class C {
|
|
681
|
+
constructor(e) {
|
|
682
|
+
d(this, "options"), d(this, "imports", /* @__PURE__ */ new Set()), d(this, "variables", []), d(this, "code", []), d(this, "indentLevel", 0), d(this, "dependencies", /* @__PURE__ */ new Set()), d(this, "exports", /* @__PURE__ */ new Set()), this.options = e;
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Generate enhanced reactive DOM code from AST
|
|
686
|
+
*/
|
|
687
|
+
generate(e) {
|
|
688
|
+
return this.reset(), this.addImport(
|
|
689
|
+
"createSignal, createEffect, createComputed, createRoot, batch",
|
|
690
|
+
"@tachui/core/reactive"
|
|
691
|
+
), e.forEach((i) => this.generateEnhancedNode(i)), this.generateMountFunction(), {
|
|
692
|
+
code: this.buildFinalCode(),
|
|
693
|
+
map: this.options.sourceMaps ? this.generateSourceMap() : void 0,
|
|
694
|
+
dependencies: Array.from(this.dependencies),
|
|
695
|
+
exports: Array.from(this.exports)
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Generate code for enhanced AST nodes
|
|
700
|
+
*/
|
|
701
|
+
generateEnhancedNode(e) {
|
|
702
|
+
switch (e.type) {
|
|
703
|
+
case "Component":
|
|
704
|
+
this.generateEnhancedComponent(e);
|
|
705
|
+
break;
|
|
706
|
+
case "Conditional":
|
|
707
|
+
this.generateConditionalRendering(e);
|
|
708
|
+
break;
|
|
709
|
+
case "ForEach":
|
|
710
|
+
this.generateListRendering(e);
|
|
711
|
+
break;
|
|
712
|
+
case "PropertyWrapper":
|
|
713
|
+
this.generatePropertyWrapper(e);
|
|
714
|
+
break;
|
|
715
|
+
case "StateBinding":
|
|
716
|
+
this.generateStateBinding(e);
|
|
717
|
+
break;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Generate conditional rendering with reactive effects
|
|
722
|
+
*/
|
|
723
|
+
generateConditionalRendering(e) {
|
|
724
|
+
const t = this.createVariable("condition"), i = this.createVariable("conditionalContainer");
|
|
725
|
+
this.addLine("// Conditional rendering"), this.addLine(`const ${i} = document.createElement('div')`), this.addLine(`${i}.className = 'tachui-conditional'`);
|
|
726
|
+
const s = this.expressionToCode(e.condition);
|
|
727
|
+
this.addLine(`const ${t} = createComputed(() => ${s})`), this.addLine("createEffect(() => {"), this.indent(), this.addLine("// Clear previous content"), this.addLine(`${i}.innerHTML = ''`), this.addEmptyLine(), this.addLine(`if (${t}()) {`), this.indent(), this.addLine("// Render then body"), e.thenBody.forEach((n) => {
|
|
728
|
+
this.generateEnhancedNode(n);
|
|
729
|
+
const a = this.getLastVariable();
|
|
730
|
+
a && this.addLine(`${i}.appendChild(${a})`);
|
|
731
|
+
}), this.dedent(), e.elseBody && e.elseBody.length > 0 && (this.addLine("} else {"), this.indent(), this.addLine("// Render else body"), e.elseBody.forEach((n) => {
|
|
732
|
+
this.generateEnhancedNode(n);
|
|
733
|
+
const a = this.getLastVariable();
|
|
734
|
+
a && this.addLine(`${i}.appendChild(${a})`);
|
|
735
|
+
}), this.dedent()), this.addLine("}"), this.dedent(), this.addLine("})"), this.addEmptyLine();
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Generate list rendering with keyed updates
|
|
739
|
+
*/
|
|
740
|
+
generateListRendering(e) {
|
|
741
|
+
const t = this.createVariable("listContainer"), i = this.createVariable("items"), s = this.createVariable("renderedItems");
|
|
742
|
+
this.addLine("// List rendering with keyed updates"), this.addLine(`const ${t} = document.createElement('div')`), this.addLine(`${t}.className = 'tachui-list'`), this.addLine(`let ${s} = new Map()`);
|
|
743
|
+
const n = this.expressionToCode(e.iterable);
|
|
744
|
+
if (this.addLine(`const ${i} = createComputed(() => ${n})`), this.addLine("createEffect(() => {"), this.indent(), this.addLine(`const currentItems = ${i}()`), this.addLine("const newRenderedItems = new Map()"), this.addEmptyLine(), this.addLine("// Update existing items and create new ones"), this.addLine(`currentItems.forEach((${e.itemIdentifier}, index) => {`), this.indent(), this.options.generateKeyedLists) {
|
|
745
|
+
this.addLine(`const key = ${e.itemIdentifier}.id || index`), this.addLine(`let itemElement = ${s}.get(key)`), this.addEmptyLine(), this.addLine("if (!itemElement) {"), this.indent(), this.addLine("// Create new item element"), this.generateListItemContent(e);
|
|
746
|
+
const a = this.getLastVariable();
|
|
747
|
+
this.addLine(`itemElement = ${a}`), this.dedent(), this.addLine("}"), this.addEmptyLine(), this.addLine("newRenderedItems.set(key, itemElement)"), this.addLine(`${t}.appendChild(itemElement)`);
|
|
748
|
+
} else {
|
|
749
|
+
this.addLine("// Simple list item generation"), this.generateListItemContent(e);
|
|
750
|
+
const a = this.getLastVariable();
|
|
751
|
+
this.addLine(`${t}.appendChild(${a})`);
|
|
752
|
+
}
|
|
753
|
+
this.dedent(), this.addLine("})"), this.addEmptyLine(), this.options.generateKeyedLists && (this.addLine("// Remove items that are no longer in the list"), this.addLine(`${s}.forEach((element, key) => {`), this.indent(), this.addLine("if (!newRenderedItems.has(key)) {"), this.indent(), this.addLine("element.remove()"), this.dedent(), this.addLine("}"), this.dedent(), this.addLine("})"), this.addEmptyLine(), this.addLine(`${s} = newRenderedItems`)), this.dedent(), this.addLine("})"), this.addEmptyLine();
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Generate content for list items
|
|
757
|
+
*/
|
|
758
|
+
generateListItemContent(e) {
|
|
759
|
+
this.addLine("// List item content"), e.body.forEach((t) => {
|
|
760
|
+
this.generateEnhancedNode(t);
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Generate property wrapper code
|
|
765
|
+
*/
|
|
766
|
+
generatePropertyWrapper(e) {
|
|
767
|
+
const { wrapper: t, identifier: i, initialValue: s } = e;
|
|
768
|
+
switch (this.addLine(`// @${t} property wrapper`), t) {
|
|
769
|
+
case "State": {
|
|
770
|
+
const n = s ? this.expressionToCode(s) : "undefined";
|
|
771
|
+
this.addLine(
|
|
772
|
+
`const [${i}, set${this.capitalize(i)}] = createSignal(${n})`
|
|
773
|
+
), this.dependencies.add(i);
|
|
774
|
+
break;
|
|
775
|
+
}
|
|
776
|
+
case "Computed":
|
|
777
|
+
if (s) {
|
|
778
|
+
const n = this.expressionToCode(s);
|
|
779
|
+
this.addLine(`const ${i} = createComputed(() => ${n})`), this.dependencies.add(i);
|
|
780
|
+
}
|
|
781
|
+
break;
|
|
782
|
+
case "Effect":
|
|
783
|
+
if (s) {
|
|
784
|
+
const n = this.expressionToCode(s);
|
|
785
|
+
this.addLine(`const ${i} = createEffect(() => ${n})`);
|
|
786
|
+
}
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
this.addEmptyLine();
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Generate state binding code
|
|
793
|
+
*/
|
|
794
|
+
generateStateBinding(e) {
|
|
795
|
+
this.addLine(`// State binding: $${e.identifier}`), this.addLine(`const ${e.identifier}Binding = {`), this.indent(), this.addLine(`get: () => ${e.identifier}(),`), this.addLine(`set: set${this.capitalize(e.identifier)}`), this.dedent(), this.addLine("}"), this.addEmptyLine();
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Generate enhanced component with reactive features
|
|
799
|
+
*/
|
|
800
|
+
generateEnhancedComponent(e) {
|
|
801
|
+
switch (e.name) {
|
|
802
|
+
case "VStack":
|
|
803
|
+
case "HStack":
|
|
804
|
+
case "ZStack":
|
|
805
|
+
this.generateEnhancedStackComponent(e);
|
|
806
|
+
break;
|
|
807
|
+
case "Text":
|
|
808
|
+
this.generateEnhancedTextComponent(e);
|
|
809
|
+
break;
|
|
810
|
+
case "Button":
|
|
811
|
+
this.generateEnhancedButtonComponent(e);
|
|
812
|
+
break;
|
|
813
|
+
case "TextField":
|
|
814
|
+
this.generateEnhancedTextFieldComponent(e);
|
|
815
|
+
break;
|
|
816
|
+
default:
|
|
817
|
+
this.generateEnhancedGenericComponent(e);
|
|
818
|
+
break;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Generate enhanced stack component with reactive children
|
|
823
|
+
*/
|
|
824
|
+
generateEnhancedStackComponent(e) {
|
|
825
|
+
const t = e.name.toLowerCase().replace("stack", ""), i = this.createVariable("container");
|
|
826
|
+
this.addLine(`// Enhanced ${e.name} component`), this.addLine(`const ${i} = document.createElement('div')`), this.addLine(
|
|
827
|
+
`${i}.className = 'tachui-${t} ${this.generateStackClasses(e.name)}'`
|
|
828
|
+
), this.addLine("// Reactive children management"), e.children.forEach((s) => {
|
|
829
|
+
this.generateEnhancedNode(s);
|
|
830
|
+
const n = this.getLastVariable();
|
|
831
|
+
n && this.addLine(`${i}.appendChild(${n})`);
|
|
832
|
+
}), this.generateEnhancedModifiers(e.modifiers, i), this.addEmptyLine();
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* Generate enhanced text component with reactive content
|
|
836
|
+
*/
|
|
837
|
+
generateEnhancedTextComponent(e) {
|
|
838
|
+
const t = this.createVariable("textElement"), i = this.getTextContent(e.children);
|
|
839
|
+
this.addLine("// Enhanced Text component"), this.addLine(`const ${t} = document.createElement('span')`), this.addLine(`${t}.className = 'tachui-text'`), this.isReactiveExpression(i) ? (this.addLine("createEffect(() => {"), this.indent(), this.addLine(`${t}.textContent = String(${i})`), this.dedent(), this.addLine("})")) : this.addLine(`${t}.textContent = ${i}`), this.generateEnhancedModifiers(e.modifiers, t), this.addEmptyLine();
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Generate enhanced button component
|
|
843
|
+
*/
|
|
844
|
+
generateEnhancedButtonComponent(e) {
|
|
845
|
+
const t = this.createVariable("buttonElement"), i = this.getTextContent(e.children);
|
|
846
|
+
this.addLine("// Enhanced Button component"), this.addLine(`const ${t} = document.createElement('button')`), this.addLine(`${t}.className = 'tachui-button'`), this.isReactiveExpression(i) ? (this.addLine("createEffect(() => {"), this.indent(), this.addLine(`${t}.textContent = String(${i})`), this.dedent(), this.addLine("})")) : this.addLine(`${t}.textContent = ${i}`), this.generateEnhancedModifiers(e.modifiers, t), this.addEmptyLine();
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Generate enhanced TextField component with two-way binding
|
|
850
|
+
*/
|
|
851
|
+
generateEnhancedTextFieldComponent(e) {
|
|
852
|
+
const t = this.createVariable("textFieldElement"), i = e.children.length > 0 ? this.getTextContent([e.children[0]]) : '""';
|
|
853
|
+
this.addLine("// Enhanced TextField component"), this.addLine(`const ${t} = document.createElement('input')`), this.addLine(`${t}.type = 'text'`), this.addLine(`${t}.className = 'tachui-textfield'`), this.addLine(`${t}.placeholder = ${i}`);
|
|
854
|
+
const s = e.children.find((n) => n.type === "StateBinding");
|
|
855
|
+
s && (this.addLine("// Two-way data binding"), this.addLine("createEffect(() => {"), this.indent(), this.addLine(`${t}.value = String(${s.identifier}() || '')`), this.dedent(), this.addLine("})"), this.addLine(`${t}.addEventListener('input', (e) => {`), this.indent(), this.addLine(`set${this.capitalize(s.identifier)}(e.target.value)`), this.dedent(), this.addLine("})")), this.generateEnhancedModifiers(e.modifiers, t), this.addEmptyLine();
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Generate enhanced generic component
|
|
859
|
+
*/
|
|
860
|
+
generateEnhancedGenericComponent(e) {
|
|
861
|
+
const t = this.createVariable("element");
|
|
862
|
+
this.addLine(`// Enhanced ${e.name} component`), this.addLine(`const ${t} = document.createElement('div')`), this.addLine(`${t}.className = 'tachui-${e.name.toLowerCase()}'`), e.children.forEach((i) => {
|
|
863
|
+
this.generateEnhancedNode(i);
|
|
864
|
+
const s = this.getLastVariable();
|
|
865
|
+
s && this.addLine(`${t}.appendChild(${s})`);
|
|
866
|
+
}), this.generateEnhancedModifiers(e.modifiers, t), this.addEmptyLine();
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Generate enhanced modifiers with reactive updates
|
|
870
|
+
*/
|
|
871
|
+
generateEnhancedModifiers(e, t) {
|
|
872
|
+
if (e.length === 0) return;
|
|
873
|
+
const i = [], s = [], n = [];
|
|
874
|
+
e.forEach((a) => {
|
|
875
|
+
const h = this.convertModifierToStyle(a);
|
|
876
|
+
h && (this.modifierHasReactiveContent(a) ? s.push(h) : i.push(h));
|
|
877
|
+
const o = this.convertModifierToHandler(a, t);
|
|
878
|
+
o && n.push(o);
|
|
879
|
+
}), i.length > 0 && (this.addLine(`Object.assign(${t}.style, {`), this.indent(), i.forEach((a) => this.addLine(`${a},`)), this.dedent(), this.addLine("})")), s.length > 0 && (this.addLine("createEffect(() => {"), this.indent(), this.addLine(`Object.assign(${t}.style, {`), this.indent(), s.forEach((a) => this.addLine(`${a},`)), this.dedent(), this.addLine("})"), this.dedent(), this.addLine("})")), n.forEach((a) => this.addLine(a));
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Generate component mount function
|
|
883
|
+
*/
|
|
884
|
+
generateMountFunction() {
|
|
885
|
+
if (this.addLine("// Component mount function"), this.addLine("export function mountComponent(container) {"), this.indent(), this.addLine("return createRoot(() => {"), this.indent(), this.variables.length > 0) {
|
|
886
|
+
const e = this.variables[this.variables.length - 1];
|
|
887
|
+
this.addLine(`container.appendChild(${e})`), this.addLine(`return () => container.removeChild(${e})`);
|
|
888
|
+
}
|
|
889
|
+
this.dedent(), this.addLine("})"), this.dedent(), this.addLine("}"), this.exports.add("mountComponent");
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* Helper methods
|
|
893
|
+
*/
|
|
894
|
+
expressionToCode(e) {
|
|
895
|
+
switch (e.type) {
|
|
896
|
+
case "Literal": {
|
|
897
|
+
const t = e;
|
|
898
|
+
return typeof t.value == "string" ? `"${t.value}"` : String(t.value);
|
|
899
|
+
}
|
|
900
|
+
case "Identifier":
|
|
901
|
+
return e.name;
|
|
902
|
+
case "CallExpression": {
|
|
903
|
+
const t = e, i = t.arguments.map((s) => this.expressionToCode(s)).join(", ");
|
|
904
|
+
return `${this.expressionToCode(t.callee)}(${i})`;
|
|
905
|
+
}
|
|
906
|
+
case "MemberExpression": {
|
|
907
|
+
const t = e;
|
|
908
|
+
return `${t.object}.${t.property}`;
|
|
909
|
+
}
|
|
910
|
+
case "ArrayExpression":
|
|
911
|
+
return `[${e.elements.map((s) => this.expressionToCode(s)).join(", ")}]`;
|
|
912
|
+
default:
|
|
913
|
+
return '""';
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
getTextContent(e) {
|
|
917
|
+
if (e.length === 0) return '""';
|
|
918
|
+
const t = e[0];
|
|
919
|
+
return t.type === "Literal" || t.type === "Identifier" || t.type === "CallExpression" || t.type === "MemberExpression" || t.type === "ArrayExpression" ? this.expressionToCode(t) : '""';
|
|
920
|
+
}
|
|
921
|
+
isReactiveExpression(e) {
|
|
922
|
+
return e.includes("()") || e.includes("get") || !e.startsWith('"') && !e.match(/^\d+$/);
|
|
923
|
+
}
|
|
924
|
+
modifierHasReactiveContent(e) {
|
|
925
|
+
return e.arguments.some((t) => {
|
|
926
|
+
const i = this.expressionToCode(t);
|
|
927
|
+
return this.isReactiveExpression(i);
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
convertModifierToStyle(e) {
|
|
931
|
+
const t = e.arguments;
|
|
932
|
+
switch (e.name) {
|
|
933
|
+
case "padding":
|
|
934
|
+
return `padding: ${t.length > 0 ? this.expressionToCode(t[0]) : '"8px"'}`;
|
|
935
|
+
case "background":
|
|
936
|
+
if (t.length > 0)
|
|
937
|
+
return `backgroundColor: ${this.expressionToCode(t[0])}`;
|
|
938
|
+
break;
|
|
939
|
+
case "foregroundColor":
|
|
940
|
+
if (t.length > 0)
|
|
941
|
+
return `color: ${this.expressionToCode(t[0])}`;
|
|
942
|
+
break;
|
|
943
|
+
case "font":
|
|
944
|
+
if (t.length > 0)
|
|
945
|
+
return `fontSize: ${this.expressionToCode(t[0])}`;
|
|
946
|
+
break;
|
|
947
|
+
case "cornerRadius":
|
|
948
|
+
if (t.length > 0)
|
|
949
|
+
return `borderRadius: ${this.expressionToCode(t[0])}px`;
|
|
950
|
+
break;
|
|
951
|
+
case "opacity":
|
|
952
|
+
if (t.length > 0)
|
|
953
|
+
return `opacity: ${this.expressionToCode(t[0])}`;
|
|
954
|
+
break;
|
|
955
|
+
}
|
|
956
|
+
return null;
|
|
957
|
+
}
|
|
958
|
+
convertModifierToHandler(e, t) {
|
|
959
|
+
if (e.name === "onTapGesture" && e.arguments.length > 0) {
|
|
960
|
+
const i = this.expressionToCode(e.arguments[0]);
|
|
961
|
+
return `${t}.addEventListener('click', ${i})`;
|
|
962
|
+
}
|
|
963
|
+
return null;
|
|
964
|
+
}
|
|
965
|
+
generateStackClasses(e) {
|
|
966
|
+
switch (e) {
|
|
967
|
+
case "VStack":
|
|
968
|
+
return "flex flex-col";
|
|
969
|
+
case "HStack":
|
|
970
|
+
return "flex flex-row";
|
|
971
|
+
case "ZStack":
|
|
972
|
+
return "relative";
|
|
973
|
+
default:
|
|
974
|
+
return "flex";
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
capitalize(e) {
|
|
978
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
979
|
+
}
|
|
980
|
+
createVariable(e) {
|
|
981
|
+
const t = `${e}${this.variables.length + 1}`;
|
|
982
|
+
return this.variables.push(t), t;
|
|
983
|
+
}
|
|
984
|
+
getLastVariable() {
|
|
985
|
+
return this.variables.length > 0 ? this.variables[this.variables.length - 1] : null;
|
|
986
|
+
}
|
|
987
|
+
addImport(e, t) {
|
|
988
|
+
this.imports.add(`import { ${e} } from '${t}'`);
|
|
989
|
+
}
|
|
990
|
+
addLine(e) {
|
|
991
|
+
const t = " ".repeat(this.indentLevel);
|
|
992
|
+
this.code.push(t + e);
|
|
993
|
+
}
|
|
994
|
+
addEmptyLine() {
|
|
995
|
+
this.code.push("");
|
|
996
|
+
}
|
|
997
|
+
indent() {
|
|
998
|
+
this.indentLevel++;
|
|
999
|
+
}
|
|
1000
|
+
dedent() {
|
|
1001
|
+
this.indentLevel = Math.max(0, this.indentLevel - 1);
|
|
1002
|
+
}
|
|
1003
|
+
buildFinalCode() {
|
|
1004
|
+
const e = Array.from(this.imports).join(`
|
|
1005
|
+
`), t = this.code.join(`
|
|
1006
|
+
`);
|
|
1007
|
+
return `${e}
|
|
1008
|
+
|
|
1009
|
+
${t}`;
|
|
1010
|
+
}
|
|
1011
|
+
generateSourceMap() {
|
|
1012
|
+
return null;
|
|
1013
|
+
}
|
|
1014
|
+
reset() {
|
|
1015
|
+
this.imports.clear(), this.variables = [], this.code = [], this.indentLevel = 0, this.dependencies.clear(), this.exports.clear();
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
function V(r, e = {}) {
|
|
1019
|
+
return new C(e).generate(r);
|
|
1020
|
+
}
|
|
1021
|
+
var b = Object.defineProperty, y = (r, e, t) => e in r ? b(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, l = (r, e, t) => y(r, typeof e != "symbol" ? e + "" : e, t);
|
|
1022
|
+
function x(r, e) {
|
|
1023
|
+
return new S(r, e).parse();
|
|
1024
|
+
}
|
|
1025
|
+
class S {
|
|
1026
|
+
constructor(e, t) {
|
|
1027
|
+
l(this, "code"), l(this, "filename"), l(this, "position", 0), l(this, "line", 1), l(this, "column", 1), this.code = e, this.filename = t;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Main parsing entry point
|
|
1031
|
+
*/
|
|
1032
|
+
parse() {
|
|
1033
|
+
const e = [];
|
|
1034
|
+
for (; !this.isAtEnd() && (this.skipWhitespace(), !this.isAtEnd()); ) {
|
|
1035
|
+
const t = this.parseNode();
|
|
1036
|
+
t && e.push(t);
|
|
1037
|
+
}
|
|
1038
|
+
return e;
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Parse a single AST node
|
|
1042
|
+
*/
|
|
1043
|
+
parseNode() {
|
|
1044
|
+
const e = this.currentPosition();
|
|
1045
|
+
return this.isComponentStart() ? this.parseComponent(e) : (this.advance(), null);
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* Parse a SwiftUI component (VStack, Text, Button, etc.)
|
|
1049
|
+
*/
|
|
1050
|
+
parseComponent(e) {
|
|
1051
|
+
const t = this.parseIdentifier();
|
|
1052
|
+
if (!t)
|
|
1053
|
+
throw new Error(`Expected component name at line ${this.line}`);
|
|
1054
|
+
this.skipWhitespace();
|
|
1055
|
+
const i = [], s = [];
|
|
1056
|
+
if (this.peek() === "{") {
|
|
1057
|
+
for (this.advance(), this.skipWhitespace(); !this.isAtEnd() && this.peek() !== "}"; ) {
|
|
1058
|
+
this.skipWhitespace();
|
|
1059
|
+
const a = this.parseNode();
|
|
1060
|
+
a && i.push(a);
|
|
1061
|
+
}
|
|
1062
|
+
this.peek() === "}" && this.advance();
|
|
1063
|
+
} else if (this.peek() === "(") {
|
|
1064
|
+
this.advance(), this.skipWhitespace();
|
|
1065
|
+
const a = this.parseExpression();
|
|
1066
|
+
a && i.push(a), this.skipWhitespace(), this.peek() === ")" && this.advance();
|
|
1067
|
+
}
|
|
1068
|
+
for (this.skipWhitespace(); this.peek() === "."; ) {
|
|
1069
|
+
const a = this.parseModifier();
|
|
1070
|
+
a && s.push(a), this.skipWhitespace();
|
|
1071
|
+
}
|
|
1072
|
+
const n = this.currentPosition();
|
|
1073
|
+
return {
|
|
1074
|
+
type: "Component",
|
|
1075
|
+
name: t,
|
|
1076
|
+
children: i,
|
|
1077
|
+
modifiers: s,
|
|
1078
|
+
loc: {
|
|
1079
|
+
start: e,
|
|
1080
|
+
end: n,
|
|
1081
|
+
source: this.filename
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Parse a modifier (.padding(), .background(), etc.)
|
|
1087
|
+
*/
|
|
1088
|
+
parseModifier() {
|
|
1089
|
+
if (this.peek() !== ".") return null;
|
|
1090
|
+
const e = this.currentPosition();
|
|
1091
|
+
this.advance();
|
|
1092
|
+
const t = this.parseIdentifier();
|
|
1093
|
+
if (!t) return null;
|
|
1094
|
+
const i = [];
|
|
1095
|
+
if (this.peek() === "(") {
|
|
1096
|
+
for (this.advance(), this.skipWhitespace(); !this.isAtEnd() && this.peek() !== ")"; ) {
|
|
1097
|
+
const n = this.parseExpression();
|
|
1098
|
+
n && i.push(n), this.skipWhitespace(), this.peek() === "," && (this.advance(), this.skipWhitespace());
|
|
1099
|
+
}
|
|
1100
|
+
this.peek() === ")" && this.advance();
|
|
1101
|
+
}
|
|
1102
|
+
const s = this.currentPosition();
|
|
1103
|
+
return {
|
|
1104
|
+
type: "Modifier",
|
|
1105
|
+
name: t,
|
|
1106
|
+
arguments: i,
|
|
1107
|
+
loc: {
|
|
1108
|
+
start: e,
|
|
1109
|
+
end: s,
|
|
1110
|
+
source: this.filename
|
|
1111
|
+
}
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* Parse an expression (literal, identifier, function call)
|
|
1116
|
+
*/
|
|
1117
|
+
parseExpression() {
|
|
1118
|
+
this.skipWhitespace();
|
|
1119
|
+
const e = this.currentPosition();
|
|
1120
|
+
if (this.peek() === '"' || this.peek() === "'")
|
|
1121
|
+
return this.parseStringLiteral(e);
|
|
1122
|
+
if (this.isDigit(this.peek()))
|
|
1123
|
+
return this.parseNumberLiteral(e);
|
|
1124
|
+
if (this.match("true") || this.match("false")) {
|
|
1125
|
+
const i = this.code.slice(e.offset, this.position);
|
|
1126
|
+
return {
|
|
1127
|
+
type: "Literal",
|
|
1128
|
+
value: i === "true",
|
|
1129
|
+
raw: i,
|
|
1130
|
+
loc: {
|
|
1131
|
+
start: e,
|
|
1132
|
+
end: this.currentPosition(),
|
|
1133
|
+
source: this.filename
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
}
|
|
1137
|
+
const t = this.parseIdentifier();
|
|
1138
|
+
if (t) {
|
|
1139
|
+
const i = this.currentPosition();
|
|
1140
|
+
return {
|
|
1141
|
+
type: "Identifier",
|
|
1142
|
+
name: t,
|
|
1143
|
+
loc: {
|
|
1144
|
+
start: e,
|
|
1145
|
+
end: i,
|
|
1146
|
+
source: this.filename
|
|
1147
|
+
}
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
return null;
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Parse a string literal
|
|
1154
|
+
*/
|
|
1155
|
+
parseStringLiteral(e) {
|
|
1156
|
+
const t = this.peek();
|
|
1157
|
+
this.advance();
|
|
1158
|
+
let i = "";
|
|
1159
|
+
for (; !this.isAtEnd() && this.peek() !== t; )
|
|
1160
|
+
if (this.peek() === "\\") {
|
|
1161
|
+
this.advance();
|
|
1162
|
+
const n = this.peek();
|
|
1163
|
+
switch (n) {
|
|
1164
|
+
case "n":
|
|
1165
|
+
i += `
|
|
1166
|
+
`;
|
|
1167
|
+
break;
|
|
1168
|
+
case "t":
|
|
1169
|
+
i += " ";
|
|
1170
|
+
break;
|
|
1171
|
+
case "r":
|
|
1172
|
+
i += "\r";
|
|
1173
|
+
break;
|
|
1174
|
+
case "\\":
|
|
1175
|
+
i += "\\";
|
|
1176
|
+
break;
|
|
1177
|
+
case '"':
|
|
1178
|
+
i += '"';
|
|
1179
|
+
break;
|
|
1180
|
+
case "'":
|
|
1181
|
+
i += "'";
|
|
1182
|
+
break;
|
|
1183
|
+
default:
|
|
1184
|
+
i += n;
|
|
1185
|
+
break;
|
|
1186
|
+
}
|
|
1187
|
+
this.advance();
|
|
1188
|
+
} else
|
|
1189
|
+
i += this.peek(), this.advance();
|
|
1190
|
+
this.peek() === t && this.advance();
|
|
1191
|
+
const s = this.code.slice(e.offset, this.position);
|
|
1192
|
+
return {
|
|
1193
|
+
type: "Literal",
|
|
1194
|
+
value: i,
|
|
1195
|
+
raw: s,
|
|
1196
|
+
loc: {
|
|
1197
|
+
start: e,
|
|
1198
|
+
end: this.currentPosition(),
|
|
1199
|
+
source: this.filename
|
|
1200
|
+
}
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* Parse a number literal
|
|
1205
|
+
*/
|
|
1206
|
+
parseNumberLiteral(e) {
|
|
1207
|
+
let t = "";
|
|
1208
|
+
for (; !this.isAtEnd() && (this.isDigit(this.peek()) || this.peek() === "."); )
|
|
1209
|
+
t += this.peek(), this.advance();
|
|
1210
|
+
return {
|
|
1211
|
+
type: "Literal",
|
|
1212
|
+
value: t.includes(".") ? parseFloat(t) : parseInt(t, 10),
|
|
1213
|
+
raw: t,
|
|
1214
|
+
loc: {
|
|
1215
|
+
start: e,
|
|
1216
|
+
end: this.currentPosition(),
|
|
1217
|
+
source: this.filename
|
|
1218
|
+
}
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
/**
|
|
1222
|
+
* Parse an identifier (component name, variable name, etc.)
|
|
1223
|
+
*/
|
|
1224
|
+
parseIdentifier() {
|
|
1225
|
+
if (!this.isAlpha(this.peek()) && this.peek() !== "_")
|
|
1226
|
+
return null;
|
|
1227
|
+
let e = "";
|
|
1228
|
+
for (; !this.isAtEnd() && (this.isAlphaNumeric(this.peek()) || this.peek() === "_"); )
|
|
1229
|
+
e += this.peek(), this.advance();
|
|
1230
|
+
return e;
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* Helper methods
|
|
1234
|
+
*/
|
|
1235
|
+
isComponentStart() {
|
|
1236
|
+
const e = this.position, t = this.line, i = this.column, s = this.parseIdentifier(), n = s && this.isValidComponentName(s);
|
|
1237
|
+
return this.position = e, this.line = t, this.column = i, !!n;
|
|
1238
|
+
}
|
|
1239
|
+
isValidComponentName(e) {
|
|
1240
|
+
return [
|
|
1241
|
+
"VStack",
|
|
1242
|
+
"HStack",
|
|
1243
|
+
"ZStack",
|
|
1244
|
+
"List",
|
|
1245
|
+
"Form",
|
|
1246
|
+
"Text",
|
|
1247
|
+
"Button",
|
|
1248
|
+
"Image",
|
|
1249
|
+
"TextField",
|
|
1250
|
+
"Toggle"
|
|
1251
|
+
].includes(e);
|
|
1252
|
+
}
|
|
1253
|
+
skipWhitespace() {
|
|
1254
|
+
for (; !this.isAtEnd() && this.isWhitespace(this.peek()); )
|
|
1255
|
+
this.peek() === `
|
|
1256
|
+
` ? (this.line++, this.column = 1) : this.column++, this.position++;
|
|
1257
|
+
}
|
|
1258
|
+
match(e) {
|
|
1259
|
+
return this.code.slice(this.position, this.position + e.length) === e ? (this.position += e.length, this.column += e.length, !0) : !1;
|
|
1260
|
+
}
|
|
1261
|
+
peek() {
|
|
1262
|
+
return this.isAtEnd() ? "\0" : this.code[this.position];
|
|
1263
|
+
}
|
|
1264
|
+
advance() {
|
|
1265
|
+
const e = this.peek();
|
|
1266
|
+
return this.isAtEnd() || (this.position++, e === `
|
|
1267
|
+
` ? (this.line++, this.column = 1) : this.column++), e;
|
|
1268
|
+
}
|
|
1269
|
+
isAtEnd() {
|
|
1270
|
+
return this.position >= this.code.length;
|
|
1271
|
+
}
|
|
1272
|
+
isWhitespace(e) {
|
|
1273
|
+
return /\s/.test(e);
|
|
1274
|
+
}
|
|
1275
|
+
isAlpha(e) {
|
|
1276
|
+
return /[a-zA-Z]/.test(e);
|
|
1277
|
+
}
|
|
1278
|
+
isDigit(e) {
|
|
1279
|
+
return /[0-9]/.test(e);
|
|
1280
|
+
}
|
|
1281
|
+
isAlphaNumeric(e) {
|
|
1282
|
+
return this.isAlpha(e) || this.isDigit(e);
|
|
1283
|
+
}
|
|
1284
|
+
currentPosition() {
|
|
1285
|
+
return {
|
|
1286
|
+
line: this.line,
|
|
1287
|
+
column: this.column,
|
|
1288
|
+
offset: this.position
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
function I(r = {}) {
|
|
1293
|
+
const {
|
|
1294
|
+
include: e = [".tsx", ".ts"],
|
|
1295
|
+
exclude: t = ["node_modules/**", "**/*.test.*", "**/*.bench.*"],
|
|
1296
|
+
dev: i = process.env.NODE_ENV === "development",
|
|
1297
|
+
transform: s = {}
|
|
1298
|
+
} = r;
|
|
1299
|
+
return {
|
|
1300
|
+
name: "tachui-transform",
|
|
1301
|
+
enforce: "pre",
|
|
1302
|
+
// Run before other plugins
|
|
1303
|
+
configResolved(n) {
|
|
1304
|
+
i && n.command === "serve" && console.log("🚀 TachUI plugin loaded in development mode");
|
|
1305
|
+
},
|
|
1306
|
+
buildStart() {
|
|
1307
|
+
this.addWatchFile("tachui.config.ts");
|
|
1308
|
+
},
|
|
1309
|
+
resolveId(n) {
|
|
1310
|
+
return n === "virtual:tachui-runtime" ? n : null;
|
|
1311
|
+
},
|
|
1312
|
+
load(n) {
|
|
1313
|
+
return n === "virtual:tachui-runtime" ? W() : null;
|
|
1314
|
+
},
|
|
1315
|
+
transform(n, a) {
|
|
1316
|
+
if (!w(a, e, t))
|
|
1317
|
+
return null;
|
|
1318
|
+
try {
|
|
1319
|
+
if (!T(n))
|
|
1320
|
+
return null;
|
|
1321
|
+
i && console.log(`🔄 Transforming: ${a}`);
|
|
1322
|
+
const h = x(n, a), o = k(h, {
|
|
1323
|
+
...s,
|
|
1324
|
+
sourceFile: a,
|
|
1325
|
+
sourceMaps: s.sourceMaps ?? i
|
|
1326
|
+
});
|
|
1327
|
+
return {
|
|
1328
|
+
code: o.code,
|
|
1329
|
+
map: o.map
|
|
1330
|
+
};
|
|
1331
|
+
} catch (h) {
|
|
1332
|
+
const o = h instanceof Error ? h.message : String(h);
|
|
1333
|
+
return this.error(`TachUI transformation failed in ${a}: ${o}`), null;
|
|
1334
|
+
}
|
|
1335
|
+
},
|
|
1336
|
+
handleHotUpdate(n) {
|
|
1337
|
+
if (n.file.endsWith(".tui.tsx") || n.file.endsWith(".tui.ts"))
|
|
1338
|
+
return n.server.ws.send({
|
|
1339
|
+
type: "full-reload"
|
|
1340
|
+
}), [];
|
|
1341
|
+
}
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
function w(r, e, t) {
|
|
1345
|
+
return e.some((n) => r.endsWith(n)) ? !t.some((n) => n.includes("**") ? new RegExp(n.replace(/\*\*/g, ".*").replace(/\*/g, "[^/]*")).test(r) : r.includes(n)) : !1;
|
|
1346
|
+
}
|
|
1347
|
+
function T(r) {
|
|
1348
|
+
return [
|
|
1349
|
+
/\b(VStack|HStack|ZStack|List|Form)\s*\{/,
|
|
1350
|
+
/\b(Text|Button|Image|TextField|Toggle)\s*\(/,
|
|
1351
|
+
/\.(padding|background|foregroundColor|font|frame)\s*\(/,
|
|
1352
|
+
/\.onTapGesture\s*\(/
|
|
1353
|
+
].some((t) => t.test(r));
|
|
1354
|
+
}
|
|
1355
|
+
function W() {
|
|
1356
|
+
return `
|
|
1357
|
+
// TachUI Runtime Module
|
|
1358
|
+
// This provides runtime utilities for transformed components
|
|
1359
|
+
|
|
1360
|
+
import { createSignal, createEffect, createComputed } from '@tachui/core/reactive'
|
|
1361
|
+
|
|
1362
|
+
export { createSignal, createEffect, createComputed }
|
|
1363
|
+
|
|
1364
|
+
// Runtime helpers for component lifecycle
|
|
1365
|
+
export function mountComponent(element, render) {
|
|
1366
|
+
const dispose = render()
|
|
1367
|
+
element._tachui_dispose = dispose
|
|
1368
|
+
return dispose
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
export function unmountComponent(element) {
|
|
1372
|
+
if (element._tachui_dispose) {
|
|
1373
|
+
element._tachui_dispose()
|
|
1374
|
+
delete element._tachui_dispose
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
// Hot reload support
|
|
1379
|
+
if (import.meta.hot) {
|
|
1380
|
+
import.meta.hot.accept()
|
|
1381
|
+
|
|
1382
|
+
// Re-mount components on hot reload
|
|
1383
|
+
import.meta.hot.dispose(() => {
|
|
1384
|
+
document.querySelectorAll('[data-tachui-component]').forEach(unmountComponent)
|
|
1385
|
+
})
|
|
1386
|
+
}
|
|
1387
|
+
`;
|
|
1388
|
+
}
|
|
6
1389
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1390
|
+
I as createTachUIPlugin,
|
|
1391
|
+
k as generateDOMCode,
|
|
1392
|
+
V as generateEnhancedDOMCode,
|
|
1393
|
+
A as parseAdvancedSwiftUISyntax,
|
|
11
1394
|
x as parseSwiftUISyntax
|
|
12
1395
|
};
|
|
13
|
-
//# sourceMappingURL=index.js.map
|