@yahoo/uds-v5-wip 1.60.0 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/dist/AssetGroup.d.ts +75 -0
- package/dist/config/dist/AssetGroup.js +114 -0
- package/dist/config/dist/Component.d.ts +309 -0
- package/dist/config/dist/Component.js +897 -0
- package/dist/config/dist/ComponentGroup.d.ts +21 -0
- package/dist/config/dist/ComponentGroup.js +46 -0
- package/dist/config/dist/CompositeStyle.d.ts +28 -0
- package/dist/config/dist/CompositeStyle.js +52 -0
- package/dist/config/dist/Config.d.ts +422 -0
- package/dist/config/dist/Config.js +1426 -0
- package/dist/config/dist/Mode.d.ts +42 -0
- package/dist/config/dist/Mode.js +81 -0
- package/dist/config/dist/Modifier.d.ts +52 -0
- package/dist/config/dist/Modifier.js +97 -0
- package/dist/config/dist/MotionDef.d.ts +50 -0
- package/dist/config/dist/MotionDef.js +97 -0
- package/dist/config/dist/Props.d.ts +284 -39
- package/dist/config/dist/Provider.d.ts +21 -0
- package/dist/config/dist/Provider.js +14 -0
- package/dist/config/dist/StyleProp.d.ts +113 -0
- package/dist/config/dist/StyleProp.js +197 -0
- package/dist/config/dist/Token.d.ts +56 -0
- package/dist/config/dist/Token.js +112 -0
- package/dist/config/dist/TokenGroup.d.ts +33 -0
- package/dist/config/dist/TokenGroup.js +68 -0
- package/dist/config/dist/asset-kind.d.ts +56 -0
- package/dist/config/dist/asset-kind.js +29 -0
- package/dist/config/dist/brands.d.ts +31 -0
- package/dist/config/dist/brands.js +20 -0
- package/dist/config/dist/captureCallerPath.d.ts +49 -0
- package/dist/config/dist/captureCallerPath.js +95 -0
- package/dist/config/dist/colorExpressions.d.ts +132 -0
- package/dist/config/dist/colorExpressions.js +148 -0
- package/dist/config/dist/defineAssetGroup.d.ts +158 -0
- package/dist/config/dist/defineAssetGroup.js +263 -0
- package/dist/config/dist/defineProvider.d.ts +30 -0
- package/dist/config/dist/defineProvider.js +60 -0
- package/dist/config/dist/element-marker.d.ts +55 -0
- package/dist/config/dist/element-marker.js +113 -0
- package/dist/config/dist/entity-utils.d.ts +27 -0
- package/dist/config/dist/entity-utils.js +105 -0
- package/dist/config/dist/factories.d.ts +707 -0
- package/dist/config/dist/factories.js +393 -0
- package/dist/config/dist/foreign-component-name.js +42 -0
- package/dist/config/dist/index.d.ts +31 -13
- package/dist/config/dist/index.js +26 -10
- package/dist/config/dist/interpolate.d.ts +21 -0
- package/dist/{foundational-presets/dist/motion.js → config/dist/interpolate.js} +1 -1
- package/dist/config/dist/markers.d.ts +218 -0
- package/dist/config/dist/markers.js +67 -0
- package/dist/config/dist/refs.d.ts +159 -0
- package/dist/config/dist/refs.js +98 -71
- package/dist/config/dist/token-override-rows.d.ts +67 -0
- package/dist/config/dist/token-override-rows.js +223 -0
- package/dist/config/dist/tokenValueType.js +138 -0
- package/dist/config/dist/types/css-properties.d.ts +233 -0
- package/dist/config/dist/types/css-property-keywords.d.ts +157 -0
- package/dist/config/dist/types/css-property-keywords.js +616 -0
- package/dist/config/dist/types/css-values.d.ts +20 -17
- package/dist/config/dist/types.d.ts +697 -64
- package/dist/config/dist/units.d.ts +15 -0
- package/dist/config/dist/units.js +16 -0
- package/dist/config.d.ts +32 -1562
- package/dist/config.js +28 -21
- package/dist/loader/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/loader/dist/index.d.ts +2 -0
- package/dist/loader/dist/index.js +3 -0
- package/dist/loader/dist/loader/artifacts.js +26 -9
- package/dist/loader/dist/loader/babel-utils.js +1 -29
- package/dist/loader/dist/loader.d.ts +17 -1
- package/dist/loader/dist/loader.js +56 -339
- package/dist/loader/dist/next.d.ts +2 -1
- package/dist/loader/dist/next.js +3 -3
- package/dist/loader/dist/transform-runner.js +7 -0
- package/dist/loader/dist/unplugin.d.ts +27 -0
- package/dist/loader/dist/unplugin.js +52 -0
- package/dist/plugin.d.ts +2 -2
- package/dist/plugin.js +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/dist/index.js +1 -0
- package/dist/utils/dist/motion-utils/resolveMotionState.d.ts +35 -0
- package/dist/utils/dist/motion-utils/resolveMotionState.js +33 -0
- package/dist/utils/dist/string-utils/componentClassName.d.ts +41 -8
- package/dist/utils/dist/string-utils/componentClassName.js +48 -11
- package/dist/utils.d.ts +3 -2
- package/dist/utils.js +3 -2
- package/package.json +3 -51
- package/dist/components/accordion.config.d.ts +0 -2
- package/dist/components/accordion.config.js +0 -2
- package/dist/components/accordion.d.ts +0 -2
- package/dist/components/accordion.js +0 -2
- package/dist/components/alert.config.d.ts +0 -2
- package/dist/components/alert.config.js +0 -2
- package/dist/components/alert.d.ts +0 -2
- package/dist/components/alert.js +0 -2
- package/dist/components/anchor.config.d.ts +0 -2
- package/dist/components/anchor.config.js +0 -2
- package/dist/components/anchor.d.ts +0 -2
- package/dist/components/anchor.js +0 -2
- package/dist/components/article.d.ts +0 -2
- package/dist/components/article.js +0 -2
- package/dist/components/aside.d.ts +0 -2
- package/dist/components/aside.js +0 -2
- package/dist/components/avatar-group.config.d.ts +0 -2
- package/dist/components/avatar-group.config.js +0 -2
- package/dist/components/avatar-group.d.ts +0 -2
- package/dist/components/avatar-group.js +0 -2
- package/dist/components/avatar.config.d.ts +0 -2
- package/dist/components/avatar.config.js +0 -2
- package/dist/components/avatar.d.ts +0 -2
- package/dist/components/avatar.js +0 -2
- package/dist/components/badge.config.d.ts +0 -2
- package/dist/components/badge.config.js +0 -2
- package/dist/components/badge.d.ts +0 -2
- package/dist/components/badge.js +0 -2
- package/dist/components/box.d.ts +0 -2
- package/dist/components/box.js +0 -2
- package/dist/components/breadcrumb.config.d.ts +0 -2
- package/dist/components/breadcrumb.config.js +0 -2
- package/dist/components/breadcrumb.d.ts +0 -2
- package/dist/components/breadcrumb.js +0 -2
- package/dist/components/button.config.d.ts +0 -2
- package/dist/components/button.config.js +0 -2
- package/dist/components/button.d.ts +0 -2
- package/dist/components/button.js +0 -2
- package/dist/components/card.config.d.ts +0 -2
- package/dist/components/card.config.js +0 -2
- package/dist/components/card.d.ts +0 -2
- package/dist/components/card.js +0 -2
- package/dist/components/collapsible.config.d.ts +0 -2
- package/dist/components/collapsible.config.js +0 -2
- package/dist/components/collapsible.d.ts +0 -2
- package/dist/components/collapsible.js +0 -2
- package/dist/components/command.config.d.ts +0 -2
- package/dist/components/command.config.js +0 -2
- package/dist/components/command.d.ts +0 -2
- package/dist/components/command.js +0 -2
- package/dist/components/control-color.config.d.ts +0 -2
- package/dist/components/control-color.config.js +0 -2
- package/dist/components/control-color.d.ts +0 -2
- package/dist/components/control-color.js +0 -2
- package/dist/components/control-curve.config.d.ts +0 -2
- package/dist/components/control-curve.config.js +0 -2
- package/dist/components/control-curve.d.ts +0 -2
- package/dist/components/control-curve.js +0 -2
- package/dist/components/control-folder.config.d.ts +0 -2
- package/dist/components/control-folder.config.js +0 -2
- package/dist/components/control-folder.d.ts +0 -2
- package/dist/components/control-folder.js +0 -2
- package/dist/components/control-group.config.d.ts +0 -2
- package/dist/components/control-group.config.js +0 -2
- package/dist/components/control-group.d.ts +0 -2
- package/dist/components/control-group.js +0 -2
- package/dist/components/control-knob.config.d.ts +0 -2
- package/dist/components/control-knob.config.js +0 -2
- package/dist/components/control-knob.d.ts +0 -2
- package/dist/components/control-knob.js +0 -2
- package/dist/components/control-panel.config.d.ts +0 -2
- package/dist/components/control-panel.config.js +0 -2
- package/dist/components/control-panel.d.ts +0 -2
- package/dist/components/control-panel.js +0 -2
- package/dist/components/control-select.config.d.ts +0 -2
- package/dist/components/control-select.config.js +0 -2
- package/dist/components/control-select.d.ts +0 -2
- package/dist/components/control-select.js +0 -2
- package/dist/components/control-slider.config.d.ts +0 -2
- package/dist/components/control-slider.config.js +0 -2
- package/dist/components/control-slider.d.ts +0 -2
- package/dist/components/control-slider.js +0 -2
- package/dist/components/control-spring.config.d.ts +0 -2
- package/dist/components/control-spring.config.js +0 -2
- package/dist/components/control-spring.d.ts +0 -2
- package/dist/components/control-spring.js +0 -2
- package/dist/components/control-stepper.config.d.ts +0 -2
- package/dist/components/control-stepper.config.js +0 -2
- package/dist/components/control-stepper.d.ts +0 -2
- package/dist/components/control-stepper.js +0 -2
- package/dist/components/control-toggle.config.d.ts +0 -2
- package/dist/components/control-toggle.config.js +0 -2
- package/dist/components/control-toggle.d.ts +0 -2
- package/dist/components/control-toggle.js +0 -2
- package/dist/components/dist/_slots.js +0 -8
- package/dist/components/dist/accordion.config.d.ts +0 -431
- package/dist/components/dist/accordion.config.js +0 -81
- package/dist/components/dist/accordion.d.ts +0 -453
- package/dist/components/dist/accordion.js +0 -60
- package/dist/components/dist/alert.config.d.ts +0 -219
- package/dist/components/dist/alert.config.js +0 -54
- package/dist/components/dist/alert.d.ts +0 -230
- package/dist/components/dist/alert.js +0 -16
- package/dist/components/dist/anchor.config.d.ts +0 -250
- package/dist/components/dist/anchor.config.js +0 -22
- package/dist/components/dist/anchor.d.ts +0 -261
- package/dist/components/dist/anchor.js +0 -9
- package/dist/components/dist/article.d.ts +0 -11
- package/dist/components/dist/article.js +0 -9
- package/dist/components/dist/aside.d.ts +0 -11
- package/dist/components/dist/aside.js +0 -9
- package/dist/components/dist/avatar-group.config.d.ts +0 -315
- package/dist/components/dist/avatar-group.config.js +0 -33
- package/dist/components/dist/avatar-group.d.ts +0 -329
- package/dist/components/dist/avatar-group.js +0 -39
- package/dist/components/dist/avatar.config.d.ts +0 -197
- package/dist/components/dist/avatar.config.js +0 -49
- package/dist/components/dist/avatar.d.ts +0 -211
- package/dist/components/dist/avatar.js +0 -20
- package/dist/components/dist/badge.config.d.ts +0 -477
- package/dist/components/dist/badge.config.js +0 -99
- package/dist/components/dist/badge.d.ts +0 -489
- package/dist/components/dist/badge.js +0 -16
- package/dist/components/dist/box.d.ts +0 -14
- package/dist/components/dist/box.js +0 -9
- package/dist/components/dist/breadcrumb.config.d.ts +0 -390
- package/dist/components/dist/breadcrumb.config.js +0 -43
- package/dist/components/dist/breadcrumb.d.ts +0 -420
- package/dist/components/dist/breadcrumb.js +0 -119
- package/dist/components/dist/button.config.d.ts +0 -381
- package/dist/components/dist/button.config.js +0 -91
- package/dist/components/dist/button.d.ts +0 -403
- package/dist/components/dist/button.js +0 -35
- package/dist/components/dist/card.config.d.ts +0 -336
- package/dist/components/dist/card.config.js +0 -33
- package/dist/components/dist/card.d.ts +0 -352
- package/dist/components/dist/card.js +0 -27
- package/dist/components/dist/collapsible.config.d.ts +0 -45
- package/dist/components/dist/collapsible.config.js +0 -46
- package/dist/components/dist/collapsible.d.ts +0 -61
- package/dist/components/dist/collapsible.js +0 -38
- package/dist/components/dist/command.config.d.ts +0 -1613
- package/dist/components/dist/command.config.js +0 -170
- package/dist/components/dist/command.d.ts +0 -1722
- package/dist/components/dist/command.js +0 -341
- package/dist/components/dist/control-color.config.d.ts +0 -979
- package/dist/components/dist/control-color.config.js +0 -81
- package/dist/components/dist/control-color.d.ts +0 -995
- package/dist/components/dist/control-color.js +0 -64
- package/dist/components/dist/control-curve.config.d.ts +0 -18
- package/dist/components/dist/control-curve.config.js +0 -14
- package/dist/components/dist/control-curve.d.ts +0 -35
- package/dist/components/dist/control-curve.js +0 -81
- package/dist/components/dist/control-folder.config.d.ts +0 -177
- package/dist/components/dist/control-folder.config.js +0 -47
- package/dist/components/dist/control-folder.d.ts +0 -194
- package/dist/components/dist/control-folder.js +0 -41
- package/dist/components/dist/control-group.config.d.ts +0 -859
- package/dist/components/dist/control-group.config.js +0 -80
- package/dist/components/dist/control-group.d.ts +0 -881
- package/dist/components/dist/control-group.js +0 -89
- package/dist/components/dist/control-knob.config.d.ts +0 -792
- package/dist/components/dist/control-knob.config.js +0 -67
- package/dist/components/dist/control-knob.d.ts +0 -819
- package/dist/components/dist/control-knob.js +0 -148
- package/dist/components/dist/control-panel.config.d.ts +0 -402
- package/dist/components/dist/control-panel.config.js +0 -38
- package/dist/components/dist/control-panel.d.ts +0 -415
- package/dist/components/dist/control-panel.js +0 -22
- package/dist/components/dist/control-select.config.d.ts +0 -1176
- package/dist/components/dist/control-select.config.js +0 -102
- package/dist/components/dist/control-select.d.ts +0 -1200
- package/dist/components/dist/control-select.js +0 -63
- package/dist/components/dist/control-slider.config.d.ts +0 -104
- package/dist/components/dist/control-slider.config.js +0 -98
- package/dist/components/dist/control-slider.d.ts +0 -127
- package/dist/components/dist/control-slider.js +0 -87
- package/dist/components/dist/control-spring.config.d.ts +0 -417
- package/dist/components/dist/control-spring.config.js +0 -36
- package/dist/components/dist/control-spring.d.ts +0 -439
- package/dist/components/dist/control-spring.js +0 -136
- package/dist/components/dist/control-stepper.config.d.ts +0 -1084
- package/dist/components/dist/control-stepper.config.js +0 -108
- package/dist/components/dist/control-stepper.d.ts +0 -1104
- package/dist/components/dist/control-stepper.js +0 -109
- package/dist/components/dist/control-toggle.config.d.ts +0 -407
- package/dist/components/dist/control-toggle.config.js +0 -26
- package/dist/components/dist/control-toggle.d.ts +0 -420
- package/dist/components/dist/control-toggle.js +0 -36
- package/dist/components/dist/createSlot.d.ts +0 -8
- package/dist/components/dist/createSlot.js +0 -89
- package/dist/components/dist/dropdown.config.d.ts +0 -920
- package/dist/components/dist/dropdown.config.js +0 -107
- package/dist/components/dist/dropdown.d.ts +0 -950
- package/dist/components/dist/dropdown.js +0 -92
- package/dist/components/dist/empty-state.config.d.ts +0 -396
- package/dist/components/dist/empty-state.config.js +0 -53
- package/dist/components/dist/empty-state.d.ts +0 -416
- package/dist/components/dist/empty-state.js +0 -33
- package/dist/components/dist/footer.d.ts +0 -11
- package/dist/components/dist/footer.js +0 -9
- package/dist/components/dist/grid.d.ts +0 -41
- package/dist/components/dist/grid.js +0 -34
- package/dist/components/dist/header.d.ts +0 -11
- package/dist/components/dist/header.js +0 -9
- package/dist/components/dist/hstack.d.ts +0 -15
- package/dist/components/dist/hstack.js +0 -21
- package/dist/components/dist/image.d.ts +0 -19
- package/dist/components/dist/image.js +0 -9
- package/dist/components/dist/input.config.d.ts +0 -58
- package/dist/components/dist/input.config.js +0 -42
- package/dist/components/dist/input.d.ts +0 -67
- package/dist/components/dist/input.js +0 -14
- package/dist/components/dist/item.config.d.ts +0 -351
- package/dist/components/dist/item.config.js +0 -83
- package/dist/components/dist/item.d.ts +0 -374
- package/dist/components/dist/item.js +0 -51
- package/dist/components/dist/list.d.ts +0 -19
- package/dist/components/dist/list.js +0 -21
- package/dist/components/dist/main.d.ts +0 -11
- package/dist/components/dist/main.js +0 -9
- package/dist/components/dist/modal.config.d.ts +0 -397
- package/dist/components/dist/modal.config.js +0 -92
- package/dist/components/dist/modal.d.ts +0 -433
- package/dist/components/dist/modal.js +0 -125
- package/dist/components/dist/nav-header.config.d.ts +0 -158
- package/dist/components/dist/nav-header.config.js +0 -26
- package/dist/components/dist/nav-header.d.ts +0 -173
- package/dist/components/dist/nav-header.js +0 -23
- package/dist/components/dist/nav.d.ts +0 -11
- package/dist/components/dist/nav.js +0 -9
- package/dist/components/dist/preset-bar.config.d.ts +0 -192
- package/dist/components/dist/preset-bar.config.js +0 -39
- package/dist/components/dist/preset-bar.d.ts +0 -215
- package/dist/components/dist/preset-bar.js +0 -71
- package/dist/components/dist/presets/index.d.ts +0 -17674
- package/dist/components/dist/presets/index.js +0 -97
- package/dist/components/dist/pressable.d.ts +0 -11
- package/dist/components/dist/pressable.js +0 -9
- package/dist/components/dist/progress.config.d.ts +0 -296
- package/dist/components/dist/progress.config.js +0 -35
- package/dist/components/dist/progress.d.ts +0 -311
- package/dist/components/dist/progress.js +0 -43
- package/dist/components/dist/section.d.ts +0 -11
- package/dist/components/dist/section.js +0 -9
- package/dist/components/dist/select.config.d.ts +0 -31
- package/dist/components/dist/select.config.js +0 -25
- package/dist/components/dist/select.d.ts +0 -45
- package/dist/components/dist/select.js +0 -13
- package/dist/components/dist/sheet.config.d.ts +0 -245
- package/dist/components/dist/sheet.config.js +0 -99
- package/dist/components/dist/sheet.d.ts +0 -267
- package/dist/components/dist/sheet.js +0 -53
- package/dist/components/dist/sidebar.config.d.ts +0 -1651
- package/dist/components/dist/sidebar.config.js +0 -217
- package/dist/components/dist/sidebar.d.ts +0 -1825
- package/dist/components/dist/sidebar.js +0 -492
- package/dist/components/dist/skeleton.config.d.ts +0 -16
- package/dist/components/dist/skeleton.config.js +0 -10
- package/dist/components/dist/skeleton.d.ts +0 -27
- package/dist/components/dist/skeleton.js +0 -16
- package/dist/components/dist/slider.config.d.ts +0 -44
- package/dist/components/dist/slider.config.js +0 -40
- package/dist/components/dist/slider.d.ts +0 -70
- package/dist/components/dist/slider.js +0 -247
- package/dist/components/dist/spinner.config.d.ts +0 -34
- package/dist/components/dist/spinner.config.js +0 -24
- package/dist/components/dist/spinner.d.ts +0 -42
- package/dist/components/dist/spinner.js +0 -29
- package/dist/components/dist/svg.d.ts +0 -21
- package/dist/components/dist/svg.js +0 -17
- package/dist/components/dist/switch.config.d.ts +0 -353
- package/dist/components/dist/switch.config.js +0 -47
- package/dist/components/dist/switch.d.ts +0 -370
- package/dist/components/dist/switch.js +0 -32
- package/dist/components/dist/table.d.ts +0 -36
- package/dist/components/dist/table.js +0 -29
- package/dist/components/dist/tabs.config.d.ts +0 -611
- package/dist/components/dist/tabs.config.js +0 -56
- package/dist/components/dist/tabs.d.ts +0 -632
- package/dist/components/dist/tabs.js +0 -77
- package/dist/components/dist/text.config.d.ts +0 -306
- package/dist/components/dist/text.config.js +0 -149
- package/dist/components/dist/text.d.ts +0 -205
- package/dist/components/dist/text.js +0 -12
- package/dist/components/dist/textarea.config.d.ts +0 -352
- package/dist/components/dist/textarea.config.js +0 -57
- package/dist/components/dist/textarea.d.ts +0 -362
- package/dist/components/dist/textarea.js +0 -9
- package/dist/components/dist/toast.config.d.ts +0 -335
- package/dist/components/dist/toast.config.js +0 -145
- package/dist/components/dist/toast.d.ts +0 -426
- package/dist/components/dist/toast.js +0 -159
- package/dist/components/dist/tooltip.config.d.ts +0 -193
- package/dist/components/dist/tooltip.config.js +0 -40
- package/dist/components/dist/tooltip.d.ts +0 -206
- package/dist/components/dist/tooltip.js +0 -28
- package/dist/components/dist/vstack.d.ts +0 -15
- package/dist/components/dist/vstack.js +0 -20
- package/dist/components/dropdown.config.d.ts +0 -2
- package/dist/components/dropdown.config.js +0 -2
- package/dist/components/dropdown.d.ts +0 -2
- package/dist/components/dropdown.js +0 -2
- package/dist/components/empty-state.config.d.ts +0 -2
- package/dist/components/empty-state.config.js +0 -2
- package/dist/components/empty-state.d.ts +0 -2
- package/dist/components/empty-state.js +0 -2
- package/dist/components/footer.d.ts +0 -2
- package/dist/components/footer.js +0 -2
- package/dist/components/grid.d.ts +0 -2
- package/dist/components/grid.js +0 -2
- package/dist/components/header.d.ts +0 -2
- package/dist/components/header.js +0 -2
- package/dist/components/hstack.d.ts +0 -2
- package/dist/components/hstack.js +0 -2
- package/dist/components/image.d.ts +0 -2
- package/dist/components/image.js +0 -2
- package/dist/components/input.config.d.ts +0 -2
- package/dist/components/input.config.js +0 -2
- package/dist/components/input.d.ts +0 -2
- package/dist/components/input.js +0 -2
- package/dist/components/item.config.d.ts +0 -2
- package/dist/components/item.config.js +0 -2
- package/dist/components/item.d.ts +0 -2
- package/dist/components/item.js +0 -2
- package/dist/components/list.d.ts +0 -2
- package/dist/components/list.js +0 -2
- package/dist/components/main.d.ts +0 -2
- package/dist/components/main.js +0 -2
- package/dist/components/modal.config.d.ts +0 -2
- package/dist/components/modal.config.js +0 -2
- package/dist/components/modal.d.ts +0 -2
- package/dist/components/modal.js +0 -2
- package/dist/components/nav-header.config.d.ts +0 -2
- package/dist/components/nav-header.config.js +0 -2
- package/dist/components/nav-header.d.ts +0 -2
- package/dist/components/nav-header.js +0 -2
- package/dist/components/nav.d.ts +0 -2
- package/dist/components/nav.js +0 -2
- package/dist/components/preset-bar.config.d.ts +0 -2
- package/dist/components/preset-bar.config.js +0 -2
- package/dist/components/preset-bar.d.ts +0 -2
- package/dist/components/preset-bar.js +0 -2
- package/dist/components/presets/index.d.ts +0 -44
- package/dist/components/presets/index.js +0 -44
- package/dist/components/pressable.d.ts +0 -2
- package/dist/components/pressable.js +0 -2
- package/dist/components/progress.config.d.ts +0 -2
- package/dist/components/progress.config.js +0 -2
- package/dist/components/progress.d.ts +0 -2
- package/dist/components/progress.js +0 -2
- package/dist/components/section.d.ts +0 -2
- package/dist/components/section.js +0 -2
- package/dist/components/select.config.d.ts +0 -2
- package/dist/components/select.config.js +0 -2
- package/dist/components/select.d.ts +0 -2
- package/dist/components/select.js +0 -2
- package/dist/components/sheet.config.d.ts +0 -2
- package/dist/components/sheet.config.js +0 -2
- package/dist/components/sheet.d.ts +0 -2
- package/dist/components/sheet.js +0 -2
- package/dist/components/sidebar.config.d.ts +0 -2
- package/dist/components/sidebar.config.js +0 -2
- package/dist/components/sidebar.d.ts +0 -2
- package/dist/components/sidebar.js +0 -2
- package/dist/components/skeleton.config.d.ts +0 -2
- package/dist/components/skeleton.config.js +0 -2
- package/dist/components/skeleton.d.ts +0 -2
- package/dist/components/skeleton.js +0 -2
- package/dist/components/slider.config.d.ts +0 -2
- package/dist/components/slider.config.js +0 -2
- package/dist/components/slider.d.ts +0 -2
- package/dist/components/slider.js +0 -2
- package/dist/components/spinner.config.d.ts +0 -2
- package/dist/components/spinner.config.js +0 -2
- package/dist/components/spinner.d.ts +0 -2
- package/dist/components/spinner.js +0 -2
- package/dist/components/svg.d.ts +0 -2
- package/dist/components/svg.js +0 -2
- package/dist/components/switch.config.d.ts +0 -2
- package/dist/components/switch.config.js +0 -2
- package/dist/components/switch.d.ts +0 -2
- package/dist/components/switch.js +0 -2
- package/dist/components/table.d.ts +0 -2
- package/dist/components/table.js +0 -2
- package/dist/components/tabs.config.d.ts +0 -2
- package/dist/components/tabs.config.js +0 -2
- package/dist/components/tabs.d.ts +0 -2
- package/dist/components/tabs.js +0 -2
- package/dist/components/text.config.d.ts +0 -2
- package/dist/components/text.config.js +0 -2
- package/dist/components/text.d.ts +0 -2
- package/dist/components/text.js +0 -2
- package/dist/components/textarea.config.d.ts +0 -2
- package/dist/components/textarea.config.js +0 -2
- package/dist/components/textarea.d.ts +0 -2
- package/dist/components/textarea.js +0 -2
- package/dist/components/toast.config.d.ts +0 -2
- package/dist/components/toast.config.js +0 -2
- package/dist/components/toast.d.ts +0 -2
- package/dist/components/toast.js +0 -2
- package/dist/components/tooltip.config.d.ts +0 -2
- package/dist/components/tooltip.config.js +0 -2
- package/dist/components/tooltip.d.ts +0 -2
- package/dist/components/tooltip.js +0 -2
- package/dist/components/vstack.d.ts +0 -2
- package/dist/components/vstack.js +0 -2
- package/dist/config/dist/component-config.d.ts +0 -349
- package/dist/config/dist/component-refs.d.ts +0 -98
- package/dist/config/dist/component-resolution.js +0 -78
- package/dist/config/dist/consts/defaultColors.d.ts +0 -253
- package/dist/config/dist/consts/defaultColors.js +0 -252
- package/dist/config/dist/createComponent.d.ts +0 -1
- package/dist/config/dist/createComponent.js +0 -1
- package/dist/config/dist/createConfig.d.ts +0 -375
- package/dist/config/dist/createConfig.js +0 -625
- package/dist/config/dist/defineComponent.d.ts +0 -24
- package/dist/config/dist/defineComponent.js +0 -2
- package/dist/config/dist/defineStyleProp.d.ts +0 -93
- package/dist/config/dist/defineStyleProp.js +0 -60
- package/dist/config/dist/preset-merge.js +0 -192
- package/dist/config/dist/propertyAcceptedTypes.js +0 -220
- package/dist/config/dist/propertyGroups.d.ts +0 -1
- package/dist/config/dist/propertyGroups.js +0 -414
- package/dist/config/dist/resolveStyleProp.d.ts +0 -88
- package/dist/config/dist/resolveStyleProp.js +0 -235
- package/dist/config/dist/resolveTokenTypes.d.ts +0 -1
- package/dist/config/dist/resolveTokenTypes.js +0 -149
- package/dist/config/dist/runtime-registry.js +0 -9
- package/dist/config/dist/serialize.d.ts +0 -73
- package/dist/config/dist/serialize.js +0 -172
- package/dist/config/dist/style-prop-runtime.d.ts +0 -1
- package/dist/config-utils/dist/componentConfig.d.ts +0 -10
- package/dist/config-utils/dist/componentConfig.js +0 -11
- package/dist/config-utils.d.ts +0 -2
- package/dist/config-utils.js +0 -2
- package/dist/core/dist/color-opacity-map.js +0 -33
- package/dist/core/dist/compositeStyles.d.ts +0 -21
- package/dist/core/dist/compositeStyles.js +0 -51
- package/dist/core/dist/configurable-prop-helpers.d.ts +0 -31
- package/dist/core/dist/configurable-prop-helpers.js +0 -61
- package/dist/core/dist/createComponent.boundaries.js +0 -192
- package/dist/core/dist/createComponent.d.ts +0 -56
- package/dist/core/dist/createComponent.js +0 -67
- package/dist/core/dist/createComponentExample.d.ts +0 -41
- package/dist/core/dist/createComponentExample.js +0 -27
- package/dist/core/dist/createProvider.d.ts +0 -12
- package/dist/core/dist/createProvider.js +0 -24
- package/dist/core/dist/generated/stylePropsTwMap.d.ts +0 -1700
- package/dist/core/dist/generated/stylePropsTwMap.js +0 -570
- package/dist/core/dist/getComponentStyles.d.ts +0 -49
- package/dist/core/dist/getComponentStyles.js +0 -85
- package/dist/core/dist/getStyles.d.ts +0 -42
- package/dist/core/dist/getStyles.js +0 -300
- package/dist/core/dist/index.d.ts +0 -13
- package/dist/core/dist/index.js +0 -13
- package/dist/core/dist/modifier-mappings.d.ts +0 -12
- package/dist/core/dist/modifier-mappings.js +0 -61
- package/dist/core/dist/resolveMotionState.d.ts +0 -4
- package/dist/core/dist/resolveMotionState.js +0 -17
- package/dist/core/dist/resolveProps.boundaries.js +0 -131
- package/dist/core/dist/style-prop-data.d.ts +0 -32
- package/dist/core/dist/style-prop-data.js +0 -1257
- package/dist/core/dist/transformPreset.d.ts +0 -17
- package/dist/core/dist/transformPreset.js +0 -28
- package/dist/core/dist/withDefaultStyleProps.d.ts +0 -43
- package/dist/core/dist/withDefaultStyleProps.js +0 -18
- package/dist/core.d.ts +0 -14
- package/dist/core.js +0 -15
- package/dist/createSlot.d.ts +0 -2
- package/dist/createSlot.js +0 -2
- package/dist/fixtures.d.ts +0 -4
- package/dist/fixtures.js +0 -5
- package/dist/foundational-presets/dist/_virtual/_rolldown/runtime.js +0 -13
- package/dist/foundational-presets/dist/defaultPreset.d.ts +0 -1557
- package/dist/foundational-presets/dist/defaultPreset.js +0 -615
- package/dist/foundational-presets/dist/index.d.ts +0 -1
- package/dist/foundational-presets/dist/index.js +0 -1
- package/dist/foundational-presets/dist/motion.d.ts +0 -12
- package/dist/foundational-presets/dist/style-props.js +0 -1445
- package/dist/loader/dist/loader/create-component-data.js +0 -33
- package/dist/loader/dist/loader/create-component-lowering.js +0 -454
- package/dist/loader/dist/loader/data-attr-transform.js +0 -191
- package/dist/loader/dist/loader/dynamic-style-codegen.js +0 -97
- package/dist/loader/dist/loader/internal-meta.js +0 -22
- package/dist/loader/dist/loader/lower-new-api-primitive.js +0 -90
- package/dist/loader/dist/loader/motion-transform.js +0 -717
- package/dist/loader/dist/loader/style-transform.js +0 -670
- package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -203
- package/dist/loader/dist/node_modules/react/cjs/react-jsx-runtime.production.js +0 -25
- package/dist/loader/dist/node_modules/react/cjs/react.development.js +0 -762
- package/dist/loader/dist/node_modules/react/cjs/react.production.js +0 -351
- package/dist/loader/dist/node_modules/react/index.js +0 -10
- package/dist/loader/dist/node_modules/react/jsx-runtime.js +0 -10
- package/dist/loader/dist/packages/core/dist/color-opacity-map.js +0 -33
- package/dist/loader/dist/packages/core/dist/compositeStyles.js +0 -43
- package/dist/loader/dist/packages/core/dist/createComponent.js +0 -6
- package/dist/loader/dist/packages/core/dist/createProvider.js +0 -7
- package/dist/loader/dist/packages/core/dist/generated/stylePropsTwMap.js +0 -570
- package/dist/loader/dist/packages/core/dist/getComponentStyles.js +0 -2
- package/dist/loader/dist/packages/core/dist/getStyles.js +0 -60
- package/dist/loader/dist/packages/core/dist/index.js +0 -6
- package/dist/loader/dist/packages/core/dist/modifier-mappings.js +0 -61
- package/dist/loader/dist/packages/core/dist/style-prop-data.js +0 -1257
- package/dist/loader/dist/packages/core/dist/withDefaultStyleProps.js +0 -1
- package/dist/presets/dist/defaultPreset.d.ts +0 -6
- package/dist/presets/dist/defaultPreset.js +0 -51
- package/dist/presets/dist/index.d.ts +0 -1
- package/dist/presets/dist/index.js +0 -1
- package/dist/presets/motion.d.ts +0 -2
- package/dist/presets/motion.js +0 -2
- package/dist/presets.d.ts +0 -2
- package/dist/presets.js +0 -3
- package/dist/styles.d.ts +0 -4
- package/dist/styles.js +0 -5
- package/dist/transformPreset.d.ts +0 -2
- package/dist/transformPreset.js +0 -3
- /package/dist/{config/dist/component-resolution.d.ts → loader/dist/transform-runner.d.ts} +0 -0
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { CssValueTypeName } from "./types/css-values.js";
|
|
2
|
-
|
|
3
|
-
//#region ../config/dist/defineStyleProp.d.ts
|
|
4
|
-
/** Runtime input type for `toCss` based on the entry's `type`. */
|
|
5
|
-
type ArbitraryRuntimeValue<T extends CssValueTypeName> = T extends 'integer' | 'number' ? number : string;
|
|
6
|
-
/**
|
|
7
|
-
* One entry in a multi-shape `arbitrary` array. The first entry whose `type`
|
|
8
|
-
* (or `pattern`, for `'regex'`) matches the runtime value wins.
|
|
9
|
-
*/
|
|
10
|
-
type ArbitraryEntry = { [T in CssValueTypeName]: {
|
|
11
|
-
type: T;
|
|
12
|
-
toCss?: (value: ArbitraryRuntimeValue<T>) => string;
|
|
13
|
-
} }[CssValueTypeName] | {
|
|
14
|
-
type: 'regex';
|
|
15
|
-
pattern: RegExp;
|
|
16
|
-
toCss?: (value: string) => string;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Shape of the `arbitrary` field on a style prop:
|
|
20
|
-
* - A bare value-type name (`'length-percentage'`, `'color'`, etc.) for the
|
|
21
|
-
* single-shape case.
|
|
22
|
-
* - An array of {@link ArbitraryEntry} for multi-shape acceptance.
|
|
23
|
-
*/
|
|
24
|
-
type ArbitrarySpec = CssValueTypeName | readonly ArbitraryEntry[];
|
|
25
|
-
/**
|
|
26
|
-
* The literal-keyword subset of values a property accepts, derived from
|
|
27
|
-
* {@link CssPropertyValues}[P]. For custom CSS properties (`--*`) the value
|
|
28
|
-
* type is governed by the required `cssType` field instead, so any string
|
|
29
|
-
* is accepted at the type level.
|
|
30
|
-
*/
|
|
31
|
-
type StylePropMetadata = {
|
|
32
|
-
label?: string;
|
|
33
|
-
description?: string;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* A finalized style prop. Returned by `defineStyleProp(spec)` (or the
|
|
37
|
-
* `.metadata({...})` chain). Consumers wrap these in
|
|
38
|
-
* `uds.registerStyleProps({ <propName>: ... })`.
|
|
39
|
-
*
|
|
40
|
-
* `cssProperty` is passed through verbatim from the authored input:
|
|
41
|
-
* - **string** — a direct prop writing one CSS property.
|
|
42
|
-
* - **`readonly string[]`** — a fan-out prop writing every CSS
|
|
43
|
-
* property in the list (e.g. `borderRadiusStart` covering both
|
|
44
|
-
* start-side corners).
|
|
45
|
-
*
|
|
46
|
-
* Readers that need iteration normalize at the call site
|
|
47
|
-
* (`Array.isArray(p) ? p : [p]`); readers that only need the primary
|
|
48
|
-
* use the string directly or `Array.isArray(p) ? p[0] : p`.
|
|
49
|
-
*/
|
|
50
|
-
/**
|
|
51
|
-
* Internal shape attached to a {@link StyleProp} by `.withOpacity()`.
|
|
52
|
-
* The resolver inspects this at `resolveConfig` time to synthesize a
|
|
53
|
-
* second {@link ResolvedStyleProp} for the opacity sibling.
|
|
54
|
-
*/
|
|
55
|
-
interface OpacityPairSpec {
|
|
56
|
-
/** JSX-prop name for the opacity sibling, e.g. `'bgOpacity'`. */
|
|
57
|
-
readonly as: string;
|
|
58
|
-
/** Token-group refs the opacity sibling accepts as values. */
|
|
59
|
-
readonly values: readonly unknown[];
|
|
60
|
-
/**
|
|
61
|
-
* Separator between the parent's value-token suffix and the opacity
|
|
62
|
-
* value in the emitted class name (`bg-primary_75` vs.
|
|
63
|
-
* `bg-primary/75`). Defaults to `_`.
|
|
64
|
-
*/
|
|
65
|
-
readonly separator: string;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Structurally-loose form of {@link StyleProp}. Any concrete `StyleProp<P>`
|
|
69
|
-
* is assignable to this. Used at registration / resolution boundaries where
|
|
70
|
-
* the generic `P` would otherwise cause TS2590 by re-expanding
|
|
71
|
-
* `ValuesEntry<P>` across the full property union.
|
|
72
|
-
*/
|
|
73
|
-
interface AnyStyleProp {
|
|
74
|
-
readonly kind: 'styleProp';
|
|
75
|
-
readonly cssProperty: string | readonly string[];
|
|
76
|
-
readonly classPrefix: string;
|
|
77
|
-
readonly values: readonly unknown[];
|
|
78
|
-
readonly arbitrary?: ArbitrarySpec;
|
|
79
|
-
readonly cssType?: CssValueTypeName;
|
|
80
|
-
readonly metadata: StylePropMetadata;
|
|
81
|
-
readonly opacityPair?: OpacityPairSpec;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Return shape of {@link defineStyleProp}. The `metadata` field doubles as
|
|
85
|
-
* a callable chain: read it to access `{ label?, description? }` (both
|
|
86
|
-
* optional, so an unset metadata reads `undefined` for either field) or
|
|
87
|
-
* call it as `.metadata({ label, description })` to attach metadata and
|
|
88
|
-
* get back a plain {@link StyleProp}. A function satisfies the
|
|
89
|
-
* {@link StylePropMetadata} structural shape because both fields are
|
|
90
|
-
* optional, so the dual nature is type-safe.
|
|
91
|
-
*/
|
|
92
|
-
//#endregion
|
|
93
|
-
export { AnyStyleProp, ArbitraryEntry, ArbitrarySpec, StylePropMetadata };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
//#region ../config/dist/defineStyleProp.js
|
|
2
|
-
const CUSTOM_PROPERTY_PREFIX = "--";
|
|
3
|
-
/**
|
|
4
|
-
* Author a style prop. Returns a {@link StyleProp} directly so callers can
|
|
5
|
-
* skip the `.metadata({...})` chain when there's nothing to attach:
|
|
6
|
-
*
|
|
7
|
-
* ```ts
|
|
8
|
-
* defineStyleProp({ cssProperty: 'flex-direction', classPrefix: 'flex', values: ['row', 'col'] })
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* The returned object still supports `.metadata({...})` for the common
|
|
12
|
-
* case where you want to attach a label/description — the chain returns a
|
|
13
|
-
* plain {@link StyleProp} with the metadata baked in. Pure — no global
|
|
14
|
-
* registration.
|
|
15
|
-
*/
|
|
16
|
-
function defineStyleProp(spec) {
|
|
17
|
-
const { cssProperty: cssPropertyInput, classPrefix, values, arbitrary, cssType } = spec;
|
|
18
|
-
let cssProperty;
|
|
19
|
-
if (Array.isArray(cssPropertyInput)) {
|
|
20
|
-
const deduped = Array.from(new Set(cssPropertyInput));
|
|
21
|
-
if (deduped.length === 0) throw new Error("defineStyleProp: `cssProperty` array must contain at least one CSS property.");
|
|
22
|
-
cssProperty = deduped;
|
|
23
|
-
} else cssProperty = cssPropertyInput;
|
|
24
|
-
const allProperties = Array.isArray(cssProperty) ? cssProperty : [cssProperty];
|
|
25
|
-
const hasCustom = allProperties.some((p) => p.startsWith(CUSTOM_PROPERTY_PREFIX));
|
|
26
|
-
if (allProperties.length > 1 && hasCustom) throw new Error(`defineStyleProp: \`cssProperty\` arrays must be standard CSS properties only; custom (\`--*\`) properties must use the single-string form. Got ${JSON.stringify(cssProperty)}.`);
|
|
27
|
-
const isCustomProperty = hasCustom;
|
|
28
|
-
if (isCustomProperty && cssType === void 0) throw new Error(`defineStyleProp: cssType is required for custom CSS properties (got cssProperty=${JSON.stringify(cssProperty)}).`);
|
|
29
|
-
if (!isCustomProperty && cssType !== void 0) throw new Error(`defineStyleProp: cssType is only allowed for custom CSS properties (--*). Got cssProperty=${JSON.stringify(cssProperty)} with cssType=${JSON.stringify(cssType)}.`);
|
|
30
|
-
const baseFields = {
|
|
31
|
-
kind: "styleProp",
|
|
32
|
-
cssProperty,
|
|
33
|
-
classPrefix,
|
|
34
|
-
values: values ?? [],
|
|
35
|
-
arbitrary,
|
|
36
|
-
cssType
|
|
37
|
-
};
|
|
38
|
-
const buildChainable = (fields) => {
|
|
39
|
-
const metadata = (meta = {}) => ({
|
|
40
|
-
...fields,
|
|
41
|
-
metadata: meta
|
|
42
|
-
});
|
|
43
|
-
const withOpacity = (spec) => buildChainable({
|
|
44
|
-
...fields,
|
|
45
|
-
opacityPair: {
|
|
46
|
-
as: spec.as,
|
|
47
|
-
values: spec.values,
|
|
48
|
-
separator: spec.separator ?? "_"
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
return {
|
|
52
|
-
...fields,
|
|
53
|
-
metadata,
|
|
54
|
-
withOpacity
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
return buildChainable(baseFields);
|
|
58
|
-
}
|
|
59
|
-
//#endregion
|
|
60
|
-
export { defineStyleProp };
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { validateComponentVariants } from "./component-resolution.js";
|
|
2
|
-
//#region ../config/dist/preset-merge.js
|
|
3
|
-
const defaultComponentDefinitionMergeStrategy = {
|
|
4
|
-
tokens: "preserve",
|
|
5
|
-
modes: "merge",
|
|
6
|
-
modifiers: "merge",
|
|
7
|
-
motion: "merge",
|
|
8
|
-
components: "merge",
|
|
9
|
-
globalStyles: "merge",
|
|
10
|
-
examples: "merge"
|
|
11
|
-
};
|
|
12
|
-
function flattenAtomic(atomic) {
|
|
13
|
-
const entries = [];
|
|
14
|
-
for (const group of atomic) for (const property of group.properties) for (const token of group.tokens) entries.push({
|
|
15
|
-
property,
|
|
16
|
-
cssPrefix: group.cssPrefix,
|
|
17
|
-
namespace: group.namespace,
|
|
18
|
-
groupType: group.type,
|
|
19
|
-
groupDescription: group.description,
|
|
20
|
-
token
|
|
21
|
-
});
|
|
22
|
-
return entries;
|
|
23
|
-
}
|
|
24
|
-
function tokenKey(entry) {
|
|
25
|
-
return `${entry.property}|${entry.cssPrefix ?? ""}|${entry.token.name}`;
|
|
26
|
-
}
|
|
27
|
-
function mergeAtomic(base, incoming, mode) {
|
|
28
|
-
if (incoming.length === 0) return base;
|
|
29
|
-
if (base.length === 0) return incoming;
|
|
30
|
-
const baseEntries = flattenAtomic(base);
|
|
31
|
-
const incomingEntries = flattenAtomic(incoming);
|
|
32
|
-
const merged = /* @__PURE__ */ new Map();
|
|
33
|
-
for (const entry of baseEntries) merged.set(tokenKey(entry), entry);
|
|
34
|
-
for (const entry of incomingEntries) {
|
|
35
|
-
const key = tokenKey(entry);
|
|
36
|
-
if (mode === "preserve" && merged.has(key)) continue;
|
|
37
|
-
merged.set(key, entry);
|
|
38
|
-
}
|
|
39
|
-
const regrouped = /* @__PURE__ */ new Map();
|
|
40
|
-
for (const entry of merged.values()) {
|
|
41
|
-
const groupKey = `${entry.property}|${entry.cssPrefix ?? ""}`;
|
|
42
|
-
const existing = regrouped.get(groupKey);
|
|
43
|
-
if (existing) {
|
|
44
|
-
existing.tokens.push(entry.token);
|
|
45
|
-
if (entry.groupType) existing.type = entry.groupType;
|
|
46
|
-
if (entry.groupDescription) existing.description = entry.groupDescription;
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
regrouped.set(groupKey, {
|
|
50
|
-
properties: [entry.property],
|
|
51
|
-
...entry.namespace ? { namespace: entry.namespace } : {},
|
|
52
|
-
...entry.cssPrefix ? { cssPrefix: entry.cssPrefix } : {},
|
|
53
|
-
...entry.groupType ? { type: entry.groupType } : {},
|
|
54
|
-
...entry.groupDescription ? { description: entry.groupDescription } : {},
|
|
55
|
-
tokens: [entry.token]
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return Array.from(regrouped.values());
|
|
59
|
-
}
|
|
60
|
-
function mergeModes(base, incoming, mode) {
|
|
61
|
-
if (incoming.length === 0) return base;
|
|
62
|
-
if (base.length === 0) return incoming;
|
|
63
|
-
const result = [...base];
|
|
64
|
-
for (const nextGroup of incoming) {
|
|
65
|
-
const idx = result.findIndex((g) => g.name === nextGroup.name);
|
|
66
|
-
if (idx === -1) {
|
|
67
|
-
result.push(nextGroup);
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
if (mode === "preserve") continue;
|
|
71
|
-
if (mode === "override") {
|
|
72
|
-
result[idx] = nextGroup;
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
const current = result[idx];
|
|
76
|
-
const optionMap = new Map(current.options.map((opt) => [opt.modifier, opt]));
|
|
77
|
-
for (const opt of nextGroup.options) optionMap.set(opt.modifier, opt);
|
|
78
|
-
result[idx] = {
|
|
79
|
-
...current,
|
|
80
|
-
options: Array.from(optionMap.values())
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
function mergeModifiers(base, incoming, mode) {
|
|
86
|
-
if (incoming.length === 0) return base;
|
|
87
|
-
if (base.length === 0) return incoming;
|
|
88
|
-
const result = new Map(base.map((m) => [m.modifier, m]));
|
|
89
|
-
for (const def of incoming) {
|
|
90
|
-
if (mode === "preserve" && result.has(def.modifier)) continue;
|
|
91
|
-
result.set(def.modifier, def);
|
|
92
|
-
}
|
|
93
|
-
return Array.from(result.values());
|
|
94
|
-
}
|
|
95
|
-
function isPlainObject(value) {
|
|
96
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
97
|
-
}
|
|
98
|
-
function deepMerge(base, incoming) {
|
|
99
|
-
const out = { ...base };
|
|
100
|
-
for (const [key, value] of Object.entries(incoming)) {
|
|
101
|
-
const current = out[key];
|
|
102
|
-
if (isPlainObject(current) && isPlainObject(value)) out[key] = deepMerge(current, value);
|
|
103
|
-
else out[key] = value;
|
|
104
|
-
}
|
|
105
|
-
return out;
|
|
106
|
-
}
|
|
107
|
-
function mergeRecordByKey(base, incoming, mode) {
|
|
108
|
-
if (mode === "merge") {
|
|
109
|
-
const merged = { ...base };
|
|
110
|
-
for (const [key, value] of Object.entries(incoming)) {
|
|
111
|
-
const current = merged[key];
|
|
112
|
-
if (isPlainObject(current) && isPlainObject(value)) merged[key] = deepMerge(current, value);
|
|
113
|
-
else merged[key] = value;
|
|
114
|
-
}
|
|
115
|
-
return merged;
|
|
116
|
-
}
|
|
117
|
-
if (mode === "preserve") return {
|
|
118
|
-
...incoming,
|
|
119
|
-
...base
|
|
120
|
-
};
|
|
121
|
-
return {
|
|
122
|
-
...base,
|
|
123
|
-
...incoming
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function applyPresetToData(base, preset, strategy) {
|
|
127
|
-
const s = {
|
|
128
|
-
...defaultComponentDefinitionMergeStrategy,
|
|
129
|
-
...strategy
|
|
130
|
-
};
|
|
131
|
-
const mergedExamples = base.examples || preset.examples ? mergeRecordByKey(base.examples ?? {}, preset.examples ?? {}, s.examples) : void 0;
|
|
132
|
-
const mergedPrinciples = base.designPrinciples || preset.designPrinciples ? [...base.designPrinciples ?? [], ...preset.designPrinciples ?? []] : void 0;
|
|
133
|
-
const mergedVars = base.vars || preset.vars ? mergeRecordByKey(base.vars ?? {}, preset.vars ?? {}, "merge") : void 0;
|
|
134
|
-
const mergedStyleProps = base.styleProps || preset.styleProps ? {
|
|
135
|
-
...base.styleProps ?? {},
|
|
136
|
-
...preset.styleProps ?? {}
|
|
137
|
-
} : void 0;
|
|
138
|
-
const merged = {
|
|
139
|
-
...base,
|
|
140
|
-
modes: mergeModes(base.modes, preset.modes, s.modes),
|
|
141
|
-
modifiers: mergeModifiers(base.modifiers, preset.modifiers, s.modifiers),
|
|
142
|
-
atomic: mergeAtomic(base.atomic, preset.atomic, s.tokens),
|
|
143
|
-
compositeStyles: {
|
|
144
|
-
...base.compositeStyles,
|
|
145
|
-
...preset.compositeStyles
|
|
146
|
-
},
|
|
147
|
-
motion: mergeRecordByKey(base.motion, preset.motion, s.motion),
|
|
148
|
-
components: mergeRecordByKey(base.components, preset.components, s.components),
|
|
149
|
-
globalStyles: mergeRecordByKey(base.globalStyles, preset.globalStyles, s.globalStyles),
|
|
150
|
-
examples: mergedExamples,
|
|
151
|
-
designPrinciples: mergedPrinciples,
|
|
152
|
-
vars: mergedVars,
|
|
153
|
-
styleProps: mergedStyleProps,
|
|
154
|
-
presetTokenNames: mergePresetTokenNames(base, preset)
|
|
155
|
-
};
|
|
156
|
-
validateComponentVariants(merged.components);
|
|
157
|
-
return merged;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Union preset-contributed token names by namespace.
|
|
161
|
-
*
|
|
162
|
-
* Every token in `preset.vars`, `preset.atomic`, and `preset.presetTokenNames`
|
|
163
|
-
* (from a nested compose) is added to the set. The set only grows — a later
|
|
164
|
-
* local `.defineVars()` does NOT remove entries, which is what gives preset
|
|
165
|
-
* tokens their read-only identity even when locally overridden.
|
|
166
|
-
*/
|
|
167
|
-
function mergePresetTokenNames(base, preset) {
|
|
168
|
-
const result = {};
|
|
169
|
-
for (const [ns, names] of Object.entries(base.presetTokenNames ?? {})) result[ns] = new Set(names);
|
|
170
|
-
const add = (ns, name) => {
|
|
171
|
-
if (name.startsWith("$")) return;
|
|
172
|
-
let set = result[ns];
|
|
173
|
-
if (!set) {
|
|
174
|
-
set = /* @__PURE__ */ new Set();
|
|
175
|
-
result[ns] = set;
|
|
176
|
-
}
|
|
177
|
-
set.add(name);
|
|
178
|
-
};
|
|
179
|
-
if (preset.vars) for (const [ns, group] of Object.entries(preset.vars)) for (const name of Object.keys(group)) add(ns, name);
|
|
180
|
-
if (preset.presetTokenNames) for (const [ns, names] of Object.entries(preset.presetTokenNames)) for (const name of names) add(ns, name);
|
|
181
|
-
if (preset.atomic) for (const group of preset.atomic) {
|
|
182
|
-
const ns = group.cssPrefix;
|
|
183
|
-
if (!ns) continue;
|
|
184
|
-
for (const token of group.tokens) add(ns, token.name);
|
|
185
|
-
}
|
|
186
|
-
if (Object.keys(result).length === 0) return void 0;
|
|
187
|
-
const out = {};
|
|
188
|
-
for (const [ns, set] of Object.entries(result)) out[ns] = [...set];
|
|
189
|
-
return out;
|
|
190
|
-
}
|
|
191
|
-
//#endregion
|
|
192
|
-
export { applyPresetToData, deepMerge, mergeAtomic };
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
//#region ../config/dist/propertyAcceptedTypes.js
|
|
2
|
-
const LENGTH_PCT = { types: [
|
|
3
|
-
"length",
|
|
4
|
-
"percentage",
|
|
5
|
-
"length-percentage"
|
|
6
|
-
] };
|
|
7
|
-
const LENGTH_PCT_AUTO = {
|
|
8
|
-
types: [
|
|
9
|
-
"length",
|
|
10
|
-
"percentage",
|
|
11
|
-
"length-percentage"
|
|
12
|
-
],
|
|
13
|
-
literals: ["auto"]
|
|
14
|
-
};
|
|
15
|
-
const SIZING = {
|
|
16
|
-
types: [
|
|
17
|
-
"length",
|
|
18
|
-
"percentage",
|
|
19
|
-
"length-percentage"
|
|
20
|
-
],
|
|
21
|
-
literals: [
|
|
22
|
-
"auto",
|
|
23
|
-
"min-content",
|
|
24
|
-
"max-content",
|
|
25
|
-
"fit-content"
|
|
26
|
-
]
|
|
27
|
-
};
|
|
28
|
-
const SIZING_WITH_NONE = {
|
|
29
|
-
types: [
|
|
30
|
-
"length",
|
|
31
|
-
"percentage",
|
|
32
|
-
"length-percentage"
|
|
33
|
-
],
|
|
34
|
-
literals: [
|
|
35
|
-
"auto",
|
|
36
|
-
"min-content",
|
|
37
|
-
"max-content",
|
|
38
|
-
"fit-content",
|
|
39
|
-
"none"
|
|
40
|
-
]
|
|
41
|
-
};
|
|
42
|
-
const LENGTH_ONLY = { types: ["length"] };
|
|
43
|
-
const COLOR_ONLY = {
|
|
44
|
-
types: ["color"],
|
|
45
|
-
literals: ["transparent", "currentColor"]
|
|
46
|
-
};
|
|
47
|
-
const TIME_ONLY = { types: ["time"] };
|
|
48
|
-
const NUMBER_ONLY = { types: ["number", "integer"] };
|
|
49
|
-
const ANGLE_ONLY = { types: ["angle"] };
|
|
50
|
-
/**
|
|
51
|
-
* CSS-wide keywords — accepted on every CSS property per the CSS spec.
|
|
52
|
-
* Synthesizer marks these as `$type: 'string'` so they don't match the
|
|
53
|
-
* property's type-based accept rule; they pass via this set instead.
|
|
54
|
-
*/
|
|
55
|
-
const CSS_WIDE_KEYWORDS = new Set([
|
|
56
|
-
"inherit",
|
|
57
|
-
"initial",
|
|
58
|
-
"unset",
|
|
59
|
-
"revert",
|
|
60
|
-
"revert-layer",
|
|
61
|
-
"transparent",
|
|
62
|
-
"currentColor",
|
|
63
|
-
"currentcolor"
|
|
64
|
-
]);
|
|
65
|
-
const LENGTH_PCT_PROPS = [
|
|
66
|
-
"gap",
|
|
67
|
-
"column-gap",
|
|
68
|
-
"row-gap",
|
|
69
|
-
"padding",
|
|
70
|
-
"padding-top",
|
|
71
|
-
"padding-right",
|
|
72
|
-
"padding-bottom",
|
|
73
|
-
"padding-left",
|
|
74
|
-
"padding-block",
|
|
75
|
-
"padding-inline",
|
|
76
|
-
"padding-inline-start",
|
|
77
|
-
"padding-inline-end",
|
|
78
|
-
"scroll-margin",
|
|
79
|
-
"scroll-margin-top",
|
|
80
|
-
"scroll-margin-bottom",
|
|
81
|
-
"scroll-margin-block",
|
|
82
|
-
"scroll-margin-inline",
|
|
83
|
-
"scroll-margin-inline-start",
|
|
84
|
-
"scroll-margin-inline-end",
|
|
85
|
-
"scroll-padding",
|
|
86
|
-
"scroll-padding-top",
|
|
87
|
-
"scroll-padding-bottom",
|
|
88
|
-
"scroll-padding-block",
|
|
89
|
-
"scroll-padding-inline",
|
|
90
|
-
"scroll-padding-inline-start",
|
|
91
|
-
"scroll-padding-inline-end",
|
|
92
|
-
"border-radius",
|
|
93
|
-
"border-top-left-radius",
|
|
94
|
-
"border-top-right-radius",
|
|
95
|
-
"border-bottom-left-radius",
|
|
96
|
-
"border-bottom-right-radius",
|
|
97
|
-
"border-start-start-radius",
|
|
98
|
-
"border-start-end-radius",
|
|
99
|
-
"border-end-start-radius",
|
|
100
|
-
"border-end-end-radius",
|
|
101
|
-
"text-indent",
|
|
102
|
-
"font-size"
|
|
103
|
-
];
|
|
104
|
-
const LENGTH_PCT_AUTO_PROPS = [
|
|
105
|
-
"margin",
|
|
106
|
-
"margin-top",
|
|
107
|
-
"margin-right",
|
|
108
|
-
"margin-bottom",
|
|
109
|
-
"margin-left",
|
|
110
|
-
"margin-block",
|
|
111
|
-
"margin-inline",
|
|
112
|
-
"margin-inline-start",
|
|
113
|
-
"margin-inline-end",
|
|
114
|
-
"top",
|
|
115
|
-
"right",
|
|
116
|
-
"bottom",
|
|
117
|
-
"left",
|
|
118
|
-
"inset",
|
|
119
|
-
"inset-block",
|
|
120
|
-
"inset-inline"
|
|
121
|
-
];
|
|
122
|
-
const SIZING_PROPS = [
|
|
123
|
-
"width",
|
|
124
|
-
"height",
|
|
125
|
-
"min-width",
|
|
126
|
-
"min-height"
|
|
127
|
-
];
|
|
128
|
-
const SIZING_WITH_NONE_PROPS = ["max-width", "max-height"];
|
|
129
|
-
const LENGTH_ONLY_PROPS = [
|
|
130
|
-
"border-width",
|
|
131
|
-
"border-top-width",
|
|
132
|
-
"border-right-width",
|
|
133
|
-
"border-bottom-width",
|
|
134
|
-
"border-left-width",
|
|
135
|
-
"border-block-width",
|
|
136
|
-
"border-inline-width",
|
|
137
|
-
"border-inline-start-width",
|
|
138
|
-
"border-inline-end-width",
|
|
139
|
-
"outline-width",
|
|
140
|
-
"outline-offset",
|
|
141
|
-
"border-spacing",
|
|
142
|
-
"letter-spacing",
|
|
143
|
-
"text-underline-offset",
|
|
144
|
-
"text-decoration-thickness"
|
|
145
|
-
];
|
|
146
|
-
const COLOR_PROPS = [
|
|
147
|
-
"color",
|
|
148
|
-
"background-color",
|
|
149
|
-
"border-color",
|
|
150
|
-
"border-top-color",
|
|
151
|
-
"border-right-color",
|
|
152
|
-
"border-bottom-color",
|
|
153
|
-
"border-left-color",
|
|
154
|
-
"border-block-color",
|
|
155
|
-
"border-inline-color",
|
|
156
|
-
"border-inline-start-color",
|
|
157
|
-
"border-inline-end-color",
|
|
158
|
-
"outline-color",
|
|
159
|
-
"text-decoration-color",
|
|
160
|
-
"caret-color",
|
|
161
|
-
"fill",
|
|
162
|
-
"stroke"
|
|
163
|
-
];
|
|
164
|
-
const TIME_PROPS = ["transition-duration", "transition-delay"];
|
|
165
|
-
const NUMBER_PROPS = [
|
|
166
|
-
"flex-grow",
|
|
167
|
-
"flex-shrink",
|
|
168
|
-
"order",
|
|
169
|
-
"z-index",
|
|
170
|
-
"-webkit-line-clamp"
|
|
171
|
-
];
|
|
172
|
-
const ANGLE_PROPS = ["rotate"];
|
|
173
|
-
const PROPERTY_ACCEPTED_TYPES = new Map([
|
|
174
|
-
...LENGTH_PCT_PROPS.map((p) => [p, LENGTH_PCT]),
|
|
175
|
-
...LENGTH_PCT_AUTO_PROPS.map((p) => [p, LENGTH_PCT_AUTO]),
|
|
176
|
-
...SIZING_PROPS.map((p) => [p, SIZING]),
|
|
177
|
-
...SIZING_WITH_NONE_PROPS.map((p) => [p, SIZING_WITH_NONE]),
|
|
178
|
-
...LENGTH_ONLY_PROPS.map((p) => [p, LENGTH_ONLY]),
|
|
179
|
-
...COLOR_PROPS.map((p) => [p, COLOR_ONLY]),
|
|
180
|
-
...TIME_PROPS.map((p) => [p, TIME_ONLY]),
|
|
181
|
-
...NUMBER_PROPS.map((p) => [p, NUMBER_ONLY]),
|
|
182
|
-
...ANGLE_PROPS.map((p) => [p, ANGLE_ONLY]),
|
|
183
|
-
["font-weight", { types: [
|
|
184
|
-
"font-weight",
|
|
185
|
-
"number",
|
|
186
|
-
"integer"
|
|
187
|
-
] }],
|
|
188
|
-
["font-family", { types: ["font-family"] }],
|
|
189
|
-
["transition-timing-function", { types: ["easing-function"] }],
|
|
190
|
-
["box-shadow", {
|
|
191
|
-
types: ["shadow"],
|
|
192
|
-
literals: ["none"]
|
|
193
|
-
}],
|
|
194
|
-
["text-shadow", {
|
|
195
|
-
types: ["shadow"],
|
|
196
|
-
literals: ["none"]
|
|
197
|
-
}],
|
|
198
|
-
["list-style-image", { types: ["url", "image"] }],
|
|
199
|
-
["aspect-ratio", { types: ["ratio", "number"] }],
|
|
200
|
-
["opacity", { types: ["number", "percentage"] }],
|
|
201
|
-
["z-index", {
|
|
202
|
-
types: ["integer", "number"],
|
|
203
|
-
literals: ["auto"]
|
|
204
|
-
}]
|
|
205
|
-
]);
|
|
206
|
-
/**
|
|
207
|
-
* Whether a token with the given detected value type AND raw string value
|
|
208
|
-
* is accepted by the CSS property. Returns `true` for any property not in
|
|
209
|
-
* the table.
|
|
210
|
-
*/
|
|
211
|
-
function isTokenAcceptedByProperty(cssProperty, valueType, rawValue) {
|
|
212
|
-
if (CSS_WIDE_KEYWORDS.has(rawValue)) return true;
|
|
213
|
-
const entry = PROPERTY_ACCEPTED_TYPES.get(cssProperty);
|
|
214
|
-
if (!entry) return true;
|
|
215
|
-
if (valueType && entry.types?.includes(valueType)) return true;
|
|
216
|
-
if (entry.literals?.includes(rawValue)) return true;
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
//#endregion
|
|
220
|
-
export { PROPERTY_ACCEPTED_TYPES, isTokenAcceptedByProperty };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import { ConfigurableProp } from "@uds/types";
|