@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,349 +0,0 @@
|
|
|
1
|
-
import { ComponentRef, CompositeRef, RegisteredComponents, StylePropRef } from "./component-refs.js";
|
|
2
|
-
import * as React$1 from "react";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
|
-
|
|
5
|
-
//#region ../config/dist/component-config.d.ts
|
|
6
|
-
//#region src/component-config.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* HTML tag literal. The TypeScript type is `string` (any tag name);
|
|
9
|
-
* runtime renders it via `React.createElement(tag, ...)`.
|
|
10
|
-
*
|
|
11
|
-
* Kept as `string` instead of `keyof JSX.IntrinsicElements` so the type
|
|
12
|
-
* doesn't pull a 200-key union into every layer position. Editors still
|
|
13
|
-
* autocomplete tag names from JSX.
|
|
14
|
-
*/
|
|
15
|
-
type HtmlTag = string;
|
|
16
|
-
/**
|
|
17
|
-
* Object form for a primitive (HTML-tag) layer that needs locked attrs
|
|
18
|
-
* or default CSS-property values.
|
|
19
|
-
*
|
|
20
|
-
* Distributive mapped union over `keyof React.JSX.IntrinsicElements` so
|
|
21
|
-
* `attrs` is narrowed to the HTML props valid for the chosen `tag` at
|
|
22
|
-
* the call site — `{ tag: 'a', attrs: { href: '/x' } }` type-checks;
|
|
23
|
-
* `{ tag: 'div', attrs: { href: '/x' } }` does not. `defaultProps`
|
|
24
|
-
* stays loosely typed: it carries style-prop-keyed CSS declarations
|
|
25
|
-
* (incl. `_hover`/`_focus`/etc. modifier keys) that feed the @utility
|
|
26
|
-
* codegen, NOT HTML props.
|
|
27
|
-
*/
|
|
28
|
-
type PrimitiveLayer = { [T in keyof React$1.JSX.IntrinsicElements]: {
|
|
29
|
-
tag: T; /** HTML attributes always applied to this layer (e.g. `role="alert"`). */
|
|
30
|
-
attrs?: Partial<React$1.ComponentPropsWithoutRef<T>>;
|
|
31
|
-
/**
|
|
32
|
-
* Default per-layer CSS declarations. Keys are style-prop names (or
|
|
33
|
-
* raw CSS properties when no registered style prop applies); values
|
|
34
|
-
* are token refs (`'{spacing/4}'`), alias names, or literal CSS.
|
|
35
|
-
* Modifier keys (`_hover`, `_focus`, `_dataDisabled`, ...) nest the
|
|
36
|
-
* same shape recursively. Codegen compiles this into a single
|
|
37
|
-
* `@utility componentName-layerName { ... }` block.
|
|
38
|
-
*/
|
|
39
|
-
defaultProps?: Record<string, unknown>;
|
|
40
|
-
} }[keyof React$1.JSX.IntrinsicElements];
|
|
41
|
-
/**
|
|
42
|
-
* Object form for a layer that's a composed React component (registered
|
|
43
|
-
* via `.registerComponents({...})`). The `component` field is a brace-ref
|
|
44
|
-
* narrowed against `RegisteredComponents`. `defaultProps` is narrowed
|
|
45
|
-
* per-component so authors can only pass props the referenced component
|
|
46
|
-
* actually accepts.
|
|
47
|
-
*
|
|
48
|
-
* Codegen emits `RegisteredComponents[K]` as the component's resolved
|
|
49
|
-
* prop shape (e.g. `{ backgroundColor: RegisteredStyleProps['bg']; … }`).
|
|
50
|
-
* `Partial<RegisteredComponents[K]>` lets `defaultProps` narrow against
|
|
51
|
-
* that shape. Without registered components, the union is `never` (so
|
|
52
|
-
* package-internal authoring sites don't have to deal with this shape).
|
|
53
|
-
*/
|
|
54
|
-
type ComposedLayer = { [K in keyof RegisteredComponents & string]: {
|
|
55
|
-
component: `{${K}}`;
|
|
56
|
-
defaultProps?: Partial<RegisteredComponents[K]>;
|
|
57
|
-
} }[keyof RegisteredComponents & string];
|
|
58
|
-
/**
|
|
59
|
-
* Allowed forms for a single layer's value. Authors usually pick the
|
|
60
|
-
* shorthand (a bare tag string or a brace-ref); the object forms exist
|
|
61
|
-
* for the cases that need `attrs` or `defaultProps`.
|
|
62
|
-
*/
|
|
63
|
-
type LayerInput = HtmlTag | ComponentRef | PrimitiveLayer | ComposedLayer;
|
|
64
|
-
/**
|
|
65
|
-
* Bind a registered style prop to a specific layer. The style prop's
|
|
66
|
-
* resolved class name is added to that layer's `className` bundle at
|
|
67
|
-
* render time.
|
|
68
|
-
*
|
|
69
|
-
* `styleProp` is narrowed against `RegisteredStyleProps`. `layer` is a
|
|
70
|
-
* string at this level — the consuming type (`ComponentConfig.props`)
|
|
71
|
-
* narrows it against the component's own `layers` keys.
|
|
72
|
-
*/
|
|
73
|
-
interface StylePropBinding {
|
|
74
|
-
layer: string;
|
|
75
|
-
styleProp: StylePropRef;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Extract the root tag literal from a `layers` map when it can be read
|
|
79
|
-
* statically. Returns the string literal `'a' | 'div' | …` when:
|
|
80
|
-
*
|
|
81
|
-
* - `layers.root` is a bare tag string (`'a'`), or
|
|
82
|
-
* - `layers.root` is `{ tag: 'a', attrs?: … }`.
|
|
83
|
-
*
|
|
84
|
-
* Returns `undefined` when `layers.root` is a brace-ref (`'{Box}'`), a
|
|
85
|
-
* `{ component: '{Box}' }` form, or not present. `Props<TConfig>` reads
|
|
86
|
-
* this and substitutes `React.ComponentPropsWithoutRef<TTag>` for the
|
|
87
|
-
* generic `HTMLAttributes<HTMLElement>` when narrowable.
|
|
88
|
-
*/
|
|
89
|
-
type RootTag<TLayers> = TLayers extends {
|
|
90
|
-
root: infer R;
|
|
91
|
-
} ? R extends HtmlTag ? R extends `{${string}}` ? undefined : R : R extends {
|
|
92
|
-
tag: infer T extends HtmlTag;
|
|
93
|
-
} ? T : undefined : undefined;
|
|
94
|
-
/**
|
|
95
|
-
* Bind a registered composite to a single layer. Multi-layer composites
|
|
96
|
-
* use the `CompositeBinding` shape instead (see below).
|
|
97
|
-
*/
|
|
98
|
-
interface SingleLayerCompositeBinding {
|
|
99
|
-
layer: string;
|
|
100
|
-
composite: CompositeRef;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Multi-layer composite binding — explicit composite-layer → component-
|
|
104
|
-
* layer mapping. The composite declares its own internal layer names
|
|
105
|
-
* (`default`, `label`, …) and this binding tells the framework which
|
|
106
|
-
* component layer each one maps to.
|
|
107
|
-
*/
|
|
108
|
-
interface CompositeBinding {
|
|
109
|
-
composite: CompositeRef;
|
|
110
|
-
layers: Record<string, string>;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Forward a JSX prop value to one of the component's layers as an
|
|
114
|
-
* existing surface key. The runtime-side / read-side shape — `layer`
|
|
115
|
-
* and `from` are bare strings. Type-guards in `bindRender` use the
|
|
116
|
-
* absence of `styleProp` / `composite` keys to discriminate this shape
|
|
117
|
-
* from the registered-binding shapes.
|
|
118
|
-
*
|
|
119
|
-
* Authoring sites get the narrower `TypedForwardBinding<TLayers>`
|
|
120
|
-
* (below) via `VerbosePropBinding<TLayers>`, which structurally
|
|
121
|
-
* extends this loose form.
|
|
122
|
-
*/
|
|
123
|
-
/**
|
|
124
|
-
* Authoring-site form of `ForwardBinding`, narrowed against the
|
|
125
|
-
* component's own layer map. Distributes over `keyof TLayers` so:
|
|
126
|
-
*
|
|
127
|
-
* - `layer` is constrained to one of the declared layer names.
|
|
128
|
-
* - `from` is constrained by the target layer's shape:
|
|
129
|
-
* • **ComposedLayer** (`{ component: '{Box}' }`) → one of the
|
|
130
|
-
* wrapped component's exposed JSX props (looked up against
|
|
131
|
-
* `RegisteredComponents['Box']`), so `{ layer: 'label', from:
|
|
132
|
-
* 'variant' }` only type-checks if Text registers `variant`.
|
|
133
|
-
* • **PrimitiveLayer / bare HTML tag** → any string (HTML attr or
|
|
134
|
-
* event name; type-precision here would require pulling
|
|
135
|
-
* `JSX.IntrinsicElements[tag]`, deferred).
|
|
136
|
-
*
|
|
137
|
-
* Structurally extends `ForwardBinding` so the runtime's type-guard
|
|
138
|
-
* (`isForwardBinding`) still recognizes typed entries.
|
|
139
|
-
*/
|
|
140
|
-
type TypedForwardBinding<TLayers extends Record<string, LayerInput>> = { [K in keyof TLayers & string]: {
|
|
141
|
-
layer: K;
|
|
142
|
-
from: TLayers[K] extends {
|
|
143
|
-
component: `{${infer C}}`;
|
|
144
|
-
} ? C extends keyof RegisteredComponents ? keyof RegisteredComponents[C] & string : string : string;
|
|
145
|
-
} }[keyof TLayers & string];
|
|
146
|
-
/**
|
|
147
|
-
* Boolean prop — toggled on/off, no value beyond presence. Useful for
|
|
148
|
-
* `loading`, `disabled`, `selected`. Each layer's bundle gets a
|
|
149
|
-
* data-attribute (`data-loading="true"`) the consumer can target.
|
|
150
|
-
*/
|
|
151
|
-
interface BoolMarker {
|
|
152
|
-
readonly __kind: 'bool';
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Enum prop — the value picks one entry from a map. Each entry can
|
|
156
|
-
* declare per-layer style overrides. Mirrors today's `variants.X`
|
|
157
|
-
* surface but co-located with other prop bindings.
|
|
158
|
-
*/
|
|
159
|
-
interface EnumMarker<TValues extends Record<string, unknown>> {
|
|
160
|
-
readonly __kind: 'enum';
|
|
161
|
-
readonly values: TValues;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Shorthand binding form — a brace-ref string standing in for the
|
|
165
|
-
* verbose object. `'{bg}'` means "bind the registered style prop `bg`
|
|
166
|
-
* to the *root* layer".
|
|
167
|
-
*
|
|
168
|
-
* Only legal in the primitive form `defineComponent('div', { props: { bg: '{bg}' } })`,
|
|
169
|
-
* where the root layer is unambiguous. In the verbose form
|
|
170
|
-
* `defineComponent({ layers: {...}, props: {...} })` authors must use
|
|
171
|
-
* the explicit long-form `{ layer, styleProp: '{bg}' }` binding so
|
|
172
|
-
* the target layer is named at the call site.
|
|
173
|
-
*/
|
|
174
|
-
type StylePropShorthand = StylePropRef;
|
|
175
|
-
/**
|
|
176
|
-
* All allowed shapes for a single entry in the verbose form's `props`
|
|
177
|
-
* block. Verbose form (with explicit `layers`) requires the long-form
|
|
178
|
-
* `{ layer, styleProp }` binding — no shorthand. The shorthand
|
|
179
|
-
* `'{bg}'` is allowed only in the primitive form's props (see
|
|
180
|
-
* `PrimitivePropBinding`).
|
|
181
|
-
*
|
|
182
|
-
* Generic over `TLayers` so `TypedForwardBinding` can narrow the
|
|
183
|
-
* `layer` + `from` fields against the component's own layer map.
|
|
184
|
-
* Consumers that don't know the layer map (read-side helpers,
|
|
185
|
-
* `bindRender`) parameterize with the wide default
|
|
186
|
-
* `Record<string, LayerInput>` and get the loose `ForwardBinding`.
|
|
187
|
-
*/
|
|
188
|
-
type VerbosePropBinding<TLayers extends Record<string, LayerInput> = Record<string, LayerInput>> = StylePropBinding | SingleLayerCompositeBinding | CompositeBinding | TypedForwardBinding<TLayers> | BoolMarker | EnumMarker<any>;
|
|
189
|
-
/**
|
|
190
|
-
* All allowed shapes for a single entry in the primitive form's `props`
|
|
191
|
-
* block. Primitive form adds the `StylePropShorthand` brace-ref
|
|
192
|
-
* (`'{bg}'`) on top of every verbose form — the root layer is
|
|
193
|
-
* unambiguous so the shorthand resolves trivially.
|
|
194
|
-
*/
|
|
195
|
-
type PrimitivePropBinding<TLayers extends Record<string, LayerInput> = Record<string, LayerInput>> = StylePropShorthand | VerbosePropBinding<TLayers>;
|
|
196
|
-
/**
|
|
197
|
-
* Union of every legal prop-binding shape across both forms. Read-side
|
|
198
|
-
* helpers (`Props<TConfig>`, runtime resolution) accept this widest
|
|
199
|
-
* union; authoring-side input types (`ComponentConfigInput`) take the
|
|
200
|
-
* tighter `VerbosePropBinding`.
|
|
201
|
-
*/
|
|
202
|
-
type PropBinding<TLayers extends Record<string, LayerInput> = Record<string, LayerInput>> = PrimitivePropBinding<TLayers>;
|
|
203
|
-
/**
|
|
204
|
-
* Marker for a boolean JSX prop. Use inside the `props` block:
|
|
205
|
-
*
|
|
206
|
-
* props: {
|
|
207
|
-
* loading: bool(),
|
|
208
|
-
* disabled: bool(),
|
|
209
|
-
* }
|
|
210
|
-
*/
|
|
211
|
-
/**
|
|
212
|
-
* Names of prop bindings that participate in matrix/strip iteration —
|
|
213
|
-
* i.e. props authored as `enums({...})` or `bool()`. Other prop bindings
|
|
214
|
-
* (style props, forwards, composites) don't have a fixed enumerable
|
|
215
|
-
* set of values to iterate over and so aren't valid axes.
|
|
216
|
-
*
|
|
217
|
-
* Resolves to `never` when `TProps` declares no enum/bool bindings.
|
|
218
|
-
*/
|
|
219
|
-
type IterableAxisOf<TProps> = { [K in keyof TProps]: TProps[K] extends EnumMarker<Record<string, unknown>> | BoolMarker ? K : never }[keyof TProps] & string;
|
|
220
|
-
/**
|
|
221
|
-
* A single example entry — describes one cell, one row, or one matrix.
|
|
222
|
-
*
|
|
223
|
-
* Three iteration shapes are supported, distinguished by which fields
|
|
224
|
-
* are present:
|
|
225
|
-
*
|
|
226
|
-
* - Static: only `props`. Renders one cell with `props` as the consumer-
|
|
227
|
-
* facing prop values.
|
|
228
|
-
* - 1D strip: `axis` plus `props`. Iterates the named enum/bool prop and
|
|
229
|
-
* renders one cell per value.
|
|
230
|
-
* - 2D matrix: `rows` and `cols` plus `props`. Iterates both and renders
|
|
231
|
-
* the Cartesian product as a labeled grid.
|
|
232
|
-
*
|
|
233
|
-
* `axis` and `rows`/`cols` are mutually exclusive; `rows` and `cols`
|
|
234
|
-
* must appear together. The runtime validator enforces both.
|
|
235
|
-
*
|
|
236
|
-
* `props` is keyed by *consumer-facing prop name* — the same names a
|
|
237
|
-
* caller of `<Link href='#'>` would pass — not by internal layer name.
|
|
238
|
-
* The renderer maps consumer props to layer bundles using the
|
|
239
|
-
* component's own `props` bindings.
|
|
240
|
-
*
|
|
241
|
-
* Authors don't control wrapper layout (gaps, padding, alignment) — the
|
|
242
|
-
* renderer (Studio / docs) owns those decisions so the matrix surface
|
|
243
|
-
* stays consistent across components.
|
|
244
|
-
*/
|
|
245
|
-
interface ExampleEntry<TAxis extends string = string> {
|
|
246
|
-
/** 1D iteration — one cell per value of this enum/bool prop. */
|
|
247
|
-
axis?: TAxis;
|
|
248
|
-
/** 2D iteration — rows × cols matrix. Mutually exclusive with `axis`. */
|
|
249
|
-
rows?: TAxis;
|
|
250
|
-
cols?: TAxis;
|
|
251
|
-
/**
|
|
252
|
-
* Consumer-facing prop values used by every cell. For 1D / 2D entries,
|
|
253
|
-
* the cell's axis coords are overlaid on top of these (axis values win
|
|
254
|
-
* on collision with `props.<axis>`).
|
|
255
|
-
*/
|
|
256
|
-
props?: Record<string, unknown>;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Component examples — required `default` plus any number of additional
|
|
260
|
-
* named entries. `default` is the canonical single-instance showcase
|
|
261
|
-
* Studio + docs fall back to when no specific example is requested.
|
|
262
|
-
*
|
|
263
|
-
* `default` is distinct from `defaultProps`: `defaultProps` is the
|
|
264
|
-
* runtime API default applied when a consumer omits a prop; `examples.default`
|
|
265
|
-
* is the showcase content (label, icons, href) used by tooling. A
|
|
266
|
-
* component can declare both without conflict.
|
|
267
|
-
*
|
|
268
|
-
* Axis types narrow to `IterableAxisOf<TProps>` so referencing a non-
|
|
269
|
-
* enum/bool prop name in `axis` / `rows` / `cols` is a type error.
|
|
270
|
-
*/
|
|
271
|
-
type Examples<TProps extends Record<string, unknown> = Record<string, unknown>> = {
|
|
272
|
-
default: ExampleEntry<IterableAxisOf<TProps>>;
|
|
273
|
-
} & Record<string, ExampleEntry<IterableAxisOf<TProps>>>;
|
|
274
|
-
/**
|
|
275
|
-
* A compound-variant entry — applies a per-layer style override when
|
|
276
|
-
* *all* `conditions` match the incoming JSX props. Mirrors the legacy
|
|
277
|
-
* `compoundVariants: [{ conditions, styles }]` shape (see
|
|
278
|
-
* `componentCompoundClass()` for the emitted class name).
|
|
279
|
-
*
|
|
280
|
-
* compoundVariants: [
|
|
281
|
-
* {
|
|
282
|
-
* conditions: { size: 'sm', variant: 'brand' },
|
|
283
|
-
* styles: { root: { boxShadow: '{shadow/sm}' } },
|
|
284
|
-
* },
|
|
285
|
-
* ]
|
|
286
|
-
*
|
|
287
|
-
* `conditions` keys are JSX-prop names that resolve to `enums()` /
|
|
288
|
-
* `bool()` markers in the `props` block; values are the variant values
|
|
289
|
-
* (or `'true'` / `'false'` for bools) that must all match for the entry
|
|
290
|
-
* to apply. Codegen emits one `@utility componentName-layerName--<sorted
|
|
291
|
-
* conditions>` block per (layer); runtime appends that class when
|
|
292
|
-
* conditions match.
|
|
293
|
-
*/
|
|
294
|
-
interface CompoundVariant {
|
|
295
|
-
conditions: Record<string, string>;
|
|
296
|
-
styles: Record<string, Record<string, unknown>>;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* The architecture-doc-target component config. Distinct from today's
|
|
300
|
-
* `SingleComponentDef` (`base` + `variants` shape) — this is the
|
|
301
|
-
* pure-data, layers-first shape the new `defineComponent` accepts.
|
|
302
|
-
*
|
|
303
|
-
* `TLayers` is inferred from the `layers` block so prop bindings can
|
|
304
|
-
* narrow their `layer` field against the component's actual layer
|
|
305
|
-
* names; typos surface at the authoring site.
|
|
306
|
-
*/
|
|
307
|
-
/**
|
|
308
|
-
* Branded shape returned by `defineComponent({...})`. Carries `layers`,
|
|
309
|
-
* `props`, AND a phantom `__tag` slot as const-narrowed types so
|
|
310
|
-
* downstream type-only imports (`import type { AlertConfig } from
|
|
311
|
-
* './alert.config'`) thread the full shape through to
|
|
312
|
-
* `Props<typeof config>` — per-prop literal binding values (e.g.
|
|
313
|
-
* `'{bg}'`) survive for `Props<TConfig>` to resolve against
|
|
314
|
-
* `RegisteredStyleProps`, and the root tag survives for HTML-attribute
|
|
315
|
-
* narrowing via `React.ComponentPropsWithoutRef<TTag>`.
|
|
316
|
-
*
|
|
317
|
-
* `__tag` is a *phantom* type slot — there is no runtime field. It's
|
|
318
|
-
* derived from either the primitive-form first arg (`defineComponent('a',
|
|
319
|
-
* …)`) or from `layers.root` via `RootTag<TLayers>` for the verbose form.
|
|
320
|
-
* When the root isn't a literal tag (brace-ref / composed layer), it's
|
|
321
|
-
* `undefined` and `Props<TConfig>` falls back to `HTMLAttributes<HTMLElement>`.
|
|
322
|
-
*
|
|
323
|
-
* `__componentName` is a non-enumerable runtime slot assigned by
|
|
324
|
-
* `.registerComponents({ Name: config })` — the key becomes the name.
|
|
325
|
-
* The renderer reads it to emit `componentName-layerName` @utility
|
|
326
|
-
* classes onto each layer's bundle (matching the classes codegen emits
|
|
327
|
-
* from the same `defaultProps`). Absent until registered.
|
|
328
|
-
*/
|
|
329
|
-
interface ComponentConfigValue<TLayers extends Record<string, LayerInput>, TProps extends Record<string, PropBinding> = Record<string, PropBinding>, TTag extends HtmlTag | undefined = RootTag<TLayers>> {
|
|
330
|
-
readonly __kind: 'componentConfig';
|
|
331
|
-
readonly __tag?: TTag;
|
|
332
|
-
readonly __componentName?: string;
|
|
333
|
-
readonly layers: TLayers;
|
|
334
|
-
readonly props?: TProps;
|
|
335
|
-
readonly defaultProps?: Record<string, unknown>;
|
|
336
|
-
readonly compoundVariants?: CompoundVariant[];
|
|
337
|
-
/**
|
|
338
|
-
* Component examples — see {@link Examples}. Carried through from
|
|
339
|
-
* `ComponentConfigInput.examples`.
|
|
340
|
-
*/
|
|
341
|
-
readonly examples?: Examples<TProps>;
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* The bundle passed to the render function for each layer — a ready-to-
|
|
345
|
-
* spread object with `className` and any forwarded attrs. The render
|
|
346
|
-
* function destructures `props.<layerName>` into the JSX position.
|
|
347
|
-
*/
|
|
348
|
-
//#endregion
|
|
349
|
-
export { BoolMarker, ComponentConfigValue, ComposedLayer, CompositeBinding, CompoundVariant, EnumMarker, HtmlTag, LayerInput, PrimitiveLayer, PrimitivePropBinding, PropBinding, RootTag, SingleLayerCompositeBinding, StylePropBinding, StylePropShorthand, VerbosePropBinding };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
//#region ../config/dist/component-refs.d.ts
|
|
2
|
-
//#region src/component-refs.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Augmentable registries + template-literal ref types for the
|
|
5
|
-
* component-API surface.
|
|
6
|
-
*
|
|
7
|
-
* Codegen runs `uds build` and populates the four interfaces below in
|
|
8
|
-
* each consumer app's `.uds/uds-env.d.ts`. The template-literal types
|
|
9
|
-
* derived from them narrow brace-ref strings against what's actually
|
|
10
|
-
* registered — `'{Box}'` typechecks only if `Box` is a real
|
|
11
|
-
* `RegisteredComponents` key, `'{bg}'` only if `bg` is a real
|
|
12
|
-
* `RegisteredStyleProps` key, etc.
|
|
13
|
-
*
|
|
14
|
-
* Without the augmentation loaded (e.g. inside `@uds/config`'s own
|
|
15
|
-
* test files), each registry is `{}` and the corresponding ref type
|
|
16
|
-
* collapses to `never`. Helpers downstream are expected to fail open
|
|
17
|
-
* in that case so package-internal authoring sites don't all error.
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* Registered components. Each key is the component name (the brace-ref
|
|
21
|
-
* identifier — `'{Box}'`); each value is the component's resolved prop
|
|
22
|
-
* shape, e.g.
|
|
23
|
-
*
|
|
24
|
-
* export interface RegisteredComponents {
|
|
25
|
-
* Box2: {
|
|
26
|
-
* backgroundColor: RegisteredStyleProps['bg'];
|
|
27
|
-
* color: RegisteredStyleProps['color'];
|
|
28
|
-
* };
|
|
29
|
-
* Spinner: {};
|
|
30
|
-
* }
|
|
31
|
-
*
|
|
32
|
-
* Composed layers use `Partial<RegisteredComponents[K]>` on
|
|
33
|
-
* `defaultProps` for type-safe completion when nesting components
|
|
34
|
-
* inside other components' configs.
|
|
35
|
-
*
|
|
36
|
-
* Populated by codegen from `uds.config.ts`'s `.registerComponents({...})`
|
|
37
|
-
* call.
|
|
38
|
-
*/
|
|
39
|
-
interface RegisteredComponents {}
|
|
40
|
-
/**
|
|
41
|
-
* Registered style props. Key is the JSX prop name (the brace-ref
|
|
42
|
-
* identifier — `'{bg}'`); value is the string-literal union of
|
|
43
|
-
* allowed token names for that prop, e.g.
|
|
44
|
-
*
|
|
45
|
-
* export interface RegisteredStyleProps {
|
|
46
|
-
* bg: 'brand' | 'accent' | 'primary';
|
|
47
|
-
* color: 'brand' | 'on-brand';
|
|
48
|
-
* }
|
|
49
|
-
*
|
|
50
|
-
* Components reference these directly when wiring JSX-prop types:
|
|
51
|
-
* `bg?: RegisteredStyleProps['bg']`. Downstream `Props<TConfig>`
|
|
52
|
-
* resolves the shorthand `'{bg}'` against this map.
|
|
53
|
-
*
|
|
54
|
-
* Populated by codegen from `uds.config.ts`'s `.registerStyleProps({...})`
|
|
55
|
-
* call. A `never` value means the prop registered no tokens
|
|
56
|
-
* (arbitrary-only); the consumer should widen those to `string`.
|
|
57
|
-
*/
|
|
58
|
-
interface RegisteredStyleProps {}
|
|
59
|
-
/**
|
|
60
|
-
* Registered composite-style names. Each key is the composite identifier
|
|
61
|
-
* (the brace-ref — `'{elevation}'`, `'{severity}'`); value is `void`.
|
|
62
|
-
*
|
|
63
|
-
* Populated by codegen from `uds.config.ts`'s `.registerComposites({...})`
|
|
64
|
-
* call.
|
|
65
|
-
*/
|
|
66
|
-
interface RegisteredComposites {}
|
|
67
|
-
/**
|
|
68
|
-
* Registered motion-preset names. Each key is the preset identifier
|
|
69
|
-
* (`'{fadeIn}'`); value is `void`.
|
|
70
|
-
*
|
|
71
|
-
* Populated by codegen from `uds.config.ts`'s `.defineMotion({...})`
|
|
72
|
-
* (motion has no separate `.registerMotion` step today; the entries
|
|
73
|
-
* come directly from `defineMotion` keys).
|
|
74
|
-
*/
|
|
75
|
-
/**
|
|
76
|
-
* Brace-wrapped reference to a registered React component. Falls open
|
|
77
|
-
* to `'{${string}}'` when the registry is unaugmented (e.g. inside
|
|
78
|
-
* `@uds/config`'s own tests, where codegen hasn't populated the
|
|
79
|
-
* interface). Consumer apps load the codegen-emitted augmentation and
|
|
80
|
-
* get narrow `'{Box}' | '{Text}' | …` autocomplete.
|
|
81
|
-
*/
|
|
82
|
-
type ComponentRef = [keyof RegisteredComponents] extends [never] ? `{${string}}` : `{${Extract<keyof RegisteredComponents, string>}}`;
|
|
83
|
-
/**
|
|
84
|
-
* Brace-wrapped reference to a registered style prop. Falls open when
|
|
85
|
-
* unaugmented (see {@link ComponentRef}).
|
|
86
|
-
*/
|
|
87
|
-
type StylePropRef = [keyof RegisteredStyleProps] extends [never] ? `{${string}}` : `{${Extract<keyof RegisteredStyleProps, string>}}`;
|
|
88
|
-
/**
|
|
89
|
-
* Brace-wrapped reference to a registered composite style. Falls open
|
|
90
|
-
* when unaugmented.
|
|
91
|
-
*/
|
|
92
|
-
type CompositeRef = [keyof RegisteredComposites] extends [never] ? `{${string}}` : `{${Extract<keyof RegisteredComposites, string>}}`;
|
|
93
|
-
/**
|
|
94
|
-
* Brace-wrapped reference to a registered motion preset. Falls open
|
|
95
|
-
* when unaugmented.
|
|
96
|
-
*/
|
|
97
|
-
//#endregion
|
|
98
|
-
export { ComponentRef, CompositeRef, RegisteredComponents, RegisteredComposites, RegisteredStyleProps, StylePropRef };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { propMappings } from "../../core/dist/style-prop-data.js";
|
|
2
|
-
import "../../core/dist/index.js";
|
|
3
|
-
//#region ../config/dist/component-resolution.js
|
|
4
|
-
/**
|
|
5
|
-
* Build a motion reference object for use in defineComponents callback.
|
|
6
|
-
* Each key maps to the preset name string, so component configs can
|
|
7
|
-
* reference presets by name: `motion: motion.fadeIn` → `motion: "fadeIn"`
|
|
8
|
-
*/
|
|
9
|
-
function buildMotionReference(motion) {
|
|
10
|
-
const result = {};
|
|
11
|
-
for (const name of Object.keys(motion)) result[name] = name;
|
|
12
|
-
return result;
|
|
13
|
-
}
|
|
14
|
-
function resolveMotionAlias(value, motion) {
|
|
15
|
-
const alias = value.trim();
|
|
16
|
-
if (!alias) return null;
|
|
17
|
-
return motion[alias] ?? null;
|
|
18
|
-
}
|
|
19
|
-
function isSlotMotionConfigObject(value) {
|
|
20
|
-
return typeof value === "object" && value !== null;
|
|
21
|
-
}
|
|
22
|
-
function resolveComponentMotionAliases(components, motionPresets) {
|
|
23
|
-
const resolved = {};
|
|
24
|
-
for (const [componentName, componentConfig] of Object.entries(components)) {
|
|
25
|
-
const resolvedMotion = {};
|
|
26
|
-
let strippedBase = componentConfig.base;
|
|
27
|
-
if (componentConfig.base) {
|
|
28
|
-
const newBase = {};
|
|
29
|
-
for (const [slotName, slotStyles] of Object.entries(componentConfig.base)) if (slotStyles && typeof slotStyles === "object" && "motion" in slotStyles) {
|
|
30
|
-
const { motion: slotMotion, ...rest } = slotStyles;
|
|
31
|
-
newBase[slotName] = rest;
|
|
32
|
-
if (isSlotMotionConfigObject(slotMotion)) resolvedMotion[slotName] = slotMotion;
|
|
33
|
-
} else newBase[slotName] = slotStyles;
|
|
34
|
-
strippedBase = newBase;
|
|
35
|
-
}
|
|
36
|
-
if (componentConfig.motion) for (const [slot, motionValue] of Object.entries(componentConfig.motion)) {
|
|
37
|
-
if (resolvedMotion[slot]) continue;
|
|
38
|
-
if (typeof motionValue === "string") {
|
|
39
|
-
const preset = resolveMotionAlias(motionValue, motionPresets);
|
|
40
|
-
if (!preset) throw new Error(`Component "${componentName}" slot "${slot}" references unknown motion preset "${motionValue}".`);
|
|
41
|
-
if (preset.runtime !== "js") throw new Error(`Component "${componentName}" slot "${slot}" references "${motionValue}" which is CSS runtime. Component slot motion must reference JS presets.`);
|
|
42
|
-
resolvedMotion[slot] = {
|
|
43
|
-
initial: preset.initial,
|
|
44
|
-
animate: preset.animate,
|
|
45
|
-
exit: preset.exit,
|
|
46
|
-
transition: preset.transition,
|
|
47
|
-
whileHover: preset.whileHover,
|
|
48
|
-
whileTap: preset.whileTap
|
|
49
|
-
};
|
|
50
|
-
} else if (isSlotMotionConfigObject(motionValue)) resolvedMotion[slot] = motionValue;
|
|
51
|
-
}
|
|
52
|
-
if (Object.keys(resolvedMotion).length > 0) resolved[componentName] = {
|
|
53
|
-
...componentConfig,
|
|
54
|
-
...strippedBase !== void 0 && { base: strippedBase },
|
|
55
|
-
motion: resolvedMotion
|
|
56
|
-
};
|
|
57
|
-
else resolved[componentName] = {
|
|
58
|
-
...componentConfig,
|
|
59
|
-
...strippedBase !== void 0 && { base: strippedBase }
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
return resolved;
|
|
63
|
-
}
|
|
64
|
-
/** Set of all style prop names — variant axis names must not collide with these */
|
|
65
|
-
const stylePropNames = new Set(Object.keys(propMappings));
|
|
66
|
-
/**
|
|
67
|
-
* Validate that component variant axis names don't collide with style prop names.
|
|
68
|
-
* When a collision exists, processStyleProps consumes the prop before variant
|
|
69
|
-
* classification can use it, silently breaking the variant.
|
|
70
|
-
*/
|
|
71
|
-
function validateComponentVariants(components) {
|
|
72
|
-
for (const [componentName, componentConfig] of Object.entries(components)) {
|
|
73
|
-
if (!componentConfig.variants) continue;
|
|
74
|
-
for (const axisName of Object.keys(componentConfig.variants)) if (stylePropNames.has(axisName)) throw new Error(`Component "${componentName}" has a variant axis named "${axisName}" which collides with the style prop "${axisName}". Style props are consumed before variant classification, so this variant will never be applied. Rename the variant axis to avoid the collision.`);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
//#endregion
|
|
78
|
-
export { buildMotionReference, resolveComponentMotionAliases, validateComponentVariants };
|