@cratis/scene.primereact 3.2.0 → 3.3.1
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":"primeReactPackage.js","sources":["../../primeReactPackage.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { primeReactComponents } from './primeReactComponents';\nimport { primeReactThemeNames, primeReactThemes } from './theme';\n\n/**\n * The `PrimeReact` package's declaration - what a `ui profile` lists by name and what a\n * `PackageDependency` refers to.\n *\n * The component list is written out rather than derived from the registry, on purpose. A manifest is\n * read by Stage's build and Studio's design-time queries *without loading a single component*, so it has\n * to stand on its own as the statement of what this package offers. Keeping it as its own list is also\n * what gives `validatePackageBundle` something real to check: two independently maintained lists that\n * must agree, rather than one list compared against itself.\n */\nexport const primeReactPackageManifest: ScenePackage = {\n name: 'PrimeReact',\n version: '11.1.0',\n kind: PackageKind.ComponentLibrary,\n\n /**\n * PrimeReact's own components need nothing from Tailwind - they are skinned by the `--p-*` custom\n * properties the active `@primeuix/themes` preset emits. The dependency is here because *this\n * package's wrappers* use Tailwind utility classes\n * for the layout around them: the row a checkbox and its label sit on, the column a radio group\n * stacks into, the grid a summary lays its pairs out in. A profile that activates this package\n * without Tailwind renders those wrappers unstyled, so declaring it is what makes the profile picker\n * offer Tailwind alongside PrimeReact instead of leaving the gap to be discovered on screen.\n */\n dependencies: [{ name: 'Tailwind' }],\n\n components: [\n 'inputText', 'inputTextarea', 'inputNumber', 'password', 'floatLabel', 'iconField', 'dropdown', 'multiSelect',\n 'listBox', 'selectButton', 'checkbox', 'radioButton', 'toggleSwitch', 'slider', 'rating', 'knob', 'calendar', 'colorPicker',\n 'chips', 'autoComplete', 'treeSelect', 'button', 'splitButton', 'speedDial', 'buttonGroup', 'dataTable', 'table',\n 'column', 'dataView', 'tree', 'timeline', 'paginator', 'orderList', 'pickList', 'organizationChart',\n 'card', 'panel', 'accordion', 'fieldset', 'divider', 'splitter', 'scrollPanel', 'tabView', 'toolbar', 'stepper', 'dialog',\n 'confirmDialog', 'overlayPanel', 'sidebar', 'tooltip', 'menu', 'menubar', 'breadcrumb', 'tabMenu', 'steps', 'tieredMenu',\n 'panelMenu', 'contextMenu', 'megaMenu', 'dock', 'message', 'inlineMessage', 'toast', 'image', 'galleria', 'carousel', 'avatar',\n 'badge', 'chip', 'tag', 'progressBar', 'progressSpinner', 'skeleton', 'scrollTop', 'blockUI', 'inplace', 'terminal', 'text',\n 'title', 'field', 'section', 'summary', 'action',\n ],\n\n /**\n * Empty, and it stays empty. A layout is an application's base navigational look - one per\n * application - and choosing it is a decision about the product, not about which widgets are\n * available. A component library supplies the vocabulary a layout is built *from*; a\n * {@link PackageKind.Blueprint} package supplies the layout itself.\n */\n layouts: [],\n\n /**\n * Empty for the same reason `layouts` is. A screen template is a reusable page shape at module,\n * feature or slice level - \"list with filters and a detail pane\" - and it is composed *out of* the\n * names declared above. Shipping one here would mean this package had opinions about how a screen is\n * arranged, which is a Blueprint's job and not a component library's.\n */\n screenTemplates: [],\n\n /**\n * Empty, as above: a dialog template is a reusable dialog shape, composed from these components by a\n * Blueprint package rather than provided by the library the components come from.\n */\n dialogTemplates: [],\n\n themes: primeReactThemeNames,\n\n displayName: 'PrimeReact',\n description: 'PrimeReact 11 components and PrimeTek\\'s @primeuix/themes presets, mapped onto Scene\\'s abstract component names.',\n module: '@cratis/scene.primereact',\n // PrimeReact 11 is PrimeTek's commercial PrimeUI, not MIT as version 10 was. The Community\n // tier is free for eligible projects but still requires a key, so an author selecting this\n // package needs to see the terms before they select it, not after a banner appears.\n license: 'PrimeUI Community / Commercial',\n licenseUrl: 'https://primeui.dev/licenses/community',\n};\n\n/**\n * The `PrimeReact` package as a loadable bundle - the manifest plus the React components and themes\n * behind the names it declares.\n */\nexport const primeReactPackage: ScenePackageBundle = {\n manifest: primeReactPackageManifest,\n components: primeReactComponents,\n themes: primeReactThemes,\n};\n"],"names":["primeReactPackageManifest","name","version","kind","PackageKind","ComponentLibrary","dependencies","components","layouts","screenTemplates","dialogTemplates","themes","primeReactThemeNames","displayName","description","module","license","licenseUrl","primeReactPackage","manifest","primeReactComponents","primeReactThemes"],"mappings":";;;;;;;AAAA;AACA;AAOA;;;;;;;;;UAUaA,yBAAAA,GAA0C;IACnDC,IAAAA,EAAM,YAAA;IACNC,OAAAA,EAAS,QAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,gBAAgB;AAElC;;;;;;;;AAQC,QACDC,YAAAA,EAAc;AAAC,QAAA;YAAEL,IAAAA,EAAM;AAAW;AAAE,KAAA;IAEpCM,UAAAA,EAAY;AACR,QAAA,WAAA;AAAa,QAAA,eAAA;AAAiB,QAAA,aAAA;AAAe,QAAA,UAAA;A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QAAA,iBAAA;AAAmB,QAAA,UAAA;AAAY,QAAA,WAAA;AAAa,QAAA,SAAA;AAAW,QAAA,SAAA;AAAW,QAAA,UAAA;AAAY,QAAA,MAAA;AACrH,QAAA,OAAA;AAAS,QAAA,OAAA;AAAS,QAAA,SAAA;AAAW,QAAA,SAAA;AAAW,QAAA;AAC3C,KAAA;AAED;;;;;AAKC,QACDC,SAAS,EAAE;AAEX;;;;;AAKC,QACDC,iBAAiB,EAAE;AAEnB;;;AAGC,QACDC,iBAAiB,EAAE;IAEnBC,MAAAA,EAAQC,oBAAAA;IAERC,WAAAA,EAAa,YAAA;IACbC,WAAAA,EAAa,mHAAA;IACbC,MAAAA,EAAQ,0BAAA;;;;IAIRC,OAAAA,EAAS,gCAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;UAIaC,iBAAAA,GAAwC;IACjDC,QAAAA,EAAUnB,yBAAAA;IACVO,UAAAA,EAAYa,oBAAAA;IACZT,MAAAA,EAAQU;AACZ
|
|
1
|
+
{"version":3,"file":"primeReactPackage.js","sources":["../../primeReactPackage.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { primeReactComponents } from './primeReactComponents';\nimport { primeReactThemeNames, primeReactThemes } from './theme';\n\n/**\n * The `PrimeReact` package's declaration - what a `ui profile` lists by name and what a\n * `PackageDependency` refers to.\n *\n * The component list is written out rather than derived from the registry, on purpose. A manifest is\n * read by Stage's build and Studio's design-time queries *without loading a single component*, so it has\n * to stand on its own as the statement of what this package offers. Keeping it as its own list is also\n * what gives `validatePackageBundle` something real to check: two independently maintained lists that\n * must agree, rather than one list compared against itself.\n */\nexport const primeReactPackageManifest: ScenePackage = {\n name: 'PrimeReact',\n version: '11.1.0',\n kind: PackageKind.ComponentLibrary,\n\n /**\n * PrimeReact's own components need nothing from Tailwind - they are skinned by the `--p-*` custom\n * properties the active `@primeuix/themes` preset emits. The dependency is here because *this\n * package's wrappers* use Tailwind utility classes\n * for the layout around them: the row a checkbox and its label sit on, the column a radio group\n * stacks into, the grid a summary lays its pairs out in. A profile that activates this package\n * without Tailwind renders those wrappers unstyled, so declaring it is what makes the profile picker\n * offer Tailwind alongside PrimeReact instead of leaving the gap to be discovered on screen.\n */\n dependencies: [{ name: 'Tailwind' }],\n\n components: [\n 'inputText', 'inputTextarea', 'inputNumber', 'password', 'floatLabel', 'iconField', 'dropdown', 'multiSelect',\n 'listBox', 'selectButton', 'checkbox', 'radioButton', 'toggleSwitch', 'slider', 'rating', 'knob', 'calendar', 'colorPicker',\n 'chips', 'autoComplete', 'treeSelect', 'button', 'splitButton', 'speedDial', 'buttonGroup', 'dataTable', 'table',\n 'column', 'dataView', 'tree', 'timeline', 'paginator', 'orderList', 'pickList', 'organizationChart',\n 'card', 'panel', 'accordion', 'fieldset', 'divider', 'splitter', 'scrollPanel', 'tabView', 'toolbar', 'stepper', 'dialog',\n 'confirmDialog', 'overlayPanel', 'sidebar', 'tooltip', 'menu', 'menubar', 'breadcrumb', 'tabMenu', 'steps', 'tieredMenu',\n 'panelMenu', 'contextMenu', 'megaMenu', 'dock', 'message', 'inlineMessage', 'toast', 'image', 'galleria', 'carousel', 'avatar',\n 'badge', 'chip', 'tag', 'progressBar', 'progressSpinner', 'skeleton', 'scrollTop', 'blockUI', 'inplace', 'terminal', 'text',\n 'title', 'field', 'section', 'summary', 'action',\n ],\n\n /**\n * Empty, and it stays empty. A layout is an application's base navigational look - one per\n * application - and choosing it is a decision about the product, not about which widgets are\n * available. A component library supplies the vocabulary a layout is built *from*; a\n * {@link PackageKind.Blueprint} package supplies the layout itself.\n */\n layouts: [],\n\n /**\n * Empty for the same reason `layouts` is. A screen template is a reusable page shape at module,\n * feature or slice level - \"list with filters and a detail pane\" - and it is composed *out of* the\n * names declared above. Shipping one here would mean this package had opinions about how a screen is\n * arranged, which is a Blueprint's job and not a component library's.\n */\n screenTemplates: [],\n\n /**\n * Empty, as above: a dialog template is a reusable dialog shape, composed from these components by a\n * Blueprint package rather than provided by the library the components come from.\n */\n dialogTemplates: [],\n\n themes: primeReactThemeNames,\n\n displayName: 'PrimeReact',\n description: 'PrimeReact 11 components and PrimeTek\\'s @primeuix/themes presets, mapped onto Scene\\'s abstract component names.',\n module: '@cratis/scene.primereact',\n // PrimeReact 11 is PrimeTek's commercial PrimeUI, not MIT as version 10 was. The Community\n // tier is free for eligible projects but still requires a key, so an author selecting this\n // package needs to see the terms before they select it, not after a banner appears.\n license: 'PrimeUI Community / Commercial',\n licenseUrl: 'https://primeui.dev/licenses/community',\n};\n\n/**\n * The `PrimeReact` package as a loadable bundle - the manifest plus the React components and themes\n * behind the names it declares.\n */\nexport const primeReactPackage: ScenePackageBundle = {\n manifest: primeReactPackageManifest,\n components: primeReactComponents,\n themes: primeReactThemes,\n};\n"],"names":["primeReactPackageManifest","name","version","kind","PackageKind","ComponentLibrary","dependencies","components","layouts","screenTemplates","dialogTemplates","themes","primeReactThemeNames","displayName","description","module","license","licenseUrl","primeReactPackage","manifest","primeReactComponents","primeReactThemes"],"mappings":";;;;;;;AAAA;AACA;AAOA;;;;;;;;;UAUaA,yBAAAA,GAA0C;IACnDC,IAAAA,EAAM,YAAA;IACNC,OAAAA,EAAS,QAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,gBAAgB;AAElC;;;;;;;;AAQC,QACDC,YAAAA,EAAc;AAAC,QAAA;YAAEL,IAAAA,EAAM;AAAW;AAAE,KAAA;IAEpCM,UAAAA,EAAY;AACR,QAAA,WAAA;AAAa,QAAA,eAAA;AAAiB,QAAA,aAAA;AAAe,QAAA,UAAA;AAAY,QAAA,YAAA;AAAc,QAAA,WAAA;AAAa,QAAA,UAAA;AAAY,QAAA,aAAA;AAChG,QAAA,SAAA;AAAW,QAAA,cAAA;AAAgB,QAAA,UAAA;AAAY,QAAA,aAAA;AAAe,QAAA,cAAA;AAA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AAA,SAAA;AAAW,QAAA,SAAA;AAAW,QAAA;AAC3C,KAAA;AAED;;;;;AAKC,QACDC,SAAS,EAAE;AAEX;;;;;AAKC,QACDC,iBAAiB,EAAE;AAEnB;;;AAGC,QACDC,iBAAiB,EAAE;IAEnBC,MAAAA,EAAQC,oBAAAA;IAERC,WAAAA,EAAa,YAAA;IACbC,WAAAA,EAAa,mHAAA;IACbC,MAAAA,EAAQ,0BAAA;;;;IAIRC,OAAAA,EAAS,gCAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;UAIaC,iBAAAA,GAAwC;IACjDC,QAAAA,EAAUnB,yBAAAA;IACVO,UAAAA,EAAYa,oBAAAA;IACZT,MAAAA,EAAQU;AACZ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sources":["../../properties.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 { SceneElement } from '@cratis/scene.model';\nimport { PrimeSeverity } from './PrimeSeverity';\nimport { SelectOption } from './SelectOption';\n\n/** Every severity PrimeReact 11 knows, so an unrecognized one can fall back rather than reach a component. */\nconst severities: PrimeSeverity[] = ['secondary', 'info', 'success', 'warn', 'danger', 'help', 'contrast'];\n\n/**\n * Reads a string configuration value off a Scene element.\n *\n * `SceneElement.properties` is `Record<string, unknown>` because a screen's properties come from\n * authored model data, not from a compiler that knows this package's expectations. Every adapter\n * therefore has to narrow before it can use a value, and doing that with a cast would defeat the point -\n * a mistyped property would sail through and blow up inside PrimeReact instead of quietly falling back\n * here. These helpers are the single narrowing point, so a wrong type behaves exactly like an absent\n * one everywhere.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @param fallback The value to use when the property is missing or is not a string.\n * @returns The string value, or `fallback` (`undefined` when none was given).\n */\nexport function stringProperty(element: SceneElement, name: string): string | undefined;\nexport function stringProperty(element: SceneElement, name: string, fallback: string): string;\nexport function stringProperty(element: SceneElement, name: string, fallback?: string): string | undefined {\n const value = element.properties[name];\n return typeof value === 'string' ? value : fallback;\n}\n\n/**\n * Reads a boolean configuration value off a Scene element.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @param fallback The value to use when the property is missing or is not a boolean.\n * @returns The boolean value, or `fallback` (`undefined` when none was given).\n */\nexport function booleanProperty(element: SceneElement, name: string): boolean | undefined;\nexport function booleanProperty(element: SceneElement, name: string, fallback: boolean): boolean;\nexport function booleanProperty(element: SceneElement, name: string, fallback?: boolean): boolean | undefined {\n const value = element.properties[name];\n return typeof value === 'boolean' ? value : fallback;\n}\n\n/**\n * Reads a numeric configuration value off a Scene element.\n *\n * `NaN` is rejected alongside non-numbers: it is a number by `typeof` but never a usable size, count or\n * bound, and letting it through would surface as an unexplained blank component rather than a fallback.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @param fallback The value to use when the property is missing or is not a usable number.\n * @returns The numeric value, or `fallback` (`undefined` when none was given).\n */\nexport function numberProperty(element: SceneElement, name: string): number | undefined;\nexport function numberProperty(element: SceneElement, name: string, fallback: number): number;\nexport function numberProperty(element: SceneElement, name: string, fallback?: number): number | undefined {\n const value = element.properties[name];\n return typeof value === 'number' && !Number.isNaN(value) ? value : fallback;\n}\n\n/**\n * Reads an array configuration value off a Scene element, as raw entries.\n *\n * Always returns an array - an absent or wrongly typed property becomes an empty one - because every\n * caller is about to map over it, and a component rendering nothing is a far better failure than one\n * throwing on `undefined.map`.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @returns The entries, or an empty array when the property is missing or is not an array.\n */\nexport function arrayProperty(element: SceneElement, name: string): unknown[] {\n const value = element.properties[name];\n return Array.isArray(value) ? value : [];\n}\n\n/**\n * Reads an array of strings off a Scene element, dropping any entry that is not one.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @returns The string entries, in order.\n */\nexport function stringArrayProperty(element: SceneElement, name: string): string[] {\n return arrayProperty(element, name).filter((entry): entry is string => typeof entry === 'string');\n}\n\n/**\n * Reads an array of objects off a Scene element, dropping any entry that is not one.\n *\n * This is the shape row data, column definitions and menu items all arrive in, so it is the common\n * bottom step every structured reader in this package builds on.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @returns The object entries, in order.\n */\nexport function recordArrayProperty(element: SceneElement, name: string): Record<string, unknown>[] {\n return arrayProperty(element, name).filter(\n (entry): entry is Record<string, unknown> => typeof entry === 'object' && entry !== undefined && entry !== null && !Array.isArray(entry)\n );\n}\n\n/**\n * Reads a selection component's options off a Scene element, normalizing both shapes a screen may use.\n *\n * A screen written by hand tends to say `options: ['Draft', 'Published']`; one generated from a model\n * says `options: [{ label: 'Draft', value: 'draft' }]`. Both are reasonable, so both are accepted and\n * flattened to {@link SelectOption} - an entry with only a label uses that label as its value, which is\n * exactly what the shorthand means.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @returns The normalized options, in order, skipping entries that carry no usable label.\n */\nexport function optionsProperty(element: SceneElement, name: string): SelectOption[] {\n const options: SelectOption[] = [];\n for (const entry of arrayProperty(element, name)) {\n if (typeof entry === 'string') {\n options.push({ label: entry, value: 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 label = typeof record.label === 'string' ? record.label : undefined;\n const value = typeof record.value === 'string' ? record.value : label;\n if (label !== undefined && value !== undefined) options.push({ label, value });\n }\n\n return options;\n}\n\n/**\n * Reads a severity off a Scene element, in the vocabulary PrimeReact 11 uses.\n *\n * This exists because PrimeReact renamed one severity between v10 and v11 - `warning` became `warn` - and\n * the rename is silent in the worst way. The v11 prop types are string-literal unions, so an unchanged\n * `warning` does not fail to compile when it arrives through `stringProperty`; it simply falls through to\n * the default color, and a screen authored against the old vocabulary loses its warning styling without\n * anything reporting a problem.\n *\n * Six adapters need that translation, which is five too many to leave copied. Putting it here also keeps\n * the promise the rest of this file makes: properties are narrowed in exactly one place, so an\n * unrecognized value behaves the same way everywhere - like an absent one, rather than like a broken one.\n *\n * @param element The element whose properties to read.\n * @param name The property name, `severity` for every current caller.\n * @param fallback The severity to use when the property is missing or is not one PrimeReact knows.\n * @returns The severity, or `fallback` (`undefined` when none was given).\n */\nexport function severityProperty(element: SceneElement, name: string): PrimeSeverity | undefined;\nexport function severityProperty(element: SceneElement, name: string, fallback: PrimeSeverity): PrimeSeverity;\nexport function severityProperty(element: SceneElement, name: string, fallback?: PrimeSeverity): PrimeSeverity | undefined {\n const authored = stringProperty(element, name);\n const translated = authored === 'warning' ? 'warn' : authored;\n return severities.includes(translated as PrimeSeverity) ? (translated as PrimeSeverity) : fallback;\n}\n"],"names":["severities","stringProperty","element","name","fallback","value","properties","booleanProperty","numberProperty","Number","isNaN","arrayProperty","Array","isArray","stringArrayProperty","filter","entry","recordArrayProperty","undefined","optionsProperty","options","push","label","record","severityProperty","authored","translated","includes"],"mappings":"AAAA;AACA;AAMA,+GACA,MAAMA,UAAAA,GAA8B;AAAC,IAAA,WAAA;AAAa,IAAA,MAAA;AAAQ,IAAA,SAAA;AAAW,IAAA,MAAA;AAAQ,IAAA,QAAA;AAAU,IAAA,MAAA;AAAQ,IAAA;AAAW,CAAA;AAmBnG,SAASC,cAAAA,CAAeC,OAAqB,EAAEC,IAAY,EAAEC,QAAiB,EAAA;AACjF,IAAA,MAAMC,KAAAA,GAAQH,OAAAA,CAAQI,UAAU,CAACH,IAAAA,CAAK;IACtC,OAAO,OAAOE,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQD,QAAAA;AAC/C;AAYO,SAASG,eAAAA,CAAgBL,OAAqB,EAAEC,IAAY,EAAEC,QAAkB,EAAA;AACnF,IAAA,MAAMC,KAAAA,GAAQH,OAAAA,CAAQI,UAAU,CAACH,IAAAA,CAAK;IACtC,OAAO,OAAOE,KAAAA,KAAU,SAAA,GAAYA,KAAAA,GAAQD,QAAAA;AAChD;AAeO,SAASI,cAAAA,CAAeN,OAAqB,EAAEC,IAAY,EAAEC,QAAiB,EAAA;AACjF,IAAA,MA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;AAAM,aAAA,CAAA;AAC1C,YAAA;AACJ,QAAA;QAEA,IAAI,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAUE,SAAAA,IAAaF,UAAU,IAAA,IAAQJ,KAAAA,CAAMC,OAAO,CAACG,KAAAA,CAAAA,EAAQ;AAEhG,QAAA,MAAMO,MAAAA,GAASP,KAAAA;QACf,MAAMM,KAAAA,GAAQ,OAAOC,MAAAA,CAAOD,KAAK,KAAK,QAAA,GAAWC,MAAAA,CAAOD,KAAK,GAAGJ,SAAAA;QAChE,MAAMb,KAAAA,GAAQ,OAAOkB,MAAAA,CAAOlB,KAAK,KAAK,QAAA,GAAWkB,MAAAA,CAAOlB,KAAK,GAAGiB,KAAAA;AAChE,QAAA,IAAIA,UAAUJ,SAAAA,IAAab,KAAAA,KAAUa,SAAAA,EAAWE,OAAAA,CAAQC,IAAI,CAAC;AAAEC,YAAAA,KAAAA;AAAOjB,YAAAA;AAAM,SAAA,CAAA;AAChF,IAAA;IAEA,OAAOe,OAAAA;AACX;AAsBO,SAASI,gBAAAA,CAAiBtB,OAAqB,EAAEC,IAAY,EAAEC,QAAwB,EAAA;IAC1F,MAAMqB,QAAAA,GAAWxB,eAAeC,OAAAA,EAASC,IAAAA,CAAAA;IACzC,MAAMuB,UAAAA,GAAaD,QAAAA,KAAa,SAAA,GAAY,MAAA,GAASA,QAAAA;AACrD,IAAA,OAAOzB,UAAAA,CAAW2B,QAAQ,CAACD,UAAAA,CAAAA,GAAgCA,UAAAA,GAA+BtB,QAAAA;AAC9F;;;;"}
|
|
1
|
+
{"version":3,"file":"properties.js","sources":["../../properties.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 { SceneElement } from '@cratis/scene.model';\nimport { PrimeSeverity } from './PrimeSeverity';\nimport { SelectOption } from './SelectOption';\n\n/** Every severity PrimeReact 11 knows, so an unrecognized one can fall back rather than reach a component. */\nconst severities: PrimeSeverity[] = ['secondary', 'info', 'success', 'warn', 'danger', 'help', 'contrast'];\n\n/**\n * Reads a string configuration value off a Scene element.\n *\n * `SceneElement.properties` is `Record<string, unknown>` because a screen's properties come from\n * authored model data, not from a compiler that knows this package's expectations. Every adapter\n * therefore has to narrow before it can use a value, and doing that with a cast would defeat the point -\n * a mistyped property would sail through and blow up inside PrimeReact instead of quietly falling back\n * here. These helpers are the single narrowing point, so a wrong type behaves exactly like an absent\n * one everywhere.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @param fallback The value to use when the property is missing or is not a string.\n * @returns The string value, or `fallback` (`undefined` when none was given).\n */\nexport function stringProperty(element: SceneElement, name: string): string | undefined;\nexport function stringProperty(element: SceneElement, name: string, fallback: string): string;\nexport function stringProperty(element: SceneElement, name: string, fallback?: string): string | undefined {\n const value = element.properties[name];\n return typeof value === 'string' ? value : fallback;\n}\n\n/**\n * Reads a boolean configuration value off a Scene element.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @param fallback The value to use when the property is missing or is not a boolean.\n * @returns The boolean value, or `fallback` (`undefined` when none was given).\n */\nexport function booleanProperty(element: SceneElement, name: string): boolean | undefined;\nexport function booleanProperty(element: SceneElement, name: string, fallback: boolean): boolean;\nexport function booleanProperty(element: SceneElement, name: string, fallback?: boolean): boolean | undefined {\n const value = element.properties[name];\n return typeof value === 'boolean' ? value : fallback;\n}\n\n/**\n * Reads a numeric configuration value off a Scene element.\n *\n * `NaN` is rejected alongside non-numbers: it is a number by `typeof` but never a usable size, count or\n * bound, and letting it through would surface as an unexplained blank component rather than a fallback.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @param fallback The value to use when the property is missing or is not a usable number.\n * @returns The numeric value, or `fallback` (`undefined` when none was given).\n */\nexport function numberProperty(element: SceneElement, name: string): number | undefined;\nexport function numberProperty(element: SceneElement, name: string, fallback: number): number;\nexport function numberProperty(element: SceneElement, name: string, fallback?: number): number | undefined {\n const value = element.properties[name];\n return typeof value === 'number' && !Number.isNaN(value) ? value : fallback;\n}\n\n/**\n * Reads an array configuration value off a Scene element, as raw entries.\n *\n * Always returns an array - an absent or wrongly typed property becomes an empty one - because every\n * caller is about to map over it, and a component rendering nothing is a far better failure than one\n * throwing on `undefined.map`.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @returns The entries, or an empty array when the property is missing or is not an array.\n */\nexport function arrayProperty(element: SceneElement, name: string): unknown[] {\n const value = element.properties[name];\n return Array.isArray(value) ? value : [];\n}\n\n/**\n * Reads an array of strings off a Scene element, dropping any entry that is not one.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @returns The string entries, in order.\n */\nexport function stringArrayProperty(element: SceneElement, name: string): string[] {\n return arrayProperty(element, name).filter((entry): entry is string => typeof entry === 'string');\n}\n\n/**\n * Reads an array of objects off a Scene element, dropping any entry that is not one.\n *\n * This is the shape row data, column definitions and menu items all arrive in, so it is the common\n * bottom step every structured reader in this package builds on.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @returns The object entries, in order.\n */\nexport function recordArrayProperty(element: SceneElement, name: string): Record<string, unknown>[] {\n return arrayProperty(element, name).filter(\n (entry): entry is Record<string, unknown> => typeof entry === 'object' && entry !== undefined && entry !== null && !Array.isArray(entry)\n );\n}\n\n/**\n * Reads a selection component's options off a Scene element, normalizing both shapes a screen may use.\n *\n * A screen written by hand tends to say `options: ['Draft', 'Published']`; one generated from a model\n * says `options: [{ label: 'Draft', value: 'draft' }]`. Both are reasonable, so both are accepted and\n * flattened to {@link SelectOption} - an entry with only a label uses that label as its value, which is\n * exactly what the shorthand means.\n *\n * @param element The element whose properties to read.\n * @param name The property name.\n * @returns The normalized options, in order, skipping entries that carry no usable label.\n */\nexport function optionsProperty(element: SceneElement, name: string): SelectOption[] {\n const options: SelectOption[] = [];\n for (const entry of arrayProperty(element, name)) {\n if (typeof entry === 'string') {\n options.push({ label: entry, value: 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 label = typeof record.label === 'string' ? record.label : undefined;\n const value = typeof record.value === 'string' ? record.value : label;\n if (label !== undefined && value !== undefined) options.push({ label, value });\n }\n\n return options;\n}\n\n/**\n * Reads a severity off a Scene element, in the vocabulary PrimeReact 11 uses.\n *\n * This exists because PrimeReact renamed one severity between v10 and v11 - `warning` became `warn` - and\n * the rename is silent in the worst way. The v11 prop types are string-literal unions, so an unchanged\n * `warning` does not fail to compile when it arrives through `stringProperty`; it simply falls through to\n * the default color, and a screen authored against the old vocabulary loses its warning styling without\n * anything reporting a problem.\n *\n * Six adapters need that translation, which is five too many to leave copied. Putting it here also keeps\n * the promise the rest of this file makes: properties are narrowed in exactly one place, so an\n * unrecognized value behaves the same way everywhere - like an absent one, rather than like a broken one.\n *\n * @param element The element whose properties to read.\n * @param name The property name, `severity` for every current caller.\n * @param fallback The severity to use when the property is missing or is not one PrimeReact knows.\n * @returns The severity, or `fallback` (`undefined` when none was given).\n */\nexport function severityProperty(element: SceneElement, name: string): PrimeSeverity | undefined;\nexport function severityProperty(element: SceneElement, name: string, fallback: PrimeSeverity): PrimeSeverity;\nexport function severityProperty(element: SceneElement, name: string, fallback?: PrimeSeverity): PrimeSeverity | undefined {\n const authored = stringProperty(element, name);\n const translated = authored === 'warning' ? 'warn' : authored;\n return severities.includes(translated as PrimeSeverity) ? (translated as PrimeSeverity) : fallback;\n}\n"],"names":["severities","stringProperty","element","name","fallback","value","properties","booleanProperty","numberProperty","Number","isNaN","arrayProperty","Array","isArray","stringArrayProperty","filter","entry","recordArrayProperty","undefined","optionsProperty","options","push","label","record","severityProperty","authored","translated","includes"],"mappings":"AAAA;AACA;AAMA,+GACA,MAAMA,UAAAA,GAA8B;AAAC,IAAA,WAAA;AAAa,IAAA,MAAA;AAAQ,IAAA,SAAA;AAAW,IAAA,MAAA;AAAQ,IAAA,QAAA;AAAU,IAAA,MAAA;AAAQ,IAAA;AAAW,CAAA;AAmBnG,SAASC,cAAAA,C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AWxB,eAAeC,OAAAA,EAASC,IAAAA,CAAAA;IACzC,MAAMuB,UAAAA,GAAaD,QAAAA,KAAa,SAAA,GAAY,MAAA,GAASA,QAAAA;AACrD,IAAA,OAAOzB,UAAAA,CAAW2B,QAAQ,CAACD,UAAAA,CAAAA,GAAgCA,UAAAA,GAA+BtB,QAAAA;AAC9F;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeAction.js","sources":["../../../screen/PrimeAction.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 { Button } from 'primereact/button';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:action` component - one of Screenplay's screen directives: something the user can do.\n *\n * A button, but not the same adapter as `button`. Screenplay describes an action by its *intent* - is\n * this the main thing to do here, a secondary one, a destructive one - and that vocabulary is what a\n * screen author writes. Translating intent to PrimeReact's `severity` here keeps the mapping in one\n * place, so a change to how destructive actions look is one edit rather than one per screen.\n *\n * PrimeReact 11 renamed the `warning` severity to `warn`, which is why the union below is not the v10\n * one. No intent currently maps to it, but the type has to be right for the one that eventually does.\n */\nconst severityForIntent: Record<string, 'secondary' | 'success' | 'info' | 'warn' | 'danger' | 'help' | 'contrast' | undefined> = {\n primary: undefined,\n secondary: 'secondary',\n destructive: 'danger',\n danger: 'danger',\n positive: 'success',\n success: 'success',\n};\n\n/**\n * Renders the action.\n *\n * Two v10 conveniences are gone in PrimeReact 11 and are assembled here instead. `Button` no longer takes\n * `label` and `icon` props - it renders its children - so the icon element and the label text are composed\n * directly. And `outlined` is no longer a boolean; outlining is one of the values of `variant`.\n *\n * The icon is `aria-hidden` because the label already names the action; announcing a decorative glyph\n * beside it would have a screen reader say the same thing twice.\n */\nexport function PrimeAction({ element }: RegisteredComponentProps) {\n const intent = stringProperty(element, 'intent', 'primary');\n const icon = stringProperty(element, 'icon');\n return (\n <Button\n data-scene-id={element.id}\n severity={severityForIntent[intent]}\n variant={intent === 'secondary' ? 'outlined' : undefined}\n disabled={booleanProperty(element, 'disabled', false)}>\n {icon !== undefined && <i className={icon} aria-hidden='true' />}\n {stringProperty(element, 'label', '')}\n </Button>\n );\n}\n"],"names":["severityForIntent","primary","undefined","secondary","destructive","danger","positive","success","PrimeAction","element","intent","stringProperty","icon","_jsxs","Button","data-scene-id","id","severity","variant","disabled","booleanProperty","_jsx","i","className","aria-hidden"],"mappings":";;;;AAOA;;;;;;;;;;AAUC,IACD,MAAMA,iBAAAA,GAA4H;IAC9HC,OAAAA,EAASC,SAAAA;IACTC,SAAAA,EAAW,WAAA;IACXC,WAAAA,EAAa,QAAA;IACbC,MAAAA,EAAQ,QAAA;IACRC,QAAAA,EAAU,SAAA;IACVC,OAAAA,EAAS;AACb,CAAA;AAEA;;;;;;;;;AASC,IACM,SAASC,WAAAA,CAAY,EAAEC,OAAO,EAA4B,EAAA;IAC7D,MAAMC,MAAAA,GAASC,cAAAA,CAAeF,OAAAA,EAAS,QAAA,EAAU,SAAA,CAAA;IACjD,MAAMG,IAAAA,GAAOD,eAAeF,OAAAA,EAAS,MAAA,CAAA;AACrC,IAAA,qBACII,IAAA,CAACC,MAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QACzBC,QAAAA,EAAUjB,iBAAiB,CAACU,MAAAA,CAAO;QACnCQ,OAAAA,EAASR,MAAAA,KAAW,cAAc,UAAA,GAAaR,SAAAA;QAC/CiB,QAAAA,EAAUC,eAAAA,CAAgBX,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC9CG,YAAAA,IAAAA,KAASV,2BAAamB,GAAA,CAACC,GAAAA,EAAAA;gBAAEC,SAAAA,EAAWX,IAAAA;gBAAMY,aAAAA,EAAY;;AACtDb,YAAAA,cAAAA,CAAeF,SAAS,OAAA,EAAS,EAAA;;;AAG9C
|
|
1
|
+
{"version":3,"file":"PrimeAction.js","sources":["../../../screen/PrimeAction.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 { Button } from 'primereact/button';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:action` component - one of Screenplay's screen directives: something the user can do.\n *\n * A button, but not the same adapter as `button`. Screenplay describes an action by its *intent* - is\n * this the main thing to do here, a secondary one, a destructive one - and that vocabulary is what a\n * screen author writes. Translating intent to PrimeReact's `severity` here keeps the mapping in one\n * place, so a change to how destructive actions look is one edit rather than one per screen.\n *\n * PrimeReact 11 renamed the `warning` severity to `warn`, which is why the union below is not the v10\n * one. No intent currently maps to it, but the type has to be right for the one that eventually does.\n */\nconst severityForIntent: Record<string, 'secondary' | 'success' | 'info' | 'warn' | 'danger' | 'help' | 'contrast' | undefined> = {\n primary: undefined,\n secondary: 'secondary',\n destructive: 'danger',\n danger: 'danger',\n positive: 'success',\n success: 'success',\n};\n\n/**\n * Renders the action.\n *\n * Two v10 conveniences are gone in PrimeReact 11 and are assembled here instead. `Button` no longer takes\n * `label` and `icon` props - it renders its children - so the icon element and the label text are composed\n * directly. And `outlined` is no longer a boolean; outlining is one of the values of `variant`.\n *\n * The icon is `aria-hidden` because the label already names the action; announcing a decorative glyph\n * beside it would have a screen reader say the same thing twice.\n */\nexport function PrimeAction({ element }: RegisteredComponentProps) {\n const intent = stringProperty(element, 'intent', 'primary');\n const icon = stringProperty(element, 'icon');\n return (\n <Button\n data-scene-id={element.id}\n severity={severityForIntent[intent]}\n variant={intent === 'secondary' ? 'outlined' : undefined}\n disabled={booleanProperty(element, 'disabled', false)}>\n {icon !== undefined && <i className={icon} aria-hidden='true' />}\n {stringProperty(element, 'label', '')}\n </Button>\n );\n}\n"],"names":["severityForIntent","primary","undefined","secondary","destructive","danger","positive","success","PrimeAction","element","intent","stringProperty","icon","_jsxs","Button","data-scene-id","id","severity","variant","disabled","booleanProperty","_jsx","i","className","aria-hidden"],"mappings":";;;;AAOA;;;;;;;;;;AAUC,IACD,MAAMA,iBAAAA,GAA4H;IAC9HC,OAAAA,EAASC,SAAAA;IACTC,SAAAA,EAAW,WAAA;IACXC,WAAAA,EAAa,QAAA;IACbC,MAAAA,EAAQ,QAAA;IACRC,QAAAA,EAAU,SAAA;IACVC,OAAAA,EAAS;AACb,CAAA;AAEA;;;;;;;;;AASC,IACM,SAASC,WAAAA,CAAY,EAAEC,OAAO,EAA4B,EAAA;IAC7D,MAAMC,MAAAA,GAASC,cAAAA,CAAeF,OAAAA,EAAS,QAAA,EAAU,SAAA,CAAA;IACjD,MAAMG,IAAAA,GAAOD,eAAeF,OAAAA,EAAS,MAAA,CAAA;AACrC,IAAA,qBACII,IAAA,CAACC,MAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QACzBC,QAAAA,EAAUjB,iBAAiB,CAACU,MAAAA,CAAO;QACnCQ,OAAAA,EAASR,MAAAA,KAAW,cAAc,UAAA,GAAaR,SAAAA;QAC/CiB,QAAAA,EAAUC,eAAAA,CAAgBX,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC9CG,YAAAA,IAAAA,KAASV,2BAAamB,GAAA,CAACC,GAAAA,EAAAA;gBAAEC,SAAAA,EAAWX,IAAAA;gBAAMY,aAAAA,EAAY;;AACtDb,YAAAA,cAAAA,CAAeF,SAAS,OAAA,EAAS,EAAA;;;AAG9C;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeField.js","sources":["../../../screen/PrimeField.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 { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:field` component - one of Screenplay's screen directives: a labeled value.\n *\n * The label is bound to the value with `aria-labelledby` rather than left as two adjacent pieces of text,\n * so the pair is announced as one thing. When the `content` slot carries an editor, that editor is shown\n * instead of the static value - which is what lets the same directive serve a detail view and a form.\n */\nexport function PrimeField({ element, slots }: RegisteredComponentProps) {\n const labelId = `${element.id}-label`;\n return (\n <div data-scene-id={element.id} className='flex flex-col gap-1'>\n <span id={labelId} className='text-sm' style={{ color: 'var(--scene-text-muted-color)' }}>\n {stringProperty(element, 'label', '')}\n </span>\n <div aria-labelledby={labelId} style={{ color: 'var(--scene-text-color)' }}>\n {slots.content?.length ? slots.content : stringProperty(element, 'value', '')}\n </div>\n </div>\n );\n}\n"],"names":["PrimeField","element","slots","labelId","id","_jsxs","div","data-scene-id","className","_jsx","span","style","color","stringProperty","aria-labelledby","content","length"],"mappings":";;;AAAA;AACA;AAKA;;;;;;AAMC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACnE,IAAA,MAAMC,UAAU,CAAA,EAAGF,OAAAA,CAAQG,EAAE,CAAC,MAAM,CAAC;AACrC,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeN,QAAQG,EAAE;QAAEI,SAAAA,EAAU,qBAAA;;0BACtCC,GAAA,CAACC,MAAAA,EAAAA;gBAAKN,EAAAA,EAAID,OAAAA;gBAASK,SAAAA,EAAU,SAAA;gBAAUG,KAAAA,EAAO;oBAAEC,KAAAA,EAAO;AAAgC,iBAAA;AAClFC,gBAAAA,QAAAA,EAAAA,cAAAA,CAAeZ,SAAS,OAAA,EAAS,EAAA;;0BAEtCQ,GAAA,CAACH,KAAAA,EAAAA;gBAAIQ,iBAAAA,EAAiBX,OAAAA;gBAASQ,KAAAA,EAAO;oBAAEC,KAAAA,EAAO;AAA0B,iBAAA;0BACpEV,KAAAA,CAAMa,OAAO,EAAEC,MAAAA,GAASd,KAAAA,CAAMa,OAAO,GAAGF,cAAAA,CAAeZ,SAAS,OAAA,EAAS,EAAA;;;;AAI1F
|
|
1
|
+
{"version":3,"file":"PrimeField.js","sources":["../../../screen/PrimeField.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 { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:field` component - one of Screenplay's screen directives: a labeled value.\n *\n * The label is bound to the value with `aria-labelledby` rather than left as two adjacent pieces of text,\n * so the pair is announced as one thing. When the `content` slot carries an editor, that editor is shown\n * instead of the static value - which is what lets the same directive serve a detail view and a form.\n */\nexport function PrimeField({ element, slots }: RegisteredComponentProps) {\n const labelId = `${element.id}-label`;\n return (\n <div data-scene-id={element.id} className='flex flex-col gap-1'>\n <span id={labelId} className='text-sm' style={{ color: 'var(--scene-text-muted-color)' }}>\n {stringProperty(element, 'label', '')}\n </span>\n <div aria-labelledby={labelId} style={{ color: 'var(--scene-text-color)' }}>\n {slots.content?.length ? slots.content : stringProperty(element, 'value', '')}\n </div>\n </div>\n );\n}\n"],"names":["PrimeField","element","slots","labelId","id","_jsxs","div","data-scene-id","className","_jsx","span","style","color","stringProperty","aria-labelledby","content","length"],"mappings":";;;AAAA;AACA;AAKA;;;;;;AAMC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACnE,IAAA,MAAMC,UAAU,CAAA,EAAGF,OAAAA,CAAQG,EAAE,CAAC,MAAM,CAAC;AACrC,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeN,QAAQG,EAAE;QAAEI,SAAAA,EAAU,qBAAA;;0BACtCC,GAAA,CAACC,MAAAA,EAAAA;gBAAKN,EAAAA,EAAID,OAAAA;gBAASK,SAAAA,EAAU,SAAA;gBAAUG,KAAAA,EAAO;oBAAEC,KAAAA,EAAO;AAAgC,iBAAA;AAClFC,gBAAAA,QAAAA,EAAAA,cAAAA,CAAeZ,SAAS,OAAA,EAAS,EAAA;;0BAEtCQ,GAAA,CAACH,KAAAA,EAAAA;gBAAIQ,iBAAAA,EAAiBX,OAAAA;gBAASQ,KAAAA,EAAO;oBAAEC,KAAAA,EAAO;AAA0B,iBAAA;0BACpEV,KAAAA,CAAMa,OAAO,EAAEC,MAAAA,GAASd,KAAAA,CAAMa,OAAO,GAAGF,cAAAA,CAAeZ,SAAS,OAAA,EAAS,EAAA;;;;AAI1F;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeSection.js","sources":["../../../screen/PrimeSection.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 { Divider } from 'primereact/divider';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:section` component - one of Screenplay's screen directives: a titled grouping.\n *\n * A real `<section>` with a heading, not a styled `div`: the grouping is the point of the directive, and\n * only the semantic element actually creates one for assistive technology. The rule under the heading is\n * PrimeReact's `Divider`, so the separation is themed with everything else rather than hard-coded.\n */\nexport function PrimeSection({ element, slots }: RegisteredComponentProps) {\n const title = stringProperty(element, 'title');\n return (\n <section data-scene-id={element.id} className='flex flex-col'>\n {title !== undefined && (\n <>\n <h2 className='text-lg font-semibold' style={{ color: 'var(--scene-text-color)' }}>\n {title}\n </h2>\n <Divider />\n </>\n )}\n <div className='flex flex-col gap-3'>{slots.content}</div>\n </section>\n );\n}\n"],"names":["PrimeSection","element","slots","title","stringProperty","_jsxs","section","data-scene-id","id","className","undefined","_Fragment","_jsx","h2","style","color","Divider","div","content"],"mappings":";;;;AAOA;;;;;;AAMC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACrE,MAAMC,KAAAA,GAAQC,eAAeH,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACII,IAAA,CAACC,SAAAA,EAAAA;AAAQC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QAAEC,SAAAA,EAAU,eAAA;;AACzCN,YAAAA,KAAAA,KAAUO,SAAAA,kBACPL,IAAA,CAAAM,QAAA,EAAA;;kCACIC,GAAA,CAACC,IAAAA,EAAAA;wBAAGJ,SAAAA,EAAU,uBAAA;wBAAwBK,KAAAA,EAAO;4BAAEC,KAAAA,EAAO;AAA0B,yBAAA;AAC3EZ,wBAAAA,QAAAA,EAAAA;;kCAELS,GAAA,CAACI,OAAAA,EAAAA,EAAAA;;;0BAGTJ,GAAA,CAACK,KAAAA,EAAAA;gBAAIR,SAAAA,EAAU,qBAAA;AAAuBP,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMgB;;;;AAGxD
|
|
1
|
+
{"version":3,"file":"PrimeSection.js","sources":["../../../screen/PrimeSection.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 { Divider } from 'primereact/divider';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:section` component - one of Screenplay's screen directives: a titled grouping.\n *\n * A real `<section>` with a heading, not a styled `div`: the grouping is the point of the directive, and\n * only the semantic element actually creates one for assistive technology. The rule under the heading is\n * PrimeReact's `Divider`, so the separation is themed with everything else rather than hard-coded.\n */\nexport function PrimeSection({ element, slots }: RegisteredComponentProps) {\n const title = stringProperty(element, 'title');\n return (\n <section data-scene-id={element.id} className='flex flex-col'>\n {title !== undefined && (\n <>\n <h2 className='text-lg font-semibold' style={{ color: 'var(--scene-text-color)' }}>\n {title}\n </h2>\n <Divider />\n </>\n )}\n <div className='flex flex-col gap-3'>{slots.content}</div>\n </section>\n );\n}\n"],"names":["PrimeSection","element","slots","title","stringProperty","_jsxs","section","data-scene-id","id","className","undefined","_Fragment","_jsx","h2","style","color","Divider","div","content"],"mappings":";;;;AAOA;;;;;;AAMC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACrE,MAAMC,KAAAA,GAAQC,eAAeH,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACII,IAAA,CAACC,SAAAA,EAAAA;AAAQC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;QAAEC,SAAAA,EAAU,eAAA;;AACzCN,YAAAA,KAAAA,KAAUO,SAAAA,kBACPL,IAAA,CAAAM,QAAA,EAAA;;kCACIC,GAAA,CAACC,IAAAA,EAAAA;wBAAGJ,SAAAA,EAAU,uBAAA;wBAAwBK,KAAAA,EAAO;4BAAEC,KAAAA,EAAO;AAA0B,yBAAA;AAC3EZ,wBAAAA,QAAAA,EAAAA;;kCAELS,GAAA,CAACI,OAAAA,EAAAA,EAAAA;;;0BAGTJ,GAAA,CAACK,KAAAA,EAAAA;gBAAIR,SAAAA,EAAU,qBAAA;AAAuBP,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMgB;;;;AAGxD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeSummary.js","sources":["../../../screen/PrimeSummary.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 { Card } from 'primereact/card';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { recordArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:summary` component - one of Screenplay's screen directives: the headline facts about\n * one thing.\n *\n * Rendered as a description list inside a card. A description list is the correct element for\n * label/value pairs and gets the pairing across to a screen reader for free, which a grid of `div`s does\n * not.\n *\n * PrimeReact 11 made `Card` compositional, so the v10 `<Card title=...>` form is assembled here from\n * `Card.Root` / `Card.Body` / `Card.Caption` / `Card.Title` / `Card.Content` instead.\n *\n * The nesting matters and is easy to get wrong. `Card.Body` is the part that carries the padding - it is\n * the only one of them the preset gives a `padding` token - so everything visible has to sit inside it.\n * A title placed in a `Card.Header` instead renders flush to the card edge with no styling at all,\n * because `header` is not a themed part: the preset's `card` tokens are exactly `root`, `body`,\n * `caption`, `title` and `subtitle`, and `p-card-header` is v11's slot for a media image above the body.\n *\n * The caption is rendered only when a title was authored. v10 collapsed an absent `title` to nothing, and\n * an empty `Card.Caption` still reserves its own gap, which would leave a stray band above a summary that\n * simply has no heading.\n */\nexport function PrimeSummary({ element, slots }: RegisteredComponentProps) {\n const items = recordArrayProperty(element, 'items');\n const title = stringProperty(element, 'title');\n return (\n <Card.Root data-scene-id={element.id}>\n <Card.Body>\n {title !== undefined && (\n <Card.Caption>\n <Card.Title>{title}</Card.Title>\n </Card.Caption>\n )}\n <Card.Content>\n <dl className='grid grid-cols-2 gap-2'>\n {items.map((item, index) => (\n <div key={index} className='flex flex-col'>\n <dt className='text-sm' style={{ color: 'var(--scene-text-muted-color)' }}>\n {String(item.label ?? '')}\n </dt>\n <dd style={{ color: 'var(--scene-text-color)' }}>{String(item.value ?? '')}</dd>\n </div>\n ))}\n </dl>\n {slots.content}\n </Card.Content>\n </Card.Body>\n </Card.Root>\n );\n}\n"],"names":["PrimeSummary","element","slots","items","recordArrayProperty","title","stringProperty","_jsx","Card","Root","data-scene-id","id","_jsxs","Body","undefined","Caption","Title","Content","dl","className","map","item","index","div","dt","style","color","String","label","dd","value","content"],"mappings":";;;;AAOA;;;;;;;;;;;;;;;;;;;;AAoBC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACrE,MAAMC,KAAAA,GAAQC,oBAAoBH,OAAAA,EAAS,OAAA,CAAA;IAC3C,MAAMI,KAAAA,GAAQC,eAAeL,OAAAA,EAAS,OAAA,CAAA;IACtC,qBACIM,GAAA,CAACC,KAAKC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;gCAChCC,IAAA,CAACJ,KAAKK,IAAI,EAAA;;gBACLR,KAAAA,KAAUS,SAAAA,kBACPP,GAAA,CAACC,IAAAA,CAAKO,OAAO,EAAA;4CACTR,GAAA,CAACC,KAAKQ,KAAK,EAAA;AAAEX,wBAAAA,QAAAA,EAAAA;;;AAGrB,8BAAAO,IAAA,CAACJ,KAAKS,OAAO,EAAA;;sCACbV,GAAA,CAACW,IAAAA,EAAAA;4BAAGC,SAAAA,EAAU,wBAAA;AACThB,4BAAAA,QAAAA,EAAAA,KAAAA,CAAMiB,GAAG,CAAC,CAACC,IAAAA,EAAMC,sBACdV,IAAA,CAACW,KAAAA,EAAAA;oCAAgBJ,SAAAA,EAAU,eAAA;;sDACvBZ,GAAA,CAACiB,IAAAA,EAAAA;4CAAGL,SAAAA,EAAU,SAAA;4CAAUM,KAAAA,EAAO;gDAAEC,KAAAA,EAAO;AAAgC,6CAAA;sDACnEC,MAAAA,CAAON,IAAAA,CAAKO,KAAK,IAAI,EAAA;;sDAE1BrB,GAAA,CAACsB,IAAAA,EAAAA;4CAAGJ,KAAAA,EAAO;gDAAEC,KAAAA,EAAO;AAA0B,6CAAA;sDAAIC,MAAAA,CAAON,IAAAA,CAAKS,KAAK,IAAI,EAAA;;;AAJjER,iCAAAA,EAAAA,KAAAA,CAAAA;;AAQbpB,wBAAAA,KAAAA,CAAM6B;;;;;;AAK3B
|
|
1
|
+
{"version":3,"file":"PrimeSummary.js","sources":["../../../screen/PrimeSummary.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 { Card } from 'primereact/card';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { recordArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:summary` component - one of Screenplay's screen directives: the headline facts about\n * one thing.\n *\n * Rendered as a description list inside a card. A description list is the correct element for\n * label/value pairs and gets the pairing across to a screen reader for free, which a grid of `div`s does\n * not.\n *\n * PrimeReact 11 made `Card` compositional, so the v10 `<Card title=...>` form is assembled here from\n * `Card.Root` / `Card.Body` / `Card.Caption` / `Card.Title` / `Card.Content` instead.\n *\n * The nesting matters and is easy to get wrong. `Card.Body` is the part that carries the padding - it is\n * the only one of them the preset gives a `padding` token - so everything visible has to sit inside it.\n * A title placed in a `Card.Header` instead renders flush to the card edge with no styling at all,\n * because `header` is not a themed part: the preset's `card` tokens are exactly `root`, `body`,\n * `caption`, `title` and `subtitle`, and `p-card-header` is v11's slot for a media image above the body.\n *\n * The caption is rendered only when a title was authored. v10 collapsed an absent `title` to nothing, and\n * an empty `Card.Caption` still reserves its own gap, which would leave a stray band above a summary that\n * simply has no heading.\n */\nexport function PrimeSummary({ element, slots }: RegisteredComponentProps) {\n const items = recordArrayProperty(element, 'items');\n const title = stringProperty(element, 'title');\n return (\n <Card.Root data-scene-id={element.id}>\n <Card.Body>\n {title !== undefined && (\n <Card.Caption>\n <Card.Title>{title}</Card.Title>\n </Card.Caption>\n )}\n <Card.Content>\n <dl className='grid grid-cols-2 gap-2'>\n {items.map((item, index) => (\n <div key={index} className='flex flex-col'>\n <dt className='text-sm' style={{ color: 'var(--scene-text-muted-color)' }}>\n {String(item.label ?? '')}\n </dt>\n <dd style={{ color: 'var(--scene-text-color)' }}>{String(item.value ?? '')}</dd>\n </div>\n ))}\n </dl>\n {slots.content}\n </Card.Content>\n </Card.Body>\n </Card.Root>\n );\n}\n"],"names":["PrimeSummary","element","slots","items","recordArrayProperty","title","stringProperty","_jsx","Card","Root","data-scene-id","id","_jsxs","Body","undefined","Caption","Title","Content","dl","className","map","item","index","div","dt","style","color","String","label","dd","value","content"],"mappings":";;;;AAOA;;;;;;;;;;;;;;;;;;;;AAoBC,IACM,SAASA,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACrE,MAAMC,KAAAA,GAAQC,oBAAoBH,OAAAA,EAAS,OAAA,CAAA;IAC3C,MAAMI,KAAAA,GAAQC,eAAeL,OAAAA,EAAS,OAAA,CAAA;IACtC,qBACIM,GAAA,CAACC,KAAKC,IAAI,EAAA;AAACC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;gCAChCC,IAAA,CAACJ,KAAKK,IAAI,EAAA;;gBACLR,KAAAA,KAAUS,SAAAA,kBACPP,GAAA,CAACC,IAAAA,CAAKO,OAAO,EAAA;4CACTR,GAAA,CAACC,KAAKQ,KAAK,EAAA;AAAEX,wBAAAA,QAAAA,EAAAA;;;AAGrB,8BAAAO,IAAA,CAACJ,KAAKS,OAAO,EAAA;;sCACbV,GAAA,CAACW,IAAAA,EAAAA;4BAAGC,SAAAA,EAAU,wBAAA;AACThB,4BAAAA,QAAAA,EAAAA,KAAAA,CAAMiB,GAAG,CAAC,CAACC,IAAAA,EAAMC,sBACdV,IAAA,CAACW,KAAAA,EAAAA;oCAAgBJ,SAAAA,EAAU,eAAA;;sDACvBZ,GAAA,CAACiB,IAAAA,EAAAA;4CAAGL,SAAAA,EAAU,SAAA;4CAAUM,KAAAA,EAAO;gDAAEC,KAAAA,EAAO;AAAgC,6CAAA;sDACnEC,MAAAA,CAAON,IAAAA,CAAKO,KAAK,IAAI,EAAA;;sDAE1BrB,GAAA,CAACsB,IAAAA,EAAAA;4CAAGJ,KAAAA,EAAO;gDAAEC,KAAAA,EAAO;AAA0B,6CAAA;sDAAIC,MAAAA,CAAON,IAAAA,CAAKS,KAAK,IAAI,EAAA;;;AAJjER,iCAAAA,EAAAA,KAAAA,CAAAA;;AAQbpB,wBAAAA,KAAAA,CAAM6B;;;;;;AAK3B;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeText.js","sources":["../../../screen/PrimeText.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 { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:text` component - a run of prose.\n *\n * PrimeReact has no text primitive, so this one is written directly rather than wrapped. It is still\n * worth shipping: it claims the bare name `core` also declares, and unlike core's unstyled span it picks\n * up the active theme's type color and muting through the Scene token bridge. That is the smallest\n * possible demonstration of why override priority exists - the same screen, the same name, better output\n * once a component library is in the profile.\n */\nexport function PrimeText({ element, slots }: RegisteredComponentProps) {\n const muted = booleanProperty(element, 'muted', false);\n const strong = booleanProperty(element, 'strong', false);\n return (\n <span\n data-scene-id={element.id}\n className={`${muted ? 'opacity-75' : ''} ${strong ? 'font-semibold' : ''}`.trim()}\n style={{ color: muted ? 'var(--scene-text-muted-color)' : 'var(--scene-text-color)' }}>\n {stringProperty(element, 'text', '')}\n {slots.content}\n </span>\n );\n}\n"],"names":["PrimeText","element","slots","muted","booleanProperty","strong","_jsxs","span","data-scene-id","id","className","trim","style","color","stringProperty","content"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;;AAQC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAClE,MAAMC,KAAAA,GAAQC,eAAAA,CAAgBH,OAAAA,EAAS,OAAA,EAAS,KAAA,CAAA;IAChD,MAAMI,MAAAA,GAASD,eAAAA,CAAgBH,OAAAA,EAAS,QAAA,EAAU,KAAA,CAAA;AAClD,IAAA,qBACIK,IAAA,CAACC,MAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBC,SAAAA,EAAW,CAAA,EAAGP,KAAAA,GAAQ,YAAA,GAAe,EAAA,CAAG,CAAC,EAAEE,MAAAA,GAAS,eAAA,GAAkB,EAAA,CAAA,CAAI,CAACM,IAAI,EAAA;QAC/EC,KAAAA,EAAO;AAAEC,YAAAA,KAAAA,EAAOV,QAAQ,+BAAA,GAAkC;AAA0B,SAAA;;AACnFW,YAAAA,cAAAA,CAAeb,SAAS,MAAA,EAAQ,EAAA,CAAA;AAChCC,YAAAA,KAAAA,CAAMa;;;AAGnB
|
|
1
|
+
{"version":3,"file":"PrimeText.js","sources":["../../../screen/PrimeText.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 { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:text` component - a run of prose.\n *\n * PrimeReact has no text primitive, so this one is written directly rather than wrapped. It is still\n * worth shipping: it claims the bare name `core` also declares, and unlike core's unstyled span it picks\n * up the active theme's type color and muting through the Scene token bridge. That is the smallest\n * possible demonstration of why override priority exists - the same screen, the same name, better output\n * once a component library is in the profile.\n */\nexport function PrimeText({ element, slots }: RegisteredComponentProps) {\n const muted = booleanProperty(element, 'muted', false);\n const strong = booleanProperty(element, 'strong', false);\n return (\n <span\n data-scene-id={element.id}\n className={`${muted ? 'opacity-75' : ''} ${strong ? 'font-semibold' : ''}`.trim()}\n style={{ color: muted ? 'var(--scene-text-muted-color)' : 'var(--scene-text-color)' }}>\n {stringProperty(element, 'text', '')}\n {slots.content}\n </span>\n );\n}\n"],"names":["PrimeText","element","slots","muted","booleanProperty","strong","_jsxs","span","data-scene-id","id","className","trim","style","color","stringProperty","content"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;;AAQC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAClE,MAAMC,KAAAA,GAAQC,eAAAA,CAAgBH,OAAAA,EAAS,OAAA,EAAS,KAAA,CAAA;IAChD,MAAMI,MAAAA,GAASD,eAAAA,CAAgBH,OAAAA,EAAS,QAAA,EAAU,KAAA,CAAA;AAClD,IAAA,qBACIK,IAAA,CAACC,MAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBC,SAAAA,EAAW,CAAA,EAAGP,KAAAA,GAAQ,YAAA,GAAe,EAAA,CAAG,CAAC,EAAEE,MAAAA,GAAS,eAAA,GAAkB,EAAA,CAAA,CAAI,CAACM,IAAI,EAAA;QAC/EC,KAAAA,EAAO;AAAEC,YAAAA,KAAAA,EAAOV,QAAQ,+BAAA,GAAkC;AAA0B,SAAA;;AACnFW,YAAAA,cAAAA,CAAeb,SAAS,MAAA,EAAQ,EAAA,CAAA;AAChCC,YAAAA,KAAAA,CAAMa;;;AAGnB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeTitle.js","sources":["../../../screen/PrimeTitle.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 { createElement } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:title` component - one of Screenplay's screen directives.\n *\n * Renders a real heading element at the authored level rather than a styled span, because heading level\n * is the document outline a screen reader navigates by; getting it right is not a styling choice. The\n * level is clamped to 1-6 so an out-of-range value degrades to a valid heading instead of an invalid tag.\n */\nexport function PrimeTitle({ element }: RegisteredComponentProps) {\n const level = Math.min(6, Math.max(1, Math.round(numberProperty(element, 'level', 1))));\n const sizes = ['text-3xl', 'text-2xl', 'text-xl', 'text-lg', 'text-base', 'text-sm'];\n return createElement(\n `h${level}`,\n {\n 'data-scene-id': element.id,\n className: `${sizes[level - 1]} font-semibold`,\n style: { color: 'var(--scene-text-color)' },\n },\n stringProperty(element, 'text', '')\n );\n}\n"],"names":["PrimeTitle","element","level","Math","min","max","round","numberProperty","sizes","createElement","id","className","style","color","stringProperty"],"mappings":";;;AAAA;AACA;AAMA;;;;;;AAMC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;AAC5D,IAAA,MAAMC,KAAAA,GAAQC,IAAAA,CAAKC,GAAG,CAAC,GAAGD,IAAAA,CAAKE,GAAG,CAAC,CAAA,EAAGF,IAAAA,CAAKG,KAAK,CAACC,cAAAA,CAAeN,SAAS,OAAA,EAAS,CAAA,CAAA,CAAA,CAAA,CAAA;AAClF,IAAA,MAAMO,KAAAA,GAAQ;AAAC,QAAA,UAAA;AAAY,QAAA,UAAA;AAAY,QAAA,SAAA;AAAW,QAAA,SAAA;AAAW,QAAA,WAAA;AAAa,QAAA;AAAU,KAAA;AACpF,IAAA,qBAAOC,aAAAA,CACH,CAAC,CAAC,EAAEP,OAAO,EACX;AACI,QAAA,eAAA,EAAiBD,QAAQS,EAAE;AAC3BC,QAAAA,SAAAA,EAAW,GAAGH,KAAK,CAACN,QAAQ,CAAA,CAAE,CAAC,cAAc,CAAC;QAC9CU,KAAAA,EAAO;YAAEC,KAAAA,EAAO;AAA0B;KAC9C,EACAC,cAAAA,CAAeb,SAAS,MAAA,EAAQ,EAAA,CAAA,CAAA;AAExC
|
|
1
|
+
{"version":3,"file":"PrimeTitle.js","sources":["../../../screen/PrimeTitle.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 { createElement } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:title` component - one of Screenplay's screen directives.\n *\n * Renders a real heading element at the authored level rather than a styled span, because heading level\n * is the document outline a screen reader navigates by; getting it right is not a styling choice. The\n * level is clamped to 1-6 so an out-of-range value degrades to a valid heading instead of an invalid tag.\n */\nexport function PrimeTitle({ element }: RegisteredComponentProps) {\n const level = Math.min(6, Math.max(1, Math.round(numberProperty(element, 'level', 1))));\n const sizes = ['text-3xl', 'text-2xl', 'text-xl', 'text-lg', 'text-base', 'text-sm'];\n return createElement(\n `h${level}`,\n {\n 'data-scene-id': element.id,\n className: `${sizes[level - 1]} font-semibold`,\n style: { color: 'var(--scene-text-color)' },\n },\n stringProperty(element, 'text', '')\n );\n}\n"],"names":["PrimeTitle","element","level","Math","min","max","round","numberProperty","sizes","createElement","id","className","style","color","stringProperty"],"mappings":";;;AAAA;AACA;AAMA;;;;;;AAMC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;AAC5D,IAAA,MAAMC,KAAAA,GAAQC,IAAAA,CAAKC,GAAG,CAAC,GAAGD,IAAAA,CAAKE,GAAG,CAAC,CAAA,EAAGF,IAAAA,CAAKG,KAAK,CAACC,cAAAA,CAAeN,SAAS,OAAA,EAAS,CAAA,CAAA,CAAA,CAAA,CAAA;AAClF,IAAA,MAAMO,KAAAA,GAAQ;AAAC,QAAA,UAAA;AAAY,QAAA,UAAA;AAAY,QAAA,SAAA;AAAW,QAAA,SAAA;AAAW,QAAA,WAAA;AAAa,QAAA;AAAU,KAAA;AACpF,IAAA,qBAAOC,aAAAA,CACH,CAAC,CAAC,EAAEP,OAAO,EACX;AACI,QAAA,eAAA,EAAiBD,QAAQS,EAAE;AAC3BC,QAAAA,SAAAA,EAAW,GAAGH,KAAK,CAACN,QAAQ,CAAA,CAAE,CAAC,cAAc,CAAC;QAC9CU,KAAAA,EAAO;YAAEC,KAAAA,EAAO;AAA0B;KAC9C,EACAC,cAAAA,CAAeb,SAAS,MAAA,EAAQ,EAAA,CAAA,CAAA;AAExC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimeReactThemeFamily.js","sources":["../../../theme/PrimeReactThemeFamily.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\n/**\n * The `@primeuix/themes` preset families a PrimeReact 11 theme can be built on.\n *\n * PrimeReact 10 had no concept like this: a theme was a folder name and a compiled stylesheet, and the\n * family it belonged to was a naming convention rather than anything the code could act on. In v11 the\n * family is the actual unit of design - a JavaScript preset object supplied to `PrimeReactProvider` -\n * and a Scene theme is that preset plus an accent color. Making it an enum rather than a string means a\n * theme cannot name a family that does not exist, and `primeReactThemePreset` gets an exhaustive\n * `switch` the compiler checks when PrimeTek adds a fifth family.\n */\nexport enum PrimeReactThemeFamily {\n /**\n * Aura - PrimeTek's flagship design language for v11, and the one their own documentation defaults\n * to. Softer radii and a lower-contrast surface ramp than Lara.\n */\n Aura = 'aura',\n\n /**\n * Lara - the family Scene shipped throughout PrimeReact 10. Carried forward so an application\n * upgrading from v10 can keep a recognisably similar look.\n */\n Lara = 'lara',\n\n /**\n * Nora - tighter spacing, squarer corners and heavier borders. The most compact of the four.\n */\n Nora = 'nora',\n\n /**\n * Material - PrimeTek's reading of Material Design, and the nearest thing v11 has to the v10\n * `md-*` and `mdc-*` themes.\n */\n Material = 'material',\n}\n"],"names":["PrimeReactThemeFamily"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;IAUO,IAAKA,qBAAAA,iBAAAA,SAAAA,qBAAAA,EAAAA;AACR;;;AAGC,QAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAA;AAGD;;;AAGC,QAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAA;AAGD;;AAEC,QAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAA;AAGD;;;AAGC,QAAA,qBAAA,CAAA,UAAA,CAAA,GAAA,UAAA;AArBOA,IAAAA,OAAAA,qBAAAA;AAuBX,CAAA,CAAA,EAAA
|
|
1
|
+
{"version":3,"file":"PrimeReactThemeFamily.js","sources":["../../../theme/PrimeReactThemeFamily.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\n/**\n * The `@primeuix/themes` preset families a PrimeReact 11 theme can be built on.\n *\n * PrimeReact 10 had no concept like this: a theme was a folder name and a compiled stylesheet, and the\n * family it belonged to was a naming convention rather than anything the code could act on. In v11 the\n * family is the actual unit of design - a JavaScript preset object supplied to `PrimeReactProvider` -\n * and a Scene theme is that preset plus an accent color. Making it an enum rather than a string means a\n * theme cannot name a family that does not exist, and `primeReactThemePreset` gets an exhaustive\n * `switch` the compiler checks when PrimeTek adds a fifth family.\n */\nexport enum PrimeReactThemeFamily {\n /**\n * Aura - PrimeTek's flagship design language for v11, and the one their own documentation defaults\n * to. Softer radii and a lower-contrast surface ramp than Lara.\n */\n Aura = 'aura',\n\n /**\n * Lara - the family Scene shipped throughout PrimeReact 10. Carried forward so an application\n * upgrading from v10 can keep a recognisably similar look.\n */\n Lara = 'lara',\n\n /**\n * Nora - tighter spacing, squarer corners and heavier borders. The most compact of the four.\n */\n Nora = 'nora',\n\n /**\n * Material - PrimeTek's reading of Material Design, and the nearest thing v11 has to the v10\n * `md-*` and `mdc-*` themes.\n */\n Material = 'material',\n}\n"],"names":["PrimeReactThemeFamily"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;IAUO,IAAKA,qBAAAA,iBAAAA,SAAAA,qBAAAA,EAAAA;AACR;;;AAGC,QAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAA;AAGD;;;AAGC,QAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAA;AAGD;;AAEC,QAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAA;AAGD;;;AAGC,QAAA,qBAAA,CAAA,UAAA,CAAA,GAAA,UAAA;AArBOA,IAAAA,OAAAA,qBAAAA;AAuBX,CAAA,CAAA,EAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primeReactThemePreset.js","sources":["../../../theme/primeReactThemePreset.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 { definePreset } from '@primeuix/themes';\nimport Aura from '@primeuix/themes/aura';\nimport Lara from '@primeuix/themes/lara';\nimport Material from '@primeuix/themes/material';\nimport Nora from '@primeuix/themes/nora';\nimport { PrimeReactThemeFamily } from './PrimeReactThemeFamily';\nimport { themePresets } from './themePresets';\n\n/**\n * A `@primeuix/themes` preset, as `PrimeReactProvider` wants it.\n *\n * `@primeuix/themes` types this as `Preset`, but the type is generic over the preset's own token shape\n * and the four families do not share one instantiation, so naming the union here rather than importing\n * `Preset` keeps the call sites free of casts.\n */\nexport type PrimeReactPreset = typeof Aura | typeof Lara | typeof Nora | typeof Material;\n\n/**\n * The base preset object for each family.\n *\n * These are PrimeTek's own preset exports, untouched. The accent binding in\n * {@link primeReactThemePreset} is applied on top with `definePreset`, which merges rather than mutates -\n * important, because these objects are module singletons and two themes tinted differently must not\n * fight over one shared object.\n */\nconst basePresets: Record<PrimeReactThemeFamily, PrimeReactPreset> = {\n [PrimeReactThemeFamily.Aura]: Aura,\n [PrimeReactThemeFamily.Lara]: Lara,\n [PrimeReactThemeFamily.Nora]: Nora,\n [PrimeReactThemeFamily.Material]: Material,\n};\n\n/**\n * Presets are built once per theme name and reused.\n *\n * `definePreset` deep-merges, so calling it per render would produce a new object every time - and\n * `PrimeReactProvider` treats a new preset identity as a theme change, which re-emits every `--p-*`\n * custom property. Caching keeps switching themes cheap and, more importantly, keeps *not* switching\n * free.\n */\nconst presetCache = new Map<string, PrimeReactPreset>();\n\n/**\n * Resolves one of this package's themes to the `@primeuix/themes` preset that renders it.\n *\n * This is what replaced `primeReactThemeStylesheet` in the PrimeReact 11 port, and the change is the\n * whole shape of theming in v11 in one function. A v10 theme was a *file*: the question was which URL to\n * load, the answer was a string, and applying it meant swapping a `<link>`. A v11 theme is an *object*:\n * the question is which preset to hand `PrimeReactProvider`, the answer is a value, and applying it\n * means re-rendering a provider. Nothing is fetched, so there is no unstyled flash on switch and no way\n * for a theme to 404.\n *\n * The accent is bound by overriding the preset's `primary` scale with a primitive color ramp the preset\n * already ships - so `lara-light-teal` is genuinely Lara with Lara's own teal, not an approximation\n * mixed here.\n *\n * @param themeName The theme name, as it appears in {@link themePresets}.\n * @returns The preset, or `undefined` when this package ships no theme by that name. `undefined` rather\n * than a default preset, because silently theming a screen as something other than what was asked for is\n * harder to notice than nothing happening.\n */\nexport function primeReactThemePreset(themeName: string): PrimeReactPreset | undefined {\n const cached = presetCache.get(themeName);\n if (cached !== undefined) return cached;\n\n const preset = themePresets.find((candidate) => candidate.name === themeName);\n if (preset === undefined) return undefined;\n\n const base = basePresets[preset.family];\n\n // The ramp is looked up by name, so its type has to be widened to index the primitives and then\n // narrowed again for `definePreset`. `ColorScale` is the shape every primitive color in a preset has -\n // the 50..950 steps - and `primaryColor` is only ever one of those names, guaranteed by the catalog.\n const primitives = base.primitive as unknown as Record<string, Record<string, string>>;\n const ramp = primitives[preset.primaryColor];\n const built = definePreset(base, { semantic: { primary: ramp } }) as PrimeReactPreset;\n\n presetCache.set(themeName, built);\n return built;\n}\n"],"names":["basePresets","PrimeReactThemeFamily","Aura","Lara","Nora","Material","presetCache","Map","primeReactThemePreset","themeName","cached","get","undefined","preset","themePresets","find","candidate","name","base","family","primitives","primitive","ramp","primaryColor","built","definePreset","semantic","primary","set"],"mappings":";;;;;;;;AAAA;AACA;AAmBA;;;;;;;AAOC,IACD,MAAMA,WAAAA,GAA+D;IACjE,CAACC,qBAAAA,CAAsBC,IAAI,GAAGA,IAAAA;IAC9B,CAACD,qBAAAA,CAAsBE,IAAI,GAAGA,IAAAA;IAC9B,CAACF,qBAAAA,CAAsBG,IAAI,GAAGA,IAAAA;IAC9B,CAACH,qBAAAA,CAAsBI,QAAQ,GAAGA;AACtC,CAAA;AAEA;;;;;;;IAQA,MAAMC,cAAc,IAAIC,GAAAA,EAAAA;AAExB;;;;;;;;;;;;;;;;;;IAmBO,SAASC,qBAAAA,CAAsBC,SAAiB,EAAA;IACnD,MAAMC,MAAAA,GAASJ,WAAAA,CAAYK,GAAG,CAACF,SAAAA,CAAAA;IAC/B,IAAIC,MAAAA,KAAWE,WAAW,OAAOF,MAAAA;IAEjC,MAAMG,MAAAA,GAASC,aAAaC,IAAI,CAAC,CAACC,SAAAA,GAAcA,SAAAA,CAAUC,IAAI,KAAKR,SAAAA,CAAAA;IACnE,IAAII,MAAAA,KAAWD,WAAW,OAAOA,SAAAA;AAEjC,IAAA,MAAMM,IAAAA,GAAOlB,WAAW,CAACa,MAAAA,CAAOM,MAAM,CAAC;;;;IAKvC,MAAMC,UAAAA,GAAaF,KAAKG,SAAS;AACjC,IAAA,MAAMC,IAAAA,GAAOF,UAAU,CAACP,MAAAA,CAAOU,YAAY,CAAC;IAC5C,MAAMC,KAAAA,GAAQC,aAAaP,IAAAA,EAAM;QAAEQ,QAAAA,EAAU;YAAEC,OAAAA,EAASL;AAAK;AAAE,KAAA,CAAA;IAE/DhB,WAAAA,CAAYsB,GAAG,CAACnB,SAAAA,EAAWe,KAAAA,CAAAA;IAC3B,OAAOA,KAAAA;AACX
|
|
1
|
+
{"version":3,"file":"primeReactThemePreset.js","sources":["../../../theme/primeReactThemePreset.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 { definePreset } from '@primeuix/themes';\nimport Aura from '@primeuix/themes/aura';\nimport Lara from '@primeuix/themes/lara';\nimport Material from '@primeuix/themes/material';\nimport Nora from '@primeuix/themes/nora';\nimport { PrimeReactThemeFamily } from './PrimeReactThemeFamily';\nimport { themePresets } from './themePresets';\n\n/**\n * A `@primeuix/themes` preset, as `PrimeReactProvider` wants it.\n *\n * `@primeuix/themes` types this as `Preset`, but the type is generic over the preset's own token shape\n * and the four families do not share one instantiation, so naming the union here rather than importing\n * `Preset` keeps the call sites free of casts.\n */\nexport type PrimeReactPreset = typeof Aura | typeof Lara | typeof Nora | typeof Material;\n\n/**\n * The base preset object for each family.\n *\n * These are PrimeTek's own preset exports, untouched. The accent binding in\n * {@link primeReactThemePreset} is applied on top with `definePreset`, which merges rather than mutates -\n * important, because these objects are module singletons and two themes tinted differently must not\n * fight over one shared object.\n */\nconst basePresets: Record<PrimeReactThemeFamily, PrimeReactPreset> = {\n [PrimeReactThemeFamily.Aura]: Aura,\n [PrimeReactThemeFamily.Lara]: Lara,\n [PrimeReactThemeFamily.Nora]: Nora,\n [PrimeReactThemeFamily.Material]: Material,\n};\n\n/**\n * Presets are built once per theme name and reused.\n *\n * `definePreset` deep-merges, so calling it per render would produce a new object every time - and\n * `PrimeReactProvider` treats a new preset identity as a theme change, which re-emits every `--p-*`\n * custom property. Caching keeps switching themes cheap and, more importantly, keeps *not* switching\n * free.\n */\nconst presetCache = new Map<string, PrimeReactPreset>();\n\n/**\n * Resolves one of this package's themes to the `@primeuix/themes` preset that renders it.\n *\n * This is what replaced `primeReactThemeStylesheet` in the PrimeReact 11 port, and the change is the\n * whole shape of theming in v11 in one function. A v10 theme was a *file*: the question was which URL to\n * load, the answer was a string, and applying it meant swapping a `<link>`. A v11 theme is an *object*:\n * the question is which preset to hand `PrimeReactProvider`, the answer is a value, and applying it\n * means re-rendering a provider. Nothing is fetched, so there is no unstyled flash on switch and no way\n * for a theme to 404.\n *\n * The accent is bound by overriding the preset's `primary` scale with a primitive color ramp the preset\n * already ships - so `lara-light-teal` is genuinely Lara with Lara's own teal, not an approximation\n * mixed here.\n *\n * @param themeName The theme name, as it appears in {@link themePresets}.\n * @returns The preset, or `undefined` when this package ships no theme by that name. `undefined` rather\n * than a default preset, because silently theming a screen as something other than what was asked for is\n * harder to notice than nothing happening.\n */\nexport function primeReactThemePreset(themeName: string): PrimeReactPreset | undefined {\n const cached = presetCache.get(themeName);\n if (cached !== undefined) return cached;\n\n const preset = themePresets.find((candidate) => candidate.name === themeName);\n if (preset === undefined) return undefined;\n\n const base = basePresets[preset.family];\n\n // The ramp is looked up by name, so its type has to be widened to index the primitives and then\n // narrowed again for `definePreset`. `ColorScale` is the shape every primitive color in a preset has -\n // the 50..950 steps - and `primaryColor` is only ever one of those names, guaranteed by the catalog.\n const primitives = base.primitive as unknown as Record<string, Record<string, string>>;\n const ramp = primitives[preset.primaryColor];\n const built = definePreset(base, { semantic: { primary: ramp } }) as PrimeReactPreset;\n\n presetCache.set(themeName, built);\n return built;\n}\n"],"names":["basePresets","PrimeReactThemeFamily","Aura","Lara","Nora","Material","presetCache","Map","primeReactThemePreset","themeName","cached","get","undefined","preset","themePresets","find","candidate","name","base","family","primitives","primitive","ramp","primaryColor","built","definePreset","semantic","primary","set"],"mappings":";;;;;;;;AAAA;AACA;AAmBA;;;;;;;AAOC,IACD,MAAMA,WAAAA,GAA+D;IACjE,CAACC,qBAAAA,CAAsBC,IAAI,GAAGA,IAAAA;IAC9B,CAACD,qBAAAA,CAAsBE,IAAI,GAAGA,IAAAA;IAC9B,CAACF,qBAAAA,CAAsBG,IAAI,GAAGA,IAAAA;IAC9B,CAACH,qBAAAA,CAAsBI,QAAQ,GAAGA;AACtC,CAAA;AAEA;;;;;;;IAQA,MAAMC,cAAc,IAAIC,GAAAA,EAAAA;AAExB;;;;;;;;;;;;;;;;;;IAmBO,SAASC,qBAAAA,CAAsBC,SAAiB,EAAA;IACnD,MAAMC,MAAAA,GAASJ,WAAAA,CAAYK,GAAG,CAACF,SAAAA,CAAAA;IAC/B,IAAIC,MAAAA,KAAWE,WAAW,OAAOF,MAAAA;IAEjC,MAAMG,MAAAA,GAASC,aAAaC,IAAI,CAAC,CAACC,SAAAA,GAAcA,SAAAA,CAAUC,IAAI,KAAKR,SAAAA,CAAAA;IACnE,IAAII,MAAAA,KAAWD,WAAW,OAAOA,SAAAA;AAEjC,IAAA,MAAMM,IAAAA,GAAOlB,WAAW,CAACa,MAAAA,CAAOM,MAAM,CAAC;;;;IAKvC,MAAMC,UAAAA,GAAaF,KAAKG,SAAS;AACjC,IAAA,MAAMC,IAAAA,GAAOF,UAAU,CAACP,MAAAA,CAAOU,YAAY,CAAC;IAC5C,MAAMC,KAAAA,GAAQC,aAAaP,IAAAA,EAAM;QAAEQ,QAAAA,EAAU;YAAEC,OAAAA,EAASL;AAAK;AAAE,KAAA,CAAA;IAE/DhB,WAAAA,CAAYsB,GAAG,CAACnB,SAAAA,EAAWe,KAAAA,CAAAA;IAC3B,OAAOA,KAAAA;AACX;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primeReactThemes.js","sources":["../../../theme/primeReactThemes.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 { Theme } from '@cratis/scene.model';\nimport { themePresets } from './themePresets';\n\n/**\n * The packages a PrimeReact theme declares itself compatible with.\n *\n * `PrimeReact` and `Tailwind` are obvious - the preset skins PrimeReact's components, and this package's\n * own wrappers lay themselves out with Tailwind utilities.\n *\n * `core` is the interesting one, and it is listed deliberately rather than by reflex. A theme reaches a\n * screen in two layers: the `--p-*` custom properties `@primeuix/styled` emits for the active preset,\n * which only PrimeReact's own components read, and a set of semantic Scene tokens that\n * `SceneThemeProvider` writes onto the wrapping element. The second layer applies to *everything*\n * underneath it, `core`'s unstyled primitives included - they inherit the theme's type color and can read\n * any token they choose to. So the claim being made is precise: these themes genuinely reach `core`'s\n * components, through tokens rather than through the component skin.\n *\n * This has to be said explicitly because `ThemeCompatibility` has no implicit exemption for `core`. A\n * theme that leaves it out is reported incompatible for every profile that lists `core`, which for a\n * theme that really does apply would be a false alarm on nearly every profile there is.\n */\nexport const primeReactThemeCompatibility: string[] = ['PrimeReact', 'Tailwind', 'core'];\n\n/**\n * The license every theme in this catalog is published under.\n *\n * This is **not** MIT, and the difference matters enough to be a named constant rather than a string\n * repeated twenty-four times. PrimeReact 10 - presets included - was MIT. PrimeReact 11 relicensed the\n * entire stack (`primereact`, `@primereact/core`, `@primereact/headless`, `primeicons`,\n * `@primeuix/themes`, `@primeuix/styled`) under the commercial PrimeUI license, which requires a license\n * key: without one, `PrimeReactProvider` warns on the console and injects an \"Invalid PrimeUI License\"\n * banner, in development and production alike.\n *\n * `Theme`'s `license` field exists so a theme picker, an audit, or a person reading the catalog can see\n * what they are actually taking on. Reporting these as MIT because the *previous* major was MIT is the\n * exact mistake the field is there to prevent.\n *\n * @see https://primeui.dev/licenses/community for the free community tier and its eligibility limits.\n * @see https://primeui.dev/licenses/commercial for the paid tier.\n */\nexport const primeReactThemeLicense = 'PrimeUI Community / Commercial';\n\n/**\n * Where those terms live. A license name alone tells a reader nothing about whether they qualify for the\n * free Community tier or owe a commercial fee, so the catalog carries the link rather than making them\n * search for it.\n */\nexport const primeReactThemeLicenseUrl = 'https://primeui.dev/licenses/community';\n\n/**\n * Every theme this package ships, as Scene {@link Theme}s.\n *\n * None of these themes are ours. They are PrimeTek's `@primeuix/themes` presets - Aura, Lara, Nora and\n * Material - with one of the preset's own primitive color ramps bound to its primary scale. Choosing\n * which accent to bind is the only design decision Scene makes here, and it is not enough to claim\n * authorship over: the surface ramps, the radii, the focus rings, the component styling and the design\n * language are all PrimeTek's work.\n *\n * That is what `Theme`'s `author`, `authorUrl` and `license` fields exist to record, and why the credit\n * is applied here, once, to every preset, rather than written out per theme where it could be forgotten.\n */\nexport const primeReactThemes: Theme[] = themePresets.map((preset) => ({\n ...preset,\n compatibleWith: primeReactThemeCompatibility,\n author: 'PrimeTek',\n authorUrl: 'https://primereact.org',\n license: primeReactThemeLicense,\n licenseUrl: primeReactThemeLicenseUrl,\n}));\n\n/**\n * The names of every theme this package ships, in catalog order - what the manifest declares and what a\n * theme picker lists.\n */\nexport const primeReactThemeNames: string[] = primeReactThemes.map((theme) => theme.name);\n\n/**\n * Finds one of this package's themes by name.\n *\n * @param name The theme name.\n * @returns The theme, or `undefined` when this package does not ship one by that name.\n */\nexport function primeReactTheme(name: string): Theme | undefined {\n return primeReactThemes.find((theme) => theme.name === name);\n}\n"],"names":["primeReactThemeCompatibility","primeReactThemeLicense","primeReactThemeLicenseUrl","primeReactThemes","themePresets","map","preset","compatibleWith","author","authorUrl","license","licenseUrl","primeReactThemeNames","theme","name","primeReactTheme","find"],"mappings":";;AAAA;AACA;AAKA;;;;;;;;;;;;;;;;;UAkBaA,4BAAAA,GAAyC;AAAC,IAAA,YAAA;AAAc,IAAA,UAAA;AAAY,IAAA;;AAEjF;;;;;;;;;;;;;;;;IAiBO,MAAMC,sBAAAA,GAAyB;AAEtC;;;;IAKO,MAAMC,yBAAAA,GAA4B;AAEzC;;;;;;;;;;;UAYaC,gBAAAA,GAA4BC,YAAAA,CAAaC,GAAG,CAAC,CAACC,UAAY;AACnE,QAAA,GAAGA,MAAM;QACTC,cAAAA,EAAgBP,4BAAAA;QAChBQ,MAAAA,EAAQ,UAAA;QACRC,SAAAA,EAAW,wBAAA;QACXC,OAAAA,EAAST,sBAAAA;QACTU,UAAAA,EAAYT;AAChB,KAAA,CAAA;AAEA;;;IAIO,MAAMU,oBAAAA,GAAiCT,gBAAAA,CAAiBE,GAAG,CAAC,CAACQ,KAAAA,GAAUA,KAAAA,CAAMC,IAAI;AAExF;;;;;IAMO,SAASC,eAAAA,CAAgBD,IAAY,EAAA;AACxC,IAAA,OAAOX,iBAAiBa,IAAI,CAAC,CAACH,KAAAA,GAAUA,KAAAA,CAAMC,IAAI,KAAKA,IAAAA,CAAAA;AAC3D
|
|
1
|
+
{"version":3,"file":"primeReactThemes.js","sources":["../../../theme/primeReactThemes.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 { Theme } from '@cratis/scene.model';\nimport { themePresets } from './themePresets';\n\n/**\n * The packages a PrimeReact theme declares itself compatible with.\n *\n * `PrimeReact` and `Tailwind` are obvious - the preset skins PrimeReact's components, and this package's\n * own wrappers lay themselves out with Tailwind utilities.\n *\n * `core` is the interesting one, and it is listed deliberately rather than by reflex. A theme reaches a\n * screen in two layers: the `--p-*` custom properties `@primeuix/styled` emits for the active preset,\n * which only PrimeReact's own components read, and a set of semantic Scene tokens that\n * `SceneThemeProvider` writes onto the wrapping element. The second layer applies to *everything*\n * underneath it, `core`'s unstyled primitives included - they inherit the theme's type color and can read\n * any token they choose to. So the claim being made is precise: these themes genuinely reach `core`'s\n * components, through tokens rather than through the component skin.\n *\n * This has to be said explicitly because `ThemeCompatibility` has no implicit exemption for `core`. A\n * theme that leaves it out is reported incompatible for every profile that lists `core`, which for a\n * theme that really does apply would be a false alarm on nearly every profile there is.\n */\nexport const primeReactThemeCompatibility: string[] = ['PrimeReact', 'Tailwind', 'core'];\n\n/**\n * The license every theme in this catalog is published under.\n *\n * This is **not** MIT, and the difference matters enough to be a named constant rather than a string\n * repeated twenty-four times. PrimeReact 10 - presets included - was MIT. PrimeReact 11 relicensed the\n * entire stack (`primereact`, `@primereact/core`, `@primereact/headless`, `primeicons`,\n * `@primeuix/themes`, `@primeuix/styled`) under the commercial PrimeUI license, which requires a license\n * key: without one, `PrimeReactProvider` warns on the console and injects an \"Invalid PrimeUI License\"\n * banner, in development and production alike.\n *\n * `Theme`'s `license` field exists so a theme picker, an audit, or a person reading the catalog can see\n * what they are actually taking on. Reporting these as MIT because the *previous* major was MIT is the\n * exact mistake the field is there to prevent.\n *\n * @see https://primeui.dev/licenses/community for the free community tier and its eligibility limits.\n * @see https://primeui.dev/licenses/commercial for the paid tier.\n */\nexport const primeReactThemeLicense = 'PrimeUI Community / Commercial';\n\n/**\n * Where those terms live. A license name alone tells a reader nothing about whether they qualify for the\n * free Community tier or owe a commercial fee, so the catalog carries the link rather than making them\n * search for it.\n */\nexport const primeReactThemeLicenseUrl = 'https://primeui.dev/licenses/community';\n\n/**\n * Every theme this package ships, as Scene {@link Theme}s.\n *\n * None of these themes are ours. They are PrimeTek's `@primeuix/themes` presets - Aura, Lara, Nora and\n * Material - with one of the preset's own primitive color ramps bound to its primary scale. Choosing\n * which accent to bind is the only design decision Scene makes here, and it is not enough to claim\n * authorship over: the surface ramps, the radii, the focus rings, the component styling and the design\n * language are all PrimeTek's work.\n *\n * That is what `Theme`'s `author`, `authorUrl` and `license` fields exist to record, and why the credit\n * is applied here, once, to every preset, rather than written out per theme where it could be forgotten.\n */\nexport const primeReactThemes: Theme[] = themePresets.map((preset) => ({\n ...preset,\n compatibleWith: primeReactThemeCompatibility,\n author: 'PrimeTek',\n authorUrl: 'https://primereact.org',\n license: primeReactThemeLicense,\n licenseUrl: primeReactThemeLicenseUrl,\n}));\n\n/**\n * The names of every theme this package ships, in catalog order - what the manifest declares and what a\n * theme picker lists.\n */\nexport const primeReactThemeNames: string[] = primeReactThemes.map((theme) => theme.name);\n\n/**\n * Finds one of this package's themes by name.\n *\n * @param name The theme name.\n * @returns The theme, or `undefined` when this package does not ship one by that name.\n */\nexport function primeReactTheme(name: string): Theme | undefined {\n return primeReactThemes.find((theme) => theme.name === name);\n}\n"],"names":["primeReactThemeCompatibility","primeReactThemeLicense","primeReactThemeLicenseUrl","primeReactThemes","themePresets","map","preset","compatibleWith","author","authorUrl","license","licenseUrl","primeReactThemeNames","theme","name","primeReactTheme","find"],"mappings":";;AAAA;AACA;AAKA;;;;;;;;;;;;;;;;;UAkBaA,4BAAAA,GAAyC;AAAC,IAAA,YAAA;AAAc,IAAA,UAAA;AAAY,IAAA;;AAEjF;;;;;;;;;;;;;;;;IAiBO,MAAMC,sBAAAA,GAAyB;AAEtC;;;;IAKO,MAAMC,yBAAAA,GAA4B;AAEzC;;;;;;;;;;;UAYaC,gBAAAA,GAA4BC,YAAAA,CAAaC,GAAG,CAAC,CAACC,UAAY;AACnE,QAAA,GAAGA,MAAM;QACTC,cAAAA,EAAgBP,4BAAAA;QAChBQ,MAAAA,EAAQ,UAAA;QACRC,SAAAA,EAAW,wBAAA;QACXC,OAAAA,EAAST,sBAAAA;QACTU,UAAAA,EAAYT;AAChB,KAAA,CAAA;AAEA;;;IAIO,MAAMU,oBAAAA,GAAiCT,gBAAAA,CAAiBE,GAAG,CAAC,CAACQ,KAAAA,GAAUA,KAAAA,CAAMC,IAAI;AAExF;;;;;IAMO,SAASC,eAAAA,CAAgBD,IAAY,EAAA;AACxC,IAAA,OAAOX,iBAAiBa,IAAI,CAAC,CAACH,KAAAA,GAAUA,KAAAA,CAAMC,IAAI,KAAKA,IAAAA,CAAAA;AAC3D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themePresets.js","sources":["../../../theme/themePresets.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 { Theme } from '@cratis/scene.model';\nimport { PrimeReactThemeFamily } from './PrimeReactThemeFamily';\n\n/**\n * One PrimeReact theme, minus everything that is identical for all of them, plus the two facts a v11\n * theme needs that a v10 theme did not: which `@primeuix/themes` preset family it is built on, and which\n * primitive color ramp is bound to the preset's primary scale.\n *\n * Attribution and compatibility are deliberately *not* here: they are added once, for every preset, in\n * `primeReactThemes`. Every one of these themes is PrimeTek's design work and none of them is ours, so\n * crediting them one entry at a time would make it possible to add a twenty-fifth and forget - and a\n * dropped credit is not the kind of mistake a code review reliably catches.\n */\nexport type ThemePreset = Omit<Theme, 'compatibleWith' | 'author' | 'authorUrl' | 'license'> & {\n /**\n * The `@primeuix/themes` preset family this theme applies through `PrimeReactProvider`.\n */\n family: PrimeReactThemeFamily;\n\n /**\n * The name of the primitive color ramp bound to the preset's `primary` scale - the accent the whole\n * theme is tinted by.\n */\n primaryColor: string;\n};\n\n/**\n * Every theme this package ships, and the Scene tokens each one stands for.\n *\n * This is data, not logic, but unlike the PrimeReact 10 catalog it is *derived* data. A v10 theme was a\n * compiled stylesheet whose `:root` block could be read with a text editor, so the token values were\n * transcribed by hand. A v11 theme is a JavaScript preset whose values are token *references* -\n * `{emerald.500}`, `light-dark({surface.0}, {surface.900})` - resolved by `@primeuix/styled` at runtime.\n * Transcribing those by hand would mean re-implementing the resolver in one's head, once per theme.\n *\n * So these values were generated: each preset was loaded, its `primary` scale bound to the chosen color\n * ramp, and the thirteen Scene tokens resolved through the same `light-dark()` and `{path}` rules\n * `@primeuix/styled` applies. What is committed here is the *output* of that resolution, so the catalog\n * stays plain data that a theme picker can read without booting a theme engine - while still agreeing,\n * value for value, with what the preset actually renders.\n *\n * The catalog is not a like-for-like port of the v10 one. PrimeReact 11 ships four preset families -\n * Aura, Lara, Nora and Material - and the v10 themes that had no counterpart among them (`saga`,\n * `vela`, `arya`, `bootstrap4`, `soho`, `viva`, `nano`, `mira`, `fluent-light`, `tailwind-light`) are\n * not carried over. Renaming a Lara onto `soho-dark` would have kept the catalog's length at the cost\n * of its honesty.\n */\nexport const themePresets: ThemePreset[] = [\n {\n name: 'aura-light-blue',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a blue accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eff6ff',\n 'highlight.color': '#1d4ed8',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-blue',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#60a5fa',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #60a5fa, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-indigo',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#4338ca',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-indigo',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #818cf8, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-purple',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a purple accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#a855f7',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#faf5ff',\n 'highlight.color': '#7e22ce',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-purple',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#c084fc',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #c084fc, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-teal',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a teal accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'teal',\n isDark: false,\n tokens: {\n 'primary.color': '#14b8a6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#f0fdfa',\n 'highlight.color': '#0f766e',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-teal',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a teal accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'teal',\n isDark: true,\n tokens: {\n 'primary.color': '#2dd4bf',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #2dd4bf, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'lara-light-blue',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a blue accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eff6ff',\n 'highlight.color': '#1d4ed8',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #bfdbfe',\n },\n },\n {\n name: 'lara-dark-blue',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#60a5fa',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #60a5fa, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #60a5fa, transparent 80%)',\n },\n },\n {\n name: 'lara-light-indigo',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#4338ca',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #c7d2fe',\n },\n },\n {\n name: 'lara-dark-indigo',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #818cf8, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #818cf8, transparent 80%)',\n },\n },\n {\n name: 'lara-light-purple',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a purple accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#a855f7',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#faf5ff',\n 'highlight.color': '#7e22ce',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #e9d5ff',\n },\n },\n {\n name: 'lara-dark-purple',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#c084fc',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #c084fc, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #c084fc, transparent 80%)',\n },\n },\n {\n name: 'lara-light-teal',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a teal accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'teal',\n isDark: false,\n tokens: {\n 'primary.color': '#14b8a6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#f0fdfa',\n 'highlight.color': '#0f766e',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #99f6e4',\n },\n },\n {\n name: 'lara-dark-teal',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a teal accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'teal',\n isDark: true,\n tokens: {\n 'primary.color': '#2dd4bf',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #2dd4bf, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #2dd4bf, transparent 80%)',\n },\n },\n {\n name: 'nora-light-blue',\n description: 'Nora, a tighter, squarer, more compact family, in light on a blue accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#2563eb',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#94a3b8',\n 'surface.hover': '#e2e8f0',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': '#2563eb',\n 'highlight.color': '#ffffff',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-dark-blue',\n description: 'Nora, a tighter, squarer, more compact family, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#09090b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#71717a',\n 'surface.hover': '#3f3f46',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': '#3b82f6',\n 'highlight.color': '#09090b',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-light-indigo',\n description: 'Nora, a tighter, squarer, more compact family, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#4f46e5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#94a3b8',\n 'surface.hover': '#e2e8f0',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': '#4f46e5',\n 'highlight.color': '#ffffff',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-dark-indigo',\n description: 'Nora, a tighter, squarer, more compact family, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#09090b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#71717a',\n 'surface.hover': '#3f3f46',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': '#6366f1',\n 'highlight.color': '#09090b',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'material-light-indigo',\n description: 'Material, the PrimeTek reading of Material Design, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#3F51B5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#cbd5e1',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': 'color-mix(in srgb, #3F51B5, transparent 88%)',\n 'highlight.color': '#303F9F',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #e2e8f0',\n },\n },\n {\n name: 'material-dark-indigo',\n description: 'Material, the PrimeTek reading of Material Design, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#5C6BC0',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #5C6BC0, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #3f3f46',\n },\n },\n {\n name: 'material-light-purple',\n description: 'Material, the PrimeTek reading of Material Design, in light on a purple accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#9C27B0',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#cbd5e1',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': 'color-mix(in srgb, #9C27B0, transparent 88%)',\n 'highlight.color': '#7B1FA2',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #e2e8f0',\n },\n },\n {\n name: 'material-dark-purple',\n description: 'Material, the PrimeTek reading of Material Design, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#AB47BC',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #AB47BC, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #3f3f46',\n },\n },\n];\n"],"names":["themePresets","name","description","family","PrimeReactThemeFamily","Aura","primaryColor","isDark","tokens","Lara","Nora","Material"],"mappings":";;AAAA;AACA;AA4BA;;;;;;;;;;;;;;;;;;;;UAqBaA,YAAAA,GAA8B;AACvC,IAAA;QACIC,IAAAA,EAAM,iBAAA;QACNC,WAAAA,EAAa,8EAAA;AACbC,QAAAA,MAAAA,EAAQC,sBAAsBC,IAAI;QAClCC,YAAAA,EAAc,MAAA;QACdC,MAAAA,EAAQ,KAAA;QACRC,MAAAA,EAAQ;YACJ,eAAA,EAAiB,SAAA;YACjB,uBAAA,EAAyB,SAAA;YACzB,oBAAA,EAAsB,SAAA;YACtB,cAAA,EAAgB,SAAA;YAChB,gBAAA,EAAkB,SAAA;YAClB,eAAA,EAAiB,SAAA;YACjB,iBAAA,EAAmB,SAAA;YACnB,YAAA,EAAc,SAAA;YACd,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,SAAA;YACxB,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,KAAA;YACxB,YAAA,EAAc;AAClB;AACJ,KAAA;AACA,IAAA;QACIP,IAAAA,EAAM,gBAAA;QACNC,WAAAA,EAAa,6EAAA;AACbC,QAAAA,MAAAA,EAAQC,sBAAsBC,IAAI;QAClCC,YAAAA,EAAc,MAAA;QACdC,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;YACJ,eAAA,EAAiB,SAAA;YACjB,uBAAA,EAAyB,SAAA;YACzB,oBAAA,EAAsB,SAAA;YACtB,cAAA,EAAgB,SAAA;YAChB,gBAAA,EAAkB,SAAA;YAClB,eAAA,EAAiB,SAAA;YACjB,iBAAA,EAAmB,SAAA;YACnB,YAAA,EAAc,SAAA;YACd,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,8CAAA;YACx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CAAA;YACxB,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,KAAA;YACxB,YAAA,EAAc;AAClB;AACJ,KAAA;AACA,IAAA;QACIP,IAAAA,EAAM,sBAAA;QACNC,WAAAA,EAAa,gFAAA;AACbC,QAAAA,MAAAA,EAAQC,sBAAsBO,QAAQ;QACtCL,YAAAA,EAAc,QAAA;QACdC,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;YACJ,eAAA,EAAiB,SAAA;YACjB,uBAAA,EAAyB,SAAA;YACzB,oBAAA,EAAsB,SAAA;YACtB,cAAA,EAAgB,SAAA;YAChB,gBAAA,EAAkB,SAAA;YAClB,eAAA,EAAiB,SAAA;YACjB,iBAAA,EAAmB,SAAA;YACnB,YAAA,EAAc,SAAA;YACd,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,8CAAA;YACxB,iBAAA,EAAmB,uBAAA;YACnB,sBAAA,EAAwB,KAAA;YACxB,YAAA,EAAc;AAClB;AACJ;;;;;"}
|
|
1
|
+
{"version":3,"file":"themePresets.js","sources":["../../../theme/themePresets.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 { Theme } from '@cratis/scene.model';\nimport { PrimeReactThemeFamily } from './PrimeReactThemeFamily';\n\n/**\n * One PrimeReact theme, minus everything that is identical for all of them, plus the two facts a v11\n * theme needs that a v10 theme did not: which `@primeuix/themes` preset family it is built on, and which\n * primitive color ramp is bound to the preset's primary scale.\n *\n * Attribution and compatibility are deliberately *not* here: they are added once, for every preset, in\n * `primeReactThemes`. Every one of these themes is PrimeTek's design work and none of them is ours, so\n * crediting them one entry at a time would make it possible to add a twenty-fifth and forget - and a\n * dropped credit is not the kind of mistake a code review reliably catches.\n */\nexport type ThemePreset = Omit<Theme, 'compatibleWith' | 'author' | 'authorUrl' | 'license'> & {\n /**\n * The `@primeuix/themes` preset family this theme applies through `PrimeReactProvider`.\n */\n family: PrimeReactThemeFamily;\n\n /**\n * The name of the primitive color ramp bound to the preset's `primary` scale - the accent the whole\n * theme is tinted by.\n */\n primaryColor: string;\n};\n\n/**\n * Every theme this package ships, and the Scene tokens each one stands for.\n *\n * This is data, not logic, but unlike the PrimeReact 10 catalog it is *derived* data. A v10 theme was a\n * compiled stylesheet whose `:root` block could be read with a text editor, so the token values were\n * transcribed by hand. A v11 theme is a JavaScript preset whose values are token *references* -\n * `{emerald.500}`, `light-dark({surface.0}, {surface.900})` - resolved by `@primeuix/styled` at runtime.\n * Transcribing those by hand would mean re-implementing the resolver in one's head, once per theme.\n *\n * So these values were generated: each preset was loaded, its `primary` scale bound to the chosen color\n * ramp, and the thirteen Scene tokens resolved through the same `light-dark()` and `{path}` rules\n * `@primeuix/styled` applies. What is committed here is the *output* of that resolution, so the catalog\n * stays plain data that a theme picker can read without booting a theme engine - while still agreeing,\n * value for value, with what the preset actually renders.\n *\n * The catalog is not a like-for-like port of the v10 one. PrimeReact 11 ships four preset families -\n * Aura, Lara, Nora and Material - and the v10 themes that had no counterpart among them (`saga`,\n * `vela`, `arya`, `bootstrap4`, `soho`, `viva`, `nano`, `mira`, `fluent-light`, `tailwind-light`) are\n * not carried over. Renaming a Lara onto `soho-dark` would have kept the catalog's length at the cost\n * of its honesty.\n */\nexport const themePresets: ThemePreset[] = [\n {\n name: 'aura-light-blue',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a blue accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eff6ff',\n 'highlight.color': '#1d4ed8',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-blue',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#60a5fa',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #60a5fa, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-indigo',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#4338ca',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-indigo',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #818cf8, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-purple',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a purple accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#a855f7',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#faf5ff',\n 'highlight.color': '#7e22ce',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-purple',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#c084fc',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #c084fc, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-light-teal',\n description: 'Aura, the flagship PrimeReact 11 design language, in light on a teal accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'teal',\n isDark: false,\n tokens: {\n 'primary.color': '#14b8a6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#f0fdfa',\n 'highlight.color': '#0f766e',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'aura-dark-teal',\n description: 'Aura, the flagship PrimeReact 11 design language, in dark on a teal accent.',\n family: PrimeReactThemeFamily.Aura,\n primaryColor: 'teal',\n isDark: true,\n tokens: {\n 'primary.color': '#2dd4bf',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #2dd4bf, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'lara-light-blue',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a blue accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eff6ff',\n 'highlight.color': '#1d4ed8',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #bfdbfe',\n },\n },\n {\n name: 'lara-dark-blue',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#60a5fa',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #60a5fa, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #60a5fa, transparent 80%)',\n },\n },\n {\n name: 'lara-light-indigo',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#4338ca',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #c7d2fe',\n },\n },\n {\n name: 'lara-dark-indigo',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #818cf8, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #818cf8, transparent 80%)',\n },\n },\n {\n name: 'lara-light-purple',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a purple accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#a855f7',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#faf5ff',\n 'highlight.color': '#7e22ce',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #e9d5ff',\n },\n },\n {\n name: 'lara-dark-purple',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#c084fc',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #c084fc, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #c084fc, transparent 80%)',\n },\n },\n {\n name: 'lara-light-teal',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in light on a teal accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'teal',\n isDark: false,\n tokens: {\n 'primary.color': '#14b8a6',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e8f0',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#334155',\n 'text.mutedColor': '#64748b',\n 'highlight.background': '#f0fdfa',\n 'highlight.color': '#0f766e',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem #99f6e4',\n },\n },\n {\n name: 'lara-dark-teal',\n description: 'Lara, the roomy family Scene shipped on PrimeReact 10, in dark on a teal accent.',\n family: PrimeReactThemeFamily.Lara,\n primaryColor: 'teal',\n isDark: true,\n tokens: {\n 'primary.color': '#2dd4bf',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #2dd4bf, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '6px',\n 'focus.ring': '0 0 0 0.2rem color-mix(in srgb, #2dd4bf, transparent 80%)',\n },\n },\n {\n name: 'nora-light-blue',\n description: 'Nora, a tighter, squarer, more compact family, in light on a blue accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'blue',\n isDark: false,\n tokens: {\n 'primary.color': '#2563eb',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#94a3b8',\n 'surface.hover': '#e2e8f0',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': '#2563eb',\n 'highlight.color': '#ffffff',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-dark-blue',\n description: 'Nora, a tighter, squarer, more compact family, in dark on a blue accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'blue',\n isDark: true,\n tokens: {\n 'primary.color': '#3b82f6',\n 'primary.contrastColor': '#09090b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#71717a',\n 'surface.hover': '#3f3f46',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': '#3b82f6',\n 'highlight.color': '#09090b',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-light-indigo',\n description: 'Nora, a tighter, squarer, more compact family, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#4f46e5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#94a3b8',\n 'surface.hover': '#e2e8f0',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': '#4f46e5',\n 'highlight.color': '#ffffff',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'nora-dark-indigo',\n description: 'Nora, a tighter, squarer, more compact family, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Nora,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#6366f1',\n 'primary.contrastColor': '#09090b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#71717a',\n 'surface.hover': '#3f3f46',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': '#6366f1',\n 'highlight.color': '#09090b',\n 'content.borderRadius': '2px',\n 'focus.ring': 'none',\n },\n },\n {\n name: 'material-light-indigo',\n description: 'Material, the PrimeTek reading of Material Design, in light on an indigo accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'indigo',\n isDark: false,\n tokens: {\n 'primary.color': '#3F51B5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#cbd5e1',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': 'color-mix(in srgb, #3F51B5, transparent 88%)',\n 'highlight.color': '#303F9F',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #e2e8f0',\n },\n },\n {\n name: 'material-dark-indigo',\n description: 'Material, the PrimeTek reading of Material Design, in dark on an indigo accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'indigo',\n isDark: true,\n tokens: {\n 'primary.color': '#5C6BC0',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #5C6BC0, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #3f3f46',\n },\n },\n {\n name: 'material-light-purple',\n description: 'Material, the PrimeTek reading of Material Design, in light on a purple accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'purple',\n isDark: false,\n tokens: {\n 'primary.color': '#9C27B0',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f8fafc',\n 'surface.card': '#ffffff',\n 'surface.border': '#cbd5e1',\n 'surface.hover': '#f1f5f9',\n 'surface.overlay': '#ffffff',\n 'text.color': '#0f172a',\n 'text.mutedColor': '#475569',\n 'highlight.background': 'color-mix(in srgb, #9C27B0, transparent 88%)',\n 'highlight.color': '#7B1FA2',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #e2e8f0',\n },\n },\n {\n name: 'material-dark-purple',\n description: 'Material, the PrimeTek reading of Material Design, in dark on a purple accent.',\n family: PrimeReactThemeFamily.Material,\n primaryColor: 'purple',\n isDark: true,\n tokens: {\n 'primary.color': '#AB47BC',\n 'primary.contrastColor': '#18181b',\n 'surface.background': '#09090b',\n 'surface.card': '#18181b',\n 'surface.border': '#3f3f46',\n 'surface.hover': '#27272a',\n 'surface.overlay': '#18181b',\n 'text.color': '#ffffff',\n 'text.mutedColor': '#a1a1aa',\n 'highlight.background': 'color-mix(in srgb, #AB47BC, transparent 84%)',\n 'highlight.color': 'rgba(255,255,255,.87)',\n 'content.borderRadius': '4px',\n 'focus.ring': '0 0 1px 4px #3f3f46',\n },\n },\n];\n"],"names":["themePresets","name","description","family","PrimeReactThemeFamily","Aura","primaryColor","isDark","tokens","L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A,EAAQC,sBAAsBO,QAAQ;QACtCL,YAAAA,EAAc,QAAA;QACdC,MAAAA,EAAQ,IAAA;QACRC,MAAAA,EAAQ;YACJ,eAAA,EAAiB,SAAA;YACjB,uBAAA,EAAyB,SAAA;YACzB,oBAAA,EAAsB,SAAA;YACtB,cAAA,EAAgB,SAAA;YAChB,gBAAA,EAAkB,SAAA;YAClB,eAAA,EAAiB,SAAA;YACjB,iBAAA,EAAmB,SAAA;YACnB,YAAA,EAAc,SAAA;YACd,iBAAA,EAAmB,SAAA;YACnB,sBAAA,EAAwB,8CAAA;YACxB,iBAAA,EAAmB,uBAAA;YACnB,sBAAA,EAAwB,KAAA;YACxB,YAAA,EAAc;AAClB;AACJ;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrimeReactTheme.js","sources":["../../../theme/usePrimeReactTheme.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 { useMemo } from 'react';\nimport { Theme } from '@cratis/scene.model';\nimport { PrimeReactPreset, primeReactThemePreset } from './primeReactThemePreset';\n\n/**\n * The class a themed root carries when the active theme is a dark one.\n *\n * `@primeuix/themes` resolves every `light-dark()` token pair against a CSS selector rather than the\n * operating system preference, so *something* has to put that selector on the page. This is Scene's\n * choice of selector, and it is handed to the preset as `darkModeSelector` so the two can never disagree.\n */\nexport const primeReactDarkModeClass = 'scene-dark';\n\n/**\n * The shape `PrimeReactProvider` takes through its `value` prop, narrowed to the part this package sets.\n *\n * Deliberately not imported from `@primereact/core`: the provider's config type is broad and mostly about\n * concerns Scene does not own (locale, ripple, z-index, filter match modes). Naming only the theme slice\n * keeps it obvious that a Scene theme decides the preset and nothing else, and leaves an application free\n * to merge its own configuration around it.\n */\nexport interface PrimeReactThemeConfiguration {\n /**\n * The preset and the options `@primeuix/styled` needs to emit its `--p-*` custom properties.\n */\n theme: {\n /**\n * The `@primeuix/themes` preset for the active Scene theme.\n */\n preset: PrimeReactPreset;\n\n /**\n * How the preset resolves its light/dark token pairs.\n */\n options: {\n /**\n * The selector that means \"dark\" - {@link primeReactDarkModeClass}.\n */\n darkModeSelector: string;\n };\n };\n}\n\n/**\n * Resolves the active Scene {@link Theme} to the configuration `PrimeReactProvider` needs to render it.\n *\n * Theming a Scene screen takes two halves, and this is the half `SceneThemeProvider` cannot do. The\n * provider writes the theme's semantic tokens onto the wrapping element, which reaches anything reading\n * `--scene-*` - this package's own wrappers, `core`'s primitives, a layout's CSS. But PrimeReact's own\n * components read `--p-*`, and those only exist once a preset has been handed to `PrimeReactProvider`. So:\n * `SceneThemeProvider` for the Scene tokens, this hook for the PrimeReact ones.\n *\n * This replaced the PrimeReact 10 hook of the same name, and it is considerably less machinery. v10\n * themes were compiled stylesheets, so switching meant locating a `<link>`, rewriting one path segment of\n * its URL, and swapping in a replacement element because some browsers will not re-fetch a mutated\n * `href`. None of that survives: a v11 preset is a plain object, so switching is re-rendering a provider\n * with a different value. Nothing is fetched, nothing flashes unstyled, and a theme cannot 404.\n *\n * Use them together:\n *\n * ```tsx\n * const [theme, setTheme] = useState(primeReactTheme('lara-light-blue'));\n * const configuration = usePrimeReactTheme(theme);\n *\n * return (\n * <PrimeReactProvider value={configuration}>\n * <SceneThemeProvider theme={theme}>{children}</SceneThemeProvider>\n * </PrimeReactProvider>\n * );\n * ```\n *\n * @param theme The active theme. A theme this package does not ship - or `undefined` - yields `undefined`\n * rather than a default preset, so a profile mixing in a theme from another package leaves PrimeReact's\n * own styling to whoever does own it, instead of quietly overriding it with a Scene preset.\n * @returns The provider configuration, or `undefined` when this package ships no preset for the theme.\n */\nexport function usePrimeReactTheme(theme: Theme | undefined): PrimeReactThemeConfiguration | undefined {\n const themeName = theme?.name;\n\n return useMemo(() => {\n if (themeName === undefined) return undefined;\n\n const preset = primeReactThemePreset(themeName);\n if (preset === undefined) return undefined;\n\n return { theme: { preset, options: { darkModeSelector: `.${primeReactDarkModeClass}` } } };\n }, [themeName]);\n}\n"],"names":["primeReactDarkModeClass","usePrimeReactTheme","theme","themeName","name","useMemo","undefined","preset","primeReactThemePreset","options","darkModeSelector"],"mappings":";;;AAAA;AACA;AAMA;;;;;;IAOO,MAAMA,uBAAAA,GAA0B;AAgCvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiCO,SAASC,kBAAAA,CAAmBC,KAAwB,EAAA;AACvD,IAAA,MAAMC,YAAYD,KAAAA,EAAOE,IAAAA;AAEzB,IAAA,OAAOC,OAAAA,CAAQ,IAAA;QACX,IAAIF,SAAAA,KAAcG,WAAW,OAAOA,SAAAA;AAEpC,QAAA,MAAMC,SAASC,qBAAAA,CAAsBL,SAAAA,CAAAA;QACrC,IAAII,MAAAA,KAAWD,WAAW,OAAOA,SAAAA;QAEjC,OAAO;YAAEJ,KAAAA,EAAO;AAAEK,gBAAAA,MAAAA;gBAAQE,OAAAA,EAAS;oBAAEC,gBAAAA,EAAkB,CAAC,CAAC,EAAEV,uBAAAA,CAAAA;AAA0B;AAAE;AAAE,SAAA;IAC7F,CAAA,EAAG;AAACG,QAAAA;AAAU,KAAA,CAAA;AAClB
|
|
1
|
+
{"version":3,"file":"usePrimeReactTheme.js","sources":["../../../theme/usePrimeReactTheme.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 { useMemo } from 'react';\nimport { Theme } from '@cratis/scene.model';\nimport { PrimeReactPreset, primeReactThemePreset } from './primeReactThemePreset';\n\n/**\n * The class a themed root carries when the active theme is a dark one.\n *\n * `@primeuix/themes` resolves every `light-dark()` token pair against a CSS selector rather than the\n * operating system preference, so *something* has to put that selector on the page. This is Scene's\n * choice of selector, and it is handed to the preset as `darkModeSelector` so the two can never disagree.\n */\nexport const primeReactDarkModeClass = 'scene-dark';\n\n/**\n * The shape `PrimeReactProvider` takes through its `value` prop, narrowed to the part this package sets.\n *\n * Deliberately not imported from `@primereact/core`: the provider's config type is broad and mostly about\n * concerns Scene does not own (locale, ripple, z-index, filter match modes). Naming only the theme slice\n * keeps it obvious that a Scene theme decides the preset and nothing else, and leaves an application free\n * to merge its own configuration around it.\n */\nexport interface PrimeReactThemeConfiguration {\n /**\n * The preset and the options `@primeuix/styled` needs to emit its `--p-*` custom properties.\n */\n theme: {\n /**\n * The `@primeuix/themes` preset for the active Scene theme.\n */\n preset: PrimeReactPreset;\n\n /**\n * How the preset resolves its light/dark token pairs.\n */\n options: {\n /**\n * The selector that means \"dark\" - {@link primeReactDarkModeClass}.\n */\n darkModeSelector: string;\n };\n };\n}\n\n/**\n * Resolves the active Scene {@link Theme} to the configuration `PrimeReactProvider` needs to render it.\n *\n * Theming a Scene screen takes two halves, and this is the half `SceneThemeProvider` cannot do. The\n * provider writes the theme's semantic tokens onto the wrapping element, which reaches anything reading\n * `--scene-*` - this package's own wrappers, `core`'s primitives, a layout's CSS. But PrimeReact's own\n * components read `--p-*`, and those only exist once a preset has been handed to `PrimeReactProvider`. So:\n * `SceneThemeProvider` for the Scene tokens, this hook for the PrimeReact ones.\n *\n * This replaced the PrimeReact 10 hook of the same name, and it is considerably less machinery. v10\n * themes were compiled stylesheets, so switching meant locating a `<link>`, rewriting one path segment of\n * its URL, and swapping in a replacement element because some browsers will not re-fetch a mutated\n * `href`. None of that survives: a v11 preset is a plain object, so switching is re-rendering a provider\n * with a different value. Nothing is fetched, nothing flashes unstyled, and a theme cannot 404.\n *\n * Use them together:\n *\n * ```tsx\n * const [theme, setTheme] = useState(primeReactTheme('lara-light-blue'));\n * const configuration = usePrimeReactTheme(theme);\n *\n * return (\n * <PrimeReactProvider value={configuration}>\n * <SceneThemeProvider theme={theme}>{children}</SceneThemeProvider>\n * </PrimeReactProvider>\n * );\n * ```\n *\n * @param theme The active theme. A theme this package does not ship - or `undefined` - yields `undefined`\n * rather than a default preset, so a profile mixing in a theme from another package leaves PrimeReact's\n * own styling to whoever does own it, instead of quietly overriding it with a Scene preset.\n * @returns The provider configuration, or `undefined` when this package ships no preset for the theme.\n */\nexport function usePrimeReactTheme(theme: Theme | undefined): PrimeReactThemeConfiguration | undefined {\n const themeName = theme?.name;\n\n return useMemo(() => {\n if (themeName === undefined) return undefined;\n\n const preset = primeReactThemePreset(themeName);\n if (preset === undefined) return undefined;\n\n return { theme: { preset, options: { darkModeSelector: `.${primeReactDarkModeClass}` } } };\n }, [themeName]);\n}\n"],"names":["primeReactDarkModeClass","usePrimeReactTheme","theme","themeName","name","useMemo","undefined","preset","primeReactThemePreset","options","darkModeSelector"],"mappings":";;;AAAA;AACA;AAMA;;;;;;IAOO,MAAMA,uBAAAA,GAA0B;AAgCvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiCO,SAASC,kBAAAA,CAAmBC,KAAwB,EAAA;AACvD,IAAA,MAAMC,YAAYD,KAAAA,EAAOE,IAAAA;AAEzB,IAAA,OAAOC,OAAAA,CAAQ,IAAA;QACX,IAAIF,SAAAA,KAAcG,WAAW,OAAOA,SAAAA;AAEpC,QAAA,MAAMC,SAASC,qBAAAA,CAAsBL,SAAAA,CAAAA;QACrC,IAAII,MAAAA,KAAWD,WAAW,OAAOA,SAAAA;QAEjC,OAAO;YAAEJ,KAAAA,EAAO;AAAEK,gBAAAA,MAAAA;gBAAQE,OAAAA,EAAS;oBAAEC,gBAAAA,EAAkB,CAAC,CAAC,EAAEV,uBAAAA,CAAAA;AAA0B;AAAE;AAAE,SAAA;IAC7F,CAAA,EAAG;AAACG,QAAAA;AAAU,KAAA,CAAA;AAClB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treeNodes.js","sources":["../../treeNodes.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 { TreeNode } from './TreeNode';\nimport { SceneElement } from '@cratis/scene.model';\nimport { arrayProperty } from './properties';\n\n/**\n * Turns raw authored entries into the `TreeNode` model PrimeReact's tree, tree table, tree select and\n * organization chart all share.\n *\n * A `key` is synthesized from the node's path when an author did not supply one. That is not cosmetic:\n * PrimeReact keys expansion, selection and virtual scrolling off `key`, so a tree of unkeyed nodes\n * expands the wrong rows the moment two siblings share a label. Deriving the key from the path makes it\n * unique and stable across re-renders without asking the author for anything.\n *\n * @param entries The raw entries to convert.\n * @param parentKey The key of the node these entries belong to, used to build stable child keys.\n * @returns The converted nodes, in order.\n */\nexport function toTreeNodes(entries: unknown[], parentKey = ''): TreeNode[] {\n const nodes: TreeNode[] = [];\n entries.forEach((entry, index) => {\n const path = parentKey === '' ? `${index}` : `${parentKey}-${index}`;\n if (typeof entry === 'string') {\n nodes.push({ key: path, label: entry });\n return;\n }\n\n if (typeof entry !== 'object' || entry === undefined || entry === null || Array.isArray(entry)) return;\n\n const record = entry as Record<string, unknown>;\n const node: TreeNode = { key: typeof record.key === 'string' ? record.key : path };\n if (typeof record.label === 'string') node.label = record.label;\n if (typeof record.icon === 'string') node.icon = record.icon;\n if (typeof record.className === 'string') node.className = record.className;\n if (typeof record.leaf === 'boolean') node.leaf = record.leaf;\n if (typeof record.data === 'object' && record.data !== null) node.data = record.data;\n if (Array.isArray(record.children)) node.children = toTreeNodes(record.children, node.key as string);\n nodes.push(node);\n });\n\n return nodes;\n}\n\n/**\n * Reads a tree 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 nodes, empty when the property is missing or is not an array.\n */\nexport function treeNodesProperty(element: SceneElement, name: string): TreeNode[] {\n return toTreeNodes(arrayProperty(element, name));\n}\n"],"names":["toTreeNodes","entries","parentKey","nodes","forEach","entry","index","path","push","key","label","undefined","Array","isArray","record","node","icon","className","leaf","data","children","treeNodesProperty","element","name","arrayProperty"],"mappings":";;AAAA;AACA;AAMA;;;;;;;;;;;;AAYC,IACM,SAASA,WAAAA,CAAYC,OAAkB,EAAEC,YAAY,EAAE,EAAA;AAC1D,IAAA,MAAMC,QAAoB,EAAE;IAC5BF,OAAAA,CAAQG,OAAO,CAAC,CAACC,K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AIP,KAAAA,CAAMC,OAAO,CAACC,MAAAA,CAAOM,QAAQ,CAAA,EAAGL,IAAAA,CAAKK,QAAQ,GAAGpB,WAAAA,CAAYc,MAAAA,CAAOM,QAAQ,EAAEL,KAAKN,GAAG,CAAA;AACzFN,QAAAA,KAAAA,CAAMK,IAAI,CAACO,IAAAA,CAAAA;AACf,IAAA,CAAA,CAAA;IAEA,OAAOZ,KAAAA;AACX;AAEA;;;;;;AAMC,IACM,SAASkB,iBAAAA,CAAkBC,OAAqB,EAAEC,IAAY,EAAA;IACjE,OAAOvB,WAAAA,CAAYwB,cAAcF,OAAAA,EAASC,IAAAA,CAAAA,CAAAA;AAC9C
|
|
1
|
+
{"version":3,"file":"treeNodes.js","sources":["../../treeNodes.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 { TreeNode } from './TreeNode';\nimport { SceneElement } from '@cratis/scene.model';\nimport { arrayProperty } from './properties';\n\n/**\n * Turns raw authored entries into the `TreeNode` model PrimeReact's tree, tree table, tree select and\n * organization chart all share.\n *\n * A `key` is synthesized from the node's path when an author did not supply one. That is not cosmetic:\n * PrimeReact keys expansion, selection and virtual scrolling off `key`, so a tree of unkeyed nodes\n * expands the wrong rows the moment two siblings share a label. Deriving the key from the path makes it\n * unique and stable across re-renders without asking the author for anything.\n *\n * @param entries The raw entries to convert.\n * @param parentKey The key of the node these entries belong to, used to build stable child keys.\n * @returns The converted nodes, in order.\n */\nexport function toTreeNodes(entries: unknown[], parentKey = ''): TreeNode[] {\n const nodes: TreeNode[] = [];\n entries.forEach((entry, index) => {\n const path = parentKey === '' ? `${index}` : `${parentKey}-${index}`;\n if (typeof entry === 'string') {\n nodes.push({ key: path, label: entry });\n return;\n }\n\n if (typeof entry !== 'object' || entry === undefined || entry === null || Array.isArray(entry)) return;\n\n const record = entry as Record<string, unknown>;\n const node: TreeNode = { key: typeof record.key === 'string' ? record.key : path };\n if (typeof record.label === 'string') node.label = record.label;\n if (typeof record.icon === 'string') node.icon = record.icon;\n if (typeof record.className === 'string') node.className = record.className;\n if (typeof record.leaf === 'boolean') node.leaf = record.leaf;\n if (typeof record.data === 'object' && record.data !== null) node.data = record.data;\n if (Array.isArray(record.children)) node.children = toTreeNodes(record.children, node.key as string);\n nodes.push(node);\n });\n\n return nodes;\n}\n\n/**\n * Reads a tree 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 nodes, empty when the property is missing or is not an array.\n */\nexport function treeNodesProperty(element: SceneElement, name: string): TreeNode[] {\n return toTreeNodes(arrayProperty(element, name));\n}\n"],"names":["toTreeNodes","entries","parentKey","nodes","forEach","entry","index","path","push","key","label","undefined","Array","isArray","record","node","icon","className","leaf","data","children","treeNodesProperty","element","name","arrayProperty"],"mappings":";;AAAA;AACA;AAMA;;;;;;;;;;;;AAYC,IACM,SAASA,WAAAA,CAAYC,OAAkB,EAAEC,YAAY,EAAE,EAAA;AAC1D,IAAA,MAAMC,QAAoB,EAAE;IAC5BF,OAAAA,CAAQG,OAAO,CAAC,CAACC,KAAAA,EAAOC,KAAAA,GAAAA;QACpB,MAAMC,IAAAA,GAAOL,SAAAA,KAAc,EAAA,GAAK,CAAA,EAAGI,KAAAA,CAAAA,CAAO,GAAG,CAAA,EAAGJ,SAAAA,CAAU,CAAC,EAAEI,KAAAA,CAAAA,CAAO;QACpE,IAAI,OAAOD,UAAU,QAAA,EAAU;AAC3BF,YAAAA,KAAAA,CAAMK,IAAI,CAAC;gBAAEC,GAAAA,EAAKF,IAAAA;gBAAMG,KAAAA,EAAOL;AAAM,aAAA,CAAA;AACrC,YAAA;AACJ,QAAA;QAEA,IAAI,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAUM,SAAAA,IAAaN,UAAU,IAAA,IAAQO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,EAAQ;AAEhG,QAAA,MAAMS,MAAAA,GAAST,KAAAA;AACf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