@tachui/core 0.7.0-alpha1 → 0.7.1-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +195 -0
- package/dist/ScrollView-h-6wYMAm.js +515 -0
- package/dist/Spacer-BbteDQ9I.js +5337 -0
- package/dist/binding-CmdpowkI.js +2276 -0
- package/dist/bundles/minimal.d.ts +30 -4
- package/dist/bundles/minimal.d.ts.map +1 -1
- package/dist/common.js +825 -954
- package/dist/compiler/index.js +1386 -10
- package/dist/components/index.js +4166 -101
- package/dist/concatenated-component-DPcl2TEO.js +6779 -0
- package/dist/{runtime/context.js → context--zQFIImS.js} +65 -71
- package/dist/debug.js +0 -1
- package/dist/dom-bridge-Cx-s6Ihx.js +406 -0
- package/dist/effect-CytAc9em.js +66 -0
- package/dist/essential.js +825 -954
- package/dist/index-Nfi2SBQh.js +3268 -0
- package/dist/index.js +825 -954
- package/dist/minimal-prod.js +162 -191
- package/dist/minimal.js +183 -957
- package/dist/modifiers/responsive/index.d.ts +10 -9
- package/dist/modifiers/responsive/index.d.ts.map +1 -1
- package/dist/plugins/index.js +543 -32
- package/dist/reactive/index.js +490 -93
- package/dist/runtime/dom-bridge.js +12 -239
- package/dist/runtime/renderer.js +8 -388
- package/dist/scheduler-7SvC3a21.js +814 -0
- package/dist/validation/index.js +6614 -198
- package/dist/viewport/index.js +2002 -83
- package/package.json +3 -4
- package/dist/assets/Asset.cjs +0 -2
- package/dist/assets/Asset.cjs.map +0 -1
- package/dist/assets/Asset.js +0 -9
- package/dist/assets/Asset.js.map +0 -1
- package/dist/assets/AssetCollection.cjs +0 -2
- package/dist/assets/AssetCollection.cjs.map +0 -1
- package/dist/assets/AssetCollection.js +0 -44
- package/dist/assets/AssetCollection.js.map +0 -1
- package/dist/assets/ColorAsset.cjs +0 -2
- package/dist/assets/ColorAsset.cjs.map +0 -1
- package/dist/assets/ColorAsset.js +0 -114
- package/dist/assets/ColorAsset.js.map +0 -1
- package/dist/assets/FontAsset.cjs +0 -9
- package/dist/assets/FontAsset.cjs.map +0 -1
- package/dist/assets/FontAsset.js +0 -173
- package/dist/assets/FontAsset.js.map +0 -1
- package/dist/assets/ImageAsset.cjs +0 -2
- package/dist/assets/ImageAsset.cjs.map +0 -1
- package/dist/assets/ImageAsset.js +0 -39
- package/dist/assets/ImageAsset.js.map +0 -1
- package/dist/assets/index.cjs +0 -2
- package/dist/assets/index.cjs.map +0 -1
- package/dist/assets/index.js +0 -119
- package/dist/assets/index.js.map +0 -1
- package/dist/common.cjs +0 -2
- package/dist/common.cjs.map +0 -1
- package/dist/common.js.map +0 -1
- package/dist/compiler/advanced-parser.cjs +0 -5
- package/dist/compiler/advanced-parser.cjs.map +0 -1
- package/dist/compiler/advanced-parser.js +0 -440
- package/dist/compiler/advanced-parser.js.map +0 -1
- package/dist/compiler/codegen.cjs +0 -6
- package/dist/compiler/codegen.cjs.map +0 -1
- package/dist/compiler/codegen.js +0 -241
- package/dist/compiler/codegen.js.map +0 -1
- package/dist/compiler/enhanced-codegen.cjs +0 -6
- package/dist/compiler/enhanced-codegen.cjs.map +0 -1
- package/dist/compiler/enhanced-codegen.js +0 -347
- package/dist/compiler/enhanced-codegen.js.map +0 -1
- package/dist/compiler/index.cjs +0 -2
- package/dist/compiler/index.cjs.map +0 -1
- package/dist/compiler/index.js.map +0 -1
- package/dist/compiler/parser.cjs +0 -5
- package/dist/compiler/parser.cjs.map +0 -1
- package/dist/compiler/parser.js +0 -275
- package/dist/compiler/parser.js.map +0 -1
- package/dist/compiler/plugin.cjs +0 -33
- package/dist/compiler/plugin.cjs.map +0 -1
- package/dist/compiler/plugin.js +0 -103
- package/dist/compiler/plugin.js.map +0 -1
- package/dist/components/BasicInput.cjs +0 -2
- package/dist/components/BasicInput.cjs.map +0 -1
- package/dist/components/BasicInput.js +0 -182
- package/dist/components/BasicInput.js.map +0 -1
- package/dist/components/Button.cjs +0 -7
- package/dist/components/Button.cjs.map +0 -1
- package/dist/components/Button.js +0 -408
- package/dist/components/Button.js.map +0 -1
- package/dist/components/Divider.cjs +0 -2
- package/dist/components/Divider.cjs.map +0 -1
- package/dist/components/Divider.js +0 -187
- package/dist/components/Divider.js.map +0 -1
- package/dist/components/EnhancedLink.cjs +0 -2
- package/dist/components/EnhancedLink.cjs.map +0 -1
- package/dist/components/EnhancedLink.js +0 -345
- package/dist/components/EnhancedLink.js.map +0 -1
- package/dist/components/Form.cjs +0 -2
- package/dist/components/Form.cjs.map +0 -1
- package/dist/components/Form.js +0 -244
- package/dist/components/Form.js.map +0 -1
- package/dist/components/Grid.cjs +0 -2
- package/dist/components/Grid.cjs.map +0 -1
- package/dist/components/Grid.js +0 -1045
- package/dist/components/Grid.js.map +0 -1
- package/dist/components/GridResponsive.cjs +0 -2
- package/dist/components/GridResponsive.cjs.map +0 -1
- package/dist/components/GridResponsive.js +0 -382
- package/dist/components/GridResponsive.js.map +0 -1
- package/dist/components/Image.cjs +0 -2
- package/dist/components/Image.cjs.map +0 -1
- package/dist/components/Image.js +0 -212
- package/dist/components/Image.js.map +0 -1
- package/dist/components/List.cjs +0 -2
- package/dist/components/List.cjs.map +0 -1
- package/dist/components/List.js +0 -561
- package/dist/components/List.js.map +0 -1
- package/dist/components/Menu.cjs +0 -2
- package/dist/components/Menu.cjs.map +0 -1
- package/dist/components/Menu.js +0 -443
- package/dist/components/Menu.js.map +0 -1
- package/dist/components/Picker.cjs +0 -2
- package/dist/components/Picker.cjs.map +0 -1
- package/dist/components/Picker.js +0 -478
- package/dist/components/Picker.js.map +0 -1
- package/dist/components/ScrollView.cjs +0 -6
- package/dist/components/ScrollView.cjs.map +0 -1
- package/dist/components/ScrollView.js +0 -363
- package/dist/components/ScrollView.js.map +0 -1
- package/dist/components/Section.cjs +0 -2
- package/dist/components/Section.cjs.map +0 -1
- package/dist/components/Section.js +0 -323
- package/dist/components/Section.js.map +0 -1
- package/dist/components/Show.cjs +0 -2
- package/dist/components/Show.cjs.map +0 -1
- package/dist/components/Show.js +0 -112
- package/dist/components/Show.js.map +0 -1
- package/dist/components/Spacer.cjs +0 -2
- package/dist/components/Spacer.cjs.map +0 -1
- package/dist/components/Spacer.js +0 -53
- package/dist/components/Spacer.js.map +0 -1
- package/dist/components/Text.cjs +0 -2
- package/dist/components/Text.cjs.map +0 -1
- package/dist/components/Text.js +0 -193
- package/dist/components/Text.js.map +0 -1
- package/dist/components/Toggle.cjs +0 -2
- package/dist/components/Toggle.cjs.map +0 -1
- package/dist/components/Toggle.js +0 -477
- package/dist/components/Toggle.js.map +0 -1
- package/dist/components/index.cjs +0 -2
- package/dist/components/index.cjs.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/wrapper.cjs +0 -2
- package/dist/components/wrapper.cjs.map +0 -1
- package/dist/components/wrapper.js +0 -484
- package/dist/components/wrapper.js.map +0 -1
- package/dist/concatenation/concatenatable.cjs +0 -2
- package/dist/concatenation/concatenatable.cjs.map +0 -1
- package/dist/concatenation/concatenatable.js +0 -118
- package/dist/concatenation/concatenatable.js.map +0 -1
- package/dist/concatenation/concatenated-component.cjs +0 -2
- package/dist/concatenation/concatenated-component.cjs.map +0 -1
- package/dist/concatenation/concatenated-component.js +0 -276
- package/dist/concatenation/concatenated-component.js.map +0 -1
- package/dist/concatenation/text-optimizer.cjs +0 -2
- package/dist/concatenation/text-optimizer.cjs.map +0 -1
- package/dist/concatenation/text-optimizer.js +0 -236
- package/dist/concatenation/text-optimizer.js.map +0 -1
- package/dist/concatenation/types.cjs +0 -2
- package/dist/concatenation/types.cjs.map +0 -1
- package/dist/concatenation/types.js +0 -13
- package/dist/concatenation/types.js.map +0 -1
- package/dist/constants/frame-utils.cjs +0 -2
- package/dist/constants/frame-utils.cjs.map +0 -1
- package/dist/constants/frame-utils.js +0 -116
- package/dist/constants/frame-utils.js.map +0 -1
- package/dist/constants/layout.cjs +0 -2
- package/dist/constants/layout.cjs.map +0 -1
- package/dist/constants/layout.js +0 -46
- package/dist/constants/layout.js.map +0 -1
- package/dist/css-classes/component-base.cjs +0 -2
- package/dist/css-classes/component-base.cjs.map +0 -1
- package/dist/css-classes/component-base.js +0 -62
- package/dist/css-classes/component-base.js.map +0 -1
- package/dist/css-classes/css-class-manager.cjs +0 -2
- package/dist/css-classes/css-class-manager.cjs.map +0 -1
- package/dist/css-classes/css-class-manager.js +0 -209
- package/dist/css-classes/css-class-manager.js.map +0 -1
- package/dist/css-classes/dom-integration.cjs +0 -2
- package/dist/css-classes/dom-integration.cjs.map +0 -1
- package/dist/css-classes/dom-integration.js +0 -67
- package/dist/css-classes/dom-integration.js.map +0 -1
- package/dist/css-classes/enhanced-renderer.cjs +0 -2
- package/dist/css-classes/enhanced-renderer.cjs.map +0 -1
- package/dist/css-classes/enhanced-renderer.js +0 -73
- package/dist/css-classes/enhanced-renderer.js.map +0 -1
- package/dist/css-classes/utilities.cjs +0 -2
- package/dist/css-classes/utilities.cjs.map +0 -1
- package/dist/css-classes/utilities.js +0 -41
- package/dist/css-classes/utilities.js.map +0 -1
- package/dist/debug.cjs +0 -52
- package/dist/debug.cjs.map +0 -1
- package/dist/debug.js.map +0 -1
- package/dist/essential.cjs +0 -2
- package/dist/essential.cjs.map +0 -1
- package/dist/essential.js.map +0 -1
- package/dist/gradients/css-generator.cjs +0 -2
- package/dist/gradients/css-generator.cjs.map +0 -1
- package/dist/gradients/css-generator.js +0 -100
- package/dist/gradients/css-generator.js.map +0 -1
- package/dist/gradients/examples.cjs +0 -2
- package/dist/gradients/examples.cjs.map +0 -1
- package/dist/gradients/examples.js +0 -555
- package/dist/gradients/examples.js.map +0 -1
- package/dist/gradients/gradient-asset.cjs +0 -2
- package/dist/gradients/gradient-asset.cjs.map +0 -1
- package/dist/gradients/gradient-asset.js +0 -22
- package/dist/gradients/gradient-asset.js.map +0 -1
- package/dist/gradients/index.cjs +0 -2
- package/dist/gradients/index.cjs.map +0 -1
- package/dist/gradients/index.js +0 -78
- package/dist/gradients/index.js.map +0 -1
- package/dist/gradients/performance.cjs +0 -2
- package/dist/gradients/performance.cjs.map +0 -1
- package/dist/gradients/performance.js +0 -237
- package/dist/gradients/performance.js.map +0 -1
- package/dist/gradients/presets.cjs +0 -2
- package/dist/gradients/presets.cjs.map +0 -1
- package/dist/gradients/presets.js +0 -254
- package/dist/gradients/presets.js.map +0 -1
- package/dist/gradients/reactive.cjs +0 -2
- package/dist/gradients/reactive.cjs.map +0 -1
- package/dist/gradients/reactive.js +0 -239
- package/dist/gradients/reactive.js.map +0 -1
- package/dist/gradients/state-gradient-asset.cjs +0 -2
- package/dist/gradients/state-gradient-asset.cjs.map +0 -1
- package/dist/gradients/state-gradient-asset.js +0 -111
- package/dist/gradients/state-gradient-asset.js.map +0 -1
- package/dist/gradients/utils.cjs +0 -2
- package/dist/gradients/utils.cjs.map +0 -1
- package/dist/gradients/utils.js +0 -385
- package/dist/gradients/utils.js.map +0 -1
- package/dist/gradients/validation.cjs +0 -2
- package/dist/gradients/validation.cjs.map +0 -1
- package/dist/gradients/validation.js +0 -209
- package/dist/gradients/validation.js.map +0 -1
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index2.cjs +0 -2
- package/dist/index2.cjs.map +0 -1
- package/dist/index2.js +0 -293
- package/dist/index2.js.map +0 -1
- package/dist/lifecycle/hooks.cjs +0 -2
- package/dist/lifecycle/hooks.cjs.map +0 -1
- package/dist/lifecycle/hooks.js +0 -159
- package/dist/lifecycle/hooks.js.map +0 -1
- package/dist/minimal-prod.cjs +0 -2
- package/dist/minimal-prod.cjs.map +0 -1
- package/dist/minimal-prod.js.map +0 -1
- package/dist/minimal.cjs +0 -2
- package/dist/minimal.cjs.map +0 -1
- package/dist/minimal.js.map +0 -1
- package/dist/modifiers/as-html-validator.cjs +0 -2
- package/dist/modifiers/as-html-validator.cjs.map +0 -1
- package/dist/modifiers/as-html-validator.js +0 -47
- package/dist/modifiers/as-html-validator.js.map +0 -1
- package/dist/modifiers/as-html.cjs +0 -2
- package/dist/modifiers/as-html.cjs.map +0 -1
- package/dist/modifiers/as-html.js +0 -71
- package/dist/modifiers/as-html.js.map +0 -1
- package/dist/modifiers/attributes.cjs +0 -2
- package/dist/modifiers/attributes.cjs.map +0 -1
- package/dist/modifiers/attributes.js +0 -272
- package/dist/modifiers/attributes.js.map +0 -1
- package/dist/modifiers/backdrop.cjs +0 -2
- package/dist/modifiers/backdrop.cjs.map +0 -1
- package/dist/modifiers/backdrop.js +0 -109
- package/dist/modifiers/backdrop.js.map +0 -1
- package/dist/modifiers/background.cjs +0 -2
- package/dist/modifiers/background.cjs.map +0 -1
- package/dist/modifiers/background.js +0 -67
- package/dist/modifiers/background.js.map +0 -1
- package/dist/modifiers/base.cjs +0 -25
- package/dist/modifiers/base.cjs.map +0 -1
- package/dist/modifiers/base.js +0 -745
- package/dist/modifiers/base.js.map +0 -1
- package/dist/modifiers/basic-sanitizer.cjs +0 -2
- package/dist/modifiers/basic-sanitizer.cjs.map +0 -1
- package/dist/modifiers/basic-sanitizer.js +0 -162
- package/dist/modifiers/basic-sanitizer.js.map +0 -1
- package/dist/modifiers/border.cjs +0 -2
- package/dist/modifiers/border.cjs.map +0 -1
- package/dist/modifiers/border.js +0 -160
- package/dist/modifiers/border.js.map +0 -1
- package/dist/modifiers/builder.cjs +0 -2
- package/dist/modifiers/builder.cjs.map +0 -1
- package/dist/modifiers/builder.js +0 -930
- package/dist/modifiers/builder.js.map +0 -1
- package/dist/modifiers/core.cjs +0 -2
- package/dist/modifiers/core.cjs.map +0 -1
- package/dist/modifiers/core.js +0 -398
- package/dist/modifiers/core.js.map +0 -1
- package/dist/modifiers/css.cjs +0 -2
- package/dist/modifiers/css.cjs.map +0 -1
- package/dist/modifiers/css.js +0 -50
- package/dist/modifiers/css.js.map +0 -1
- package/dist/modifiers/effects.cjs +0 -2
- package/dist/modifiers/effects.cjs.map +0 -1
- package/dist/modifiers/effects.js +0 -178
- package/dist/modifiers/effects.js.map +0 -1
- package/dist/modifiers/elements.cjs +0 -2
- package/dist/modifiers/elements.cjs.map +0 -1
- package/dist/modifiers/elements.js +0 -216
- package/dist/modifiers/elements.js.map +0 -1
- package/dist/modifiers/filters.cjs +0 -2
- package/dist/modifiers/filters.cjs.map +0 -1
- package/dist/modifiers/filters.js +0 -223
- package/dist/modifiers/filters.js.map +0 -1
- package/dist/modifiers/flexbox.cjs +0 -2
- package/dist/modifiers/flexbox.cjs.map +0 -1
- package/dist/modifiers/flexbox.js +0 -56
- package/dist/modifiers/flexbox.js.map +0 -1
- package/dist/modifiers/font.cjs +0 -2
- package/dist/modifiers/font.cjs.map +0 -1
- package/dist/modifiers/font.js +0 -60
- package/dist/modifiers/font.js.map +0 -1
- package/dist/modifiers/grid.cjs +0 -2
- package/dist/modifiers/grid.cjs.map +0 -1
- package/dist/modifiers/grid.js +0 -92
- package/dist/modifiers/grid.js.map +0 -1
- package/dist/modifiers/margin.cjs +0 -2
- package/dist/modifiers/margin.cjs.map +0 -1
- package/dist/modifiers/margin.js +0 -65
- package/dist/modifiers/margin.js.map +0 -1
- package/dist/modifiers/padding.cjs +0 -2
- package/dist/modifiers/padding.cjs.map +0 -1
- package/dist/modifiers/padding.js +0 -109
- package/dist/modifiers/padding.js.map +0 -1
- package/dist/modifiers/registry.cjs +0 -2
- package/dist/modifiers/registry.cjs.map +0 -1
- package/dist/modifiers/registry.js +0 -163
- package/dist/modifiers/registry.js.map +0 -1
- package/dist/modifiers/responsive/advanced-utilities.cjs +0 -2
- package/dist/modifiers/responsive/advanced-utilities.cjs.map +0 -1
- package/dist/modifiers/responsive/advanced-utilities.js +0 -291
- package/dist/modifiers/responsive/advanced-utilities.js.map +0 -1
- package/dist/modifiers/responsive/breakpoints.cjs +0 -2
- package/dist/modifiers/responsive/breakpoints.cjs.map +0 -1
- package/dist/modifiers/responsive/breakpoints.js +0 -168
- package/dist/modifiers/responsive/breakpoints.js.map +0 -1
- package/dist/modifiers/responsive/css-generator.cjs +0 -5
- package/dist/modifiers/responsive/css-generator.cjs.map +0 -1
- package/dist/modifiers/responsive/css-generator.js +0 -261
- package/dist/modifiers/responsive/css-generator.js.map +0 -1
- package/dist/modifiers/responsive/dev-tools.cjs +0 -77
- package/dist/modifiers/responsive/dev-tools.cjs.map +0 -1
- package/dist/modifiers/responsive/dev-tools.js +0 -380
- package/dist/modifiers/responsive/dev-tools.js.map +0 -1
- package/dist/modifiers/responsive/layout-patterns.cjs +0 -2
- package/dist/modifiers/responsive/layout-patterns.cjs.map +0 -1
- package/dist/modifiers/responsive/layout-patterns.js +0 -254
- package/dist/modifiers/responsive/layout-patterns.js.map +0 -1
- package/dist/modifiers/responsive/performance.cjs +0 -3
- package/dist/modifiers/responsive/performance.cjs.map +0 -1
- package/dist/modifiers/responsive/performance.js +0 -212
- package/dist/modifiers/responsive/performance.js.map +0 -1
- package/dist/modifiers/responsive/responsive-builder.cjs +0 -2
- package/dist/modifiers/responsive/responsive-builder.cjs.map +0 -1
- package/dist/modifiers/responsive/responsive-builder.js +0 -272
- package/dist/modifiers/responsive/responsive-builder.js.map +0 -1
- package/dist/modifiers/responsive/responsive-modifier.cjs +0 -3
- package/dist/modifiers/responsive/responsive-modifier.cjs.map +0 -1
- package/dist/modifiers/responsive/responsive-modifier.js +0 -204
- package/dist/modifiers/responsive/responsive-modifier.js.map +0 -1
- package/dist/modifiers/responsive/types.cjs +0 -2
- package/dist/modifiers/responsive/types.cjs.map +0 -1
- package/dist/modifiers/responsive/types.js +0 -26
- package/dist/modifiers/responsive/types.js.map +0 -1
- package/dist/modifiers/responsive/utilities.cjs +0 -16
- package/dist/modifiers/responsive/utilities.cjs.map +0 -1
- package/dist/modifiers/responsive/utilities.js +0 -273
- package/dist/modifiers/responsive/utilities.js.map +0 -1
- package/dist/modifiers/scroll.cjs +0 -2
- package/dist/modifiers/scroll.cjs.map +0 -1
- package/dist/modifiers/scroll.js +0 -82
- package/dist/modifiers/scroll.js.map +0 -1
- package/dist/modifiers/shadows.cjs +0 -2
- package/dist/modifiers/shadows.cjs.map +0 -1
- package/dist/modifiers/shadows.js +0 -147
- package/dist/modifiers/shadows.js.map +0 -1
- package/dist/modifiers/size.cjs +0 -2
- package/dist/modifiers/size.cjs.map +0 -1
- package/dist/modifiers/size.js +0 -74
- package/dist/modifiers/size.js.map +0 -1
- package/dist/modifiers/text.cjs +0 -2
- package/dist/modifiers/text.cjs.map +0 -1
- package/dist/modifiers/text.js +0 -166
- package/dist/modifiers/text.js.map +0 -1
- package/dist/modifiers/transformations.cjs +0 -2
- package/dist/modifiers/transformations.cjs.map +0 -1
- package/dist/modifiers/transformations.js +0 -216
- package/dist/modifiers/transformations.js.map +0 -1
- package/dist/modifiers/transitions.cjs +0 -2
- package/dist/modifiers/transitions.cjs.map +0 -1
- package/dist/modifiers/transitions.js +0 -102
- package/dist/modifiers/transitions.js.map +0 -1
- package/dist/modifiers/types.cjs +0 -2
- package/dist/modifiers/types.cjs.map +0 -1
- package/dist/modifiers/types.js +0 -5
- package/dist/modifiers/types.js.map +0 -1
- package/dist/modifiers/typography.cjs +0 -2
- package/dist/modifiers/typography.cjs.map +0 -1
- package/dist/modifiers/typography.js +0 -76
- package/dist/modifiers/typography.js.map +0 -1
- package/dist/modifiers/utility.cjs +0 -2
- package/dist/modifiers/utility.cjs.map +0 -1
- package/dist/modifiers/utility.js +0 -71
- package/dist/modifiers/utility.js.map +0 -1
- package/dist/modifiers/utils.cjs +0 -2
- package/dist/modifiers/utils.cjs.map +0 -1
- package/dist/modifiers/utils.js +0 -250
- package/dist/modifiers/utils.js.map +0 -1
- package/dist/plugins/index.cjs +0 -2
- package/dist/plugins/index.cjs.map +0 -1
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/legacy-adapter.cjs +0 -2
- package/dist/plugins/legacy-adapter.cjs.map +0 -1
- package/dist/plugins/legacy-adapter.js +0 -30
- package/dist/plugins/legacy-adapter.js.map +0 -1
- package/dist/plugins/simplified-component-registry.cjs +0 -2
- package/dist/plugins/simplified-component-registry.cjs.map +0 -1
- package/dist/plugins/simplified-component-registry.js +0 -71
- package/dist/plugins/simplified-component-registry.js.map +0 -1
- package/dist/plugins/simplified-error-handler.cjs +0 -2
- package/dist/plugins/simplified-error-handler.cjs.map +0 -1
- package/dist/plugins/simplified-error-handler.js +0 -154
- package/dist/plugins/simplified-error-handler.js.map +0 -1
- package/dist/plugins/simplified-lazy-loader.cjs +0 -2
- package/dist/plugins/simplified-lazy-loader.cjs.map +0 -1
- package/dist/plugins/simplified-lazy-loader.js +0 -129
- package/dist/plugins/simplified-lazy-loader.js.map +0 -1
- package/dist/plugins/simplified-plugin-manager.cjs +0 -2
- package/dist/plugins/simplified-plugin-manager.cjs.map +0 -1
- package/dist/plugins/simplified-plugin-manager.js +0 -51
- package/dist/plugins/simplified-plugin-manager.js.map +0 -1
- package/dist/plugins/simplified-tachui-instance.cjs +0 -2
- package/dist/plugins/simplified-tachui-instance.cjs.map +0 -1
- package/dist/plugins/simplified-tachui-instance.js +0 -88
- package/dist/plugins/simplified-tachui-instance.js.map +0 -1
- package/dist/plugins/simplified-types.cjs +0 -2
- package/dist/plugins/simplified-types.cjs.map +0 -1
- package/dist/plugins/simplified-types.js +0 -9
- package/dist/plugins/simplified-types.js.map +0 -1
- package/dist/plugins/simplified-utils.cjs +0 -2
- package/dist/plugins/simplified-utils.cjs.map +0 -1
- package/dist/plugins/simplified-utils.js +0 -40
- package/dist/plugins/simplified-utils.js.map +0 -1
- package/dist/reactive/cleanup.cjs +0 -2
- package/dist/reactive/cleanup.cjs.map +0 -1
- package/dist/reactive/cleanup.js +0 -62
- package/dist/reactive/cleanup.js.map +0 -1
- package/dist/reactive/computed.cjs +0 -2
- package/dist/reactive/computed.cjs.map +0 -1
- package/dist/reactive/computed.js +0 -121
- package/dist/reactive/computed.js.map +0 -1
- package/dist/reactive/context.cjs +0 -2
- package/dist/reactive/context.cjs.map +0 -1
- package/dist/reactive/context.js +0 -143
- package/dist/reactive/context.js.map +0 -1
- package/dist/reactive/effect.cjs +0 -2
- package/dist/reactive/effect.cjs.map +0 -1
- package/dist/reactive/effect.js +0 -67
- package/dist/reactive/effect.js.map +0 -1
- package/dist/reactive/enhanced-effect.cjs +0 -2
- package/dist/reactive/enhanced-effect.cjs.map +0 -1
- package/dist/reactive/enhanced-effect.js +0 -153
- package/dist/reactive/enhanced-effect.js.map +0 -1
- package/dist/reactive/enhanced-signal.cjs +0 -2
- package/dist/reactive/enhanced-signal.cjs.map +0 -1
- package/dist/reactive/enhanced-signal.js +0 -117
- package/dist/reactive/enhanced-signal.js.map +0 -1
- package/dist/reactive/equality.cjs +0 -2
- package/dist/reactive/equality.cjs.map +0 -1
- package/dist/reactive/equality.js +0 -66
- package/dist/reactive/equality.js.map +0 -1
- package/dist/reactive/index.cjs +0 -2
- package/dist/reactive/index.cjs.map +0 -1
- package/dist/reactive/index.js.map +0 -1
- package/dist/reactive/migration.cjs +0 -18
- package/dist/reactive/migration.cjs.map +0 -1
- package/dist/reactive/migration.js +0 -164
- package/dist/reactive/migration.js.map +0 -1
- package/dist/reactive/ownership.cjs +0 -2
- package/dist/reactive/ownership.cjs.map +0 -1
- package/dist/reactive/ownership.js +0 -34
- package/dist/reactive/ownership.js.map +0 -1
- package/dist/reactive/scheduler.cjs +0 -2
- package/dist/reactive/scheduler.cjs.map +0 -1
- package/dist/reactive/scheduler.js +0 -111
- package/dist/reactive/scheduler.js.map +0 -1
- package/dist/reactive/signal.cjs +0 -2
- package/dist/reactive/signal.cjs.map +0 -1
- package/dist/reactive/signal.js +0 -96
- package/dist/reactive/signal.js.map +0 -1
- package/dist/reactive/theme.cjs +0 -2
- package/dist/reactive/theme.cjs.map +0 -1
- package/dist/reactive/theme.js +0 -27
- package/dist/reactive/theme.js.map +0 -1
- package/dist/reactive/types.cjs +0 -2
- package/dist/reactive/types.cjs.map +0 -1
- package/dist/reactive/types.js +0 -5
- package/dist/reactive/types.js.map +0 -1
- package/dist/reactive/unified-scheduler.cjs +0 -2
- package/dist/reactive/unified-scheduler.cjs.map +0 -1
- package/dist/reactive/unified-scheduler.js +0 -219
- package/dist/reactive/unified-scheduler.js.map +0 -1
- package/dist/runtime/component-context.cjs +0 -2
- package/dist/runtime/component-context.cjs.map +0 -1
- package/dist/runtime/component-context.js +0 -177
- package/dist/runtime/component-context.js.map +0 -1
- package/dist/runtime/component.cjs +0 -2
- package/dist/runtime/component.cjs.map +0 -1
- package/dist/runtime/component.js +0 -238
- package/dist/runtime/component.js.map +0 -1
- package/dist/runtime/context.cjs +0 -2
- package/dist/runtime/context.cjs.map +0 -1
- package/dist/runtime/context.js.map +0 -1
- package/dist/runtime/dev-tools.cjs +0 -2
- package/dist/runtime/dev-tools.cjs.map +0 -1
- package/dist/runtime/dev-tools.js +0 -391
- package/dist/runtime/dev-tools.js.map +0 -1
- package/dist/runtime/development-warnings.cjs +0 -2
- package/dist/runtime/development-warnings.cjs.map +0 -1
- package/dist/runtime/development-warnings.js +0 -69
- package/dist/runtime/development-warnings.js.map +0 -1
- package/dist/runtime/dom-bridge.cjs +0 -2
- package/dist/runtime/dom-bridge.cjs.map +0 -1
- package/dist/runtime/dom-bridge.js.map +0 -1
- package/dist/runtime/element-override.cjs +0 -2
- package/dist/runtime/element-override.cjs.map +0 -1
- package/dist/runtime/element-override.js +0 -214
- package/dist/runtime/element-override.js.map +0 -1
- package/dist/runtime/error-boundary.cjs +0 -2
- package/dist/runtime/error-boundary.cjs.map +0 -1
- package/dist/runtime/error-boundary.js +0 -559
- package/dist/runtime/error-boundary.js.map +0 -1
- package/dist/runtime/error-recovery.cjs +0 -2
- package/dist/runtime/error-recovery.cjs.map +0 -1
- package/dist/runtime/error-recovery.js +0 -385
- package/dist/runtime/error-recovery.js.map +0 -1
- package/dist/runtime/error-reporting.cjs +0 -3
- package/dist/runtime/error-reporting.cjs.map +0 -1
- package/dist/runtime/error-reporting.js +0 -479
- package/dist/runtime/error-reporting.js.map +0 -1
- package/dist/runtime/error-utils.cjs +0 -3
- package/dist/runtime/error-utils.cjs.map +0 -1
- package/dist/runtime/error-utils.js +0 -352
- package/dist/runtime/error-utils.js.map +0 -1
- package/dist/runtime/lazy-component.cjs +0 -2
- package/dist/runtime/lazy-component.cjs.map +0 -1
- package/dist/runtime/lazy-component.js +0 -129
- package/dist/runtime/lazy-component.js.map +0 -1
- package/dist/runtime/lifecycle.cjs +0 -2
- package/dist/runtime/lifecycle.cjs.map +0 -1
- package/dist/runtime/lifecycle.js +0 -7
- package/dist/runtime/lifecycle.js.map +0 -1
- package/dist/runtime/mounting.cjs +0 -2
- package/dist/runtime/mounting.cjs.map +0 -1
- package/dist/runtime/mounting.js +0 -12
- package/dist/runtime/mounting.js.map +0 -1
- package/dist/runtime/optimization.cjs +0 -2
- package/dist/runtime/optimization.cjs.map +0 -1
- package/dist/runtime/optimization.js +0 -6
- package/dist/runtime/optimization.js.map +0 -1
- package/dist/runtime/performance.cjs +0 -2
- package/dist/runtime/performance.cjs.map +0 -1
- package/dist/runtime/performance.js +0 -399
- package/dist/runtime/performance.js.map +0 -1
- package/dist/runtime/props.cjs +0 -2
- package/dist/runtime/props.cjs.map +0 -1
- package/dist/runtime/props.js +0 -265
- package/dist/runtime/props.js.map +0 -1
- package/dist/runtime/renderer.cjs +0 -2
- package/dist/runtime/renderer.cjs.map +0 -1
- package/dist/runtime/renderer.js.map +0 -1
- package/dist/runtime/semantic-role-manager.cjs +0 -2
- package/dist/runtime/semantic-role-manager.cjs.map +0 -1
- package/dist/runtime/semantic-role-manager.js +0 -82
- package/dist/runtime/semantic-role-manager.js.map +0 -1
- package/dist/state/binding.cjs +0 -2
- package/dist/state/binding.cjs.map +0 -1
- package/dist/state/binding.js +0 -155
- package/dist/state/binding.js.map +0 -1
- package/dist/state/environment.cjs +0 -2
- package/dist/state/environment.cjs.map +0 -1
- package/dist/state/environment.js +0 -115
- package/dist/state/environment.js.map +0 -1
- package/dist/state/index.cjs +0 -2
- package/dist/state/index.cjs.map +0 -1
- package/dist/state/index.js +0 -63
- package/dist/state/index.js.map +0 -1
- package/dist/state/observed-object.cjs +0 -2
- package/dist/state/observed-object.cjs.map +0 -1
- package/dist/state/observed-object.js +0 -163
- package/dist/state/observed-object.js.map +0 -1
- package/dist/state/state-manager.cjs +0 -2
- package/dist/state/state-manager.cjs.map +0 -1
- package/dist/state/state-manager.js +0 -233
- package/dist/state/state-manager.js.map +0 -1
- package/dist/state/state.cjs +0 -2
- package/dist/state/state.cjs.map +0 -1
- package/dist/state/state.js +0 -159
- package/dist/state/state.js.map +0 -1
- package/dist/sui-compat.cjs +0 -2
- package/dist/sui-compat.cjs.map +0 -1
- package/dist/sui-compat.js +0 -88
- package/dist/sui-compat.js.map +0 -1
- package/dist/validation/advanced-debugging.cjs +0 -44
- package/dist/validation/advanced-debugging.cjs.map +0 -1
- package/dist/validation/advanced-debugging.js +0 -455
- package/dist/validation/advanced-debugging.js.map +0 -1
- package/dist/validation/build-time/detection.cjs +0 -2
- package/dist/validation/build-time/detection.cjs.map +0 -1
- package/dist/validation/build-time/detection.js +0 -199
- package/dist/validation/build-time/detection.js.map +0 -1
- package/dist/validation/build-time/index.cjs +0 -2
- package/dist/validation/build-time/index.cjs.map +0 -1
- package/dist/validation/build-time/index.js +0 -122
- package/dist/validation/build-time/index.js.map +0 -1
- package/dist/validation/build-time/plugins.cjs +0 -3
- package/dist/validation/build-time/plugins.cjs.map +0 -1
- package/dist/validation/build-time/plugins.js +0 -282
- package/dist/validation/build-time/plugins.js.map +0 -1
- package/dist/validation/build-time/rules.cjs +0 -2
- package/dist/validation/build-time/rules.cjs.map +0 -1
- package/dist/validation/build-time/rules.js +0 -576
- package/dist/validation/build-time/rules.js.map +0 -1
- package/dist/validation/build-time/transformer.cjs +0 -3
- package/dist/validation/build-time/transformer.cjs.map +0 -1
- package/dist/validation/build-time/transformer.js +0 -177
- package/dist/validation/build-time/transformer.js.map +0 -1
- package/dist/validation/comprehensive.cjs +0 -9
- package/dist/validation/comprehensive.cjs.map +0 -1
- package/dist/validation/comprehensive.js +0 -916
- package/dist/validation/comprehensive.js.map +0 -1
- package/dist/validation/debug-tools.cjs +0 -16
- package/dist/validation/debug-tools.cjs.map +0 -1
- package/dist/validation/debug-tools.js +0 -405
- package/dist/validation/debug-tools.js.map +0 -1
- package/dist/validation/developer-experience.cjs +0 -17
- package/dist/validation/developer-experience.cjs.map +0 -1
- package/dist/validation/developer-experience.js +0 -433
- package/dist/validation/developer-experience.js.map +0 -1
- package/dist/validation/documentation-integration.cjs +0 -7
- package/dist/validation/documentation-integration.cjs.map +0 -1
- package/dist/validation/documentation-integration.js +0 -440
- package/dist/validation/documentation-integration.js.map +0 -1
- package/dist/validation/enhanced-runtime.cjs +0 -6
- package/dist/validation/enhanced-runtime.cjs.map +0 -1
- package/dist/validation/enhanced-runtime.js +0 -465
- package/dist/validation/enhanced-runtime.js.map +0 -1
- package/dist/validation/error-reporting.cjs +0 -32
- package/dist/validation/error-reporting.cjs.map +0 -1
- package/dist/validation/error-reporting.js +0 -370
- package/dist/validation/error-reporting.js.map +0 -1
- package/dist/validation/ide-integration.cjs +0 -85
- package/dist/validation/ide-integration.cjs.map +0 -1
- package/dist/validation/ide-integration.js +0 -557
- package/dist/validation/ide-integration.js.map +0 -1
- package/dist/validation/index.cjs +0 -6
- package/dist/validation/index.cjs.map +0 -1
- package/dist/validation/index.js.map +0 -1
- package/dist/validation/lifecycle-validation.cjs +0 -2
- package/dist/validation/lifecycle-validation.cjs.map +0 -1
- package/dist/validation/lifecycle-validation.js +0 -314
- package/dist/validation/lifecycle-validation.js.map +0 -1
- package/dist/validation/performance-optimizer.cjs +0 -2
- package/dist/validation/performance-optimizer.cjs.map +0 -1
- package/dist/validation/performance-optimizer.js +0 -338
- package/dist/validation/performance-optimizer.js.map +0 -1
- package/dist/validation/plugin-registration.cjs +0 -2
- package/dist/validation/plugin-registration.cjs.map +0 -1
- package/dist/validation/plugin-registration.js +0 -126
- package/dist/validation/plugin-registration.js.map +0 -1
- package/dist/validation/production-bypass.cjs +0 -2
- package/dist/validation/production-bypass.cjs.map +0 -1
- package/dist/validation/production-bypass.js +0 -218
- package/dist/validation/production-bypass.js.map +0 -1
- package/dist/validation/simple.cjs +0 -9
- package/dist/validation/simple.cjs.map +0 -1
- package/dist/validation/simple.js +0 -146
- package/dist/validation/simple.js.map +0 -1
- package/dist/viewport/adapters/web-adapter.cjs +0 -70
- package/dist/viewport/adapters/web-adapter.cjs.map +0 -1
- package/dist/viewport/adapters/web-adapter.js +0 -823
- package/dist/viewport/adapters/web-adapter.js.map +0 -1
- package/dist/viewport/components.cjs +0 -2
- package/dist/viewport/components.cjs.map +0 -1
- package/dist/viewport/components.js +0 -298
- package/dist/viewport/components.js.map +0 -1
- package/dist/viewport/environment.cjs +0 -2
- package/dist/viewport/environment.cjs.map +0 -1
- package/dist/viewport/environment.js +0 -86
- package/dist/viewport/environment.js.map +0 -1
- package/dist/viewport/index.cjs +0 -2
- package/dist/viewport/index.cjs.map +0 -1
- package/dist/viewport/index.js.map +0 -1
- package/dist/viewport/platform-detection.cjs +0 -2
- package/dist/viewport/platform-detection.cjs.map +0 -1
- package/dist/viewport/platform-detection.js +0 -205
- package/dist/viewport/platform-detection.js.map +0 -1
- package/dist/viewport/types.cjs +0 -2
- package/dist/viewport/types.cjs.map +0 -1
- package/dist/viewport/types.js +0 -13
- package/dist/viewport/types.js.map +0 -1
- package/dist/viewport/viewport-manager.cjs +0 -2
- package/dist/viewport/viewport-manager.cjs.map +0 -1
- package/dist/viewport/viewport-manager.js +0 -524
- package/dist/viewport/viewport-manager.js.map +0 -1
- package/src/assets/Asset.ts +0 -11
- package/src/assets/AssetCollection.ts +0 -99
- package/src/assets/ColorAsset.ts +0 -210
- package/src/assets/FontAsset.ts +0 -380
- package/src/assets/ImageAsset.ts +0 -91
- package/src/assets/README.md +0 -190
- package/src/assets/index.ts +0 -175
- package/src/assets/test-assets.ts +0 -69
- package/src/assets/test-integration.ts +0 -46
- package/src/assets/test-simple.ts +0 -28
- package/src/assets/types.ts +0 -79
- package/src/bundles/common.ts +0 -30
- package/src/bundles/complete.ts +0 -29
- package/src/bundles/essential.ts +0 -26
- package/src/bundles/minimal.ts +0 -26
- package/src/bundles/production-minimal.ts +0 -67
- package/src/compiler/advanced-parser.ts +0 -871
- package/src/compiler/codegen.ts +0 -450
- package/src/compiler/enhanced-codegen.ts +0 -729
- package/src/compiler/index.ts +0 -25
- package/src/compiler/parser.ts +0 -461
- package/src/compiler/plugin.ts +0 -181
- package/src/compiler/types.ts +0 -177
- package/src/components/BasicInput.ts +0 -352
- package/src/components/Button.ts +0 -963
- package/src/components/Divider.ts +0 -341
- package/src/components/EnhancedLink.ts +0 -676
- package/src/components/Form.ts +0 -414
- package/src/components/Grid.ts +0 -2507
- package/src/components/GridResponsive.ts +0 -637
- package/src/components/Image.ts +0 -426
- package/src/components/List.ts +0 -1084
- package/src/components/Menu.ts +0 -807
- package/src/components/Picker.ts +0 -678
- package/src/components/ScrollView.ts +0 -725
- package/src/components/Section.ts +0 -472
- package/src/components/Show.ts +0 -205
- package/src/components/Spacer.ts +0 -93
- package/src/components/Text.ts +0 -447
- package/src/components/Toggle.ts +0 -700
- package/src/components/index.ts +0 -231
- package/src/components/wrapper.ts +0 -828
- package/src/concatenation/concatenatable.ts +0 -211
- package/src/concatenation/concatenated-component.ts +0 -471
- package/src/concatenation/index.ts +0 -41
- package/src/concatenation/styles.css +0 -120
- package/src/concatenation/text-optimizer.ts +0 -440
- package/src/concatenation/types.ts +0 -116
- package/src/constants/README.md +0 -339
- package/src/constants/__tests__/frame-utils.test.ts +0 -276
- package/src/constants/__tests__/layout.test.ts +0 -215
- package/src/constants/frame-utils.ts +0 -174
- package/src/constants/index.ts +0 -8
- package/src/constants/layout.ts +0 -120
- package/src/css-classes/component-base.ts +0 -117
- package/src/css-classes/css-class-manager.ts +0 -372
- package/src/css-classes/dom-integration.ts +0 -162
- package/src/css-classes/enhanced-renderer.ts +0 -166
- package/src/css-classes/index.ts +0 -45
- package/src/css-classes/types.ts +0 -73
- package/src/css-classes/utilities.ts +0 -175
- package/src/debug/index.ts +0 -267
- package/src/developer-experience/enhanced-errors.ts +0 -556
- package/src/developer-experience/enhanced-types.ts +0 -427
- package/src/developer-experience/index.ts +0 -220
- package/src/globals.d.ts +0 -43
- package/src/gradients/__tests__/angular-gradient.test.ts +0 -111
- package/src/gradients/__tests__/background-modifier.test.ts +0 -81
- package/src/gradients/__tests__/comprehensive-gradients.test.ts +0 -296
- package/src/gradients/__tests__/gradient-asset.test.ts +0 -144
- package/src/gradients/__tests__/linear-gradient.test.ts +0 -92
- package/src/gradients/__tests__/phase4-features.test.ts +0 -386
- package/src/gradients/__tests__/radial-gradient.test.ts +0 -110
- package/src/gradients/__tests__/repeating-gradients.test.ts +0 -125
- package/src/gradients/__tests__/state-background-modifier.test.ts +0 -340
- package/src/gradients/__tests__/state-gradient-asset.test.ts +0 -262
- package/src/gradients/__tests__/state-gradient-integration.test.ts +0 -277
- package/src/gradients/css-generator.ts +0 -158
- package/src/gradients/examples.ts +0 -632
- package/src/gradients/gradient-asset.ts +0 -30
- package/src/gradients/index.ts +0 -85
- package/src/gradients/performance.ts +0 -521
- package/src/gradients/presets.ts +0 -422
- package/src/gradients/reactive.ts +0 -470
- package/src/gradients/state-gradient-asset.ts +0 -179
- package/src/gradients/types.ts +0 -148
- package/src/gradients/utils.ts +0 -579
- package/src/gradients/validation.ts +0 -489
- package/src/index.ts +0 -168
- package/src/lifecycle/hooks.ts +0 -332
- package/src/modifiers/__tests__/as-html-integration.test.ts +0 -204
- package/src/modifiers/__tests__/as-html.test.ts +0 -437
- package/src/modifiers/__tests__/basic-sanitizer-security.test.ts +0 -294
- package/src/modifiers/__tests__/border.test.ts +0 -371
- package/src/modifiers/__tests__/margin-string-support.test.ts +0 -41
- package/src/modifiers/__tests__/padding-string-support.test.ts +0 -41
- package/src/modifiers/as-html-validator.ts +0 -68
- package/src/modifiers/as-html.ts +0 -216
- package/src/modifiers/attributes.ts +0 -574
- package/src/modifiers/backdrop.ts +0 -290
- package/src/modifiers/background.ts +0 -165
- package/src/modifiers/base.ts +0 -1815
- package/src/modifiers/basic-sanitizer.ts +0 -227
- package/src/modifiers/border.ts +0 -574
- package/src/modifiers/builder.ts +0 -1747
- package/src/modifiers/core.ts +0 -521
- package/src/modifiers/css.ts +0 -148
- package/src/modifiers/effects.ts +0 -412
- package/src/modifiers/elements.ts +0 -541
- package/src/modifiers/filters.ts +0 -501
- package/src/modifiers/flexbox.ts +0 -180
- package/src/modifiers/font.ts +0 -149
- package/src/modifiers/grid.ts +0 -238
- package/src/modifiers/index.ts +0 -481
- package/src/modifiers/margin.ts +0 -218
- package/src/modifiers/padding.ts +0 -318
- package/src/modifiers/registry.ts +0 -444
- package/src/modifiers/responsive/__tests__/advanced-media-queries.test.ts +0 -392
- package/src/modifiers/responsive/__tests__/advanced-utilities.test.ts +0 -368
- package/src/modifiers/responsive/__tests__/comprehensive-browser-tests.test.ts +0 -556
- package/src/modifiers/responsive/__tests__/layout-patterns.test.ts +0 -558
- package/src/modifiers/responsive/advanced-utilities.ts +0 -562
- package/src/modifiers/responsive/breakpoints.ts +0 -330
- package/src/modifiers/responsive/css-generator.ts +0 -432
- package/src/modifiers/responsive/dev-tools.ts +0 -650
- package/src/modifiers/responsive/index.ts +0 -119
- package/src/modifiers/responsive/layout-patterns.ts +0 -592
- package/src/modifiers/responsive/performance.ts +0 -385
- package/src/modifiers/responsive/responsive-builder.ts +0 -620
- package/src/modifiers/responsive/responsive-modifier.ts +0 -410
- package/src/modifiers/responsive/types.ts +0 -226
- package/src/modifiers/responsive/utilities.ts +0 -478
- package/src/modifiers/scroll.ts +0 -297
- package/src/modifiers/shadows.ts +0 -321
- package/src/modifiers/size.ts +0 -208
- package/src/modifiers/text.ts +0 -416
- package/src/modifiers/transformations.ts +0 -640
- package/src/modifiers/transitions.ts +0 -218
- package/src/modifiers/types.ts +0 -889
- package/src/modifiers/typography.ts +0 -341
- package/src/modifiers/utility.ts +0 -209
- package/src/modifiers/utils.ts +0 -413
- package/src/plugins/__tests__/simplified-plugin-system.test.ts +0 -190
- package/src/plugins/component-loader-registry.ts +0 -371
- package/src/plugins/index.ts +0 -61
- package/src/plugins/legacy-adapter.ts +0 -84
- package/src/plugins/simplified-component-registry.ts +0 -130
- package/src/plugins/simplified-error-handler.ts +0 -372
- package/src/plugins/simplified-index.ts +0 -61
- package/src/plugins/simplified-lazy-loader.ts +0 -242
- package/src/plugins/simplified-plugin-manager.ts +0 -93
- package/src/plugins/simplified-tachui-instance.ts +0 -142
- package/src/plugins/simplified-types.ts +0 -79
- package/src/plugins/simplified-utils.ts +0 -118
- package/src/reactive/cleanup.ts +0 -241
- package/src/reactive/computed.ts +0 -281
- package/src/reactive/context.ts +0 -287
- package/src/reactive/effect.ts +0 -194
- package/src/reactive/enhanced-effect.ts +0 -318
- package/src/reactive/enhanced-signal.ts +0 -227
- package/src/reactive/equality.ts +0 -188
- package/src/reactive/globals.d.ts +0 -5
- package/src/reactive/index.ts +0 -150
- package/src/reactive/migration.ts +0 -335
- package/src/reactive/ownership.ts +0 -182
- package/src/reactive/scheduler.ts +0 -300
- package/src/reactive/signal.ts +0 -201
- package/src/reactive/theme.ts +0 -49
- package/src/reactive/types.ts +0 -103
- package/src/reactive/unified-scheduler.ts +0 -357
- package/src/runtime/component-context.ts +0 -343
- package/src/runtime/component.ts +0 -499
- package/src/runtime/context.ts +0 -527
- package/src/runtime/dev-tools.ts +0 -752
- package/src/runtime/development-warnings.ts +0 -114
- package/src/runtime/dom-bridge.ts +0 -570
- package/src/runtime/element-override.ts +0 -282
- package/src/runtime/error-boundary.ts +0 -955
- package/src/runtime/error-recovery.ts +0 -638
- package/src/runtime/error-reporting.ts +0 -808
- package/src/runtime/error-utils.ts +0 -698
- package/src/runtime/index.ts +0 -202
- package/src/runtime/lazy-component.ts +0 -268
- package/src/runtime/lifecycle.ts +0 -10
- package/src/runtime/mounting.ts +0 -17
- package/src/runtime/optimization.ts +0 -13
- package/src/runtime/performance.ts +0 -693
- package/src/runtime/props.ts +0 -434
- package/src/runtime/refs.ts +0 -13
- package/src/runtime/renderer.ts +0 -674
- package/src/runtime/semantic-role-manager.ts +0 -140
- package/src/runtime/types.ts +0 -282
- package/src/state/binding.ts +0 -381
- package/src/state/environment-object.ts +0 -444
- package/src/state/environment.ts +0 -351
- package/src/state/index.ts +0 -179
- package/src/state/observed-object.ts +0 -405
- package/src/state/state-manager.ts +0 -366
- package/src/state/state.ts +0 -339
- package/src/state/types.ts +0 -192
- package/src/sui-compat.ts +0 -163
- package/src/validation/__tests__/phase-1d-integration.test.ts +0 -558
- package/src/validation/advanced-debugging.ts +0 -860
- package/src/validation/build-time/detection.ts +0 -373
- package/src/validation/build-time/index.ts +0 -222
- package/src/validation/build-time/plugins.ts +0 -515
- package/src/validation/build-time/rules.ts +0 -624
- package/src/validation/build-time/transformer.ts +0 -372
- package/src/validation/build-time/types.ts +0 -232
- package/src/validation/comprehensive.ts +0 -1272
- package/src/validation/debug-tools.ts +0 -724
- package/src/validation/developer-experience.ts +0 -712
- package/src/validation/documentation-integration.ts +0 -835
- package/src/validation/enhanced-runtime.ts +0 -765
- package/src/validation/error-reporting.ts +0 -587
- package/src/validation/ide-integration.ts +0 -845
- package/src/validation/index.ts +0 -353
- package/src/validation/lifecycle-validation.ts +0 -636
- package/src/validation/performance-optimizer.ts +0 -599
- package/src/validation/plugin-registration.ts +0 -249
- package/src/validation/production-bypass.ts +0 -466
- package/src/validation/simple.ts +0 -465
- package/src/viewport/adapters/web-adapter.ts +0 -1385
- package/src/viewport/components.ts +0 -505
- package/src/viewport/environment.ts +0 -173
- package/src/viewport/index.ts +0 -290
- package/src/viewport/platform-detection.ts +0 -431
- package/src/viewport/types.ts +0 -371
- package/src/viewport/viewport-manager.ts +0 -979
package/dist/viewport/index.js
CHANGED
|
@@ -1,62 +1,1946 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { a as O, w as G } from "../dom-bridge-Cx-s6Ihx.js";
|
|
2
|
+
import { a as C, q as D } from "../scheduler-7SvC3a21.js";
|
|
3
|
+
import { a as F, u as N } from "../context--zQFIImS.js";
|
|
4
|
+
function M(n = {}) {
|
|
5
|
+
const e = L(), t = $(e, n), i = q(), s = X(), r = J();
|
|
6
|
+
return {
|
|
7
|
+
platform: e,
|
|
8
|
+
capabilities: t,
|
|
9
|
+
userAgent: i,
|
|
10
|
+
screenSize: s,
|
|
11
|
+
isTouch: r
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function L() {
|
|
15
|
+
return V() ? "electron" : U() ? "mobile" : R() ? "embedded" : "web";
|
|
16
|
+
}
|
|
17
|
+
function V() {
|
|
18
|
+
return typeof window < "u" ? !!window.electronAPI || !!window.electron || !!window.require || navigator.userAgent.toLowerCase().includes("electron") : typeof process < "u" ? !!process.electron || !!process.versions?.electron || process.env.ELECTRON === "true" : !1;
|
|
19
|
+
}
|
|
20
|
+
function U() {
|
|
21
|
+
if (typeof window > "u") return !1;
|
|
22
|
+
const n = "ontouchstart" in window && !("onmousedown" in window), e = window.innerWidth <= 768 || window.innerHeight <= 768, t = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
23
|
+
navigator.userAgent
|
|
24
|
+
), i = window.matchMedia?.("(pointer: coarse)")?.matches, s = window.matchMedia?.("(max-width: 768px)")?.matches;
|
|
25
|
+
return n || e && t || i || s;
|
|
26
|
+
}
|
|
27
|
+
function R() {
|
|
28
|
+
if (typeof window > "u") return !1;
|
|
29
|
+
try {
|
|
30
|
+
return window.self !== window.top;
|
|
31
|
+
} catch {
|
|
32
|
+
return !0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function $(n, e) {
|
|
36
|
+
const t = {
|
|
37
|
+
multiWindow: !1,
|
|
38
|
+
nativeWindows: !1,
|
|
39
|
+
modalOverlays: !0,
|
|
40
|
+
crossWindowCommunication: !1,
|
|
41
|
+
windowResizing: !1,
|
|
42
|
+
windowMinimizing: !1,
|
|
43
|
+
fullscreenSupport: !1,
|
|
44
|
+
menuBarSupport: !1
|
|
45
|
+
};
|
|
46
|
+
switch (n) {
|
|
47
|
+
case "electron":
|
|
48
|
+
return {
|
|
49
|
+
...t,
|
|
50
|
+
multiWindow: !0,
|
|
51
|
+
nativeWindows: !0,
|
|
52
|
+
crossWindowCommunication: !0,
|
|
53
|
+
windowResizing: !0,
|
|
54
|
+
windowMinimizing: !0,
|
|
55
|
+
fullscreenSupport: !0,
|
|
56
|
+
menuBarSupport: !0
|
|
57
|
+
};
|
|
58
|
+
case "web":
|
|
59
|
+
return {
|
|
60
|
+
...t,
|
|
61
|
+
multiWindow: e.enablePopupTest ? B() : !1,
|
|
62
|
+
crossWindowCommunication: K() || j(),
|
|
63
|
+
fullscreenSupport: k(),
|
|
64
|
+
windowResizing: !1,
|
|
65
|
+
// Browser windows can't be resized programmatically
|
|
66
|
+
windowMinimizing: !1
|
|
67
|
+
};
|
|
68
|
+
case "mobile":
|
|
69
|
+
return {
|
|
70
|
+
...t,
|
|
71
|
+
fullscreenSupport: k(),
|
|
72
|
+
modalOverlays: !0
|
|
73
|
+
};
|
|
74
|
+
case "embedded":
|
|
75
|
+
return {
|
|
76
|
+
...t,
|
|
77
|
+
modalOverlays: !0
|
|
78
|
+
};
|
|
79
|
+
default:
|
|
80
|
+
return t;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function B() {
|
|
84
|
+
if (typeof window > "u" || typeof window.navigator < "u" && window.navigator.userAgent.includes("jsdom"))
|
|
85
|
+
return !1;
|
|
86
|
+
try {
|
|
87
|
+
const n = window.open("", "", "width=1,height=1");
|
|
88
|
+
return n ? (n.close(), !0) : !1;
|
|
89
|
+
} catch {
|
|
90
|
+
return !1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function K() {
|
|
94
|
+
return typeof window < "u" && "BroadcastChannel" in window;
|
|
95
|
+
}
|
|
96
|
+
function j() {
|
|
97
|
+
return typeof window < "u" && "MessageChannel" in window;
|
|
98
|
+
}
|
|
99
|
+
function k() {
|
|
100
|
+
return typeof document > "u" ? !1 : !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled);
|
|
101
|
+
}
|
|
102
|
+
function q() {
|
|
103
|
+
return typeof navigator > "u" ? "unknown" : navigator.userAgent;
|
|
104
|
+
}
|
|
105
|
+
function X() {
|
|
106
|
+
return typeof window > "u" ? { width: 1920, height: 1080 } : {
|
|
107
|
+
width: window.screen?.width || window.innerWidth || 1920,
|
|
108
|
+
height: window.screen?.height || window.innerHeight || 1080
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function J() {
|
|
112
|
+
return typeof window > "u" ? !1 : "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
113
|
+
}
|
|
114
|
+
function Z() {
|
|
115
|
+
if (typeof navigator > "u")
|
|
116
|
+
return {
|
|
117
|
+
name: "unknown",
|
|
118
|
+
version: "unknown",
|
|
119
|
+
engine: "unknown"
|
|
120
|
+
};
|
|
121
|
+
const n = navigator.userAgent;
|
|
122
|
+
let e = "unknown", t = "unknown", i = "unknown";
|
|
123
|
+
if (n.includes("Chrome")) {
|
|
124
|
+
e = "Chrome";
|
|
125
|
+
const s = n.match(/Chrome\/(\d+)/);
|
|
126
|
+
t = s ? s[1] : "unknown", i = "Blink";
|
|
127
|
+
} else if (n.includes("Firefox")) {
|
|
128
|
+
e = "Firefox";
|
|
129
|
+
const s = n.match(/Firefox\/(\d+)/);
|
|
130
|
+
t = s ? s[1] : "unknown", i = "Gecko";
|
|
131
|
+
} else if (n.includes("Safari") && !n.includes("Chrome")) {
|
|
132
|
+
e = "Safari";
|
|
133
|
+
const s = n.match(/Version\/(\d+)/);
|
|
134
|
+
t = s ? s[1] : "unknown", i = "WebKit";
|
|
135
|
+
} else if (n.includes("Edge")) {
|
|
136
|
+
e = "Edge";
|
|
137
|
+
const s = n.match(/Edge\/(\d+)/) || n.match(/Edg\/(\d+)/);
|
|
138
|
+
t = s ? s[1] : "unknown", i = "Blink";
|
|
139
|
+
}
|
|
140
|
+
return { name: e, version: t, engine: i };
|
|
141
|
+
}
|
|
142
|
+
function Q() {
|
|
143
|
+
if (typeof navigator > "u")
|
|
144
|
+
return {
|
|
145
|
+
name: "unknown",
|
|
146
|
+
version: "unknown"
|
|
147
|
+
};
|
|
148
|
+
const n = navigator.userAgent;
|
|
149
|
+
let e = "unknown", t = "unknown";
|
|
150
|
+
if (n.includes("Windows"))
|
|
151
|
+
e = "Windows", n.includes("Windows NT 10.0") ? t = "10/11" : n.includes("Windows NT 6.3") ? t = "8.1" : n.includes("Windows NT 6.2") ? t = "8" : n.includes("Windows NT 6.1") && (t = "7");
|
|
152
|
+
else if (n.includes("Mac OS X")) {
|
|
153
|
+
e = "macOS";
|
|
154
|
+
const i = n.match(/Mac OS X (\d+_\d+_?\d*)/);
|
|
155
|
+
i && (t = i[1].replace(/_/g, "."));
|
|
156
|
+
} else if (n.includes("Linux"))
|
|
157
|
+
e = "Linux";
|
|
158
|
+
else if (n.includes("Android")) {
|
|
159
|
+
e = "Android";
|
|
160
|
+
const i = n.match(/Android (\d+\.?\d*\.?\d*)/);
|
|
161
|
+
t = i ? i[1] : "unknown";
|
|
162
|
+
} else if (n.includes("iPhone OS") || n.includes("OS ")) {
|
|
163
|
+
e = "iOS";
|
|
164
|
+
const i = n.match(/OS (\d+_\d+_?\d*)/);
|
|
165
|
+
i && (t = i[1].replace(/_/g, "."));
|
|
166
|
+
}
|
|
167
|
+
return { name: e, version: t };
|
|
168
|
+
}
|
|
169
|
+
function Y() {
|
|
170
|
+
return typeof window > "u" ? {
|
|
171
|
+
webgl: !1,
|
|
172
|
+
webgl2: !1,
|
|
173
|
+
webWorkers: !1,
|
|
174
|
+
serviceWorkers: !1,
|
|
175
|
+
pushNotifications: !1,
|
|
176
|
+
webAssembly: !1,
|
|
177
|
+
intersectionObserver: !1,
|
|
178
|
+
resizeObserver: !1
|
|
179
|
+
} : {
|
|
180
|
+
webgl: !!window.WebGLRenderingContext,
|
|
181
|
+
webgl2: !!window.WebGL2RenderingContext,
|
|
182
|
+
webWorkers: "Worker" in window,
|
|
183
|
+
serviceWorkers: "serviceWorker" in navigator,
|
|
184
|
+
pushNotifications: "PushManager" in window,
|
|
185
|
+
webAssembly: "WebAssembly" in window,
|
|
186
|
+
intersectionObserver: "IntersectionObserver" in window,
|
|
187
|
+
resizeObserver: "ResizeObserver" in window
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function E(n) {
|
|
191
|
+
return {
|
|
192
|
+
canOpenWindow: (e = !1) => e ? n.capabilities.nativeWindows : n.capabilities.multiWindow || n.capabilities.modalOverlays,
|
|
193
|
+
canCommunicateBetweenWindows: () => n.capabilities.crossWindowCommunication,
|
|
194
|
+
canResizeWindows: () => n.capabilities.windowResizing,
|
|
195
|
+
canMinimizeWindows: () => n.capabilities.windowMinimizing,
|
|
196
|
+
canUseFullscreen: () => n.capabilities.fullscreenSupport,
|
|
197
|
+
canUseMenuBar: () => n.capabilities.menuBarSupport,
|
|
198
|
+
getOptimalViewportType: (e = !1) => e && n.capabilities.nativeWindows ? "window" : n.capabilities.modalOverlays ? "modal" : n.platform === "mobile" ? "sheet" : "portal"
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
class ee {
|
|
202
|
+
// Fallback strategies
|
|
203
|
+
createModal(e) {
|
|
204
|
+
throw new Error("Modal fallback not implemented");
|
|
205
|
+
}
|
|
206
|
+
createPortal(e) {
|
|
207
|
+
throw new Error("Portal fallback not implemented");
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
var te = Object.defineProperty, ne = (n, e, t) => e in n ? te(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, a = (n, e, t) => ne(n, typeof e != "symbol" ? e + "" : e, t);
|
|
211
|
+
class S extends ee {
|
|
212
|
+
constructor(e = {}) {
|
|
213
|
+
super(), a(this, "environment"), a(this, "portals", /* @__PURE__ */ new Map()), a(this, "modals", /* @__PURE__ */ new Map()), a(this, "popups", /* @__PURE__ */ new Map()), a(this, "portalContainer", null), a(this, "broadcastChannel", null), this.environment = M(e), this.initializePortalContainer();
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Check if we can create a window with given config
|
|
217
|
+
*/
|
|
218
|
+
canCreateWindow(e) {
|
|
219
|
+
if (!e.preferNativeWindow)
|
|
220
|
+
return !0;
|
|
221
|
+
try {
|
|
222
|
+
return this.environment.capabilities.multiWindow;
|
|
223
|
+
} catch {
|
|
224
|
+
return !1;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Create a viewport instance
|
|
229
|
+
*/
|
|
230
|
+
createWindow(e) {
|
|
231
|
+
switch (this.determineWindowType(e)) {
|
|
232
|
+
case "window":
|
|
233
|
+
return this.createPopupWindow(e);
|
|
234
|
+
case "modal":
|
|
235
|
+
return this.createModal(e);
|
|
236
|
+
case "portal":
|
|
237
|
+
return this.createPortal(e);
|
|
238
|
+
default:
|
|
239
|
+
return this.createModal(e);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Destroy a window
|
|
244
|
+
*/
|
|
245
|
+
async destroyWindow(e) {
|
|
246
|
+
const t = this.portals.get(e);
|
|
247
|
+
if (t) {
|
|
248
|
+
t.dispose(), this.portals.delete(e);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const i = this.modals.get(e);
|
|
252
|
+
if (i) {
|
|
253
|
+
i.dispose(), this.modals.delete(e);
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const s = this.popups.get(e);
|
|
257
|
+
if (s) {
|
|
258
|
+
s.dispose(), this.popups.delete(e);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Set up cross-window communication
|
|
264
|
+
*/
|
|
265
|
+
setupCrossWindowCommunication() {
|
|
266
|
+
if ("BroadcastChannel" in window)
|
|
267
|
+
this.broadcastChannel = new BroadcastChannel("tachui-viewport"), this.broadcastChannel.addEventListener("message", (e) => {
|
|
268
|
+
this.handleCrossWindowMessage(e.data);
|
|
269
|
+
});
|
|
270
|
+
else {
|
|
271
|
+
const e = (t) => {
|
|
272
|
+
if (t.key === "tachui-viewport-message")
|
|
273
|
+
try {
|
|
274
|
+
const i = JSON.parse(t.newValue || "{}");
|
|
275
|
+
this.handleCrossWindowMessage(i);
|
|
276
|
+
} catch {
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
typeof window < "u" && window.addEventListener("storage", e);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Broadcast message to other windows
|
|
284
|
+
*/
|
|
285
|
+
broadcastMessage(e, t) {
|
|
286
|
+
const i = {
|
|
287
|
+
...e,
|
|
288
|
+
timestamp: Date.now(),
|
|
289
|
+
source: window.location.href
|
|
290
|
+
};
|
|
291
|
+
this.broadcastChannel ? this.broadcastChannel.postMessage(i) : (localStorage.setItem("tachui-viewport-message", JSON.stringify(i)), setTimeout(() => {
|
|
292
|
+
localStorage.removeItem("tachui-viewport-message");
|
|
293
|
+
}, 100));
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Optimize for web platform
|
|
297
|
+
*/
|
|
298
|
+
optimizeForPlatform() {
|
|
299
|
+
document.documentElement.style.setProperty("--tachui-modal-backdrop-blur", "8px"), document.documentElement.style.setProperty("--tachui-modal-animation-duration", "200ms"), document.documentElement.style.setProperty("--tachui-modal-z-index", "1000"), this.injectGlobalStyles();
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Create popup window (native browser window)
|
|
303
|
+
*/
|
|
304
|
+
createPopupWindow(e) {
|
|
305
|
+
const t = new ie(e);
|
|
306
|
+
return this.popups.set(e.id, t), t;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Create modal overlay
|
|
310
|
+
*/
|
|
311
|
+
createModal(e) {
|
|
312
|
+
const t = new se(e);
|
|
313
|
+
return this.modals.set(e.id, t), t;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Create portal
|
|
317
|
+
*/
|
|
318
|
+
createPortal(e) {
|
|
319
|
+
const t = new ae(e, this.portalContainer);
|
|
320
|
+
return this.portals.set(e.id, t), t;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Determine optimal window type
|
|
324
|
+
*/
|
|
325
|
+
determineWindowType(e) {
|
|
326
|
+
return e.preferNativeWindow && this.environment.capabilities.multiWindow ? "window" : e.modal !== !1 ? "modal" : "portal";
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Initialize portal container
|
|
330
|
+
*/
|
|
331
|
+
initializePortalContainer() {
|
|
332
|
+
let e = document.getElementById("app");
|
|
333
|
+
if (e) {
|
|
334
|
+
this.portalContainer = e;
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
e = document.getElementById("tachui-portals"), e || (e = document.createElement("div"), e.id = "tachui-portals", e.style.position = "relative", e.style.zIndex = "999", document.body.appendChild(e)), this.portalContainer = e;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Handle cross-window messages
|
|
341
|
+
*/
|
|
342
|
+
handleCrossWindowMessage(e) {
|
|
343
|
+
this.portals.forEach((t) => t.receiveMessage(e)), this.modals.forEach((t) => t.receiveMessage(e)), this.popups.forEach((t) => t.receiveMessage(e));
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Inject global CSS styles
|
|
347
|
+
*/
|
|
348
|
+
injectGlobalStyles() {
|
|
349
|
+
const e = "tachui-viewport-styles";
|
|
350
|
+
if (document.getElementById(e))
|
|
351
|
+
return;
|
|
352
|
+
const t = document.createElement("style");
|
|
353
|
+
t.id = e, t.textContent = `
|
|
354
|
+
.tachui-modal-backdrop {
|
|
355
|
+
position: fixed;
|
|
356
|
+
top: 0;
|
|
357
|
+
left: 0;
|
|
358
|
+
right: 0;
|
|
359
|
+
bottom: 0;
|
|
360
|
+
background: rgba(0, 0, 0, 0.5);
|
|
361
|
+
backdrop-filter: blur(var(--tachui-modal-backdrop-blur, 8px));
|
|
362
|
+
z-index: var(--tachui-modal-z-index, 1000);
|
|
363
|
+
display: flex;
|
|
364
|
+
align-items: center;
|
|
365
|
+
justify-content: center;
|
|
366
|
+
animation: tachui-fade-in var(--tachui-modal-animation-duration, 200ms) ease-out;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.tachui-modal-content {
|
|
370
|
+
background: white;
|
|
371
|
+
border-radius: 8px;
|
|
372
|
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
|
|
373
|
+
max-width: 90vw;
|
|
374
|
+
max-height: 90vh;
|
|
375
|
+
overflow: auto;
|
|
376
|
+
animation: tachui-scale-in var(--tachui-modal-animation-duration, 200ms) ease-out;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.tachui-portal {
|
|
380
|
+
position: relative;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
@keyframes tachui-fade-in {
|
|
384
|
+
from {
|
|
385
|
+
opacity: 0;
|
|
386
|
+
}
|
|
387
|
+
to {
|
|
388
|
+
opacity: 1;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
@keyframes tachui-scale-in {
|
|
393
|
+
from {
|
|
394
|
+
opacity: 0;
|
|
395
|
+
transform: scale(0.95);
|
|
396
|
+
}
|
|
397
|
+
to {
|
|
398
|
+
opacity: 1;
|
|
399
|
+
transform: scale(1);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@media (prefers-reduced-motion: reduce) {
|
|
404
|
+
.tachui-modal-backdrop,
|
|
405
|
+
.tachui-modal-content {
|
|
406
|
+
animation: none;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
`, document.head.appendChild(t);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
class ie {
|
|
413
|
+
constructor(e) {
|
|
414
|
+
a(this, "id"), a(this, "type", "window"), a(this, "config"), a(this, "state"), a(this, "nativeWindow", null), a(this, "messageHandlers", /* @__PURE__ */ new Set()), a(this, "eventHandlers", /* @__PURE__ */ new Map()), a(this, "setState"), this.id = e.id, this.config = e;
|
|
415
|
+
const [t, i] = C({
|
|
416
|
+
id: e.id,
|
|
417
|
+
title: e.title || e.id,
|
|
418
|
+
isVisible: !1,
|
|
419
|
+
isMinimized: !1,
|
|
420
|
+
isMaximized: !1,
|
|
421
|
+
isFullscreen: !1,
|
|
422
|
+
isFocused: !1,
|
|
423
|
+
bounds: {
|
|
424
|
+
x: e.x || 100,
|
|
425
|
+
y: e.y || 100,
|
|
426
|
+
width: e.width || 800,
|
|
427
|
+
height: e.height || 600
|
|
428
|
+
},
|
|
429
|
+
// Phase 2: Enhanced state properties
|
|
430
|
+
isPooled: !1,
|
|
431
|
+
lastUsed: Date.now(),
|
|
432
|
+
groupId: void 0,
|
|
433
|
+
tabIndex: void 0,
|
|
434
|
+
parentWindowId: void 0
|
|
435
|
+
});
|
|
436
|
+
this.state = t, this.setState = i;
|
|
437
|
+
}
|
|
438
|
+
render(e) {
|
|
439
|
+
this.nativeWindow && (this.nativeWindow.document.title = this.config.title || this.config.id);
|
|
440
|
+
}
|
|
441
|
+
async show() {
|
|
442
|
+
if (this.nativeWindow && !this.nativeWindow.closed) {
|
|
443
|
+
this.nativeWindow.focus();
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
const e = this.buildWindowFeatures();
|
|
447
|
+
if (this.nativeWindow = window.open("", this.config.id, e), !this.nativeWindow)
|
|
448
|
+
throw new Error("Failed to open popup window (likely blocked by popup blocker)");
|
|
449
|
+
this.setupPopupEventHandlers(), this.setState((t) => ({
|
|
450
|
+
...t,
|
|
451
|
+
isVisible: !0,
|
|
452
|
+
isFocused: !0
|
|
453
|
+
}));
|
|
454
|
+
}
|
|
455
|
+
async hide() {
|
|
456
|
+
this.nativeWindow && !this.nativeWindow.closed && this.nativeWindow.blur();
|
|
457
|
+
}
|
|
458
|
+
async focus() {
|
|
459
|
+
this.nativeWindow && !this.nativeWindow.closed && this.nativeWindow.focus();
|
|
460
|
+
}
|
|
461
|
+
async minimize() {
|
|
462
|
+
}
|
|
463
|
+
async maximize() {
|
|
464
|
+
}
|
|
465
|
+
async restore() {
|
|
466
|
+
}
|
|
467
|
+
async close() {
|
|
468
|
+
this.nativeWindow && !this.nativeWindow.closed && this.nativeWindow.close(), this.dispose();
|
|
469
|
+
}
|
|
470
|
+
dispose() {
|
|
471
|
+
this.messageHandlers.clear(), this.eventHandlers.clear(), this.nativeWindow = null;
|
|
472
|
+
}
|
|
473
|
+
postMessage(e) {
|
|
474
|
+
this.nativeWindow && !this.nativeWindow.closed && this.nativeWindow.postMessage(e, "*");
|
|
475
|
+
}
|
|
476
|
+
onMessage(e) {
|
|
477
|
+
return this.messageHandlers.add(e), () => this.messageHandlers.delete(e);
|
|
478
|
+
}
|
|
479
|
+
receiveMessage(e) {
|
|
480
|
+
this.messageHandlers.forEach((t) => t(e));
|
|
481
|
+
}
|
|
482
|
+
onShow(e) {
|
|
483
|
+
return this.addEventListener("show", e);
|
|
484
|
+
}
|
|
485
|
+
onHide(e) {
|
|
486
|
+
return this.addEventListener("hide", e);
|
|
487
|
+
}
|
|
488
|
+
onFocus(e) {
|
|
489
|
+
return this.addEventListener("focus", e);
|
|
490
|
+
}
|
|
491
|
+
onBlur(e) {
|
|
492
|
+
return this.addEventListener("blur", e);
|
|
493
|
+
}
|
|
494
|
+
onResize(e) {
|
|
495
|
+
return () => {
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
onClose(e) {
|
|
499
|
+
return this.addEventListener("close", e);
|
|
500
|
+
}
|
|
501
|
+
addEventListener(e, t) {
|
|
502
|
+
return this.eventHandlers.has(e) || this.eventHandlers.set(e, /* @__PURE__ */ new Set()), this.eventHandlers.get(e).add(t), () => {
|
|
503
|
+
this.eventHandlers.get(e)?.delete(t);
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
emit(e) {
|
|
507
|
+
const t = this.eventHandlers.get(e);
|
|
508
|
+
t && t.forEach((i) => i());
|
|
509
|
+
}
|
|
510
|
+
buildWindowFeatures() {
|
|
511
|
+
const e = [];
|
|
512
|
+
return this.config.width && e.push(`width=${this.config.width}`), this.config.height && e.push(`height=${this.config.height}`), this.config.x && e.push(`left=${this.config.x}`), this.config.y && e.push(`top=${this.config.y}`), e.push(`resizable=${this.config.resizable !== !1 ? "yes" : "no"}`), e.push("scrollbars=yes"), e.push("status=no"), e.push("toolbar=no"), e.push("menubar=no"), e.push("location=no"), e.join(",");
|
|
513
|
+
}
|
|
514
|
+
setupPopupEventHandlers() {
|
|
515
|
+
if (!this.nativeWindow) return;
|
|
516
|
+
const e = () => {
|
|
517
|
+
if (this.nativeWindow?.closed) {
|
|
518
|
+
this.emit("close");
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
setTimeout(e, 1e3);
|
|
522
|
+
};
|
|
523
|
+
e(), window.addEventListener("message", (t) => {
|
|
524
|
+
t.source === this.nativeWindow && this.messageHandlers.forEach((i) => i(t.data));
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
// ==================== Phase 2: Enhanced Methods ====================
|
|
528
|
+
/**
|
|
529
|
+
* Window pooling and reuse
|
|
530
|
+
*/
|
|
531
|
+
async prepareForReuse() {
|
|
532
|
+
this.nativeWindow && !this.nativeWindow.closed && (this.nativeWindow.document.body.innerHTML = "", this.nativeWindow.document.title = ""), this.messageHandlers.clear();
|
|
533
|
+
}
|
|
534
|
+
isReusable() {
|
|
535
|
+
return this.nativeWindow != null && !this.nativeWindow.closed;
|
|
536
|
+
}
|
|
537
|
+
markAsUsed() {
|
|
538
|
+
this.setState((e) => ({
|
|
539
|
+
...e,
|
|
540
|
+
lastUsed: Date.now()
|
|
541
|
+
}));
|
|
542
|
+
}
|
|
543
|
+
async returnToPool() {
|
|
544
|
+
await this.hide(), this.setState((e) => ({
|
|
545
|
+
...e,
|
|
546
|
+
isPooled: !0,
|
|
547
|
+
lastUsed: Date.now()
|
|
548
|
+
}));
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* State synchronization (limited in popup windows due to cross-origin restrictions)
|
|
552
|
+
*/
|
|
553
|
+
syncState(e, t) {
|
|
554
|
+
if (!(!this.nativeWindow || this.nativeWindow.closed))
|
|
555
|
+
try {
|
|
556
|
+
this.nativeWindow.postMessage({ type: "sync_state", key: e, value: t }, "*");
|
|
557
|
+
} catch (i) {
|
|
558
|
+
console.warn("Failed to sync state to popup window:", i);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
getSharedState(e) {
|
|
562
|
+
}
|
|
563
|
+
onSharedStateChange(e, t) {
|
|
564
|
+
return () => {
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Tab grouping (not supported for popup windows)
|
|
569
|
+
*/
|
|
570
|
+
async attachToTab(e) {
|
|
571
|
+
throw new Error("Tab grouping not supported for popup windows");
|
|
572
|
+
}
|
|
573
|
+
async detachFromTab() {
|
|
574
|
+
return this;
|
|
575
|
+
}
|
|
576
|
+
getTabContainer() {
|
|
577
|
+
return null;
|
|
578
|
+
}
|
|
579
|
+
getTabIndex() {
|
|
580
|
+
return this.state().tabIndex || 0;
|
|
581
|
+
}
|
|
582
|
+
setTabIndex(e) {
|
|
583
|
+
this.setState((t) => ({
|
|
584
|
+
...t,
|
|
585
|
+
tabIndex: e
|
|
586
|
+
}));
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Parent-child relationships (limited for popup windows)
|
|
590
|
+
*/
|
|
591
|
+
setParentWindow(e) {
|
|
592
|
+
this.setState((t) => ({
|
|
593
|
+
...t,
|
|
594
|
+
parentWindowId: e.id
|
|
595
|
+
}));
|
|
596
|
+
}
|
|
597
|
+
getParentWindow() {
|
|
598
|
+
return null;
|
|
599
|
+
}
|
|
600
|
+
getChildWindows() {
|
|
601
|
+
return [];
|
|
602
|
+
}
|
|
603
|
+
addChildWindow(e) {
|
|
604
|
+
}
|
|
605
|
+
removeChildWindow(e) {
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
class se {
|
|
609
|
+
constructor(e) {
|
|
610
|
+
a(this, "id"), a(this, "type", "modal"), a(this, "config"), a(this, "state"), a(this, "backdropElement", null), a(this, "contentElement", null), a(this, "messageHandlers", /* @__PURE__ */ new Set()), a(this, "eventHandlers", /* @__PURE__ */ new Map()), a(this, "setState"), a(this, "sharedState", /* @__PURE__ */ new Map()), a(this, "stateChangeCallbacks", /* @__PURE__ */ new Map()), a(this, "childWindows", /* @__PURE__ */ new Map()), a(this, "parentWindow", null), a(this, "tabContainer", null), this.id = e.id, this.config = e;
|
|
611
|
+
const [t, i] = C({
|
|
612
|
+
id: e.id,
|
|
613
|
+
title: e.title || e.id,
|
|
614
|
+
isVisible: !1,
|
|
615
|
+
isMinimized: !1,
|
|
616
|
+
isMaximized: !1,
|
|
617
|
+
isFullscreen: !1,
|
|
618
|
+
isFocused: !1,
|
|
619
|
+
bounds: {
|
|
620
|
+
x: 0,
|
|
621
|
+
y: 0,
|
|
622
|
+
width: e.width || 600,
|
|
623
|
+
height: e.height || 400
|
|
624
|
+
},
|
|
625
|
+
zIndex: 1e3,
|
|
626
|
+
// Phase 2: Enhanced state properties
|
|
627
|
+
isPooled: !1,
|
|
628
|
+
lastUsed: Date.now(),
|
|
629
|
+
groupId: void 0,
|
|
630
|
+
tabIndex: void 0,
|
|
631
|
+
parentWindowId: void 0
|
|
632
|
+
});
|
|
633
|
+
this.state = t, this.setState = i, this.createElement();
|
|
634
|
+
}
|
|
635
|
+
render(e) {
|
|
636
|
+
this.contentElement && (this.contentElement.innerHTML = `<div>Modal: ${this.config.title}</div>`);
|
|
637
|
+
}
|
|
638
|
+
async show() {
|
|
639
|
+
this.backdropElement && (document.body.appendChild(this.backdropElement), this.setState((e) => ({
|
|
640
|
+
...e,
|
|
641
|
+
isVisible: !0,
|
|
642
|
+
isFocused: !0
|
|
643
|
+
})), this.emit("show"));
|
|
644
|
+
}
|
|
645
|
+
async hide() {
|
|
646
|
+
this.backdropElement?.parentNode && this.backdropElement.parentNode.removeChild(this.backdropElement), this.setState((e) => ({
|
|
647
|
+
...e,
|
|
648
|
+
isVisible: !1,
|
|
649
|
+
isFocused: !1
|
|
650
|
+
})), this.emit("hide");
|
|
651
|
+
}
|
|
652
|
+
async focus() {
|
|
653
|
+
this.contentElement && this.contentElement.focus(), this.emit("focus");
|
|
654
|
+
}
|
|
655
|
+
async minimize() {
|
|
656
|
+
await this.hide();
|
|
657
|
+
}
|
|
658
|
+
async maximize() {
|
|
659
|
+
}
|
|
660
|
+
async restore() {
|
|
661
|
+
await this.show();
|
|
662
|
+
}
|
|
663
|
+
async close() {
|
|
664
|
+
await this.hide(), this.emit("close"), this.dispose();
|
|
665
|
+
}
|
|
666
|
+
dispose() {
|
|
667
|
+
this.backdropElement?.parentNode && this.backdropElement.parentNode.removeChild(this.backdropElement), this.messageHandlers.clear(), this.eventHandlers.clear();
|
|
668
|
+
}
|
|
669
|
+
postMessage(e) {
|
|
670
|
+
}
|
|
671
|
+
onMessage(e) {
|
|
672
|
+
return this.messageHandlers.add(e), () => this.messageHandlers.delete(e);
|
|
673
|
+
}
|
|
674
|
+
receiveMessage(e) {
|
|
675
|
+
this.messageHandlers.forEach((t) => t(e));
|
|
676
|
+
}
|
|
677
|
+
onShow(e) {
|
|
678
|
+
return this.addEventListener("show", e);
|
|
679
|
+
}
|
|
680
|
+
onHide(e) {
|
|
681
|
+
return this.addEventListener("hide", e);
|
|
682
|
+
}
|
|
683
|
+
onFocus(e) {
|
|
684
|
+
return this.addEventListener("focus", e);
|
|
685
|
+
}
|
|
686
|
+
onBlur(e) {
|
|
687
|
+
return this.addEventListener("blur", e);
|
|
688
|
+
}
|
|
689
|
+
onResize(e) {
|
|
690
|
+
return () => {
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
onClose(e) {
|
|
694
|
+
return this.addEventListener("close", e);
|
|
695
|
+
}
|
|
696
|
+
addEventListener(e, t) {
|
|
697
|
+
return this.eventHandlers.has(e) || this.eventHandlers.set(e, /* @__PURE__ */ new Set()), this.eventHandlers.get(e).add(t), () => {
|
|
698
|
+
this.eventHandlers.get(e)?.delete(t);
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
emit(e) {
|
|
702
|
+
const t = this.eventHandlers.get(e);
|
|
703
|
+
t && t.forEach((i) => i());
|
|
704
|
+
}
|
|
705
|
+
createElement() {
|
|
706
|
+
this.backdropElement = document.createElement("div"), this.backdropElement.className = "tachui-modal-backdrop", this.contentElement = document.createElement("div"), this.contentElement.className = "tachui-modal-content", this.contentElement.style.width = `${this.config.width || 600}px`, this.contentElement.style.height = `${this.config.height || 400}px`, this.backdropElement.appendChild(this.contentElement), this.backdropElement.addEventListener("click", (e) => {
|
|
707
|
+
e.target === this.backdropElement && this.config.backdropDismiss !== !1 && this.close();
|
|
708
|
+
}), document.addEventListener("keydown", (e) => {
|
|
709
|
+
e.key === "Escape" && this.config.escapeKeyDismiss !== !1 && this.close();
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Window pooling and reuse
|
|
714
|
+
*/
|
|
715
|
+
async prepareForReuse() {
|
|
716
|
+
this.contentElement && (this.contentElement.innerHTML = ""), this.messageHandlers.clear(), this.sharedState.clear(), this.stateChangeCallbacks.clear();
|
|
717
|
+
}
|
|
718
|
+
isReusable() {
|
|
719
|
+
return this.backdropElement != null && this.contentElement != null;
|
|
720
|
+
}
|
|
721
|
+
markAsUsed() {
|
|
722
|
+
this.setState((e) => ({
|
|
723
|
+
...e,
|
|
724
|
+
lastUsed: Date.now()
|
|
725
|
+
}));
|
|
726
|
+
}
|
|
727
|
+
async returnToPool() {
|
|
728
|
+
await this.hide(), this.setState((e) => ({
|
|
729
|
+
...e,
|
|
730
|
+
isPooled: !0,
|
|
731
|
+
lastUsed: Date.now()
|
|
732
|
+
}));
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* State synchronization (full support for modals)
|
|
736
|
+
*/
|
|
737
|
+
syncState(e, t) {
|
|
738
|
+
this.sharedState.set(e, t);
|
|
739
|
+
const i = this.stateChangeCallbacks.get(e);
|
|
740
|
+
i && i.forEach((s) => s(t)), this.childWindows.forEach((s) => {
|
|
741
|
+
s.syncState(e, t);
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
getSharedState(e) {
|
|
745
|
+
return this.sharedState.get(e);
|
|
746
|
+
}
|
|
747
|
+
onSharedStateChange(e, t) {
|
|
748
|
+
return this.stateChangeCallbacks.has(e) || this.stateChangeCallbacks.set(e, /* @__PURE__ */ new Set()), this.stateChangeCallbacks.get(e).add(t), () => {
|
|
749
|
+
this.stateChangeCallbacks.get(e)?.delete(t);
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Tab grouping (web modal tab simulation)
|
|
754
|
+
*/
|
|
755
|
+
async attachToTab(e) {
|
|
756
|
+
this.tabContainer = e, this.createTabInterface();
|
|
757
|
+
}
|
|
758
|
+
async detachFromTab() {
|
|
759
|
+
return this.tabContainer = null, this.removeTabInterface(), this;
|
|
760
|
+
}
|
|
761
|
+
getTabContainer() {
|
|
762
|
+
return this.tabContainer;
|
|
763
|
+
}
|
|
764
|
+
getTabIndex() {
|
|
765
|
+
return this.state().tabIndex || 0;
|
|
766
|
+
}
|
|
767
|
+
setTabIndex(e) {
|
|
768
|
+
this.setState((t) => ({
|
|
769
|
+
...t,
|
|
770
|
+
tabIndex: e
|
|
771
|
+
}));
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Parent-child relationships (full support for modals)
|
|
775
|
+
*/
|
|
776
|
+
setParentWindow(e) {
|
|
777
|
+
this.parentWindow = e, this.setState((t) => ({
|
|
778
|
+
...t,
|
|
779
|
+
parentWindowId: e.id
|
|
780
|
+
}));
|
|
781
|
+
}
|
|
782
|
+
getParentWindow() {
|
|
783
|
+
return this.parentWindow;
|
|
784
|
+
}
|
|
785
|
+
getChildWindows() {
|
|
786
|
+
return Array.from(this.childWindows.values());
|
|
787
|
+
}
|
|
788
|
+
addChildWindow(e) {
|
|
789
|
+
this.childWindows.set(e.id, e), e.setParentWindow(this);
|
|
790
|
+
}
|
|
791
|
+
removeChildWindow(e) {
|
|
792
|
+
this.childWindows.delete(e);
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Tab interface helpers
|
|
796
|
+
*/
|
|
797
|
+
createTabInterface() {
|
|
798
|
+
if (!this.contentElement || !this.tabContainer) return;
|
|
799
|
+
const e = document.createElement("div");
|
|
800
|
+
e.className = "tachui-modal-tab-header", e.style.cssText = `
|
|
801
|
+
display: flex;
|
|
802
|
+
border-bottom: 1px solid #e0e0e0;
|
|
803
|
+
background: #f5f5f5;
|
|
804
|
+
min-height: 40px;
|
|
805
|
+
`, this.contentElement.insertBefore(e, this.contentElement.firstChild);
|
|
806
|
+
}
|
|
807
|
+
removeTabInterface() {
|
|
808
|
+
if (!this.contentElement) return;
|
|
809
|
+
const e = this.contentElement.querySelector(".tachui-modal-tab-header");
|
|
810
|
+
e && e.remove();
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
class ae {
|
|
814
|
+
constructor(e, t) {
|
|
815
|
+
this.container = t, a(this, "id"), a(this, "type", "portal"), a(this, "config"), a(this, "state"), a(this, "portalElement", null), a(this, "messageHandlers", /* @__PURE__ */ new Set()), a(this, "eventHandlers", /* @__PURE__ */ new Map()), a(this, "cleanupFunction", null), a(this, "setState"), a(this, "sharedState", /* @__PURE__ */ new Map()), a(this, "stateChangeCallbacks", /* @__PURE__ */ new Map()), a(this, "childWindows", /* @__PURE__ */ new Map()), a(this, "parentWindow", null), a(this, "tabContainer", null), this.id = e.id, this.config = e;
|
|
816
|
+
const [i, s] = C({
|
|
817
|
+
id: e.id,
|
|
818
|
+
title: e.title || e.id,
|
|
819
|
+
isVisible: !1,
|
|
820
|
+
isMinimized: !1,
|
|
821
|
+
isMaximized: !1,
|
|
822
|
+
isFullscreen: !1,
|
|
823
|
+
isFocused: !1,
|
|
824
|
+
bounds: {
|
|
825
|
+
x: e.x || 0,
|
|
826
|
+
y: e.y || 0,
|
|
827
|
+
width: e.width || 400,
|
|
828
|
+
height: e.height || 300
|
|
829
|
+
},
|
|
830
|
+
// Phase 2: Enhanced state properties
|
|
831
|
+
isPooled: !1,
|
|
832
|
+
lastUsed: Date.now(),
|
|
833
|
+
groupId: void 0,
|
|
834
|
+
tabIndex: void 0,
|
|
835
|
+
parentWindowId: void 0
|
|
836
|
+
});
|
|
837
|
+
this.state = i, this.setState = s, this.createElement();
|
|
838
|
+
}
|
|
839
|
+
render(e) {
|
|
840
|
+
if (this.portalElement) {
|
|
841
|
+
this.portalElement.innerHTML = "";
|
|
842
|
+
try {
|
|
843
|
+
const t = O(e, this.portalElement);
|
|
844
|
+
this.cleanupFunction = t;
|
|
845
|
+
} catch (t) {
|
|
846
|
+
console.error("Error during mountComponentTree:", t);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
async show() {
|
|
851
|
+
this.portalElement && (this.container.id === "app" && (this.container.innerHTML = ""), this.container.appendChild(this.portalElement), this.portalElement.style.display = "block", this.setState((e) => ({
|
|
852
|
+
...e,
|
|
853
|
+
isVisible: !0
|
|
854
|
+
})), this.emit("show"));
|
|
855
|
+
}
|
|
856
|
+
async hide() {
|
|
857
|
+
this.portalElement && (this.portalElement.style.display = "none"), this.setState((e) => ({
|
|
858
|
+
...e,
|
|
859
|
+
isVisible: !1
|
|
860
|
+
})), this.emit("hide");
|
|
861
|
+
}
|
|
862
|
+
async focus() {
|
|
863
|
+
this.emit("focus");
|
|
864
|
+
}
|
|
865
|
+
async minimize() {
|
|
866
|
+
await this.hide();
|
|
867
|
+
}
|
|
868
|
+
async maximize() {
|
|
869
|
+
}
|
|
870
|
+
async restore() {
|
|
871
|
+
await this.show();
|
|
872
|
+
}
|
|
873
|
+
async close() {
|
|
874
|
+
this.portalElement?.parentNode && this.portalElement.parentNode.removeChild(this.portalElement), this.emit("close"), this.dispose();
|
|
875
|
+
}
|
|
876
|
+
dispose() {
|
|
877
|
+
this.cleanupFunction && (this.cleanupFunction(), this.cleanupFunction = null), this.portalElement?.parentNode && this.portalElement.parentNode.removeChild(this.portalElement), this.messageHandlers.clear(), this.eventHandlers.clear();
|
|
878
|
+
}
|
|
879
|
+
postMessage(e) {
|
|
880
|
+
}
|
|
881
|
+
onMessage(e) {
|
|
882
|
+
return this.messageHandlers.add(e), () => this.messageHandlers.delete(e);
|
|
883
|
+
}
|
|
884
|
+
receiveMessage(e) {
|
|
885
|
+
this.messageHandlers.forEach((t) => t(e));
|
|
886
|
+
}
|
|
887
|
+
onShow(e) {
|
|
888
|
+
return this.addEventListener("show", e);
|
|
889
|
+
}
|
|
890
|
+
onHide(e) {
|
|
891
|
+
return this.addEventListener("hide", e);
|
|
892
|
+
}
|
|
893
|
+
onFocus(e) {
|
|
894
|
+
return this.addEventListener("focus", e);
|
|
895
|
+
}
|
|
896
|
+
onBlur(e) {
|
|
897
|
+
return this.addEventListener("blur", e);
|
|
898
|
+
}
|
|
899
|
+
onResize(e) {
|
|
900
|
+
return () => {
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
onClose(e) {
|
|
904
|
+
return this.addEventListener("close", e);
|
|
905
|
+
}
|
|
906
|
+
addEventListener(e, t) {
|
|
907
|
+
return this.eventHandlers.has(e) || this.eventHandlers.set(e, /* @__PURE__ */ new Set()), this.eventHandlers.get(e).add(t), () => {
|
|
908
|
+
this.eventHandlers.get(e)?.delete(t);
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
emit(e) {
|
|
912
|
+
const t = this.eventHandlers.get(e);
|
|
913
|
+
t && t.forEach((i) => i());
|
|
914
|
+
}
|
|
915
|
+
createElement() {
|
|
916
|
+
this.portalElement = document.createElement("div"), this.portalElement.className = "tachui-portal", this.container && this.container.id === "app" ? (this.portalElement.style.position = "static", this.portalElement.style.width = "100%", this.portalElement.style.height = "auto", this.portalElement.style.background = "transparent", this.portalElement.style.border = "none", this.portalElement.style.display = "block") : (this.portalElement.style.position = "absolute", this.portalElement.style.left = `${this.config.x || 0}px`, this.portalElement.style.top = `${this.config.y || 0}px`, this.portalElement.style.width = `${this.config.width || 400}px`, this.portalElement.style.height = `${this.config.height || 300}px`, this.portalElement.style.background = "white", this.portalElement.style.border = "1px solid #ccc", this.portalElement.style.borderRadius = "8px", this.portalElement.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.15)", this.portalElement.style.display = "none");
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* Window pooling and reuse (excellent for portals)
|
|
920
|
+
*/
|
|
921
|
+
async prepareForReuse() {
|
|
922
|
+
this.portalElement && (this.portalElement.innerHTML = ""), this.messageHandlers.clear(), this.sharedState.clear(), this.stateChangeCallbacks.clear();
|
|
923
|
+
}
|
|
924
|
+
isReusable() {
|
|
925
|
+
return this.portalElement != null;
|
|
926
|
+
}
|
|
927
|
+
markAsUsed() {
|
|
928
|
+
this.setState((e) => ({
|
|
929
|
+
...e,
|
|
930
|
+
lastUsed: Date.now()
|
|
931
|
+
}));
|
|
932
|
+
}
|
|
933
|
+
async returnToPool() {
|
|
934
|
+
await this.hide(), this.setState((e) => ({
|
|
935
|
+
...e,
|
|
936
|
+
isPooled: !0,
|
|
937
|
+
lastUsed: Date.now()
|
|
938
|
+
}));
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* State synchronization (full support for portals)
|
|
942
|
+
*/
|
|
943
|
+
syncState(e, t) {
|
|
944
|
+
this.sharedState.set(e, t);
|
|
945
|
+
const i = this.stateChangeCallbacks.get(e);
|
|
946
|
+
i && i.forEach((s) => s(t)), this.childWindows.forEach((s) => {
|
|
947
|
+
s.syncState(e, t);
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
getSharedState(e) {
|
|
951
|
+
return this.sharedState.get(e);
|
|
952
|
+
}
|
|
953
|
+
onSharedStateChange(e, t) {
|
|
954
|
+
return this.stateChangeCallbacks.has(e) || this.stateChangeCallbacks.set(e, /* @__PURE__ */ new Set()), this.stateChangeCallbacks.get(e).add(t), () => {
|
|
955
|
+
this.stateChangeCallbacks.get(e)?.delete(t);
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Tab grouping (portal-based tab simulation)
|
|
960
|
+
*/
|
|
961
|
+
async attachToTab(e) {
|
|
962
|
+
this.tabContainer = e, this.createPortalTabInterface();
|
|
963
|
+
}
|
|
964
|
+
async detachFromTab() {
|
|
965
|
+
return this.tabContainer = null, this.removePortalTabInterface(), this;
|
|
966
|
+
}
|
|
967
|
+
getTabContainer() {
|
|
968
|
+
return this.tabContainer;
|
|
969
|
+
}
|
|
970
|
+
getTabIndex() {
|
|
971
|
+
return this.state().tabIndex || 0;
|
|
972
|
+
}
|
|
973
|
+
setTabIndex(e) {
|
|
974
|
+
this.setState((t) => ({
|
|
975
|
+
...t,
|
|
976
|
+
tabIndex: e
|
|
977
|
+
}));
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* Parent-child relationships (full support for portals)
|
|
981
|
+
*/
|
|
982
|
+
setParentWindow(e) {
|
|
983
|
+
this.parentWindow = e, this.setState((t) => ({
|
|
984
|
+
...t,
|
|
985
|
+
parentWindowId: e.id
|
|
986
|
+
}));
|
|
987
|
+
}
|
|
988
|
+
getParentWindow() {
|
|
989
|
+
return this.parentWindow;
|
|
990
|
+
}
|
|
991
|
+
getChildWindows() {
|
|
992
|
+
return Array.from(this.childWindows.values());
|
|
993
|
+
}
|
|
994
|
+
addChildWindow(e) {
|
|
995
|
+
this.childWindows.set(e.id, e), e.setParentWindow(this);
|
|
996
|
+
}
|
|
997
|
+
removeChildWindow(e) {
|
|
998
|
+
this.childWindows.delete(e);
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* Portal tab interface helpers
|
|
1002
|
+
*/
|
|
1003
|
+
createPortalTabInterface() {
|
|
1004
|
+
if (!this.portalElement || !this.tabContainer) return;
|
|
1005
|
+
const e = document.createElement("div");
|
|
1006
|
+
e.className = "tachui-portal-tab-header", e.style.cssText = `
|
|
1007
|
+
display: flex;
|
|
1008
|
+
background: #f8f9fa;
|
|
1009
|
+
border-bottom: 1px solid #dee2e6;
|
|
1010
|
+
min-height: 36px;
|
|
1011
|
+
padding: 0 8px;
|
|
1012
|
+
align-items: center;
|
|
1013
|
+
`, this.portalElement.insertBefore(e, this.portalElement.firstChild);
|
|
1014
|
+
}
|
|
1015
|
+
removePortalTabInterface() {
|
|
1016
|
+
if (!this.portalElement) return;
|
|
1017
|
+
const e = this.portalElement.querySelector(".tachui-portal-tab-header");
|
|
1018
|
+
e && e.remove();
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
var oe = Object.defineProperty, re = (n, e, t) => e in n ? oe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, l = (n, e, t) => re(n, typeof e != "symbol" ? e + "" : e, t);
|
|
1022
|
+
class x {
|
|
1023
|
+
constructor(e, t = {}) {
|
|
1024
|
+
l(this, "adapter"), l(this, "windows", /* @__PURE__ */ new Map()), l(this, "windowGroups", /* @__PURE__ */ new Map()), l(this, "eventHandlers", /* @__PURE__ */ new Map()), l(this, "globalState", /* @__PURE__ */ new Map()), l(this, "globalStateCallbacks", /* @__PURE__ */ new Map()), l(this, "environment"), l(this, "platformConfig"), this.platformConfig = t, this.environment = M(t), e ? this.adapter = e : this.adapter = this.createDefaultAdapter(), this.adapter.setupCrossWindowCommunication(), this.adapter.optimizeForPlatform();
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* Open a new window/viewport
|
|
1028
|
+
*/
|
|
1029
|
+
async openWindow(e, t, i = {}) {
|
|
1030
|
+
const s = this.windows.get(e);
|
|
1031
|
+
if (s)
|
|
1032
|
+
return await s.show(), await s.focus(), s;
|
|
1033
|
+
const r = {
|
|
1034
|
+
id: e,
|
|
1035
|
+
title: i.title || e,
|
|
1036
|
+
width: i.width || 800,
|
|
1037
|
+
height: i.height || 600,
|
|
1038
|
+
...i
|
|
1039
|
+
};
|
|
1040
|
+
this.getOptimalWindowType(i);
|
|
1041
|
+
const o = this.adapter.createWindow(r);
|
|
1042
|
+
return this.windows.set(e, o), o.render(t), this.setupWindowEventHandlers(o), await o.show(), this.emit("window:opened", { window: o }), o;
|
|
1043
|
+
}
|
|
1044
|
+
/**
|
|
1045
|
+
* Dismiss/close a window
|
|
1046
|
+
*/
|
|
1047
|
+
async dismissWindow(e) {
|
|
1048
|
+
const t = this.windows.get(e);
|
|
1049
|
+
if (!t)
|
|
1050
|
+
throw new Error(`Window with id '${e}' not found`);
|
|
1051
|
+
await t.close(), this.windows.delete(e), this.emit("window:closed", { windowId: e });
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* Get a specific window
|
|
1055
|
+
*/
|
|
1056
|
+
getWindow(e) {
|
|
1057
|
+
return this.windows.get(e) || null;
|
|
1058
|
+
}
|
|
1059
|
+
/**
|
|
1060
|
+
* Get all open windows
|
|
1061
|
+
*/
|
|
1062
|
+
getAllWindows() {
|
|
1063
|
+
return Array.from(this.windows.values());
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Create a window group for data-driven window management
|
|
1067
|
+
*/
|
|
1068
|
+
createWindowGroup(e) {
|
|
1069
|
+
if (this.windowGroups.has(e))
|
|
1070
|
+
return this.windowGroups.get(e);
|
|
1071
|
+
const t = new de(e, this);
|
|
1072
|
+
return this.windowGroups.set(e, t), t;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* Check if we can open a window with given options
|
|
1076
|
+
*/
|
|
1077
|
+
canOpenWindow(e = {}) {
|
|
1078
|
+
return E(this.environment).canOpenWindow(e.preferNativeWindow);
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* Get optimal window type for given options
|
|
1082
|
+
*/
|
|
1083
|
+
getOptimalWindowType(e = {}) {
|
|
1084
|
+
const t = E(this.environment);
|
|
1085
|
+
return e.preferNativeWindow && this.environment.capabilities.nativeWindows ? "window" : e.modal !== !1 && this.environment.capabilities.modalOverlays ? "modal" : t.getOptimalViewportType(e.preferNativeWindow);
|
|
1086
|
+
}
|
|
1087
|
+
/**
|
|
1088
|
+
* Event handling
|
|
1089
|
+
*/
|
|
1090
|
+
onWindowOpened(e) {
|
|
1091
|
+
return this.on("window:opened", ({ window: t }) => e(t));
|
|
1092
|
+
}
|
|
1093
|
+
onWindowClosed(e) {
|
|
1094
|
+
return this.on("window:closed", ({ windowId: t }) => e(t));
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* Generic event subscription
|
|
1098
|
+
*/
|
|
1099
|
+
on(e, t) {
|
|
1100
|
+
return this.eventHandlers.has(e) || this.eventHandlers.set(e, /* @__PURE__ */ new Set()), this.eventHandlers.get(e).add(t), () => {
|
|
1101
|
+
this.eventHandlers.get(e)?.delete(t);
|
|
1102
|
+
};
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Emit an event to all handlers
|
|
1106
|
+
*/
|
|
1107
|
+
emit(e, t) {
|
|
1108
|
+
const i = this.eventHandlers.get(e);
|
|
1109
|
+
i && i.forEach((s) => s(t));
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Set up event handlers for a window
|
|
1113
|
+
*/
|
|
1114
|
+
setupWindowEventHandlers(e) {
|
|
1115
|
+
e.onFocus(() => {
|
|
1116
|
+
this.emit("window:focused", { windowId: e.id });
|
|
1117
|
+
}), e.onResize((t) => {
|
|
1118
|
+
this.emit("window:resized", { windowId: e.id, bounds: t });
|
|
1119
|
+
}), e.onClose(() => {
|
|
1120
|
+
this.windows.delete(e.id), this.emit("window:closed", { windowId: e.id });
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* Create default adapter based on platform
|
|
1125
|
+
*/
|
|
1126
|
+
createDefaultAdapter() {
|
|
1127
|
+
switch (this.environment.platform) {
|
|
1128
|
+
case "electron":
|
|
1129
|
+
return new S(this.platformConfig);
|
|
1130
|
+
default:
|
|
1131
|
+
return new S(this.platformConfig);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
// ==================== Phase 2: Global State Management ====================
|
|
1135
|
+
/**
|
|
1136
|
+
* Synchronize state globally across all windows
|
|
1137
|
+
*/
|
|
1138
|
+
syncGlobalState(e, t, i) {
|
|
1139
|
+
this.globalState.set(e, t);
|
|
1140
|
+
const s = this.globalStateCallbacks.get(e);
|
|
1141
|
+
s && s.forEach((r) => r(t)), this.windows.forEach((r) => {
|
|
1142
|
+
r.syncState(e, t);
|
|
1143
|
+
}), this.windowGroups.forEach((r, o) => {
|
|
1144
|
+
o !== i && r.syncStateInternal(e, t);
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Get global shared state
|
|
1149
|
+
*/
|
|
1150
|
+
getGlobalState(e) {
|
|
1151
|
+
return this.globalState.get(e);
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Listen for global state changes
|
|
1155
|
+
*/
|
|
1156
|
+
onGlobalStateChange(e, t) {
|
|
1157
|
+
return this.globalStateCallbacks.has(e) || this.globalStateCallbacks.set(e, /* @__PURE__ */ new Set()), this.globalStateCallbacks.get(e).add(t), () => {
|
|
1158
|
+
this.globalStateCallbacks.get(e)?.delete(t);
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* Get window group by ID
|
|
1163
|
+
*/
|
|
1164
|
+
getWindowGroup(e) {
|
|
1165
|
+
return this.windowGroups.get(e) || null;
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* Get all window groups
|
|
1169
|
+
*/
|
|
1170
|
+
getAllWindowGroups() {
|
|
1171
|
+
return Array.from(this.windowGroups.values());
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* Window group management utilities
|
|
1175
|
+
*/
|
|
1176
|
+
configureWindowGroupDefaults(e, t) {
|
|
1177
|
+
const i = this.windowGroups.get(e);
|
|
1178
|
+
i && (t.groupingStrategy && i.setGroupingStrategy(t.groupingStrategy), t.tabConfig && i.configureTabbing(t.tabConfig), t.poolConfig && i.configurePool(t.poolConfig), t.stateSyncScope && i.enableStateSync(t.stateSyncScope));
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* Cleanup all resources
|
|
1182
|
+
*/
|
|
1183
|
+
dispose() {
|
|
1184
|
+
this.globalState.clear(), this.globalStateCallbacks.clear();
|
|
1185
|
+
const e = Array.from(this.windows.values()).map(
|
|
1186
|
+
(t) => t.close().catch(() => {
|
|
1187
|
+
})
|
|
1188
|
+
// Ignore errors during cleanup
|
|
1189
|
+
);
|
|
1190
|
+
Promise.all(e).finally(() => {
|
|
1191
|
+
this.windows.clear(), this.windowGroups.clear(), this.eventHandlers.clear();
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
class de {
|
|
1196
|
+
constructor(e, t, i = "any") {
|
|
1197
|
+
this.id = e, this.manager = t, this.dataType = i, l(this, "windows", /* @__PURE__ */ new Map()), l(this, "defaultOptions", {}), l(this, "maxInstances", 1 / 0), l(this, "groupingStrategy", "stack"), l(this, "tabConfig", {
|
|
1198
|
+
enabled: !1,
|
|
1199
|
+
tabPosition: "top",
|
|
1200
|
+
allowDetach: !0,
|
|
1201
|
+
allowReorder: !0
|
|
1202
|
+
}), l(this, "poolConfig", {
|
|
1203
|
+
enabled: !1,
|
|
1204
|
+
maxPoolSize: 5,
|
|
1205
|
+
reuseThreshold: 3e4,
|
|
1206
|
+
// 30 seconds
|
|
1207
|
+
keepAliveTime: 3e5
|
|
1208
|
+
// 5 minutes
|
|
1209
|
+
}), l(this, "stateSyncScope", "none"), l(this, "sharedState", /* @__PURE__ */ new Map()), l(this, "stateCallbacks", /* @__PURE__ */ new Map()), l(this, "windowPool", /* @__PURE__ */ new Map()), l(this, "eventCallbacks", /* @__PURE__ */ new Map()), l(this, "windowMetadata", /* @__PURE__ */ new Map()), this.startPoolCleanup();
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
* Open a window for specific data (Enhanced with pooling and reuse)
|
|
1213
|
+
*/
|
|
1214
|
+
async openWindow(e, t) {
|
|
1215
|
+
const i = this.createDataKey(e), s = `${this.id}:${i}`, r = this.windows.get(i);
|
|
1216
|
+
if (r)
|
|
1217
|
+
return await r.show(), await r.focus(), r.markAsUsed(), r;
|
|
1218
|
+
let o = await this.getPooledWindow();
|
|
1219
|
+
if (o) {
|
|
1220
|
+
const h = t(e);
|
|
1221
|
+
return o.render(h), this.setWindowGroupMetadata(o, {
|
|
1222
|
+
id: s,
|
|
1223
|
+
groupId: this.id,
|
|
1224
|
+
isPooled: !1,
|
|
1225
|
+
lastUsed: Date.now()
|
|
1226
|
+
}), await o.show(), await o.focus(), this.windows.set(i, o), this.emitEvent("window:reused", o, e), o;
|
|
1227
|
+
}
|
|
1228
|
+
if (this.windows.size >= this.maxInstances) {
|
|
1229
|
+
const h = this.windows.values().next().value;
|
|
1230
|
+
h && (this.poolConfig.enabled ? await this.returnToPool(h) : await h.close());
|
|
1231
|
+
}
|
|
1232
|
+
const f = t(e);
|
|
1233
|
+
return o = await this.manager.openWindow(s, f, this.defaultOptions), this.setWindowGroupMetadata(o, {
|
|
1234
|
+
groupId: this.id,
|
|
1235
|
+
isPooled: !1,
|
|
1236
|
+
lastUsed: Date.now(),
|
|
1237
|
+
tabIndex: this.tabConfig.enabled ? this.windows.size : void 0
|
|
1238
|
+
}), this.windows.set(i, o), o.onClose(() => {
|
|
1239
|
+
this.poolConfig.enabled && o.isReusable() ? this.returnToPool(o) : (this.windows.delete(i), this.emitEvent("window:destroyed", o.id), this.windows.size === 0 && this.emitEvent("group:empty"));
|
|
1240
|
+
}), this.groupingStrategy !== "stack" && this.applyGroupingStrategy(), this.emitEvent("window:created", o), this.windows.size >= this.maxInstances && this.emitEvent("group:full"), o;
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* Get window for specific data
|
|
1244
|
+
*/
|
|
1245
|
+
getWindowForData(e) {
|
|
1246
|
+
const t = this.createDataKey(e);
|
|
1247
|
+
return this.windows.get(t) || null;
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* Get all windows in this group
|
|
1251
|
+
*/
|
|
1252
|
+
getAllWindows() {
|
|
1253
|
+
return Array.from(this.windows.values());
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Close all windows in this group
|
|
1257
|
+
*/
|
|
1258
|
+
async closeAllWindows() {
|
|
1259
|
+
const e = Array.from(this.windows.values()).map(
|
|
1260
|
+
(t) => t.close().catch(() => {
|
|
1261
|
+
})
|
|
1262
|
+
// Ignore errors
|
|
1263
|
+
);
|
|
1264
|
+
await Promise.all(e), this.windows.clear();
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* Set default options for windows in this group
|
|
1268
|
+
*/
|
|
1269
|
+
setDefaultOptions(e) {
|
|
1270
|
+
this.defaultOptions = { ...e };
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Set maximum number of instances
|
|
1274
|
+
*/
|
|
1275
|
+
setMaxInstances(e) {
|
|
1276
|
+
this.maxInstances = Math.max(1, e);
|
|
1277
|
+
}
|
|
1278
|
+
// ==================== Phase 2: Enhanced Features ====================
|
|
1279
|
+
/**
|
|
1280
|
+
* Window grouping and tabbing
|
|
1281
|
+
*/
|
|
1282
|
+
setGroupingStrategy(e) {
|
|
1283
|
+
this.groupingStrategy = e, this.applyGroupingStrategy();
|
|
1284
|
+
}
|
|
1285
|
+
getGroupingStrategy() {
|
|
1286
|
+
return this.groupingStrategy;
|
|
1287
|
+
}
|
|
1288
|
+
configureTabbing(e) {
|
|
1289
|
+
this.tabConfig = { ...e }, e.enabled && this.manager.environment.platform === "electron" && this.enableTabGrouping();
|
|
1290
|
+
}
|
|
1291
|
+
getTabConfig() {
|
|
1292
|
+
return { ...this.tabConfig };
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Window pooling and reuse
|
|
1296
|
+
*/
|
|
1297
|
+
configurePool(e) {
|
|
1298
|
+
this.poolConfig = { ...e }, e.enabled && this.startPoolCleanup();
|
|
1299
|
+
}
|
|
1300
|
+
getPoolConfig() {
|
|
1301
|
+
return { ...this.poolConfig };
|
|
1302
|
+
}
|
|
1303
|
+
getPooledWindows() {
|
|
1304
|
+
return Array.from(this.windowPool.values());
|
|
1305
|
+
}
|
|
1306
|
+
async returnToPool(e) {
|
|
1307
|
+
if (!this.poolConfig.enabled) {
|
|
1308
|
+
await e.close();
|
|
1309
|
+
return;
|
|
1310
|
+
}
|
|
1311
|
+
await e.prepareForReuse(), await e.hide(), this.setWindowGroupMetadata(e, {
|
|
1312
|
+
isPooled: !0,
|
|
1313
|
+
lastUsed: Date.now()
|
|
1314
|
+
}), this.windowPool.set(e.id, e), this.windows.delete(this.getDataKeyForWindow(e)), this.emitEvent("window:pooled", e);
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* State synchronization
|
|
1318
|
+
*/
|
|
1319
|
+
enableStateSync(e) {
|
|
1320
|
+
this.stateSyncScope = e;
|
|
1321
|
+
}
|
|
1322
|
+
syncState(e, t) {
|
|
1323
|
+
this.syncStateInternal(e, t), this.stateSyncScope === "group" ? this.syncStateToGroupWindows(e, t) : this.stateSyncScope === "global" && this.manager.syncGlobalState(e, t, this.id);
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Internal state sync without propagation (prevents recursion)
|
|
1327
|
+
*/
|
|
1328
|
+
syncStateInternal(e, t) {
|
|
1329
|
+
this.sharedState.set(e, t);
|
|
1330
|
+
const i = this.stateCallbacks.get(e);
|
|
1331
|
+
i && i.forEach((s) => s(t));
|
|
1332
|
+
}
|
|
1333
|
+
getSharedState(e) {
|
|
1334
|
+
return this.sharedState.get(e);
|
|
1335
|
+
}
|
|
1336
|
+
onStateChange(e, t) {
|
|
1337
|
+
return this.stateCallbacks.has(e) || this.stateCallbacks.set(e, /* @__PURE__ */ new Set()), this.stateCallbacks.get(e).add(t), () => {
|
|
1338
|
+
this.stateCallbacks.get(e)?.delete(t);
|
|
1339
|
+
};
|
|
1340
|
+
}
|
|
1341
|
+
/**
|
|
1342
|
+
* Window lifecycle events
|
|
1343
|
+
*/
|
|
1344
|
+
onWindowCreated(e) {
|
|
1345
|
+
return this.addEventCallback("window:created", e);
|
|
1346
|
+
}
|
|
1347
|
+
onWindowDestroyed(e) {
|
|
1348
|
+
return this.addEventCallback("window:destroyed", e);
|
|
1349
|
+
}
|
|
1350
|
+
onWindowReused(e) {
|
|
1351
|
+
return this.addEventCallback("window:reused", e);
|
|
1352
|
+
}
|
|
1353
|
+
/**
|
|
1354
|
+
* Group-level events
|
|
1355
|
+
*/
|
|
1356
|
+
onGroupEmpty(e) {
|
|
1357
|
+
return this.addEventCallback("group:empty", e);
|
|
1358
|
+
}
|
|
1359
|
+
onGroupFull(e) {
|
|
1360
|
+
return this.addEventCallback("group:full", e);
|
|
1361
|
+
}
|
|
1362
|
+
// ==================== Private Implementation ====================
|
|
1363
|
+
/**
|
|
1364
|
+
* Apply grouping strategy to existing windows
|
|
1365
|
+
*/
|
|
1366
|
+
applyGroupingStrategy() {
|
|
1367
|
+
const e = this.getAllWindows();
|
|
1368
|
+
switch (this.groupingStrategy) {
|
|
1369
|
+
case "tabs":
|
|
1370
|
+
this.arrangeWindowsAsTabs(e);
|
|
1371
|
+
break;
|
|
1372
|
+
case "cascade":
|
|
1373
|
+
this.arrangeWindowsAsCascade(e);
|
|
1374
|
+
break;
|
|
1375
|
+
case "tile":
|
|
1376
|
+
this.arrangeWindowsAsTiles(e);
|
|
1377
|
+
break;
|
|
1378
|
+
default:
|
|
1379
|
+
this.arrangeWindowsAsStack(e);
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* Enable tab grouping for windows
|
|
1385
|
+
*/
|
|
1386
|
+
enableTabGrouping() {
|
|
1387
|
+
!this.tabConfig.enabled || this.manager.environment.platform;
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* Start pool cleanup timer
|
|
1391
|
+
*/
|
|
1392
|
+
startPoolCleanup() {
|
|
1393
|
+
this.poolConfig.enabled && setInterval(() => {
|
|
1394
|
+
this.cleanupPool();
|
|
1395
|
+
}, 6e4);
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* Clean up expired pooled windows
|
|
1399
|
+
*/
|
|
1400
|
+
cleanupPool() {
|
|
1401
|
+
const e = Date.now(), t = [];
|
|
1402
|
+
this.windowPool.forEach((i, s) => {
|
|
1403
|
+
const r = this.getWindowGroupMetadata(i);
|
|
1404
|
+
e - (r.lastUsed || 0) > this.poolConfig.keepAliveTime && t.push(s);
|
|
1405
|
+
}), t.forEach(async (i) => {
|
|
1406
|
+
const s = this.windowPool.get(i);
|
|
1407
|
+
s && (await s.dispose(), this.windowPool.delete(i));
|
|
1408
|
+
});
|
|
1409
|
+
}
|
|
1410
|
+
/**
|
|
1411
|
+
* Try to get a pooled window for reuse
|
|
1412
|
+
*/
|
|
1413
|
+
async getPooledWindow() {
|
|
1414
|
+
if (!this.poolConfig.enabled || this.windowPool.size === 0)
|
|
1415
|
+
return null;
|
|
1416
|
+
let e = null, t = 0;
|
|
1417
|
+
return this.windowPool.forEach((i) => {
|
|
1418
|
+
const s = this.getWindowGroupMetadata(i), r = Date.now() - (s.lastUsed || 0);
|
|
1419
|
+
if (r < this.poolConfig.reuseThreshold) {
|
|
1420
|
+
const o = this.poolConfig.reuseThreshold - r;
|
|
1421
|
+
o > t && (e = i, t = o);
|
|
1422
|
+
}
|
|
1423
|
+
}), e && (this.windowPool.delete(e.id), this.setWindowGroupMetadata(e, {
|
|
1424
|
+
isPooled: !1,
|
|
1425
|
+
lastUsed: Date.now()
|
|
1426
|
+
})), e;
|
|
1427
|
+
}
|
|
1428
|
+
/**
|
|
1429
|
+
* Sync state to all windows in group (with recursion prevention)
|
|
1430
|
+
*/
|
|
1431
|
+
syncStateToGroupWindows(e, t) {
|
|
1432
|
+
this.windows.forEach((i) => {
|
|
1433
|
+
const s = this.getWindowGroupMetadata(i);
|
|
1434
|
+
this.setWindowGroupMetadata(i, {
|
|
1435
|
+
...s,
|
|
1436
|
+
[`shared:${e}`]: t
|
|
1437
|
+
});
|
|
1438
|
+
});
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* Get data key for a window instance
|
|
1442
|
+
*/
|
|
1443
|
+
getDataKeyForWindow(e) {
|
|
1444
|
+
for (const [t, i] of this.windows.entries())
|
|
1445
|
+
if (i.id === e.id)
|
|
1446
|
+
return t;
|
|
1447
|
+
return "";
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* Window arrangement strategies
|
|
1451
|
+
*/
|
|
1452
|
+
arrangeWindowsAsTabs(e) {
|
|
1453
|
+
this.manager.environment.platform === "electron" || this.arrangeWindowsAsModalTabs(e);
|
|
1454
|
+
}
|
|
1455
|
+
arrangeWindowsAsCascade(e) {
|
|
1456
|
+
e.forEach((t, i) => {
|
|
1457
|
+
const s = i * 30;
|
|
1458
|
+
this.setWindowGroupMetadata(t, {
|
|
1459
|
+
cascadeOffset: s,
|
|
1460
|
+
arrangementStyle: "cascade"
|
|
1461
|
+
});
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
arrangeWindowsAsTiles(e) {
|
|
1465
|
+
const t = typeof window < "u" ? window.screen.width : 1920, i = typeof window < "u" ? window.screen.height : 1080, s = Math.ceil(Math.sqrt(e.length)), r = Math.ceil(e.length / s), o = t / s, f = i / r;
|
|
1466
|
+
e.forEach((h, d) => {
|
|
1467
|
+
const u = d % s, P = Math.floor(d / s);
|
|
1468
|
+
this.setWindowGroupMetadata(h, {
|
|
1469
|
+
tilePosition: {
|
|
1470
|
+
col: u,
|
|
1471
|
+
row: P,
|
|
1472
|
+
x: u * o,
|
|
1473
|
+
y: P * f,
|
|
1474
|
+
width: o,
|
|
1475
|
+
height: f
|
|
1476
|
+
},
|
|
1477
|
+
arrangementStyle: "tile"
|
|
1478
|
+
});
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
arrangeWindowsAsStack(e) {
|
|
1482
|
+
}
|
|
1483
|
+
arrangeWindowsAsModalTabs(e) {
|
|
1484
|
+
}
|
|
1485
|
+
/**
|
|
1486
|
+
* Window metadata management (workaround for signal setter access)
|
|
1487
|
+
*/
|
|
1488
|
+
setWindowGroupMetadata(e, t) {
|
|
1489
|
+
this.windowMetadata.set(e.id, {
|
|
1490
|
+
...this.windowMetadata.get(e.id),
|
|
1491
|
+
...t
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
getWindowGroupMetadata(e) {
|
|
1495
|
+
return this.windowMetadata.get(e.id) || {};
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1498
|
+
* Event management helpers
|
|
1499
|
+
*/
|
|
1500
|
+
addEventCallback(e, t) {
|
|
1501
|
+
return this.eventCallbacks.has(e) || this.eventCallbacks.set(e, /* @__PURE__ */ new Set()), this.eventCallbacks.get(e).add(t), () => {
|
|
1502
|
+
this.eventCallbacks.get(e)?.delete(t);
|
|
1503
|
+
};
|
|
1504
|
+
}
|
|
1505
|
+
emitEvent(e, ...t) {
|
|
1506
|
+
const i = this.eventCallbacks.get(e);
|
|
1507
|
+
i && i.forEach((s) => s(...t));
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Create a unique key for data
|
|
1511
|
+
*/
|
|
1512
|
+
createDataKey(e) {
|
|
1513
|
+
if (e == null)
|
|
1514
|
+
return "null";
|
|
1515
|
+
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean")
|
|
1516
|
+
return String(e);
|
|
1517
|
+
if (typeof e == "object" && "id" in e)
|
|
1518
|
+
return String(e.id);
|
|
1519
|
+
try {
|
|
1520
|
+
return JSON.stringify(e);
|
|
1521
|
+
} catch {
|
|
1522
|
+
return String(e);
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
let w = null;
|
|
1527
|
+
function c(n = {}) {
|
|
1528
|
+
return w || (w = new x(void 0, n)), w;
|
|
1529
|
+
}
|
|
1530
|
+
function H(n) {
|
|
1531
|
+
w?.dispose(), w = n;
|
|
1532
|
+
}
|
|
1533
|
+
function le() {
|
|
1534
|
+
w?.dispose(), w = null;
|
|
1535
|
+
}
|
|
1536
|
+
var ce = Object.defineProperty, he = (n, e, t) => e in n ? ce(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, I = (n, e, t) => he(n, typeof e != "symbol" ? e + "" : e, t);
|
|
1537
|
+
function p(n) {
|
|
1538
|
+
return {
|
|
1539
|
+
type: "window-scene",
|
|
1540
|
+
sceneType: "window",
|
|
1541
|
+
id: n.id,
|
|
1542
|
+
title: n.title || n.id,
|
|
1543
|
+
content: n.children,
|
|
1544
|
+
options: n,
|
|
1545
|
+
// Render method for scene management
|
|
1546
|
+
render() {
|
|
1547
|
+
return {
|
|
1548
|
+
type: "component",
|
|
1549
|
+
id: `window-scene-${n.id}`,
|
|
1550
|
+
props: {},
|
|
1551
|
+
render: () => ({
|
|
1552
|
+
type: "element",
|
|
1553
|
+
tag: "div",
|
|
1554
|
+
props: {},
|
|
1555
|
+
children: [],
|
|
1556
|
+
element: document.createElement("div")
|
|
1557
|
+
})
|
|
1558
|
+
};
|
|
1559
|
+
},
|
|
1560
|
+
// Open this window
|
|
1561
|
+
async open() {
|
|
1562
|
+
const e = c(), t = D(() => G((i) => n.children(), `Window-${n.id}`)({}));
|
|
1563
|
+
await e.openWindow(n.id, t, n);
|
|
1564
|
+
},
|
|
1565
|
+
// Close this window
|
|
1566
|
+
async close() {
|
|
1567
|
+
await c().dismissWindow(n.id);
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
}
|
|
1571
|
+
function W(n) {
|
|
1572
|
+
const e = c(), t = e.createWindowGroup(n.id);
|
|
1573
|
+
n.groupingStrategy && t.setGroupingStrategy(n.groupingStrategy), n.tabConfig && t.configureTabbing(n.tabConfig), n.poolConfig && t.configurePool(n.poolConfig), n.stateSyncScope && t.enableStateSync(n.stateSyncScope), n.maxInstances && t.setMaxInstances(n.maxInstances);
|
|
1574
|
+
const {
|
|
1575
|
+
groupingStrategy: i,
|
|
1576
|
+
tabConfig: s,
|
|
1577
|
+
poolConfig: r,
|
|
1578
|
+
stateSyncScope: o,
|
|
1579
|
+
maxInstances: f,
|
|
1580
|
+
...h
|
|
1581
|
+
} = n;
|
|
1582
|
+
return t.setDefaultOptions(h), {
|
|
1583
|
+
type: "window-group",
|
|
1584
|
+
sceneType: "window-group",
|
|
1585
|
+
id: n.id,
|
|
1586
|
+
title: n.title || n.id,
|
|
1587
|
+
content: n.children,
|
|
1588
|
+
options: n,
|
|
1589
|
+
group: t,
|
|
1590
|
+
// Render method for scene management
|
|
1591
|
+
render() {
|
|
1592
|
+
return {
|
|
1593
|
+
type: "component",
|
|
1594
|
+
id: `window-group-${n.id}`,
|
|
1595
|
+
props: {},
|
|
1596
|
+
render: () => ({
|
|
1597
|
+
type: "element",
|
|
1598
|
+
tag: "div",
|
|
1599
|
+
props: {},
|
|
1600
|
+
children: [],
|
|
1601
|
+
element: document.createElement("div")
|
|
1602
|
+
})
|
|
1603
|
+
};
|
|
1604
|
+
},
|
|
1605
|
+
// Open a window (data-driven or simple)
|
|
1606
|
+
async open(d) {
|
|
1607
|
+
if (d !== void 0 && n.for)
|
|
1608
|
+
await t.openWindow(d, n.children);
|
|
1609
|
+
else {
|
|
1610
|
+
const u = n.children();
|
|
1611
|
+
await e.openWindow(n.id, u, n);
|
|
1612
|
+
}
|
|
1613
|
+
},
|
|
1614
|
+
// Open window for specific data
|
|
1615
|
+
async openForData(d) {
|
|
1616
|
+
if (!n.for)
|
|
1617
|
+
throw new Error('WindowGroup must specify "for" parameter for data-driven windows');
|
|
1618
|
+
await t.openWindow(d, n.children);
|
|
1619
|
+
},
|
|
1620
|
+
// Close all windows in this group
|
|
1621
|
+
async closeAll() {
|
|
1622
|
+
await t.closeAllWindows();
|
|
1623
|
+
},
|
|
1624
|
+
// Get all windows in this group
|
|
1625
|
+
getWindows() {
|
|
1626
|
+
return t.getAllWindows();
|
|
1627
|
+
},
|
|
1628
|
+
// Phase 2: Enhanced methods
|
|
1629
|
+
configureGrouping(d) {
|
|
1630
|
+
t.setGroupingStrategy(d);
|
|
1631
|
+
},
|
|
1632
|
+
configureTabs(d) {
|
|
1633
|
+
t.configureTabbing(d);
|
|
1634
|
+
},
|
|
1635
|
+
configurePooling(d) {
|
|
1636
|
+
t.configurePool(d);
|
|
1637
|
+
},
|
|
1638
|
+
enableStateSync(d) {
|
|
1639
|
+
t.enableStateSync(d);
|
|
1640
|
+
},
|
|
1641
|
+
syncGroupState(d, u) {
|
|
1642
|
+
t.syncState(d, u);
|
|
1643
|
+
},
|
|
1644
|
+
getGroupState(d) {
|
|
1645
|
+
return t.getSharedState(d);
|
|
1646
|
+
},
|
|
1647
|
+
onGroupStateChange(d, u) {
|
|
1648
|
+
return t.onStateChange(d, u);
|
|
1649
|
+
}
|
|
1650
|
+
};
|
|
1651
|
+
}
|
|
1652
|
+
function g(n) {
|
|
1653
|
+
return {
|
|
1654
|
+
type: "app",
|
|
1655
|
+
scenes: n.children,
|
|
1656
|
+
render() {
|
|
1657
|
+
return {
|
|
1658
|
+
type: "component",
|
|
1659
|
+
id: "tachui-app",
|
|
1660
|
+
props: {},
|
|
1661
|
+
render: () => ({
|
|
1662
|
+
type: "element",
|
|
1663
|
+
tag: "div",
|
|
1664
|
+
props: {},
|
|
1665
|
+
children: [],
|
|
1666
|
+
element: document.createElement("div")
|
|
1667
|
+
})
|
|
1668
|
+
};
|
|
1669
|
+
},
|
|
1670
|
+
// Initialize all scenes
|
|
1671
|
+
async initialize() {
|
|
1672
|
+
if (!c(n.platformConfig)) {
|
|
1673
|
+
const { initializeViewportSystem: t } = await Promise.resolve().then(() => Ce);
|
|
1674
|
+
t();
|
|
1675
|
+
}
|
|
1676
|
+
},
|
|
1677
|
+
// Get scene by ID
|
|
1678
|
+
getScene(e) {
|
|
1679
|
+
return n.children.find((t) => t.id === e);
|
|
1680
|
+
},
|
|
1681
|
+
// Open a specific scene
|
|
1682
|
+
async openScene(e, t) {
|
|
1683
|
+
const i = this.getScene(e);
|
|
1684
|
+
if (!i)
|
|
1685
|
+
throw new Error(`Scene with id '${e}' not found`);
|
|
1686
|
+
i.type === "window-scene" ? await i.open() : i.type === "window-group" && await i.open(t);
|
|
1687
|
+
}
|
|
1688
|
+
};
|
|
1689
|
+
}
|
|
1690
|
+
const b = {
|
|
1691
|
+
/**
|
|
1692
|
+
* Create a document window group
|
|
1693
|
+
*/
|
|
1694
|
+
documentGroup(n, e, t, i) {
|
|
1695
|
+
return W({
|
|
1696
|
+
id: n,
|
|
1697
|
+
title: e,
|
|
1698
|
+
for: t,
|
|
1699
|
+
children: i,
|
|
1700
|
+
width: 800,
|
|
1701
|
+
height: 600,
|
|
1702
|
+
resizable: !0
|
|
1703
|
+
});
|
|
1704
|
+
},
|
|
1705
|
+
/**
|
|
1706
|
+
* Create a settings window
|
|
1707
|
+
*/
|
|
1708
|
+
settingsWindow(n) {
|
|
1709
|
+
return p({
|
|
1710
|
+
id: "settings",
|
|
1711
|
+
title: "Settings",
|
|
1712
|
+
width: 600,
|
|
1713
|
+
height: 400,
|
|
1714
|
+
resizable: !1,
|
|
1715
|
+
children: n
|
|
1716
|
+
});
|
|
1717
|
+
},
|
|
1718
|
+
/**
|
|
1719
|
+
* Create an inspector window
|
|
1720
|
+
*/
|
|
1721
|
+
inspectorWindow(n) {
|
|
1722
|
+
return p({
|
|
1723
|
+
id: "inspector",
|
|
1724
|
+
title: "Inspector",
|
|
1725
|
+
width: 300,
|
|
1726
|
+
height: 500,
|
|
1727
|
+
resizable: !0,
|
|
1728
|
+
alwaysOnTop: !0,
|
|
1729
|
+
children: n
|
|
1730
|
+
});
|
|
1731
|
+
},
|
|
1732
|
+
/**
|
|
1733
|
+
* Create a palette window
|
|
1734
|
+
*/
|
|
1735
|
+
paletteWindow(n, e, t) {
|
|
1736
|
+
return p({
|
|
1737
|
+
id: n,
|
|
1738
|
+
title: e,
|
|
1739
|
+
width: 250,
|
|
1740
|
+
height: 400,
|
|
1741
|
+
resizable: !1,
|
|
1742
|
+
alwaysOnTop: !0,
|
|
1743
|
+
children: t
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
}, z = {
|
|
1747
|
+
/**
|
|
1748
|
+
* Basic app with main window and settings
|
|
1749
|
+
*/
|
|
1750
|
+
basicApp: () => g({
|
|
1751
|
+
children: [
|
|
1752
|
+
p({
|
|
1753
|
+
id: "main",
|
|
1754
|
+
title: "My App",
|
|
1755
|
+
children: () => ({
|
|
1756
|
+
type: "component",
|
|
1757
|
+
id: "main-content",
|
|
1758
|
+
props: {},
|
|
1759
|
+
render: () => ({
|
|
1760
|
+
type: "element",
|
|
1761
|
+
tag: "div",
|
|
1762
|
+
props: {},
|
|
1763
|
+
children: [],
|
|
1764
|
+
element: document.createElement("div")
|
|
1765
|
+
})
|
|
1766
|
+
})
|
|
1767
|
+
}),
|
|
1768
|
+
b.settingsWindow(() => ({
|
|
1769
|
+
type: "component",
|
|
1770
|
+
id: "settings-content",
|
|
1771
|
+
props: {},
|
|
1772
|
+
render: () => ({
|
|
1773
|
+
type: "element",
|
|
1774
|
+
tag: "div",
|
|
1775
|
+
props: {},
|
|
1776
|
+
children: [],
|
|
1777
|
+
element: document.createElement("div")
|
|
1778
|
+
})
|
|
1779
|
+
}))
|
|
1780
|
+
]
|
|
1781
|
+
}),
|
|
1782
|
+
/**
|
|
1783
|
+
* Document-based app
|
|
1784
|
+
*/
|
|
1785
|
+
documentApp: () => g({
|
|
1786
|
+
children: [
|
|
1787
|
+
W({
|
|
1788
|
+
id: "document",
|
|
1789
|
+
title: "Document",
|
|
1790
|
+
for: class {
|
|
1791
|
+
constructor() {
|
|
1792
|
+
I(this, "id"), I(this, "title");
|
|
1793
|
+
}
|
|
1794
|
+
},
|
|
1795
|
+
children: (n) => ({
|
|
1796
|
+
type: "component",
|
|
1797
|
+
id: `document-${n.id}`,
|
|
1798
|
+
props: {},
|
|
1799
|
+
render: () => ({
|
|
1800
|
+
type: "element",
|
|
1801
|
+
tag: "div",
|
|
1802
|
+
props: {},
|
|
1803
|
+
children: [],
|
|
1804
|
+
element: document.createElement("div")
|
|
1805
|
+
})
|
|
1806
|
+
})
|
|
1807
|
+
}),
|
|
1808
|
+
b.settingsWindow(() => ({
|
|
1809
|
+
type: "component",
|
|
1810
|
+
id: "settings",
|
|
1811
|
+
props: {},
|
|
1812
|
+
render: () => ({
|
|
1813
|
+
type: "element",
|
|
1814
|
+
tag: "div",
|
|
1815
|
+
props: {},
|
|
1816
|
+
children: [],
|
|
1817
|
+
element: document.createElement("div")
|
|
1818
|
+
})
|
|
1819
|
+
}))
|
|
1820
|
+
]
|
|
1821
|
+
})
|
|
1822
|
+
}, A = F(null);
|
|
1823
|
+
function _({
|
|
1824
|
+
children: n,
|
|
1825
|
+
manager: e
|
|
1826
|
+
}) {
|
|
1827
|
+
const t = e || c(), i = {
|
|
1828
|
+
openWindow: async (s, r, o) => await t.openWindow(s, r, o),
|
|
1829
|
+
dismissWindow: async (s) => await t.dismissWindow(s),
|
|
1830
|
+
viewportEnvironment: t.environment,
|
|
1831
|
+
currentWindow: null
|
|
1832
|
+
// This would be set based on current context
|
|
1833
|
+
};
|
|
1834
|
+
return {
|
|
1835
|
+
type: "context-provider",
|
|
1836
|
+
context: A,
|
|
1837
|
+
value: i,
|
|
1838
|
+
children: Array.isArray(n) ? n : [n]
|
|
1839
|
+
};
|
|
1840
|
+
}
|
|
1841
|
+
function m() {
|
|
1842
|
+
const n = N(A);
|
|
1843
|
+
if (!n)
|
|
1844
|
+
throw new Error("useViewportEnvironment must be used within a ViewportEnvironmentProvider");
|
|
1845
|
+
return n();
|
|
1846
|
+
}
|
|
1847
|
+
function y() {
|
|
1848
|
+
const { openWindow: n } = m();
|
|
1849
|
+
return n;
|
|
1850
|
+
}
|
|
1851
|
+
function v() {
|
|
1852
|
+
const { dismissWindow: n } = m();
|
|
1853
|
+
return n;
|
|
1854
|
+
}
|
|
1855
|
+
function T() {
|
|
1856
|
+
const { viewportEnvironment: n } = m();
|
|
1857
|
+
return n;
|
|
1858
|
+
}
|
|
1859
|
+
function ue() {
|
|
1860
|
+
const { currentWindow: n } = m();
|
|
1861
|
+
return n;
|
|
1862
|
+
}
|
|
1863
|
+
function we() {
|
|
1864
|
+
return c();
|
|
1865
|
+
}
|
|
1866
|
+
function pe(n, e) {
|
|
1867
|
+
return (t) => _({
|
|
1868
|
+
children: n(t),
|
|
1869
|
+
manager: e
|
|
1870
|
+
});
|
|
1871
|
+
}
|
|
1872
|
+
function me(n) {
|
|
1873
|
+
return (e) => {
|
|
1874
|
+
const t = y(), i = v(), s = T();
|
|
1875
|
+
return n({
|
|
1876
|
+
...e,
|
|
1877
|
+
openWindow: t,
|
|
1878
|
+
dismissWindow: i,
|
|
1879
|
+
viewportEnvironment: s
|
|
1880
|
+
});
|
|
1881
|
+
};
|
|
1882
|
+
}
|
|
1883
|
+
const fe = {
|
|
1884
|
+
openWindow: "openWindow",
|
|
1885
|
+
dismissWindow: "dismissWindow",
|
|
1886
|
+
viewportEnvironment: "viewportEnvironment",
|
|
1887
|
+
currentWindow: "currentWindow"
|
|
1888
|
+
};
|
|
1889
|
+
function ge(n) {
|
|
1890
|
+
return m()[n];
|
|
1891
|
+
}
|
|
1892
|
+
const be = {
|
|
9
1893
|
// Manager
|
|
10
|
-
getManager:
|
|
1894
|
+
getManager: c,
|
|
11
1895
|
// Environment
|
|
12
|
-
useOpenWindow:
|
|
13
|
-
useDismissWindow:
|
|
14
|
-
useViewportInfo:
|
|
1896
|
+
useOpenWindow: y,
|
|
1897
|
+
useDismissWindow: v,
|
|
1898
|
+
useViewportInfo: T,
|
|
15
1899
|
// Components
|
|
16
|
-
Window:
|
|
17
|
-
WindowGroup:
|
|
18
|
-
App:
|
|
1900
|
+
Window: p,
|
|
1901
|
+
WindowGroup: W,
|
|
1902
|
+
App: g,
|
|
19
1903
|
// Utilities
|
|
20
|
-
Utils:
|
|
21
|
-
Examples:
|
|
1904
|
+
Utils: b,
|
|
1905
|
+
Examples: z
|
|
22
1906
|
};
|
|
23
|
-
function
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
const
|
|
28
|
-
isWindow: (
|
|
29
|
-
isModal: (
|
|
30
|
-
isPortal: (
|
|
31
|
-
isSheet: (
|
|
32
|
-
isPopover: (
|
|
33
|
-
},
|
|
1907
|
+
function ye(n) {
|
|
1908
|
+
const e = new x(n?.customAdapter);
|
|
1909
|
+
return H(e), e;
|
|
1910
|
+
}
|
|
1911
|
+
const ve = {
|
|
1912
|
+
isWindow: (n) => n.type === "window",
|
|
1913
|
+
isModal: (n) => n.type === "modal",
|
|
1914
|
+
isPortal: (n) => n.type === "portal",
|
|
1915
|
+
isSheet: (n) => n.type === "sheet",
|
|
1916
|
+
isPopover: (n) => n.type === "popover"
|
|
1917
|
+
}, We = {
|
|
34
1918
|
/**
|
|
35
1919
|
* Check if running in Electron
|
|
36
1920
|
*/
|
|
37
|
-
isElectron: () =>
|
|
1921
|
+
isElectron: () => c().environment.platform === "electron",
|
|
38
1922
|
/**
|
|
39
1923
|
* Check if on mobile
|
|
40
1924
|
*/
|
|
41
|
-
isMobile: () =>
|
|
1925
|
+
isMobile: () => c().environment.platform === "mobile",
|
|
42
1926
|
/**
|
|
43
1927
|
* Check if multi-window is supported
|
|
44
1928
|
*/
|
|
45
|
-
supportsMultiWindow: () =>
|
|
1929
|
+
supportsMultiWindow: () => c().environment.capabilities.multiWindow,
|
|
46
1930
|
/**
|
|
47
1931
|
* Check if native windows are supported
|
|
48
1932
|
*/
|
|
49
|
-
supportsNativeWindows: () =>
|
|
1933
|
+
supportsNativeWindows: () => c().environment.capabilities.nativeWindows,
|
|
50
1934
|
/**
|
|
51
1935
|
* Get optimal window type for current platform
|
|
52
1936
|
*/
|
|
53
|
-
getOptimalWindowType: (
|
|
54
|
-
},
|
|
1937
|
+
getOptimalWindowType: (n = !1) => c().getOptimalWindowType({ preferNativeWindow: n })
|
|
1938
|
+
}, Ee = {
|
|
55
1939
|
/**
|
|
56
1940
|
* Standard document window
|
|
57
1941
|
*/
|
|
58
|
-
document: (
|
|
59
|
-
title:
|
|
1942
|
+
document: (n) => ({
|
|
1943
|
+
title: n || "Document",
|
|
60
1944
|
width: 800,
|
|
61
1945
|
height: 600,
|
|
62
1946
|
resizable: !0,
|
|
@@ -66,8 +1950,8 @@ const h = {
|
|
|
66
1950
|
/**
|
|
67
1951
|
* Settings/preferences window
|
|
68
1952
|
*/
|
|
69
|
-
settings: (
|
|
70
|
-
title:
|
|
1953
|
+
settings: (n) => ({
|
|
1954
|
+
title: n || "Settings",
|
|
71
1955
|
width: 600,
|
|
72
1956
|
height: 400,
|
|
73
1957
|
resizable: !1,
|
|
@@ -78,8 +1962,8 @@ const h = {
|
|
|
78
1962
|
/**
|
|
79
1963
|
* Inspector/sidebar window
|
|
80
1964
|
*/
|
|
81
|
-
inspector: (
|
|
82
|
-
title:
|
|
1965
|
+
inspector: (n) => ({
|
|
1966
|
+
title: n || "Inspector",
|
|
83
1967
|
width: 300,
|
|
84
1968
|
height: 500,
|
|
85
1969
|
resizable: !0,
|
|
@@ -88,8 +1972,8 @@ const h = {
|
|
|
88
1972
|
/**
|
|
89
1973
|
* Palette/tool window
|
|
90
1974
|
*/
|
|
91
|
-
palette: (
|
|
92
|
-
title:
|
|
1975
|
+
palette: (n) => ({
|
|
1976
|
+
title: n || "Palette",
|
|
93
1977
|
width: 250,
|
|
94
1978
|
height: 400,
|
|
95
1979
|
resizable: !1,
|
|
@@ -98,8 +1982,8 @@ const h = {
|
|
|
98
1982
|
/**
|
|
99
1983
|
* Dialog/alert window
|
|
100
1984
|
*/
|
|
101
|
-
dialog: (
|
|
102
|
-
title:
|
|
1985
|
+
dialog: (n) => ({
|
|
1986
|
+
title: n || "Dialog",
|
|
103
1987
|
width: 400,
|
|
104
1988
|
height: 200,
|
|
105
1989
|
resizable: !1,
|
|
@@ -110,15 +1994,15 @@ const h = {
|
|
|
110
1994
|
/**
|
|
111
1995
|
* Fullscreen window
|
|
112
1996
|
*/
|
|
113
|
-
fullscreen: (
|
|
114
|
-
title:
|
|
1997
|
+
fullscreen: (n) => ({
|
|
1998
|
+
title: n || "Fullscreen",
|
|
115
1999
|
width: typeof window < "u" && window.screen?.width || 1920,
|
|
116
2000
|
height: typeof window < "u" && window.screen?.height || 1080,
|
|
117
2001
|
resizable: !1,
|
|
118
2002
|
minimizable: !1,
|
|
119
2003
|
maximizable: !1
|
|
120
2004
|
})
|
|
121
|
-
},
|
|
2005
|
+
}, Se = {
|
|
122
2006
|
DEFAULT_WINDOW_WIDTH: 800,
|
|
123
2007
|
DEFAULT_WINDOW_HEIGHT: 600,
|
|
124
2008
|
MIN_WINDOW_WIDTH: 300,
|
|
@@ -126,41 +2010,76 @@ const h = {
|
|
|
126
2010
|
MODAL_Z_INDEX: 1e3,
|
|
127
2011
|
PORTAL_Z_INDEX: 999,
|
|
128
2012
|
ANIMATION_DURATION: 200
|
|
129
|
-
}
|
|
2013
|
+
}, Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2014
|
+
__proto__: null,
|
|
2015
|
+
App: g,
|
|
2016
|
+
EnvironmentKeys: fe,
|
|
2017
|
+
ExampleScenes: z,
|
|
2018
|
+
PlatformUtils: We,
|
|
2019
|
+
TachUIViewportManager: x,
|
|
2020
|
+
Viewport: be,
|
|
2021
|
+
ViewportConstants: Se,
|
|
2022
|
+
ViewportEnvironmentProvider: _,
|
|
2023
|
+
ViewportTypeGuards: ve,
|
|
2024
|
+
WebViewportAdapter: S,
|
|
2025
|
+
Window: p,
|
|
2026
|
+
WindowConfigs: Ee,
|
|
2027
|
+
WindowGroup: W,
|
|
2028
|
+
WindowUtils: b,
|
|
2029
|
+
checkFeatureSupport: Y,
|
|
2030
|
+
createCapabilityChecker: E,
|
|
2031
|
+
createWindowAwareComponent: me,
|
|
2032
|
+
detectViewportEnvironment: M,
|
|
2033
|
+
disposeViewportManager: le,
|
|
2034
|
+
getBrowserInfo: Z,
|
|
2035
|
+
getEnvironmentValue: ge,
|
|
2036
|
+
getOSInfo: Q,
|
|
2037
|
+
getViewportManager: c,
|
|
2038
|
+
initializeViewportSystem: ye,
|
|
2039
|
+
setViewportManager: H,
|
|
2040
|
+
useCurrentWindow: ue,
|
|
2041
|
+
useDismissWindow: v,
|
|
2042
|
+
useEnvironmentDismissWindow: v,
|
|
2043
|
+
useEnvironmentOpenWindow: y,
|
|
2044
|
+
useOpenWindow: y,
|
|
2045
|
+
useViewportEnvironment: m,
|
|
2046
|
+
useViewportInfo: T,
|
|
2047
|
+
useViewportManager: we,
|
|
2048
|
+
withViewportEnvironment: pe
|
|
2049
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
130
2050
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
2051
|
+
g as App,
|
|
2052
|
+
fe as EnvironmentKeys,
|
|
2053
|
+
z as ExampleScenes,
|
|
2054
|
+
We as PlatformUtils,
|
|
2055
|
+
x as TachUIViewportManager,
|
|
2056
|
+
be as Viewport,
|
|
2057
|
+
Se as ViewportConstants,
|
|
2058
|
+
_ as ViewportEnvironmentProvider,
|
|
2059
|
+
ve as ViewportTypeGuards,
|
|
2060
|
+
S as WebViewportAdapter,
|
|
2061
|
+
p as Window,
|
|
2062
|
+
Ee as WindowConfigs,
|
|
2063
|
+
W as WindowGroup,
|
|
2064
|
+
b as WindowUtils,
|
|
2065
|
+
Y as checkFeatureSupport,
|
|
2066
|
+
E as createCapabilityChecker,
|
|
2067
|
+
me as createWindowAwareComponent,
|
|
2068
|
+
M as detectViewportEnvironment,
|
|
2069
|
+
le as disposeViewportManager,
|
|
2070
|
+
Z as getBrowserInfo,
|
|
2071
|
+
ge as getEnvironmentValue,
|
|
2072
|
+
Q as getOSInfo,
|
|
2073
|
+
c as getViewportManager,
|
|
2074
|
+
ye as initializeViewportSystem,
|
|
2075
|
+
H as setViewportManager,
|
|
2076
|
+
ue as useCurrentWindow,
|
|
2077
|
+
v as useDismissWindow,
|
|
2078
|
+
v as useEnvironmentDismissWindow,
|
|
2079
|
+
y as useEnvironmentOpenWindow,
|
|
2080
|
+
y as useOpenWindow,
|
|
2081
|
+
m as useViewportEnvironment,
|
|
2082
|
+
T as useViewportInfo,
|
|
2083
|
+
we as useViewportManager,
|
|
2084
|
+
pe as withViewportEnvironment
|
|
165
2085
|
};
|
|
166
|
-
//# sourceMappingURL=index.js.map
|