@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/reactive/effect.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { ComputationImpl as f, getCurrentOwner as a } from "./context.js";
|
|
2
|
-
function i(e, n = {}) {
|
|
3
|
-
const u = a();
|
|
4
|
-
let r, t = !0;
|
|
5
|
-
const o = () => {
|
|
6
|
-
const s = e(r);
|
|
7
|
-
return t && (t = !1), r = s, s;
|
|
8
|
-
}, c = new f(o, u);
|
|
9
|
-
return n.name && Object.defineProperty(c, "name", {
|
|
10
|
-
value: n.name,
|
|
11
|
-
enumerable: !1
|
|
12
|
-
}), c.execute(), c;
|
|
13
|
-
}
|
|
14
|
-
function d(e, n = {}) {
|
|
15
|
-
const u = a();
|
|
16
|
-
let r, t = !1;
|
|
17
|
-
const o = () => {
|
|
18
|
-
if (!t)
|
|
19
|
-
return t = !0, e(r);
|
|
20
|
-
const s = e(r);
|
|
21
|
-
return r = s, s;
|
|
22
|
-
}, c = new f(o, u);
|
|
23
|
-
return n.name && Object.defineProperty(c, "name", {
|
|
24
|
-
value: n.name,
|
|
25
|
-
enumerable: !1
|
|
26
|
-
}), c.execute(), c;
|
|
27
|
-
}
|
|
28
|
-
function p(e, n = {}) {
|
|
29
|
-
const u = a(), r = () => {
|
|
30
|
-
const o = e(void 0);
|
|
31
|
-
return t.dispose(), o;
|
|
32
|
-
}, t = new f(r, u);
|
|
33
|
-
return n.name && Object.defineProperty(t, "name", {
|
|
34
|
-
value: `${n.name}(once)`,
|
|
35
|
-
enumerable: !1
|
|
36
|
-
}), t.execute(), t;
|
|
37
|
-
}
|
|
38
|
-
function b(e, n = {}) {
|
|
39
|
-
return i(e, { ...n, name: `${n.name || "sync"}(sync)` });
|
|
40
|
-
}
|
|
41
|
-
function v(e) {
|
|
42
|
-
e.dispose();
|
|
43
|
-
}
|
|
44
|
-
function l(e) {
|
|
45
|
-
return e.state === 3;
|
|
46
|
-
}
|
|
47
|
-
function y(e) {
|
|
48
|
-
return {
|
|
49
|
-
id: e.id,
|
|
50
|
-
name: e.name || "anonymous",
|
|
51
|
-
state: e.state,
|
|
52
|
-
sourceCount: e.sources.size,
|
|
53
|
-
observerCount: e.observers.size,
|
|
54
|
-
disposed: l(e),
|
|
55
|
-
type: "Effect"
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export {
|
|
59
|
-
i as createEffect,
|
|
60
|
-
p as createOnceEffect,
|
|
61
|
-
d as createRenderEffect,
|
|
62
|
-
b as createSyncEffect,
|
|
63
|
-
v as disposeEffect,
|
|
64
|
-
y as getEffectInfo,
|
|
65
|
-
l as isEffectDisposed
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=effect.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effect.js","sources":["../../src/reactive/effect.ts"],"sourcesContent":["/**\n * Effect implementation for side effects in reactive system\n *\n * Effects run when their dependencies change, enabling reactive\n * side effects like DOM updates, logging, API calls, etc.\n */\n\nimport { ComputationImpl, getCurrentOwner } from './context'\nimport type { EffectFunction, EffectOptions } from './types'\n\n/**\n * Effect function type\n */\nexport type Effect = ComputationImpl\n\n/**\n * Create a reactive effect that runs when dependencies change\n *\n * @param fn The effect function to run\n * @param options Effect configuration options\n * @returns The effect computation\n *\n * @example\n * ```typescript\n * const [count, setCount] = createSignal(0)\n *\n * createEffect(() => {\n * console.log('Count changed:', count())\n * })\n *\n * setCount(5) // Logs: \"Count changed: 5\"\n * ```\n */\nexport function createEffect<T>(fn: EffectFunction<T>, options: EffectOptions = {}): Effect {\n const owner = getCurrentOwner()\n\n let previousValue: T | undefined\n let isFirst = true\n\n const effectFn = () => {\n const nextValue = fn(previousValue)\n\n if (!isFirst) {\n previousValue = nextValue\n } else {\n isFirst = false\n previousValue = nextValue\n }\n\n return nextValue\n }\n\n // Create the computation\n const effect = new ComputationImpl(effectFn, owner)\n\n // Add debug name if provided\n if (options.name) {\n Object.defineProperty(effect, 'name', {\n value: options.name,\n enumerable: false,\n })\n }\n\n // Execute immediately to establish dependencies\n effect.execute()\n\n return effect\n}\n\n/**\n * Create an effect that only runs after dependencies change (not on first run)\n *\n * @param fn The effect function to run\n * @param options Effect configuration options\n * @returns The effect computation\n *\n * @example\n * ```typescript\n * const [count, setCount] = createSignal(0)\n *\n * createRenderEffect(() => {\n * // This won't run immediately, only when count changes\n * document.title = `Count: ${count()}`\n * })\n * ```\n */\nexport function createRenderEffect<T>(fn: EffectFunction<T>, options: EffectOptions = {}): Effect {\n const owner = getCurrentOwner()\n\n let previousValue: T | undefined\n let hasRun = false\n\n const effectFn = () => {\n if (!hasRun) {\n hasRun = true\n // Track dependencies but don't run the effect\n return fn(previousValue)\n }\n\n const nextValue = fn(previousValue)\n previousValue = nextValue\n return nextValue\n }\n\n const effect = new ComputationImpl(effectFn, owner)\n\n if (options.name) {\n Object.defineProperty(effect, 'name', {\n value: options.name,\n enumerable: false,\n })\n }\n\n // Execute to establish dependencies but not run the actual effect\n effect.execute()\n\n return effect\n}\n\n/**\n * Create a one-time effect that disposes itself after first execution\n *\n * @param fn The effect function to run once\n * @param options Effect configuration options\n * @returns The effect computation\n */\nexport function createOnceEffect<T>(fn: EffectFunction<T>, options: EffectOptions = {}): Effect {\n const owner = getCurrentOwner()\n\n const effectFn = () => {\n const result = fn(undefined)\n // Dispose the effect after first run\n effect.dispose()\n return result\n }\n\n const effect = new ComputationImpl(effectFn, owner)\n\n if (options.name) {\n Object.defineProperty(effect, 'name', {\n value: `${options.name}(once)`,\n enumerable: false,\n })\n }\n\n effect.execute()\n\n return effect\n}\n\n/**\n * Create an effect that runs synchronously (not batched)\n *\n * @param fn The effect function to run\n * @param options Effect configuration options\n * @returns The effect computation\n */\nexport function createSyncEffect<T>(fn: EffectFunction<T>, options: EffectOptions = {}): Effect {\n // TODO: Implement synchronous execution\n // For now, use regular effect\n return createEffect(fn, { ...options, name: `${options.name || 'sync'}(sync)` })\n}\n\n/**\n * Dispose an effect\n */\nexport function disposeEffect(effect: Effect): void {\n effect.dispose()\n}\n\n/**\n * Check if an effect is disposed\n */\nexport function isEffectDisposed(effect: Effect): boolean {\n return effect.state === 3 // ComputationState.Disposed\n}\n\n/**\n * Get effect debug information\n */\nexport function getEffectInfo(effect: Effect): object {\n return {\n id: effect.id,\n name: (effect as any).name || 'anonymous',\n state: effect.state,\n sourceCount: effect.sources.size,\n observerCount: effect.observers.size,\n disposed: isEffectDisposed(effect),\n type: 'Effect',\n }\n}\n\n// Re-export types\nexport type { EffectFunction, EffectOptions }\n"],"names":["createEffect","fn","options","owner","getCurrentOwner","previousValue","isFirst","effectFn","nextValue","effect","ComputationImpl","createRenderEffect","hasRun","createOnceEffect","result","createSyncEffect","disposeEffect","isEffectDisposed","getEffectInfo"],"mappings":";AAiCO,SAASA,EAAgBC,GAAuBC,IAAyB,IAAY;AAC1F,QAAMC,IAAQC,EAAA;AAEd,MAAIC,GACAC,IAAU;AAEd,QAAMC,IAAW,MAAM;AACrB,UAAMC,IAAYP,EAAGI,CAAa;AAElC,WAAKC,MAGHA,IAAU,KACVD,IAAgBG,GAGXA;AAAA,EACT,GAGMC,IAAS,IAAIC,EAAgBH,GAAUJ,CAAK;AAGlD,SAAID,EAAQ,QACV,OAAO,eAAeO,GAAQ,QAAQ;AAAA,IACpC,OAAOP,EAAQ;AAAA,IACf,YAAY;AAAA,EAAA,CACb,GAIHO,EAAO,QAAA,GAEAA;AACT;AAmBO,SAASE,EAAsBV,GAAuBC,IAAyB,IAAY;AAChG,QAAMC,IAAQC,EAAA;AAEd,MAAIC,GACAO,IAAS;AAEb,QAAML,IAAW,MAAM;AACrB,QAAI,CAACK;AACH,aAAAA,IAAS,IAEFX,EAAGI,CAAa;AAGzB,UAAMG,IAAYP,EAAGI,CAAa;AAClC,WAAAA,IAAgBG,GACTA;AAAA,EACT,GAEMC,IAAS,IAAIC,EAAgBH,GAAUJ,CAAK;AAElD,SAAID,EAAQ,QACV,OAAO,eAAeO,GAAQ,QAAQ;AAAA,IACpC,OAAOP,EAAQ;AAAA,IACf,YAAY;AAAA,EAAA,CACb,GAIHO,EAAO,QAAA,GAEAA;AACT;AASO,SAASI,EAAoBZ,GAAuBC,IAAyB,IAAY;AAC9F,QAAMC,IAAQC,EAAA,GAERG,IAAW,MAAM;AACrB,UAAMO,IAASb,EAAG,MAAS;AAE3B,WAAAQ,EAAO,QAAA,GACAK;AAAA,EACT,GAEML,IAAS,IAAIC,EAAgBH,GAAUJ,CAAK;AAElD,SAAID,EAAQ,QACV,OAAO,eAAeO,GAAQ,QAAQ;AAAA,IACpC,OAAO,GAAGP,EAAQ,IAAI;AAAA,IACtB,YAAY;AAAA,EAAA,CACb,GAGHO,EAAO,QAAA,GAEAA;AACT;AASO,SAASM,EAAoBd,GAAuBC,IAAyB,IAAY;AAG9F,SAAOF,EAAaC,GAAI,EAAE,GAAGC,GAAS,MAAM,GAAGA,EAAQ,QAAQ,MAAM,SAAA,CAAU;AACjF;AAKO,SAASc,EAAcP,GAAsB;AAClD,EAAAA,EAAO,QAAA;AACT;AAKO,SAASQ,EAAiBR,GAAyB;AACxD,SAAOA,EAAO,UAAU;AAC1B;AAKO,SAASS,EAAcT,GAAwB;AACpD,SAAO;AAAA,IACL,IAAIA,EAAO;AAAA,IACX,MAAOA,EAAe,QAAQ;AAAA,IAC9B,OAAOA,EAAO;AAAA,IACd,aAAaA,EAAO,QAAQ;AAAA,IAC5B,eAAeA,EAAO,UAAU;AAAA,IAChC,UAAUQ,EAAiBR,CAAM;AAAA,IACjC,MAAM;AAAA,EAAA;AAEV;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./context.cjs"),n=require("./unified-scheduler.cjs");var l=Object.defineProperty,p=(r,e,i)=>e in r?l(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i,s=(r,e,i)=>p(r,typeof e!="symbol"?e+"":e,i);let d=0;class h{constructor(e,i={}){this.effectFn=e,s(this,"id",++d),s(this,"type","effect"),s(this,"priority"),s(this,"sources",new Set),s(this,"observers",new Set),s(this,"isDisposed",!1),s(this,"cleanupFn"),s(this,"options"),s(this,"owner"),this.priority=i.priority??n.UpdatePriority.Normal,this.options=i,this.owner=f.getCurrentOwner(),i.fireImmediately!==!1&&this.execute()}notify(){this.isDisposed||this.execute()}execute(){if(this.isDisposed)return;if(this.cleanupFn){try{this.cleanupFn()}catch(t){console.error("Effect cleanup error:",t)}this.cleanupFn=void 0}for(const t of this.sources)"removeObserver"in t&&typeof t.removeObserver=="function"?t.removeObserver(this):"observers"in t&&t.observers instanceof Set&&t.observers.delete(this);this.sources.clear();const e=f.getCurrentComputation(),i=this.setCurrentComputation||(()=>{});i(this);try{const t=this.effectFn();typeof t=="function"&&(this.cleanupFn=t)}catch(t){if(this.options.onError)try{this.options.onError(t)}catch(o){throw console.error("Effect error handler threw error:",o),t}else throw console.error(`Effect ${this.options.debugName||this.id} threw error:`,t),t}finally{i(e)}}cleanup(){if(this.isDisposed=!0,this.cleanupFn){try{this.cleanupFn()}catch(e){console.error("Effect cleanup error:",e)}this.cleanupFn=void 0}for(const e of this.sources)"removeObserver"in e&&typeof e.removeObserver=="function"?e.removeObserver(this):"observers"in e&&e.observers instanceof Set&&e.observers.delete(this);if(this.sources.clear(),this.owner?.cleanups){const e=this.owner.cleanups.indexOf(this.cleanup.bind(this));e>=0&&this.owner.cleanups.splice(e,1)}}dispose(){this.cleanup()}get disposed(){return this.isDisposed}[Symbol.for("tachui.debug")](){return{id:this.id,type:this.type,priority:n.UpdatePriority[this.priority],debugName:this.options.debugName,disposed:this.isDisposed,sourceCount:this.sources.size,hasCleanup:!!this.cleanupFn}}toString(){return`Effect(${this.options.debugName||this.id})`}}function c(r,e){const i=new h(r,e),t=f.getCurrentOwner();return t&&t.cleanups.push(()=>i.cleanup()),()=>i.cleanup()}function m(r,e){return c(r,{...e,priority:n.UpdatePriority.High})}function y(r,e){return c(r,{...e,priority:n.UpdatePriority.Low})}function b(r,e){return c(r,{...e,fireImmediately:!1})}function E(r,e,i=3,t){let o=0;const u=()=>{try{return r()}catch(a){if(o++,e&&o<=i&&e(a,o)){setTimeout(()=>u(),o*100);return}else throw a}};return c(u,{...t,debugName:`${t?.debugName||"effect"}(resilient)`})}function v(r){const e=r.map(({fn:i,options:t})=>c(i,t));return()=>{e.forEach(i=>i())}}function g(){return n.ReactiveScheduler.getInstance().getPerformanceMetrics()}function w(){n.ReactiveScheduler.getInstance().flushSync()}exports.EffectImpl=h;exports.createEffectBatch=v;exports.createEnhancedEffect=c;exports.createHighPriorityEffect=m;exports.createLowPriorityEffect=y;exports.createResilientEffect=E;exports.createWatchEffect=b;exports.flushEffectUpdates=w;exports.getEffectPerformanceMetrics=g;
|
|
2
|
-
//# sourceMappingURL=enhanced-effect.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhanced-effect.cjs","sources":["../../src/reactive/enhanced-effect.ts"],"sourcesContent":["/**\n * Enhanced Effect System v2.0\n *\n * Provides proper error propagation and integrates with the unified scheduler\n * to fix silent error suppression and incomplete cleanup issues.\n */\n\nimport { getCurrentComputation, getCurrentOwner } from './context'\nimport type { Owner } from './types'\nimport { type ReactiveNode, ReactiveScheduler, UpdatePriority } from './unified-scheduler'\n\nlet effectIdCounter = 0\n\nexport interface EffectOptions {\n priority?: UpdatePriority\n debugName?: string\n onError?: (error: Error) => void\n fireImmediately?: boolean\n}\n\n/**\n * Enhanced effect implementation with proper error propagation\n */\nexport class EffectImpl implements ReactiveNode {\n readonly id = ++effectIdCounter\n readonly type = 'effect' as const\n readonly priority: UpdatePriority\n readonly sources = new Set<any>()\n readonly observers = new Set<never>() // Effects don't have observers\n\n private isDisposed = false\n private cleanupFn?: () => void\n private options: EffectOptions\n private owner: Owner | null\n\n constructor(\n private effectFn: () => undefined | (() => void),\n options: EffectOptions = {}\n ) {\n this.priority = options.priority ?? UpdatePriority.Normal\n this.options = options\n this.owner = getCurrentOwner()\n\n if (options.fireImmediately !== false) {\n this.execute()\n }\n }\n\n /**\n * Notify method called by unified scheduler\n */\n notify(): void {\n if (this.isDisposed) return\n\n this.execute()\n }\n\n /**\n * Execute the effect with proper error handling\n */\n private execute(): void {\n if (this.isDisposed) return\n\n // Cleanup previous effect run\n if (this.cleanupFn) {\n try {\n this.cleanupFn()\n } catch (error) {\n console.error('Effect cleanup error:', error)\n }\n this.cleanupFn = undefined\n }\n\n // Clear existing dependencies\n for (const source of this.sources) {\n if ('removeObserver' in source && typeof source.removeObserver === 'function') {\n source.removeObserver(this)\n } else if ('observers' in source && source.observers instanceof Set) {\n source.observers.delete(this)\n }\n }\n this.sources.clear()\n\n // Execute effect with dependency tracking\n const previousComputation = getCurrentComputation()\n // We need to set this as the current computation for dependency tracking\n const setCurrentComputation = (this as any).setCurrentComputation || (() => {})\n setCurrentComputation(this)\n\n try {\n const result = this.effectFn()\n\n // Store cleanup function if returned\n if (typeof result === 'function') {\n this.cleanupFn = result\n }\n } catch (error) {\n if (this.options.onError) {\n try {\n this.options.onError(error as Error)\n } catch (handlerError) {\n console.error('Effect error handler threw error:', handlerError)\n // Re-throw the original error since handler failed\n throw error\n }\n } else {\n // Don't suppress errors like the old implementation - re-throw them\n console.error(`Effect ${this.options.debugName || this.id} threw error:`, error)\n throw error\n }\n } finally {\n setCurrentComputation(previousComputation)\n }\n }\n\n /**\n * Complete cleanup for memory management\n */\n cleanup(): void {\n this.isDisposed = true\n\n // Cleanup effect function\n if (this.cleanupFn) {\n try {\n this.cleanupFn()\n } catch (error) {\n console.error('Effect cleanup error:', error)\n }\n this.cleanupFn = undefined\n }\n\n // Remove from all sources\n for (const source of this.sources) {\n if ('removeObserver' in source && typeof source.removeObserver === 'function') {\n source.removeObserver(this)\n } else if ('observers' in source && source.observers instanceof Set) {\n source.observers.delete(this)\n }\n }\n this.sources.clear()\n\n // Remove from owner cleanup\n if (this.owner?.cleanups) {\n const index = this.owner.cleanups.indexOf(this.cleanup.bind(this))\n if (index >= 0) {\n this.owner.cleanups.splice(index, 1)\n }\n }\n }\n\n /**\n * Dispose the effect (alias for cleanup)\n */\n dispose(): void {\n this.cleanup()\n }\n\n /**\n * Check if effect is disposed\n */\n get disposed(): boolean {\n return this.isDisposed\n }\n\n /**\n * Debug information\n */\n [Symbol.for('tachui.debug')](): object {\n return {\n id: this.id,\n type: this.type,\n priority: UpdatePriority[this.priority],\n debugName: this.options.debugName,\n disposed: this.isDisposed,\n sourceCount: this.sources.size,\n hasCleanup: !!this.cleanupFn,\n }\n }\n\n toString(): string {\n return `Effect(${this.options.debugName || this.id})`\n }\n}\n\n/**\n * Create a reactive effect with proper error handling\n *\n * @param effectFn The effect function to run\n * @param options Effect configuration options\n * @returns Cleanup function to dispose the effect\n *\n * @example\n * ```typescript\n * const [count, setCount] = createSignal(0)\n *\n * const cleanup = createEnhancedEffect(() => {\n * console.log('Count changed:', count())\n * }, {\n * debugName: 'countLogger',\n * onError: (error) => {\n * console.error('Effect failed:', error)\n * }\n * })\n *\n * // Later, cleanup when no longer needed\n * cleanup()\n * ```\n */\nexport function createEnhancedEffect(\n effectFn: () => undefined | (() => void),\n options?: EffectOptions\n): () => void {\n const effect = new EffectImpl(effectFn, options)\n\n // Register cleanup with owner if available\n const owner = getCurrentOwner()\n if (owner) {\n owner.cleanups.push(() => effect.cleanup())\n }\n\n return () => effect.cleanup()\n}\n\n/**\n * Create an effect with high priority for user interactions\n */\nexport function createHighPriorityEffect(\n effectFn: () => undefined | (() => void),\n options?: Omit<EffectOptions, 'priority'>\n): () => void {\n return createEnhancedEffect(effectFn, { ...options, priority: UpdatePriority.High })\n}\n\n/**\n * Create an effect with low priority for background tasks\n */\nexport function createLowPriorityEffect(\n effectFn: () => undefined | (() => void),\n options?: Omit<EffectOptions, 'priority'>\n): () => void {\n return createEnhancedEffect(effectFn, { ...options, priority: UpdatePriority.Low })\n}\n\n/**\n * Create an effect that only runs when dependencies change (not immediately)\n */\nexport function createWatchEffect(\n effectFn: () => undefined | (() => void),\n options?: Omit<EffectOptions, 'fireImmediately'>\n): () => void {\n return createEnhancedEffect(effectFn, { ...options, fireImmediately: false })\n}\n\n/**\n * Create an effect with automatic error recovery\n */\nexport function createResilientEffect(\n effectFn: () => undefined | (() => void),\n onError?: (error: Error, attempt: number) => boolean, // return true to retry\n maxRetries = 3,\n options?: EffectOptions\n): () => void {\n let attempt = 0\n\n const resilientFn = () => {\n try {\n return effectFn()\n } catch (error) {\n attempt++\n\n if (onError && attempt <= maxRetries && onError(error as Error, attempt)) {\n // Retry after a short delay\n setTimeout(() => resilientFn(), attempt * 100)\n return\n } else {\n // Give up and re-throw\n throw error\n }\n }\n }\n\n return createEnhancedEffect(resilientFn, {\n ...options,\n debugName: `${options?.debugName || 'effect'}(resilient)`,\n })\n}\n\n/**\n * Batch multiple effect creations for performance\n */\nexport function createEffectBatch(\n effects: Array<{\n fn: () => undefined | (() => void)\n options?: EffectOptions\n }>\n): () => void {\n const cleanups = effects.map(({ fn, options }) => createEnhancedEffect(fn, options))\n\n return () => {\n cleanups.forEach((cleanup) => cleanup())\n }\n}\n\n/**\n * Get performance metrics for all effects\n */\nexport function getEffectPerformanceMetrics() {\n const scheduler = ReactiveScheduler.getInstance()\n return scheduler.getPerformanceMetrics()\n}\n\n/**\n * Flush all pending effect updates synchronously\n */\nexport function flushEffectUpdates(): void {\n const scheduler = ReactiveScheduler.getInstance()\n scheduler.flushSync()\n}\n"],"names":["effectIdCounter","EffectImpl","effectFn","options","__publicField","UpdatePriority","getCurrentOwner","error","source","previousComputation","getCurrentComputation","setCurrentComputation","result","handlerError","index","createEnhancedEffect","effect","owner","createHighPriorityEffect","createLowPriorityEffect","createWatchEffect","createResilientEffect","onError","maxRetries","attempt","resilientFn","createEffectBatch","effects","cleanups","fn","cleanup","getEffectPerformanceMetrics","ReactiveScheduler","flushEffectUpdates"],"mappings":"kTAWA,IAAIA,EAAkB,EAYf,MAAMC,CAAmC,CAY9C,YACUC,EACRC,EAAyB,GACzB,CAFQ,KAAA,SAAAD,EAZVE,EAAA,KAAS,KAAK,EAAEJ,CAAA,EAChBI,EAAA,KAAS,OAAO,QAAA,EAChBA,EAAA,KAAS,UAAA,EACTA,EAAA,KAAS,cAAc,GAAS,EAChCA,EAAA,KAAS,gBAAgB,GAAW,EAEpCA,EAAA,KAAQ,aAAa,EAAA,EACrBA,EAAA,KAAQ,WAAA,EACRA,EAAA,KAAQ,SAAA,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kB,EACdnB,EACAoB,EACAC,EAAa,EACbpB,EACY,CACZ,IAAIqB,EAAU,EAEd,MAAMC,EAAc,IAAM,CACxB,GAAI,CACF,OAAOvB,EAAA,CACT,OAASK,EAAO,CAGd,GAFAiB,IAEIF,GAAWE,GAAWD,GAAcD,EAAQf,EAAgBiB,CAAO,EAAG,CAExE,WAAW,IAAMC,IAAeD,EAAU,GAAG,EAC7C,MACF,KAEE,OAAMjB,CAEV,CACF,EAEA,OAAOQ,EAAqBU,EAAa,CACvC,GAAGtB,EACH,UAAW,GAAGA,GAAS,WAAa,QAAQ,aAAA,CAC7C,CACH,CAKO,SAASuB,EACdC,EAIY,CACZ,MAAMC,EAAWD,EAAQ,IAAI,CAAC,CAAE,GAAAE,EAAI,QAAA1B,CAAA,IAAcY,EAAqBc,EAAI1B,CAAO,CAAC,EAEnF,MAAO,IAAM,CACXyB,EAAS,QAASE,GAAYA,EAAA,CAAS,CACzC,CACF,CAKO,SAASC,GAA8B,CAE5C,OADkBC,EAAAA,kBAAkB,YAAA,EACnB,sBAAA,CACnB,CAKO,SAASC,GAA2B,CACvBD,EAAAA,kBAAkB,YAAA,EAC1B,UAAA,CACZ"}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { getCurrentOwner as h, getCurrentComputation as p } from "./context.js";
|
|
2
|
-
import { UpdatePriority as c, ReactiveScheduler as a } from "./unified-scheduler.js";
|
|
3
|
-
var l = Object.defineProperty, d = (r, e, s) => e in r ? l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[e] = s, i = (r, e, s) => d(r, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
-
let m = 0;
|
|
5
|
-
class b {
|
|
6
|
-
constructor(e, s = {}) {
|
|
7
|
-
this.effectFn = e, i(this, "id", ++m), i(this, "type", "effect"), i(this, "priority"), i(this, "sources", /* @__PURE__ */ new Set()), i(this, "observers", /* @__PURE__ */ new Set()), i(this, "isDisposed", !1), i(this, "cleanupFn"), i(this, "options"), i(this, "owner"), this.priority = s.priority ?? c.Normal, this.options = s, this.owner = h(), s.fireImmediately !== !1 && this.execute();
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Notify method called by unified scheduler
|
|
11
|
-
*/
|
|
12
|
-
notify() {
|
|
13
|
-
this.isDisposed || this.execute();
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Execute the effect with proper error handling
|
|
17
|
-
*/
|
|
18
|
-
execute() {
|
|
19
|
-
if (this.isDisposed) return;
|
|
20
|
-
if (this.cleanupFn) {
|
|
21
|
-
try {
|
|
22
|
-
this.cleanupFn();
|
|
23
|
-
} catch (t) {
|
|
24
|
-
console.error("Effect cleanup error:", t);
|
|
25
|
-
}
|
|
26
|
-
this.cleanupFn = void 0;
|
|
27
|
-
}
|
|
28
|
-
for (const t of this.sources)
|
|
29
|
-
"removeObserver" in t && typeof t.removeObserver == "function" ? t.removeObserver(this) : "observers" in t && t.observers instanceof Set && t.observers.delete(this);
|
|
30
|
-
this.sources.clear();
|
|
31
|
-
const e = p(), s = this.setCurrentComputation || (() => {
|
|
32
|
-
});
|
|
33
|
-
s(this);
|
|
34
|
-
try {
|
|
35
|
-
const t = this.effectFn();
|
|
36
|
-
typeof t == "function" && (this.cleanupFn = t);
|
|
37
|
-
} catch (t) {
|
|
38
|
-
if (this.options.onError)
|
|
39
|
-
try {
|
|
40
|
-
this.options.onError(t);
|
|
41
|
-
} catch (o) {
|
|
42
|
-
throw console.error("Effect error handler threw error:", o), t;
|
|
43
|
-
}
|
|
44
|
-
else
|
|
45
|
-
throw console.error(`Effect ${this.options.debugName || this.id} threw error:`, t), t;
|
|
46
|
-
} finally {
|
|
47
|
-
s(e);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Complete cleanup for memory management
|
|
52
|
-
*/
|
|
53
|
-
cleanup() {
|
|
54
|
-
if (this.isDisposed = !0, this.cleanupFn) {
|
|
55
|
-
try {
|
|
56
|
-
this.cleanupFn();
|
|
57
|
-
} catch (e) {
|
|
58
|
-
console.error("Effect cleanup error:", e);
|
|
59
|
-
}
|
|
60
|
-
this.cleanupFn = void 0;
|
|
61
|
-
}
|
|
62
|
-
for (const e of this.sources)
|
|
63
|
-
"removeObserver" in e && typeof e.removeObserver == "function" ? e.removeObserver(this) : "observers" in e && e.observers instanceof Set && e.observers.delete(this);
|
|
64
|
-
if (this.sources.clear(), this.owner?.cleanups) {
|
|
65
|
-
const e = this.owner.cleanups.indexOf(this.cleanup.bind(this));
|
|
66
|
-
e >= 0 && this.owner.cleanups.splice(e, 1);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Dispose the effect (alias for cleanup)
|
|
71
|
-
*/
|
|
72
|
-
dispose() {
|
|
73
|
-
this.cleanup();
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Check if effect is disposed
|
|
77
|
-
*/
|
|
78
|
-
get disposed() {
|
|
79
|
-
return this.isDisposed;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Debug information
|
|
83
|
-
*/
|
|
84
|
-
[Symbol.for("tachui.debug")]() {
|
|
85
|
-
return {
|
|
86
|
-
id: this.id,
|
|
87
|
-
type: this.type,
|
|
88
|
-
priority: c[this.priority],
|
|
89
|
-
debugName: this.options.debugName,
|
|
90
|
-
disposed: this.isDisposed,
|
|
91
|
-
sourceCount: this.sources.size,
|
|
92
|
-
hasCleanup: !!this.cleanupFn
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
toString() {
|
|
96
|
-
return `Effect(${this.options.debugName || this.id})`;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function n(r, e) {
|
|
100
|
-
const s = new b(r, e), t = h();
|
|
101
|
-
return t && t.cleanups.push(() => s.cleanup()), () => s.cleanup();
|
|
102
|
-
}
|
|
103
|
-
function g(r, e) {
|
|
104
|
-
return n(r, { ...e, priority: c.High });
|
|
105
|
-
}
|
|
106
|
-
function w(r, e) {
|
|
107
|
-
return n(r, { ...e, priority: c.Low });
|
|
108
|
-
}
|
|
109
|
-
function E(r, e) {
|
|
110
|
-
return n(r, { ...e, fireImmediately: !1 });
|
|
111
|
-
}
|
|
112
|
-
function F(r, e, s = 3, t) {
|
|
113
|
-
let o = 0;
|
|
114
|
-
const f = () => {
|
|
115
|
-
try {
|
|
116
|
-
return r();
|
|
117
|
-
} catch (u) {
|
|
118
|
-
if (o++, e && o <= s && e(u, o)) {
|
|
119
|
-
setTimeout(() => f(), o * 100);
|
|
120
|
-
return;
|
|
121
|
-
} else
|
|
122
|
-
throw u;
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
return n(f, {
|
|
126
|
-
...t,
|
|
127
|
-
debugName: `${t?.debugName || "effect"}(resilient)`
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function C(r) {
|
|
131
|
-
const e = r.map(({ fn: s, options: t }) => n(s, t));
|
|
132
|
-
return () => {
|
|
133
|
-
e.forEach((s) => s());
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
function O() {
|
|
137
|
-
return a.getInstance().getPerformanceMetrics();
|
|
138
|
-
}
|
|
139
|
-
function N() {
|
|
140
|
-
a.getInstance().flushSync();
|
|
141
|
-
}
|
|
142
|
-
export {
|
|
143
|
-
b as EffectImpl,
|
|
144
|
-
C as createEffectBatch,
|
|
145
|
-
n as createEnhancedEffect,
|
|
146
|
-
g as createHighPriorityEffect,
|
|
147
|
-
w as createLowPriorityEffect,
|
|
148
|
-
F as createResilientEffect,
|
|
149
|
-
E as createWatchEffect,
|
|
150
|
-
N as flushEffectUpdates,
|
|
151
|
-
O as getEffectPerformanceMetrics
|
|
152
|
-
};
|
|
153
|
-
//# sourceMappingURL=enhanced-effect.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhanced-effect.js","sources":["../../src/reactive/enhanced-effect.ts"],"sourcesContent":["/**\n * Enhanced Effect System v2.0\n *\n * Provides proper error propagation and integrates with the unified scheduler\n * to fix silent error suppression and incomplete cleanup issues.\n */\n\nimport { getCurrentComputation, getCurrentOwner } from './context'\nimport type { Owner } from './types'\nimport { type ReactiveNode, ReactiveScheduler, UpdatePriority } from './unified-scheduler'\n\nlet effectIdCounter = 0\n\nexport interface EffectOptions {\n priority?: UpdatePriority\n debugName?: string\n onError?: (error: Error) => void\n fireImmediately?: boolean\n}\n\n/**\n * Enhanced effect implementation with proper error propagation\n */\nexport class EffectImpl implements ReactiveNode {\n readonly id = ++effectIdCounter\n readonly type = 'effect' as const\n readonly priority: UpdatePriority\n readonly sources = new Set<any>()\n readonly observers = new Set<never>() // Effects don't have observers\n\n private isDisposed = false\n private cleanupFn?: () => void\n private options: EffectOptions\n private owner: Owner | null\n\n constructor(\n private effectFn: () => undefined | (() => void),\n options: EffectOptions = {}\n ) {\n this.priority = options.priority ?? UpdatePriority.Normal\n this.options = options\n this.owner = getCurrentOwner()\n\n if (options.fireImmediately !== false) {\n this.execute()\n }\n }\n\n /**\n * Notify method called by unified scheduler\n */\n notify(): void {\n if (this.isDisposed) return\n\n this.execute()\n }\n\n /**\n * Execute the effect with proper error handling\n */\n private execute(): void {\n if (this.isDisposed) return\n\n // Cleanup previous effect run\n if (this.cleanupFn) {\n try {\n this.cleanupFn()\n } catch (error) {\n console.error('Effect cleanup error:', error)\n }\n this.cleanupFn = undefined\n }\n\n // Clear existing dependencies\n for (const source of this.sources) {\n if ('removeObserver' in source && typeof source.removeObserver === 'function') {\n source.removeObserver(this)\n } else if ('observers' in source && source.observers instanceof Set) {\n source.observers.delete(this)\n }\n }\n this.sources.clear()\n\n // Execute effect with dependency tracking\n const previousComputation = getCurrentComputation()\n // We need to set this as the current computation for dependency tracking\n const setCurrentComputation = (this as any).setCurrentComputation || (() => {})\n setCurrentComputation(this)\n\n try {\n const result = this.effectFn()\n\n // Store cleanup function if returned\n if (typeof result === 'function') {\n this.cleanupFn = result\n }\n } catch (error) {\n if (this.options.onError) {\n try {\n this.options.onError(error as Error)\n } catch (handlerError) {\n console.error('Effect error handler threw error:', handlerError)\n // Re-throw the original error since handler failed\n throw error\n }\n } else {\n // Don't suppress errors like the old implementation - re-throw them\n console.error(`Effect ${this.options.debugName || this.id} threw error:`, error)\n throw error\n }\n } finally {\n setCurrentComputation(previousComputation)\n }\n }\n\n /**\n * Complete cleanup for memory management\n */\n cleanup(): void {\n this.isDisposed = true\n\n // Cleanup effect function\n if (this.cleanupFn) {\n try {\n this.cleanupFn()\n } catch (error) {\n console.error('Effect cleanup error:', error)\n }\n this.cleanupFn = undefined\n }\n\n // Remove from all sources\n for (const source of this.sources) {\n if ('removeObserver' in source && typeof source.removeObserver === 'function') {\n source.removeObserver(this)\n } else if ('observers' in source && source.observers instanceof Set) {\n source.observers.delete(this)\n }\n }\n this.sources.clear()\n\n // Remove from owner cleanup\n if (this.owner?.cleanups) {\n const index = this.owner.cleanups.indexOf(this.cleanup.bind(this))\n if (index >= 0) {\n this.owner.cleanups.splice(index, 1)\n }\n }\n }\n\n /**\n * Dispose the effect (alias for cleanup)\n */\n dispose(): void {\n this.cleanup()\n }\n\n /**\n * Check if effect is disposed\n */\n get disposed(): boolean {\n return this.isDisposed\n }\n\n /**\n * Debug information\n */\n [Symbol.for('tachui.debug')](): object {\n return {\n id: this.id,\n type: this.type,\n priority: UpdatePriority[this.priority],\n debugName: this.options.debugName,\n disposed: this.isDisposed,\n sourceCount: this.sources.size,\n hasCleanup: !!this.cleanupFn,\n }\n }\n\n toString(): string {\n return `Effect(${this.options.debugName || this.id})`\n }\n}\n\n/**\n * Create a reactive effect with proper error handling\n *\n * @param effectFn The effect function to run\n * @param options Effect configuration options\n * @returns Cleanup function to dispose the effect\n *\n * @example\n * ```typescript\n * const [count, setCount] = createSignal(0)\n *\n * const cleanup = createEnhancedEffect(() => {\n * console.log('Count changed:', count())\n * }, {\n * debugName: 'countLogger',\n * onError: (error) => {\n * console.error('Effect failed:', error)\n * }\n * })\n *\n * // Later, cleanup when no longer needed\n * cleanup()\n * ```\n */\nexport function createEnhancedEffect(\n effectFn: () => undefined | (() => void),\n options?: EffectOptions\n): () => void {\n const effect = new EffectImpl(effectFn, options)\n\n // Register cleanup with owner if available\n const owner = getCurrentOwner()\n if (owner) {\n owner.cleanups.push(() => effect.cleanup())\n }\n\n return () => effect.cleanup()\n}\n\n/**\n * Create an effect with high priority for user interactions\n */\nexport function createHighPriorityEffect(\n effectFn: () => undefined | (() => void),\n options?: Omit<EffectOptions, 'priority'>\n): () => void {\n return createEnhancedEffect(effectFn, { ...options, priority: UpdatePriority.High })\n}\n\n/**\n * Create an effect with low priority for background tasks\n */\nexport function createLowPriorityEffect(\n effectFn: () => undefined | (() => void),\n options?: Omit<EffectOptions, 'priority'>\n): () => void {\n return createEnhancedEffect(effectFn, { ...options, priority: UpdatePriority.Low })\n}\n\n/**\n * Create an effect that only runs when dependencies change (not immediately)\n */\nexport function createWatchEffect(\n effectFn: () => undefined | (() => void),\n options?: Omit<EffectOptions, 'fireImmediately'>\n): () => void {\n return createEnhancedEffect(effectFn, { ...options, fireImmediately: false })\n}\n\n/**\n * Create an effect with automatic error recovery\n */\nexport function createResilientEffect(\n effectFn: () => undefined | (() => void),\n onError?: (error: Error, attempt: number) => boolean, // return true to retry\n maxRetries = 3,\n options?: EffectOptions\n): () => void {\n let attempt = 0\n\n const resilientFn = () => {\n try {\n return effectFn()\n } catch (error) {\n attempt++\n\n if (onError && attempt <= maxRetries && onError(error as Error, attempt)) {\n // Retry after a short delay\n setTimeout(() => resilientFn(), attempt * 100)\n return\n } else {\n // Give up and re-throw\n throw error\n }\n }\n }\n\n return createEnhancedEffect(resilientFn, {\n ...options,\n debugName: `${options?.debugName || 'effect'}(resilient)`,\n })\n}\n\n/**\n * Batch multiple effect creations for performance\n */\nexport function createEffectBatch(\n effects: Array<{\n fn: () => undefined | (() => void)\n options?: EffectOptions\n }>\n): () => void {\n const cleanups = effects.map(({ fn, options }) => createEnhancedEffect(fn, options))\n\n return () => {\n cleanups.forEach((cleanup) => cleanup())\n }\n}\n\n/**\n * Get performance metrics for all effects\n */\nexport function getEffectPerformanceMetrics() {\n const scheduler = ReactiveScheduler.getInstance()\n return scheduler.getPerformanceMetrics()\n}\n\n/**\n * Flush all pending effect updates synchronously\n */\nexport function flushEffectUpdates(): void {\n const scheduler = ReactiveScheduler.getInstance()\n scheduler.flushSync()\n}\n"],"names":["effectIdCounter","EffectImpl","effectFn","options","__publicField","UpdatePriority","getCurrentOwner","error","source","previousComputation","getCurrentComputation","setCurrentComputation","result","handlerError","index","createEnhancedEffect","effect","owner","createHighPriorityEffect","createLowPriorityEffect","createWatchEffect","createResilientEffect","onError","maxRetries","attempt","resilientFn","createEffectBatch","effects","cleanups","fn","cleanup","getEffectPerformanceMetrics","ReactiveScheduler","flushEffectUpdates"],"mappings":";;;AAWA,IAAIA,IAAkB;AAYf,MAAMC,EAAmC;AAAA,EAY9C,YACUC,GACRC,IAAyB,IACzB;AAFQ,SAAA,WAAAD,GAZVE,EAAA,MAAS,MAAK,EAAEJ,CAAA,GAChBI,EAAA,MAAS,QAAO,QAAA,GAChBA,EAAA,MAAS,UAAA,GACTA,EAAA,MAAS,+BAAc,IAAA,CAAS,GAChCA,EAAA,MAAS,iCAAgB,IAAA,CAAW,GAEpCA,EAAA,MAAQ,cAAa,EAAA,GACrBA,EAAA,MAAQ,WAAA,GACRA,EAAA,MAAQ,SAAA,GACRA,EAAA,MAAQ,OAAA,GAMN,KAAK,WAAWD,EAAQ,YAAYE,EAAe,QACnD,KAAK,UAAUF,GACf,KAAK,QAAQG,EAAA,GAETH,EAAQ,oBAAoB,MAC9B,KAAK,QAAA;AAAA,EAET;AAAA;AAAA;AAAA;AAAA,EAKA,SAAe;AACb,IAAI,KAAK,cAET,KAAK,QAAA;AAAA,EACP;AAAA;AAAA;AAAA;AAAA,EAKQ,UAAgB;AACtB,QAAI,KAAK,WAAY;AAGrB,QAAI,KAAK,WAAW;AAClB,UAAI;AACF,aAAK,UAAA;AAAA,MACP,SA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;AACZ,MAAIqB,IAAU;AAEd,QAAMC,IAAc,MAAM;AACxB,QAAI;AACF,aAAOvB,EAAA;AAAA,IACT,SAASK,GAAO;AAGd,UAFAiB,KAEIF,KAAWE,KAAWD,KAAcD,EAAQf,GAAgBiB,CAAO,GAAG;AAExE,mBAAW,MAAMC,KAAeD,IAAU,GAAG;AAC7C;AAAA,MACF;AAEE,cAAMjB;AAAA,IAEV;AAAA,EACF;AAEA,SAAOQ,EAAqBU,GAAa;AAAA,IACvC,GAAGtB;AAAA,IACH,WAAW,GAAGA,GAAS,aAAa,QAAQ;AAAA,EAAA,CAC7C;AACH;AAKO,SAASuB,EACdC,GAIY;AACZ,QAAMC,IAAWD,EAAQ,IAAI,CAAC,EAAE,IAAAE,GAAI,SAAA1B,EAAA,MAAcY,EAAqBc,GAAI1B,CAAO,CAAC;AAEnF,SAAO,MAAM;AACX,IAAAyB,EAAS,QAAQ,CAACE,MAAYA,EAAA,CAAS;AAAA,EACzC;AACF;AAKO,SAASC,IAA8B;AAE5C,SADkBC,EAAkB,YAAA,EACnB,sBAAA;AACnB;AAKO,SAASC,IAA2B;AAEzC,EADkBD,EAAkB,YAAA,EAC1B,UAAA;AACZ;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./context.cjs"),u=require("./equality.cjs"),a=require("./types.cjs"),n=require("./unified-scheduler.cjs");var d=Object.defineProperty,g=(i,e,t)=>e in i?d(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,s=(i,e,t)=>g(i,typeof e!="symbol"?e+"":e,t);let p=0;class o{constructor(e,t={}){s(this,"id",++p),s(this,"type","signal"),s(this,"priority"),s(this,"observers",new Set),s(this,"_value"),s(this,"scheduler",n.ReactiveScheduler.getInstance()),s(this,"equalsFn"),s(this,"debugName"),s(this,"options"),this._value=e,this.options=t,this.priority=t.priority??n.UpdatePriority.Normal,this.equalsFn=t.equals??u.defaultEquals,this.debugName=t.debugName}getValue(){const e=h.getCurrentComputation();return e&&e.state!==a.ComputationState.Disposed&&(this.observers.add(e),e.sources.add(this)),this._value}peek(){return this._value}setValue(e){const t=typeof e=="function"?e(this._value):e;if(!this.equalsFn(t,this._value)){const r=this._value;this._value=t,process.env.NODE_ENV==="development"&&this.debugName&&console.debug(`[Signal:${this.debugName}] ${r} -> ${t}`),this.scheduler.schedule(this)}return t}notify(){for(const e of this.observers)e.state!==a.ComputationState.Disposed&&(e.state=a.ComputationState.Dirty,"type"in e&&"priority"in e&&this.scheduler.schedule(e))}removeObserver(e){this.observers.delete(e)}cleanup(){for(const e of this.observers)e.sources.delete(this);this.observers.clear()}[Symbol.for("tachui.debug")](){return{id:this.id,type:this.type,value:this._value,observerCount:this.observers.size,priority:n.UpdatePriority[this.priority],debugName:this.debugName,equalsFn:this.equalsFn.name||"anonymous"}}toString(){return`Signal(${this.options.debugName||this.id}): ${this._value}`}}function l(i,e){const t=new o(i,e),r=t.getValue.bind(t);r.peek=t.peek.bind(t);const c=t.setValue.bind(t);return Object.defineProperty(r,Symbol.for("tachui.signal"),{value:t,enumerable:!1}),[r,c]}function f(i,e){return l(i,{...e,equals:u.deepEquals})}function b(i,e){return l(i,{...e,equals:u.shallowEquals})}function S(i){return i[Symbol.for("tachui.signal")]||null}function m(i){return typeof i=="function"&&Symbol.for("tachui.signal")in i}function v(){n.ReactiveScheduler.getInstance().flushSync()}function y(){return n.ReactiveScheduler.getInstance().getPerformanceMetrics()}exports.EnhancedSignalImpl=o;exports.createDeepSignal=f;exports.createEnhancedSignal=l;exports.createShallowSignal=b;exports.flushSignalUpdates=v;exports.getEnhancedSignalImpl=S;exports.getSignalPerformanceMetrics=y;exports.isEnhancedSignal=m;
|
|
2
|
-
//# sourceMappingURL=enhanced-signal.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhanced-signal.cjs","sources":["../../src/reactive/enhanced-signal.ts"],"sourcesContent":["/**\n * Enhanced Signal Implementation v2.0\n *\n * Integrates with the unified scheduler and provides custom equality functions\n * to fix signal update detection bugs and eliminate race conditions.\n */\n\nimport { getCurrentComputation } from './context'\nimport { defaultEquals, deepEquals, shallowEquals, type EqualityFunction } from './equality'\nimport type { Computation } from './types'\nimport { ComputationState } from './types'\nimport { type ReactiveNode, ReactiveScheduler, UpdatePriority } from './unified-scheduler'\n\nlet signalIdCounter = 0\n\nexport interface SignalOptions<T> {\n equals?: EqualityFunction<T>\n priority?: UpdatePriority\n debugName?: string\n}\n\n/**\n * Enhanced signal implementation with unified scheduler integration\n */\nexport class EnhancedSignalImpl<T> implements ReactiveNode {\n readonly id = ++signalIdCounter\n readonly type = 'signal' as const\n readonly priority: UpdatePriority\n readonly observers = new Set<Computation>()\n\n private _value: T\n private scheduler = ReactiveScheduler.getInstance()\n private equalsFn: EqualityFunction<T>\n private debugName?: string\n private options: SignalOptions<T>\n\n constructor(initialValue: T, options: SignalOptions<T> = {}) {\n this._value = initialValue\n this.options = options\n this.priority = options.priority ?? UpdatePriority.Normal\n this.equalsFn = options.equals ?? defaultEquals\n this.debugName = options.debugName\n }\n\n /**\n * Get the current value and track dependency\n */\n getValue(): T {\n const computation = getCurrentComputation()\n if (computation && computation.state !== ComputationState.Disposed) {\n // Establish bidirectional relationship\n this.observers.add(computation)\n computation.sources.add(this)\n }\n return this._value\n }\n\n /**\n * Get the current value without tracking dependency\n */\n peek(): T {\n return this._value\n }\n\n /**\n * Set a new value using custom equality function\n */\n setValue(newValue: T | ((prev: T) => T)): T {\n const value =\n typeof newValue === 'function' ? (newValue as (prev: T) => T)(this._value) : newValue\n\n // Use custom equality function instead of simple !== check\n if (!this.equalsFn(value, this._value)) {\n const oldValue = this._value\n this._value = value\n\n if (process.env.NODE_ENV === 'development' && this.debugName) {\n console.debug(`[Signal:${this.debugName}] ${oldValue} -> ${value}`)\n }\n\n // Schedule update through unified scheduler\n this.scheduler.schedule(this)\n }\n\n return value\n }\n\n /**\n * Notify all observers (called by scheduler)\n */\n notify(): void {\n // Mark all observers as dirty and schedule them\n for (const observer of this.observers) {\n if (observer.state !== ComputationState.Disposed) {\n observer.state = ComputationState.Dirty\n\n // Schedule observer if it's also a ReactiveNode\n if ('type' in observer && 'priority' in observer) {\n this.scheduler.schedule(observer as any)\n }\n }\n }\n }\n\n /**\n * Remove an observer (cleanup)\n */\n removeObserver(computation: Computation): void {\n this.observers.delete(computation)\n }\n\n /**\n * Complete cleanup for memory management\n */\n cleanup(): void {\n // Complete bidirectional cleanup to prevent memory leaks\n for (const observer of this.observers) {\n observer.sources.delete(this)\n }\n this.observers.clear()\n }\n\n /**\n * Get debug information about this signal\n */\n [Symbol.for('tachui.debug')](): object {\n return {\n id: this.id,\n type: this.type,\n value: this._value,\n observerCount: this.observers.size,\n priority: UpdatePriority[this.priority],\n debugName: this.debugName,\n equalsFn: this.equalsFn.name || 'anonymous',\n }\n }\n\n toString(): string {\n return `Signal(${this.options.debugName || this.id}): ${this._value}`\n }\n}\n\n/**\n * Signal setter function type\n */\nexport type SignalSetter<T> = (value: T | ((prev: T) => T)) => T\n\n/**\n * Create a new enhanced reactive signal with custom equality\n */\nexport function createEnhancedSignal<T>(\n initialValue: T,\n options?: SignalOptions<T>\n): [() => T, SignalSetter<T>] {\n const signal = new EnhancedSignalImpl(initialValue, options)\n\n const getter = signal.getValue.bind(signal) as (() => T) & { peek: () => T }\n getter.peek = signal.peek.bind(signal)\n\n const setter: SignalSetter<T> = signal.setValue.bind(signal)\n\n // Add debug information for compatibility\n Object.defineProperty(getter, Symbol.for('tachui.signal'), {\n value: signal,\n enumerable: false,\n })\n\n return [getter, setter]\n}\n\n/**\n * Create a signal with deep equality comparison\n */\nexport function createDeepSignal<T>(\n initialValue: T,\n options?: Omit<SignalOptions<T>, 'equals'>\n): [() => T, SignalSetter<T>] {\n return createEnhancedSignal(initialValue, {\n ...options,\n equals: deepEquals,\n })\n}\n\n/**\n * Create a signal with shallow equality comparison\n */\nexport function createShallowSignal<T>(\n initialValue: T,\n options?: Omit<SignalOptions<T>, 'equals'>\n): [() => T, SignalSetter<T>] {\n return createEnhancedSignal(initialValue, {\n ...options,\n equals: shallowEquals,\n })\n}\n\n/**\n * Get the underlying signal implementation for debugging\n */\nexport function getEnhancedSignalImpl<T>(\n signal: (() => T) & { peek: () => T }\n): EnhancedSignalImpl<T> | null {\n return (signal as any)[Symbol.for('tachui.signal')] || null\n}\n\n/**\n * Type guard to check if a value is an enhanced signal\n */\nexport function isEnhancedSignal<T = any>(value: any): value is (() => T) & { peek: () => T } {\n return typeof value === 'function' && Symbol.for('tachui.signal') in value\n}\n\n/**\n * Flush all pending signal updates synchronously\n */\nexport function flushSignalUpdates(): void {\n const scheduler = ReactiveScheduler.getInstance()\n scheduler.flushSync()\n}\n\n/**\n * Get performance metrics for all signals\n */\nexport function getSignalPerformanceMetrics() {\n const scheduler = ReactiveScheduler.getInstance()\n return scheduler.getPerformanceMetrics()\n}\n"],"names":["signalIdCounter","EnhancedSignalImpl","initialValue","options","__publicField","ReactiveScheduler","UpdatePriority","defaultEquals","computation","getCurrentComputation","ComputationState","newValue","value","oldValue","observer","createEnhancedSignal","signal","getter","setter","createDeepSignal","deepEquals","createShallowSignal","shallowEquals","getEnhancedSignalImpl","isEnhancedSignal","flushSignalUpdates","getSignalPerformanceMetrics"],"mappings":"uWAaA,IAAIA,EAAkB,EAWf,MAAMC,CAA8C,CAYzD,YAAYC,EAAiBC,EAA4B,GAAI,CAX7DC,EAAA,KAAS,KAAK,EAAEJ,CAAA,EAChBI,EAAA,KAAS,OAAO,QAAA,EAChBA,EAAA,KAAS,UAAA,EACTA,EAAA,KAAS,gBAAgB,GAAiB,EAE1CA,EAAA,KAAQ,QAAA,EACRA,EAAA,KAAQ,YAAYC,EAAAA,kBAAkB,YAAA,CAAY,EAClDD,EAAA,KAAQ,UAAA,EACRA,EAAA,KAAQ,WAAA,EACRA,EAAA,KAAQ,SAAA,EAGN,KAAK,OAASF,EACd,KAAK,QAAUC,EACf,KAAK,S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AAA,CAEpC,CAEA,UAAmB,CACjB,MAAO,UAAU,KAAK,QAAQ,WAAa,KAAK,EAAE,MAAM,KAAK,MAAM,EACrE,CACF,CAUO,SAASS,EACdb,EACAC,EAC4B,CAC5B,MAAMa,EAAS,IAAIf,EAAmBC,EAAcC,CAAO,EAErDc,EAASD,EAAO,SAAS,KAAKA,CAAM,EAC1CC,EAAO,KAAOD,EAAO,KAAK,KAAKA,CAAM,EAErC,MAAME,EAA0BF,EAAO,SAAS,KAAKA,CAAM,EAG3D,cAAO,eAAeC,EAAQ,OAAO,IAAI,eAAe,EAAG,CACzD,MAAOD,EACP,WAAY,EAAA,CACb,EAEM,CAACC,EAAQC,CAAM,CACxB,CAKO,SAASC,EACdjB,EACAC,EAC4B,CAC5B,OAAOY,EAAqBb,EAAc,CACxC,GAAGC,EACH,OAAQiB,EAAAA,UAAA,CACT,CACH,CAKO,SAASC,EACdnB,EACAC,EAC4B,CAC5B,OAAOY,EAAqBb,EAAc,CACxC,GAAGC,EACH,OAAQmB,EAAAA,aAAA,CACT,CACH,CAKO,SAASC,EACdP,EAC8B,CAC9B,OAAQA,EAAe,OAAO,IAAI,eAAe,CAAC,GAAK,IACzD,CAKO,SAASQ,EAA0BZ,EAAoD,CAC5F,OAAO,OAAOA,GAAU,YAAc,OAAO,IAAI,eAAe,IAAKA,CACvE,CAKO,SAASa,GAA2B,CACvBpB,EAAAA,kBAAkB,YAAA,EAC1B,UAAA,CACZ,CAKO,SAASqB,GAA8B,CAE5C,OADkBrB,EAAAA,kBAAkB,YAAA,EACnB,sBAAA,CACnB"}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { getCurrentComputation as h } from "./context.js";
|
|
2
|
-
import { shallowEquals as c, defaultEquals as d, deepEquals as f } from "./equality.js";
|
|
3
|
-
import { ComputationState as n } from "./types.js";
|
|
4
|
-
import { ReactiveScheduler as a, UpdatePriority as o } from "./unified-scheduler.js";
|
|
5
|
-
var p = Object.defineProperty, g = (s, e, t) => e in s ? p(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, i = (s, e, t) => g(s, typeof e != "symbol" ? e + "" : e, t);
|
|
6
|
-
let m = 0;
|
|
7
|
-
class b {
|
|
8
|
-
constructor(e, t = {}) {
|
|
9
|
-
i(this, "id", ++m), i(this, "type", "signal"), i(this, "priority"), i(this, "observers", /* @__PURE__ */ new Set()), i(this, "_value"), i(this, "scheduler", a.getInstance()), i(this, "equalsFn"), i(this, "debugName"), i(this, "options"), this._value = e, this.options = t, this.priority = t.priority ?? o.Normal, this.equalsFn = t.equals ?? d, this.debugName = t.debugName;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Get the current value and track dependency
|
|
13
|
-
*/
|
|
14
|
-
getValue() {
|
|
15
|
-
const e = h();
|
|
16
|
-
return e && e.state !== n.Disposed && (this.observers.add(e), e.sources.add(this)), this._value;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Get the current value without tracking dependency
|
|
20
|
-
*/
|
|
21
|
-
peek() {
|
|
22
|
-
return this._value;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Set a new value using custom equality function
|
|
26
|
-
*/
|
|
27
|
-
setValue(e) {
|
|
28
|
-
const t = typeof e == "function" ? e(this._value) : e;
|
|
29
|
-
if (!this.equalsFn(t, this._value)) {
|
|
30
|
-
const r = this._value;
|
|
31
|
-
this._value = t, process.env.NODE_ENV === "development" && this.debugName && console.debug(`[Signal:${this.debugName}] ${r} -> ${t}`), this.scheduler.schedule(this);
|
|
32
|
-
}
|
|
33
|
-
return t;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Notify all observers (called by scheduler)
|
|
37
|
-
*/
|
|
38
|
-
notify() {
|
|
39
|
-
for (const e of this.observers)
|
|
40
|
-
e.state !== n.Disposed && (e.state = n.Dirty, "type" in e && "priority" in e && this.scheduler.schedule(e));
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Remove an observer (cleanup)
|
|
44
|
-
*/
|
|
45
|
-
removeObserver(e) {
|
|
46
|
-
this.observers.delete(e);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Complete cleanup for memory management
|
|
50
|
-
*/
|
|
51
|
-
cleanup() {
|
|
52
|
-
for (const e of this.observers)
|
|
53
|
-
e.sources.delete(this);
|
|
54
|
-
this.observers.clear();
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Get debug information about this signal
|
|
58
|
-
*/
|
|
59
|
-
[Symbol.for("tachui.debug")]() {
|
|
60
|
-
return {
|
|
61
|
-
id: this.id,
|
|
62
|
-
type: this.type,
|
|
63
|
-
value: this._value,
|
|
64
|
-
observerCount: this.observers.size,
|
|
65
|
-
priority: o[this.priority],
|
|
66
|
-
debugName: this.debugName,
|
|
67
|
-
equalsFn: this.equalsFn.name || "anonymous"
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
toString() {
|
|
71
|
-
return `Signal(${this.options.debugName || this.id}): ${this._value}`;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function u(s, e) {
|
|
75
|
-
const t = new b(s, e), r = t.getValue.bind(t);
|
|
76
|
-
r.peek = t.peek.bind(t);
|
|
77
|
-
const l = t.setValue.bind(t);
|
|
78
|
-
return Object.defineProperty(r, Symbol.for("tachui.signal"), {
|
|
79
|
-
value: t,
|
|
80
|
-
enumerable: !1
|
|
81
|
-
}), [r, l];
|
|
82
|
-
}
|
|
83
|
-
function N(s, e) {
|
|
84
|
-
return u(s, {
|
|
85
|
-
...e,
|
|
86
|
-
equals: f
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
function q(s, e) {
|
|
90
|
-
return u(s, {
|
|
91
|
-
...e,
|
|
92
|
-
equals: c
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function E(s) {
|
|
96
|
-
return s[Symbol.for("tachui.signal")] || null;
|
|
97
|
-
}
|
|
98
|
-
function P(s) {
|
|
99
|
-
return typeof s == "function" && Symbol.for("tachui.signal") in s;
|
|
100
|
-
}
|
|
101
|
-
function F() {
|
|
102
|
-
a.getInstance().flushSync();
|
|
103
|
-
}
|
|
104
|
-
function I() {
|
|
105
|
-
return a.getInstance().getPerformanceMetrics();
|
|
106
|
-
}
|
|
107
|
-
export {
|
|
108
|
-
b as EnhancedSignalImpl,
|
|
109
|
-
N as createDeepSignal,
|
|
110
|
-
u as createEnhancedSignal,
|
|
111
|
-
q as createShallowSignal,
|
|
112
|
-
F as flushSignalUpdates,
|
|
113
|
-
E as getEnhancedSignalImpl,
|
|
114
|
-
I as getSignalPerformanceMetrics,
|
|
115
|
-
P as isEnhancedSignal
|
|
116
|
-
};
|
|
117
|
-
//# sourceMappingURL=enhanced-signal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enhanced-signal.js","sources":["../../src/reactive/enhanced-signal.ts"],"sourcesContent":["/**\n * Enhanced Signal Implementation v2.0\n *\n * Integrates with the unified scheduler and provides custom equality functions\n * to fix signal update detection bugs and eliminate race conditions.\n */\n\nimport { getCurrentComputation } from './context'\nimport { defaultEquals, deepEquals, shallowEquals, type EqualityFunction } from './equality'\nimport type { Computation } from './types'\nimport { ComputationState } from './types'\nimport { type ReactiveNode, ReactiveScheduler, UpdatePriority } from './unified-scheduler'\n\nlet signalIdCounter = 0\n\nexport interface SignalOptions<T> {\n equals?: EqualityFunction<T>\n priority?: UpdatePriority\n debugName?: string\n}\n\n/**\n * Enhanced signal implementation with unified scheduler integration\n */\nexport class EnhancedSignalImpl<T> implements ReactiveNode {\n readonly id = ++signalIdCounter\n readonly type = 'signal' as const\n readonly priority: UpdatePriority\n readonly observers = new Set<Computation>()\n\n private _value: T\n private scheduler = ReactiveScheduler.getInstance()\n private equalsFn: EqualityFunction<T>\n private debugName?: string\n private options: SignalOptions<T>\n\n constructor(initialValue: T, options: SignalOptions<T> = {}) {\n this._value = initialValue\n this.options = options\n this.priority = options.priority ?? UpdatePriority.Normal\n this.equalsFn = options.equals ?? defaultEquals\n this.debugName = options.debugName\n }\n\n /**\n * Get the current value and track dependency\n */\n getValue(): T {\n const computation = getCurrentComputation()\n if (computation && computation.state !== ComputationState.Disposed) {\n // Establish bidirectional relationship\n this.observers.add(computation)\n computation.sources.add(this)\n }\n return this._value\n }\n\n /**\n * Get the current value without tracking dependency\n */\n peek(): T {\n return this._value\n }\n\n /**\n * Set a new value using custom equality function\n */\n setValue(newValue: T | ((prev: T) => T)): T {\n const value =\n typeof newValue === 'function' ? (newValue as (prev: T) => T)(this._value) : newValue\n\n // Use custom equality function instead of simple !== check\n if (!this.equalsFn(value, this._value)) {\n const oldValue = this._value\n this._value = value\n\n if (process.env.NODE_ENV === 'development' && this.debugName) {\n console.debug(`[Signal:${this.debugName}] ${oldValue} -> ${value}`)\n }\n\n // Schedule update through unified scheduler\n this.scheduler.schedule(this)\n }\n\n return value\n }\n\n /**\n * Notify all observers (called by scheduler)\n */\n notify(): void {\n // Mark all observers as dirty and schedule them\n for (const observer of this.observers) {\n if (observer.state !== ComputationState.Disposed) {\n observer.state = ComputationState.Dirty\n\n // Schedule observer if it's also a ReactiveNode\n if ('type' in observer && 'priority' in observer) {\n this.scheduler.schedule(observer as any)\n }\n }\n }\n }\n\n /**\n * Remove an observer (cleanup)\n */\n removeObserver(computation: Computation): void {\n this.observers.delete(computation)\n }\n\n /**\n * Complete cleanup for memory management\n */\n cleanup(): void {\n // Complete bidirectional cleanup to prevent memory leaks\n for (const observer of this.observers) {\n observer.sources.delete(this)\n }\n this.observers.clear()\n }\n\n /**\n * Get debug information about this signal\n */\n [Symbol.for('tachui.debug')](): object {\n return {\n id: this.id,\n type: this.type,\n value: this._value,\n observerCount: this.observers.size,\n priority: UpdatePriority[this.priority],\n debugName: this.debugName,\n equalsFn: this.equalsFn.name || 'anonymous',\n }\n }\n\n toString(): string {\n return `Signal(${this.options.debugName || this.id}): ${this._value}`\n }\n}\n\n/**\n * Signal setter function type\n */\nexport type SignalSetter<T> = (value: T | ((prev: T) => T)) => T\n\n/**\n * Create a new enhanced reactive signal with custom equality\n */\nexport function createEnhancedSignal<T>(\n initialValue: T,\n options?: SignalOptions<T>\n): [() => T, SignalSetter<T>] {\n const signal = new EnhancedSignalImpl(initialValue, options)\n\n const getter = signal.getValue.bind(signal) as (() => T) & { peek: () => T }\n getter.peek = signal.peek.bind(signal)\n\n const setter: SignalSetter<T> = signal.setValue.bind(signal)\n\n // Add debug information for compatibility\n Object.defineProperty(getter, Symbol.for('tachui.signal'), {\n value: signal,\n enumerable: false,\n })\n\n return [getter, setter]\n}\n\n/**\n * Create a signal with deep equality comparison\n */\nexport function createDeepSignal<T>(\n initialValue: T,\n options?: Omit<SignalOptions<T>, 'equals'>\n): [() => T, SignalSetter<T>] {\n return createEnhancedSignal(initialValue, {\n ...options,\n equals: deepEquals,\n })\n}\n\n/**\n * Create a signal with shallow equality comparison\n */\nexport function createShallowSignal<T>(\n initialValue: T,\n options?: Omit<SignalOptions<T>, 'equals'>\n): [() => T, SignalSetter<T>] {\n return createEnhancedSignal(initialValue, {\n ...options,\n equals: shallowEquals,\n })\n}\n\n/**\n * Get the underlying signal implementation for debugging\n */\nexport function getEnhancedSignalImpl<T>(\n signal: (() => T) & { peek: () => T }\n): EnhancedSignalImpl<T> | null {\n return (signal as any)[Symbol.for('tachui.signal')] || null\n}\n\n/**\n * Type guard to check if a value is an enhanced signal\n */\nexport function isEnhancedSignal<T = any>(value: any): value is (() => T) & { peek: () => T } {\n return typeof value === 'function' && Symbol.for('tachui.signal') in value\n}\n\n/**\n * Flush all pending signal updates synchronously\n */\nexport function flushSignalUpdates(): void {\n const scheduler = ReactiveScheduler.getInstance()\n scheduler.flushSync()\n}\n\n/**\n * Get performance metrics for all signals\n */\nexport function getSignalPerformanceMetrics() {\n const scheduler = ReactiveScheduler.getInstance()\n return scheduler.getPerformanceMetrics()\n}\n"],"names":["signalIdCounter","EnhancedSignalImpl","initialValue","options","__publicField","ReactiveScheduler","UpdatePriority","defaultEquals","computation","getCurrentComputation","ComputationState","newValue","value","oldValue","observer","createEnhancedSignal","signal","getter","setter","createDeepSignal","deepEquals","createShallowSignal","shallowEquals","getEnhancedSignalImpl","isEnhancedSignal","flushSignalUpdates","getSignalPerformanceMetrics"],"mappings":";;;;;AAaA,IAAIA,IAAkB;AAWf,MAAMC,EAA8C;AAAA,EAYzD,YAAYC,GAAiBC,IAA4B,IAAI;AAX7D,IAAAC,EAAA,MAAS,MAAK,EAAEJ,CAAA,GAChBI,EAAA,MAAS,QAAO,QAAA,GAChBA,EAAA,MAAS,UAAA,GACTA,EAAA,MAAS,iCAAgB,IAAA,CAAiB,GAE1CA,EAAA,MAAQ,QAAA,GACRA,EAAA,MAAQ,aAAYC,EAAkB,YAAA,CAAY,GAClDD,EAAA,MAAQ,UAAA,GACRA,EAAA,MAAQ,WAAA,GACRA,EAAA,MAAQ,SAAA,GAGN,KAAK,SAASF,GACd,KAAK,UAAUC,GACf,KAAK,WAAWA,EAAQ,YAAYG,EAAe,QACnD,KAAK,WAAWH,EAAQ,UAAUI,GAClC,KAAK,YAAYJ,EAAQ;AAAA,EAC3B;AAAA;AAAA;AAAA;AAAA,EAKA,WAAc;AACZ,UAAMK,IAAcC,EAAA;AACpB,WAAID,KAAeA,EAAY,UAAUE,EAAiB,aAExD,KAAK,UAAU,IAAIF,CAAW,GAC9BA,EAAY,QAAQ,IAAI,IAAI,IAEvB,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,OAAU;AACR,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,SAASG,GAAmC;AAC1C,UAAMC,IACJ,OAAOD,KAAa,aAAcA,EAA4B,KAAK,MAAM,IAAIA;AAG/E,QAAI,CAAC,KAAK,SAASC,GAAO,KAAK,MAAM,GAAG;AACtC,YAAMC,IAAW,KAAK;AACtB,WAAK,SAASD,GAEV,QAAQ,IAAI,aAAa,iBAAiB,KAAK,aACjD,QAAQ,MAAM,WAAW,KAAK,S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AA,IACP,YAAY;AAAA,EAAA,CACb,GAEM,CAACC,GAAQC,CAAM;AACxB;AAKO,SAASC,EACdjB,GACAC,GAC4B;AAC5B,SAAOY,EAAqBb,GAAc;AAAA,IACxC,GAAGC;AAAA,IACH,QAAQiB;AAAA,EAAA,CACT;AACH;AAKO,SAASC,EACdnB,GACAC,GAC4B;AAC5B,SAAOY,EAAqBb,GAAc;AAAA,IACxC,GAAGC;AAAA,IACH,QAAQmB;AAAA,EAAA,CACT;AACH;AAKO,SAASC,EACdP,GAC8B;AAC9B,SAAQA,EAAe,OAAO,IAAI,eAAe,CAAC,KAAK;AACzD;AAKO,SAASQ,EAA0BZ,GAAoD;AAC5F,SAAO,OAAOA,KAAU,cAAc,OAAO,IAAI,eAAe,KAAKA;AACvE;AAKO,SAASa,IAA2B;AAEzC,EADkBpB,EAAkB,YAAA,EAC1B,UAAA;AACZ;AAKO,SAASqB,IAA8B;AAE5C,SADkBrB,EAAkB,YAAA,EACnB,sBAAA;AACnB;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=(t,e)=>t===e,o=(t,e)=>{if(t===e)return!0;if(t==null||e==null||typeof t!=typeof e)return!1;if(typeof t=="object"){if(Array.isArray(t)!==Array.isArray(e))return!1;if(Array.isArray(t)){const u=t,c=e;return u.length!==c.length?!1:u.every((i,a)=>o(i,c[a]))}const r=t,n=e,s=Object.keys(r),l=Object.keys(n);return s.length!==l.length?!1:s.every(u=>o(r[u],n[u]))}return!1},y=(t,e)=>{if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const r=t,n=e,s=Object.keys(r),l=Object.keys(n);return s.length!==l.length?!1:s.every(u=>r[u]===n[u])},g=(t,e)=>{if(t===e)return!0;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp&&e instanceof RegExp)return t.toString()===e.toString();if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[r,n]of t)if(!e.has(r)||e.get(r)!==n)return!1;return!0}return o(t,e)},E=(t,e)=>{if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch{return t===e}},q=(t,e=f)=>(r,n)=>e(t(r),t(n)),j=(t=f)=>(e,r)=>e===r?!0:e.length!==r.length?!1:e.every((n,s)=>t(n,r[s])),h=(t=f)=>(e,r)=>{if(e===r)return!0;if(e==null||r==null)return!1;const n=Object.keys(e),s=Object.keys(r);return n.length!==s.length?!1:n.every(l=>t(e[l],r[l]))},p=(...t)=>(e,r)=>t.every(n=>n(e,r)),A=(t,e)=>(r,n)=>{const s=t(r,n);return process.env.NODE_ENV==="development"&&console.log(`[${e||"equals"}]`,{a:r,b:n,equal:s}),s};exports.combineEquals=p;exports.createArrayEquals=j;exports.createObjectEquals=h;exports.createSelectorEquals=q;exports.debugEquals=A;exports.deepEquals=o;exports.defaultEquals=f;exports.jsonEquals=E;exports.shallowEquals=y;exports.structuralEquals=g;
|
|
2
|
-
//# sourceMappingURL=equality.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"equality.cjs","sources":["../../src/reactive/equality.ts"],"sourcesContent":["/**\n * Equality Functions for Reactive System\n *\n * Provides various equality comparison functions for signal updates\n * including deep, shallow, and custom equality checking.\n */\n\nexport type EqualityFunction<T> = (a: T, b: T) => boolean\n\n/**\n * Default reference equality (===)\n */\nexport const defaultEquals = <T>(a: T, b: T): boolean => a === b\n\n/**\n * Deep equality comparison for objects and arrays\n * Recursively compares all properties and array elements\n */\nexport const deepEquals = <T>(a: T, b: T): boolean => {\n if (a === b) return true\n if (a == null || b == null) return false\n if (typeof a !== typeof b) return false\n\n if (typeof a === 'object') {\n if (Array.isArray(a) !== Array.isArray(b)) return false\n\n if (Array.isArray(a)) {\n const arrayA = a as unknown as any[]\n const arrayB = b as unknown as any[]\n if (arrayA.length !== arrayB.length) return false\n return arrayA.every((item, index) => deepEquals(item, arrayB[index]))\n }\n\n const objA = a as Record<string, any>\n const objB = b as Record<string, any>\n\n const keysA = Object.keys(objA)\n const keysB = Object.keys(objB)\n if (keysA.length !== keysB.length) return false\n\n return keysA.every((key) => deepEquals(objA[key], objB[key]))\n }\n\n return false\n}\n\n/**\n * Shallow equality comparison for objects\n * Compares only the top-level properties with reference equality\n */\nexport const shallowEquals = <T>(a: T, b: T): boolean => {\n if (a === b) return true\n if (typeof a !== 'object' || typeof b !== 'object') return false\n if (a == null || b == null) return false\n\n const objA = a as Record<string, any>\n const objB = b as Record<string, any>\n\n const keysA = Object.keys(objA)\n const keysB = Object.keys(objB)\n if (keysA.length !== keysB.length) return false\n\n return keysA.every((key) => objA[key] === objB[key])\n}\n\n/**\n * Structural equality for specific data types\n */\nexport const structuralEquals = <T>(a: T, b: T): boolean => {\n if (a === b) return true\n\n // Handle Date objects\n if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n }\n\n // Handle RegExp objects\n if (a instanceof RegExp && b instanceof RegExp) {\n return a.toString() === b.toString()\n }\n\n // Handle Set objects\n if (a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false\n for (const item of a) {\n if (!b.has(item)) return false\n }\n return true\n }\n\n // Handle Map objects\n if (a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false\n for (const [key, value] of a) {\n if (!b.has(key) || b.get(key) !== value) return false\n }\n return true\n }\n\n // Fall back to deep equals for other objects\n return deepEquals(a, b)\n}\n\n/**\n * JSON-based equality (serializes and compares)\n * Useful for complex nested structures but slower\n */\nexport const jsonEquals = <T>(a: T, b: T): boolean => {\n if (a === b) return true\n\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch {\n // If serialization fails, fall back to reference equality\n return a === b\n }\n}\n\n/**\n * Create a custom equality function based on a selector\n */\nexport const createSelectorEquals = <T, K>(\n selector: (value: T) => K,\n equalsFn: EqualityFunction<K> = defaultEquals\n): EqualityFunction<T> => {\n return (a: T, b: T): boolean => {\n return equalsFn(selector(a), selector(b))\n }\n}\n\n/**\n * Create an array equality function with custom element comparison\n */\nexport const createArrayEquals = <T>(\n elementEquals: EqualityFunction<T> = defaultEquals\n): EqualityFunction<T[]> => {\n return (a: T[], b: T[]): boolean => {\n if (a === b) return true\n if (a.length !== b.length) return false\n\n return a.every((item, index) => elementEquals(item, b[index]))\n }\n}\n\n/**\n * Create an object equality function with custom property comparison\n */\nexport const createObjectEquals = <T extends Record<string, any>>(\n propertyEquals: EqualityFunction<any> = defaultEquals\n): EqualityFunction<T> => {\n return (a: T, b: T): boolean => {\n if (a === b) return true\n if (a == null || b == null) return false\n\n const keysA = Object.keys(a)\n const keysB = Object.keys(b)\n if (keysA.length !== keysB.length) return false\n\n return keysA.every((key) => propertyEquals(a[key], b[key]))\n }\n}\n\n/**\n * Combine multiple equality functions with AND logic\n */\nexport const combineEquals = <T>(\n ...equalsFunctions: EqualityFunction<T>[]\n): EqualityFunction<T> => {\n return (a: T, b: T): boolean => {\n return equalsFunctions.every((equals) => equals(a, b))\n }\n}\n\n/**\n * Utility to wrap an equality function with debugging\n */\nexport const debugEquals = <T>(\n equalsFn: EqualityFunction<T>,\n debugName?: string\n): EqualityFunction<T> => {\n return (a: T, b: T): boolean => {\n const result = equalsFn(a, b)\n if (process.env.NODE_ENV === 'development') {\n console.log(`[${debugName || 'equals'}]`, { a, b, equal: result })\n }\n return result\n }\n}\n"],"names":["defaultEquals","a","b","deepEquals","arrayA","arrayB","item","index","objA","objB","keysA","keysB","key","shallowEquals","structuralEquals","value","jsonEquals","createSelectorEquals","selector","equalsFn","createArrayEquals","elementEquals","createObjectEquals","propertyEquals","combineEquals","equalsFunctions","equals","debugEquals","debugName","result"],"mappings":"gFAYO,MAAMA,EAAgB,CAAIC,EAAMC,IAAkBD,IAAMC,EAMlDC,EAAa,CAAIF,EAAMC,IAAkB,CACpD,GAAID,IAAMC,EAAG,MAAO,GAE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I,CAACxB,EAAMC,IACLuB,EAAgB,MAAOC,GAAWA,EAAOzB,EAAGC,CAAC,CAAC,EAO5CyB,EAAc,CACzBR,EACAS,IAEO,CAAC3B,EAAMC,IAAkB,CAC9B,MAAM2B,EAASV,EAASlB,EAAGC,CAAC,EAC5B,OAAI,QAAQ,IAAI,WAAa,eAC3B,QAAQ,IAAI,IAAI0B,GAAa,QAAQ,IAAK,CAAE,EAAA3B,EAAG,EAAAC,EAAG,MAAO2B,CAAA,CAAQ,EAE5DA,CACT"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
const l = (t, e) => t === e, o = (t, e) => {
|
|
2
|
-
if (t === e) return !0;
|
|
3
|
-
if (t == null || e == null || typeof t != typeof e) return !1;
|
|
4
|
-
if (typeof t == "object") {
|
|
5
|
-
if (Array.isArray(t) !== Array.isArray(e)) return !1;
|
|
6
|
-
if (Array.isArray(t)) {
|
|
7
|
-
const u = t, i = e;
|
|
8
|
-
return u.length !== i.length ? !1 : u.every((c, y) => o(c, i[y]));
|
|
9
|
-
}
|
|
10
|
-
const r = t, n = e, s = Object.keys(r), f = Object.keys(n);
|
|
11
|
-
return s.length !== f.length ? !1 : s.every((u) => o(r[u], n[u]));
|
|
12
|
-
}
|
|
13
|
-
return !1;
|
|
14
|
-
}, a = (t, e) => {
|
|
15
|
-
if (t === e) return !0;
|
|
16
|
-
if (typeof t != "object" || typeof e != "object" || t == null || e == null) return !1;
|
|
17
|
-
const r = t, n = e, s = Object.keys(r), f = Object.keys(n);
|
|
18
|
-
return s.length !== f.length ? !1 : s.every((u) => r[u] === n[u]);
|
|
19
|
-
}, g = (t, e) => {
|
|
20
|
-
if (t === e) return !0;
|
|
21
|
-
if (t instanceof Date && e instanceof Date)
|
|
22
|
-
return t.getTime() === e.getTime();
|
|
23
|
-
if (t instanceof RegExp && e instanceof RegExp)
|
|
24
|
-
return t.toString() === e.toString();
|
|
25
|
-
if (t instanceof Set && e instanceof Set) {
|
|
26
|
-
if (t.size !== e.size) return !1;
|
|
27
|
-
for (const r of t)
|
|
28
|
-
if (!e.has(r)) return !1;
|
|
29
|
-
return !0;
|
|
30
|
-
}
|
|
31
|
-
if (t instanceof Map && e instanceof Map) {
|
|
32
|
-
if (t.size !== e.size) return !1;
|
|
33
|
-
for (const [r, n] of t)
|
|
34
|
-
if (!e.has(r) || e.get(r) !== n) return !1;
|
|
35
|
-
return !0;
|
|
36
|
-
}
|
|
37
|
-
return o(t, e);
|
|
38
|
-
}, j = (t, e) => {
|
|
39
|
-
if (t === e) return !0;
|
|
40
|
-
try {
|
|
41
|
-
return JSON.stringify(t) === JSON.stringify(e);
|
|
42
|
-
} catch {
|
|
43
|
-
return t === e;
|
|
44
|
-
}
|
|
45
|
-
}, h = (t, e = l) => (r, n) => e(t(r), t(n)), E = (t = l) => (e, r) => e === r ? !0 : e.length !== r.length ? !1 : e.every((n, s) => t(n, r[s])), p = (t = l) => (e, r) => {
|
|
46
|
-
if (e === r) return !0;
|
|
47
|
-
if (e == null || r == null) return !1;
|
|
48
|
-
const n = Object.keys(e), s = Object.keys(r);
|
|
49
|
-
return n.length !== s.length ? !1 : n.every((f) => t(e[f], r[f]));
|
|
50
|
-
}, A = (...t) => (e, r) => t.every((n) => n(e, r)), q = (t, e) => (r, n) => {
|
|
51
|
-
const s = t(r, n);
|
|
52
|
-
return process.env.NODE_ENV === "development" && console.log(`[${e || "equals"}]`, { a: r, b: n, equal: s }), s;
|
|
53
|
-
};
|
|
54
|
-
export {
|
|
55
|
-
A as combineEquals,
|
|
56
|
-
E as createArrayEquals,
|
|
57
|
-
p as createObjectEquals,
|
|
58
|
-
h as createSelectorEquals,
|
|
59
|
-
q as debugEquals,
|
|
60
|
-
o as deepEquals,
|
|
61
|
-
l as defaultEquals,
|
|
62
|
-
j as jsonEquals,
|
|
63
|
-
a as shallowEquals,
|
|
64
|
-
g as structuralEquals
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=equality.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"equality.js","sources":["../../src/reactive/equality.ts"],"sourcesContent":["/**\n * Equality Functions for Reactive System\n *\n * Provides various equality comparison functions for signal updates\n * including deep, shallow, and custom equality checking.\n */\n\nexport type EqualityFunction<T> = (a: T, b: T) => boolean\n\n/**\n * Default reference equality (===)\n */\nexport const defaultEquals = <T>(a: T, b: T): boolean => a === b\n\n/**\n * Deep equality comparison for objects and arrays\n * Recursively compares all properties and array elements\n */\nexport const deepEquals = <T>(a: T, b: T): boolean => {\n if (a === b) return true\n if (a == null || b == null) return false\n if (typeof a !== typeof b) return false\n\n if (typeof a === 'object') {\n if (Array.isArray(a) !== Array.isArray(b)) return false\n\n if (Array.isArray(a)) {\n const arrayA = a as unknown as any[]\n const arrayB = b as unknown as any[]\n if (arrayA.length !== arrayB.length) return false\n return arrayA.every((item, index) => deepEquals(item, arrayB[index]))\n }\n\n const objA = a as Record<string, any>\n const objB = b as Record<string, any>\n\n const keysA = Object.keys(objA)\n const keysB = Object.keys(objB)\n if (keysA.length !== keysB.length) return false\n\n return keysA.every((key) => deepEquals(objA[key], objB[key]))\n }\n\n return false\n}\n\n/**\n * Shallow equality comparison for objects\n * Compares only the top-level properties with reference equality\n */\nexport const shallowEquals = <T>(a: T, b: T): boolean => {\n if (a === b) return true\n if (typeof a !== 'object' || typeof b !== 'object') return false\n if (a == null || b == null) return false\n\n const objA = a as Record<string, any>\n const objB = b as Record<string, any>\n\n const keysA = Object.keys(objA)\n const keysB = Object.keys(objB)\n if (keysA.length !== keysB.length) return false\n\n return keysA.every((key) => objA[key] === objB[key])\n}\n\n/**\n * Structural equality for specific data types\n */\nexport const structuralEquals = <T>(a: T, b: T): boolean => {\n if (a === b) return true\n\n // Handle Date objects\n if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime()\n }\n\n // Handle RegExp objects\n if (a instanceof RegExp && b instanceof RegExp) {\n return a.toString() === b.toString()\n }\n\n // Handle Set objects\n if (a instanceof Set && b instanceof Set) {\n if (a.size !== b.size) return false\n for (const item of a) {\n if (!b.has(item)) return false\n }\n return true\n }\n\n // Handle Map objects\n if (a instanceof Map && b instanceof Map) {\n if (a.size !== b.size) return false\n for (const [key, value] of a) {\n if (!b.has(key) || b.get(key) !== value) return false\n }\n return true\n }\n\n // Fall back to deep equals for other objects\n return deepEquals(a, b)\n}\n\n/**\n * JSON-based equality (serializes and compares)\n * Useful for complex nested structures but slower\n */\nexport const jsonEquals = <T>(a: T, b: T): boolean => {\n if (a === b) return true\n\n try {\n return JSON.stringify(a) === JSON.stringify(b)\n } catch {\n // If serialization fails, fall back to reference equality\n return a === b\n }\n}\n\n/**\n * Create a custom equality function based on a selector\n */\nexport const createSelectorEquals = <T, K>(\n selector: (value: T) => K,\n equalsFn: EqualityFunction<K> = defaultEquals\n): EqualityFunction<T> => {\n return (a: T, b: T): boolean => {\n return equalsFn(selector(a), selector(b))\n }\n}\n\n/**\n * Create an array equality function with custom element comparison\n */\nexport const createArrayEquals = <T>(\n elementEquals: EqualityFunction<T> = defaultEquals\n): EqualityFunction<T[]> => {\n return (a: T[], b: T[]): boolean => {\n if (a === b) return true\n if (a.length !== b.length) return false\n\n return a.every((item, index) => elementEquals(item, b[index]))\n }\n}\n\n/**\n * Create an object equality function with custom property comparison\n */\nexport const createObjectEquals = <T extends Record<string, any>>(\n propertyEquals: EqualityFunction<any> = defaultEquals\n): EqualityFunction<T> => {\n return (a: T, b: T): boolean => {\n if (a === b) return true\n if (a == null || b == null) return false\n\n const keysA = Object.keys(a)\n const keysB = Object.keys(b)\n if (keysA.length !== keysB.length) return false\n\n return keysA.every((key) => propertyEquals(a[key], b[key]))\n }\n}\n\n/**\n * Combine multiple equality functions with AND logic\n */\nexport const combineEquals = <T>(\n ...equalsFunctions: EqualityFunction<T>[]\n): EqualityFunction<T> => {\n return (a: T, b: T): boolean => {\n return equalsFunctions.every((equals) => equals(a, b))\n }\n}\n\n/**\n * Utility to wrap an equality function with debugging\n */\nexport const debugEquals = <T>(\n equalsFn: EqualityFunction<T>,\n debugName?: string\n): EqualityFunction<T> => {\n return (a: T, b: T): boolean => {\n const result = equalsFn(a, b)\n if (process.env.NODE_ENV === 'development') {\n console.log(`[${debugName || 'equals'}]`, { a, b, equal: result })\n }\n return result\n }\n}\n"],"names":["defaultEquals","a","b","deepEquals","arrayA","arrayB","item","index","objA","objB","keysA","keysB","key","shallowEquals","structuralEquals","value","jsonEquals","createSelectorEquals","selector","equalsFn","createArrayEquals","elementEquals","createObjectEquals","propertyEquals","combineEquals","equalsFunctions","equals","debugEquals","debugName","result"],"mappings":"AAYO,MAAMA,IAAgB,CAAIC,GAAMC,MAAkBD,MAAMC,GAMlDC,IAAa,CAAIF,GAAMC,MAAkB;AACpD,MAAID,MAAMC,EAAG,QAAO;AAEpB,MADID,KAAK,QAAQC,KAAK,QAClB,OAAOD,KAAM,OAAOC,EAAG,QAAO;AAElC,MAAI,OAAOD,KAAM,UAAU;AACzB,QAAI,MAAM,QAAQA,CAAC,MAAM,MAAM,QAAQC,CAAC,EAAG,QAAO;AAElD,QAAI,MAAM,QAAQD,CAAC,GAAG;AACpB,YAAMG,IAASH,GACTI,IAASH;AACf,aAAIE,EAAO,WAAWC,EAAO,SAAe,KACrCD,EAAO,MAAM,CAACE,GAAMC,MAAUJ,EAAWG,GAAMD,EAAOE,CAAK,CAAC,CAAC;AAAA,IACtE;AAEA,UAAMC,IAAOP,GACPQ,IAAOP,GAEPQ,IAAQ,OAAO,KAAKF,CAAI,GACxBG,IAAQ,OAAO,KAAKF,CAAI;AAC9B,WAAIC,EAAM,WAAWC,EAAM,SAAe,KAEnCD,EAAM,MAAM,CAACE,MAAQT,EAAWK,EAAKI,CAAG,GAAGH,EAAKG,CAAG,CAAC,CAAC;AAAA,EAC9D;AAEA,SAAO;AACT,GAMaC,IAAgB,CAAIZ,GAAMC,MAAkB;AACvD,MAAID,MAAMC,EAAG,QAAO;AAEpB,MADI,OAAOD,KAAM,YAAY,OAAOC,KAAM,YACtCD,KAAK,QAAQC,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AE9B,CAACC,GAAQC,MACVD,MAAMC,IAAU,KAChBD,EAAE,WAAWC,EAAE,SAAe,KAE3BD,EAAE,MAAM,CAACK,GAAMC,MAAUc,EAAcf,GAAMJ,EAAEK,CAAK,CAAC,CAAC,GAOpDe,IAAqB,CAChCC,IAAwCvB,MAEjC,CAACC,GAAMC,MAAkB;AAC9B,MAAID,MAAMC,EAAG,QAAO;AACpB,MAAID,KAAK,QAAQC,KAAK,KAAM,QAAO;AAEnC,QAAMQ,IAAQ,OAAO,KAAKT,CAAC,GACrBU,IAAQ,OAAO,KAAKT,CAAC;AAC3B,SAAIQ,EAAM,WAAWC,EAAM,SAAe,KAEnCD,EAAM,MAAM,CAACE,MAAQW,EAAetB,EAAEW,CAAG,GAAGV,EAAEU,CAAG,CAAC,CAAC;AAC5D,GAMWY,IAAgB,IACxBC,MAEI,CAACxB,GAAMC,MACLuB,EAAgB,MAAM,CAACC,MAAWA,EAAOzB,GAAGC,CAAC,CAAC,GAO5CyB,IAAc,CACzBR,GACAS,MAEO,CAAC3B,GAAMC,MAAkB;AAC9B,QAAM2B,IAASV,EAASlB,GAAGC,CAAC;AAC5B,SAAI,QAAQ,IAAI,aAAa,iBAC3B,QAAQ,IAAI,IAAI0B,KAAa,QAAQ,KAAK,EAAE,GAAA3B,GAAG,GAAAC,GAAG,OAAO2B,EAAA,CAAQ,GAE5DA;AACT;"}
|
package/dist/reactive/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./cleanup.cjs"),g=require("./computed.cjs"),i=require("./context.cjs"),s=require("./effect.cjs"),a=require("./enhanced-effect.cjs"),c=require("./enhanced-signal.cjs"),t=require("./equality.cjs"),e=require("./migration.cjs"),l=require("./ownership.cjs"),n=require("./scheduler.cjs"),o=require("./signal.cjs"),u=require("./theme.cjs"),f=require("./unified-scheduler.cjs");exports.createCleanupGroup=r.createCleanupGroup;exports.createEventListener=r.createEventListener;exports.createInterval=r.createInterval;exports.createResource=r.createResource;exports.createTimeout=r.createTimeout;exports.dispose=r.dispose;exports.onCleanup=r.onCleanup;exports.createComputed=g.createComputed;exports.createMemo=g.createMemo;exports.isComputed=g.isComputed;exports.batch=i.batch;exports.createRoot=i.createRoot;exports.getOwner=i.getOwner;exports.getReactiveContext=i.getReactiveContext;exports.runWithOwner=i.runWithOwner;exports.untrack=i.untrack;exports.createEffect=s.createEffect;exports.createOnceEffect=s.createOnceEffect;exports.createRenderEffect=s.createRenderEffect;exports.createSyncEffect=s.createSyncEffect;exports.createEffectBatch=a.createEffectBatch;exports.createEnhancedEffect=a.createEnhancedEffect;exports.createHighPriorityEffect=a.createHighPriorityEffect;exports.createLowPriorityEffect=a.createLowPriorityEffect;exports.createResilientEffect=a.createResilientEffect;exports.createWatchEffect=a.createWatchEffect;exports.flushEffectUpdates=a.flushEffectUpdates;exports.getEffectPerformanceMetrics=a.getEffectPerformanceMetrics;exports.createDeepSignal=c.createDeepSignal;exports.createEnhancedSignal=c.createEnhancedSignal;exports.createShallowSignal=c.createShallowSignal;exports.flushSignalUpdates=c.flushSignalUpdates;exports.getEnhancedSignalImpl=c.getEnhancedSignalImpl;exports.getSignalPerformanceMetrics=c.getSignalPerformanceMetrics;exports.isEnhancedSignal=c.isEnhancedSignal;exports.combineEquals=t.combineEquals;exports.createArrayEquals=t.createArrayEquals;exports.createObjectEquals=t.createObjectEquals;exports.createSelectorEquals=t.createSelectorEquals;exports.debugEquals=t.debugEquals;exports.deepEquals=t.deepEquals;exports.defaultEquals=t.defaultEquals;exports.jsonEquals=t.jsonEquals;exports.shallowEquals=t.shallowEquals;exports.structuralEquals=t.structuralEquals;exports.analyzeReactivePerformance=e.analyzeReactivePerformance;exports.analyzeSignalUsage=e.analyzeSignalUsage;exports.createLegacySignal=e.createLegacySignal;exports.createMigrationReport=e.createMigrationReport;exports.enableReactiveDebugging=e.enableReactiveDebugging;exports.getMigrationStats=e.getMigrationStats;exports.migrateBatch=e.migrateBatch;exports.migrateReactiveCode=e.migrateReactiveCode;exports.migrateToEnhancedSignal=e.migrateToEnhancedSignal;exports.resetMigrationStats=e.resetMigrationStats;exports.setMigrationWarnings=e.setMigrationWarnings;exports.createDetachedRoot=l.createDetachedRoot;exports.getOwnerChain=l.getOwnerChain;exports.getRootOwner=l.getRootOwner;exports.isReactiveContext=l.isReactiveContext;exports.runOutsideReactiveContext=l.runOutsideReactiveContext;exports.TaskPriority=n.TaskPriority;exports.enableScheduling=n.enableScheduling;exports.getScheduler=n.getScheduler;exports.scheduleIdle=n.scheduleIdle;exports.scheduleUpdate=n.scheduleUpdate;exports.scheduleWithPriority=n.scheduleWithPriority;exports.setScheduler=n.setScheduler;exports.createSignal=o.createSignal;exports.flushSync=o.flushSync;exports.getSignalImpl=o.getSignalImpl;exports.isSignal=o.isSignal;exports.detectSystemTheme=u.detectSystemTheme;exports.getCurrentTheme=u.getCurrentTheme;exports.getThemeSignal=u.getThemeSignal;exports.setTheme=u.setTheme;exports.ReactiveError=f.ReactiveError;exports.ReactiveScheduler=f.ReactiveScheduler;exports.UpdatePriority=f.UpdatePriority;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|