@cratis/scene.primereact 3.1.0 → 3.3.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/cjs/button/PrimeButton.js.map +1 -1
- package/dist/cjs/button/PrimeButtonGroup.js.map +1 -1
- package/dist/cjs/button/PrimeSpeedDial.js.map +1 -1
- package/dist/cjs/button/PrimeSplitButton.js.map +1 -1
- package/dist/cjs/button/SplitButton.js.map +1 -1
- package/dist/cjs/data/Column.js.map +1 -1
- package/dist/cjs/data/Pagination.js.map +1 -1
- package/dist/cjs/data/PrimeColumn.js.map +1 -1
- package/dist/cjs/data/PrimeDataTable.js.map +1 -1
- package/dist/cjs/data/PrimeDataView.js.map +1 -1
- package/dist/cjs/data/PrimeOrderList.js.map +1 -1
- package/dist/cjs/data/PrimeOrganizationChart.js.map +1 -1
- package/dist/cjs/data/PrimePaginator.js.map +1 -1
- package/dist/cjs/data/PrimePickList.js.map +1 -1
- package/dist/cjs/data/PrimeTimeline.js.map +1 -1
- package/dist/cjs/data/PrimeTree.js.map +1 -1
- package/dist/cjs/data/columnDefinitions.js.map +1 -1
- package/dist/cjs/data/primeTreeNodes.js.map +1 -1
- package/dist/cjs/data/selectOptions.js.map +1 -1
- package/dist/cjs/form/PrimeAutoComplete.js.map +1 -1
- package/dist/cjs/form/PrimeCalendar.js.map +1 -1
- package/dist/cjs/form/PrimeCheckbox.js.map +1 -1
- package/dist/cjs/form/PrimeChips.js.map +1 -1
- package/dist/cjs/form/PrimeColorPicker.js.map +1 -1
- package/dist/cjs/form/PrimeDropdown.js.map +1 -1
- package/dist/cjs/form/PrimeFloatLabel.js.map +1 -1
- package/dist/cjs/form/PrimeIconField.js.map +1 -1
- package/dist/cjs/form/PrimeInputNumber.js.map +1 -1
- package/dist/cjs/form/PrimeInputText.js.map +1 -1
- package/dist/cjs/form/PrimeInputTextarea.js.map +1 -1
- package/dist/cjs/form/PrimeKnob.js.map +1 -1
- package/dist/cjs/form/PrimeListBox.js.map +1 -1
- package/dist/cjs/form/PrimeMultiSelect.js.map +1 -1
- package/dist/cjs/form/PrimePassword.js.map +1 -1
- package/dist/cjs/form/PrimeRadioButton.js.map +1 -1
- package/dist/cjs/form/PrimeRating.js.map +1 -1
- package/dist/cjs/form/PrimeSelectButton.js.map +1 -1
- package/dist/cjs/form/PrimeSlider.js.map +1 -1
- package/dist/cjs/form/PrimeToggleSwitch.js.map +1 -1
- package/dist/cjs/form/PrimeTreeSelect.js.map +1 -1
- package/dist/cjs/form/TreeSelect.js.map +1 -1
- package/dist/cjs/media/Image.js.map +1 -1
- package/dist/cjs/media/PrimeCarousel.js.map +1 -1
- package/dist/cjs/media/PrimeGalleria.js.map +1 -1
- package/dist/cjs/media/PrimeImage.js.map +1 -1
- package/dist/cjs/menu/Dock.js.map +1 -1
- package/dist/cjs/menu/DockPosition.js.map +1 -1
- package/dist/cjs/menu/MegaMenu.js.map +1 -1
- package/dist/cjs/menu/MenuItemAction.js.map +1 -1
- package/dist/cjs/menu/MenuItemContent.js.map +1 -1
- package/dist/cjs/menu/Menubar.js.map +1 -1
- package/dist/cjs/menu/PanelMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeBreadcrumb.js.map +1 -1
- package/dist/cjs/menu/PrimeContextMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeDock.js.map +1 -1
- package/dist/cjs/menu/PrimeMegaMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeMenubar.js.map +1 -1
- package/dist/cjs/menu/PrimePanelMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeSteps.js.map +1 -1
- package/dist/cjs/menu/PrimeTabMenu.js.map +1 -1
- package/dist/cjs/menu/PrimeTieredMenu.js.map +1 -1
- package/dist/cjs/menu/Steps.js.map +1 -1
- package/dist/cjs/menu/TabMenu.js.map +1 -1
- package/dist/cjs/menu/TieredMenu.js.map +1 -1
- package/dist/cjs/menuItems.js.map +1 -1
- package/dist/cjs/messages/PrimeInlineMessage.js.map +1 -1
- package/dist/cjs/messages/PrimeMessage.js.map +1 -1
- package/dist/cjs/messages/PrimeToast.js.map +1 -1
- package/dist/cjs/misc/BlockUI.js.map +1 -1
- package/dist/cjs/misc/PrimeAvatar.js.map +1 -1
- package/dist/cjs/misc/PrimeBadge.js.map +1 -1
- package/dist/cjs/misc/PrimeBlockUI.js.map +1 -1
- package/dist/cjs/misc/PrimeChip.js.map +1 -1
- package/dist/cjs/misc/PrimeInplace.js.map +1 -1
- package/dist/cjs/misc/PrimeProgressBar.js.map +1 -1
- package/dist/cjs/misc/PrimeProgressSpinner.js.map +1 -1
- package/dist/cjs/misc/PrimeScrollTop.js.map +1 -1
- package/dist/cjs/misc/PrimeSkeleton.js.map +1 -1
- package/dist/cjs/misc/PrimeTag.js.map +1 -1
- package/dist/cjs/misc/PrimeTerminal.js.map +1 -1
- package/dist/cjs/misc/ScrollTop.js.map +1 -1
- package/dist/cjs/overlay/ConfirmDialog.js.map +1 -1
- package/dist/cjs/overlay/PrimeConfirmDialog.js.map +1 -1
- package/dist/cjs/overlay/PrimeDialog.js.map +1 -1
- package/dist/cjs/overlay/PrimeOverlayPanel.js.map +1 -1
- package/dist/cjs/overlay/PrimeSidebar.js.map +1 -1
- package/dist/cjs/overlay/PrimeTooltip.js.map +1 -1
- package/dist/cjs/panel/PrimeAccordion.js.map +1 -1
- package/dist/cjs/panel/PrimeCard.js.map +1 -1
- package/dist/cjs/panel/PrimeDivider.js.map +1 -1
- package/dist/cjs/panel/PrimeFieldset.js.map +1 -1
- package/dist/cjs/panel/PrimePanel.js.map +1 -1
- package/dist/cjs/panel/PrimeScrollPanel.js.map +1 -1
- package/dist/cjs/panel/PrimeSplitter.js.map +1 -1
- package/dist/cjs/panel/PrimeStepper.js.map +1 -1
- package/dist/cjs/panel/PrimeTabView.js.map +1 -1
- package/dist/cjs/panel/PrimeToolbar.js.map +1 -1
- package/dist/cjs/primeReactComponents.js.map +1 -1
- package/dist/cjs/primeReactPackage.js.map +1 -1
- package/dist/cjs/properties.js.map +1 -1
- package/dist/cjs/screen/PrimeAction.js.map +1 -1
- package/dist/cjs/screen/PrimeField.js.map +1 -1
- package/dist/cjs/screen/PrimeSection.js.map +1 -1
- package/dist/cjs/screen/PrimeSummary.js.map +1 -1
- package/dist/cjs/screen/PrimeText.js.map +1 -1
- package/dist/cjs/screen/PrimeTitle.js.map +1 -1
- package/dist/cjs/theme/PrimeReactThemeFamily.js.map +1 -1
- package/dist/cjs/theme/primeReactThemePreset.js.map +1 -1
- package/dist/cjs/theme/primeReactThemes.js.map +1 -1
- package/dist/cjs/theme/themePresets.js.map +1 -1
- package/dist/cjs/theme/usePrimeReactTheme.js.map +1 -1
- package/dist/cjs/treeNodes.js.map +1 -1
- package/dist/esm/button/PrimeButton.js.map +1 -1
- package/dist/esm/button/PrimeButtonGroup.js.map +1 -1
- package/dist/esm/button/PrimeSpeedDial.js.map +1 -1
- package/dist/esm/button/PrimeSplitButton.js.map +1 -1
- package/dist/esm/button/SplitButton.js.map +1 -1
- package/dist/esm/data/Column.js.map +1 -1
- package/dist/esm/data/Pagination.js.map +1 -1
- package/dist/esm/data/PrimeColumn.js.map +1 -1
- package/dist/esm/data/PrimeDataTable.js.map +1 -1
- package/dist/esm/data/PrimeDataView.js.map +1 -1
- package/dist/esm/data/PrimeOrderList.js.map +1 -1
- package/dist/esm/data/PrimeOrganizationChart.js.map +1 -1
- package/dist/esm/data/PrimePaginator.js.map +1 -1
- package/dist/esm/data/PrimePickList.js.map +1 -1
- package/dist/esm/data/PrimeTimeline.js.map +1 -1
- package/dist/esm/data/PrimeTree.js.map +1 -1
- package/dist/esm/data/columnDefinitions.js.map +1 -1
- package/dist/esm/data/primeTreeNodes.js.map +1 -1
- package/dist/esm/data/selectOptions.js.map +1 -1
- package/dist/esm/form/PrimeAutoComplete.js.map +1 -1
- package/dist/esm/form/PrimeCalendar.js.map +1 -1
- package/dist/esm/form/PrimeCheckbox.js.map +1 -1
- package/dist/esm/form/PrimeChips.js.map +1 -1
- package/dist/esm/form/PrimeColorPicker.js.map +1 -1
- package/dist/esm/form/PrimeDropdown.js.map +1 -1
- package/dist/esm/form/PrimeFloatLabel.js.map +1 -1
- package/dist/esm/form/PrimeIconField.js.map +1 -1
- package/dist/esm/form/PrimeInputNumber.js.map +1 -1
- package/dist/esm/form/PrimeInputText.js.map +1 -1
- package/dist/esm/form/PrimeInputTextarea.js.map +1 -1
- package/dist/esm/form/PrimeKnob.js.map +1 -1
- package/dist/esm/form/PrimeListBox.js.map +1 -1
- package/dist/esm/form/PrimeMultiSelect.js.map +1 -1
- package/dist/esm/form/PrimePassword.js.map +1 -1
- package/dist/esm/form/PrimeRadioButton.js.map +1 -1
- package/dist/esm/form/PrimeRating.js.map +1 -1
- package/dist/esm/form/PrimeSelectButton.js.map +1 -1
- package/dist/esm/form/PrimeSlider.js.map +1 -1
- package/dist/esm/form/PrimeToggleSwitch.js.map +1 -1
- package/dist/esm/form/PrimeTreeSelect.js.map +1 -1
- package/dist/esm/form/TreeSelect.js.map +1 -1
- package/dist/esm/media/Image.js.map +1 -1
- package/dist/esm/media/PrimeCarousel.js.map +1 -1
- package/dist/esm/media/PrimeGalleria.js.map +1 -1
- package/dist/esm/media/PrimeImage.js.map +1 -1
- package/dist/esm/menu/Dock.js.map +1 -1
- package/dist/esm/menu/DockPosition.js.map +1 -1
- package/dist/esm/menu/MegaMenu.js.map +1 -1
- package/dist/esm/menu/MenuItemAction.js.map +1 -1
- package/dist/esm/menu/MenuItemContent.js.map +1 -1
- package/dist/esm/menu/Menubar.js.map +1 -1
- package/dist/esm/menu/PanelMenu.js.map +1 -1
- package/dist/esm/menu/PrimeBreadcrumb.js.map +1 -1
- package/dist/esm/menu/PrimeContextMenu.js.map +1 -1
- package/dist/esm/menu/PrimeDock.js.map +1 -1
- package/dist/esm/menu/PrimeMegaMenu.js.map +1 -1
- package/dist/esm/menu/PrimeMenu.js.map +1 -1
- package/dist/esm/menu/PrimeMenubar.js.map +1 -1
- package/dist/esm/menu/PrimePanelMenu.js.map +1 -1
- package/dist/esm/menu/PrimeSteps.js.map +1 -1
- package/dist/esm/menu/PrimeTabMenu.js.map +1 -1
- package/dist/esm/menu/PrimeTieredMenu.js.map +1 -1
- package/dist/esm/menu/Steps.js.map +1 -1
- package/dist/esm/menu/TabMenu.js.map +1 -1
- package/dist/esm/menu/TieredMenu.js.map +1 -1
- package/dist/esm/menuItems.js.map +1 -1
- package/dist/esm/messages/PrimeInlineMessage.js.map +1 -1
- package/dist/esm/messages/PrimeMessage.js.map +1 -1
- package/dist/esm/messages/PrimeToast.js.map +1 -1
- package/dist/esm/misc/BlockUI.js.map +1 -1
- package/dist/esm/misc/PrimeAvatar.js.map +1 -1
- package/dist/esm/misc/PrimeBadge.js.map +1 -1
- package/dist/esm/misc/PrimeBlockUI.js.map +1 -1
- package/dist/esm/misc/PrimeChip.js.map +1 -1
- package/dist/esm/misc/PrimeInplace.js.map +1 -1
- package/dist/esm/misc/PrimeProgressBar.js.map +1 -1
- package/dist/esm/misc/PrimeProgressSpinner.js.map +1 -1
- package/dist/esm/misc/PrimeScrollTop.js.map +1 -1
- package/dist/esm/misc/PrimeSkeleton.js.map +1 -1
- package/dist/esm/misc/PrimeTag.js.map +1 -1
- package/dist/esm/misc/PrimeTerminal.js.map +1 -1
- package/dist/esm/misc/ScrollTop.js.map +1 -1
- package/dist/esm/overlay/ConfirmDialog.js.map +1 -1
- package/dist/esm/overlay/PrimeConfirmDialog.js.map +1 -1
- package/dist/esm/overlay/PrimeDialog.js.map +1 -1
- package/dist/esm/overlay/PrimeOverlayPanel.js.map +1 -1
- package/dist/esm/overlay/PrimeSidebar.js.map +1 -1
- package/dist/esm/overlay/PrimeTooltip.js.map +1 -1
- package/dist/esm/panel/PrimeAccordion.js.map +1 -1
- package/dist/esm/panel/PrimeCard.js.map +1 -1
- package/dist/esm/panel/PrimeDivider.js.map +1 -1
- package/dist/esm/panel/PrimeFieldset.js.map +1 -1
- package/dist/esm/panel/PrimePanel.js.map +1 -1
- package/dist/esm/panel/PrimeScrollPanel.js.map +1 -1
- package/dist/esm/panel/PrimeSplitter.js.map +1 -1
- package/dist/esm/panel/PrimeStepper.js.map +1 -1
- package/dist/esm/panel/PrimeTabView.js.map +1 -1
- package/dist/esm/panel/PrimeToolbar.js.map +1 -1
- package/dist/esm/primeReactComponents.js.map +1 -1
- package/dist/esm/primeReactPackage.js.map +1 -1
- package/dist/esm/properties.js.map +1 -1
- package/dist/esm/screen/PrimeAction.js.map +1 -1
- package/dist/esm/screen/PrimeField.js.map +1 -1
- package/dist/esm/screen/PrimeSection.js.map +1 -1
- package/dist/esm/screen/PrimeSummary.js.map +1 -1
- package/dist/esm/screen/PrimeText.js.map +1 -1
- package/dist/esm/screen/PrimeTitle.js.map +1 -1
- package/dist/esm/theme/PrimeReactThemeFamily.js.map +1 -1
- package/dist/esm/theme/primeReactThemePreset.js.map +1 -1
- package/dist/esm/theme/primeReactThemes.js.map +1 -1
- package/dist/esm/theme/themePresets.js.map +1 -1
- package/dist/esm/theme/usePrimeReactTheme.js.map +1 -1
- package/dist/esm/treeNodes.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeBreadcrumb.js","sources":["../../../menu/PrimeBreadcrumb.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Fragment, ReactNode } from 'react';\nimport { Breadcrumb } from 'primereact/breadcrumb';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { MenuItem } from '../MenuItem';\nimport { menuItemsProperty } from '../menuItems';\nimport { stringProperty } from '../properties';\nimport { MenuItemContent } from './MenuItemContent';\n\n/**\n * One entry in the trail, as the strongest thing the authored data supports.\n *\n * The three cases are genuinely different to assistive technology and only one of them is a link. Where\n * the user already is gets `Breadcrumb.Current`, which carries `aria-current=\"page\"` and is what tells a\n * screen reader the trail has ended - a trailing link says the opposite. An earlier entry that names a\n * target is a link. An earlier entry that names none is plain text, because an anchor with no `href` is\n * not focusable and only looks like a link.\n *\n * @param item The entry to render.\n * @param current Whether this is the last entry, and so where the user is now.\n * @returns The rendered entry.\n */\nfunction breadcrumbEntry(item: MenuItem, current: boolean): ReactNode {\n if (current) {\n return (\n <Breadcrumb.Current>\n <MenuItemContent item={item} />\n </Breadcrumb.Current>\n );\n }\n\n if (item.url === undefined) return <MenuItemContent item={item} />;\n\n return (\n <Breadcrumb.Link href={item.url}>\n <MenuItemContent item={item} />\n </Breadcrumb.Link>\n );\n}\n\n/**\n * The `PrimeReact:breadcrumb` component - the path to where the user currently is.\n *\n * The home entry is separate from the trail in the authored model, so it is read from its own `homeUrl`\n * property and always rendered as an icon.\n *\n * PrimeReact 11 replaced the single `BreadCrumb` component and its `model`/`home` props with a namespace\n * of parts, so the trail is assembled here. The parts are worth assembling rather than working around:\n * the root is a `nav` carrying an accessible name, the list is an ordered list, and every separator is\n * marked presentational so it is never read out as part of the path. The old `model` prop produced all of\n * that too, but only because the component decided it - none of it is something a hand-rolled trail would\n * reliably reproduce.\n */\nexport function PrimeBreadcrumb({ element }: RegisteredComponentProps) {\n const items = menuItemsProperty(element, 'items');\n\n return (\n <Breadcrumb.Root data-scene-id={element.id}>\n <Breadcrumb.List>\n <Breadcrumb.Item>\n <Breadcrumb.Link href={stringProperty(element, 'homeUrl', '/')} aria-label='Home'>\n <i className='pi pi-home' aria-hidden='true' />\n </Breadcrumb.Link>\n </Breadcrumb.Item>\n {items.map((item, index) => (\n <Fragment key={index}>\n <Breadcrumb.Separator>\n <i className='pi pi-angle-right' aria-hidden='true' />\n </Breadcrumb.Separator>\n <Breadcrumb.Item>{breadcrumbEntry(item, index === items.length - 1)}</Breadcrumb.Item>\n </Fragment>\n ))}\n </Breadcrumb.List>\n </Breadcrumb.Root>\n );\n}\n"],"names":["breadcrumbEntry","item","current","_jsx","Breadcrumb","Current","MenuItemContent","url","undefined","Link","href","PrimeBreadcrumb","element","items","menuItemsProperty","Root","data-scene-id","id","_jsxs","List","Item","stringProperty","aria-label","i","className","aria-hidden","map","index","Fragment","Separator","length"],"mappings":";;;;;;;AAWA;;;;;;;;;;;;AAYC,IACD,SAASA,eAAAA,CAAgBC,IAAc,EAAEC,OAAgB,EAAA;AACrD,IAAA,IAAIA,OAAAA,EAAS;QACT,qBACIC,GAAA,CAACC,WAAWC,OAAO,EAAA;AACf,YAAA,QAAA,gBAAAF,GAAA,CAACG,eAAAA,EAAAA;gBAAgBL,IAAAA,EAAMA;;;AAGnC,IAAA;AAEA,IAAA,IAAIA,IAAAA,CAAKM,GAAG,KAAKC,SAAAA,EAAW,qBAAOL,GAAA,CAACG,eAAAA,EAAAA;QAAgBL,IAAAA,EAAMA;;IAE1D,qBACIE,GAAA,CAACC,WAAWK,IAAI,EAAA;AAACC,QAAAA,IAAAA,EAAMT,KAAKM,GAAG;AAC3B,QAAA,QAAA,gBAAAJ,GAAA,CAACG,eAAAA,EAAAA;YAAgBL,IAAAA,EAAMA;;;AAGnC;AAEA;;;;;;;;;;;;AAYC,IACM,SAASU,eAAAA,CAAgB,EAAEC,OAAO,EAA4B,EAAA;IACjE,MAAMC,KAAAA,GAAQC,kBAAkBF,OAAAA,EAAS,OAAA,CAAA;IAEzC,qBACIT,GAAA,CAACC,WAAWW,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;gCACtCC,IAAA,CAACd,WAAWe,IAAI,EAAA;;AACZ,8BAAAhB,GAAA,CAACC,WAAWgB,IAAI,EAAA;4CACZjB,GAAA,CAACC,WAAWK,IAAI,EAAA;wBAACC,IAAAA,EAAMW,cAAAA,CAAeT,SAAS,SAAA,EAAW,GAAA,CAAA;wBAAMU,YAAAA,EAAW,MAAA;AACvE,wBAAA,QAAA,gBAAAnB,GAAA,CAACoB,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,YAAA;4BAAaC,aAAAA,EAAY;;;;AAG7CZ,gBAAAA,KAAAA,CAAMa,GAAG,CAAC,CAACzB,IAAAA,EAAM0B,sBACdT,IAAA,CAACU,QAAAA,EAAAA;;AACG,0CAAAzB,GAAA,CAACC,WAAWyB,SAAS,EAAA;AACjB,gCAAA,QAAA,gBAAA1B,GAAA,CAACoB,GAAAA,EAAAA;oCAAEC,SAAAA,EAAU,mBAAA;oCAAoBC,aAAAA,EAAY;;;AAEjD,0CAAAtB,GAAA,CAACC,WAAWgB,IAAI,EAAA;AAAEpB,gCAAAA,QAAAA,EAAAA,eAAAA,CAAgBC,IAAAA,EAAM0B,KAAAA,KAAUd,KAAAA,CAAMiB,MAAM,GAAG,CAAA;;;AAJtDH,qBAAAA,EAAAA,KAAAA,CAAAA;;;;AAUnC
|
|
1
|
+
{"version":3,"file":"PrimeBreadcrumb.js","sources":["../../../menu/PrimeBreadcrumb.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Fragment, ReactNode } from 'react';\nimport { Breadcrumb } from 'primereact/breadcrumb';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { MenuItem } from '../MenuItem';\nimport { menuItemsProperty } from '../menuItems';\nimport { stringProperty } from '../properties';\nimport { MenuItemContent } from './MenuItemContent';\n\n/**\n * One entry in the trail, as the strongest thing the authored data supports.\n *\n * The three cases are genuinely different to assistive technology and only one of them is a link. Where\n * the user already is gets `Breadcrumb.Current`, which carries `aria-current=\"page\"` and is what tells a\n * screen reader the trail has ended - a trailing link says the opposite. An earlier entry that names a\n * target is a link. An earlier entry that names none is plain text, because an anchor with no `href` is\n * not focusable and only looks like a link.\n *\n * @param item The entry to render.\n * @param current Whether this is the last entry, and so where the user is now.\n * @returns The rendered entry.\n */\nfunction breadcrumbEntry(item: MenuItem, current: boolean): ReactNode {\n if (current) {\n return (\n <Breadcrumb.Current>\n <MenuItemContent item={item} />\n </Breadcrumb.Current>\n );\n }\n\n if (item.url === undefined) return <MenuItemContent item={item} />;\n\n return (\n <Breadcrumb.Link href={item.url}>\n <MenuItemContent item={item} />\n </Breadcrumb.Link>\n );\n}\n\n/**\n * The `PrimeReact:breadcrumb` component - the path to where the user currently is.\n *\n * The home entry is separate from the trail in the authored model, so it is read from its own `homeUrl`\n * property and always rendered as an icon.\n *\n * PrimeReact 11 replaced the single `BreadCrumb` component and its `model`/`home` props with a namespace\n * of parts, so the trail is assembled here. The parts are worth assembling rather than working around:\n * the root is a `nav` carrying an accessible name, the list is an ordered list, and every separator is\n * marked presentational so it is never read out as part of the path. The old `model` prop produced all of\n * that too, but only because the component decided it - none of it is something a hand-rolled trail would\n * reliably reproduce.\n */\nexport function PrimeBreadcrumb({ element }: RegisteredComponentProps) {\n const items = menuItemsProperty(element, 'items');\n\n return (\n <Breadcrumb.Root data-scene-id={element.id}>\n <Breadcrumb.List>\n <Breadcrumb.Item>\n <Breadcrumb.Link href={stringProperty(element, 'homeUrl', '/')} aria-label='Home'>\n <i className='pi pi-home' aria-hidden='true' />\n </Breadcrumb.Link>\n </Breadcrumb.Item>\n {items.map((item, index) => (\n <Fragment key={index}>\n <Breadcrumb.Separator>\n <i className='pi pi-angle-right' aria-hidden='true' />\n </Breadcrumb.Separator>\n <Breadcrumb.Item>{breadcrumbEntry(item, index === items.length - 1)}</Breadcrumb.Item>\n </Fragment>\n ))}\n </Breadcrumb.List>\n </Breadcrumb.Root>\n );\n}\n"],"names":["breadcrumbEntry","item","current","_jsx","Breadcrumb","Current","MenuItemContent","url","undefined","Link","href","PrimeBreadcrumb","element","items","menuItemsProperty","Root","data-scene-id","id","_jsxs","List","Item","stringProperty","aria-label","i","className","aria-hidden","map","index","Fragment","Separator","length"],"mappings":";;;;;;;AAWA;;;;;;;;;;;;AAYC,IACD,SAASA,eAAAA,CAAgBC,IAAc,EAAEC,OAAgB,EAAA;AACrD,IAAA,IAAIA,OAAAA,EAAS;QACT,qBACIC,GAAA,CAACC,WAAWC,OAAO,EAAA;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,WAAWgB,IAAI,EAAA;AAAEpB,gCAAAA,QAAAA,EAAAA,eAAAA,CAAgBC,IAAAA,EAAM0B,KAAAA,KAAUd,KAAAA,CAAMiB,MAAM,GAAG,CAAA;;;AAJtDH,qBAAAA,EAAAA,KAAAA,CAAAA;;;;AAUnC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeContextMenu.js","sources":["../../../menu/PrimeContextMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ContextMenu } from 'primereact/contextmenu';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { stringProperty } from '../properties';\nimport { MenuItemContent } from './MenuItemContent';\n\n/**\n * The `PrimeReact:contextMenu` component - commands revealed by right-clicking a region.\n *\n * The adapter renders the region that owns the context-menu event as well as the menu itself. Without it\n * the menu could never be opened and the element would render as nothing at all.\n *\n * What changed in PrimeReact 11 is who owns that event. In v10 the menu was one component and the caller\n * had to hold a ref to it and call `show(event)` from its own `onContextMenu` handler. In v11\n * `ContextMenu.Trigger` is a part that already carries the handler, the `aria-haspopup` and the expanded\n * state, so the ref and the hand-written handler are both gone - the region is now declared as the\n * trigger rather than wired to the menu after the fact.\n *\n * The overlay is spelled out as portal, positioner and popup because those are separate parts now. That is\n * not ceremony: the positioner is what keeps the menu on screen near the pointer, and it renders nothing\n * at all until the menu is actually open, which is what makes an unopened context menu cost nothing.\n */\nexport function PrimeContextMenu({ element, slots }: RegisteredComponentProps) {\n const items = menuItemsProperty(element, 'items');\n\n return (\n <ContextMenu.Root data-scene-id={element.id}>\n <ContextMenu.Trigger>\n {slots.content?.length ? slots.content : <span>{stringProperty(element, 'label', 'Right-click here')}</span>}\n </ContextMenu.Trigger>\n <ContextMenu.Portal>\n <ContextMenu.Positioner>\n <ContextMenu.Popup>\n <ContextMenu.List>\n {items.map((item, index) =>\n item.separator === true ? (\n <ContextMenu.Separator key={index} />\n ) : (\n <ContextMenu.Item\n key={index}\n value={`${index}`}\n as={item.url === undefined ? 'div' : 'a'}\n href={item.url}\n disabled={item.disabled}\n onSelect={() => item.command?.()}>\n <MenuItemContent item={item} />\n </ContextMenu.Item>\n )\n )}\n </ContextMenu.List>\n </ContextMenu.Popup>\n </ContextMenu.Positioner>\n </ContextMenu.Portal>\n </ContextMenu.Root>\n );\n}\n"],"names":["PrimeContextMenu","element","slots","items","menuItemsProperty","_jsxs","ContextMenu","Root","data-scene-id","id","_jsx","Trigger","content","length","span","stringProperty","Portal","Positioner","Popup","List","map","item","index","separator","Separator","Item","value","as","url","undefined","href","disabled","onSelect","command","MenuItemContent"],"mappings":";;;;;;AASA;;;;;;;;;;;;;;;AAeC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACzE,MAAMC,KAAAA,GAAQC,kBAAkBH,OAAAA,EAAS,OAAA,CAAA;IAEzC,qBACII,IAAA,CAACC,YAAYC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;;AACvC,0BAAAC,GAAA,CAACJ,YAAYK,OAAO,EAAA;AACfT,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMU,OAAO,EAAEC,MAAAA,GAASX,KAAAA,CAAMU,OAAO,iBAAGF,GAAA,CAACI,MAAAA,EAAAA;AAAMC,oBAAAA,QAAAA,EAAAA,cAAAA,CAAed,SAAS,OAAA,EAAS,kBAAA;;;AAErF,0BAAAS,GAAA,CAACJ,YAAYU,MAAM,EAAA;wCACfN,GAAA,CAACJ,YAAYW,UAAU,EAAA;4CACnBP,GAAA,CAACJ,YAAYY,KAAK,EAAA;gDACdR,GAAA,CAACJ,YAAYa,IAAI,EAAA;AACZhB,4BAAAA,QAAAA,EAAAA,KAAAA,CAAMiB,GAAG,CAAC,CAACC,IAAAA,EAAMC,KAAAA,GACdD,KAAKE,SAAS,KAAK,IAAA,iBACfb,GAAA,CAACJ,YAAYkB,SAAS,EAAA,EAAA,EAAMF,KAAAA,CAAAA,iBAE5BZ,GAAA,CAACJ,YAAYmB,IAAI,EAAA;AAEbC,oCAAAA,KAAAA,EAAO,GAAGJ,KAAAA,CAAAA,CAAO;AACjBK,oCAAAA,EAAAA,EAAIN,IAAAA,CAAKO,GAAG,KAAKC,SAAAA,GAAY,KAAA,GAAQ,GAAA;AACrCC,oCAAAA,IAAAA,EAAMT,KAAKO,GAAG;AACdG,oCAAAA,QAAAA,EAAUV,KAAKU,QAAQ;oCACvBC,QAAAA,EAAU,IAAMX,KAAKY,OAAO,IAAA;AAC5B,oCAAA,QAAA,gBAAAvB,GAAA,CAACwB,eAAAA,EAAAA;wCAAgBb,IAAAA,EAAMA;;AANlBC,iCAAAA,EAAAA,KAAAA,CAAAA;;;;;;;AAgB7C
|
|
1
|
+
{"version":3,"file":"PrimeContextMenu.js","sources":["../../../menu/PrimeContextMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ContextMenu } from 'primereact/contextmenu';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { stringProperty } from '../properties';\nimport { MenuItemContent } from './MenuItemContent';\n\n/**\n * The `PrimeReact:contextMenu` component - commands revealed by right-clicking a region.\n *\n * The adapter renders the region that owns the context-menu event as well as the menu itself. Without it\n * the menu could never be opened and the element would render as nothing at all.\n *\n * What changed in PrimeReact 11 is who owns that event. In v10 the menu was one component and the caller\n * had to hold a ref to it and call `show(event)` from its own `onContextMenu` handler. In v11\n * `ContextMenu.Trigger` is a part that already carries the handler, the `aria-haspopup` and the expanded\n * state, so the ref and the hand-written handler are both gone - the region is now declared as the\n * trigger rather than wired to the menu after the fact.\n *\n * The overlay is spelled out as portal, positioner and popup because those are separate parts now. That is\n * not ceremony: the positioner is what keeps the menu on screen near the pointer, and it renders nothing\n * at all until the menu is actually open, which is what makes an unopened context menu cost nothing.\n */\nexport function PrimeContextMenu({ element, slots }: RegisteredComponentProps) {\n const items = menuItemsProperty(element, 'items');\n\n return (\n <ContextMenu.Root data-scene-id={element.id}>\n <ContextMenu.Trigger>\n {slots.content?.length ? slots.content : <span>{stringProperty(element, 'label', 'Right-click here')}</span>}\n </ContextMenu.Trigger>\n <ContextMenu.Portal>\n <ContextMenu.Positioner>\n <ContextMenu.Popup>\n <ContextMenu.List>\n {items.map((item, index) =>\n item.separator === true ? (\n <ContextMenu.Separator key={index} />\n ) : (\n <ContextMenu.Item\n key={index}\n value={`${index}`}\n as={item.url === undefined ? 'div' : 'a'}\n href={item.url}\n disabled={item.disabled}\n onSelect={() => item.command?.()}>\n <MenuItemContent item={item} />\n </ContextMenu.Item>\n )\n )}\n </ContextMenu.List>\n </ContextMenu.Popup>\n </ContextMenu.Positioner>\n </ContextMenu.Portal>\n </ContextMenu.Root>\n );\n}\n"],"names":["PrimeContextMenu","element","slots","items","menuItemsProperty","_jsxs","ContextMenu","Root","data-scene-id","id","_jsx","Trigger","content","length","span","stringProperty","Portal","Positioner","Popup","List","map","item","index","separator","Separator","Item","value","as","url","undefined","href","disabled","onSelect","command","MenuItemContent"],"mappings":";;;;;;AASA;;;;;;;;;;;;;;;AAeC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACzE,MAAMC,KAAAA,GAAQC,kBAAkBH,OAAAA,EAAS,OAAA,CAAA;IAEzC,qBACII,IAAA,CAACC,YAAYC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;;AACvC,0BAAAC,GAAA,CAACJ,YAAYK,OAAO,EAAA;AACfT,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMU,OAAO,EAAEC,MAAAA,GAASX,KAAAA,CAAMU,OAAO,iBAAGF,GAAA,CAACI,MAAAA,EAAAA;AAAMC,oBAAAA,QAAAA,EAAAA,cAAAA,CAAed,SAAS,OAAA,EAAS,kBAAA;;;AAErF,0BAAAS,GAAA,CAACJ,YAAYU,MAAM,EAAA;wCACfN,GAAA,CAACJ,YAAYW,UAAU,EAAA;4CACnBP,GAAA,CAACJ,YAAYY,KAAK,EAAA;gDACdR,GAAA,CAACJ,YAAYa,IAAI,EAAA;AACZhB,4BAAAA,QAAAA,EAAAA,KAAAA,CAAMiB,GAAG,CAAC,CAACC,IAAAA,EAAMC,KAAAA,GACdD,KAAKE,SAAS,KAAK,IAAA,iBACfb,GAAA,CAACJ,YAAYkB,SAAS,EAAA,EAAA,EAAMF,KAAAA,CAAAA,iBAE5BZ,GAAA,CAACJ,YAAYmB,IAAI,EAAA;AAEbC,oCAAAA,KAAAA,EAAO,GAAGJ,KAAAA,CAAAA,CAAO;AACjBK,oCAAAA,EAAAA,EAAIN,IAAAA,CAAKO,GAAG,KAAKC,SAAAA,GAAY,KAAA,GAAQ,GAAA;AACrCC,oCAAAA,IAAAA,EAAMT,KAAKO,GAAG;AACdG,oCAAAA,QAAAA,EAAUV,KAAKU,QAAQ;oCACvBC,QAAAA,EAAU,IAAMX,KAAKY,OAAO,IAAA;AAC5B,oCAAA,QAAA,gBAAAvB,GAAA,CAACwB,eAAAA,EAAAA;wCAAgBb,IAAAA,EAAMA;;AANlBC,iCAAAA,EAAAA,KAAAA,CAAAA;;;;;;;AAgB7C;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeDock.js","sources":["../../../menu/PrimeDock.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { stringProperty } from '../properties';\nimport { Dock } from './Dock';\nimport { DockPosition } from './DockPosition';\n\n/**\n * Narrows an authored `position` onto the edges a dock can actually be anchored to.\n *\n * A screen's properties are authored data rather than compiler-checked values, so an unrecognized edge is\n * an ordinary thing to encounter. Falling back to the bottom edge - the dock's own default - keeps a\n * mistyped property behaving exactly like an absent one, which is the rule every reader in this package\n * follows.\n *\n * @param value The authored position.\n * @returns The matching edge, or the bottom edge when the value names none.\n */\nfunction dockPosition(value: string): DockPosition {\n switch (value) {\n case DockPosition.Top:\n return DockPosition.Top;\n case DockPosition.Left:\n return DockPosition.Left;\n case DockPosition.Right:\n return DockPosition.Right;\n default:\n return DockPosition.Bottom;\n }\n}\n\n/**\n * The `PrimeReact:dock` component - a strip of icons anchored to one edge.\n *\n * PrimeReact 11 removed `dock` with nothing to replace it, so what this adapts is Scene's own\n * {@link Dock}. The magnifying effect that made v10's dock recognizable is not part of the replacement;\n * what a screen actually depends on is a row of icon commands pinned to an edge, and that is what remains.\n *\n * A dock positions itself absolutely against its nearest positioned ancestor, so it is wrapped in a sized\n * relative box here; dropped straight into a Scene tree it would otherwise pin itself to the page.\n */\nexport function PrimeDock({ element }: RegisteredComponentProps) {\n return (\n <div data-scene-id={element.id} className='relative h-40 w-full'>\n <Dock items={menuItemsProperty(element, 'items')} position={dockPosition(stringProperty(element, 'position', DockPosition.Bottom))} />\n </div>\n );\n}\n"],"names":["dockPosition","value","DockPosition","Top","Left","Right","Bottom","PrimeDock","element","_jsx","div","data-scene-id","id","className","Dock","items","menuItemsProperty","position","stringProperty"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;;;;;;;IAWA,SAASA,aAAaC,KAAa,EAAA;IAC/B,OAAQA,KAAAA;AACJ,QAAA,KAAKC,aAAaC,GAAG;AACjB,YAAA,OAAOD,aAAaC,GAAG;AAC3B,QAAA,KAAKD,aAAaE,IAAI;AAClB,YAAA,OAAOF,aAAaE,IAAI;AAC5B,QAAA,KAAKF,aAAaG,KAAK;AACnB,YAAA,OAAOH,aAAaG,KAAK;AAC7B,QAAA;AACI,YAAA,OAAOH,aAAaI,MAAM;AAClC;AACJ;AAEA;;;;;;;;;AASC,IACM,SAASC,SAAAA,CAAU,EAAEC,OAAO,EAA4B,EAAA;AAC3D,IAAA,qBACIC,GAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;QAAEC,SAAAA,EAAU,sBAAA;AACtC,QAAA,QAAA,gBAAAJ,GAAA,CAACK,IAAAA,EAAAA;AAAKC,YAAAA,KAAAA,EAAOC,kBAAkBR,OAAAA,EAAS,OAAA,CAAA;AAAUS,YAAAA,QAAAA,EAAUjB,YAAAA,CAAakB,cAAAA,CAAeV,OAAAA,EAAS,UAAA,EAAYN,aAAaI,MAAM,CAAA;;;AAG5I
|
|
1
|
+
{"version":3,"file":"PrimeDock.js","sources":["../../../menu/PrimeDock.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { stringProperty } from '../properties';\nimport { Dock } from './Dock';\nimport { DockPosition } from './DockPosition';\n\n/**\n * Narrows an authored `position` onto the edges a dock can actually be anchored to.\n *\n * A screen's properties are authored data rather than compiler-checked values, so an unrecognized edge is\n * an ordinary thing to encounter. Falling back to the bottom edge - the dock's own default - keeps a\n * mistyped property behaving exactly like an absent one, which is the rule every reader in this package\n * follows.\n *\n * @param value The authored position.\n * @returns The matching edge, or the bottom edge when the value names none.\n */\nfunction dockPosition(value: string): DockPosition {\n switch (value) {\n case DockPosition.Top:\n return DockPosition.Top;\n case DockPosition.Left:\n return DockPosition.Left;\n case DockPosition.Right:\n return DockPosition.Right;\n default:\n return DockPosition.Bottom;\n }\n}\n\n/**\n * The `PrimeReact:dock` component - a strip of icons anchored to one edge.\n *\n * PrimeReact 11 removed `dock` with nothing to replace it, so what this adapts is Scene's own\n * {@link Dock}. The magnifying effect that made v10's dock recognizable is not part of the replacement;\n * what a screen actually depends on is a row of icon commands pinned to an edge, and that is what remains.\n *\n * A dock positions itself absolutely against its nearest positioned ancestor, so it is wrapped in a sized\n * relative box here; dropped straight into a Scene tree it would otherwise pin itself to the page.\n */\nexport function PrimeDock({ element }: RegisteredComponentProps) {\n return (\n <div data-scene-id={element.id} className='relative h-40 w-full'>\n <Dock items={menuItemsProperty(element, 'items')} position={dockPosition(stringProperty(element, 'position', DockPosition.Bottom))} />\n </div>\n );\n}\n"],"names":["dockPosition","value","DockPosition","Top","Left","Right","Bottom","PrimeDock","element","_jsx","div","data-scene-id","id","className","Dock","items","menuItemsProperty","position","stringProperty"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;;;;;;;IAWA,SAASA,aAAaC,KAAa,EAAA;IAC/B,OAAQA,KAAAA;AACJ,QAAA,KAAKC,aAAaC,GAAG;AACjB,YAAA,OAAOD,aAAaC,GAAG;AAC3B,QAAA,KAAKD,aAAaE,IAAI;AAClB,YAAA,OAAOF,aAAaE,IAAI;AAC5B,QAAA,KAAKF,aAAaG,KAAK;AACnB,YAAA,OAAOH,aAAaG,KAAK;AAC7B,QAAA;AACI,YAAA,OAAOH,aAAaI,MAAM;AAClC;AACJ;AAEA;;;;;;;;;AASC,IACM,SAASC,SAAAA,CAAU,EAAEC,OAAO,EAA4B,EAAA;AAC3D,IAAA,qBACIC,GAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;QAAEC,SAAAA,EAAU,sBAAA;AACtC,QAAA,QAAA,gBAAAJ,GAAA,CAACK,IAAAA,EAAAA;AAAKC,YAAAA,KAAAA,EAAOC,kBAAkBR,OAAAA,EAAS,OAAA,CAAA;AAAUS,YAAAA,QAAAA,EAAUjB,YAAAA,CAAakB,cAAAA,CAAeV,OAAAA,EAAS,UAAA,EAAYN,aAAaI,MAAM,CAAA;;;AAG5I;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeMegaMenu.js","sources":["../../../menu/PrimeMegaMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { MegaMenu } from './MegaMenu';\n\n/**\n * The `PrimeReact:megaMenu` component - a menubar whose submenus open as multi-column panels.\n *\n * PrimeReact 11 removed `megamenu` with nothing to replace it, so what this adapts is Scene's own\n * {@link MegaMenu}.\n *\n * Columns are one ordinary level of nesting: each root entry's `items` are the columns, and each column's\n * `items` are the commands in it. PrimeReact 10 spelled that as an array of arrays, but `menuItemsProperty`\n * follows nested objects and drops nested arrays, so the doubly-nested form never survived the read in the\n * first place. Authoring it as objects is both what the reader supports and one bracket less to get right.\n */\nexport function PrimeMegaMenu({ element }: RegisteredComponentProps) {\n return <MegaMenu data-scene-id={element.id} items={menuItemsProperty(element, 'items')} />;\n}\n"],"names":["PrimeMegaMenu","element","_jsx","MegaMenu","data-scene-id","id","items","menuItemsProperty"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;AAUC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,qBAAOC,GAAA,CAACC,QAAAA,EAAAA;AAASC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA;;AAClF
|
|
1
|
+
{"version":3,"file":"PrimeMegaMenu.js","sources":["../../../menu/PrimeMegaMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { MegaMenu } from './MegaMenu';\n\n/**\n * The `PrimeReact:megaMenu` component - a menubar whose submenus open as multi-column panels.\n *\n * PrimeReact 11 removed `megamenu` with nothing to replace it, so what this adapts is Scene's own\n * {@link MegaMenu}.\n *\n * Columns are one ordinary level of nesting: each root entry's `items` are the columns, and each column's\n * `items` are the commands in it. PrimeReact 10 spelled that as an array of arrays, but `menuItemsProperty`\n * follows nested objects and drops nested arrays, so the doubly-nested form never survived the read in the\n * first place. Authoring it as objects is both what the reader supports and one bracket less to get right.\n */\nexport function PrimeMegaMenu({ element }: RegisteredComponentProps) {\n return <MegaMenu data-scene-id={element.id} items={menuItemsProperty(element, 'items')} />;\n}\n"],"names":["PrimeMegaMenu","element","_jsx","MegaMenu","data-scene-id","id","items","menuItemsProperty"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;AAUC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,qBAAOC,GAAA,CAACC,QAAAA,EAAAA;AAASC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA;;AAClF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeMenu.js","sources":["../../../menu/PrimeMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { Menu } from 'primereact/menu';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { MenuItem } from '../MenuItem';\nimport { menuItemsProperty } from '../menuItems';\nimport { MenuItemContent } from './MenuItemContent';\n\n/**\n * One selectable entry, as either a command or a link depending on whether the entry names a target.\n *\n * `Menu.Item` renders whatever element `as` names, so the link case is the same part with an anchor\n * underneath rather than a different code path - which is what keeps the menu's own keyboard handling,\n * focus tracking and identifiers working for both kinds of entry.\n *\n * @param item The entry to render.\n * @param value The entry's identity within the menu, which the menu turns into a stable element id.\n * @returns The rendered entry.\n */\nfunction menuEntry(item: MenuItem, value: string): ReactNode {\n return (\n <Menu.Item\n key={value}\n value={value}\n as={item.url === undefined ? 'div' : 'a'}\n href={item.url}\n disabled={item.disabled}\n onSelect={() => item.command?.()}>\n <MenuItemContent item={item} />\n </Menu.Item>\n );\n}\n\n/**\n * The `PrimeReact:menu` component - a flat list of commands.\n *\n * PrimeReact 11 turned `Menu` from one component taking a `model` array into a namespace of parts that a\n * caller assembles, so the adapter now walks the item model itself. That is more lines, but it is the only\n * way to reach the parts, and it buys the thing the `model` prop never allowed: an entry can be an anchor\n * when it navigates and a plain item when it commands.\n *\n * `Menu.Root` renders no element of its own unless told which one to be, so `as` is given explicitly -\n * without it the root collapses to a fragment and takes the element's `data-scene-id` and the theme's own\n * scope attributes with it.\n *\n * An entry that carries children is rendered as a labeled group rather than being flattened to its own\n * label, which is what the v10 `Menu` did with a nested entry. Dropping the children instead would lose\n * authored content silently; a menu that genuinely needs a *side-opening* submenu is a `tieredMenu`.\n */\nexport function PrimeMenu({ element }: RegisteredComponentProps) {\n const items = menuItemsProperty(element, 'items');\n\n return (\n <Menu.Root as='div' data-scene-id={element.id}>\n <Menu.List>\n {items.map((item, index) => {\n if (item.separator === true) return <Menu.Separator key={index} />;\n\n const children = item.items ?? [];\n if (children.length === 0) return menuEntry(item, `${index}`);\n\n return (\n <Menu.Group key={index}>\n <Menu.Label>\n <MenuItemContent item={item} />\n </Menu.Label>\n {children.map((child, childIndex) => menuEntry(child, `${index}-${childIndex}`))}\n </Menu.Group>\n );\n })}\n </Menu.List>\n </Menu.Root>\n );\n}\n"],"names":["menuEntry","item","value","_jsx","Menu","Item","as","url","undefined","href","disabled","onSelect","command","MenuItemContent","PrimeMenu","element","items","menuItemsProperty","Root","data-scene-id","id","List","map","index","separator","Separator","children","length","_jsxs","Group","Label","child","childIndex"],"mappings":";;;;;AAAA;AACA;AASA;;;;;;;;;;AAUC,IACD,SAASA,SAAAA,CAAUC,IAAc,EAAEC,KAAa,EAAA;IAC5C,qBACIC,GAAA,CAACC,KAAKC,IAAI,EAAA;QAENH,KAAAA,EAAOA,KAAAA;AACPI,QAAAA,EAAAA,EAAIL,IAAAA,CAAKM,GAAG,KAAKC,SAAAA,GAAY,KAAA,GAAQ,GAAA;AACrCC,QAAAA,IAAAA,EAAMR,KAAKM,GAAG;AACdG,QAA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AY,CAAA;;AAJjET,iBAAAA,EAAAA,KAAAA,CAAAA;AAOzB,YAAA,CAAA;;;AAIhB
|
|
1
|
+
{"version":3,"file":"PrimeMenu.js","sources":["../../../menu/PrimeMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { Menu } from 'primereact/menu';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { MenuItem } from '../MenuItem';\nimport { menuItemsProperty } from '../menuItems';\nimport { MenuItemContent } from './MenuItemContent';\n\n/**\n * One selectable entry, as either a command or a link depending on whether the entry names a target.\n *\n * `Menu.Item` renders whatever element `as` names, so the link case is the same part with an anchor\n * underneath rather than a different code path - which is what keeps the menu's own keyboard handling,\n * focus tracking and identifiers working for both kinds of entry.\n *\n * @param item The entry to render.\n * @param value The entry's identity within the menu, which the menu turns into a stable element id.\n * @returns The rendered entry.\n */\nfunction menuEntry(item: MenuItem, value: string): ReactNode {\n return (\n <Menu.Item\n key={value}\n value={value}\n as={item.url === undefined ? 'div' : 'a'}\n href={item.url}\n disabled={item.disabled}\n onSelect={() => item.command?.()}>\n <MenuItemContent item={item} />\n </Menu.Item>\n );\n}\n\n/**\n * The `PrimeReact:menu` component - a flat list of commands.\n *\n * PrimeReact 11 turned `Menu` from one component taking a `model` array into a namespace of parts that a\n * caller assembles, so the adapter now walks the item model itself. That is more lines, but it is the only\n * way to reach the parts, and it buys the thing the `model` prop never allowed: an entry can be an anchor\n * when it navigates and a plain item when it commands.\n *\n * `Menu.Root` renders no element of its own unless told which one to be, so `as` is given explicitly -\n * without it the root collapses to a fragment and takes the element's `data-scene-id` and the theme's own\n * scope attributes with it.\n *\n * An entry that carries children is rendered as a labeled group rather than being flattened to its own\n * label, which is what the v10 `Menu` did with a nested entry. Dropping the children instead would lose\n * authored content silently; a menu that genuinely needs a *side-opening* submenu is a `tieredMenu`.\n */\nexport function PrimeMenu({ element }: RegisteredComponentProps) {\n const items = menuItemsProperty(element, 'items');\n\n return (\n <Menu.Root as='div' data-scene-id={element.id}>\n <Menu.List>\n {items.map((item, index) => {\n if (item.separator === true) return <Menu.Separator key={index} />;\n\n const children = item.items ?? [];\n if (children.length === 0) return menuEntry(item, `${index}`);\n\n return (\n <Menu.Group key={index}>\n <Menu.Label>\n <MenuItemContent item={item} />\n </Menu.Label>\n {children.map((child, childIndex) => menuEntry(child, `${index}-${childIndex}`))}\n </Menu.Group>\n );\n })}\n </Menu.List>\n </Menu.Root>\n );\n}\n"],"names":["menuEntry","item","value","_jsx","Menu","Item","as","url","undefined","href","disabled","onSelect","command","MenuItemContent","PrimeMenu","element","items","menuItemsProperty","Root","data-scene-id","id","List","map","index","separator","Separator","children","length","_jsxs","Group","Label","child","childIndex"],"mappings":";;;;;AAAA;AACA;AASA;;;;;;;;;;AAUC,IACD,SAASA,SAAAA,CAAUC,IAAc,EAAEC,KAAa,EAAA;IAC5C,qBACIC,GAAA,CAACC,KAAKC,IAAI,EAAA;QAENH,KAAAA,EAAOA,KAAAA;AACPI,QAAAA,EAAAA,EAAIL,IAAAA,CAAKM,GAAG,KAAKC,SAAAA,GAAY,KAAA,GAAQ,GAAA;AACrCC,QAAAA,IAAAA,EAAMR,KAAKM,GAAG;AACdG,QAAAA,QAAAA,EAAUT,KAAKS,QAAQ;QACvBC,QAAAA,EAAU,IAAMV,KAAKW,OAAO,IAAA;AAC5B,QAAA,QAAA,gBAAAT,GAAA,CAACU,eAAAA,EAAAA;YAAgBZ,IAAAA,EAAMA;;AANlBC,KAAAA,EAAAA,KAAAA,CAAAA;AASjB;AAEA;;;;;;;;;;;;;;;AAeC,IACM,SAASY,SAAAA,CAAU,EAAEC,OAAO,EAA4B,EAAA;IAC3D,MAAMC,KAAAA,GAAQC,kBAAkBF,OAAAA,EAAS,OAAA,CAAA;IAEzC,qBACIZ,GAAA,CAACC,KAAKc,IAAI,EAAA;QAACZ,EAAAA,EAAG,KAAA;AAAMa,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;gCACzCjB,GAAA,CAACC,KAAKiB,IAAI,EAAA;sBACLL,KAAAA,CAAMM,GAAG,CAAC,CAACrB,IAAAA,EAAMsB,KAAAA,GAAAA;gBACd,IAAItB,IAAAA,CAAKuB,SAAS,KAAK,IAAA,EAAM,qBAAOrB,GAAA,CAACC,IAAAA,CAAKqB,SAAS,EAAA,EAAA,EAAMF,KAAAA,CAAAA;AAEzD,gBAAA,MAAMG,QAAAA,GAAWzB,IAAAA,CAAKe,KAAK,IAAI,EAAE;gBACjC,IAAIU,QAAAA,CAASC,MAAM,KAAK,CAAA,EAAG,OAAO3B,SAAAA,CAAUC,IAAAA,EAAM,GAAGsB,KAAAA,CAAAA,CAAO,CAAA;gBAE5D,qBACIK,IAAA,CAACxB,KAAKyB,KAAK,EAAA;;AACP,sCAAA1B,GAAA,CAACC,KAAK0B,KAAK,EAAA;AACP,4BAAA,QAAA,gBAAA3B,GAAA,CAACU,eAAAA,EAAAA;gCAAgBZ,IAAAA,EAAMA;;;wBAE1ByB,QAAAA,CAASJ,GAAG,CAAC,CAACS,KAAAA,EAAOC,UAAAA,GAAehC,SAAAA,CAAU+B,KAAAA,EAAO,CAAA,EAAGR,KAAAA,CAAM,CAAC,EAAES,UAAAA,CAAAA,CAAY,CAAA;;AAJjET,iBAAAA,EAAAA,KAAAA,CAAAA;AAOzB,YAAA,CAAA;;;AAIhB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeMenubar.js","sources":["../../../menu/PrimeMenubar.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { Menubar } from './Menubar';\n\n/**\n * The `PrimeReact:menubar` component - a horizontal menu with nested submenus.\n *\n * The `start` and `end` slots take the branding and account controls that flank a real application's\n * menubar; the commands themselves come from the `items` property.\n *\n * PrimeReact 11 removed `menubar` with nothing to replace it, so what this adapts is Scene's own\n * {@link Menubar}. The registered name and the authored properties are unchanged, which is the point -\n * a screen written against the PrimeReact 10 package keeps working, and the substitution shows up as a\n * shorter list of behaviors rather than as a broken screen.\n */\nexport function PrimeMenubar({ element, slots }: RegisteredComponentProps) {\n return <Menubar data-scene-id={element.id} items={menuItemsProperty(element, 'items')} start={slots.start} end={slots.end} />;\n}\n"],"names":["PrimeMenubar","element","slots","_jsx","Menubar","data-scene-id","id","items","menuItemsProperty","start","end"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;AAUC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBAAOC,GAAA,CAACC,OAAAA,EAAAA;AAAQC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBP,OAAAA,EAAS,OAAA,CAAA;AAAUQ,QAAAA,KAAAA,EAAOP,MAAMO,KAAK;AAAEC,QAAAA,GAAAA,EAAKR,MAAMQ;;AAC1H
|
|
1
|
+
{"version":3,"file":"PrimeMenubar.js","sources":["../../../menu/PrimeMenubar.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { Menubar } from './Menubar';\n\n/**\n * The `PrimeReact:menubar` component - a horizontal menu with nested submenus.\n *\n * The `start` and `end` slots take the branding and account controls that flank a real application's\n * menubar; the commands themselves come from the `items` property.\n *\n * PrimeReact 11 removed `menubar` with nothing to replace it, so what this adapts is Scene's own\n * {@link Menubar}. The registered name and the authored properties are unchanged, which is the point -\n * a screen written against the PrimeReact 10 package keeps working, and the substitution shows up as a\n * shorter list of behaviors rather than as a broken screen.\n */\nexport function PrimeMenubar({ element, slots }: RegisteredComponentProps) {\n return <Menubar data-scene-id={element.id} items={menuItemsProperty(element, 'items')} start={slots.start} end={slots.end} />;\n}\n"],"names":["PrimeMenubar","element","slots","_jsx","Menubar","data-scene-id","id","items","menuItemsProperty","start","end"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;AAUC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBAAOC,GAAA,CAACC,OAAAA,EAAAA;AAAQC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBP,OAAAA,EAAS,OAAA,CAAA;AAAUQ,QAAAA,KAAAA,EAAOP,MAAMO,KAAK;AAAEC,QAAAA,GAAAA,EAAKR,MAAMQ;;AAC1H;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimePanelMenu.js","sources":["../../../menu/PrimePanelMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { booleanProperty } from '../properties';\nimport { PanelMenu } from './PanelMenu';\n\n/**\n * The `PrimeReact:panelMenu` component - a vertical menu whose submenus expand in place, accordion style.\n *\n * PrimeReact 11 removed `panelmenu` with nothing to replace it, so what this adapts is Scene's own\n * {@link PanelMenu}. That replacement is the least hand-rolled of the seven in this folder: v11 still ships\n * `accordion`, and an accordion is exactly what a panel menu's expand-and-collapse behavior is, so only the\n * mapping from the authored item model onto those parts is Scene's.\n */\nexport function PrimePanelMenu({ element }: RegisteredComponentProps) {\n return <PanelMenu data-scene-id={element.id} items={menuItemsProperty(element, 'items')} multiple={booleanProperty(element, 'multiple', false)} />;\n}\n"],"names":["PrimePanelMenu","element","_jsx","PanelMenu","data-scene-id","id","items","menuItemsProperty","multiple","booleanProperty"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;;;AAOC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAA4B,EAAA;AAChE,IAAA,qBAAOC,GAAA,CAACC,SAAAA,EAAAA;AAAUC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA,CAAA;QAAUO,QAAAA,EAAUC,eAAAA,CAAgBR,SAAS,UAAA,EAAY,KAAA;;AAC5I
|
|
1
|
+
{"version":3,"file":"PrimePanelMenu.js","sources":["../../../menu/PrimePanelMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { booleanProperty } from '../properties';\nimport { PanelMenu } from './PanelMenu';\n\n/**\n * The `PrimeReact:panelMenu` component - a vertical menu whose submenus expand in place, accordion style.\n *\n * PrimeReact 11 removed `panelmenu` with nothing to replace it, so what this adapts is Scene's own\n * {@link PanelMenu}. That replacement is the least hand-rolled of the seven in this folder: v11 still ships\n * `accordion`, and an accordion is exactly what a panel menu's expand-and-collapse behavior is, so only the\n * mapping from the authored item model onto those parts is Scene's.\n */\nexport function PrimePanelMenu({ element }: RegisteredComponentProps) {\n return <PanelMenu data-scene-id={element.id} items={menuItemsProperty(element, 'items')} multiple={booleanProperty(element, 'multiple', false)} />;\n}\n"],"names":["PrimePanelMenu","element","_jsx","PanelMenu","data-scene-id","id","items","menuItemsProperty","multiple","booleanProperty"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;;;AAOC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAA4B,EAAA;AAChE,IAAA,qBAAOC,GAAA,CAACC,SAAAA,EAAAA;AAAUC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA,CAAA;QAAUO,QAAAA,EAAUC,eAAAA,CAAgBR,SAAS,UAAA,EAAY,KAAA;;AAC5I;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeSteps.js","sources":["../../../menu/PrimeSteps.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { numberProperty } from '../properties';\nimport { Steps } from './Steps';\n\n/**\n * The `PrimeReact:steps` component - progress through a sequence, shown as numbered labels.\n *\n * Unlike `stepper` this shows position only and owns no content; a screen pairs it with whatever it wants\n * to render per step.\n *\n * PrimeReact 11 removed `steps` with nothing to replace it - `stepper` survives, but it owns the content of\n * each step and drives moving between them, which is the other component Scene already registers - so what\n * this adapts is Scene's own {@link Steps}.\n *\n * The position is now read straight from the element on every render rather than seeded into local state.\n * Scene's own {@link Steps} is a read-only indicator, so there is nothing left that could move the position\n * behind the authored value's back, and holding a copy of it would only let the two disagree.\n */\nexport function PrimeSteps({ element }: RegisteredComponentProps) {\n return <Steps data-scene-id={element.id} items={menuItemsProperty(element, 'items')} activeIndex={numberProperty(element, 'activeIndex', 0)} />;\n}\n"],"names":["PrimeSteps","element","_jsx","Steps","data-scene-id","id","items","menuItemsProperty","activeIndex","numberProperty"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;;;;;;;;;AAaC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;AAC5D,IAAA,qBAAOC,GAAA,CAACC,KAAAA,EAAAA;AAAMC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA,CAAA;QAAUO,WAAAA,EAAaC,cAAAA,CAAeR,SAAS,aAAA,EAAe,CAAA;;AAC7I
|
|
1
|
+
{"version":3,"file":"PrimeSteps.js","sources":["../../../menu/PrimeSteps.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { numberProperty } from '../properties';\nimport { Steps } from './Steps';\n\n/**\n * The `PrimeReact:steps` component - progress through a sequence, shown as numbered labels.\n *\n * Unlike `stepper` this shows position only and owns no content; a screen pairs it with whatever it wants\n * to render per step.\n *\n * PrimeReact 11 removed `steps` with nothing to replace it - `stepper` survives, but it owns the content of\n * each step and drives moving between them, which is the other component Scene already registers - so what\n * this adapts is Scene's own {@link Steps}.\n *\n * The position is now read straight from the element on every render rather than seeded into local state.\n * Scene's own {@link Steps} is a read-only indicator, so there is nothing left that could move the position\n * behind the authored value's back, and holding a copy of it would only let the two disagree.\n */\nexport function PrimeSteps({ element }: RegisteredComponentProps) {\n return <Steps data-scene-id={element.id} items={menuItemsProperty(element, 'items')} activeIndex={numberProperty(element, 'activeIndex', 0)} />;\n}\n"],"names":["PrimeSteps","element","_jsx","Steps","data-scene-id","id","items","menuItemsProperty","activeIndex","numberProperty"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;;;;;;;;;AAaC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;AAC5D,IAAA,qBAAOC,GAAA,CAACC,KAAAA,EAAAA;AAAMC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA,CAAA;QAAUO,WAAAA,EAAaC,cAAAA,CAAeR,SAAS,aAAA,EAAe,CAAA;;AAC7I;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeTabMenu.js","sources":["../../../menu/PrimeTabMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { numberProperty } from '../properties';\nimport { TabMenu } from './TabMenu';\n\n/**\n * The `PrimeReact:tabMenu` component - tabs used for navigation rather than for hiding content.\n *\n * PrimeReact 11 removed `tabmenu` with nothing to replace it, so what this adapts is Scene's own\n * {@link TabMenu}. `primereact/tabs` does exist in v11 and looks like the obvious substitute, but it is\n * built for tabs that control panels; a navigation bar has none, and adopting it would announce panels\n * that are not there. Scene's replacement keeps the look and tells the truth about the semantics.\n *\n * The selected entry is held by the component itself so the control responds to clicks in a preview,\n * exactly as the v10 adapter did; the authored `activeIndex` is where it starts.\n */\nexport function PrimeTabMenu({ element }: RegisteredComponentProps) {\n return <TabMenu data-scene-id={element.id} items={menuItemsProperty(element, 'items')} activeIndex={numberProperty(element, 'activeIndex', 0)} />;\n}\n"],"names":["PrimeTabMenu","element","_jsx","TabMenu","data-scene-id","id","items","menuItemsProperty","activeIndex","numberProperty"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;;;;;;AAUC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAA4B,EAAA;AAC9D,IAAA,qBAAOC,GAAA,CAACC,OAAAA,EAAAA;AAAQC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA,CAAA;QAAUO,WAAAA,EAAaC,cAAAA,CAAeR,SAAS,aAAA,EAAe,CAAA;;AAC/I
|
|
1
|
+
{"version":3,"file":"PrimeTabMenu.js","sources":["../../../menu/PrimeTabMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { numberProperty } from '../properties';\nimport { TabMenu } from './TabMenu';\n\n/**\n * The `PrimeReact:tabMenu` component - tabs used for navigation rather than for hiding content.\n *\n * PrimeReact 11 removed `tabmenu` with nothing to replace it, so what this adapts is Scene's own\n * {@link TabMenu}. `primereact/tabs` does exist in v11 and looks like the obvious substitute, but it is\n * built for tabs that control panels; a navigation bar has none, and adopting it would announce panels\n * that are not there. Scene's replacement keeps the look and tells the truth about the semantics.\n *\n * The selected entry is held by the component itself so the control responds to clicks in a preview,\n * exactly as the v10 adapter did; the authored `activeIndex` is where it starts.\n */\nexport function PrimeTabMenu({ element }: RegisteredComponentProps) {\n return <TabMenu data-scene-id={element.id} items={menuItemsProperty(element, 'items')} activeIndex={numberProperty(element, 'activeIndex', 0)} />;\n}\n"],"names":["PrimeTabMenu","element","_jsx","TabMenu","data-scene-id","id","items","menuItemsProperty","activeIndex","numberProperty"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;;;;;;AAUC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAA4B,EAAA;AAC9D,IAAA,qBAAOC,GAAA,CAACC,OAAAA,EAAAA;AAAQC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA,CAAA;QAAUO,WAAAA,EAAaC,cAAAA,CAAeR,SAAS,aAAA,EAAe,CAAA;;AAC/I;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeTieredMenu.js","sources":["../../../menu/PrimeTieredMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { TieredMenu } from './TieredMenu';\n\n/**\n * The `PrimeReact:tieredMenu` component - a vertical menu whose submenus open to the side.\n *\n * PrimeReact 11 removed `tieredmenu` with nothing to replace it, so what this adapts is Scene's own\n * {@link TieredMenu}. It is the one component in this family that keeps unlimited nesting, which is why an\n * authored menu that genuinely goes three levels deep belongs here rather than in a `menubar`.\n */\nexport function PrimeTieredMenu({ element }: RegisteredComponentProps) {\n return <TieredMenu data-scene-id={element.id} items={menuItemsProperty(element, 'items')} />;\n}\n"],"names":["PrimeTieredMenu","element","_jsx","TieredMenu","data-scene-id","id","items","menuItemsProperty"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;AAMC,IACM,SAASA,eAAAA,CAAgB,EAAEC,OAAO,EAA4B,EAAA;AACjE,IAAA,qBAAOC,GAAA,CAACC,UAAAA,EAAAA;AAAWC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA;;AACpF
|
|
1
|
+
{"version":3,"file":"PrimeTieredMenu.js","sources":["../../../menu/PrimeTieredMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { menuItemsProperty } from '../menuItems';\nimport { TieredMenu } from './TieredMenu';\n\n/**\n * The `PrimeReact:tieredMenu` component - a vertical menu whose submenus open to the side.\n *\n * PrimeReact 11 removed `tieredmenu` with nothing to replace it, so what this adapts is Scene's own\n * {@link TieredMenu}. It is the one component in this family that keeps unlimited nesting, which is why an\n * authored menu that genuinely goes three levels deep belongs here rather than in a `menubar`.\n */\nexport function PrimeTieredMenu({ element }: RegisteredComponentProps) {\n return <TieredMenu data-scene-id={element.id} items={menuItemsProperty(element, 'items')} />;\n}\n"],"names":["PrimeTieredMenu","element","_jsx","TieredMenu","data-scene-id","id","items","menuItemsProperty"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;AAMC,IACM,SAASA,eAAAA,CAAgB,EAAEC,OAAO,EAA4B,EAAA;AACjE,IAAA,qBAAOC,GAAA,CAACC,UAAAA,EAAAA;AAAWC,QAAAA,eAAAA,EAAeH,QAAQI,EAAE;AAAEC,QAAAA,KAAAA,EAAOC,kBAAkBN,OAAAA,EAAS,OAAA;;AACpF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Steps.js","sources":["../../../menu/Steps.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CSSProperties, HTMLAttributes } from 'react';\nimport { MenuItem } from '../MenuItem';\nimport { MenuItemContent } from './MenuItemContent';\n\nconst listStyle: CSSProperties = { listStyle: 'none', margin: 0, padding: 0, color: 'var(--scene-text-color)' };\n\nconst markerStyle: CSSProperties = {\n width: '1.75rem',\n height: '1.75rem',\n borderRadius: '50%',\n border: '1px solid var(--scene-surface-border)',\n background: 'var(--scene-surface-card)',\n color: 'var(--scene-text-muted-color)',\n};\n\nconst reachedMarkerStyle: CSSProperties = {\n ...markerStyle,\n background: 'var(--scene-primary-color)',\n borderColor: 'var(--scene-primary-color)',\n color: 'var(--scene-primary-contrast-color)',\n};\n\nconst pendingStepStyle: CSSProperties = { color: 'var(--scene-text-muted-color)' };\n\n/**\n * The configuration {@link Steps} takes.\n */\nexport interface StepsProps extends HTMLAttributes<HTMLOListElement> {\n /**\n * The steps in the sequence, in order.\n */\n items?: MenuItem[];\n\n /**\n * The zero-based step the user is on. Everything before it counts as reached.\n */\n activeIndex?: number;\n}\n\n/**\n * A numbered horizontal indicator of where the user is in a sequence. Cratis-owned.\n *\n * This exists because PrimeReact 11 removed `primereact/steps` outright. `primereact/stepper` survives,\n * but it is not a replacement: a stepper owns the content of each step and drives moving between them,\n * whereas `steps` shows position and nothing else, next to whatever a screen chose to render itself. Scene\n * has both concepts and they are registered separately, so collapsing one into the other would silently\n * change what an authored screen means.\n *\n * It is an ordered list because that is what it is - a numbered sequence, read in order - and the step the\n * user is on is marked with `aria-current` rather than only with color, so the position is available to a\n * screen reader and not just to an eye.\n *\n * What it deliberately does not carry over from the v10 `Steps`: the indicator is read-only, so v10's\n * `readOnly={false}` mode where clicking a step jumped to it is gone, and with it the `onSelect` callback\n * and the internally held selection. A screen that wants navigable steps should hold the position itself\n * and render whatever control it wants to move between them. Item templates and the vertical layout are\n * not supported either.\n */\nexport function Steps({ items = [], activeIndex = 0, ...rest }: StepsProps) {\n return (\n <ol {...rest} className='flex items-center gap-4' style={listStyle}>\n {items.map((item, index) => (\n <li\n key={index}\n className='inline-flex items-center gap-2'\n style={index <= activeIndex ? undefined : pendingStepStyle}\n aria-current={index === activeIndex ? 'step' : undefined}>\n <span className='inline-flex items-center justify-center' aria-hidden='true' style={index <= activeIndex ? reachedMarkerStyle : markerStyle}>\n {index + 1}\n </span>\n <MenuItemContent item={item} />\n </li>\n ))}\n </ol>\n );\n}\n"],"names":["listStyle","margin","padding","color","markerStyle","width","height","borderRadius","border","background","reachedMarkerStyle","borderColor","pendingStepStyle","Steps","items","activeIndex","rest","_jsx","ol","className","style","map","item","index","_jsxs","li","undefined","aria-current","span","aria-hidden","MenuItemContent"],"mappings":";;;AAAA;AACA;AAMA,MAAMA,SAAAA,GAA2B;IAAEA,SAAAA,EAAW,MAAA;IAAQC,MAAAA,EAAQ,CAAA;IAAGC,OAAAA,EAAS,CAAA;IAAGC,KAAAA,EAAO;AAA0B,CAAA;AAE9G,MAAMC,WAAAA,GAA6B;IAC/BC,KAAAA,EAAO,SAAA;IACPC,MAAAA,EAAQ,SAAA;IACRC,YAAAA,EAAc,KAAA;IACdC,MAAAA,EAAQ,uCAAA;IACRC,UAAAA,EAAY,2BAAA;IACZN,KAAAA,EAAO;AACX,CAAA;AAEA,MAAMO,kBAAAA,GAAoC;AACtC,IAAA,GAAGN,WAAW;IACdK,UAAAA,EAAY,4BAAA;IACZE,WAAAA,EAAa,4BAAA;IACbR,KAAAA,EAAO;AACX,CAAA;AAEA,MAAMS,gBAAAA,GAAkC;IAAET,KAAAA,EAAO;AAAgC,CAAA;AAiBjF;;;;;;;;;;;;;;;;;;IAmBO,SAASU,KAAAA,CAAM,EAAEC,KAAAA,GAAQ,EAAE,EAAEC,WAAAA,GAAc,CAAC,EAAE,GAAGC,IAAAA,EAAkB,EAAA;AACtE,IAAA,qBACIC,GAAA,CAACC,IAAAA,EAAAA;AAAI,QAAA,GAAGF,IAAI;QAAEG,SAAAA,EAAU,yBAAA;QAA0BC,KAAAA,EAAOpB,SAAAA;AACpDc,QAAAA,QAAAA,EAAAA,KAAAA,CAAMO,GAAG,CAAC,CAACC,IAAAA,EAAMC,sBACdC,IAAA,CAACC,IAAAA,EAAAA;gBAEGN,SAAAA,EAAU,gCAAA;gBACVC,KAAAA,EAAOG,KAAAA,IAASR,cAAcW,SAAAA,GAAYd,gBAAAA;gBAC1Ce,cAAAA,EAAcJ,KAAAA,KAAUR,cAAc,MAAA,GAASW,SAAAA;;kCAC/CT,GAAA,CAACW,MAAAA,EAAAA;wBAAKT,SAAAA,EAAU,yCAAA;wBAA0CU,aAAAA,EAAY,MAAA;wBAAOT,KAAAA,EAAOG,KAAAA,IAASR,cAAcL,kBAAAA,GAAqBN,WAAAA;kCAC3HmB,KAAAA,GAAQ;;kCAEbN,GAAA,CAACa,eAAAA,EAAAA;wBAAgBR,IAAAA,EAAMA;;;AAPlBC,aAAAA,EAAAA,KAAAA,CAAAA;;AAYzB
|
|
1
|
+
{"version":3,"file":"Steps.js","sources":["../../../menu/Steps.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CSSProperties, HTMLAttributes } from 'react';\nimport { MenuItem } from '../MenuItem';\nimport { MenuItemContent } from './MenuItemContent';\n\nconst listStyle: CSSProperties = { listStyle: 'none', margin: 0, padding: 0, color: 'var(--scene-text-color)' };\n\nconst markerStyle: CSSProperties = {\n width: '1.75rem',\n height: '1.75rem',\n borderRadius: '50%',\n border: '1px solid var(--scene-surface-border)',\n background: 'var(--scene-surface-card)',\n color: 'var(--scene-text-muted-color)',\n};\n\nconst reachedMarkerStyle: CSSProperties = {\n ...markerStyle,\n background: 'var(--scene-primary-color)',\n borderColor: 'var(--scene-primary-color)',\n color: 'var(--scene-primary-contrast-color)',\n};\n\nconst pendingStepStyle: CSSProperties = { color: 'var(--scene-text-muted-color)' };\n\n/**\n * The configuration {@link Steps} takes.\n */\nexport interface StepsProps extends HTMLAttributes<HTMLOListElement> {\n /**\n * The steps in the sequence, in order.\n */\n items?: MenuItem[];\n\n /**\n * The zero-based step the user is on. Everything before it counts as reached.\n */\n activeIndex?: number;\n}\n\n/**\n * A numbered horizontal indicator of where the user is in a sequence. Cratis-owned.\n *\n * This exists because PrimeReact 11 removed `primereact/steps` outright. `primereact/stepper` survives,\n * but it is not a replacement: a stepper owns the content of each step and drives moving between them,\n * whereas `steps` shows position and nothing else, next to whatever a screen chose to render itself. Scene\n * has both concepts and they are registered separately, so collapsing one into the other would silently\n * change what an authored screen means.\n *\n * It is an ordered list because that is what it is - a numbered sequence, read in order - and the step the\n * user is on is marked with `aria-current` rather than only with color, so the position is available to a\n * screen reader and not just to an eye.\n *\n * What it deliberately does not carry over from the v10 `Steps`: the indicator is read-only, so v10's\n * `readOnly={false}` mode where clicking a step jumped to it is gone, and with it the `onSelect` callback\n * and the internally held selection. A screen that wants navigable steps should hold the position itself\n * and render whatever control it wants to move between them. Item templates and the vertical layout are\n * not supported either.\n */\nexport function Steps({ items = [], activeIndex = 0, ...rest }: StepsProps) {\n return (\n <ol {...rest} className='flex items-center gap-4' style={listStyle}>\n {items.map((item, index) => (\n <li\n key={index}\n className='inline-flex items-center gap-2'\n style={index <= activeIndex ? undefined : pendingStepStyle}\n aria-current={index === activeIndex ? 'step' : undefined}>\n <span className='inline-flex items-center justify-center' aria-hidden='true' style={index <= activeIndex ? reachedMarkerStyle : markerStyle}>\n {index + 1}\n </span>\n <MenuItemContent item={item} />\n </li>\n ))}\n </ol>\n );\n}\n"],"names":["listStyle","margin","padding","color","markerStyle","width","height","borderRadius","border","background","reachedMarkerStyle","borderColor","pendingStepStyle","Steps","items","activeIndex","rest","_jsx","ol","className","style","map","item","index","_jsxs","li","undefined","aria-current","span","aria-hidden","MenuItemContent"],"mappings":";;;AAAA;AACA;AAMA,MAAMA,SAAAA,GAA2B;IAAEA,SAAAA,EAAW,MAAA;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AAAA,EAAAA;wBAAgBR,IAAAA,EAAMA;;;AAPlBC,aAAAA,EAAAA,KAAAA,CAAAA;;AAYzB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabMenu.js","sources":["../../../menu/TabMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CSSProperties, HTMLAttributes, useState } from 'react';\nimport { MenuItem } from '../MenuItem';\nimport { MenuItemAction } from './MenuItemAction';\n\nconst barStyle: CSSProperties = { borderBottom: '1px solid var(--scene-surface-border)', color: 'var(--scene-text-color)' };\n\nconst tabStyle: CSSProperties = {\n background: 'transparent',\n border: 'none',\n borderBottom: '2px solid transparent',\n color: 'var(--scene-text-muted-color)',\n cursor: 'pointer',\n font: 'inherit',\n textDecoration: 'none',\n};\n\nconst selectedTabStyle: CSSProperties = { ...tabStyle, borderBottomColor: 'var(--scene-primary-color)', color: 'var(--scene-text-color)' };\n\n/**\n * The configuration {@link TabMenu} takes.\n */\nexport interface TabMenuProps extends HTMLAttributes<HTMLElement> {\n /**\n * The destinations to show, in order.\n */\n items?: MenuItem[];\n\n /**\n * The zero-based entry to start on.\n */\n activeIndex?: number;\n}\n\n/**\n * Tab-styled horizontal navigation between destinations. Cratis-owned.\n *\n * This exists because PrimeReact 11 removed `primereact/tabmenu` outright. `primereact/tabs` survives and\n * was the obvious candidate to build on, but it was rejected on purpose: `Tabs.Tab` emits `role=\"tab\"` and\n * an `aria-controls` pointing at the tab panel it expects to sit beside, and a navigation bar has no\n * panels. Adopting it would produce markup that announces panels which do not exist and references ids\n * that resolve to nothing - a real accessibility defect traded for a little less code.\n *\n * So this is a `nav` holding links and buttons, with the current entry marked `aria-current`, which is the\n * pattern the tabs look is imitating. The tab appearance is styling; the semantics are navigation, and\n * they now agree.\n *\n * What it deliberately does not carry over from the v10 `TabMenu`: there is no roving-focus keyboard model\n * with arrow keys moving between entries - the entries are ordinary links and buttons in the tab order -\n * no scroll buttons when the entries overflow, no sliding active-bar animation, and no item templates. The\n * selected entry is held here so the control responds in a preview, exactly as the v10 adapter did.\n */\nexport function TabMenu({ items = [], activeIndex = 0, ...rest }: TabMenuProps) {\n const [selectedIndex, setSelectedIndex] = useState(activeIndex);\n\n return (\n <nav {...rest} className='flex items-center gap-2' style={barStyle}>\n {items.map((item, index) => (\n <MenuItemAction\n key={index}\n item={item}\n current={index === selectedIndex}\n className='inline-flex items-center gap-2 p-3'\n style={index === selectedIndex ? selectedTabStyle : tabStyle}\n onActivate={() => setSelectedIndex(index)}\n />\n ))}\n </nav>\n );\n}\n"],"names":["barStyle","borderBottom","color","tabStyle","background","border","cursor","font","textDecoration","selectedTabStyle","borderBottomColor","TabMenu","items","activeIndex","rest","selectedIndex","setSelectedIndex","useState","_jsx","nav","className","style","map","item","index","MenuItemAction","current","onActivate"],"mappings":";;;;AAOA,MAAMA,QAAAA,GAA0B;IAAEC,YAAAA,EAAc,uCAAA;IAAyCC,KAAAA,EAAO;AAA0B,CAAA;AAE1H,MAAMC,QAAAA,GAA0B;IAC5BC,UAAAA,EAAY,aAAA;IACZC,MAAAA,EAAQ,MAAA;IACRJ,YAAAA,EAAc,uBAAA;IACdC,KAAAA,EAAO,+BAAA;IACPI,MAAAA,EAAQ,SAAA;IACRC,IAAAA,EAAM,SAAA;IACNC,cAAAA,EAAgB;AACpB,CAAA;AAEA,MAAMC,gBAAAA,GAAkC;AAAE,IAAA,GAAGN,QAAQ;IAAEO,iBAAAA,EAAmB,4BAAA;IAA8BR,KAAAA,EAAO;AAA0B,CAAA;AAiBzI;;;;;;;;;;;;;;;;;IAkBO,SAASS,OAAAA,CAAQ,EAAEC,KAAAA,GAAQ,EAAE,EAAEC,WAAAA,GAAc,CAAC,EAAE,GAAGC,IAAAA,EAAoB,EAAA;AAC1E,IAAA,MAAM,CAACC,aAAAA,EAAeC,gBAAAA,CAAiB,GAAGC,QAAAA,CAASJ,WAAAA,CAAAA;AAEnD,IAAA,qBACIK,GAAA,CAACC,KAAAA,EAAAA;AAAK,QAAA,GAAGL,IAAI;QAAEM,SAAAA,EAAU,yBAAA;QAA0BC,KAAAA,EAAOrB,QAAAA;AACrDY,QAAAA,QAAAA,EAAAA,KAAAA,CAAMU,GAAG,CAAC,CAACC,IAAAA,EAAMC,sBACdN,GAAA,CAACO,cAAAA,EAAAA;gBAEGF,IAAAA,EAAMA,IAAAA;AACNG,gBAAAA,OAAAA,EAASF,KAAAA,KAAUT,aAAAA;gBACnBK,SAAAA,EAAU,oCAAA;gBACVC,KAAAA,EAAOG,KAAAA,KAAUT,gBAAgBN,gBAAAA,GAAmBN,QAAAA;AACpDwB,gBAAAA,UAAAA,EAAY,IAAMX,gBAAAA,CAAiBQ,KAAAA;AAL9BA,aAAAA,EAAAA,KAAAA,CAAAA;;AAUzB
|
|
1
|
+
{"version":3,"file":"TabMenu.js","sources":["../../../menu/TabMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CSSProperties, HTMLAttributes, useState } from 'react';\nimport { MenuItem } from '../MenuItem';\nimport { MenuItemAction } from './MenuItemAction';\n\nconst barStyle: CSSProperties = { borderBottom: '1px solid var(--scene-surface-border)', color: 'var(--scene-text-color)' };\n\nconst tabStyle: CSSProperties = {\n background: 'transparent',\n border: 'none',\n borderBottom: '2px solid transparent',\n color: 'var(--scene-text-muted-color)',\n cursor: 'pointer',\n font: 'inherit',\n textDecoration: 'none',\n};\n\nconst selectedTabStyle: CSSProperties = { ...tabStyle, borderBottomColor: 'var(--scene-primary-color)', color: 'var(--scene-text-color)' };\n\n/**\n * The configuration {@link TabMenu} takes.\n */\nexport interface TabMenuProps extends HTMLAttributes<HTMLElement> {\n /**\n * The destinations to show, in order.\n */\n items?: MenuItem[];\n\n /**\n * The zero-based entry to start on.\n */\n activeIndex?: number;\n}\n\n/**\n * Tab-styled horizontal navigation between destinations. Cratis-owned.\n *\n * This exists because PrimeReact 11 removed `primereact/tabmenu` outright. `primereact/tabs` survives and\n * was the obvious candidate to build on, but it was rejected on purpose: `Tabs.Tab` emits `role=\"tab\"` and\n * an `aria-controls` pointing at the tab panel it expects to sit beside, and a navigation bar has no\n * panels. Adopting it would produce markup that announces panels which do not exist and references ids\n * that resolve to nothing - a real accessibility defect traded for a little less code.\n *\n * So this is a `nav` holding links and buttons, with the current entry marked `aria-current`, which is the\n * pattern the tabs look is imitating. The tab appearance is styling; the semantics are navigation, and\n * they now agree.\n *\n * What it deliberately does not carry over from the v10 `TabMenu`: there is no roving-focus keyboard model\n * with arrow keys moving between entries - the entries are ordinary links and buttons in the tab order -\n * no scroll buttons when the entries overflow, no sliding active-bar animation, and no item templates. The\n * selected entry is held here so the control responds in a preview, exactly as the v10 adapter did.\n */\nexport function TabMenu({ items = [], activeIndex = 0, ...rest }: TabMenuProps) {\n const [selectedIndex, setSelectedIndex] = useState(activeIndex);\n\n return (\n <nav {...rest} className='flex items-center gap-2' style={barStyle}>\n {items.map((item, index) => (\n <MenuItemAction\n key={index}\n item={item}\n current={index === selectedIndex}\n className='inline-flex items-center gap-2 p-3'\n style={index === selectedIndex ? selectedTabStyle : tabStyle}\n onActivate={() => setSelectedIndex(index)}\n />\n ))}\n </nav>\n );\n}\n"],"names":["barStyle","borderBottom","color","tabStyle","background","border","cursor","font","textDecoration","selectedTabStyle","borderBottomColor","TabMenu","items","activeIndex","rest","selectedIndex","setSelectedIndex","useState","_jsx","nav","className","style","map","item","index","MenuItemAction","current","onActivate"],"mappings":";;;;AAOA,MAAMA,QAAAA,GAA0B;IAAEC,YAAAA,EAAc,uCAAA;IAAyCC,KAAAA,EAAO;AAA0B,CAAA;AAE1H,MAAMC,QAAAA,GAA0B;IAC5BC,UAAAA,EAAY,aAAA;IACZC,MAAAA,EAAQ,MAAA;IACRJ,YAAAA,EAAc,uBAAA;IACdC,KAAAA,EAAO,+BAAA;IACPI,MAAAA,EAAQ,SAAA;IACRC,IAAAA,EAAM,SAAA;IACNC,cAAAA,EAAgB;AACpB,CAAA;AAEA,MAAMC,gBAAAA,GAAkC;AAAE,IAAA,GAAGN,QAAQ;IAAEO,iBAAAA,EAAmB,4BAAA;IAA8BR,KAAAA,EAAO;AAA0B,CAAA;AAiBzI;;;;;;;;;;;;;;;;;IAkBO,SAASS,OAAAA,CAAQ,EAAEC,KAAAA,GAAQ,EAAE,EAAEC,WAAAA,GAAc,CAAC,EAAE,GAAGC,IAAAA,EAAoB,EAAA;AAC1E,IAAA,MAAM,CAACC,aAAAA,EAAeC,gBAAAA,CAAiB,GAAGC,QAAAA,CAASJ,WAAAA,CAAAA;AAEnD,IAAA,qBACIK,GAAA,CAACC,KAAAA,EAAAA;AAAK,QAAA,GAAGL,IAAI;QAAEM,SAAAA,EAAU,yBAAA;QAA0BC,KAAAA,EAAOrB,QAAAA;AACrDY,QAAAA,QAAAA,EAAAA,KAAAA,CAAMU,GAAG,CAAC,CAACC,IAAAA,EAAMC,sBACdN,GAAA,CAACO,cAAAA,EAAAA;gBAEGF,IAAAA,EAAMA,IAAAA;AACNG,gBAAAA,OAAAA,EAASF,KAAAA,KAAUT,aAAAA;gBACnBK,SAAAA,EAAU,oCAAA;gBACVC,KAAAA,EAAOG,KAAAA,KAAUT,gBAAgBN,gBAAAA,GAAmBN,QAAAA;AACpDwB,gBAAAA,UAAAA,EAAY,IAAMX,gBAAAA,CAAiBQ,KAAAA;AAL9BA,aAAAA,EAAAA,KAAAA,CAAAA;;AAUzB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TieredMenu.js","sources":["../../../menu/TieredMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CSSProperties, HTMLAttributes, useState } from 'react';\nimport { MenuItem } from '../MenuItem';\nimport { MenuItemAction } from './MenuItemAction';\nimport { MenuItemContent } from './MenuItemContent';\n\nconst rootStyle: CSSProperties = {\n background: 'var(--scene-surface-card)',\n border: '1px solid var(--scene-surface-border)',\n borderRadius: 'var(--scene-content-border-radius)',\n color: 'var(--scene-text-color)',\n width: 'fit-content',\n};\n\nconst listStyle: CSSProperties = { listStyle: 'none', margin: 0, padding: 0, minWidth: '12rem' };\n\nconst entryStyle: CSSProperties = {\n background: 'transparent',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n textAlign: 'left',\n textDecoration: 'none',\n width: '100%',\n};\n\nconst submenuStyle: CSSProperties = {\n position: 'absolute',\n top: 0,\n left: '100%',\n zIndex: 1,\n background: 'var(--scene-surface-overlay)',\n border: '1px solid var(--scene-surface-border)',\n borderRadius: 'var(--scene-content-border-radius)',\n};\n\nconst separatorStyle: CSSProperties = { borderTop: '1px solid var(--scene-surface-border)', margin: 0 };\n\n/**\n * The configuration {@link TieredMenu} takes.\n */\nexport interface TieredMenuProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * The commands to show. Nesting is followed to any depth - each level opens beside its parent.\n */\n items?: MenuItem[];\n}\n\n/**\n * A vertical menu whose submenus open to the side, to any depth. Cratis-owned.\n *\n * This exists because PrimeReact 11 removed `primereact/tieredmenu` outright, with no successor and no\n * headless hook. The surviving `primereact/menu` parts can nest through `Menu.Submenu`, but only inside a\n * popup anchored to a trigger; a tiered menu is an *inline* control that is already open, which those\n * parts have no shape for. Rebuilding it as plain markup is both smaller and more honest than bending an\n * overlay into standing still.\n *\n * Depth is the one thing this keeps unrestricted, because depth is the whole point of the component: each\n * level renders the same way and holds its own open child, so an authored model nests as far as its\n * author took it.\n *\n * What it deliberately does not carry over from the v10 `TieredMenu`: submenus open on click, never on\n * hover; there is no roving-focus keyboard model with arrow keys walking levels, only the tab order the\n * browser gives; the popup form (`popup` plus an imperative `toggle`) is gone entirely, since Scene only\n * ever rendered the inline one; opening a deep branch does not flip the level to the other side when it\n * would run off the viewport; and item templates are not supported.\n */\nexport function TieredMenu({ items = [], ...rest }: TieredMenuProps) {\n return (\n <div {...rest} style={rootStyle}>\n <TieredMenuLevel items={items} />\n </div>\n );\n}\n\n/**\n * The configuration one level of a tiered menu takes.\n */\ninterface TieredMenuLevelProps {\n /**\n * The entries at this level.\n */\n items: MenuItem[];\n}\n\n/**\n * One level of a tiered menu, holding which of its own entries is currently expanded.\n *\n * Keeping the open entry per level rather than as one path in the root is what makes the recursion\n * trivial: a level knows only about its own children, so it can render another of itself for them without\n * threading an index path down and back.\n */\nfunction TieredMenuLevel({ items }: TieredMenuLevelProps) {\n const [openIndex, setOpenIndex] = useState<number | undefined>(undefined);\n\n return (\n <ul role='menu' style={listStyle}>\n {items.map((item, index) => {\n if (item.separator === true) return <li key={index} role='separator' style={separatorStyle} />;\n\n const children = item.items ?? [];\n\n return (\n <li key={index} role='none' className='relative'>\n {children.length > 0 ? (\n <>\n <button\n type='button'\n role='menuitem'\n className='flex items-center gap-2 p-3'\n style={entryStyle}\n disabled={item.disabled}\n aria-haspopup='true'\n aria-expanded={openIndex === index}\n onClick={() => setOpenIndex(openIndex === index ? undefined : index)}>\n <MenuItemContent item={item} />\n <i className='pi pi-angle-right' aria-hidden='true' />\n </button>\n {openIndex === index && (\n <div style={submenuStyle}>\n <TieredMenuLevel items={children} />\n </div>\n )}\n </>\n ) : (\n <MenuItemAction item={item} role='menuitem' className='flex items-center gap-2 p-3' style={entryStyle} />\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n"],"names":["rootStyle","background","border","borderRadius","color","width","listStyle","margin","padding","minWidth","entryStyle","cursor","font","textAlign","textDecoration","submenuStyle","position","top","left","zIndex","separatorStyle","borderTop","TieredMenu","items","rest","_jsx","div","style","TieredMenuLevel","openIndex","setOpenIndex","useState","undefined","ul","role","map","item","index","separator","li","children","className","length","_jsxs","_Fragment","button","type","disabled","aria-haspopup","aria-expanded","onClick","MenuItemContent","i","aria-hidden","MenuItemAction"],"mappings":";;;;;AAQA,MAAMA,SAAAA,GAA2B;IAC7BC,UAAAA,EAAY,2BAAA;IACZC,MAAAA,EAAQ,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EAAOZ,YAAAA;AACR,4BAAA,QAAA,gBAAAU,GAAA,CAACG,eAAAA,EAAAA;gCAAgBL,KAAAA,EAAOiB;;;;mCAKpCf,GAAA,CAAC6B,cAAAA,EAAAA;oBAAelB,IAAAA,EAAMA,IAAAA;oBAAMF,IAAAA,EAAK,UAAA;oBAAWO,SAAAA,EAAU,6BAAA;oBAA8Bd,KAAAA,EAAOjB;;AAtB1F2B,aAAAA,EAAAA,KAAAA,CAAAA;AA0BjB,QAAA,CAAA;;AAGZ
|
|
1
|
+
{"version":3,"file":"TieredMenu.js","sources":["../../../menu/TieredMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { CSSProperties, HTMLAttributes, useState } from 'react';\nimport { MenuItem } from '../MenuItem';\nimport { MenuItemAction } from './MenuItemAction';\nimport { MenuItemContent } from './MenuItemContent';\n\nconst rootStyle: CSSProperties = {\n background: 'var(--scene-surface-card)',\n border: '1px solid var(--scene-surface-border)',\n borderRadius: 'var(--scene-content-border-radius)',\n color: 'var(--scene-text-color)',\n width: 'fit-content',\n};\n\nconst listStyle: CSSProperties = { listStyle: 'none', margin: 0, padding: 0, minWidth: '12rem' };\n\nconst entryStyle: CSSProperties = {\n background: 'transparent',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n textAlign: 'left',\n textDecoration: 'none',\n width: '100%',\n};\n\nconst submenuStyle: CSSProperties = {\n position: 'absolute',\n top: 0,\n left: '100%',\n zIndex: 1,\n background: 'var(--scene-surface-overlay)',\n border: '1px solid var(--scene-surface-border)',\n borderRadius: 'var(--scene-content-border-radius)',\n};\n\nconst separatorStyle: CSSProperties = { borderTop: '1px solid var(--scene-surface-border)', margin: 0 };\n\n/**\n * The configuration {@link TieredMenu} takes.\n */\nexport interface TieredMenuProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * The commands to show. Nesting is followed to any depth - each level opens beside its parent.\n */\n items?: MenuItem[];\n}\n\n/**\n * A vertical menu whose submenus open to the side, to any depth. Cratis-owned.\n *\n * This exists because PrimeReact 11 removed `primereact/tieredmenu` outright, with no successor and no\n * headless hook. The surviving `primereact/menu` parts can nest through `Menu.Submenu`, but only inside a\n * popup anchored to a trigger; a tiered menu is an *inline* control that is already open, which those\n * parts have no shape for. Rebuilding it as plain markup is both smaller and more honest than bending an\n * overlay into standing still.\n *\n * Depth is the one thing this keeps unrestricted, because depth is the whole point of the component: each\n * level renders the same way and holds its own open child, so an authored model nests as far as its\n * author took it.\n *\n * What it deliberately does not carry over from the v10 `TieredMenu`: submenus open on click, never on\n * hover; there is no roving-focus keyboard model with arrow keys walking levels, only the tab order the\n * browser gives; the popup form (`popup` plus an imperative `toggle`) is gone entirely, since Scene only\n * ever rendered the inline one; opening a deep branch does not flip the level to the other side when it\n * would run off the viewport; and item templates are not supported.\n */\nexport function TieredMenu({ items = [], ...rest }: TieredMenuProps) {\n return (\n <div {...rest} style={rootStyle}>\n <TieredMenuLevel items={items} />\n </div>\n );\n}\n\n/**\n * The configuration one level of a tiered menu takes.\n */\ninterface TieredMenuLevelProps {\n /**\n * The entries at this level.\n */\n items: MenuItem[];\n}\n\n/**\n * One level of a tiered menu, holding which of its own entries is currently expanded.\n *\n * Keeping the open entry per level rather than as one path in the root is what makes the recursion\n * trivial: a level knows only about its own children, so it can render another of itself for them without\n * threading an index path down and back.\n */\nfunction TieredMenuLevel({ items }: TieredMenuLevelProps) {\n const [openIndex, setOpenIndex] = useState<number | undefined>(undefined);\n\n return (\n <ul role='menu' style={listStyle}>\n {items.map((item, index) => {\n if (item.separator === true) return <li key={index} role='separator' style={separatorStyle} />;\n\n const children = item.items ?? [];\n\n return (\n <li key={index} role='none' className='relative'>\n {children.length > 0 ? (\n <>\n <button\n type='button'\n role='menuitem'\n className='flex items-center gap-2 p-3'\n style={entryStyle}\n disabled={item.disabled}\n aria-haspopup='true'\n aria-expanded={openIndex === index}\n onClick={() => setOpenIndex(openIndex === index ? undefined : index)}>\n <MenuItemContent item={item} />\n <i className='pi pi-angle-right' aria-hidden='true' />\n </button>\n {openIndex === index && (\n <div style={submenuStyle}>\n <TieredMenuLevel items={children} />\n </div>\n )}\n </>\n ) : (\n <MenuItemAction item={item} role='menuitem' className='flex items-center gap-2 p-3' style={entryStyle} />\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n"],"names":["rootStyle","background","border","borderRadius","color","width","listStyle","margin","padding","minWidth","entryStyle","cursor","font","textAlign","textDecoration","submenuStyle","position","top","left","zIndex","separatorStyle","borderTop","TieredMenu","items","rest","_jsx","div","style","TieredMenuLevel","openIndex","setOpenIndex","useState","undefined","ul","role","map","item","index","separator","li","children","className","length","_jsxs","_Fragment","button","type","disabled","aria-haspopup","aria-expanded","onClick","MenuItemContent","i","aria-hidden","MenuItemAction"],"mappings":";;;;;AAQA,MAAMA,SAAAA,GAA2B;IAC7BC,UAAAA,EAAY,2BAAA;IACZC,MAAAA,EAAQ,uCAAA;IACRC,YAAAA,EAAc,oCAAA;IACdC,KAAAA,EAAO,yBAAA;IACPC,KAAAA,EAAO;AACX,CAAA;AAEA,MAAMC,SAAAA,GAA2B;IAAEA,SAAAA,EAAW,MAAA;IAAQC,MAAAA,EAAQ,CAAA;IAAGC,OAAAA,EAAS,CAAA;IAAGC,QAAAA,EAAU;AAAQ,CAAA;AAE/F,MAAMC,UAAAA,GAA4B;IAC9BT,UAAAA,EAAY,aAAA;IACZC,MAAAA,EAAQ,MAAA;IACRE,KAAAA,EAAO,SAAA;IACPO,MAAAA,EAAQ,SAAA;IACRC,IAAAA,EAAM,SAAA;IACNC,SAAAA,EAAW,MAAA;IACXC,cAAAA,EAAgB,MAAA;IAChBT,KAAAA,EAAO;AACX,CAAA;AAEA,MAAMU,YAAAA,GAA8B;IAChCC,QAAAA,EAAU,UAAA;IACVC,GAAAA,EAAK,CAAA;IACLC,IAAAA,EAAM,MAAA;IACNC,MAAAA,EAAQ,CAAA;IACRlB,UAAAA,EAAY,8BA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A,EAAAA;4BACGC,IAAAA,EAAK,QAAA;4BACLZ,IAAAA,EAAK,UAAA;4BACLO,SAAAA,EAAU,6BAAA;4BACVd,KAAAA,EAAOjB,UAAAA;AACPqC,4BAAAA,QAAAA,EAAUX,KAAKW,QAAQ;4BACvBC,eAAAA,EAAc,MAAA;AACdC,4BAAAA,eAAAA,EAAepB,SAAAA,KAAcQ,KAAAA;AAC7Ba,4BAAAA,OAAAA,EAAS,IAAMpB,YAAAA,CAAaD,SAAAA,KAAcQ,KAAAA,GAAQL,SAAAA,GAAYK,KAAAA,CAAAA;;8CAC9DZ,GAAA,CAAC0B,eAAAA,EAAAA;oCAAgBf,IAAAA,EAAMA;;8CACvBX,GAAA,CAAC2B,GAAAA,EAAAA;oCAAEX,SAAAA,EAAU,mBAAA;oCAAoBY,aAAAA,EAAY;;;;AAEhDxB,wBAAAA,SAAAA,KAAcQ,uBACXZ,GAAA,CAACC,KAAAA,EAAAA;4BAAIC,KAAAA,EAAOZ,YAAAA;AACR,4BAAA,QAAA,gBAAAU,GAAA,CAACG,eAAAA,EAAAA;gCAAgBL,KAAAA,EAAOiB;;;;mCAKpCf,GAAA,CAAC6B,cAAAA,EAAAA;oBAAelB,IAAAA,EAAMA,IAAAA;oBAAMF,IAAAA,EAAK,UAAA;oBAAWO,SAAAA,EAAU,6BAAA;oBAA8Bd,KAAAA,EAAOjB;;AAtB1F2B,aAAAA,EAAAA,KAAAA,CAAAA;AA0BjB,QAAA,CAAA;;AAGZ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuItems.js","sources":["../../menuItems.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { MenuItem } from './MenuItem';\nimport { SceneElement } from '@cratis/scene.model';\nimport { arrayProperty } from './properties';\n\n/**\n * Turns raw authored entries into the `MenuItem` model every PrimeReact menu, menubar, breadcrumb,\n * split button and dock takes.\n *\n * Ten different components in this package all want the same nested `{ label, icon, items }` shape, so\n * reading it lives here once rather than in each of them. Nesting is followed to any depth because a\n * menubar and a tiered menu differ only in how deep an author actually goes - the reader should not be\n * the thing that decides.\n *\n * Entries with no usable label are dropped rather than rendered blank, and a `separator: true` entry is\n * kept without one, because that is PrimeReact's own way of spelling a divider.\n *\n * @param entries The raw entries to convert.\n * @returns The converted menu items, in order.\n */\nexport function toMenuItems(entries: unknown[]): MenuItem[] {\n const items: MenuItem[] = [];\n for (const entry of entries) {\n if (typeof entry === 'string') {\n items.push({ label: entry });\n continue;\n }\n\n if (typeof entry !== 'object' || entry === undefined || entry === null || Array.isArray(entry)) continue;\n\n const record = entry as Record<string, unknown>;\n const item: MenuItem = {};\n if (typeof record.label === 'string') item.label = record.label;\n if (typeof record.icon === 'string') item.icon = record.icon;\n if (typeof record.url === 'string') item.url = record.url;\n if (typeof record.disabled === 'boolean') item.disabled = record.disabled;\n if (record.separator === true) item.separator = true;\n if (Array.isArray(record.items)) item.items = toMenuItems(record.items);\n if (item.label === undefined && item.separator !== true) continue;\n items.push(item);\n }\n\n return items;\n}\n\n/**\n * Reads a menu model off a Scene element's properties.\n *\n * @param element The element whose properties to read.\n * @param name The property name holding the entries.\n * @returns The converted menu items, empty when the property is missing or is not an array.\n */\nexport function menuItemsProperty(element: SceneElement, name: string): MenuItem[] {\n return toMenuItems(arrayProperty(element, name));\n}\n"],"names":["toMenuItems","entries","items","entry","push","label","undefined","Array","isArray","record","item","icon","url","disabled","separator","menuItemsProperty","element","name","arrayProperty"],"mappings":";;AAAA;AACA;AAMA;;;;;;;;;;;;;;IAeO,SAASA,WAAAA,CAAYC,OAAkB,EAAA;AAC1C,IAAA,MAAMC,QAAoB,EAAE;IAC5B,KAAK,MAAMC,SAASF,OAAAA,CAAS;QACzB,IAAI,OAAOE,UAAU,QAAA,EAAU;AAC3BD,YAAAA,KAAAA,CAAME,IAAI,CAAC;gBAAEC,KAAAA,EAAOF;AAAM,aAAA,CAAA;AAC1B,YAAA;AAC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copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { MenuItem } from './MenuItem';\nimport { SceneElement } from '@cratis/scene.model';\nimport { arrayProperty } from './properties';\n\n/**\n * Turns raw authored entries into the `MenuItem` model every PrimeReact menu, menubar, breadcrumb,\n * split button and dock takes.\n *\n * Ten different components in this package all want the same nested `{ label, icon, items }` shape, so\n * reading it lives here once rather than in each of them. Nesting is followed to any depth because a\n * menubar and a tiered menu differ only in how deep an author actually goes - the reader should not be\n * the thing that decides.\n *\n * Entries with no usable label are dropped rather than rendered blank, and a `separator: true` entry is\n * kept without one, because that is PrimeReact's own way of spelling a divider.\n *\n * @param entries The raw entries to convert.\n * @returns The converted menu items, in order.\n */\nexport function toMenuItems(entries: unknown[]): MenuItem[] {\n const items: MenuItem[] = [];\n for (const entry of entries) {\n if (typeof entry === 'string') {\n items.push({ label: entry });\n continue;\n }\n\n if (typeof entry !== 'object' || entry === undefined || entry === null || Array.isArray(entry)) continue;\n\n const record = entry as Record<string, unknown>;\n const item: MenuItem = {};\n if (typeof record.label === 'string') item.label = record.label;\n if (typeof record.icon === 'string') item.icon = record.icon;\n if (typeof record.url === 'string') item.url = record.url;\n if (typeof record.disabled === 'boolean') item.disabled = record.disabled;\n if (record.separator === true) item.separator = true;\n if (Array.isArray(record.items)) item.items = toMenuItems(record.items);\n if (item.label === undefined && item.separator !== true) continue;\n items.push(item);\n }\n\n return items;\n}\n\n/**\n * Reads a menu model off a Scene element's properties.\n *\n * @param element The element whose properties to read.\n * @param name The property name holding the entries.\n * @returns The converted menu items, empty when the property is missing or is not an array.\n */\nexport function menuItemsProperty(element: SceneElement, name: string): MenuItem[] {\n return toMenuItems(arrayProperty(element, name));\n}\n"],"names":["toMenuItems","entries","items","entry","push","label","undefined","Array","isArray","record","item","icon","url","disabled","separator","menuItemsProperty","element","name","arrayProperty"],"mappings":";;AAAA;AACA;AAMA;;;;;;;;;;;;;;IAeO,SAASA,WAAAA,CAAYC,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;AACX;AAEA;;;;;;AAMC,IACM,SAASa,iBAAAA,CAAkBC,OAAqB,EAAEC,IAAY,EAAA;IACjE,OAAOjB,WAAAA,CAAYkB,cAAcF,OAAAA,EAASC,IAAAA,CAAAA,CAAAA;AAC9C;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeInlineMessage.js","sources":["../../../messages/PrimeInlineMessage.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Message } from 'primereact/message';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {severityProperty, stringProperty} from '../properties';\n\n/**\n * The `primeicons` class that stands for each severity.\n *\n * Deliberately duplicated from `PrimeMessage` rather than shared. Both adapters need it and neither needs\n * the other, and lifting six lines into a module would put a helper nobody outside this folder wants into\n * the package's public surface - `index.ts` re-exports everything a file exports.\n *\n * The icon is kept even for the compact variant, because severity is otherwise carried by color alone,\n * and \"the red one means you have to fix it\" is not information a reader who cannot see the color gets.\n */\nconst severityIcons: Record<string, string> = {\n success: 'pi pi-check-circle',\n info: 'pi pi-info-circle',\n warn: 'pi pi-exclamation-triangle',\n error: 'pi pi-times-circle',\n};\n\n/**\n * The `PrimeReact:inlineMessage` component - a short notice sitting beside the field it is about.\n *\n * The same PrimeReact `Message` as `message`, sized to its content instead of the row, so a validation\n * hint reads as belonging to one field rather than to the whole form. PrimeReact 11 gives that intent a\n * name of its own - `variant='simple'` drops the panel and leaves the icon and the words - which is\n * exactly what the v10 adapter was approximating with a width class, so the distinction survives the\n * migration and lands on a real prop rather than on CSS.\n *\n * The v11 module is `primereact/message`, singular. The plural `messages` module - a list of notices\n * driven imperatively - was removed with no replacement, but this package never declared a name for it,\n * so nothing here is lost with it.\n */\nexport function PrimeInlineMessage({ element }: RegisteredComponentProps) {\n const severity = severityProperty(element, 'severity', 'info');\n return (\n <Message.Root\n data-scene-id={element.id}\n className='inline-flex'\n variant='simple'\n severity={severity as 'success' | 'info' | 'warn' | 'error'}>\n <Message.Icon>\n <i className={severityIcons[severity] ?? severityIcons.info} aria-hidden='true' />\n </Message.Icon>\n <Message.Content>\n <Message.Text>{stringProperty(element, 'text', '')}</Message.Text>\n </Message.Content>\n </Message.Root>\n );\n}\n"],"names":["severityIcons","success","info","warn","error","PrimeInlineMessage","element","severity","severityProperty","_jsxs","Message","Root","data-scene-id","id","className","variant","_jsx","Icon","i","aria-hidden","Content","Text","stringProperty"],"mappings":";;;;AAOA;;;;;;;;;AASC,IACD,MAAMA,aAAAA,GAAwC;IAC1CC,OAAAA,EAAS,oBAAA;IACTC,IAAAA,EAAM,mBAAA;IACNC,IAAAA,EAAM,4BAAA;IACNC,KAAAA,EAAO;AACX,CAAA;AAEA;;;;;;;;;;;;AAYC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;IACpE,MAAMC,QAAAA,GAAWC,gBAAAA,CAAiBF,OAAAA,EAAS,UAAA,EAAY,MAAA,CAAA;IACvD,qBACIG,IAAA,CAACC,QAAQC,IAAI,EAAA;AACTC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QACzBC,SAAAA,EAAU,aAAA;QACVC,OAAAA,EAAQ,QAAA;QACRR,QAAAA,EAAUA,QAAAA;;AACV,0BAAAS,GAAA,CAACN,QAAQO,IAAI,EAAA;AACT,gBAAA,QAAA,gBAAAD,GAAA,CAACE,GAAAA,EAAAA;AAAEJ,oBAAAA,SAAAA,EAAWd,aAAa,CAACO,QAAAA,CAAS,IAAIP,cAAcE,IAAI;oBAAEiB,aAAAA,EAAY;;;AAE7E,0BAAAH,GAAA,CAACN,QAAQU,OAAO,EAAA;wCACZJ,GAAA,CAACN,QAAQW,IAAI,EAAA;AAAEC,oBAAAA,QAAAA,EAAAA,cAAAA,CAAehB,SAAS,MAAA,EAAQ,EAAA;;;;;AAI/D
|
|
1
|
+
{"version":3,"file":"PrimeInlineMessage.js","sources":["../../../messages/PrimeInlineMessage.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Message } from 'primereact/message';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {severityProperty, stringProperty} from '../properties';\n\n/**\n * The `primeicons` class that stands for each severity.\n *\n * Deliberately duplicated from `PrimeMessage` rather than shared. Both adapters need it and neither needs\n * the other, and lifting six lines into a module would put a helper nobody outside this folder wants into\n * the package's public surface - `index.ts` re-exports everything a file exports.\n *\n * The icon is kept even for the compact variant, because severity is otherwise carried by color alone,\n * and \"the red one means you have to fix it\" is not information a reader who cannot see the color gets.\n */\nconst severityIcons: Record<string, string> = {\n success: 'pi pi-check-circle',\n info: 'pi pi-info-circle',\n warn: 'pi pi-exclamation-triangle',\n error: 'pi pi-times-circle',\n};\n\n/**\n * The `PrimeReact:inlineMessage` component - a short notice sitting beside the field it is about.\n *\n * The same PrimeReact `Message` as `message`, sized to its content instead of the row, so a validation\n * hint reads as belonging to one field rather than to the whole form. PrimeReact 11 gives that intent a\n * name of its own - `variant='simple'` drops the panel and leaves the icon and the words - which is\n * exactly what the v10 adapter was approximating with a width class, so the distinction survives the\n * migration and lands on a real prop rather than on CSS.\n *\n * The v11 module is `primereact/message`, singular. The plural `messages` module - a list of notices\n * driven imperatively - was removed with no replacement, but this package never declared a name for it,\n * so nothing here is lost with it.\n */\nexport function PrimeInlineMessage({ element }: RegisteredComponentProps) {\n const severity = severityProperty(element, 'severity', 'info');\n return (\n <Message.Root\n data-scene-id={element.id}\n className='inline-flex'\n variant='simple'\n severity={severity as 'success' | 'info' | 'warn' | 'error'}>\n <Message.Icon>\n <i className={severityIcons[severity] ?? severityIcons.info} aria-hidden='true' />\n </Message.Icon>\n <Message.Content>\n <Message.Text>{stringProperty(element, 'text', '')}</Message.Text>\n </Message.Content>\n </Message.Root>\n );\n}\n"],"names":["severityIcons","success","info","warn","error","PrimeInlineMessage","element","severity","severityProperty","_jsxs","Message","Root","data-scene-id","id","className","variant","_jsx","Icon","i","aria-hidden","Content","Text","stringProperty"],"mappings":";;;;AAOA;;;;;;;;;AASC,IACD,MAAMA,aAAAA,GAAwC;IAC1CC,OAAAA,EAAS,oBAAA;IACTC,IAAAA,EAAM,mBAAA;IACNC,IAAAA,EAAM,4BAAA;IACNC,KAAAA,EAAO;AACX,CAAA;AAEA;;;;;;;;;;;;AAYC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;IACpE,MAAMC,QAAAA,GAAWC,gBAAAA,CAAiBF,OAAAA,EAAS,UAAA,EAAY,MAAA,CAAA;IACvD,qBACIG,IAAA,CAACC,QAAQC,IAAI,EAAA;AACTC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QACzBC,SAAAA,EAAU,aAAA;QACVC,OAAAA,EAAQ,QAAA;QACRR,QAAAA,EAAUA,QAAAA;;AACV,0BAAAS,GAAA,CAACN,QAAQO,IAAI,EAAA;AACT,gBAAA,QAAA,gBAAAD,GAAA,CAACE,GAAAA,EAAAA;AAAEJ,oBAAAA,SAAAA,EAAWd,aAAa,CAACO,QAAAA,CAAS,IAAIP,cAAcE,IAAI;oBAAEiB,aAAAA,EAAY;;;AAE7E,0BAAAH,GAAA,CAACN,QAAQU,OAAO,EAAA;wCACZJ,GAAA,CAACN,QAAQW,IAAI,EAAA;AAAEC,oBAAAA,QAAAA,EAAAA,cAAAA,CAAehB,SAAS,MAAA,EAAQ,EAAA;;;;;AAI/D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeMessage.js","sources":["../../../messages/PrimeMessage.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Message } from 'primereact/message';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {severityProperty, stringProperty} from '../properties';\n\n/**\n * The `primeicons` class that stands for each severity.\n *\n * PrimeReact 10 chose this icon for you; PrimeReact 11 made the icon a part you compose, which is right\n * for an application - it can use its own icon set - and wrong for a Scene element, which has no way to\n * name one. The mapping is restored here so a notice still reads at a glance rather than as an\n * undifferentiated colored box.\n */\nconst severityIcons: Record<string, string> = {\n success: 'pi pi-check-circle',\n info: 'pi pi-info-circle',\n warn: 'pi pi-exclamation-triangle',\n error: 'pi pi-times-circle',\n};\n\n/**\n * The `PrimeReact:message` component - a block-level notice attached to a region of a screen.\n *\n * Rendered full width, which is what separates it from `inlineMessage`: the two share PrimeReact's\n * `Message` component but mean different things on a screen, and the width is the difference a reader\n * actually sees. PrimeReact 11 adds a second axis for the same distinction - `variant` - and this one is\n * the default, bordered variant, because a region-level notice is meant to be a block you notice.\n *\n * The v11 module is `primereact/message`, singular, which is the one that survived; the plural `messages`\n * module - a list of notices with its own imperative API - was removed outright, and this package never\n * declared a name for it.\n *\n * v10's `warning` is translated to v11's `warn` so screens written against the old vocabulary keep their\n * color; `error` was and still is spelled the same here, unlike everywhere else in PrimeReact where the\n * danger severity is called `danger`.\n */\nexport function PrimeMessage({ element }: RegisteredComponentProps) {\n const severity = severityProperty(element, 'severity', 'info');\n return (\n <Message.Root data-scene-id={element.id} className='w-full' severity={severity as 'success' | 'info' | 'warn' | 'error'}>\n <Message.Icon>\n <i className={severityIcons[severity] ?? severityIcons.info} aria-hidden='true' />\n </Message.Icon>\n <Message.Content>\n <Message.Text>{stringProperty(element, 'text', '')}</Message.Text>\n </Message.Content>\n </Message.Root>\n );\n}\n"],"names":["severityIcons","success","info","warn","error","PrimeMessage","element","severity","severityProperty","_jsxs","Message","Root","data-scene-id","id","className","_jsx","Icon","i","aria-hidden","Content","Text","stringProperty"],"mappings":";;;;AAOA;;;;;;;AAOC,IACD,MAAMA,aAAAA,GAAwC;IAC1CC,OAAAA,EAAS,oBAAA;IACTC,IAAAA,EAAM,mBAAA;IACNC,IAAAA,EAAM,4BAAA;IACNC,KAAAA,EAAO;AACX,CAAA;AAEA;;;;;;;;;;;;;;;AAeC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAA4B,EAAA;IAC9D,MAAMC,QAAAA,GAAWC,gBAAAA,CAAiBF,OAAAA,EAAS,UAAA,EAAY,MAAA,CAAA;IACvD,qBACIG,IAAA,CAACC,QAAQC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QAAEC,SAAAA,EAAU,QAAA;QAASP,QAAAA,EAAUA,QAAAA;;AAClE,0BAAAQ,GAAA,CAACL,QAAQM,IAAI,EAAA;AACT,gBAAA,QAAA,gBAAAD,GAAA,CAACE,GAAAA,EAAAA;AAAEH,oBAAAA,SAAAA,EAAWd,aAAa,CAACO,QAAAA,CAAS,IAAIP,cAAcE,IAAI;oBAAEgB,aAAAA,EAAY;;;AAE7E,0BAAAH,GAAA,CAACL,QAAQS,OAAO,EAAA;wCACZJ,GAAA,CAACL,QAAQU,IAAI,EAAA;AAAEC,oBAAAA,QAAAA,EAAAA,cAAAA,CAAef,SAAS,MAAA,EAAQ,EAAA;;;;;AAI/D
|
|
1
|
+
{"version":3,"file":"PrimeMessage.js","sources":["../../../messages/PrimeMessage.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Message } from 'primereact/message';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {severityProperty, stringProperty} from '../properties';\n\n/**\n * The `primeicons` class that stands for each severity.\n *\n * PrimeReact 10 chose this icon for you; PrimeReact 11 made the icon a part you compose, which is right\n * for an application - it can use its own icon set - and wrong for a Scene element, which has no way to\n * name one. The mapping is restored here so a notice still reads at a glance rather than as an\n * undifferentiated colored box.\n */\nconst severityIcons: Record<string, string> = {\n success: 'pi pi-check-circle',\n info: 'pi pi-info-circle',\n warn: 'pi pi-exclamation-triangle',\n error: 'pi pi-times-circle',\n};\n\n/**\n * The `PrimeReact:message` component - a block-level notice attached to a region of a screen.\n *\n * Rendered full width, which is what separates it from `inlineMessage`: the two share PrimeReact's\n * `Message` component but mean different things on a screen, and the width is the difference a reader\n * actually sees. PrimeReact 11 adds a second axis for the same distinction - `variant` - and this one is\n * the default, bordered variant, because a region-level notice is meant to be a block you notice.\n *\n * The v11 module is `primereact/message`, singular, which is the one that survived; the plural `messages`\n * module - a list of notices with its own imperative API - was removed outright, and this package never\n * declared a name for it.\n *\n * v10's `warning` is translated to v11's `warn` so screens written against the old vocabulary keep their\n * color; `error` was and still is spelled the same here, unlike everywhere else in PrimeReact where the\n * danger severity is called `danger`.\n */\nexport function PrimeMessage({ element }: RegisteredComponentProps) {\n const severity = severityProperty(element, 'severity', 'info');\n return (\n <Message.Root data-scene-id={element.id} className='w-full' severity={severity as 'success' | 'info' | 'warn' | 'error'}>\n <Message.Icon>\n <i className={severityIcons[severity] ?? severityIcons.info} aria-hidden='true' />\n </Message.Icon>\n <Message.Content>\n <Message.Text>{stringProperty(element, 'text', '')}</Message.Text>\n </Message.Content>\n </Message.Root>\n );\n}\n"],"names":["severityIcons","success","info","warn","error","PrimeMessage","element","severity","severityProperty","_jsxs","Message","Root","data-scene-id","id","className","_jsx","Icon","i","aria-hidden","Content","Text","stringProperty"],"mappings":";;;;AAOA;;;;;;;AAOC,IACD,MAAMA,aAAAA,GAAwC;IAC1CC,OAAAA,EAAS,oBAAA;IACTC,IAAAA,EAAM,mBAAA;IACNC,IAAAA,EAAM,4BAAA;IACNC,KAAAA,EAAO;AACX,CAAA;AAEA;;;;;;;;;;;;;;;AAeC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAA4B,EAAA;IAC9D,MAAMC,QAAAA,GAAWC,gBAAAA,CAAiBF,OAAAA,EAAS,UAAA,EAAY,MAAA,CAAA;IACvD,qBACIG,IAAA,CAACC,QAAQC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QAAEC,SAAAA,EAAU,QAAA;QAASP,QAAAA,EAAUA,QAAAA;;AAClE,0BAAAQ,GAAA,CAACL,QAAQM,IAAI,EAAA;AACT,gBAAA,QAAA,gBAAAD,GAAA,CAACE,GAAAA,EAAAA;AAAEH,oBAAAA,SAAAA,EAAWd,aAAa,CAACO,QAAAA,CAAS,IAAIP,cAAcE,IAAI;oBAAEgB,aAAAA,EAAY;;;AAE7E,0BAAAH,GAAA,CAACL,QAAQS,OAAO,EAAA;wCACZJ,GAAA,CAACL,QAAQU,IAAI,EAAA;AAAEC,oBAAAA,QAAAA,EAAAA,cAAAA,CAAef,SAAS,MAAA,EAAQ,EAAA;;;;;AAI/D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeToast.js","sources":["../../../messages/PrimeToast.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useEffect } from 'react';\nimport { Toast } from 'primereact/toast';\nimport { Toaster, toast, useToasterContext } from 'primereact/toaster';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {numberProperty, severityProperty, stringProperty} from '../properties';\n\n/**\n * Renders whatever notifications are currently queued for the surrounding toaster.\n *\n * PrimeReact 11 splits a toast in two: a `Toaster` owns the queue, the position and the timers, and the\n * caller decides what one notification looks like. Nothing renders until someone maps the queue, which is\n * what this does - it has to be its own component because reading the queue means reading the toaster's\n * context, and that context is only available below the `Toaster.Root` that provides it.\n *\n * The severity icons are chosen here rather than left out because `Toast.Icon` renders only when its\n * `match` equals the toast's severity, so the four are alternatives, not four icons at once.\n */\nfunction ToastList() {\n const toaster = useToasterContext();\n if (toaster === undefined) return null;\n\n return (\n <>\n {toaster.toasts.map((item) => (\n <Toast.Root key={item.id} toast={item}>\n <Toast.Icon match='success'>\n <i className='pi pi-check-circle' aria-hidden='true' />\n </Toast.Icon>\n <Toast.Icon match='info'>\n <i className='pi pi-info-circle' aria-hidden='true' />\n </Toast.Icon>\n <Toast.Icon match='warn'>\n <i className='pi pi-exclamation-triangle' aria-hidden='true' />\n </Toast.Icon>\n <Toast.Icon match='error'>\n <i className='pi pi-times-circle' aria-hidden='true' />\n </Toast.Icon>\n <Toast.Content>\n <Toast.Title />\n <Toast.Description />\n </Toast.Content>\n <Toast.Close aria-label='Dismiss'>\n <i className='pi pi-times' aria-hidden='true' />\n </Toast.Close>\n </Toast.Root>\n ))}\n </>\n );\n}\n\n/**\n * The `PrimeReact:toast` component - a transient notification in a corner of the screen.\n *\n * A toast is purely imperative: nothing renders until someone announces something. A Scene element cannot\n * make that call, so the adapter makes it once on mount from the element's own properties. The element\n * therefore reads as \"this screen announces this\" rather than as a component that happens to render\n * nothing, which is what a literal wrapper would produce.\n *\n * PrimeReact 11 replaced v10's per-component ref and `show()` with a module-level queue and a free\n * `toast()` function - a better arrangement for an application, since anything can announce without\n * holding a ref, but a shared one. The element's own id is used as the toast's group so this toaster shows\n * only what this element announced, and the announcement is withdrawn on unmount; without both, several\n * `toast` elements on one screen would each show all of each other's notifications and leave them behind.\n *\n * `data-scene-id` sits on a wrapper rather than on the toaster, because the toaster renders through a\n * portal to the end of the document: the identifying attribute would leave the position in the tree where\n * the element was actually authored, which is where a design-time tool looks for it.\n */\nexport function PrimeToast({ element }: RegisteredComponentProps) {\n const severity = severityProperty(element, 'severity', 'info');\n const summary = stringProperty(element, 'summary', '');\n const detail = stringProperty(element, 'detail', '');\n const life = numberProperty(element, 'life', 3000);\n const group = element.id;\n\n useEffect(() => {\n const id = toast({\n group,\n severity: severity as 'success' | 'info' | 'warn' | 'error',\n title: summary,\n description: detail,\n duration: life,\n });\n return () => toast.dismiss(id);\n }, [group, severity, summary, detail, life]);\n\n return (\n <div data-scene-id={element.id}>\n <Toaster.Root\n group={group}\n timeout={life}\n position={stringProperty(element, 'position', 'top-right') as 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center' | 'center'}>\n <Toaster.Portal>\n <Toaster.Region>\n <ToastList />\n </Toaster.Region>\n </Toaster.Portal>\n </Toaster.Root>\n </div>\n );\n}\n"],"names":["ToastList","toaster","useToasterContext","undefined","_jsx","_Fragment","toasts","map","item","_jsxs","Toast","Root","toast","Icon","match","i","className","aria-hidden","Content","Title","Description","Close","aria-label","id","PrimeToast","element","severity","severityProperty","summary","stringProperty","detail","life","numberProperty","group","useEffect","title","description","duration","dismiss","div","data-scene-id","Toaster","timeout","position","Portal","Region"],"mappings":";;;;;;AASA;;;;;;;;;;AAUC,IACD,SAASA,SAAAA,GAAAA;AACL,IAAA,MAAMC,OAAAA,GAAUC,iBAAAA,EAAAA;IAChB,IAAID,OAAAA,KAAYE,WAAW,OAAO,IAAA;IAElC,qBACIC,GAAA,CAAAC,QAAA,EAAA;kBACKJ,OAAAA,CAAQK,MAAM,CAACC,GAAG,CAAC,CAACC,IAAAA,iBACjBC,IAAA,CAACC,MAAMC,IAAI,EAAA;gBAAeC,KAAAA,EAAOJ,IAAAA;;AAC7B,kCAAAJ,GAAA,CAACM,MAAMG,IAAI,EAAA;wBAACC,KAAAA,EAAM,SAAA;AACd,wBAAA,QAAA,gBAAAV,GAAA,CAACW,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,oBAAA;4BAAqBC,aAAAA,EAAY;;;AAElD,kCAAAb,GAAA,CAACM,MAAMG,IAAI,EAAA;wBAACC,KAAAA,EAAM,MAAA;AACd,wBAAA,QAAA,gBAAAV,GAAA,CAACW,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,mBAAA;4BAAoBC,aAAAA,EAAY;;;AAEjD,kCAAAb,GAAA,CAACM,MAAMG,IAAI,EAAA;wBAACC,KAAAA,EAAM,MAAA;AACd,wBAAA,QAAA,gBAAAV,GAAA,CAACW,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,4BAAA;4BAA6BC,aAAAA,EAAY;;;AAE1D,kCAAAb,GAAA,CAACM,MAAMG,IAAI,EAAA;wBAACC,KAAAA,EAAM,OAAA;AACd,wBAAA,QAAA,gBAAAV,GAAA,CAACW,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,oBAAA;4BAAqBC,aAAAA,EAAY;;;AAElD,kCAA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K,KAAA,CAAA;AAE3C,IAAA,qBACI3B,GAAA,CAACmC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAef,QAAQF,EAAE;gCAC1BnB,GAAA,CAACqC,QAAQ9B,IAAI,EAAA;YACTsB,KAAAA,EAAOA,KAAAA;YACPS,OAAAA,EAASX,IAAAA;YACTY,QAAAA,EAAUd,cAAAA,CAAeJ,SAAS,UAAA,EAAY,WAAA,CAAA;oCAC9CrB,GAAA,CAACqC,QAAQG,MAAM,EAAA;wCACXxC,GAAA,CAACqC,QAAQI,MAAM,EAAA;AACX,oBAAA,QAAA,gBAAAzC,GAAA,CAACJ,SAAAA,EAAAA,EAAAA;;;;;AAMzB
|
|
1
|
+
{"version":3,"file":"PrimeToast.js","sources":["../../../messages/PrimeToast.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useEffect } from 'react';\nimport { Toast } from 'primereact/toast';\nimport { Toaster, toast, useToasterContext } from 'primereact/toaster';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {numberProperty, severityProperty, stringProperty} from '../properties';\n\n/**\n * Renders whatever notifications are currently queued for the surrounding toaster.\n *\n * PrimeReact 11 splits a toast in two: a `Toaster` owns the queue, the position and the timers, and the\n * caller decides what one notification looks like. Nothing renders until someone maps the queue, which is\n * what this does - it has to be its own component because reading the queue means reading the toaster's\n * context, and that context is only available below the `Toaster.Root` that provides it.\n *\n * The severity icons are chosen here rather than left out because `Toast.Icon` renders only when its\n * `match` equals the toast's severity, so the four are alternatives, not four icons at once.\n */\nfunction ToastList() {\n const toaster = useToasterContext();\n if (toaster === undefined) return null;\n\n return (\n <>\n {toaster.toasts.map((item) => (\n <Toast.Root key={item.id} toast={item}>\n <Toast.Icon match='success'>\n <i className='pi pi-check-circle' aria-hidden='true' />\n </Toast.Icon>\n <Toast.Icon match='info'>\n <i className='pi pi-info-circle' aria-hidden='true' />\n </Toast.Icon>\n <Toast.Icon match='warn'>\n <i className='pi pi-exclamation-triangle' aria-hidden='true' />\n </Toast.Icon>\n <Toast.Icon match='error'>\n <i className='pi pi-times-circle' aria-hidden='true' />\n </Toast.Icon>\n <Toast.Content>\n <Toast.Title />\n <Toast.Description />\n </Toast.Content>\n <Toast.Close aria-label='Dismiss'>\n <i className='pi pi-times' aria-hidden='true' />\n </Toast.Close>\n </Toast.Root>\n ))}\n </>\n );\n}\n\n/**\n * The `PrimeReact:toast` component - a transient notification in a corner of the screen.\n *\n * A toast is purely imperative: nothing renders until someone announces something. A Scene element cannot\n * make that call, so the adapter makes it once on mount from the element's own properties. The element\n * therefore reads as \"this screen announces this\" rather than as a component that happens to render\n * nothing, which is what a literal wrapper would produce.\n *\n * PrimeReact 11 replaced v10's per-component ref and `show()` with a module-level queue and a free\n * `toast()` function - a better arrangement for an application, since anything can announce without\n * holding a ref, but a shared one. The element's own id is used as the toast's group so this toaster shows\n * only what this element announced, and the announcement is withdrawn on unmount; without both, several\n * `toast` elements on one screen would each show all of each other's notifications and leave them behind.\n *\n * `data-scene-id` sits on a wrapper rather than on the toaster, because the toaster renders through a\n * portal to the end of the document: the identifying attribute would leave the position in the tree where\n * the element was actually authored, which is where a design-time tool looks for it.\n */\nexport function PrimeToast({ element }: RegisteredComponentProps) {\n const severity = severityProperty(element, 'severity', 'info');\n const summary = stringProperty(element, 'summary', '');\n const detail = stringProperty(element, 'detail', '');\n const life = numberProperty(element, 'life', 3000);\n const group = element.id;\n\n useEffect(() => {\n const id = toast({\n group,\n severity: severity as 'success' | 'info' | 'warn' | 'error',\n title: summary,\n description: detail,\n duration: life,\n });\n return () => toast.dismiss(id);\n }, [group, severity, summary, detail, life]);\n\n return (\n <div data-scene-id={element.id}>\n <Toaster.Root\n group={group}\n timeout={life}\n position={stringProperty(element, 'position', 'top-right') as 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center' | 'center'}>\n <Toaster.Portal>\n <Toaster.Region>\n <ToastList />\n </Toaster.Region>\n </Toaster.Portal>\n </Toaster.Root>\n </div>\n );\n}\n"],"names":["ToastList","toaster","useToasterContext","undefined","_jsx","_Fragment","toasts","map","item","_jsxs","Toast","Root","toast","Icon","match","i","className","aria-hidden","Content","Title","Description","Close","aria-label","id","PrimeToast","element","severity","severityProperty","summary","stringProperty","detail","life","numberProperty","group","useEffect","title","description","duration","dismiss","div","data-scene-id","Toaster","timeout","position","Portal","Region"],"mappings":";;;;;;AASA;;;;;;;;;;AAUC,IACD,SAASA,SAAAA,GAAAA;AACL,IAAA,MAAMC,OAAAA,GAAUC,iBAAAA,EAAAA;IAChB,IAAID,OAAAA,KAAYE,WAAW,OAAO,IAAA;IAElC,qBACIC,GAAA,CAAAC,QAAA,EAAA;kBACKJ,OAAAA,CAAQK,MAAM,CAACC,GAAG,CAAC,CAACC,IAAAA,iBACjBC,IAAA,CAACC,MAAMC,IAAI,EAAA;gBAAeC,KAAAA,EAAOJ,IAAAA;;AAC7B,kCAAAJ,GAAA,CAACM,MAAMG,IAAI,EAAA;wBAACC,KAAAA,EAAM,SAAA;AACd,wBAAA,QAAA,gBAAAV,GAAA,CAACW,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,oBAAA;4BAAqBC,aAAAA,EAAY;;;AAElD,kCAAAb,GAAA,CAACM,MAAMG,IAAI,EAAA;wBAACC,KAAAA,EAAM,MAAA;AACd,wBAAA,QAAA,gBAAAV,GAAA,CAACW,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,mBAAA;4BAAoBC,aAAAA,EAAY;;;AAEjD,kCAAAb,GAAA,CAACM,MAAMG,IAAI,EAAA;wBAACC,KAAAA,EAAM,MAAA;AACd,wBAAA,QAAA,gBAAAV,GAAA,CAACW,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,4BAAA;4BAA6BC,aAAAA,EAAY;;;AAE1D,kCAAAb,GAAA,CAACM,MAAMG,IAAI,EAAA;wBAACC,KAAAA,EAAM,OAAA;AACd,wBAAA,QAAA,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ACU,QAAAA,KAAAA;AAAOP,QAAAA,QAAAA;AAAUE,QAAAA,OAAAA;AAASE,QAAAA,MAAAA;AAAQC,QAAAA;AAAK,KAAA,CAAA;AAE3C,IAAA,qBACI3B,GAAA,CAACmC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAef,QAAQF,EAAE;gCAC1BnB,GAAA,CAACqC,QAAQ9B,IAAI,EAAA;YACTsB,KAAAA,EAAOA,KAAAA;YACPS,OAAAA,EAASX,IAAAA;YACTY,QAAAA,EAAUd,cAAAA,CAAeJ,SAAS,UAAA,EAAY,WAAA,CAAA;oCAC9CrB,GAAA,CAACqC,QAAQG,MAAM,EAAA;wCACXxC,GAAA,CAACqC,QAAQI,MAAM,EAAA;AACX,oBAAA,QAAA,gBAAAzC,GAAA,CAACJ,SAAAA,EAAAA,EAAAA;;;;;AAMzB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockUI.js","sources":["../../../misc/BlockUI.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { HTMLAttributes } from 'react';\n\n/**\n * Configuration for {@link BlockUI}.\n */\nexport interface BlockUIProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Whether the region is currently blocked. While this is `false` the component adds nothing but a\n * positioned wrapper, so it is safe to leave mounted around content that is only occasionally busy.\n */\n blocked?: boolean;\n\n /**\n * Whether the mask covers the whole viewport rather than only the wrapped content. A long-running\n * action that would leave the rest of the screen misleadingly usable wants the page; a panel\n * refreshing its own data does not.\n */\n fullScreen?: boolean;\n}\n\n/**\n * A region that greys itself out and stops accepting input while something is in flight.\n *\n * Cratis owns this component. PrimeReact 10 had `BlockUI`; PrimeReact 11 removed it with no replacement\n * and no headless hook, and the `blockUI` name is one this package's manifest already publishes - screens\n * are written against it. Rebuilding it here is what keeps that promise, and it turns out to be a small\n * thing to own: the whole component is a positioned wrapper, an `inert` subtree and a translucent mask.\n *\n * Blocking is expressed twice on purpose, because the two audiences need different things. `aria-busy`\n * tells assistive technology that the region's content is being updated and should not be announced as\n * final. `inert` on the wrapped subtree takes it out of the tab order and stops it responding to clicks -\n * without that, a mask is only a visual suggestion and a keyboard user tabs straight through it into\n * controls the screen believes are unavailable.\n *\n * What it deliberately does not carry over from v10: the `template` and `containerTemplate` props (a\n * screen that wants a spinner or a message over the mask composes one into the blocked content itself),\n * the enter/leave transitions, `baseZIndex` / `autoZIndex` layering (the mask uses one fixed stacking\n * level and does not negotiate with dialogs), and the `onBlock` / `onUnblock` callbacks - a Scene element\n * has nowhere to route a callback to, and the blocked state is authored rather than discovered.\n */\nexport function BlockUI({ blocked = false, fullScreen = false, className, children, ...rest }: BlockUIProps) {\n return (\n <div {...rest} className={['relative', className].filter(Boolean).join(' ')} aria-busy={blocked}>\n <div inert={blocked}>{children}</div>\n {blocked && <div className={fullScreen ? 'fixed inset-0 z-50 bg-black/40' : 'absolute inset-0 z-10 bg-black/40'} />}\n </div>\n );\n}\n"],"names":["BlockUI","blocked","fullScreen","className","children","rest","_jsxs","div","filter","Boolean","join","aria-busy","_jsx","inert"],"mappings":";;AAAA;AACA;AAsBA;;;;;;;;;;;;;;;;;;;AAmBC,IACM,SAASA,OAAAA,CAAQ,EAAEC,UAAU,KAAK,EAAEC,UAAAA,GAAa,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,IAAAA,EAAoB,EAAA;AACvG,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;AAAK,QAAA,GAAGF,IAAI;QAAEF,SAAAA,EAAW;AAAC,YAAA,UAAA;AAAYA,YAAAA;AAAU,SAAA,CAACK,MAAM,CAACC,OAAAA,CAAAA,CAASC,IAAI,CAAC,GAAA,CAAA;QAAMC,WAAAA,EAAWV,OAAAA;;0BACpFW,GAAA,CAACL,KAAAA,EAAAA;gBAAIM,KAAAA,EAAOZ,OAAAA;AAAUG,gBAAAA,QAAAA,EAAAA;;AACrBH,YAAAA,OAAAA,kBAAWW,GAAA,CAACL,KAAAA,EAAAA;AAAIJ,gBAAAA,SAAAA,EAAWD,aAAa,gCAAA,GAAmC;;;;AAGxF
|
|
1
|
+
{"version":3,"file":"BlockUI.js","sources":["../../../misc/BlockUI.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { HTMLAttributes } from 'react';\n\n/**\n * Configuration for {@link BlockUI}.\n */\nexport interface BlockUIProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Whether the region is currently blocked. While this is `false` the component adds nothing but a\n * positioned wrapper, so it is safe to leave mounted around content that is only occasionally busy.\n */\n blocked?: boolean;\n\n /**\n * Whether the mask covers the whole viewport rather than only the wrapped content. A long-running\n * action that would leave the rest of the screen misleadingly usable wants the page; a panel\n * refreshing its own data does not.\n */\n fullScreen?: boolean;\n}\n\n/**\n * A region that greys itself out and stops accepting input while something is in flight.\n *\n * Cratis owns this component. PrimeReact 10 had `BlockUI`; PrimeReact 11 removed it with no replacement\n * and no headless hook, and the `blockUI` name is one this package's manifest already publishes - screens\n * are written against it. Rebuilding it here is what keeps that promise, and it turns out to be a small\n * thing to own: the whole component is a positioned wrapper, an `inert` subtree and a translucent mask.\n *\n * Blocking is expressed twice on purpose, because the two audiences need different things. `aria-busy`\n * tells assistive technology that the region's content is being updated and should not be announced as\n * final. `inert` on the wrapped subtree takes it out of the tab order and stops it responding to clicks -\n * without that, a mask is only a visual suggestion and a keyboard user tabs straight through it into\n * controls the screen believes are unavailable.\n *\n * What it deliberately does not carry over from v10: the `template` and `containerTemplate` props (a\n * screen that wants a spinner or a message over the mask composes one into the blocked content itself),\n * the enter/leave transitions, `baseZIndex` / `autoZIndex` layering (the mask uses one fixed stacking\n * level and does not negotiate with dialogs), and the `onBlock` / `onUnblock` callbacks - a Scene element\n * has nowhere to route a callback to, and the blocked state is authored rather than discovered.\n */\nexport function BlockUI({ blocked = false, fullScreen = false, className, children, ...rest }: BlockUIProps) {\n return (\n <div {...rest} className={['relative', className].filter(Boolean).join(' ')} aria-busy={blocked}>\n <div inert={blocked}>{children}</div>\n {blocked && <div className={fullScreen ? 'fixed inset-0 z-50 bg-black/40' : 'absolute inset-0 z-10 bg-black/40'} />}\n </div>\n );\n}\n"],"names":["BlockUI","blocked","fullScreen","className","children","rest","_jsxs","div","filter","Boolean","join","aria-busy","_jsx","inert"],"mappings":";;AAAA;AACA;AAsBA;;;;;;;;;;;;;;;;;;;AAmBC,IACM,SAASA,OAAAA,CAAQ,EAAEC,UAAU,KAAK,EAAEC,UAAAA,GAAa,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,IAAAA,EAAoB,EAAA;AACvG,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;AAAK,QAAA,GAAGF,IAAI;QAAEF,SAAAA,EAAW;AAAC,YAAA,UAAA;AAAYA,YAAAA;AAAU,SAAA,CAACK,MAAM,CAACC,OAAAA,CAAAA,CAASC,IAAI,CAAC,GAAA,CAAA;QAAMC,WAAAA,EAAWV,OAAAA;;0BACpFW,GAAA,CAACL,KAAAA,EAAAA;gBAAIM,KAAAA,EAAOZ,OAAAA;AAAUG,gBAAAA,QAAAA,EAAAA;;AACrBH,YAAAA,OAAAA,kBAAWW,GAAA,CAACL,KAAAA,EAAAA;AAAIJ,gBAAAA,SAAAA,EAAWD,aAAa,gCAAA,GAAmC;;;;AAGxF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeAvatar.js","sources":["../../../misc/PrimeAvatar.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Avatar } from 'primereact/avatar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:avatar` component - a person or entity shown as initials, an icon or a picture.\n *\n * PrimeReact 11 turned Avatar into a composition, and the split is the interesting part: `Avatar.Image`\n * renders only once the browser has actually loaded the source, and `Avatar.Fallback` renders only while\n * it has not. That is exactly the behavior a screen wants and could not previously express - a picture\n * that 404s now degrades to the initials instead of leaving a broken image icon in a list of faces.\n *\n * The image part is left out entirely when no `image` was authored, rather than mounted with an empty\n * source: it would spend an effect on a load that can never happen, and the fallback is what shows either\n * way.\n */\nexport function PrimeAvatar({ element }: RegisteredComponentProps) {\n const label = stringProperty(element, 'label');\n const icon = stringProperty(element, 'icon');\n const image = stringProperty(element, 'image');\n return (\n <Avatar.Root\n data-scene-id={element.id}\n size={stringProperty(element, 'size', 'normal') as 'normal' | 'large' | 'xlarge'}\n shape={stringProperty(element, 'shape', 'square') as 'square' | 'circle'}>\n {image !== undefined && <Avatar.Image src={image} alt={label ?? ''} />}\n <Avatar.Fallback>{icon !== undefined ? <i className={icon} aria-hidden='true' /> : label}</Avatar.Fallback>\n </Avatar.Root>\n );\n}\n"],"names":["PrimeAvatar","element","label","stringProperty","icon","image","_jsxs","Avatar","Root","data-scene-id","id","size","shape","undefined","_jsx","Image","src","alt","Fallback","i","className","aria-hidden"],"mappings":";;;;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,WAAAA,CAAY,EAAEC,OAAO,EAA4B,EAAA;IAC7D,MAAMC,KAAAA,GAAQC,eAAeF,OAAAA,EAAS,OAAA,CAAA;IACtC,MAAMG,IAAAA,GAAOD,eAAeF,OAAAA,EAAS,MAAA,CAAA;IACrC,MAAMI,KAAAA,GAAQF,eAAeF,OAAAA,EAAS,OAAA,CAAA;IACtC,qBACIK,IAAA,CAACC,OAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;QACzBC,IAAAA,EAAMR,cAAAA,CAAeF,SAAS,MAAA,EAAQ,QAAA,CAAA;QACtCW,KAAAA,EAAOT,cAAAA,CAAeF,SAAS,OAAA,EAAS,QAAA,CAAA;;YACvCI,KAAAA,KAAUQ,SAAAA,kBAAaC,GAAA,CAACP,MAAAA,CAAOQ,KAAK,EAAA;gBAACC,GAAAA,EAAKX,KAAAA;AAAOY,gBAAAA,GAAAA,EAAKf,KAAAA,IAAS;;AAChE,0BAAAY,GAAA,CAACP,OAAOW,QAAQ,EAAA;AAAEd,gBAAAA,QAAAA,EAAAA,IAAAA,KAASS,0BAAYC,GAAA,CAACK,GAAAA,EAAAA;oBAAEC,SAAAA,EAAWhB,IAAAA;oBAAMiB,aAAAA,EAAY;AAAYnB,iBAAAA,CAAAA,GAAAA;;;;AAG/F
|
|
1
|
+
{"version":3,"file":"PrimeAvatar.js","sources":["../../../misc/PrimeAvatar.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Avatar } from 'primereact/avatar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:avatar` component - a person or entity shown as initials, an icon or a picture.\n *\n * PrimeReact 11 turned Avatar into a composition, and the split is the interesting part: `Avatar.Image`\n * renders only once the browser has actually loaded the source, and `Avatar.Fallback` renders only while\n * it has not. That is exactly the behavior a screen wants and could not previously express - a picture\n * that 404s now degrades to the initials instead of leaving a broken image icon in a list of faces.\n *\n * The image part is left out entirely when no `image` was authored, rather than mounted with an empty\n * source: it would spend an effect on a load that can never happen, and the fallback is what shows either\n * way.\n */\nexport function PrimeAvatar({ element }: RegisteredComponentProps) {\n const label = stringProperty(element, 'label');\n const icon = stringProperty(element, 'icon');\n const image = stringProperty(element, 'image');\n return (\n <Avatar.Root\n data-scene-id={element.id}\n size={stringProperty(element, 'size', 'normal') as 'normal' | 'large' | 'xlarge'}\n shape={stringProperty(element, 'shape', 'square') as 'square' | 'circle'}>\n {image !== undefined && <Avatar.Image src={image} alt={label ?? ''} />}\n <Avatar.Fallback>{icon !== undefined ? <i className={icon} aria-hidden='true' /> : label}</Avatar.Fallback>\n </Avatar.Root>\n );\n}\n"],"names":["PrimeAvatar","element","label","stringProperty","icon","image","_jsxs","Avatar","Root","data-scene-id","id","size","shape","undefined","_jsx","Image","src","alt","Fallback","i","className","aria-hidden"],"mappings":";;;;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,WAAAA,CAAY,EAAEC,OAAO,EAA4B,EAAA;IAC7D,MAAMC,KAAAA,GAAQC,eAAeF,OAAAA,EAAS,OAAA,CAAA;IACtC,MAAMG,IAAAA,GAAOD,eAAeF,OAAAA,EAAS,MAAA,CAAA;IACrC,MAAMI,KAAAA,GAAQF,eAAeF,OAAAA,EAAS,OAAA,CAAA;IACtC,qBACIK,IAAA,CAACC,OAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;QACzBC,IAAAA,EAAMR,cAAAA,CAAeF,SAAS,MAAA,EAAQ,QAAA,CAAA;QACtCW,KAAAA,EAAOT,cAAAA,CAAeF,SAAS,OAAA,EAAS,QAAA,CAAA;;YACvCI,KAAAA,KAAUQ,SAAAA,kBAAaC,GAAA,CAACP,MAAAA,CAAOQ,KAAK,EAAA;gBAACC,GAAAA,EAAKX,KAAAA;AAAOY,gBAAAA,GAAAA,EAAKf,KAAAA,IAAS;;AAChE,0BAAAY,GAAA,CAACP,OAAOW,QAAQ,EAAA;AAAEd,gBAAAA,QAAAA,EAAAA,IAAAA,KAASS,0BAAYC,GAAA,CAACK,GAAAA,EAAAA;oBAAEC,SAAAA,EAAWhB,IAAAA;oBAAMiB,aAAAA,EAAY;AAAYnB,iBAAAA,CAAAA,GAAAA;;;;AAG/F;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeBadge.js","sources":["../../../misc/PrimeBadge.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Badge } from 'primereact/badge';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {severityProperty, stringProperty} from '../properties';\n\n/**\n * The `PrimeReact:badge` component - a small count or status marker.\n *\n * PrimeReact 11 dropped the `value` prop in favor of children, which is why the authored value is placed\n * inside the element rather than passed to it. The badge keeps rendering with no value at all - v11 marks\n * that case `data-empty` and styles it as the bare dot a \"there is something here\" indicator wants.\n *\n * Two vocabulary changes are absorbed here rather than pushed onto screens. `warning` became `warn`, so a\n * screen written against PrimeReact 10 keeps its color instead of silently falling back to the default.\n * The `normal` size, on the other hand, is simply gone: v11 sizes are `small`, `large` and `xlarge`, and\n * the unsized badge *is* the normal one, so nothing needs translating.\n */\nexport function PrimeBadge({ element }: RegisteredComponentProps) {\n // Tag and Badge are the two components PrimeReact 11 gives no `help` variant, so an authored\n // `help` degrades to the default styling rather than failing to compile.\n const severity = severityProperty(element, 'severity');\n return (\n <Badge\n data-scene-id={element.id}\n severity={severity === 'help' ? undefined : severity}\n size={stringProperty(element, 'size') as 'small' | 'large' | 'xlarge' | undefined}>\n {stringProperty(element, 'value', '')}\n </Badge>\n );\n}\n"],"names":["PrimeBadge","element","severity","severityProperty","_jsx","Badge","data-scene-id","id","undefined","size","stringProperty"],"mappings":";;;;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;;;IAG5D,MAAMC,QAAAA,GAAWC,iBAAiBF,OAAAA,EAAS,UAAA,CAAA;AAC3C,IAAA,qBACIG,GAAA,CAACC,KAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeL,QAAQM,EAAE;QACzBL,QAAAA,EAAUA,QAAAA,KAAa,SAASM,SAAAA,GAAYN,QAAAA;AAC5CO,QAAAA,IAAAA,EAAMC,eAAeT,OAAAA,EAAS,MAAA,CAAA;AAC7BS,QAAAA,QAAAA,EAAAA,cAAAA,CAAeT,SAAS,OAAA,EAAS,EAAA;;AAG9C
|
|
1
|
+
{"version":3,"file":"PrimeBadge.js","sources":["../../../misc/PrimeBadge.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Badge } from 'primereact/badge';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport {severityProperty, stringProperty} from '../properties';\n\n/**\n * The `PrimeReact:badge` component - a small count or status marker.\n *\n * PrimeReact 11 dropped the `value` prop in favor of children, which is why the authored value is placed\n * inside the element rather than passed to it. The badge keeps rendering with no value at all - v11 marks\n * that case `data-empty` and styles it as the bare dot a \"there is something here\" indicator wants.\n *\n * Two vocabulary changes are absorbed here rather than pushed onto screens. `warning` became `warn`, so a\n * screen written against PrimeReact 10 keeps its color instead of silently falling back to the default.\n * The `normal` size, on the other hand, is simply gone: v11 sizes are `small`, `large` and `xlarge`, and\n * the unsized badge *is* the normal one, so nothing needs translating.\n */\nexport function PrimeBadge({ element }: RegisteredComponentProps) {\n // Tag and Badge are the two components PrimeReact 11 gives no `help` variant, so an authored\n // `help` degrades to the default styling rather than failing to compile.\n const severity = severityProperty(element, 'severity');\n return (\n <Badge\n data-scene-id={element.id}\n severity={severity === 'help' ? undefined : severity}\n size={stringProperty(element, 'size') as 'small' | 'large' | 'xlarge' | undefined}>\n {stringProperty(element, 'value', '')}\n </Badge>\n );\n}\n"],"names":["PrimeBadge","element","severity","severityProperty","_jsx","Badge","data-scene-id","id","undefined","size","stringProperty"],"mappings":";;;;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;;;IAG5D,MAAMC,QAAAA,GAAWC,iBAAiBF,OAAAA,EAAS,UAAA,CAAA;AAC3C,IAAA,qBACIG,GAAA,CAACC,KAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeL,QAAQM,EAAE;QACzBL,QAAAA,EAAUA,QAAAA,KAAa,SAASM,SAAAA,GAAYN,QAAAA;AAC5CO,QAAAA,IAAAA,EAAMC,eAAeT,OAAAA,EAAS,MAAA,CAAA;AAC7BS,QAAAA,QAAAA,EAAAA,cAAAA,CAAeT,SAAS,OAAA,EAAS,EAAA;;AAG9C;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeBlockUI.js","sources":["../../../misc/PrimeBlockUI.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { BlockUI } from './BlockUI';\nimport { booleanProperty } from '../properties';\n\n/**\n * The `PrimeReact:blockUI` component - a region masked while something is in flight.\n *\n * PrimeReact 11 removed `BlockUI` outright: no renamed module, no compositional replacement, no headless\n * hook. The name is in this package's manifest and screens are authored against it, so the adapter now\n * renders Cratis's own {@link BlockUI} instead. The element's contract is unchanged - a `blocked` flag and\n * whatever the `content` slot holds - which is the point: the removal is a fact about PrimeReact, not\n * something a screen should have to know.\n *\n * The default is `blocked`, because an element a screen bothered to place is there to say \"this region is\n * waiting\"; an unblocked block is a wrapper that does nothing.\n */\nexport function PrimeBlockUI({ element, slots }: RegisteredComponentProps) {\n return (\n <BlockUI\n data-scene-id={element.id}\n blocked={booleanProperty(element, 'blocked', true)}\n fullScreen={booleanProperty(element, 'fullScreen', false)}>\n {slots.content}\n </BlockUI>\n );\n}\n"],"names":["PrimeBlockUI","element","slots","_jsx","BlockUI","data-scene-id","id","blocked","booleanProperty","fullScreen","content"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;;AAWC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,GAAA,CAACC,OAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;QACzBC,OAAAA,EAASC,eAAAA,CAAgBP,SAAS,SAAA,EAAW,IAAA,CAAA;QAC7CQ,UAAAA,EAAYD,eAAAA,CAAgBP,SAAS,YAAA,EAAc,KAAA,CAAA;AAClDC,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB
|
|
1
|
+
{"version":3,"file":"PrimeBlockUI.js","sources":["../../../misc/PrimeBlockUI.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { BlockUI } from './BlockUI';\nimport { booleanProperty } from '../properties';\n\n/**\n * The `PrimeReact:blockUI` component - a region masked while something is in flight.\n *\n * PrimeReact 11 removed `BlockUI` outright: no renamed module, no compositional replacement, no headless\n * hook. The name is in this package's manifest and screens are authored against it, so the adapter now\n * renders Cratis's own {@link BlockUI} instead. The element's contract is unchanged - a `blocked` flag and\n * whatever the `content` slot holds - which is the point: the removal is a fact about PrimeReact, not\n * something a screen should have to know.\n *\n * The default is `blocked`, because an element a screen bothered to place is there to say \"this region is\n * waiting\"; an unblocked block is a wrapper that does nothing.\n */\nexport function PrimeBlockUI({ element, slots }: RegisteredComponentProps) {\n return (\n <BlockUI\n data-scene-id={element.id}\n blocked={booleanProperty(element, 'blocked', true)}\n fullScreen={booleanProperty(element, 'fullScreen', false)}>\n {slots.content}\n </BlockUI>\n );\n}\n"],"names":["PrimeBlockUI","element","slots","_jsx","BlockUI","data-scene-id","id","blocked","booleanProperty","fullScreen","content"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;;AAWC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,GAAA,CAACC,OAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;QACzBC,OAAAA,EAASC,eAAAA,CAAgBP,SAAS,SAAA,EAAW,IAAA,CAAA;QAC7CQ,UAAAA,EAAYD,eAAAA,CAAgBP,SAAS,YAAA,EAAc,KAAA,CAAA;AAClDC,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeChip.js","sources":["../../../misc/PrimeChip.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { Chip } from 'primereact/chip';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:chip` component - a compact, optionally removable label.\n *\n * PrimeReact 11 replaced the `label` / `icon` / `image` / `removable` props with named parts, so the\n * adapter is what decides that an authored image wins over an authored icon and that both sit in the\n * leading `Start` slot. A screen can therefore only ever produce one leading adornment, which is the\n * whole point of a chip: a second one turns it into a toolbar.\n *\n * `Chip.Remove` carries the removal behavior itself - clicking it hides the chip through the component's\n * own state, so the adapter has nothing to wire. It renders a `span`, so the accessible name and button\n * role are supplied here rather than left to a screen that has no way to reach the part.\n */\nexport function PrimeChip({ element }: RegisteredComponentProps) {\n const label = stringProperty(element, 'label');\n const icon = stringProperty(element, 'icon');\n const image = stringProperty(element, 'image');\n\n let adornment: ReactNode;\n if (image !== undefined) adornment = <img src={image} alt='' className='h-full w-full rounded-full object-cover' />;\n else if (icon !== undefined) adornment = <i className={icon} aria-hidden='true' />;\n\n return (\n <Chip.Root data-scene-id={element.id}>\n {adornment !== undefined && <Chip.Start>{adornment}</Chip.Start>}\n <Chip.Label>{label}</Chip.Label>\n {booleanProperty(element, 'removable', false) && (\n <Chip.Remove role='button' aria-label={label === undefined ? 'Remove' : `Remove ${label}`}>\n <i className='pi pi-times-circle' aria-hidden='true' />\n </Chip.Remove>\n )}\n </Chip.Root>\n );\n}\n"],"names":["PrimeChip","element","label","stringProperty","icon","image","adornment","undefined","_jsx","img","src","alt","className","i","aria-hidden","_jsxs","Chip","Root","data-scene-id","id","Start","Label","booleanProperty","Remove","role","aria-label"],"mappings":";;;;AAAA;AACA;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAA4B,EAAA;IAC3D,MAAMC,KAAAA,GAAQC,eAAeF,OAAAA,EAAS,OAAA,CAAA;IACtC,MAAMG,IAAAA,GAAOD,eAAeF,OAAAA,EAAS,MAAA,CAAA;IACrC,MAAMI,KAAAA,GAAQF,eAAeF,OAAAA,EAAS,OAAA,CAAA;IAEtC,IAAIK,SAAAA;IACJ,IAAID,KAAAA,KAAUE,SAAAA,EAAWD,SAAAA,iBAAYE,GAAA,CAACC,KAAAA,EAAAA;QAAIC,GAAAA,EAAKL,KAAAA;QAAOM,GAAAA,EAAI,EAAA;QAAGC,SAAAA,EAAU;;SAClE,IAAIR,IAAAA,KAASG,SAAAA,EAAWD,SAAAA,iBAAYE,GAAA,CAACK,GAAAA,EAAAA;QAAED,SAAAA,EAAWR,IAAAA;QAAMU,aAAAA,EAAY;;IAEzE,qBACIC,IAAA,CAACC,KAAKC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAejB,QAAQkB,EAAE;;YAC/Bb,SAAAA,KAAcC,SAAAA,kBAAaC,GAAA,CAACQ,IAAAA,CAAKI,KAAK,EAAA;AAAEd,gBAAAA,QAAAA,EAAAA;;AACzC,0BAAAE,GAAA,CAACQ,KAAKK,KAAK,EAAA;AAAEnB,gBAAAA,QAAAA,EAAAA;;AACZoB,YAAAA,eAAAA,CAAgBrB,OAAAA,EAAS,WAAA,EAAa,KAAA,CAAA,kBACnCO,GAAA,CAACQ,KAAKO,MAAM,EAAA;gBAACC,IAAAA,EAAK,QAAA;AAASC,gBAAAA,YAAAA,EAAYvB,UAAUK,SAAAA,GAAY,QAAA,GAAW,CAAC,OAAO,EAAEL,KAAAA,CAAAA,CAAO;AACrF,gBAAA,QAAA,gBAAAM,GAAA,CAACK,GAAAA,EAAAA;oBAAED,SAAAA,EAAU,oBAAA;oBAAqBE,aAAAA,EAAY;;;;;AAKlE
|
|
1
|
+
{"version":3,"file":"PrimeChip.js","sources":["../../../misc/PrimeChip.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { Chip } from 'primereact/chip';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:chip` component - a compact, optionally removable label.\n *\n * PrimeReact 11 replaced the `label` / `icon` / `image` / `removable` props with named parts, so the\n * adapter is what decides that an authored image wins over an authored icon and that both sit in the\n * leading `Start` slot. A screen can therefore only ever produce one leading adornment, which is the\n * whole point of a chip: a second one turns it into a toolbar.\n *\n * `Chip.Remove` carries the removal behavior itself - clicking it hides the chip through the component's\n * own state, so the adapter has nothing to wire. It renders a `span`, so the accessible name and button\n * role are supplied here rather than left to a screen that has no way to reach the part.\n */\nexport function PrimeChip({ element }: RegisteredComponentProps) {\n const label = stringProperty(element, 'label');\n const icon = stringProperty(element, 'icon');\n const image = stringProperty(element, 'image');\n\n let adornment: ReactNode;\n if (image !== undefined) adornment = <img src={image} alt='' className='h-full w-full rounded-full object-cover' />;\n else if (icon !== undefined) adornment = <i className={icon} aria-hidden='true' />;\n\n return (\n <Chip.Root data-scene-id={element.id}>\n {adornment !== undefined && <Chip.Start>{adornment}</Chip.Start>}\n <Chip.Label>{label}</Chip.Label>\n {booleanProperty(element, 'removable', false) && (\n <Chip.Remove role='button' aria-label={label === undefined ? 'Remove' : `Remove ${label}`}>\n <i className='pi pi-times-circle' aria-hidden='true' />\n </Chip.Remove>\n )}\n </Chip.Root>\n );\n}\n"],"names":["PrimeChip","element","label","stringProperty","icon","image","adornment","undefined","_jsx","img","src","alt","className","i","aria-hidden","_jsxs","Chip","Root","data-scene-id","id","Start","Label","booleanProperty","Remove","role","aria-label"],"mappings":";;;;AAAA;AACA;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAA4B,EAAA;IAC3D,MAAMC,KAAAA,GAAQC,eAAeF,OAAAA,EAAS,OAAA,CAAA;IACtC,MAAMG,IAAAA,GAAOD,eAAeF,OAAAA,EAAS,MAAA,CAAA;IACrC,MAAMI,KAAAA,GAAQF,eAAeF,OAAAA,EAAS,OAAA,CAAA;IAEtC,IAAIK,SAAAA;IACJ,IAAID,KAAAA,KAAUE,SAAAA,EAAWD,SAAAA,iBAAYE,GAAA,CAACC,KAAAA,EAAAA;QAAIC,GAAAA,EAAKL,KAAAA;QAAOM,GAAAA,EAAI,EAAA;QAAGC,SAAAA,EAAU;;SAClE,IAAIR,IAAAA,KAASG,SAAAA,EAAWD,SAAAA,iBAAYE,GAAA,CAACK,GAAAA,EAAAA;QAAED,SAAAA,EAAWR,IAAAA;QAAMU,aAAAA,EAAY;;IAEzE,qBACIC,IAAA,CAACC,KAAKC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAejB,QAAQkB,EAAE;;YAC/Bb,SAAAA,KAAcC,SAAAA,kBAAaC,GAAA,CAACQ,IAAAA,CAAKI,KAAK,EAAA;AAAEd,gBAAAA,QAAAA,EAAAA;;AACzC,0BAAAE,GAAA,CAACQ,KAAKK,KAAK,EAAA;AAAEnB,gBAAAA,QAAAA,EAAAA;;AACZoB,YAAAA,eAAAA,CAAgBrB,OAAAA,EAAS,WAAA,EAAa,KAAA,CAAA,kBACnCO,GAAA,CAACQ,KAAKO,MAAM,EAAA;gBAACC,IAAAA,EAAK,QAAA;AAASC,gBAAAA,YAAAA,EAAYvB,UAAUK,SAAAA,GAAY,QAAA,GAAW,CAAC,OAAO,EAAEL,KAAAA,CAAAA,CAAO;AACrF,gBAAA,QAAA,gBAAAM,GAAA,CAACK,GAAAA,EAAAA;oBAAED,SAAAA,EAAU,oBAAA;oBAAqBE,aAAAA,EAAY;;;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeInplace.js","sources":["../../../misc/PrimeInplace.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Inplace } from 'primereact/inplace';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inplace` component - a read-only value that becomes an editor when clicked.\n *\n * The collapsed view comes from the `label` property and the expanded view from the `content` slot,\n * because the two are different kinds of thing: one is a value, the other is whatever editor the screen\n * wants behind it.\n *\n * PrimeReact 11 turned the `closable` flag into a `Close` part, which is a better arrangement than it\n * looks: the button now lives *inside* the editor, so it is reached by the same tab order as the editor\n * itself instead of floating beside a region the reader has already left. The property is kept and simply\n * decides whether that part is rendered, so screens written against v10 keep meaning what they said.\n */\nexport function PrimeInplace({ element, slots }: RegisteredComponentProps) {\n return (\n <Inplace.Root data-scene-id={element.id}>\n <Inplace.Display>{stringProperty(element, 'label', 'Click to edit')}</Inplace.Display>\n <Inplace.Content>\n {slots.content}\n {booleanProperty(element, 'closable', true) && (\n <Inplace.Close aria-label='Close editor'>\n <i className='pi pi-times' aria-hidden='true' />\n </Inplace.Close>\n )}\n </Inplace.Content>\n </Inplace.Root>\n );\n}\n"],"names":["PrimeInplace","element","slots","_jsxs","Inplace","Root","data-scene-id","id","_jsx","Display","stringProperty","Content","content","booleanProperty","Close","aria-label","i","className","aria-hidden"],"mappings":";;;;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACrE,qBACIC,IAAA,CAACC,QAAQC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeL,QAAQM,EAAE;;AACnC,0BAAAC,GAAA,CAACJ,QAAQK,OAAO,EAAA;AAAEC,gBAAAA,QAAAA,EAAAA,cAAAA,CAAeT,SAAS,OAAA,EAAS,eAAA;;AACnD,0BAAAE,IAAA,CAACC,QAAQO,OAAO,EAAA;;AACXT,oBAAAA,KAAAA,CAAMU,OAAO;AACbC,oBAAAA,eAAAA,CAAgBZ,OAAAA,EAAS,UAAA,EAAY,IAAA,CAAA,kBAClCO,GAAA,CAACJ,QAAQU,KAAK,EAAA;wBAACC,YAAAA,EAAW,cAAA;AACtB,wBAAA,QAAA,gBAAAP,GAAA,CAACQ,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,aAAA;4BAAcC,aAAAA,EAAY;;;;;;;AAM/D
|
|
1
|
+
{"version":3,"file":"PrimeInplace.js","sources":["../../../misc/PrimeInplace.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Inplace } from 'primereact/inplace';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inplace` component - a read-only value that becomes an editor when clicked.\n *\n * The collapsed view comes from the `label` property and the expanded view from the `content` slot,\n * because the two are different kinds of thing: one is a value, the other is whatever editor the screen\n * wants behind it.\n *\n * PrimeReact 11 turned the `closable` flag into a `Close` part, which is a better arrangement than it\n * looks: the button now lives *inside* the editor, so it is reached by the same tab order as the editor\n * itself instead of floating beside a region the reader has already left. The property is kept and simply\n * decides whether that part is rendered, so screens written against v10 keep meaning what they said.\n */\nexport function PrimeInplace({ element, slots }: RegisteredComponentProps) {\n return (\n <Inplace.Root data-scene-id={element.id}>\n <Inplace.Display>{stringProperty(element, 'label', 'Click to edit')}</Inplace.Display>\n <Inplace.Content>\n {slots.content}\n {booleanProperty(element, 'closable', true) && (\n <Inplace.Close aria-label='Close editor'>\n <i className='pi pi-times' aria-hidden='true' />\n </Inplace.Close>\n )}\n </Inplace.Content>\n </Inplace.Root>\n );\n}\n"],"names":["PrimeInplace","element","slots","_jsxs","Inplace","Root","data-scene-id","id","_jsx","Display","stringProperty","Content","content","booleanProperty","Close","aria-label","i","className","aria-hidden"],"mappings":";;;;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACrE,qBACIC,IAAA,CAACC,QAAQC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeL,QAAQM,EAAE;;AACnC,0BAAAC,GAAA,CAACJ,QAAQK,OAAO,EAAA;AAAEC,gBAAAA,QAAAA,EAAAA,cAAAA,CAAeT,SAAS,OAAA,EAAS,eAAA;;AACnD,0BAAAE,IAAA,CAACC,QAAQO,OAAO,EAAA;;AACXT,oBAAAA,KAAAA,CAAMU,OAAO;AACbC,oBAAAA,eAAAA,CAAgBZ,OAAAA,EAAS,UAAA,EAAY,IAAA,CAAA,kBAClCO,GAAA,CAACJ,QAAQU,KAAK,EAAA;wBAACC,YAAAA,EAAW,cAAA;AACtB,wBAAA,QAAA,gBAAAP,GAAA,CAACQ,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU,aAAA;4BAAcC,aAAAA,EAAY;;;;;;;AAM/D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeProgressBar.js","sources":["../../../misc/PrimeProgressBar.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ProgressBar } from 'primereact/progressbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:progressBar` component - determinate or indeterminate progress.\n *\n * The mode follows whether a `value` was given at all: progress you cannot measure is exactly what\n * indeterminate mode is for, so an element with no value animates rather than sitting at zero.\n *\n * In PrimeReact 11 the root is a headless wrapper that renders no element of its own - `Track` is the\n * first real DOM node and the one carrying the ARIA `progressbar` role - so `data-scene-id` and the bar's\n * height belong there rather than on `Root`. `Indicator` renders its children only in determinate mode,\n * which is why the value label can be handed to it unconditionally: an indeterminate bar has no\n * percentage to print and drops it on its own.\n */\nexport function PrimeProgressBar({ element }: RegisteredComponentProps) {\n const value = numberProperty(element, 'value');\n return (\n <ProgressBar.Root value={value} mode={value === undefined ? 'indeterminate' : 'determinate'}>\n <ProgressBar.Track data-scene-id={element.id} style={{ height: '1rem' }}>\n <ProgressBar.Indicator>{booleanProperty(element, 'showValue', true) && <ProgressBar.Value />}</ProgressBar.Indicator>\n </ProgressBar.Track>\n </ProgressBar.Root>\n );\n}\n"],"names":["PrimeProgressBar","element","value","numberProperty","_jsx","ProgressBar","Root","mode","undefined","Track","data-scene-id","id","style","height","Indicator","booleanProperty","Value"],"mappings":";;;;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;IAClE,MAAMC,KAAAA,GAAQC,eAAeF,OAAAA,EAAS,OAAA,CAAA;IACtC,qBACIG,GAAA,CAACC,YAAYC,IAAI,EAAA;QAACJ,KAAAA,EAAOA,KAAAA;QAAOK,IAAAA,EAAML,KAAAA,KAAUM,YAAY,eAAA,GAAkB,aAAA;gCAC1EJ,GAAA,CAACC,YAAYI,KAAK,EAAA;AAACC,YAAAA,eAAAA,EAAeT,QAAQU,EAAE;YAAEC,KAAAA,EAAO;gBAAEC,MAAAA,EAAQ;AAAO,aAAA;oCAClET,GAAA,CAACC,YAAYS,SAAS,EAAA;AAAEC,gBAAAA,QAAAA,EAAAA,eAAAA,CAAgBd,OAAAA,EAAS,WAAA,EAAa,IAAA,CAAA,kBAASG,GAAA,CAACC,YAAYW,KAAK,EAAA,EAAA;;;;AAIzG
|
|
1
|
+
{"version":3,"file":"PrimeProgressBar.js","sources":["../../../misc/PrimeProgressBar.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ProgressBar } from 'primereact/progressbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:progressBar` component - determinate or indeterminate progress.\n *\n * The mode follows whether a `value` was given at all: progress you cannot measure is exactly what\n * indeterminate mode is for, so an element with no value animates rather than sitting at zero.\n *\n * In PrimeReact 11 the root is a headless wrapper that renders no element of its own - `Track` is the\n * first real DOM node and the one carrying the ARIA `progressbar` role - so `data-scene-id` and the bar's\n * height belong there rather than on `Root`. `Indicator` renders its children only in determinate mode,\n * which is why the value label can be handed to it unconditionally: an indeterminate bar has no\n * percentage to print and drops it on its own.\n */\nexport function PrimeProgressBar({ element }: RegisteredComponentProps) {\n const value = numberProperty(element, 'value');\n return (\n <ProgressBar.Root value={value} mode={value === undefined ? 'indeterminate' : 'determinate'}>\n <ProgressBar.Track data-scene-id={element.id} style={{ height: '1rem' }}>\n <ProgressBar.Indicator>{booleanProperty(element, 'showValue', true) && <ProgressBar.Value />}</ProgressBar.Indicator>\n </ProgressBar.Track>\n </ProgressBar.Root>\n );\n}\n"],"names":["PrimeProgressBar","element","value","numberProperty","_jsx","ProgressBar","Root","mode","undefined","Track","data-scene-id","id","style","height","Indicator","booleanProperty","Value"],"mappings":";;;;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;IAClE,MAAMC,KAAAA,GAAQC,eAAeF,OAAAA,EAAS,OAAA,CAAA;IACtC,qBACIG,GAAA,CAACC,YAAYC,IAAI,EAAA;QAACJ,KAAAA,EAAOA,KAAAA;QAAOK,IAAAA,EAAML,KAAAA,KAAUM,YAAY,eAAA,GAAkB,aAAA;gCAC1EJ,GAAA,CAACC,YAAYI,KAAK,EAAA;AAACC,YAAAA,eAAAA,EAAeT,QAAQU,EAAE;YAAEC,KAAAA,EAAO;gBAAEC,MAAAA,EAAQ;AAAO,aAAA;oCAClET,GAAA,CAACC,YAAYS,SAAS,EAAA;AAAEC,gBAAAA,QAAAA,EAAAA,eAAAA,CAAgBd,OAAAA,EAAS,WAAA,EAAa,IAAA,CAAA,kBAASG,GAAA,CAACC,YAAYW,KAAK,EAAA,EAAA;;;;AAIzG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeProgressSpinner.js","sources":["../../../misc/PrimeProgressSpinner.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ProgressSpinner } from 'primereact/progressspinner';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:progressSpinner` component - an indeterminate busy indicator.\n *\n * PrimeReact 11 opens the SVG up into parts: `Root` draws the `svg` and its viewBox, `Track` is the\n * circle that stays put and `Range` the arc that turns. Both are needed for the spinner to read as a ring\n * rather than a lone rotating stroke, so the adapter always supplies the pair - a Scene element has no\n * property that would sensibly omit one.\n *\n * `strokeWidth` is a number in v11 where v10 took a string, and it is left at the component's own default\n * because the only thing a screen sizes here is the diameter.\n */\nexport function PrimeProgressSpinner({ element }: RegisteredComponentProps) {\n const size = numberProperty(element, 'size', 50);\n return (\n <ProgressSpinner.Root data-scene-id={element.id} style={{ width: `${size}px`, height: `${size}px` }}>\n <ProgressSpinner.Track />\n <ProgressSpinner.Range />\n </ProgressSpinner.Root>\n );\n}\n"],"names":["PrimeProgressSpinner","element","size","numberProperty","_jsxs","ProgressSpinner","Root","data-scene-id","id","style","width","height","_jsx","Track","Range"],"mappings":";;;;AAOA;;;;;;;;;;AAUC,IACM,SAASA,oBAAAA,CAAqB,EAAEC,OAAO,EAA4B,EAAA;IACtE,MAAMC,IAAAA,GAAOC,cAAAA,CAAeF,OAAAA,EAAS,MAAA,EAAQ,EAAA,CAAA;IAC7C,qBACIG,IAAA,CAACC,gBAAgBC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QAAEC,KAAAA,EAAO;YAAEC,KAAAA,EAAO,CAAA,EAAGR,IAAAA,CAAK,EAAE,CAAC;YAAES,MAAAA,EAAQ,CAAA,EAAGT,IAAAA,CAAK,EAAE;AAAE,SAAA;;AAC9F,0BAAAU,GAAA,CAACP,gBAAgBQ,KAAK,EAAA,EAAA,CAAA;AACtB,0BAAAD,GAAA,CAACP,gBAAgBS,KAAK,EAAA,EAAA;;;AAGlC
|
|
1
|
+
{"version":3,"file":"PrimeProgressSpinner.js","sources":["../../../misc/PrimeProgressSpinner.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ProgressSpinner } from 'primereact/progressspinner';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:progressSpinner` component - an indeterminate busy indicator.\n *\n * PrimeReact 11 opens the SVG up into parts: `Root` draws the `svg` and its viewBox, `Track` is the\n * circle that stays put and `Range` the arc that turns. Both are needed for the spinner to read as a ring\n * rather than a lone rotating stroke, so the adapter always supplies the pair - a Scene element has no\n * property that would sensibly omit one.\n *\n * `strokeWidth` is a number in v11 where v10 took a string, and it is left at the component's own default\n * because the only thing a screen sizes here is the diameter.\n */\nexport function PrimeProgressSpinner({ element }: RegisteredComponentProps) {\n const size = numberProperty(element, 'size', 50);\n return (\n <ProgressSpinner.Root data-scene-id={element.id} style={{ width: `${size}px`, height: `${size}px` }}>\n <ProgressSpinner.Track />\n <ProgressSpinner.Range />\n </ProgressSpinner.Root>\n );\n}\n"],"names":["PrimeProgressSpinner","element","size","numberProperty","_jsxs","ProgressSpinner","Root","data-scene-id","id","style","width","height","_jsx","Track","Range"],"mappings":";;;;AAOA;;;;;;;;;;AAUC,IACM,SAASA,oBAAAA,CAAqB,EAAEC,OAAO,EAA4B,EAAA;IACtE,MAAMC,IAAAA,GAAOC,cAAAA,CAAeF,OAAAA,EAAS,MAAA,EAAQ,EAAA,CAAA;IAC7C,qBACIG,IAAA,CAACC,gBAAgBC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QAAEC,KAAAA,EAAO;YAAEC,KAAAA,EAAO,CAAA,EAAGR,IAAAA,CAAK,EAAE,CAAC;YAAES,MAAAA,EAAQ,CAAA,EAAGT,IAAAA,CAAK,EAAE;AAAE,SAAA;;AAC9F,0BAAAU,GAAA,CAACP,gBAAgBQ,KAAK,EAAA,EAAA,CAAA;AACtB,0BAAAD,GAAA,CAACP,gBAAgBS,KAAK,EAAA,EAAA;;;AAGlC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeScrollTop.js","sources":["../../../misc/PrimeScrollTop.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useRef } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ScrollTop } from './ScrollTop';\nimport { numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:scrollTop` component - a button that returns the reader to the top.\n *\n * PrimeReact 11 removed `ScrollTop` with no replacement and no headless hook, so the adapter renders\n * Cratis's own {@link ScrollTop}. The element keeps the shape it had: a sized, scrollable box holding the\n * `content` slot, with the button watching that box rather than the window. A window-targeted button\n * inside a composed screen would scroll something the element does not own, and would stay invisible in\n * any preview shorter than a page.\n *\n * The box and the scrolling region are two elements rather than one, which is what lets the button sit\n * still while the content moves under it. Anchored inside the scroller it would drift off with the\n * content it is offering to escape.\n */\nexport function PrimeScrollTop({ element, slots }: RegisteredComponentProps) {\n const scroller = useRef<HTMLDivElement>(null);\n return (\n <div data-scene-id={element.id} className='relative'>\n <div ref={scroller} className='overflow-auto' style={{ height: `${numberProperty(element, 'height', 200)}px` }}>\n {slots.content}\n </div>\n <ScrollTop target={scroller} threshold={numberProperty(element, 'threshold', 100)} />\n </div>\n );\n}\n"],"names":["PrimeScrollTop","element","slots","scroller","useRef","_jsxs","div","data-scene-id","id","className","_jsx","ref","style","height","numberProperty","content","ScrollTop","target","threshold"],"mappings":";;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACvE,IAAA,MAAMC,WAAWC,MAAAA,CAAuB,IAAA,CAAA;AACxC,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QAAEC,SAAAA,EAAU,UAAA;;0BACtCC,GAAA,CAACJ,KAAAA,EAAAA;gBAAIK,GAAAA,EAAKR,QAAAA;gBAAUM,SAAAA,EAAU,eAAA;gBAAgBG,KAAAA,EAAO;AAAEC,oBAAAA,MAAAA,EAAQ,GAAGC,cAAAA,CAAeb,OAAAA,EAAS,QAAA,EAAU,GAAA,CAAA,CAAK,EAAE;AAAE,iBAAA;AACxGC,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMa;;0BAEXL,GAAA,CAACM,SAAAA,EAAAA;gBAAUC,MAAAA,EAAQd,QAAAA;gBAAUe,SAAAA,EAAWJ,cAAAA,CAAeb,SAAS,WAAA,EAAa,GAAA;;;;AAGzF
|
|
1
|
+
{"version":3,"file":"PrimeScrollTop.js","sources":["../../../misc/PrimeScrollTop.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useRef } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ScrollTop } from './ScrollTop';\nimport { numberProperty } from '../properties';\n\n/**\n * The `PrimeReact:scrollTop` component - a button that returns the reader to the top.\n *\n * PrimeReact 11 removed `ScrollTop` with no replacement and no headless hook, so the adapter renders\n * Cratis's own {@link ScrollTop}. The element keeps the shape it had: a sized, scrollable box holding the\n * `content` slot, with the button watching that box rather than the window. A window-targeted button\n * inside a composed screen would scroll something the element does not own, and would stay invisible in\n * any preview shorter than a page.\n *\n * The box and the scrolling region are two elements rather than one, which is what lets the button sit\n * still while the content moves under it. Anchored inside the scroller it would drift off with the\n * content it is offering to escape.\n */\nexport function PrimeScrollTop({ element, slots }: RegisteredComponentProps) {\n const scroller = useRef<HTMLDivElement>(null);\n return (\n <div data-scene-id={element.id} className='relative'>\n <div ref={scroller} className='overflow-auto' style={{ height: `${numberProperty(element, 'height', 200)}px` }}>\n {slots.content}\n </div>\n <ScrollTop target={scroller} threshold={numberProperty(element, 'threshold', 100)} />\n </div>\n );\n}\n"],"names":["PrimeScrollTop","element","slots","scroller","useRef","_jsxs","div","data-scene-id","id","className","_jsx","ref","style","height","numberProperty","content","ScrollTop","target","threshold"],"mappings":";;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACvE,IAAA,MAAMC,WAAWC,MAAAA,CAAuB,IAAA,CAAA;AACxC,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QAAEC,SAAAA,EAAU,UAAA;;0BACtCC,GAAA,CAACJ,KAAAA,EAAAA;gBAAIK,GAAAA,EAAKR,QAAAA;gBAAUM,SAAAA,EAAU,eAAA;gBAAgBG,KAAAA,EAAO;AAAEC,oBAAAA,MAAAA,EAAQ,GAAGC,cAAAA,CAAeb,OAAAA,EAAS,QAAA,EAAU,GAAA,CAAA,CAAK,EAAE;AAAE,iBAAA;AACxGC,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMa;;0BAEXL,GAAA,CAACM,SAAAA,EAAAA;gBAAUC,MAAAA,EAAQd,QAAAA;gBAAUe,SAAAA,EAAWJ,cAAAA,CAAeb,SAAS,WAAA,EAAa,GAAA;;;;AAGzF;;"}
|