@brightspot/ui 1.11.0 → 3.0.1-cms-ui-migration.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/components/action-bar/ActionBar.d.ts +1 -1
- package/dist/components/action-bar/ActionBar.js +7 -7
- package/dist/components/action-bar/ActionBar.js.map +1 -1
- package/dist/components/action-bar/ActionItem.d.ts +5 -5
- package/dist/components/action-bar/ActionItem.d.ts.map +1 -1
- package/dist/components/action-bar/ActionItem.js +13 -13
- package/dist/components/action-bar/ActionItem.js.map +1 -1
- package/dist/components/avatar/AvatarGroup.d.ts +3 -0
- package/dist/components/avatar/AvatarGroup.d.ts.map +1 -1
- package/dist/components/avatar/AvatarGroup.js +3 -0
- package/dist/components/avatar/AvatarGroup.js.map +1 -1
- package/dist/components/badge/Badge.d.ts +3 -1
- package/dist/components/badge/Badge.d.ts.map +1 -1
- package/dist/components/badge/Badge.js +2 -0
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts +138 -0
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -0
- package/dist/components/button-group/ButtonGroup.js +436 -0
- package/dist/components/button-group/ButtonGroup.js.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +107 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.js +224 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/circular-progress/CircularProgress.d.ts +2 -2
- package/dist/components/circular-progress/CircularProgress.js +2 -2
- package/dist/components/copy-to-clipboard/CopyToClipboard.d.ts +7 -2
- package/dist/components/copy-to-clipboard/CopyToClipboard.d.ts.map +1 -1
- package/dist/components/copy-to-clipboard/CopyToClipboard.js +10 -5
- package/dist/components/copy-to-clipboard/CopyToClipboard.js.map +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +5 -5
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/Dropdown.js +11 -16
- package/dist/components/dropdown/Dropdown.js.map +1 -1
- package/dist/components/dropdown/DropdownItem.d.ts +14 -6
- package/dist/components/dropdown/DropdownItem.d.ts.map +1 -1
- package/dist/components/dropdown/DropdownItem.js +21 -15
- package/dist/components/dropdown/DropdownItem.js.map +1 -1
- package/dist/components/dropdown/DropdownMenu.d.ts +4 -4
- package/dist/components/dropdown/DropdownMenu.d.ts.map +1 -1
- package/dist/components/dropdown/DropdownMenu.js +6 -6
- package/dist/components/dropdown/DropdownMenu.js.map +1 -1
- package/dist/components/empty-state/EmptyState.css +4 -0
- package/dist/components/empty-state/EmptyState.d.ts +103 -0
- package/dist/components/empty-state/EmptyState.d.ts.map +1 -0
- package/dist/components/empty-state/EmptyState.js +209 -0
- package/dist/components/empty-state/EmptyState.js.map +1 -0
- package/dist/components/icon/Icon.d.ts +23 -10
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +40 -9
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/icon-button/IconButton.d.ts +7 -21
- package/dist/components/icon-button/IconButton.d.ts.map +1 -1
- package/dist/components/icon-button/IconButton.js +12 -18
- package/dist/components/icon-button/IconButton.js.map +1 -1
- package/dist/components/linear-progress/LinearProgress.d.ts +2 -2
- package/dist/components/linear-progress/LinearProgress.js +2 -2
- package/dist/components/pagination/Pagination.js +10 -10
- package/dist/components/popover/Popover.d.ts +6 -0
- package/dist/components/popover/Popover.d.ts.map +1 -1
- package/dist/components/popover/Popover.js +6 -0
- package/dist/components/popover/Popover.js.map +1 -1
- package/dist/components/switch/Switch.d.ts +5 -1
- package/dist/components/switch/Switch.d.ts.map +1 -1
- package/dist/components/switch/Switch.js +10 -6
- package/dist/components/switch/Switch.js.map +1 -1
- package/dist/components/tabs/Tab.d.ts +4 -4
- package/dist/components/tabs/Tab.d.ts.map +1 -1
- package/dist/components/tabs/Tab.js +5 -5
- package/dist/components/tabs/Tab.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +3 -3
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +20 -20
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/upload/Upload.d.ts +157 -0
- package/dist/components/upload/Upload.d.ts.map +1 -0
- package/dist/components/upload/Upload.js +538 -0
- package/dist/components/upload/Upload.js.map +1 -0
- package/dist/components/upload/UploadItem.d.ts +73 -0
- package/dist/components/upload/UploadItem.d.ts.map +1 -0
- package/dist/components/upload/UploadItem.js +180 -0
- package/dist/components/upload/UploadItem.js.map +1 -0
- package/dist/components/widget/Widget.d.ts +1 -6
- package/dist/components/widget/Widget.d.ts.map +1 -1
- package/dist/components/widget/Widget.js +1 -6
- package/dist/components/widget/Widget.js.map +1 -1
- package/dist/custom-elements.json +7527 -2115
- package/dist/storybook/assets/{ActionBar.stories--nAeDC-G.js → ActionBar.stories-CXEvFUN5.js} +65 -65
- package/dist/storybook/assets/{ActionItem.stories-BHrGjk-P.js → ActionItem.stories-8-qQmVGz.js} +41 -41
- package/dist/storybook/assets/{Avatar.stories-Da-mRj6_.js → Avatar.stories-LOTCiTgV.js} +2 -2
- package/dist/storybook/assets/{AvatarGroup.stories-BQlaC_yl.js → AvatarGroup.stories-N17TVn4O.js} +5 -5
- package/dist/storybook/assets/{Badge.stories-DnVnOrnF.js → Badge.stories-2IRfk8Ri.js} +2 -2
- package/dist/storybook/assets/{Button-CFLAI1H9.js → Button-CQ2CjiFm.js} +1 -1
- package/dist/storybook/assets/{Button.stories-DxaBOjwv.js → Button.stories-DwyviUHj.js} +1 -1
- package/dist/storybook/assets/ButtonGroup.stories-D6nkkXxD.js +588 -0
- package/dist/storybook/assets/{Celebrate.stories-CuMm15Nr.js → Celebrate.stories-DtKNptXA.js} +7 -7
- package/dist/storybook/assets/Checkbox.stories--fetKLgV.js +141 -0
- package/dist/storybook/assets/{CircularProgress.stories-DRN8Mtvj.js → CircularProgress.stories-vK3MWdEg.js} +7 -7
- package/dist/storybook/assets/{ClipboardMixin.stories-DR7Ou2Av.js → ClipboardMixin.stories-BXOX2e9A.js} +31 -28
- package/dist/storybook/assets/{Color-6BZIO3FS-Die62Y0Z.js → Color-6BZIO3FS-DIO6ExZa.js} +1 -1
- package/dist/storybook/assets/{Colors.stories-bIq_ssbI.js → Colors.stories-Z-o0Dmyi.js} +1 -1
- package/dist/storybook/assets/{CombinedEffects.stories-CtKzOUZn.js → CombinedEffects.stories-BIvRmEL2.js} +33 -33
- package/dist/storybook/assets/{ComponentStatesMixin-DMLCk9fE.js → ComponentStatesMixin-BeLIKOsg.js} +1 -1
- package/dist/storybook/assets/{ComponentStatesMixin.stories-D8UI9o-d.js → ComponentStatesMixin.stories-u03jgLUU.js} +3 -3
- package/dist/storybook/assets/{CopyToClipboard.stories-ti6CpJNp.js → CopyToClipboard.stories-D23guAYu.js} +16 -16
- package/dist/storybook/assets/{Debounce.stories-DzZUSvbk.js → Debounce.stories-Bz3JaQJY.js} +9 -9
- package/dist/storybook/assets/{DocsRenderer-LL677BLK-CIRGv5IX.js → DocsRenderer-LL677BLK-CaEKjMeC.js} +3 -3
- package/dist/storybook/assets/{Dropdown.stories-Lt4cY0Re.js → Dropdown.stories-CNxtx8UX.js} +60 -60
- package/dist/storybook/assets/EmptyState.stories-Ck5T6q1T.js +318 -0
- package/dist/storybook/assets/{Events.stories-B1ddcgpT.js → Events.stories-Cx10pvVB.js} +1 -1
- package/dist/storybook/assets/{Heading.stories-DI4w61cf.js → Heading.stories-mbkSoA5r.js} +1 -1
- package/dist/storybook/assets/{HueRipple.stories-DjhoxxEw.js → HueRipple.stories-B-DDviMh.js} +11 -11
- package/dist/storybook/assets/Icon.stories-Dodo1jjZ.js +441 -0
- package/dist/storybook/assets/{IconButton.stories-KjN28hfc.js → IconButton.stories-eAU6vNiX.js} +126 -146
- package/dist/storybook/assets/{LinearProgress.stories-DcIpdz6R.js → LinearProgress.stories-BqAUCgwy.js} +7 -7
- package/dist/storybook/assets/{Pagination.stories-BBkLEwoP.js → Pagination.stories-CVK8mlEU.js} +6 -6
- package/dist/storybook/assets/{Popover.stories-DLv48c2h.js → Popover.stories-CC2R-jiv.js} +33 -62
- package/dist/storybook/assets/ReadyMixin-CAkCCAOH.js +1 -0
- package/dist/storybook/assets/{RovingTabindexMixin.stories-BWaFx9mu.js → RovingTabindexMixin.stories-Dgm5izU_.js} +6 -6
- package/dist/storybook/assets/{Rtc.stories-Ve7Bwo_l.js → Rtc.stories-D9uVCq71.js} +3 -3
- package/dist/storybook/assets/{ScrollShadow.stories-C6XmrRLm.js → ScrollShadow.stories-D5GJ6Zes.js} +2 -2
- package/dist/storybook/assets/{Switch.stories-Cf8WM1LG.js → Switch.stories-D7HV0v6i.js} +21 -21
- package/dist/storybook/assets/{Tab.stories-CEtdEtOx.js → Tab.stories-CwHBngmO.js} +33 -33
- package/dist/storybook/assets/{Tabs.stories-CIAO1bPO.js → Tabs.stories-D87ILflp.js} +2 -2
- package/dist/storybook/assets/{Throttle.stories-BqxVIb-r.js → Throttle.stories-C13Vl7yt.js} +10 -10
- package/dist/storybook/assets/{Tooltip.stories-B6fw6875.js → Tooltip.stories-BRmAKppC.js} +2 -2
- package/dist/storybook/assets/Upload.stories-CvceXasD.js +447 -0
- package/dist/storybook/assets/UploadItem.stories-BF6c7tVM.js +167 -0
- package/dist/storybook/assets/{Welcome.stories-CfJtSM19.js → Welcome.stories-Ciht_H8A.js} +1 -1
- package/dist/storybook/assets/{Widget.stories-CiOho7lO.js → Widget.stories-30UYw1gn.js} +13 -13
- package/dist/storybook/assets/{WithTooltip-65CFNBJE-PGcopp73.js → WithTooltip-65CFNBJE-Q8AG_oZS.js} +1 -1
- package/dist/storybook/assets/{blocks-dP2DwISI.js → blocks-DIrsUt2U.js} +5 -5
- package/dist/storybook/assets/{formatter-EIJCOSYU-CZSAC3tg.js → formatter-EIJCOSYU-BcNb3EA1.js} +1 -1
- package/dist/storybook/assets/if-defined-C1_PRAyA.js +1 -0
- package/dist/storybook/assets/iframe-BgFj0b5u.css +1 -0
- package/dist/storybook/assets/{iframe-DloIUNZz.js → iframe-D5Uwm8Zd.js} +191 -191
- package/dist/storybook/assets/{index-DKF0ypu5.js → index-BOlx3-q7.js} +1 -1
- package/dist/storybook/assets/{onFind-C0l4Gew0.js → onFind-Cp2DO8R2.js} +1 -1
- package/dist/storybook/assets/{onFind.stories-DOTt9puO.js → onFind.stories-BDK06xaW.js} +53 -77
- package/dist/storybook/assets/{onRemove.stories-CQ9ZC5dm.js → onRemove.stories-TSKvqih3.js} +6 -10
- package/dist/storybook/assets/{onVisible.stories-Cbj5_Vz0.js → onVisible.stories-DiOPobn8.js} +3 -3
- package/dist/storybook/assets/{style-map-DLXysq3r.js → style-map-Cy6U2K_U.js} +1 -1
- package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-Bjjbl9ca.js → syntaxhighlighter-ED5Y7EFY-NNCQVsSv.js} +1 -1
- package/dist/storybook/box-illustration.svg +51 -0
- package/dist/storybook/cloud-illustration.svg +49 -0
- package/dist/storybook/docs-illustration.svg +92 -0
- package/dist/storybook/iframe.html +3 -3
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/tailwind-plugin-badge.js +1 -1
- package/dist/tailwind-plugin-badge.ts +1 -1
- package/dist/tailwind-plugin-button-group.d.ts +2 -0
- package/dist/tailwind-plugin-button-group.d.ts.map +1 -0
- package/dist/tailwind-plugin-button-group.js +215 -0
- package/dist/tailwind-plugin-button-group.js.map +1 -0
- package/dist/tailwind-plugin-button-group.ts +238 -0
- package/dist/tailwind-plugin-button.js +1 -1
- package/dist/tailwind-plugin-button.ts +1 -1
- package/dist/tailwind-plugin-checkbox.d.ts +2 -0
- package/dist/tailwind-plugin-checkbox.d.ts.map +1 -0
- package/dist/tailwind-plugin-checkbox.js +246 -0
- package/dist/tailwind-plugin-checkbox.js.map +1 -0
- package/dist/tailwind-plugin-checkbox.ts +281 -0
- package/dist/tailwind-plugin-empty-state.d.ts +2 -0
- package/dist/tailwind-plugin-empty-state.d.ts.map +1 -0
- package/dist/tailwind-plugin-empty-state.js +113 -0
- package/dist/tailwind-plugin-empty-state.js.map +1 -0
- package/dist/tailwind-plugin-empty-state.ts +124 -0
- package/dist/tailwind-plugin-icon.js +122 -18
- package/dist/tailwind-plugin-icon.js.map +1 -1
- package/dist/tailwind-plugin-icon.ts +131 -18
- package/dist/tailwind-plugin-loader.js +3 -3
- package/dist/tailwind-plugin-loader.ts +3 -3
- package/dist/tailwind-plugin-tabs.js +7 -0
- package/dist/tailwind-plugin-tabs.js.map +1 -1
- package/dist/tailwind-plugin-tabs.ts +7 -0
- package/dist/tailwind-plugin-upload.d.ts +2 -0
- package/dist/tailwind-plugin-upload.d.ts.map +1 -0
- package/dist/tailwind-plugin-upload.js +322 -0
- package/dist/tailwind-plugin-upload.js.map +1 -0
- package/dist/tailwind-plugin-upload.ts +362 -0
- package/dist/tailwind.config.d.ts.map +1 -1
- package/dist/tailwind.config.js +1 -0
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.ts +1 -0
- package/dist/util/ClipboardMixin.d.ts +7 -2
- package/dist/util/ClipboardMixin.d.ts.map +1 -1
- package/dist/util/ClipboardMixin.js +15 -13
- package/dist/util/ClipboardMixin.js.map +1 -1
- package/dist/util/ComponentStatesMixin.d.ts +2 -1
- package/dist/util/ComponentStatesMixin.d.ts.map +1 -1
- package/dist/util/ComponentStatesMixin.js +4 -0
- package/dist/util/ComponentStatesMixin.js.map +1 -1
- package/dist/util/EventEmitterMixin.d.ts +42 -4
- package/dist/util/EventEmitterMixin.d.ts.map +1 -1
- package/dist/util/EventEmitterMixin.js +5 -2
- package/dist/util/EventEmitterMixin.js.map +1 -1
- package/dist/util/ProgressMixin.d.ts +9 -2
- package/dist/util/ProgressMixin.d.ts.map +1 -1
- package/dist/util/ProgressMixin.js +22 -18
- package/dist/util/ProgressMixin.js.map +1 -1
- package/dist/util/RovingTabindexMixin.d.ts +8 -0
- package/dist/util/RovingTabindexMixin.d.ts.map +1 -1
- package/dist/util/RovingTabindexMixin.js +8 -8
- package/dist/util/RovingTabindexMixin.js.map +1 -1
- package/dist/util/TetherLayout.d.ts.map +1 -1
- package/dist/util/TetherLayout.js +3 -0
- package/dist/util/TetherLayout.js.map +1 -1
- package/dist/util/TooltipMixin.d.ts.map +1 -1
- package/dist/util/TooltipMixin.js +5 -4
- package/dist/util/TooltipMixin.js.map +1 -1
- package/dist/util/upload.d.ts +53 -0
- package/dist/util/upload.d.ts.map +1 -0
- package/dist/util/upload.js +113 -0
- package/dist/util/upload.js.map +1 -0
- package/docs/adr/0001-retire-cms-ui-package-fold-under-src-legacy.md +78 -0
- package/docs/adr/0002-yarn-workspaces-preserve-cms-ui-deps.md +130 -0
- package/docs/adr/0003-bundle-equivalence-as-fold-acceptance-criterion.md +286 -0
- package/docs/components/ActionBar.md +6 -0
- package/docs/components/ActionItem.md +52 -27
- package/docs/components/Avatar.md +42 -12
- package/docs/components/AvatarGroup.md +4 -3
- package/docs/components/Badge.md +13 -1
- package/docs/components/ButtonGroup.md +91 -0
- package/docs/components/Checkbox.md +91 -0
- package/docs/components/CircularProgress.md +41 -12
- package/docs/components/CopyToClipboard.md +13 -11
- package/docs/components/Dropdown.md +44 -19
- package/docs/components/DropdownItem.md +39 -26
- package/docs/components/DropdownMenu.md +9 -9
- package/docs/components/EmptyState.md +75 -0
- package/docs/components/Icon.md +22 -14
- package/docs/components/IconButton.md +46 -21
- package/docs/components/LinearProgress.md +43 -4
- package/docs/components/Pagination.md +11 -10
- package/docs/components/Popover.md +16 -0
- package/docs/components/README.md +5 -0
- package/docs/components/Switch.md +21 -16
- package/docs/components/Tab.md +8 -2
- package/docs/components/Tabs.md +8 -0
- package/docs/components/Upload.md +112 -0
- package/docs/components/UploadItem.md +61 -0
- package/docs/components/Widget.md +12 -6
- package/package.json +9 -5
- package/src/legacy/tool-ui/src/main/webapp/dist/011a678e3efe41981754.png +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/1173.080a90c5923854fc48e6.js +2 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/1173.080a90c5923854fc48e6.js.LICENSE.txt +10 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/194137260531ee29a5f2.svg +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/1946.156c6821383df2638492.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/1950.3594aaa4f20df28f39d9.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/1e8408af1a34bdf61457.png +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/2111.3956b5196a514b2c0131.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/2111.a937b0cafa8cf7c039d2.css +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/2129.6b044e5564dd3dbb2f94.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/2314.420883b6638f35f40e70.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/2456.5bcfb782c2ec27de32ed.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/2537.e8f1359bedd328bf57f4.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/2565.4ca31a6a46de85cd3b31.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/270.3011484ff80f3093083a.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/2825.c1342ac2662d11fd4125.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/2947.f96d21c44c05980974ef.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/3532.c358dfbb2cde0f802c7f.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/3543.2d704cf9e170322468e7.js +2 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/3543.2d704cf9e170322468e7.js.LICENSE.txt +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/3611.61837ffa933f74502094.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/3790.74b7037d430ed0a47d0c.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/3995.afbec58662cafb46ec2c.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4017.c3ed1ca3be18b5c080c8.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4093.152620c022c3013502b7.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4114.57fe159e416e716f8cbc.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4168.a224af7c5c5f6f2ddd7b.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4374.37147747a254da8f5f8a.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4450.16dd5684292fd0a7ea7f.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4478.93f64e6a6ccb35a6c6d4.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/44b38a404dec4643c46b.png +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4582.243dbaa3d8a8648f6f40.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4709.4f6b707e225e481a928e.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4790.10d75f7c7f8e54ce83a1.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4795.034ebc93a67b7a3d6536.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4850.6b944738520f69c98070.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/4a4ee777ddc0d4cedee4.png +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5001.a61ae5608398d5d98ab1.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5030.1e8b82e1444067d492b1.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5055.620ccb3717b4a6427f09.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5098.33613009827cfc80aafb.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5385.6656501b67424994820b.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5598.d84773ca53126661bdca.js +2 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5598.d84773ca53126661bdca.js.LICENSE.txt +11 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5617.c81ecb679371ca302f1f.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5718.449113ae2463a3bb8a83.js +2 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/5718.449113ae2463a3bb8a83.js.LICENSE.txt +8 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/6047.291dd2d4b3f79be2c64d.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/6086.7ca02b827506f29db590.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/6216.cf8adc1990ee1111f065.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/6497.b7d8dcbf0e7c8d8d538d.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/6565.0e5abc3bd344c53ae154.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7033.4cd6efbe12e7aaa35745.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7202.1e5b8f21215ea6eae20a.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7361.793163ca71dfac69d9eb.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/75.e45c9aec6e7409bfe21d.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7524.2990be869cf0a2988d17.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7554.bb243c1fb06a125f6353.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7718.a937b0cafa8cf7c039d2.css +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7718.f5996ddd99f2353c7785.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7741.0b2789c4e783af835763.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7769.d47f40cc83035fc2392a.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7863.2a1d1fd229778a47e10b.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/7923.8a92f55de8387f7a8a35.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/8684.7171c731d38a9873d6df.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/8752.3d02a0f42ec39786fdf0.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/8897.bfeed19f2a4acbb6d67c.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/8934.e90ceca8169fc25e4e1b.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/9277.88b2d89b3ba1c24e7f93.js +2 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/9277.88b2d89b3ba1c24e7f93.js.LICENSE.txt +9 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/9360.bb0352313d610cae11de.js +2 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/9360.bb0352313d610cae11de.js.LICENSE.txt +33 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/9561.64eab18c8c1bbc4ad8ec.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/9576.174d6a99544d17e7416d.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/983.eedba1cd484aa5bee0c4.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/Appetizeio.185641211f7c0e42a455.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/CISpectrum.74db7dc80b3a6797a167.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/Chart.223ea4ee9e3e32b67a26.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/ChartCompat.4dd096dd030942227ec6.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/CodeMirror.5ddffe054374f883d6f8.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/ImageEditor.14e3b3035666436f53a5.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/LocationMap.72a510c0f5ff236f596e.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/RTEProseMirror.7561297911cca56da5dd.js +500 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/RTEProseMirror.7561297911cca56da5dd.js.LICENSE.txt +8 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/RegionMap.63f3b2303ab369a05073.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/TimedContent.4bb4dc83ffbe4019dd7b.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/VideoEditor.11c89dda5cf125738a33.js +2 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/VideoEditor.11c89dda5cf125738a33.js.LICENSE.txt +23 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/c6e9c007f41bd4d26c20.png +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/iframeResizer.contentWindow.map +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/iframeResizer.contentWindow.min.js +2 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/iframeResizer.contentWindow.min.js.LICENSE.txt +7 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/lucide.woff2 +0 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/preview.d46d98e5ca9dba0a0f5a.js +1 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/v4.63bc3566a89786faeb89.js +92 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/v4.63bc3566a89786faeb89.js.LICENSE.txt +71 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/v4.a6f53058dbb04a69aa5c.css +3 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.5e3fdf0f0b20b4e3c170.css +5 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.702238fcabd666eba152.js +92 -0
- package/src/legacy/tool-ui/src/main/webapp/dist/v5.702238fcabd666eba152.js.LICENSE.txt +78 -0
- package/dist/storybook/assets/Icon.stories-CpziAhae.js +0 -264
- package/dist/storybook/assets/ReadyMixin-Cw2Dfbu2.js +0 -1
- package/dist/storybook/assets/if-defined-B1RdczOE.js +0 -1
- package/dist/storybook/assets/iframe-bJgLXZKK.css +0 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { l10n } from './i18n.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validate a File against an `accept` attribute string, matching the HTML
|
|
4
|
+
* `<input accept>` attribute format. Client-side filter only — server-side
|
|
5
|
+
* validation is still required.
|
|
6
|
+
*
|
|
7
|
+
* Supported forms (comma-separated, any combination):
|
|
8
|
+
* - `image/*` — MIME wildcard (any image)
|
|
9
|
+
* - `application/pdf` — exact MIME type
|
|
10
|
+
* - `.pdf`, `.docx` — file extension (case-insensitive)
|
|
11
|
+
*
|
|
12
|
+
* Examples:
|
|
13
|
+
* - `matchesAccept(file, "image/*")` — any image
|
|
14
|
+
* - `matchesAccept(file, "image/*,application/pdf")` — images and PDFs
|
|
15
|
+
* - `matchesAccept(file, ".jpg,.jpeg,.png,.heic")` — specific extensions
|
|
16
|
+
* - `matchesAccept(file, "")` — allow all (returns true)
|
|
17
|
+
*
|
|
18
|
+
* Note: users can bypass the file picker's filter (most browsers offer an
|
|
19
|
+
* "All Files" option), so this function is a UX filter, not a security
|
|
20
|
+
* boundary.
|
|
21
|
+
*/
|
|
22
|
+
export function matchesAccept(file, accept) {
|
|
23
|
+
if (!accept || !accept.trim())
|
|
24
|
+
return true;
|
|
25
|
+
const types = accept
|
|
26
|
+
.split(',')
|
|
27
|
+
.map(t => t.trim().toLowerCase())
|
|
28
|
+
.filter(Boolean);
|
|
29
|
+
const fileMime = file.type.toLowerCase();
|
|
30
|
+
const fileName = file.name.toLowerCase();
|
|
31
|
+
return types.some(type => {
|
|
32
|
+
if (type.startsWith('.')) {
|
|
33
|
+
return fileName.endsWith(type);
|
|
34
|
+
}
|
|
35
|
+
if (type.endsWith('/*')) {
|
|
36
|
+
const category = type.slice(0, type.indexOf('/'));
|
|
37
|
+
return fileMime.startsWith(category + '/');
|
|
38
|
+
}
|
|
39
|
+
return fileMime === type;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Validate a File's size against a maximum byte limit.
|
|
44
|
+
* Returns false if file exceeds `maxSize` bytes.
|
|
45
|
+
* Returns true if `maxSize` is 0 (unlimited).
|
|
46
|
+
*/
|
|
47
|
+
export function validateFileSize(file, maxSize) {
|
|
48
|
+
if (maxSize <= 0)
|
|
49
|
+
return true;
|
|
50
|
+
return file.size <= maxSize;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve a MIME type to a Lucide icon symbol name.
|
|
54
|
+
*
|
|
55
|
+
* Mappings:
|
|
56
|
+
* - `image/*` → `'image'`
|
|
57
|
+
* - `video/*` → `'film'`
|
|
58
|
+
* - `audio/*` → `'music'`
|
|
59
|
+
* - document types → `'file'`
|
|
60
|
+
* - everything else → `'upload-cloud'`
|
|
61
|
+
*/
|
|
62
|
+
export function resolveFileSymbol(mimeType) {
|
|
63
|
+
if (!mimeType)
|
|
64
|
+
return 'upload-cloud';
|
|
65
|
+
const mime = mimeType.toLowerCase();
|
|
66
|
+
if (mime.startsWith('image/'))
|
|
67
|
+
return 'image';
|
|
68
|
+
if (mime.startsWith('video/'))
|
|
69
|
+
return 'film';
|
|
70
|
+
if (mime.startsWith('audio/'))
|
|
71
|
+
return 'music';
|
|
72
|
+
if (mime.startsWith('text/') ||
|
|
73
|
+
mime === 'application/pdf' ||
|
|
74
|
+
mime === 'application/msword' ||
|
|
75
|
+
mime.startsWith('application/vnd.openxmlformats')) {
|
|
76
|
+
return 'file';
|
|
77
|
+
}
|
|
78
|
+
return 'upload-cloud';
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Format a byte count to a human-readable file size string.
|
|
82
|
+
*
|
|
83
|
+
* Output format: `"200 KB"`, `"4.2 MB"`, `"16 MB"`, `"1.3 GB"`
|
|
84
|
+
* Uses `l10n()` for unit labels.
|
|
85
|
+
*
|
|
86
|
+
* Thresholds:
|
|
87
|
+
* - 0 bytes → `"< 1 KB"`
|
|
88
|
+
* - < 1 KB → `"< 1 KB"` (sub-KB files render the same)
|
|
89
|
+
* - < 1 MB → whole number KB
|
|
90
|
+
* - < 1 GB → one decimal MB
|
|
91
|
+
* - >= 1 GB → one decimal GB
|
|
92
|
+
*/
|
|
93
|
+
export function formatFileSize(bytes) {
|
|
94
|
+
const KB = 1024;
|
|
95
|
+
const MB = KB * 1024;
|
|
96
|
+
const GB = MB * 1024;
|
|
97
|
+
if (bytes < KB) {
|
|
98
|
+
return l10n('upload', 'sizeSubKB', '< 1 KB');
|
|
99
|
+
}
|
|
100
|
+
if (bytes < MB) {
|
|
101
|
+
const kb = Math.round(bytes / KB);
|
|
102
|
+
return `${kb} ${l10n('upload', 'unitKB', 'KB')}`;
|
|
103
|
+
}
|
|
104
|
+
if (bytes < GB) {
|
|
105
|
+
const mb = bytes / MB;
|
|
106
|
+
const formatted = mb >= 10 ? Math.round(mb).toString() : mb.toFixed(1);
|
|
107
|
+
return `${formatted} ${l10n('upload', 'unitMB', 'MB')}`;
|
|
108
|
+
}
|
|
109
|
+
const gb = bytes / GB;
|
|
110
|
+
const formatted = gb >= 10 ? Math.round(gb).toString() : gb.toFixed(1);
|
|
111
|
+
return `${formatted} ${l10n('upload', 'unitGB', 'GB')}`;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=upload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../src/util/upload.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# 1. Retire `@brightspot/cms-ui`; fold cms-ui under `@brightspot/ui` `src/legacy/tool-ui/`
|
|
2
|
+
|
|
3
|
+
Date: 2026-05-18
|
|
4
|
+
Status: Accepted
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
The earlier migration plan (Phases 0–2, committed on branch `feat/cms-ui-migration`)
|
|
9
|
+
extracted brightspot's `cms/tool-ui/` frontend into a new npm sub-package
|
|
10
|
+
`@brightspot/cms-ui` at `cms/`, registered with release-please as a separate
|
|
11
|
+
track, with brightspot's gradle wrapper consuming it via `yarn link`. Phase 4
|
|
12
|
+
(Vite swap) was attempted then reverted on 2026-05-13. `@brightspot/cms-ui@0.1.0`
|
|
13
|
+
was scaffolded in-repo but was **never published to npm**.
|
|
14
|
+
|
|
15
|
+
Maintaining two npm packages for two related code surfaces has cost: separate
|
|
16
|
+
release-please track, separate `cms-ui/v*` tag stream, separate CI publish
|
|
17
|
+
flow, separate `package.json` to maintain, separate `yarn link` target for the
|
|
18
|
+
brightspot consumer. The cms-ui surface is also slated for retirement
|
|
19
|
+
short-term (cms-ui's v4 entry is on a removal path; v5 will eventually follow
|
|
20
|
+
or be rewritten in the modern stack).
|
|
21
|
+
|
|
22
|
+
## Decision
|
|
23
|
+
|
|
24
|
+
- Retire the `@brightspot/cms-ui` npm package name. Drop its release-please
|
|
25
|
+
track. Never publish it.
|
|
26
|
+
- Move the cms-ui source tree to `src/legacy/tool-ui/` inside the
|
|
27
|
+
`@brightspot/ui` repo.
|
|
28
|
+
- `@brightspot/ui` becomes the single published npm package for both the
|
|
29
|
+
modern design-system surface (`dist/`) and the legacy cms-ui webpack output
|
|
30
|
+
(`src/legacy/tool-ui/src/main/webapp/dist/`).
|
|
31
|
+
- The directory marker `legacy` is load-bearing — tooling carve-outs (tsc,
|
|
32
|
+
storybook, conventions, prettier, root eslint) scope around `src/legacy/**`.
|
|
33
|
+
|
|
34
|
+
## Consequences
|
|
35
|
+
|
|
36
|
+
### Positive
|
|
37
|
+
|
|
38
|
+
- One published artifact. Consumers pull one tarball. The brightspot consumer's
|
|
39
|
+
`yarn link` target changes from `@brightspot/cms-ui` to `@brightspot/ui`,
|
|
40
|
+
but the file paths it reads stay structurally similar.
|
|
41
|
+
- One release-please track. No more `cms-ui/v*` tag stream, no separate
|
|
42
|
+
publish step.
|
|
43
|
+
- `@brightspot/cms-ui` was never on npm, so retirement is free —
|
|
44
|
+
no deprecation, no migration period.
|
|
45
|
+
- `cms-ui/` retirement when v4 (and eventually v5) leaves becomes a directory
|
|
46
|
+
delete, not a package deprecation.
|
|
47
|
+
|
|
48
|
+
### Negative
|
|
49
|
+
|
|
50
|
+
- `@brightspot/ui` 3.x consumers who never touch cms-ui still pull a tarball
|
|
51
|
+
with the legacy webpack output. Bloat is temporary — disappears as v4/v5
|
|
52
|
+
retire.
|
|
53
|
+
- Any commit touching `src/legacy/tool-ui/` drives `@brightspot/ui` version
|
|
54
|
+
bumps. CHANGELOG includes cms-ui entries during the retirement window.
|
|
55
|
+
Acceptable given the limited duration.
|
|
56
|
+
- Forced dep convergence at install time for some packages
|
|
57
|
+
(TypeScript, prettier, tailwindcss, Lit) — addressed by ADR-0002 via yarn
|
|
58
|
+
workspaces.
|
|
59
|
+
|
|
60
|
+
### Cross-repo follow-on
|
|
61
|
+
|
|
62
|
+
- `brightspot/cms/tool-ui/build-css.mjs` updates its file-read path from
|
|
63
|
+
`node_modules/@brightspot/cms-ui/legacy/tool-ui/src/main/webapp/dist/`
|
|
64
|
+
to `node_modules/@brightspot/ui/src/legacy/tool-ui/src/main/webapp/dist/`.
|
|
65
|
+
- `brightspot/cms/tool-ui/package.json` declares `@brightspot/ui` as the
|
|
66
|
+
consumer dep (yarn-linked during HITL, registry dep at publish time).
|
|
67
|
+
|
|
68
|
+
## Alternatives considered
|
|
69
|
+
|
|
70
|
+
1. **Keep two packages, source under one repo.** Source moves but release-please
|
|
71
|
+
still cuts both. Rejected — preserves two release streams and two CHANGELOGs
|
|
72
|
+
for code on a retirement path; the cost we want to remove stays.
|
|
73
|
+
2. **Subpath export (`@brightspot/ui/cms`).** Rejected — the brightspot
|
|
74
|
+
consumer reads files via filesystem in `build-css.mjs`, not via ESM imports.
|
|
75
|
+
`exports` subpaths don't add value for this consumption pattern.
|
|
76
|
+
3. **Leave cms-ui at `cms/` as today.** Rejected — the user wants the source
|
|
77
|
+
under `src/` for navigability and as a step toward eventual integration with
|
|
78
|
+
the modern surface.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# 2. Use a postinstall hook (not yarn workspaces, not dep convergence) to preserve cms-ui's pin set
|
|
2
|
+
|
|
3
|
+
Date: 2026-05-18
|
|
4
|
+
Status: Accepted
|
|
5
|
+
|
|
6
|
+
> **Revision note (2026-05-18, mid-fold)**: Originally accepted as
|
|
7
|
+
> "use yarn workspaces." Reversed during commit #3 implementation after
|
|
8
|
+
> discovering yarn 1's workspaces require `"private": true` on the host
|
|
9
|
+
> project, which would block `npm publish` on `@brightspot/ui` without
|
|
10
|
+
> a publish-pipeline overhaul (clean-publish swap or
|
|
11
|
+
> prepack/postpack lifecycle gymnastics). The independent-install
|
|
12
|
+
> approach below achieves the same goal (preserve cms-ui's pin set with
|
|
13
|
+
> zero cross-contamination) without touching the publish pipeline.
|
|
14
|
+
|
|
15
|
+
## Context
|
|
16
|
+
|
|
17
|
+
ADR-0001 folds cms-ui under `@brightspot/ui`'s `src/legacy/tool-ui/`. The two
|
|
18
|
+
codebases have meaningfully different dep stacks:
|
|
19
|
+
|
|
20
|
+
| Dep | `@brightspot/ui` root | cms-ui (today's `cms/`) |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| TypeScript | 5.9.3 | ^4.7.3 |
|
|
23
|
+
| Lit | ^3.3.0 | ^2.2.6 |
|
|
24
|
+
| Prettier | ^3.2.5 (8.x in practice) | 3.2.5 (pinned via `resolutions`) |
|
|
25
|
+
| Tailwindcss | peer ^3.4.x (19.x in practice) | 3.4.13 (pinned via `resolutions`) |
|
|
26
|
+
| `@brightspot/ui` | n/a (self) | 1.2.0 (legacy tailwind preset source) |
|
|
27
|
+
| Module type | `"type": "module"` (ESM) | unset (commonjs default) |
|
|
28
|
+
|
|
29
|
+
These cannot share a single hoisted `node_modules` without breaking either the
|
|
30
|
+
modern surface (downgrading Lit/TS) or bundle equivalence with brightspot's
|
|
31
|
+
production tool-ui build (the acceptance criterion in ADR-0003 requires
|
|
32
|
+
byte-identical webpack inputs).
|
|
33
|
+
|
|
34
|
+
## Decision
|
|
35
|
+
|
|
36
|
+
- `src/legacy/tool-ui/` is a **standalone yarn-1 subproject** with its own
|
|
37
|
+
`package.json` (`"private": true`), `yarn.lock`, and `node_modules` tree.
|
|
38
|
+
- The workspace `package.json` mirrors today's `cms/package.json` (same deps,
|
|
39
|
+
same `resolutions`, no `"type"` field so it defaults to commonjs).
|
|
40
|
+
- Root `package.json` has a `postinstall` script that runs
|
|
41
|
+
`cd src/legacy/tool-ui && yarn install`, so a single root `yarn install`
|
|
42
|
+
produces both installs in sequence.
|
|
43
|
+
- The published `@brightspot/ui` tarball includes the workspace's webpack
|
|
44
|
+
output via the root `files` field; the workspace `package.json` itself
|
|
45
|
+
is not in the tarball.
|
|
46
|
+
- Build orchestration: root `yarn build` stays modern-only (preserves design-
|
|
47
|
+
system iteration speed). `prepack` extends to also invoke
|
|
48
|
+
`cd src/legacy/tool-ui && yarn build`, so any `npm pack` / publish always
|
|
49
|
+
contains both surfaces.
|
|
50
|
+
- Local cms-ui dev story is preserved: `cd src/legacy/tool-ui && yarn build`
|
|
51
|
+
works identically to today's `cd cms/legacy/tool-ui && yarn build`, minus
|
|
52
|
+
the `cd` shim Phase 1 had to add.
|
|
53
|
+
|
|
54
|
+
## Consequences
|
|
55
|
+
|
|
56
|
+
### Positive
|
|
57
|
+
|
|
58
|
+
- Bundle equivalence is achievable (see ADR-0003) because cms-ui's exact
|
|
59
|
+
toolchain (TS 4.7, Lit 2.2.6, babel, webpack 5, loaders) is preserved at
|
|
60
|
+
install time. Module resolution from `src/legacy/tool-ui/` walks the local
|
|
61
|
+
`node_modules` first and finds the pinned versions.
|
|
62
|
+
- ESM/commonjs isolation comes for free: each project has its own
|
|
63
|
+
`package.json` and `node_modules`.
|
|
64
|
+
- No publish-pipeline changes needed. `@brightspot/ui` stays unprivate; CI's
|
|
65
|
+
bare `npm publish` continues to work.
|
|
66
|
+
- `@brightspot/ui@1.2.0` (the legacy tailwind preset source) installs cleanly
|
|
67
|
+
into the workspace's `node_modules/@brightspot/ui/` from the npm registry —
|
|
68
|
+
no self-reference conflict with the host project, since yarn workspace
|
|
69
|
+
semantics aren't engaged.
|
|
70
|
+
- cms-ui's local-dev workflow is unchanged (slightly cleaner — drops the
|
|
71
|
+
Phase 1 `cd legacy/tool-ui &&` script prefix once commit #4 lands).
|
|
72
|
+
- Future retirement is a directory delete + remove the postinstall hook,
|
|
73
|
+
not a complex unwind.
|
|
74
|
+
|
|
75
|
+
### Negative
|
|
76
|
+
|
|
77
|
+
- Two `package.json` files in the repo (root + workspace). Slight cognitive
|
|
78
|
+
overhead vs a single converged manifest. Mitigation: workspace `package.json`
|
|
79
|
+
is structurally a near-copy of today's `cms/package.json`, so it's not new
|
|
80
|
+
surface.
|
|
81
|
+
- Two `yarn.lock` files (root + workspace). Same arrangement as Phase 1 had
|
|
82
|
+
pre-fold; no new burden.
|
|
83
|
+
- Two `node_modules` trees. The ~12 deps that genuinely overlap between root
|
|
84
|
+
and workspace (loglevel, tabbable, broadcast-channel, uuid, webpack,
|
|
85
|
+
ts-node, css-loader, mini-css-extract-plugin, postcss-import, postcss-loader,
|
|
86
|
+
style-loader, webpack-cli, webpack-merge) install in both. Disk overhead
|
|
87
|
+
~100MB, dwarfed by cms-ui's own heavy deps.
|
|
88
|
+
- Root `yarn install` becomes slower (cms-ui's heavy install runs too).
|
|
89
|
+
Mitigation: matches Phase 1's pre-fold total cost; design-system contributors
|
|
90
|
+
who never edit cms-ui still incur it. Acceptable for the retirement window.
|
|
91
|
+
- Workspace deps aren't visible to `yarn workspace <name> <cmd>` ergonomics
|
|
92
|
+
(those commands need yarn workspaces). Mitigation: `cd src/legacy/tool-ui &&
|
|
93
|
+
yarn <cmd>` works fine — matches Phase 1.
|
|
94
|
+
- The webpack `nodeModulesPath` in `src/legacy/tool-ui/webpack.common.ts` —
|
|
95
|
+
used to resolve vendored static assets like `lucide-static` and
|
|
96
|
+
`iframe-resizer` — must point at `src/legacy/tool-ui/node_modules`.
|
|
97
|
+
Verified empirically in commit #4.
|
|
98
|
+
|
|
99
|
+
## Alternatives considered
|
|
100
|
+
|
|
101
|
+
1. **Yarn 1 workspaces (originally accepted, then reversed).**
|
|
102
|
+
Hits the `"private": true` constraint on the host project. Would require:
|
|
103
|
+
- Adding `"private": true` to `@brightspot/ui`'s root, AND
|
|
104
|
+
- Reworking CI's `npm publish` step (clean-publish, prepack swap, or
|
|
105
|
+
two-file `package.json` / `package.publish.json` pattern).
|
|
106
|
+
|
|
107
|
+
Yarn 1 workspaces' main benefit — hoisting deps shared by root and
|
|
108
|
+
workspace — would save ~100MB of disk for ~12 deps. The cost of the
|
|
109
|
+
publish-pipeline rework outweighs that gain for retirement-pending code.
|
|
110
|
+
Rejected.
|
|
111
|
+
|
|
112
|
+
2. **Yarn 4 / Yarn Berry / pnpm workspaces.**
|
|
113
|
+
Yarn 4 doesn't require host-project `"private": true` for workspaces.
|
|
114
|
+
Migrating the repo away from yarn 1 is a worthwhile initiative but
|
|
115
|
+
explicitly out of scope for this fold. Tracked separately if cms-ui
|
|
116
|
+
retirement timeline extends.
|
|
117
|
+
|
|
118
|
+
3. **Converge to brightspot-ui's modern pins; fix what breaks.**
|
|
119
|
+
Rejected. Lit 2 → Lit 3 emit-byte differences would cascade through
|
|
120
|
+
every v5 module. Bundle equivalence becomes unachievable; confidence
|
|
121
|
+
relies on functional/Playwright testing only.
|
|
122
|
+
|
|
123
|
+
4. **Aliased dual install (`lit` + `lit-2`).**
|
|
124
|
+
Rejected. Requires rewriting hundreds of `import … from 'lit'` statements
|
|
125
|
+
in cms-ui source to `'lit-2'`. Bytes diverge anyway because import
|
|
126
|
+
specifiers differ. Cost without the benefit.
|
|
127
|
+
|
|
128
|
+
5. **cms-ui's pins win at root (no subproject).**
|
|
129
|
+
Rejected. Downgrades `@brightspot/ui`'s modern stack (Storybook 10,
|
|
130
|
+
vitest 4, Lit 3 features in use today) — regression on the stable surface.
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# 3. Bundle equivalence as the fold's acceptance criterion
|
|
2
|
+
|
|
3
|
+
Date: 2026-05-18
|
|
4
|
+
Status: Accepted (with near-equivalence revision)
|
|
5
|
+
|
|
6
|
+
> **Revision note (2026-05-18, end of fold):** Strict 100% bundle
|
|
7
|
+
> equivalence is **not achievable** without reverting Phase 1's
|
|
8
|
+
> package.json deviations (which would re-break the workspace as a
|
|
9
|
+
> standalone subproject). Final state after commit #6's verify run
|
|
10
|
+
> shows targeted, harmless divergences:
|
|
11
|
+
>
|
|
12
|
+
> - `core-js`: workspace 3.49.0 vs golden 3.36.0 (workspace's fresh
|
|
13
|
+
> `yarn install` resolved this transitive differently from brightspot's
|
|
14
|
+
> lockfile). Causes ~150 extra/missing core-js polyfill modules in the
|
|
15
|
+
> stats diff and downstream license-sidecar content drift on `v4.js`
|
|
16
|
+
> and `v5.js`. Polyfill semantics are identical for the
|
|
17
|
+
> browsers cms-ui targets; the diff is purely byte-level.
|
|
18
|
+
> - `iframeResizer.contentWindow.min.js`: byte diff between the two
|
|
19
|
+
> `iframe-resizer@4.3.8` installations. Same functional content.
|
|
20
|
+
> - `v5.css`: ~5 KB diff (~0.1%) downstream of the core-js shift through
|
|
21
|
+
> babel polyfill inclusion. The brightspot Java content extraction
|
|
22
|
+
> (commit #5) closed the original 153 `\!frame` selectors gap that was
|
|
23
|
+
> the headline Phase 1 divergence.
|
|
24
|
+
>
|
|
25
|
+
> The verify script (commit #6) ships as a one-shot diagnostic, not a
|
|
26
|
+
> CI gate. Future cms-ui changes will drift further; bundle equivalence
|
|
27
|
+
> stops being a useful signal once intentional changes accumulate. The
|
|
28
|
+
> brightspot consumer's correctness depends on the same v3-era babel +
|
|
29
|
+
> webpack toolchain and the same runtime semantics, both preserved.
|
|
30
|
+
|
|
31
|
+
## Context
|
|
32
|
+
|
|
33
|
+
The fold (ADR-0001) relocates cms-ui from `cms/legacy/tool-ui/` to
|
|
34
|
+
`src/legacy/tool-ui/` and replaces the separate `@brightspot/cms-ui` npm
|
|
35
|
+
package with a yarn-workspace surface inside `@brightspot/ui` (ADR-0002).
|
|
36
|
+
|
|
37
|
+
The cms-ui webpack output is consumed downstream by brightspot's gradle
|
|
38
|
+
wrapper (`brightspot/cms/tool-ui/build-css.mjs`), which reads JS bundles
|
|
39
|
+
off disk, passes them through to the running CMS, and regenerates CSS
|
|
40
|
+
locally with brightspot's Java content paths visible (Phase 2 commit
|
|
41
|
+
`afa31ba572a`). The browser runs whatever webpack emitted.
|
|
42
|
+
|
|
43
|
+
The user's stated top concern for the fold is confidence that the post-fold
|
|
44
|
+
build is **backward-compatible with brightspot's currently-running production
|
|
45
|
+
tool-ui build**. The most trustworthy signal for that, available without
|
|
46
|
+
standing up a Playwright matrix, is byte-equivalence of the emitted webpack
|
|
47
|
+
bundles.
|
|
48
|
+
|
|
49
|
+
Phase 1's `verify-bundle-equivalence.mjs` measured cms-ui (built from `cms/`)
|
|
50
|
+
against brightspot's pre-migration tool-ui at SHA `28876f4e9f6` and reported
|
|
51
|
+
99.96% module-source match: **2450/2451 module sources byte-identical,
|
|
52
|
+
1/4 CSS chunks byte-identical**. Both divergences (1 module + 3 CSS chunks)
|
|
53
|
+
trace to the same cause: tailwind's `content:` paths in
|
|
54
|
+
`tailwind.config.ts` point at 16 brightspot Java sources via `../../cms/db/.../CmsTool.java`-
|
|
55
|
+
style relative paths. From brightspot's own `cms/tool-ui/` those files resolve;
|
|
56
|
+
from cms-ui's location in brightspot-ui they don't, so tailwind silently
|
|
57
|
+
skips them, fewer utilities are generated, and the entry module that
|
|
58
|
+
imports the resulting CSS chunk diverges.
|
|
59
|
+
|
|
60
|
+
## Stale-dist self-perpetuation (2026-05-18 finding)
|
|
61
|
+
|
|
62
|
+
During initial golden generation we discovered that cms-ui's webpack build
|
|
63
|
+
emits **different `v5.css` bytes depending on prior `dist/` state**, even with
|
|
64
|
+
identical source, lockfile, and node_modules.
|
|
65
|
+
|
|
66
|
+
Root cause: `clean-webpack-plugin` v4 runs its `cleanOnceBeforeBuildPatterns`
|
|
67
|
+
in webpack's `emit` hook — **after** tailwind's PostCSS pass has already
|
|
68
|
+
scanned content. Tailwind's `content:` glob `./src/**/*.css` matches
|
|
69
|
+
`src/main/webapp/dist/*.css`, so the *previous* build's emitted CSS gets
|
|
70
|
+
re-scanned, and class candidates inside it (orphan selectors like
|
|
71
|
+
`.btu-button-current` that no source file references anymore) get re-emitted
|
|
72
|
+
into the new build. The cycle is self-perpetuating: once a class enters
|
|
73
|
+
`v5.css`, it stays.
|
|
74
|
+
|
|
75
|
+
Two stable build modes result:
|
|
76
|
+
|
|
77
|
+
| Mode | Hash at SHA `28876f4e9f6` | What it represents |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| **Cold** | `v5.8acae93faec68b445941.css` | Fresh build with empty `dist/`. What clean CI runs produce. |
|
|
80
|
+
| **Warm** | `v5.b665f7f237580883575e.css` | Build with prior `dist/` present. What ran locally during ongoing development. Includes ~12+ orphan rules (~5KB). |
|
|
81
|
+
|
|
82
|
+
Both are deterministic given their starting state. JS bundles (`v4.js`, `v5.js`,
|
|
83
|
+
`preview.js`) and `v4.css` are byte-identical across modes — only `v5.css`
|
|
84
|
+
differs. Orphans don't affect rendering (no DOM uses them) but they
|
|
85
|
+
materially affect bundle-equivalence comparisons.
|
|
86
|
+
|
|
87
|
+
This is **a latent bug in cms-ui's webpack pipeline**, independent of the
|
|
88
|
+
fold. A clean fix (e.g., switching CleanWebpackPlugin to run in `beforeRun`,
|
|
89
|
+
or excluding `dist/` from tailwind's content glob) is tracked as a follow-on
|
|
90
|
+
to the fold itself.
|
|
91
|
+
|
|
92
|
+
For the fold we **capture both goldens** and defer the cold-vs-warm
|
|
93
|
+
selection to comparison time, once we have evidence on what brightspot's
|
|
94
|
+
production CI actually emits.
|
|
95
|
+
|
|
96
|
+
## Decision
|
|
97
|
+
|
|
98
|
+
The fold is "done" when **the post-fold build matches the chosen golden
|
|
99
|
+
(cold or warm — see "Stale-dist self-perpetuation" above) at 100%** across
|
|
100
|
+
the script's gated buckets:
|
|
101
|
+
|
|
102
|
+
| Bucket | Target |
|
|
103
|
+
|---|---|
|
|
104
|
+
| Module source bodies | 100% (after path normalization) |
|
|
105
|
+
| Static-copy assets | 100% byte (`lucide.woff2`, `iframeResizer.contentWindow.min.js`, `iframeResizer.contentWindow.map`) |
|
|
106
|
+
| License sidecars — named-entry | 100% content (v4/v5/preview) |
|
|
107
|
+
| License sidecars — chunk-numbered | content set equal (renumbering tolerated) |
|
|
108
|
+
| CSS chunks | 100% byte (after hash strip) |
|
|
109
|
+
|
|
110
|
+
The script's overall pass criterion is **all of the above with zero
|
|
111
|
+
mismatches** — the same `ok = …` predicate Phase 1's script already
|
|
112
|
+
enforces. We are no longer accepting Phase 1's "1 module + 3 CSS chunks"
|
|
113
|
+
as documented exceptions; we resolve them.
|
|
114
|
+
|
|
115
|
+
### Resolving the Java content visibility
|
|
116
|
+
|
|
117
|
+
Both Phase 1 divergences resolve when tailwind sees the 16 Java content
|
|
118
|
+
paths. The fold uses **pre-extraction into the existing
|
|
119
|
+
`src/legacy/tool-ui/src/additional-tailwind-classes.txt`** (currently 62
|
|
120
|
+
lines, listing utilities tailwind's content scanner can't otherwise detect).
|
|
121
|
+
|
|
122
|
+
Process during the fold:
|
|
123
|
+
|
|
124
|
+
1. From brightspot at SHA `28876f4e9f6`, run tailwind against the 16 Java
|
|
125
|
+
files in isolation and capture the set of utilities generated.
|
|
126
|
+
Equivalent procedure: scan the 16 Java files with the same regex tailwind
|
|
127
|
+
uses for content extraction and capture the candidate class strings.
|
|
128
|
+
2. Append the resulting class list to
|
|
129
|
+
`src/legacy/tool-ui/src/additional-tailwind-classes.txt`, deduplicated.
|
|
130
|
+
3. Delete the 16 Java content paths from
|
|
131
|
+
`src/legacy/tool-ui/tailwind.config.ts` (they don't resolve from the new
|
|
132
|
+
location anyway). The text file is now the single source of truth.
|
|
133
|
+
4. Re-run the fold's webpack build. Diff against the brightspot golden via
|
|
134
|
+
`verify-bundle-equivalence.mjs`. Expect 100%.
|
|
135
|
+
|
|
136
|
+
Drift management: if the brightspot platform team adds a new tailwind
|
|
137
|
+
utility in those Java files, the cms-ui side must regenerate. A
|
|
138
|
+
regeneration script (one of the fold's deliverables) supports this.
|
|
139
|
+
|
|
140
|
+
### Golden workflow — dual capture
|
|
141
|
+
|
|
142
|
+
Both goldens are captured during fold validation. The cold-vs-warm
|
|
143
|
+
selection happens at comparison time, informed by what brightspot's CI
|
|
144
|
+
actually emits.
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# 1. Cold golden — fresh worktree, no prior dist
|
|
148
|
+
cd ~/work/brightspot
|
|
149
|
+
git worktree add .worktrees/cms-ui-golden 28876f4e9f6
|
|
150
|
+
cd .worktrees/cms-ui-golden/cms/tool-ui && yarn install
|
|
151
|
+
npx webpack --config webpack.build.ts --json > /tmp/build-stats-source-cold.json
|
|
152
|
+
cp -R src/main/webapp/dist /tmp/cms-ui-golden-cold
|
|
153
|
+
|
|
154
|
+
# 2. Warm golden — same worktree, the cold dist now seeds tailwind's
|
|
155
|
+
# scan for the next build
|
|
156
|
+
npx webpack --config webpack.build.ts --json > /tmp/build-stats-source-warm.json
|
|
157
|
+
cp -R src/main/webapp/dist /tmp/cms-ui-golden-warm
|
|
158
|
+
|
|
159
|
+
# 3. Build the fold candidate
|
|
160
|
+
cd ~/work/brightspot-ui
|
|
161
|
+
git checkout <fold-branch>
|
|
162
|
+
yarn install
|
|
163
|
+
yarn workspace <legacy-workspace-name> build --json > /tmp/build-stats-target.json
|
|
164
|
+
|
|
165
|
+
# 4. Compare against COLD first
|
|
166
|
+
node scripts/verify-bundle-equivalence.mjs \
|
|
167
|
+
/tmp/build-stats-source-cold.json \
|
|
168
|
+
/tmp/build-stats-target.json \
|
|
169
|
+
/tmp/cms-ui-golden-cold \
|
|
170
|
+
src/legacy/tool-ui/src/main/webapp/dist
|
|
171
|
+
|
|
172
|
+
# 5. If cold passes: done. If cold fails and brightspot CI builds warm,
|
|
173
|
+
# rerun against warm:
|
|
174
|
+
node scripts/verify-bundle-equivalence.mjs \
|
|
175
|
+
/tmp/build-stats-source-warm.json \
|
|
176
|
+
/tmp/build-stats-target.json \
|
|
177
|
+
/tmp/cms-ui-golden-warm \
|
|
178
|
+
src/legacy/tool-ui/src/main/webapp/dist
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Acceptance: script exits 0 against the **chosen golden** (cold or warm).
|
|
182
|
+
Any non-zero exit is investigated and root-caused before merge.
|
|
183
|
+
|
|
184
|
+
### CI build state — investigated 2026-05-18
|
|
185
|
+
|
|
186
|
+
**Brightspot CI builds COLD.** The cold golden is production-faithful.
|
|
187
|
+
|
|
188
|
+
Evidence from brightspot's `.github/workflows/ci.yml`:
|
|
189
|
+
|
|
190
|
+
- `actions/checkout@v4` with `fetch-depth: 0` (line 28–30): every CI run
|
|
191
|
+
starts from a fresh git working tree. No persistence of `cms/tool-ui/src/main/webapp/dist/`
|
|
192
|
+
between runs.
|
|
193
|
+
- `gradle/actions/setup-gradle@v4` with `cache-read-only` flag (line 38–41):
|
|
194
|
+
caches `~/.gradle/caches`, not the project working tree. Read-write on
|
|
195
|
+
`release/*`, read-only on PRs.
|
|
196
|
+
- `./gradlew build` (line 49): drives `:cms-tool-ui:yarnBuild`.
|
|
197
|
+
|
|
198
|
+
`cms/tool-ui/build.gradle` at SHA `28876f4e9f6`:
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
task yarnBuild(type: YarnTask) {
|
|
202
|
+
outputs.dir 'src/main/webapp/dist'
|
|
203
|
+
outputs.cacheIf { true }
|
|
204
|
+
args = ['build']
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Behavior:
|
|
209
|
+
|
|
210
|
+
- **Cache hit** — gradle restores `src/main/webapp/dist/` from the gradle
|
|
211
|
+
build cache and **skips** the yarn build entirely. Webpack does not run.
|
|
212
|
+
The restored bytes are whatever the most recent cache-pushing run emitted.
|
|
213
|
+
- **Cache miss** — gradle invokes the task. `yarn build` runs against a
|
|
214
|
+
fresh checkout's empty `src/main/webapp/dist/`. **Cold build.**
|
|
215
|
+
|
|
216
|
+
The cache is populated by builds on `release/*` branches (the only ones with
|
|
217
|
+
write access). The first build at any given input-hash set is a cache miss
|
|
218
|
+
on a fresh checkout — therefore cold. Subsequent cache hits restore that
|
|
219
|
+
cold output. Cold propagates; warm cannot enter the cache without manual
|
|
220
|
+
intervention (which would require pre-existing `dist/` in a fresh checkout,
|
|
221
|
+
impossible by construction).
|
|
222
|
+
|
|
223
|
+
**Implication for the fold:** the cold golden (`v5.8acae93faec68b445941.css`)
|
|
224
|
+
is the production-faithful baseline. The warm golden's orphan classes are a
|
|
225
|
+
local-dev quirk and do not reach production. We retain the warm capture for
|
|
226
|
+
diagnostic purposes only.
|
|
227
|
+
|
|
228
|
+
**Stale-dist follow-on:** the underlying tailwind/clean-webpack-plugin
|
|
229
|
+
ordering bug should be fixed independently of the fold, so future cms-ui
|
|
230
|
+
builds become deterministic regardless of prior `dist/` state.
|
|
231
|
+
|
|
232
|
+
### Ongoing CI gate
|
|
233
|
+
|
|
234
|
+
**Bundle equivalence is a one-time fold validation, not an ongoing CI
|
|
235
|
+
gate.** Once the fold lands, intentional cms-ui changes will drift from
|
|
236
|
+
brightspot's pinned SHA, and the comparison becomes stale. Future
|
|
237
|
+
correctness depends on workspace-local Playwright tests and brightspot
|
|
238
|
+
consumer smoke.
|
|
239
|
+
|
|
240
|
+
### Adjacent acceptance criteria (non-bundle)
|
|
241
|
+
|
|
242
|
+
1. **Modern surface integrity** — root `yarn build`, `yarn check:conventions`,
|
|
243
|
+
`yarn build-storybook`, `yarn test:storybook` all pass; `npm pack --dry-run`
|
|
244
|
+
from root contains both `dist/**` and `src/legacy/tool-ui/src/main/webapp/dist/**`.
|
|
245
|
+
2. **Consumer end-to-end** — `yarn link @brightspot/ui` from brightspot's
|
|
246
|
+
`cms/tool-ui/` succeeds; `./gradlew :cms-tool-ui:yarnBuild` runs cleanly;
|
|
247
|
+
docker at `https://localhost:8080/cms/` serves v4 + v5 with zero console
|
|
248
|
+
errors; ProseMirror RTE loads; manual smoke (login → dashboard → create
|
|
249
|
+
content) passes.
|
|
250
|
+
3. **Workspace-local dev** — `cd src/legacy/tool-ui && yarn build|server:local|test|lint:*`
|
|
251
|
+
all succeed.
|
|
252
|
+
|
|
253
|
+
## Consequences
|
|
254
|
+
|
|
255
|
+
### Positive
|
|
256
|
+
|
|
257
|
+
- Production-faithful confidence: the fold output matches what brightspot
|
|
258
|
+
ships today, byte for byte across all gated buckets.
|
|
259
|
+
- Single source of truth for tailwind-classes-not-in-source moves to the
|
|
260
|
+
text file; eliminates dead-weight Java content paths in `tailwind.config.ts`.
|
|
261
|
+
- Phase 1's verify machinery is reusable — restored from history, pointed at
|
|
262
|
+
the brightspot-built golden.
|
|
263
|
+
|
|
264
|
+
### Negative
|
|
265
|
+
|
|
266
|
+
- Drift maintenance: if brightspot's Java files gain new tailwind utilities,
|
|
267
|
+
someone has to regenerate the text file. Mitigation: a regeneration script
|
|
268
|
+
ships with the fold; platform-team awareness needed for new utility usage.
|
|
269
|
+
- Heavier golden generation: requires a brightspot checkout and build, not
|
|
270
|
+
just an in-repo build. One-time per validator.
|
|
271
|
+
|
|
272
|
+
## Alternatives considered
|
|
273
|
+
|
|
274
|
+
1. **Build golden in brightspot-ui (Option Y).** Both pre-fold and post-fold
|
|
275
|
+
built in brightspot-ui's repo, where Java paths don't resolve. 100%
|
|
276
|
+
achievable trivially, but the bar is "match the package we're retiring"
|
|
277
|
+
rather than "match brightspot's actual production output." Rejected on
|
|
278
|
+
production-fidelity grounds.
|
|
279
|
+
2. **Accept Phase 1's 99.96% as the bar.** Rejected — the user explicitly
|
|
280
|
+
asked for 100%. Resolvable via the Java-extraction step at one-time cost.
|
|
281
|
+
3. **Build-time extraction via `BRIGHTSPOT_REPO_PATH` env var.** Higher
|
|
282
|
+
fidelity (always in sync with brightspot's current Java) but adds a
|
|
283
|
+
build-step dependency. Rejected for fold-time simplicity in favor of
|
|
284
|
+
pre-extraction; can revisit if drift becomes painful.
|
|
285
|
+
4. **Build cms-ui from inside brightspot (invert Phase 2).** Most faithful
|
|
286
|
+
but heavy coupling. Rejected.
|
|
@@ -27,6 +27,12 @@
|
|
|
27
27
|
| `label` | | `string` | `''` | Accessible label for the toolbar region. | |
|
|
28
28
|
| `compact` | | `boolean` | `false` | Enables progressive label compacting. When space shrinks, items marked
\`compactable\` (with icons) have their labels hidden one-by-one
from least to most important before items overflow into "More". | |
|
|
29
29
|
|
|
30
|
+
### Methods
|
|
31
|
+
|
|
32
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
33
|
+
| ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | --------- | ----------------- |
|
|
34
|
+
| `emit` | | Dispatches a type-safe CustomEvent with standardized configuration.

All events are configured with:
- bubbles: true (event propagates up the DOM tree)
- cancelable: false (event cannot be cancelled)
- composed: true (event crosses shadow DOM boundaries) | `type: K, detail: UnpackCustomEvent<CustomEventMap[K]>` | `boolean` | EventEmitterMixin |
|
|
35
|
+
|
|
30
36
|
### Events
|
|
31
37
|
|
|
32
38
|
| Name | Type | Description | Inherited From |
|