@cratis/scene.blueprint.default 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.
Files changed (120) hide show
  1. package/dist/cjs/ComponentName.js.map +1 -1
  2. package/dist/cjs/configuration/ColorScheme.js.map +1 -1
  3. package/dist/cjs/configuration/LayoutConfigProvider.js.map +1 -1
  4. package/dist/cjs/configuration/LayoutMode.js.map +1 -1
  5. package/dist/cjs/configuration/MenuTheme.js.map +1 -1
  6. package/dist/cjs/configuration/layoutConfigStorage.js.map +1 -1
  7. package/dist/cjs/configuration/layoutConfigTransitions.js.map +1 -1
  8. package/dist/cjs/configuration/layoutWrapperClasses.js.map +1 -1
  9. package/dist/cjs/defaultBlueprint.js.map +1 -1
  10. package/dist/cjs/defaultBlueprintComponents.js.map +1 -1
  11. package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -1
  12. package/dist/cjs/gallery/TemplateSlotName.js.map +1 -1
  13. package/dist/cjs/gallery/applicationChrome.js.map +1 -1
  14. package/dist/cjs/gallery/authTemplates.js.map +1 -1
  15. package/dist/cjs/gallery/componentNames.js.map +1 -1
  16. package/dist/cjs/gallery/composeScreen.js.map +1 -1
  17. package/dist/cjs/gallery/dependencyComponentNames.js.map +1 -1
  18. package/dist/cjs/gallery/dialogTemplates.js.map +1 -1
  19. package/dist/cjs/gallery/elements.js.map +1 -1
  20. package/dist/cjs/gallery/navigation.js.map +1 -1
  21. package/dist/cjs/gallery/nesting.js.map +1 -1
  22. package/dist/cjs/gallery/previewProfile.js.map +1 -1
  23. package/dist/cjs/gallery/resolveElementNames.js.map +1 -1
  24. package/dist/cjs/gallery/screens.js.map +1 -1
  25. package/dist/cjs/gallery/statusTemplates.js.map +1 -1
  26. package/dist/cjs/gallery/supportTemplates.js.map +1 -1
  27. package/dist/cjs/gallery/widgets.js.map +1 -1
  28. package/dist/cjs/gallery/workspaceTemplates.js.map +1 -1
  29. package/dist/cjs/layouts/LayoutName.js.map +1 -1
  30. package/dist/cjs/layouts/SlotName.js.map +1 -1
  31. package/dist/cjs/layouts/appShell.js.map +1 -1
  32. package/dist/cjs/layouts/defaultLayouts.js.map +1 -1
  33. package/dist/cjs/layouts/flowBuilders.js.map +1 -1
  34. package/dist/cjs/layouts/fullPage.js.map +1 -1
  35. package/dist/cjs/layouts/shellComponents.js.map +1 -1
  36. package/dist/cjs/packageName.js.map +1 -1
  37. package/dist/cjs/shell/AppShell.js.map +1 -1
  38. package/dist/cjs/shell/Breadcrumb.js.map +1 -1
  39. package/dist/cjs/shell/ConfigPanel.js.map +1 -1
  40. package/dist/cjs/shell/Footer.js.map +1 -1
  41. package/dist/cjs/shell/FullPageShell.js.map +1 -1
  42. package/dist/cjs/shell/LayoutModeSwitcher.js.map +1 -1
  43. package/dist/cjs/shell/Logo.js.map +1 -1
  44. package/dist/cjs/shell/Mask.js.map +1 -1
  45. package/dist/cjs/shell/Menu.js.map +1 -1
  46. package/dist/cjs/shell/MenuItem.js.map +1 -1
  47. package/dist/cjs/shell/PageHeader.js.map +1 -1
  48. package/dist/cjs/shell/RightPanel.js.map +1 -1
  49. package/dist/cjs/shell/Sidebar.js.map +1 -1
  50. package/dist/cjs/shell/ThemeOption.js.map +1 -1
  51. package/dist/cjs/shell/ThemeSwitcher.js.map +1 -1
  52. package/dist/cjs/shell/Topbar.js.map +1 -1
  53. package/dist/cjs/shell/UserMenu.js.map +1 -1
  54. package/dist/cjs/shell/elementProperties.js.map +1 -1
  55. package/dist/cjs/themes/LayoutThemeProvider.js.map +1 -1
  56. package/dist/cjs/themes/blueprintThemeCompatibility.js.map +1 -1
  57. package/dist/cjs/themes/dark.js.map +1 -1
  58. package/dist/cjs/themes/defaultBlueprintThemes.js.map +1 -1
  59. package/dist/cjs/themes/light.js.map +1 -1
  60. package/dist/esm/ComponentName.js.map +1 -1
  61. package/dist/esm/configuration/ColorScheme.js.map +1 -1
  62. package/dist/esm/configuration/LayoutConfigProvider.js.map +1 -1
  63. package/dist/esm/configuration/LayoutMode.js.map +1 -1
  64. package/dist/esm/configuration/MenuTheme.js.map +1 -1
  65. package/dist/esm/configuration/layoutConfigStorage.js.map +1 -1
  66. package/dist/esm/configuration/layoutConfigTransitions.js.map +1 -1
  67. package/dist/esm/configuration/layoutWrapperClasses.js.map +1 -1
  68. package/dist/esm/defaultBlueprint.js.map +1 -1
  69. package/dist/esm/defaultBlueprintComponents.js.map +1 -1
  70. package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -1
  71. package/dist/esm/gallery/TemplateSlotName.js.map +1 -1
  72. package/dist/esm/gallery/applicationChrome.js.map +1 -1
  73. package/dist/esm/gallery/authTemplates.js.map +1 -1
  74. package/dist/esm/gallery/componentNames.js.map +1 -1
  75. package/dist/esm/gallery/composeScreen.js.map +1 -1
  76. package/dist/esm/gallery/dependencyComponentNames.js.map +1 -1
  77. package/dist/esm/gallery/dialogTemplates.js.map +1 -1
  78. package/dist/esm/gallery/elements.js.map +1 -1
  79. package/dist/esm/gallery/navigation.js.map +1 -1
  80. package/dist/esm/gallery/nesting.js.map +1 -1
  81. package/dist/esm/gallery/previewProfile.js.map +1 -1
  82. package/dist/esm/gallery/resolveElementNames.js.map +1 -1
  83. package/dist/esm/gallery/screens.js.map +1 -1
  84. package/dist/esm/gallery/statusTemplates.js.map +1 -1
  85. package/dist/esm/gallery/supportTemplates.js.map +1 -1
  86. package/dist/esm/gallery/widgets.js.map +1 -1
  87. package/dist/esm/gallery/workspaceTemplates.js.map +1 -1
  88. package/dist/esm/layouts/LayoutName.js.map +1 -1
  89. package/dist/esm/layouts/SlotName.js.map +1 -1
  90. package/dist/esm/layouts/appShell.js.map +1 -1
  91. package/dist/esm/layouts/defaultLayouts.js.map +1 -1
  92. package/dist/esm/layouts/flowBuilders.js.map +1 -1
  93. package/dist/esm/layouts/fullPage.js.map +1 -1
  94. package/dist/esm/layouts/shellComponents.js.map +1 -1
  95. package/dist/esm/packageName.js.map +1 -1
  96. package/dist/esm/shell/AppShell.js.map +1 -1
  97. package/dist/esm/shell/Breadcrumb.js.map +1 -1
  98. package/dist/esm/shell/ConfigPanel.js.map +1 -1
  99. package/dist/esm/shell/Footer.js.map +1 -1
  100. package/dist/esm/shell/FullPageShell.js.map +1 -1
  101. package/dist/esm/shell/LayoutModeSwitcher.js.map +1 -1
  102. package/dist/esm/shell/Logo.js.map +1 -1
  103. package/dist/esm/shell/Mask.js.map +1 -1
  104. package/dist/esm/shell/Menu.js.map +1 -1
  105. package/dist/esm/shell/MenuItem.js.map +1 -1
  106. package/dist/esm/shell/PageHeader.js.map +1 -1
  107. package/dist/esm/shell/RightPanel.js.map +1 -1
  108. package/dist/esm/shell/Sidebar.js.map +1 -1
  109. package/dist/esm/shell/ThemeOption.js.map +1 -1
  110. package/dist/esm/shell/ThemeSwitcher.js.map +1 -1
  111. package/dist/esm/shell/Topbar.js.map +1 -1
  112. package/dist/esm/shell/UserMenu.js.map +1 -1
  113. package/dist/esm/shell/elementProperties.js.map +1 -1
  114. package/dist/esm/themes/LayoutThemeProvider.js.map +1 -1
  115. package/dist/esm/themes/blueprintThemeCompatibility.js.map +1 -1
  116. package/dist/esm/themes/dark.js.map +1 -1
  117. package/dist/esm/themes/defaultBlueprintThemes.js.map +1 -1
  118. package/dist/esm/themes/light.js.map +1 -1
  119. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  120. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3,"file":"appShell.js","sources":["../../../layouts/appShell.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 { FlowArrangement, HeightSizeClass, Layout, WidthSizeClass } from '@cratis/scene.model';\nimport { LayoutName } from './LayoutName';\nimport { SlotName } from './SlotName';\nimport { column, row, slotLeaf } from './flowBuilders';\n\n/**\n * The tree at a regular width and height: a topbar across the top, the sidebar column beside the main\n * column, an optional right panel down the edge, and the configurator floating over all of it.\n */\nexport const appShellRegularRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [\n column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.RightPanel),\n ],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact width: the sidebar and the right panel leave the flow entirely.\n *\n * They leave rather than shrink because there is no width at which an 18rem panel and a 20rem panel both\n * fit beside content on a phone. The sidebar is still rendered - off-canvas, over the content, behind the\n * mask - but it no longer *occupies* anything, and that is a fact about the arrangement, not about CSS.\n */\nexport const appShellCompactWidthRoot = column([\n slotLeaf(SlotName.Topbar),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact height: the breadcrumb and the footer go.\n *\n * A landscape phone has room across but almost none down, and two horizontal strips of chrome eat most of\n * what is left. Dropping them is the height axis earning its place in the size-class matrix - width alone\n * cannot express it.\n */\nexport const appShellCompactHeightRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.RightPanel)],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree when both axes are compact - a phone in landscape: nothing but the topbar, the content and the\n * configurator.\n *\n * This override exists to be *more specific* than the two single-axis ones. `evaluateFlowArrangement`\n * scores an override by how many axes it targets, so without this one a landscape phone would pick\n * whichever single-axis override was declared last and keep a footer it has no room for.\n */\nexport const appShellCompactRoot = column([\n slotLeaf(SlotName.Topbar),\n slotLeaf(SlotName.Content, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/** The arrangement of the {@link appShellLayout}'s own slots, with one override per size-class combination that changes it. */\nexport const appShellArrangement: FlowArrangement = {\n root: appShellRegularRoot,\n overrides: [\n { width: WidthSizeClass.Compact, root: appShellCompactWidthRoot },\n { height: HeightSizeClass.Compact, root: appShellCompactHeightRoot },\n { width: WidthSizeClass.Compact, height: HeightSizeClass.Compact, root: appShellCompactRoot },\n ],\n};\n\n/**\n * The application shell layout.\n *\n * This is the *application-level* structure - the base navigational look an application picks once and\n * every page then lives inside. The regions are the ones PrimeTek's template line settled on: Sakai\n * establishes topbar, sidebar, menu, content and footer, and the premium templates add the breadcrumb and\n * the right panel. Both sets are here, because a layout package covering only the free template's regions\n * forces a fork on anyone who wants the others.\n *\n * The slots carry no arrangement of their own: how a screen's content is arranged *inside* a slot is that\n * page template's business, and a layout that dictated it would stop being a shell.\n */\nexport const appShellLayout: Layout = {\n name: LayoutName.AppShell,\n slots: [\n { name: SlotName.Topbar },\n { name: SlotName.Sidebar },\n { name: SlotName.Menu },\n { name: SlotName.Breadcrumb },\n { name: SlotName.Content },\n { name: SlotName.Footer },\n { name: SlotName.RightPanel },\n { name: SlotName.ConfigPanel },\n ],\n arrangement: appShellArrangement,\n};\n"],"names":["appShellRegularRoot","column","slotLeaf","SlotName","Topbar","row","Sidebar","Menu","grow","Breadcrumb","Content","Footer","RightPanel","ConfigPanel","appShellCompactWidthRoot","appShellCompactHeightRoot","appShellCompactRoot","appShellArrangement","root","overrides","width","WidthSizeClass","Compact","height","HeightSizeClass","appShellLayout","name","LayoutName","AppShell","slots","arrangement"],"mappings":";;;;;AAAA;AACA;AAOA;;;IAIO,MAAMA,mBAAAA,GAAsBC,MAAAA,CAAO;AACtCC,IAAAA,QAAAA,CAASC,SAASC,MAAM,CAAA;IACxBC,GAAAA,CACI;QACIJ,MAAAA,CAAO;AAACC,YAAAA,QAAAA,CAASC,SAASG,OAAO,CAAA;YAAGJ,QAAAA,CAASC,QAAAA,CAASI,IAAI,EA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AEgB,YAAAA,IAAAA,EAAMvB,SAASQ;AAAO,SAAA;AACxB,QAAA;AAAEe,YAAAA,IAAAA,EAAMvB,SAASS;AAAW,SAAA;AAC5B,QAAA;AAAEc,YAAAA,IAAAA,EAAMvB,SAASU;AAAY;AAChC,KAAA;IACDiB,WAAAA,EAAab;AACjB;;;;"}
1
+ {"version":3,"file":"appShell.js","sources":["../../../layouts/appShell.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 { FlowArrangement, HeightSizeClass, Layout, WidthSizeClass } from '@cratis/scene.model';\nimport { LayoutName } from './LayoutName';\nimport { SlotName } from './SlotName';\nimport { column, row, slotLeaf } from './flowBuilders';\n\n/**\n * The tree at a regular width and height: a topbar across the top, the sidebar column beside the main\n * column, an optional right panel down the edge, and the configurator floating over all of it.\n */\nexport const appShellRegularRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [\n column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.RightPanel),\n ],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact width: the sidebar and the right panel leave the flow entirely.\n *\n * They leave rather than shrink because there is no width at which an 18rem panel and a 20rem panel both\n * fit beside content on a phone. The sidebar is still rendered - off-canvas, over the content, behind the\n * mask - but it no longer *occupies* anything, and that is a fact about the arrangement, not about CSS.\n */\nexport const appShellCompactWidthRoot = column([\n slotLeaf(SlotName.Topbar),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact height: the breadcrumb and the footer go.\n *\n * A landscape phone has room across but almost none down, and two horizontal strips of chrome eat most of\n * what is left. Dropping them is the height axis earning its place in the size-class matrix - width alone\n * cannot express it.\n */\nexport const appShellCompactHeightRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.RightPanel)],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree when both axes are compact - a phone in landscape: nothing but the topbar, the content and the\n * configurator.\n *\n * This override exists to be *more specific* than the two single-axis ones. `evaluateFlowArrangement`\n * scores an override by how many axes it targets, so without this one a landscape phone would pick\n * whichever single-axis override was declared last and keep a footer it has no room for.\n */\nexport const appShellCompactRoot = column([\n slotLeaf(SlotName.Topbar),\n slotLeaf(SlotName.Content, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/** The arrangement of the {@link appShellLayout}'s own slots, with one override per size-class combination that changes it. */\nexport const appShellArrangement: FlowArrangement = {\n root: appShellRegularRoot,\n overrides: [\n { width: WidthSizeClass.Compact, root: appShellCompactWidthRoot },\n { height: HeightSizeClass.Compact, root: appShellCompactHeightRoot },\n { width: WidthSizeClass.Compact, height: HeightSizeClass.Compact, root: appShellCompactRoot },\n ],\n};\n\n/**\n * The application shell layout.\n *\n * This is the *application-level* structure - the base navigational look an application picks once and\n * every page then lives inside. The regions are the ones PrimeTek's template line settled on: Sakai\n * establishes topbar, sidebar, menu, content and footer, and the premium templates add the breadcrumb and\n * the right panel. Both sets are here, because a layout package covering only the free template's regions\n * forces a fork on anyone who wants the others.\n *\n * The slots carry no arrangement of their own: how a screen's content is arranged *inside* a slot is that\n * page template's business, and a layout that dictated it would stop being a shell.\n */\nexport const appShellLayout: Layout = {\n name: LayoutName.AppShell,\n slots: [\n { name: SlotName.Topbar },\n { name: SlotName.Sidebar },\n { name: SlotName.Menu },\n { name: SlotName.Breadcrumb },\n { name: SlotName.Content },\n { name: SlotName.Footer },\n { name: SlotName.RightPanel },\n { name: SlotName.ConfigPanel },\n ],\n arrangement: appShellArrangement,\n};\n"],"names":["appShellRegularRoot","column","slotLeaf","SlotName","Topbar","row","Sidebar","Menu","grow","Breadcrumb","Content","Footer","RightPanel","ConfigPanel","appShellCompactWidthRoot","appShellCompactHeightRoot","appShellCompactRoot","appShellArrangement","root","overrides","width","WidthSizeClass","Compact","height","HeightSizeClass","appShellLayout","name","LayoutName","AppShell","slots","arrangement"],"mappings":";;;;;AAAA;AACA;AAOA;;;IAIO,MAAMA,mBAAAA,GAAsBC,MAAAA,CAAO;AACtCC,IAAAA,QAAAA,CAASC,SAASC,MAAM,CAAA;IACxBC,GAAAA,CACI;QACIJ,MAAAA,CAAO;AAACC,YAAAA,QAAAA,CAASC,SAASG,OAAO,CAAA;YAAGJ,QAAAA,CAASC,QAAAA,CAASI,IAAI,EAAE;gBAAEC,IAAAA,EAAM;AAAE,aAAA;AAAG,SAAA,CAAA;QACzEP,MAAAA,CAAO;AAACC,YAAAA,QAAAA,CAASC,SAASM,UAAU,CAAA;YAAGP,QAAAA,CAASC,QAAAA,CAASO,OAAO,EAAE;gBAAEF,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAIN,YAAAA,QAAAA,CAASC,SAASQ,MAAM;AAAE,SAAA,EAAE,CAAA,EAAG;YAAEH,IAAAA,EAAM;AAAE,SAAA,CAAA;AACzHN,QAAAA,QAAAA,CAASC,SAASS,UAAU;AAC/B,KAAA,EACD,CAAA,EACA;QAAEJ,IAAAA,EAAM;AAAE,KAAA,CAAA;AAEdN,IAAAA,QAAAA,CAASC,SAASU,WAAW;CAChC;AAED;;;;;;IAOO,MAAMC,wBAAAA,GAA2Bb,MAAAA,CAAO;AAC3CC,IAAAA,QAAAA,CAASC,SAASC,MAAM,CAAA;IACxBH,MAAAA,CAAO;AAACC,QAAAA,QAAAA,CAASC,SAASM,UAAU,CAAA;QAAGP,QAAAA,CAASC,QA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SAAA;AACnE,QAAA;AAAEK,YAAAA,KAAAA,EAAOC,eAAeC,OAAO;AAAEC,YAAAA,MAAAA,EAAQC,gBAAgBF,OAAO;YAAEJ,IAAAA,EAAMF;AAAoB;AAC/F;AACL;AAEA;;;;;;;;;;;UAYaS,cAAAA,GAAyB;AAClCC,IAAAA,IAAAA,EAAMC,WAAWC,QAAQ;IACzBC,KAAAA,EAAO;AACH,QAAA;AAAEH,YAAAA,IAAAA,EAAMvB,SAASC;AAAO,SAAA;AACxB,QAAA;AAAEsB,YAAAA,IAAAA,EAAMvB,SAASG;AAAQ,SAAA;AACzB,QAAA;AAAEoB,YAAAA,IAAAA,EAAMvB,SAASI;AAAK,SAAA;AACtB,QAAA;AAAEmB,YAAAA,IAAAA,EAAMvB,SAASM;AAAW,SAAA;AAC5B,QAAA;AAAEiB,YAAAA,IAAAA,EAAMvB,SAASO;AAAQ,SAAA;AACzB,QAAA;AAAEgB,YAAAA,IAAAA,EAAMvB,SAASQ;AAAO,SAAA;AACxB,QAAA;AAAEe,YAAAA,IAAAA,EAAMvB,SAASS;AAAW,SAAA;AAC5B,QAAA;AAAEc,YAAAA,IAAAA,EAAMvB,SAASU;AAAY;AAChC,KAAA;IACDiB,WAAAA,EAAab;AACjB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultLayouts.js","sources":["../../../layouts/defaultLayouts.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 { Layout } from '@cratis/scene.model';\nimport { appShellLayout } from './appShell';\nimport { fullPageLayout } from './fullPage';\n\n/**\n * The layouts this package provides.\n *\n * Two, and deliberately only two - every application shell worth having is one of these, and everything\n * else this package ships is a page or dialog template that fits *into* one of them. The list is what the\n * manifest's `layouts` names and what the bundle provides, which is what `validatePackageBundle` proves.\n */\nexport const defaultLayouts: Layout[] = [appShellLayout, fullPageLayout];\n"],"names":["defaultLayouts","appShellLayout","fullPageLayout"],"mappings":";;;AAAA;AACA;AAMA;;;;;;UAOaA,cAAAA,GAA2B;AAACC,IAAAA,cAAAA;AAAgBC,IAAAA;;;;;"}
1
+ {"version":3,"file":"defaultLayouts.js","sources":["../../../layouts/defaultLayouts.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 { Layout } from '@cratis/scene.model';\nimport { appShellLayout } from './appShell';\nimport { fullPageLayout } from './fullPage';\n\n/**\n * The layouts this package provides.\n *\n * Two, and deliberately only two - every application shell worth having is one of these, and everything\n * else this package ships is a page or dialog template that fits *into* one of them. The list is what the\n * manifest's `layouts` names and what the bundle provides, which is what `validatePackageBundle` proves.\n */\nexport const defaultLayouts: Layout[] = [appShellLayout, fullPageLayout];\n"],"names":["defaultLayouts","appShellLayout","fullPageLayout"],"mappings":";;;AAAA;AACA;AAMA;;;;;;UAOaA,cAAAA,GAA2B;AAACC,IAAAA,cAAAA;AAAgBC,IAAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"flowBuilders.js","sources":["../../../layouts/flowBuilders.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 { FlowColumn, FlowContainerKind, FlowGrid, FlowNode, FlowRow, FlowSlotLeaf } from '@cratis/scene.model';\n\n/**\n * Small constructors for the `flow` primitives a layout's macro arrangement is built from.\n *\n * They exist because the primitives are structural interfaces with required members (`gap` and\n * `children` on every container), so writing a tree as object literals buries the shape under\n * boilerplate - and a layout tree is a thing to be read, not decoded. These keep the declarations in\n * `appShell.ts` and `fullPage.ts` down to the structure itself.\n *\n * Each container carries its {@link FlowContainerKind}, which is what lets a renderer tell a row from a\n * column - they are otherwise the same shape, and TypeScript has no runtime types to test. These builders\n * set it, so a declaration site never has to repeat it and can never get it wrong.\n */\n\n/**\n * A leaf positioning one of the containing layout's or screen template's own named slots.\n *\n * Takes a plain string rather than one enum, because a layout arranges {@link SlotName}s while a screen\n * template arranges its own vocabulary - and the same builder has to serve both. That every leaf names a\n * slot its container actually declares is checked by a spec rather than by the type, since no type can\n * express \"one of whatever this particular container declared\".\n */\nexport function slotLeaf(slotName: string, node: FlowNode = {}): FlowSlotLeaf {\n return { ...node, slotName };\n}\n\n/** A container arranging its children horizontally. */\nexport function row(children: FlowNode[], gap = 0, node: FlowNode = {}): FlowRow {\n return { ...node, gap, children, kind: FlowContainerKind.Row };\n}\n\n/** A container arranging its children vertically. */\nexport function column(children: FlowNode[], gap = 0, node: FlowNode = {}): FlowColumn {\n return { ...node, gap, children, kind: FlowContainerKind.Column };\n}\n\n/**\n * A container arranging its children in a grid.\n *\n * `columns` is always set rather than left to the renderer - a grid that does not say how many tracks it\n * has leaves the renderer guessing at the one thing the author cared about.\n */\nexport function grid(children: FlowNode[], columns: number, gap = 0, node: FlowNode = {}): FlowGrid {\n return { ...node, gap, children, columns, kind: FlowContainerKind.Grid };\n}\n"],"names":["slotLeaf","slotName","node","row","children","gap","kind","FlowContainerKind","Row","column","Column","grid","columns","Grid"],"mappings":";;AAAA;AACA;AAIA;;;;;;;;;;;;;;;;;;AAoBC,IACM,SAASA,QAAAA,CAASC,QAAgB,EAAEC,IAAAA,GAAiB,EAAE,EAAA;IAC1D,OAAO;AAAE,QAAA,GAAGA,IAAI;AAAED,QAAAA;AAAS,KAAA;AAC/B;AAEA,wDACO,SAASE,GAAAA,CAAIC,QAAoB,EAAEC,GAAAA,GAAM,CAAC,EAAEH,IAAAA,GAAiB,EAAE,EAAA;IAClE,OAAO;AAAE,QAAA,GAAGA,IAAI;AAAEG,QAAAA,GAAAA;AAAKD,QAAAA,QAAAA;AAAUE,QAAAA,IAAAA,EAAMC,kBAAkBC;AAAI,KAAA;AACjE;AAEA,sDACO,SAASC,MAAAA,CAAOL,QAAoB,EAAEC,GAAAA,GAAM,CAAC,EAAEH,IAAAA,GAAiB,EAAE,EAAA;IACrE,OAAO;AAAE,QAAA,GAAGA,IAAI;AAAEG,QAAAA,GAAAA;AAAKD,QAAAA,QAAAA;AAAUE,QAAAA,IAAAA,EAAMC,kBAAkBG;AAAO,KAAA;AACpE;AAEA;;;;;AAKC,IACM,SAASC,IAAAA,CAAKP,QAAoB,EAAEQ,OAAe,EAAEP,GAAAA,GAAM,CAAC,EAAEH,IAAAA,GAAiB,EAAE,EAAA;IACpF,OAAO;AAAE,QAAA,GAAGA,IAAI;AAAEG,QAAAA,GAAAA;AAAKD,QAAAA,QAAAA;AAAUQ,QAAAA,OAAAA;AAASN,QAAAA,IAAAA,EAAMC,kBAAkBM;AAAK,KAAA;AAC3E;;;;"}
1
+ {"version":3,"file":"flowBuilders.js","sources":["../../../layouts/flowBuilders.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 { FlowColumn, FlowContainerKind, FlowGrid, FlowNode, FlowRow, FlowSlotLeaf } from '@cratis/scene.model';\n\n/**\n * Small constructors for the `flow` primitives a layout's macro arrangement is built from.\n *\n * They exist because the primitives are structural interfaces with required members (`gap` and\n * `children` on every container), so writing a tree as object literals buries the shape under\n * boilerplate - and a layout tree is a thing to be read, not decoded. These keep the declarations in\n * `appShell.ts` and `fullPage.ts` down to the structure itself.\n *\n * Each container carries its {@link FlowContainerKind}, which is what lets a renderer tell a row from a\n * column - they are otherwise the same shape, and TypeScript has no runtime types to test. These builders\n * set it, so a declaration site never has to repeat it and can never get it wrong.\n */\n\n/**\n * A leaf positioning one of the containing layout's or screen template's own named slots.\n *\n * Takes a plain string rather than one enum, because a layout arranges {@link SlotName}s while a screen\n * template arranges its own vocabulary - and the same builder has to serve both. That every leaf names a\n * slot its container actually declares is checked by a spec rather than by the type, since no type can\n * express \"one of whatever this particular container declared\".\n */\nexport function slotLeaf(slotName: string, node: FlowNode = {}): FlowSlotLeaf {\n return { ...node, slotName };\n}\n\n/** A container arranging its children horizontally. */\nexport function row(children: FlowNode[], gap = 0, node: FlowNode = {}): FlowRow {\n return { ...node, gap, children, kind: FlowContainerKind.Row };\n}\n\n/** A container arranging its children vertically. */\nexport function column(children: FlowNode[], gap = 0, node: FlowNode = {}): FlowColumn {\n return { ...node, gap, children, kind: FlowContainerKind.Column };\n}\n\n/**\n * A container arranging its children in a grid.\n *\n * `columns` is always set rather than left to the renderer - a grid that does not say how many tracks it\n * has leaves the renderer guessing at the one thing the author cared about.\n */\nexport function grid(children: FlowNode[], columns: number, gap = 0, node: FlowNode = {}): FlowGrid {\n return { ...node, gap, children, columns, kind: FlowContainerKind.Grid };\n}\n"],"names":["slotLeaf","slotName","node","row","children","gap","kind","FlowContainerKind","Row","column","Column","grid","columns","Grid"],"mappings":";;AAAA;AACA;AAIA;;;;;;;;;;;;;;;;;;AAoBC,IACM,SAASA,QAAAA,CAASC,QAAgB,EAAEC,IAAAA,GAAiB,EAAE,EAAA;IAC1D,OAAO;AAAE,QAAA,GAAGA,IAAI;AAAED,QAAAA;AAAS,KAAA;AAC/B;AAEA,wDACO,SAASE,GAAAA,CAAIC,QAAoB,EAAEC,GAAAA,GAAM,CAAC,EAAEH,IAAAA,GAAiB,EAAE,EAAA;IAClE,OAAO;AAAE,QAAA,GAAGA,IAAI;AAAEG,QAAAA,GAAAA;AAAKD,QAAAA,QAAAA;AAAUE,QAAAA,IAAAA,EAAMC,kBAAkBC;AAAI,KAAA;AACjE;AAEA,sDACO,SAASC,MAAAA,CAAOL,QAAoB,EAAEC,GAAAA,GAAM,CAAC,EAAEH,IAAAA,GAAiB,EAAE,EAAA;IACrE,OAAO;AAAE,QAAA,GAAGA,IAAI;AAAEG,QAAAA,GAAAA;AAAKD,QAAAA,QAAAA;AAAUE,QAAAA,IAAAA,EAAMC,kBAAkBG;AAAO,KAAA;AACpE;AAEA;;;;;AAKC,IACM,SAASC,IAAAA,CAAKP,QAAoB,EAAEQ,OAAe,EAAEP,GAAAA,GAAM,CAAC,EAAEH,IAAAA,GAAiB,EAAE,EAAA;IACpF,OAAO;AAAE,QAAA,GAAGA,IAAI;AAAEG,QAAAA,GAAAA;AAAKD,QAAAA,QAAAA;AAAUQ,QAAAA,OAAAA;AAASN,QAAAA,IAAAA,EAAMC,kBAAkBM;AAAK,KAAA;AAC3E;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"fullPage.js","sources":["../../../layouts/fullPage.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 { FlowArrangement, Layout, WidthSizeClass } from '@cratis/scene.model';\nimport { LayoutName } from './LayoutName';\nimport { SlotName } from './SlotName';\nimport { column, row, slotLeaf } from './flowBuilders';\n\n/**\n * The tree at a regular width: the branding aside beside the content, with the configurator over both.\n *\n * The split is the shape every premium PrimeTek sign-in page uses - a colored branding half and a form\n * half - and it is the reason `aside` is a slot rather than something a screen paints inside `content`.\n */\nexport const fullPageRegularRoot = column([row([slotLeaf(SlotName.Aside), slotLeaf(SlotName.Content, { grow: 1 })], 0, { grow: 1 }), slotLeaf(SlotName.ConfigPanel)]);\n\n/**\n * The tree at a compact width: the branding aside leaves the flow.\n *\n * On a phone the aside would take 40% of the width from the only thing that matters on a sign-in screen,\n * which is the form. It drops out rather than stacking above it, because a sign-in form pushed below the\n * fold by decoration is the worst possible first screen.\n */\nexport const fullPageCompactWidthRoot = column([slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.ConfigPanel)]);\n\n/** The arrangement of the {@link fullPageLayout}'s own slots. */\nexport const fullPageArrangement: FlowArrangement = {\n root: fullPageRegularRoot,\n overrides: [{ width: WidthSizeClass.Compact, root: fullPageCompactWidthRoot }],\n};\n\n/**\n * The chrome-less layout.\n *\n * Sign-in, register, forgotten password, verification, lock, error, access-denied, not-found and landing\n * screens all use this rather than a stripped-down application shell, and that split is structural in\n * every PrimeTek template for a reason worth repeating: none of those screens has navigation state, a\n * sidebar to remember or a breadcrumb to place, so hanging them off the application shell would mean every\n * one of the eight modes needs an answer for a page with no menu.\n *\n * The configurator stays, because the sign-in page is very often the first page anyone sees and it still\n * has to honor the chosen theme.\n */\nexport const fullPageLayout: Layout = {\n name: LayoutName.FullPage,\n slots: [{ name: SlotName.Aside }, { name: SlotName.Content }, { name: SlotName.ConfigPanel }],\n arrangement: fullPageArrangement,\n};\n"],"names":["fullPageRegularRoot","column","row","slotLeaf","SlotName","Aside","Content","grow","ConfigPanel","fullPageCompactWidthRoot","fullPageArrangement","root","overrides","width","WidthSizeClass","Compact","fullPageLayout","name","LayoutName","FullPage","slots","arrangement"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;IAMO,MAAMA,mBAAAA,GAAsBC,MAAAA,CAAO;IAACC,GAAAA,CAAI;AAACC,QAAAA,QAAAA,CAASC,SAASC,KAAK,CAAA;QAAGF,QAAAA,CAASC,QAAAA,CAASE,OAAO,EAAE;YAAEC,IAAAA,EAAM;AAAE,SAAA;AAAG,KAAA,EAAE,CAAA,EAAG;QAAEA,IAAAA,EAAM;AAAE,KAAA,CAAA;AAAIJ,IAAAA,QAAAA,CAASC,SAASI,WAAW;CAAE;AAEpK;;;;;;IAOO,MAAMC,wBAAAA,GAA2BR,MAAAA,CAAO;IAACE,QAAAA,CAASC,QAAAA,CAASE,OAAO,EAAE;QAAEC,IAAAA,EAAM;AAAE,KAAA,CAAA;AAAIJ,IAAAA,QAAAA,CAASC,SAASI,WAAW;CAAE;AAExH,kEACO,MAAME,mBAAAA,GAAuC;IAChDC,IAAAA,EAAMX,mBAAAA;IACNY,SAAAA,EAAW;AAAC,QAAA;AAAEC,YAAAA,KAAAA,EAAOC,eAAeC,OAAO;YAAEJ,IAAAA,EAAMF;AAAyB;AAAE;AAClF;AAEA;;;;;;;;;;;UAYaO,cAAAA,GAAyB;AAClCC,IAAAA,IAAAA,EAAMC,WAAWC,QAAQ;IACzBC,KAAAA,EAAO;AAAC,QAAA;AAAEH,YAAAA,IAAAA,EAAMb,SAASC;AAAM,SAAA;AAAG,QAAA;AAAEY,YAAAA,IAAAA,EAAMb,SAASE;AAAQ,SAAA;AAAG,QAAA;AAAEW,YAAAA,IAAAA,EAAMb,SAASI;AAAY;AAAE,KAAA;IAC7Fa,WAAAA,EAAaX;AACjB;;;;"}
1
+ {"version":3,"file":"fullPage.js","sources":["../../../layouts/fullPage.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 { FlowArrangement, Layout, WidthSizeClass } from '@cratis/scene.model';\nimport { LayoutName } from './LayoutName';\nimport { SlotName } from './SlotName';\nimport { column, row, slotLeaf } from './flowBuilders';\n\n/**\n * The tree at a regular width: the branding aside beside the content, with the configurator over both.\n *\n * The split is the shape every premium PrimeTek sign-in page uses - a colored branding half and a form\n * half - and it is the reason `aside` is a slot rather than something a screen paints inside `content`.\n */\nexport const fullPageRegularRoot = column([row([slotLeaf(SlotName.Aside), slotLeaf(SlotName.Content, { grow: 1 })], 0, { grow: 1 }), slotLeaf(SlotName.ConfigPanel)]);\n\n/**\n * The tree at a compact width: the branding aside leaves the flow.\n *\n * On a phone the aside would take 40% of the width from the only thing that matters on a sign-in screen,\n * which is the form. It drops out rather than stacking above it, because a sign-in form pushed below the\n * fold by decoration is the worst possible first screen.\n */\nexport const fullPageCompactWidthRoot = column([slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.ConfigPanel)]);\n\n/** The arrangement of the {@link fullPageLayout}'s own slots. */\nexport const fullPageArrangement: FlowArrangement = {\n root: fullPageRegularRoot,\n overrides: [{ width: WidthSizeClass.Compact, root: fullPageCompactWidthRoot }],\n};\n\n/**\n * The chrome-less layout.\n *\n * Sign-in, register, forgotten password, verification, lock, error, access-denied, not-found and landing\n * screens all use this rather than a stripped-down application shell, and that split is structural in\n * every PrimeTek template for a reason worth repeating: none of those screens has navigation state, a\n * sidebar to remember or a breadcrumb to place, so hanging them off the application shell would mean every\n * one of the eight modes needs an answer for a page with no menu.\n *\n * The configurator stays, because the sign-in page is very often the first page anyone sees and it still\n * has to honor the chosen theme.\n */\nexport const fullPageLayout: Layout = {\n name: LayoutName.FullPage,\n slots: [{ name: SlotName.Aside }, { name: SlotName.Content }, { name: SlotName.ConfigPanel }],\n arrangement: fullPageArrangement,\n};\n"],"names":["fullPageRegularRoot","column","row","slotLeaf","SlotName","Aside","Content","grow","ConfigPanel","fullPageCompactWidthRoot","fullPageArrangement","root","overrides","width","WidthSizeClass","Compact","fullPageLayout","name","LayoutName","FullPage","slots","arrangement"],"mappings":";;;;;AAAA;AACA;AAOA;;;;;IAMO,MAAMA,mBAAAA,GAAsBC,MAAAA,CAAO;IAACC,GAAAA,CAAI;AAACC,QAAAA,QAAAA,CAASC,SAASC,KAAK,CAAA;QAAGF,QAAAA,CAASC,QAAAA,CAASE,OAAO,EAAE;YAAEC,IAAAA,EAAM;AAAE,SAAA;AAAG,KAAA,EAAE,CAAA,EAAG;QAAEA,IAAAA,EAAM;AAAE,KAAA,CAAA;AAAIJ,IAAAA,QAAAA,CAASC,SAASI,WAAW;CAAE;AAEpK;;;;;;IAOO,MAAMC,wBAAAA,GAA2BR,MAAAA,CAAO;IAACE,QAAAA,CAASC,QAAAA,CAASE,OAAO,EAAE;QAAEC,IAAAA,EAAM;AAAE,KAAA,CAAA;AAAIJ,IAAAA,QAAAA,CAASC,SAASI,WAAW;CAAE;AAExH,kEACO,MAAME,mBAAAA,GAAuC;IAChDC,IAAAA,EAAMX,mBAAAA;IACNY,SAAAA,EAAW;AAAC,QAAA;AAAEC,YAAAA,KAAAA,EAAOC,eAAeC,OAAO;YAAEJ,IAAAA,EAAMF;AAAyB;AAAE;AAClF;AAEA;;;;;;;;;;;UAYaO,cAAAA,GAAyB;AAClCC,IAAAA,IAAAA,EAAMC,WAAWC,QAAQ;IACzBC,KAAAA,EAAO;AAAC,QAAA;AAAEH,YAAAA,IAAAA,EAAMb,SAASC;AAAM,SAAA;AAAG,QAAA;AAAEY,YAAAA,IAAAA,EAAMb,SAASE;AAAQ,SAAA;AAAG,QAAA;AAAEW,YAAAA,IAAAA,EAAMb,SAASI;AAAY;AAAE,KAAA;IAC7Fa,WAAAA,EAAaX;AACjB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"shellComponents.js","sources":["../../../layouts/shellComponents.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 { ComponentName } from '../ComponentName';\nimport { LayoutName } from './LayoutName';\n\n/**\n * Which component renders which layout.\n *\n * A {@link Layout} is data - named slots and an arrangement - and says nothing about how it is drawn. This\n * is the one place that pairing lives, so a host holding a screen and its layout name can find the shell\n * to render it in without hardcoding the answer, and a spec can prove every layout the blueprint declares\n * actually has one.\n */\nconst shellComponents: Record<LayoutName, ComponentName> = {\n [LayoutName.AppShell]: ComponentName.AppShell,\n [LayoutName.FullPage]: ComponentName.FullPageShell,\n};\n\n/**\n * The component that renders a layout.\n *\n * @param layoutName The layout's name.\n * @returns The bare component name, or `undefined` when the layout is not one of this blueprint's.\n */\nexport function shellComponentForLayout(layoutName: string): ComponentName | undefined {\n return shellComponents[layoutName as LayoutName];\n}\n"],"names":["shellComponents","LayoutName","AppShell","ComponentName","FullPage","FullPageShell","shellComponentForLayout","layoutName"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;AAOC,IACD,MAAMA,eAAAA,GAAqD;AACvD,IAAA,CAACC,UAAAA,CAAWC,QAAQ,GAAGC,cAAcD,QAAQ;AAC7C,IAAA,CAACD,UAAAA,CAAWG,QAAQ,GAAGD,cAAcE;AACzC,CAAA;AAEA;;;;;IAMO,SAASC,uBAAAA,CAAwBC,UAAkB,EAAA;IACtD,OAAOP,eAAe,CAACO,UAAAA,CAAyB;AACpD;;;;"}
1
+ {"version":3,"file":"shellComponents.js","sources":["../../../layouts/shellComponents.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 { ComponentName } from '../ComponentName';\nimport { LayoutName } from './LayoutName';\n\n/**\n * Which component renders which layout.\n *\n * A {@link Layout} is data - named slots and an arrangement - and says nothing about how it is drawn. This\n * is the one place that pairing lives, so a host holding a screen and its layout name can find the shell\n * to render it in without hardcoding the answer, and a spec can prove every layout the blueprint declares\n * actually has one.\n */\nconst shellComponents: Record<LayoutName, ComponentName> = {\n [LayoutName.AppShell]: ComponentName.AppShell,\n [LayoutName.FullPage]: ComponentName.FullPageShell,\n};\n\n/**\n * The component that renders a layout.\n *\n * @param layoutName The layout's name.\n * @returns The bare component name, or `undefined` when the layout is not one of this blueprint's.\n */\nexport function shellComponentForLayout(layoutName: string): ComponentName | undefined {\n return shellComponents[layoutName as LayoutName];\n}\n"],"names":["shellComponents","LayoutName","AppShell","ComponentName","FullPage","FullPageShell","shellComponentForLayout","layoutName"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;AAOC,IACD,MAAMA,eAAAA,GAAqD;AACvD,IAAA,CAACC,UAAAA,CAAWC,QAAQ,GAAGC,cAAcD,QAAQ;AAC7C,IAAA,CAACD,UAAAA,CAAWG,QAAQ,GAAGD,cAAcE;AACzC,CAAA;AAEA;;;;;IAMO,SAASC,uBAAAA,CAAwBC,UAAkB,EAAA;IACtD,OAAOP,eAAe,CAACO,UAAAA,CAAyB;AACpD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"packageName.js","sources":["../../packageName.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 name this blueprint is known by inside a `ui profile`.\n *\n * It is not the npm package name: a profile lists Scene package names, a theme declares compatibility\n * with them, and `componentRegistryKey` builds every registry key from this. It therefore lives on its own\n * rather than inside the manifest, so the registry can key off it without importing the manifest that\n * describes the registry.\n */\nexport const defaultBlueprintName = 'Cratis.Blueprint.Default';\n"],"names":["defaultBlueprintName"],"mappings":"AAAA;AACA;AAEA;;;;;;;IAQO,MAAMA,oBAAAA,GAAuB;;;;"}
1
+ {"version":3,"file":"packageName.js","sources":["../../packageName.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 name this blueprint is known by inside a `ui profile`.\n *\n * It is not the npm package name: a profile lists Scene package names, a theme declares compatibility\n * with them, and `componentRegistryKey` builds every registry key from this. It therefore lives on its own\n * rather than inside the manifest, so the registry can key off it without importing the manifest that\n * describes the registry.\n */\nexport const defaultBlueprintName = 'Cratis.Blueprint.Default';\n"],"names":["defaultBlueprintName"],"mappings":"AAAA;AACA;AAEA;;;;;;;IAQO,MAAMA,oBAAAA,GAAuB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.js","sources":["../../../shell/AppShell.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { LayoutConfigProvider, isPointerRevealMode, useLayoutConfig, useOptionalLayoutConfig } from '../configuration';\nimport { SlotName } from '../layouts';\nimport { LayoutMask } from './Mask';\n\n/**\n * The application shell: the `AppShell` layout's slots, positioned.\n *\n * This owns the positioned boxes - the fixed topbar, the sliding sidebar panel, the pushed main column -\n * while the components filling the slots own what goes inside them. Splitting it there is what lets a\n * screen replace the entire menu without knowing anything about how `reveal` mode translates the panel it\n * lives in.\n *\n * It puts a {@link LayoutConfigProvider} around itself when a host has not, because a gallery preview\n * hands the renderer one `appShell` element and nothing else, and the shell still has to be able to\n * switch modes.\n */\nexport function AppShell({ element, slots }: RegisteredComponentProps) {\n const surface = <AppShellSurface elementId={element.id} slots={slots} />;\n return useOptionalLayoutConfig() ? surface : <LayoutConfigProvider>{surface}</LayoutConfigProvider>;\n}\n\ninterface AppShellSurfaceProps {\n elementId: string;\n slots: Record<string, ReactNode[]>;\n}\n\nfunction AppShellSurface({ elementId, slots }: AppShellSurfaceProps) {\n const { config, effectiveMode, wrapperClasses, setSidebarRevealed } = useLayoutConfig();\n const revealsOnPointer = isPointerRevealMode(effectiveMode);\n const hasSidebar = filled(slots, SlotName.Sidebar) || filled(slots, SlotName.Menu);\n\n return (\n <div className={wrapperClasses.join(' ')} data-scene-id={elementId} data-layout-mode={config.mode}>\n {filled(slots, SlotName.Topbar) && <header className='layout-topbar'>{slots[SlotName.Topbar]}</header>}\n\n {hasSidebar && (\n <aside\n className='layout-sidebar'\n onMouseEnter={revealsOnPointer ? () => setSidebarRevealed(true) : undefined}\n onMouseLeave={revealsOnPointer ? () => setSidebarRevealed(false) : undefined}>\n {slots[SlotName.Sidebar]}\n {slots[SlotName.Menu]}\n </aside>\n )}\n\n <div className='layout-main'>\n {filled(slots, SlotName.Breadcrumb) && <div className='layout-breadcrumb'>{slots[SlotName.Breadcrumb]}</div>}\n <main className='layout-content'>{slots[SlotName.Content]}</main>\n {filled(slots, SlotName.Footer) && <footer className='layout-footer'>{slots[SlotName.Footer]}</footer>}\n </div>\n\n {filled(slots, SlotName.RightPanel) && <aside className='layout-right-panel'>{slots[SlotName.RightPanel]}</aside>}\n {slots[SlotName.ConfigPanel]}\n <LayoutMask />\n </div>\n );\n}\n\nfunction filled(slots: Record<string, ReactNode[]>, name: SlotName): boolean {\n return (slots[name]?.length ?? 0) > 0;\n}\n"],"names":["AppShell","element","slots","surface","_jsx","AppShellSurface","elementId","id","useOptionalLayoutConfig","LayoutConfigProvider","config","effectiveMode","wrapperClasses","setSidebarRevealed","useLayoutConfig","revealsOnPointer","isPointerRevealMode","hasSidebar","filled","SlotName","Sidebar","Menu","_jsxs","div","className","join","data-scene-id","data-layout-mode","mode","Topbar","header","aside","onMouseEnter","undefined","onMouseLeave","Breadcrumb","main","Content","Footer","footer","RightPanel","ConfigPanel","LayoutMask","name","length"],"mappings":";;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;AAWC,IACM,SAASA,QAAAA,CAAS,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACjE,IAAA,MAAMC,wBAAUC,GAAA,CAACC,eAAAA,EAAAA;AA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,KAAK,CAACiB,QAAAA,CAASE,IAAI;;;0BAI5BC,IAAA,CAACC,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,aAAA;;AACVN,oBAAAA,MAAAA,CAAOhB,KAAAA,EAAOiB,QAAAA,CAASgB,UAAU,CAAA,kBAAK/B,GAAA,CAACmB,KAAAA,EAAAA;wBAAIC,SAAAA,EAAU,mBAAA;kCAAqBtB,KAAK,CAACiB,QAAAA,CAASgB,UAAU;;kCACpG/B,GAAA,CAACgC,MAAAA,EAAAA;wBAAKZ,SAAAA,EAAU,gBAAA;kCAAkBtB,KAAK,CAACiB,QAAAA,CAASkB,OAAO;;AACvDnB,oBAAAA,MAAAA,CAAOhB,KAAAA,EAAOiB,QAAAA,CAASmB,MAAM,CAAA,kBAAKlC,GAAA,CAACmC,QAAAA,EAAAA;wBAAOf,SAAAA,EAAU,eAAA;kCAAiBtB,KAAK,CAACiB,QAAAA,CAASmB,MAAM;;;;AAG9FpB,YAAAA,MAAAA,CAAOhB,KAAAA,EAAOiB,QAAAA,CAASqB,UAAU,CAAA,kBAAKpC,GAAA,CAAC2B,OAAAA,EAAAA;gBAAMP,SAAAA,EAAU,oBAAA;0BAAsBtB,KAAK,CAACiB,QAAAA,CAASqB,UAAU;;YACtGtC,KAAK,CAACiB,QAAAA,CAASsB,WAAW,CAAC;0BAC5BrC,GAAA,CAACsC,UAAAA,EAAAA,EAAAA;;;AAGb;AAEA,SAASxB,MAAAA,CAAOhB,KAAkC,EAAEyC,IAAc,EAAA;IAC9D,OAAQzC,CAAAA,KAAK,CAACyC,KAAK,EAAEC,MAAAA,IAAU,CAAA,IAAK,CAAA;AACxC;;;;"}
1
+ {"version":3,"file":"AppShell.js","sources":["../../../shell/AppShell.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { LayoutConfigProvider, isPointerRevealMode, useLayoutConfig, useOptionalLayoutConfig } from '../configuration';\nimport { SlotName } from '../layouts';\nimport { LayoutMask } from './Mask';\n\n/**\n * The application shell: the `AppShell` layout's slots, positioned.\n *\n * This owns the positioned boxes - the fixed topbar, the sliding sidebar panel, the pushed main column -\n * while the components filling the slots own what goes inside them. Splitting it there is what lets a\n * screen replace the entire menu without knowing anything about how `reveal` mode translates the panel it\n * lives in.\n *\n * It puts a {@link LayoutConfigProvider} around itself when a host has not, because a gallery preview\n * hands the renderer one `appShell` element and nothing else, and the shell still has to be able to\n * switch modes.\n */\nexport function AppShell({ element, slots }: RegisteredComponentProps) {\n const surface = <AppShellSurface elementId={element.id} slots={slots} />;\n return useOptionalLayoutConfig() ? surface : <LayoutConfigProvider>{surface}</LayoutConfigProvider>;\n}\n\ninterface AppShellSurfaceProps {\n elementId: string;\n slots: Record<string, ReactNode[]>;\n}\n\nfunction AppShellSurface({ elementId, slots }: AppShellSurfaceProps) {\n const { config, effectiveMode, wrapperClasses, setSidebarRevealed } = useLayoutConfig();\n const revealsOnPointer = isPointerRevealMode(effectiveMode);\n const hasSidebar = filled(slots, SlotName.Sidebar) || filled(slots, SlotName.Menu);\n\n return (\n <div className={wrapperClasses.join(' ')} data-scene-id={elementId} data-layout-mode={config.mode}>\n {filled(slots, SlotName.Topbar) && <header className='layout-topbar'>{slots[SlotName.Topbar]}</header>}\n\n {hasSidebar && (\n <aside\n className='layout-sidebar'\n onMouseEnter={revealsOnPointer ? () => setSidebarRevealed(true) : undefined}\n onMouseLeave={revealsOnPointer ? () => setSidebarRevealed(false) : undefined}>\n {slots[SlotName.Sidebar]}\n {slots[SlotName.Menu]}\n </aside>\n )}\n\n <div className='layout-main'>\n {filled(slots, SlotName.Breadcrumb) && <div className='layout-breadcrumb'>{slots[SlotName.Breadcrumb]}</div>}\n <main className='layout-content'>{slots[SlotName.Content]}</main>\n {filled(slots, SlotName.Footer) && <footer className='layout-footer'>{slots[SlotName.Footer]}</footer>}\n </div>\n\n {filled(slots, SlotName.RightPanel) && <aside className='layout-right-panel'>{slots[SlotName.RightPanel]}</aside>}\n {slots[SlotName.ConfigPanel]}\n <LayoutMask />\n </div>\n );\n}\n\nfunction filled(slots: Record<string, ReactNode[]>, name: SlotName): boolean {\n return (slots[name]?.length ?? 0) > 0;\n}\n"],"names":["AppShell","element","slots","surface","_jsx","AppShellSurface","elementId","id","useOptionalLayoutConfig","LayoutConfigProvider","config","effectiveMode","wrapperClasses","setSidebarRevealed","useLayoutConfig","revealsOnPointer","isPointerRevealMode","hasSidebar","filled","SlotName","Sidebar","Menu","_jsxs","div","className","join","data-scene-id","data-layout-mode","mode","Topbar","header","aside","onMouseEnter","undefined","onMouseLeave","Breadcrumb","main","Content","Footer","footer","RightPanel","ConfigPanel","LayoutMask","name","length"],"mappings":";;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;AAWC,IACM,SAASA,QAAAA,CAAS,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACjE,IAAA,MAAMC,wBAAUC,GAAA,CAACC,eAAAA,EAAAA;AAAgBC,QAAAA,SAAAA,EAAWL,QAAQM,EAAE;QAAEL,KAAAA,EAAOA;;IAC/D,OAAOM,uBAAAA,EAAAA,GAA4BL,wBAAUC,GAAA,CAACK,oBAAAA,EAAAA;AAAsBN,QAAAA,QAAAA,EAAAA;;AACxE;AAOA,SAASE,eAAAA,CAAgB,EAAEC,SAAS,EAAEJ,KAAK,EAAwB,EAAA;IAC/D,MAAM,EAAEQ,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAEC,kBAAkB,EAAE,GAAGC,eAAAA,EAAAA;AACtE,IAAA,MAAMC,mBAAmBC,mBAAAA,CAAoBL,aAAAA,CAAAA;IAC7C,MAAMM,UAAAA,GAAaC,OAAOhB,KAAAA,EAAOiB,QAAAA,CAASC,OAAO,CAAA,IAAKF,MAAAA,CAAOhB,KAAAA,EAAOiB,QAAAA,CAASE,IAAI,CAAA;AAEjF,IAAA,qBACIC,IAAA,CAACC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B,MAAM;;;;AAG9FpB,YAAAA,MAAAA,CAAOhB,KAAAA,EAAOiB,QAAAA,CAASqB,UAAU,CAAA,kBAAKpC,GAAA,CAAC2B,OAAAA,EAAAA;gBAAMP,SAAAA,EAAU,oBAAA;0BAAsBtB,KAAK,CAACiB,QAAAA,CAASqB,UAAU;;YACtGtC,KAAK,CAACiB,QAAAA,CAASsB,WAAW,CAAC;0BAC5BrC,GAAA,CAACsC,UAAAA,EAAAA,EAAAA;;;AAGb;AAEA,SAASxB,MAAAA,CAAOhB,KAAkC,EAAEyC,IAAc,EAAA;IAC9D,OAAQzC,CAAAA,KAAK,CAACyC,KAAK,EAAEC,MAAAA,IAAU,CAAA,IAAK,CAAA;AACxC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.js","sources":["../../../shell/Breadcrumb.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Fragment } from 'react';\nimport { Breadcrumb as PrimeBreadcrumb } from 'primereact/breadcrumb';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { MenuEntry } from './MenuEntry';\nimport { readOptionalString, readRecords, recordString } from './elementProperties';\n\n/**\n * The trail above the content.\n *\n * PrimeReact's own `Breadcrumb` does the rendering rather than hand-written markup, because a breadcrumb\n * is an ordinary component with no layout-mode behavior at all - it looks the same in every one of the\n * eight modes. The shell only writes CSS where PrimeReact genuinely has no answer, and this is not one of\n * those places: `Breadcrumb.Root` still supplies the `nav`, its `aria-label` and the list semantics, which\n * is the part that is easy to get wrong by hand.\n *\n * What PrimeReact 11 no longer supplies is the `model` array - the component is composed now, and the\n * `primereact/menuitem` type the array was made of is gone with it, which is why the trail is mapped into\n * this package's own {@link MenuEntry}. The last entry is `Breadcrumb.Current` rather than a link: a trail\n * whose final crumb navigates to the page already open is a link that does nothing, and it takes\n * `aria-current='page'` away from the one element that should carry it.\n */\nexport function Breadcrumb({ element }: RegisteredComponentProps) {\n const home = readOptionalString(element, 'homeTargetScreen');\n const trail = readRecords(element, 'items').map(\n (item): MenuEntry => ({\n label: recordString(item, 'label'),\n url: recordString(item, 'targetScreen') ? `#/${recordString(item, 'targetScreen')}` : undefined,\n }),\n );\n\n return (\n <div data-scene-id={element.id}>\n <PrimeBreadcrumb.Root>\n <PrimeBreadcrumb.List>\n {home && (\n <PrimeBreadcrumb.Item>\n <PrimeBreadcrumb.Link as='a' href={`#/${home}`} aria-label='Home'>\n <i className='pi pi-home' aria-hidden='true' />\n </PrimeBreadcrumb.Link>\n </PrimeBreadcrumb.Item>\n )}\n {trail.map((entry, index) => (\n <Fragment key={`${index}-${entry.label}`}>\n {(!!home || index > 0) && (\n <PrimeBreadcrumb.Separator>\n <i className='pi pi-chevron-right' aria-hidden='true' />\n </PrimeBreadcrumb.Separator>\n )}\n <PrimeBreadcrumb.Item>\n {entry.url ? (\n <PrimeBreadcrumb.Link as='a' href={entry.url}>\n {entry.label}\n </PrimeBreadcrumb.Link>\n ) : (\n <PrimeBreadcrumb.Current>{entry.label}</PrimeBreadcrumb.Current>\n )}\n </PrimeBreadcrumb.Item>\n </Fragment>\n ))}\n </PrimeBreadcrumb.List>\n </PrimeBreadcrumb.Root>\n </div>\n );\n}\n"],"names":["Breadcrumb","element","home","readOptionalString","trail","readRecords","map","item","label","recordString","url","undefined","_jsx","div","data-scene-id","id","PrimeBreadcrumb","Root","_jsxs","List","Item","Link","as","href","aria-label","i","className","aria-hidden","entry","index","Fragment","Separator","Current"],"mappings":";;;;;AASA;;;;;;;;;;;;;;AAcC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;IAC5D,MAAMC,IAAAA,GAAOC,mBAAmBF,OAAAA,EAAS,kBAAA,CAAA;IACzC,MAAMG,KAAAA,GAAQC,YAAYJ,OAAAA,EAAS,OAAA,CAAA,CAASK,GAAG,CAC3C,CAACC,QAAqB;AAClBC,YAAAA,KAAAA,EAAOC,aAAaF,IAAAA,EAAM,OA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KAAAA,CAAMpB;AAGX,qCAAA,CAAA,iBAAAI,GAAA,CAACI,aAAgBgB,OAAO,EAAA;AAAEJ,wCAAAA,QAAAA,EAAAA,KAAAA,CAAMpB;;;;AAZ7B,yBAAA,EAAA,CAAA,EAAGqB,KAAAA,CAAM,CAAC,EAAED,KAAAA,CAAMpB,KAAK,CAAA,CAAE,CAAA;;;;;AAqBhE;;;;"}
1
+ {"version":3,"file":"Breadcrumb.js","sources":["../../../shell/Breadcrumb.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Fragment } from 'react';\nimport { Breadcrumb as PrimeBreadcrumb } from 'primereact/breadcrumb';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { MenuEntry } from './MenuEntry';\nimport { readOptionalString, readRecords, recordString } from './elementProperties';\n\n/**\n * The trail above the content.\n *\n * PrimeReact's own `Breadcrumb` does the rendering rather than hand-written markup, because a breadcrumb\n * is an ordinary component with no layout-mode behavior at all - it looks the same in every one of the\n * eight modes. The shell only writes CSS where PrimeReact genuinely has no answer, and this is not one of\n * those places: `Breadcrumb.Root` still supplies the `nav`, its `aria-label` and the list semantics, which\n * is the part that is easy to get wrong by hand.\n *\n * What PrimeReact 11 no longer supplies is the `model` array - the component is composed now, and the\n * `primereact/menuitem` type the array was made of is gone with it, which is why the trail is mapped into\n * this package's own {@link MenuEntry}. The last entry is `Breadcrumb.Current` rather than a link: a trail\n * whose final crumb navigates to the page already open is a link that does nothing, and it takes\n * `aria-current='page'` away from the one element that should carry it.\n */\nexport function Breadcrumb({ element }: RegisteredComponentProps) {\n const home = readOptionalString(element, 'homeTargetScreen');\n const trail = readRecords(element, 'items').map(\n (item): MenuEntry => ({\n label: recordString(item, 'label'),\n url: recordString(item, 'targetScreen') ? `#/${recordString(item, 'targetScreen')}` : undefined,\n }),\n );\n\n return (\n <div data-scene-id={element.id}>\n <PrimeBreadcrumb.Root>\n <PrimeBreadcrumb.List>\n {home && (\n <PrimeBreadcrumb.Item>\n <PrimeBreadcrumb.Link as='a' href={`#/${home}`} aria-label='Home'>\n <i className='pi pi-home' aria-hidden='true' />\n </PrimeBreadcrumb.Link>\n </PrimeBreadcrumb.Item>\n )}\n {trail.map((entry, index) => (\n <Fragment key={`${index}-${entry.label}`}>\n {(!!home || index > 0) && (\n <PrimeBreadcrumb.Separator>\n <i className='pi pi-chevron-right' aria-hidden='true' />\n </PrimeBreadcrumb.Separator>\n )}\n <PrimeBreadcrumb.Item>\n {entry.url ? (\n <PrimeBreadcrumb.Link as='a' href={entry.url}>\n {entry.label}\n </PrimeBreadcrumb.Link>\n ) : (\n <PrimeBreadcrumb.Current>{entry.label}</PrimeBreadcrumb.Current>\n )}\n </PrimeBreadcrumb.Item>\n </Fragment>\n ))}\n </PrimeBreadcrumb.List>\n </PrimeBreadcrumb.Root>\n </div>\n );\n}\n"],"names":["Breadcrumb","element","home","readOptionalString","trail","readRecords","map","item","label","recordString","url","undefined","_jsx","div","data-scene-id","id","PrimeBreadcrumb","Root","_jsxs","List","Item","Link","as","href","aria-label","i","className","aria-hidden","entry","index","Fragment","Separator","Current"],"mappings":";;;;;AASA;;;;;;;;;;;;;;AAcC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;IAC5D,MAAMC,IAAAA,GAAOC,mBAAmBF,OAAAA,EAAS,kBAAA,CAAA;IACzC,MAAMG,KAAAA,GAAQC,YAAYJ,OAAAA,EAAS,OAAA,CAAA,CAASK,GAAG,CAC3C,CAACC,QAAqB;AAClBC,YAAAA,KAAAA,EAAOC,aAAaF,IAAAA,EAAM,OAAA,CAAA;YAC1BG,GAAAA,EAAKD,YAAAA,CAAaF,MAAM,cAAA,CAAA,GAAkB,CAAC,EAAE,EAAEE,YAAAA,CAAaF,IAAAA,EAAM,cAAA,CAAA,CAAA,CAAiB,GAAGI;SAC1F,CAAA,CAAA;AAGJ,IAAA,qBACIC,GAAA,CAACC,KAAAA,EAA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A,CAAE,CAAA;;;;;AAqBhE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigPanel.js","sources":["../../../shell/ConfigPanel.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 { Drawer } from 'primereact/drawer';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ColorScheme, MenuTheme, colorSchemes, menuThemes, useLayoutConfig } from '../configuration';\nimport { LayoutModeSwitcher } from './LayoutModeSwitcher';\nimport { ThemeSwitcher } from './ThemeSwitcher';\nimport { readBoolean, readString } from './elementProperties';\n\n/** What each color scheme is called in the configurator. */\nconst colorSchemeLabels: Record<ColorScheme, string> = {\n [ColorScheme.Light]: 'Light',\n [ColorScheme.Dark]: 'Dark',\n};\n\n/** What each menu theme is called in the configurator. */\nconst menuThemeLabels: Record<MenuTheme, string> = {\n [MenuTheme.Light]: 'Light',\n [MenuTheme.Dark]: 'Dark',\n [MenuTheme.Primary]: 'Primary',\n};\n\n/**\n * The floating configurator.\n *\n * The axes are the ones the modern PrimeTek templates expose - color scheme, menu mode, menu theme and\n * theme - because those are the four choices that actually change how an application feels, and a\n * configurator with more knobs than that becomes a settings screen nobody finishes reading.\n *\n * The panel is `primereact/drawer`, which is the slide-in overlay this component has always wanted.\n * PrimeReact 11 gave the name `Sidebar` to something else entirely - a new app-shell primitive with\n * `SidebarLayout`/`SidebarAside`/`SidebarPanel` parts - so the v10 `Sidebar` import this file used to\n * carry would still resolve after the upgrade and would silently render an app shell inside the shell.\n * That is the one rename in the whole library that fails quietly rather than loudly, which is why it is\n * called out here: this is `Drawer`, deliberately, and it is not the {@link Sidebar} next door either -\n * that one is this package's own component for the docked panel's chrome.\n *\n * Open state is the drawer's own. `Drawer.Trigger` renders in place through `Drawer.Root`'s fragment, so\n * the floating cog sits exactly where it did while getting `aria-expanded`/`aria-controls` from the\n * component rather than from hand-written props that can drift out of step with the panel.\n */\nexport function ConfigPanel({ element, slots }: RegisteredComponentProps) {\n const { config, setColorScheme, setMenuTheme } = useLayoutConfig();\n const title = readString(element, 'title', 'Settings');\n const showsMenuTheme = readBoolean(element, 'showMenuTheme', true);\n const showsMode = readBoolean(element, 'showLayoutMode', true);\n\n return (\n <Drawer.Root position='right'>\n <Drawer.Trigger as={Button} rounded iconOnly className='layout-config-button' aria-label={title} data-scene-id={element.id}>\n <i className='pi pi-cog' aria-hidden='true' />\n </Drawer.Trigger>\n <Drawer.Portal>\n <Drawer.Backdrop />\n <Drawer.Popup>\n <Drawer.Header>\n <Drawer.Title>{title}</Drawer.Title>\n <Drawer.Close aria-label={`Close ${title}`}>\n <i className='pi pi-times' aria-hidden='true' />\n </Drawer.Close>\n </Drawer.Header>\n <Drawer.Content>\n <div className='layout-config-panel'>\n <div>\n <h3 className='layout-config-section-title'>Color scheme</h3>\n <div className='layout-config-options' role='group' aria-label='Color scheme'>\n {colorSchemes.map(scheme => (\n <button\n key={scheme}\n type='button'\n className='layout-config-option'\n aria-pressed={config.colorScheme === scheme}\n onClick={() => setColorScheme(scheme)}>\n {colorSchemeLabels[scheme]}\n </button>\n ))}\n </div>\n </div>\n\n <ThemeSwitcher\n element={{ ...element, id: `${element.id}-theme`, properties: { ...element.properties, label: 'Theme' } }}\n slots={{}}\n />\n\n {showsMode && (\n <LayoutModeSwitcher element={{ ...element, id: `${element.id}-mode`, properties: { label: 'Menu mode' } }} slots={{}} />\n )}\n\n {showsMenuTheme && (\n <div>\n <h3 className='layout-config-section-title'>Menu theme</h3>\n <div className='layout-config-options' role='group' aria-label='Menu theme'>\n {menuThemes.map(menuTheme => (\n <button\n key={menuTheme}\n type='button'\n className='layout-config-option'\n aria-pressed={config.menuTheme === menuTheme}\n onClick={() => setMenuTheme(menuTheme)}>\n {menuThemeLabels[menuTheme]}\n </button>\n ))}\n </div>\n </div>\n )}\n\n {slots.content}\n </div>\n </Drawer.Content>\n </Drawer.Popup>\n </Drawer.Portal>\n </Drawer.Root>\n );\n}\n"],"names":["colorSchemeLabels","ColorScheme","Light","Dark","menuThemeLabels","MenuTheme","Primary","ConfigPanel","element","slots","config","setColorScheme","setMenuTheme","useLayoutConfig","title","readString","showsMenuTheme","readBoolean","showsMode","_jsxs","Drawer","Root","position","_jsx","Trigger","as","Button","rounded","iconOnly","className","aria-label","data-scene-id","id","i","aria-hidden","Portal","Backdrop","Popup","Header","Title","Close","Content","div","h3","role","colorSchemes","map","scheme","button","type","aria-pressed","colorScheme","onClick","ThemeSwitcher","properties","label","LayoutModeSwitcher","menuThemes","menuTheme","content"],"mappings":";;;;;;;;;;AAWA,6DACA,MAAMA,iBAAAA,GAAiD;IACnD,CAACC,WAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,WAAAA,CAAYE,IAAI,GAAG;AACxB,CAAA;AAEA,2DACA,MAAMC,eAAAA,GAA6C;IAC/C,CAACC,SAAAA,CAAUH,KAAK,GAAG,OAAA;IACnB,CAACG,SAAAA,CAAUF,IAAI,GAAG,MAAA;IAClB,CAACE,SAAAA,CAAUC,OAAO,GAAG;AACzB,CAAA;AAEA;;;;;;;;;;;;;;;;;;AAkBC,IACM,SAASC,WAAAA,CAAY,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACpE,IAAA,MAAM,EAAEC,MAAM,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGC,eAAAA,EAAAA;IACjD,MAAMC,KAAAA,GAAQC,UAAAA,CAAWP,OAAAA,EAAS,OAAA,EAAS,UAAA,CAAA;IAC3C,MAAMQ,cAAAA,GAAiBC,WAAAA,CAAYT,OAAAA,EAAS,eAAA,EAAiB,IAAA,CAAA;IAC7D,MAAMU,SAAAA,GAAYD,WAAAA,CAAYT,OAAAA,EAAS,gBAAA,EAAkB,IAAA,CAAA;IAEzD,qBACIW,IAAA,CAACC,OAAOC,IAAI,EAAA;QAACC,QAAAA,EAAS,OAAA;;AAClB,0BAAAC,GAAA,CAACH,OAAOI,OAAO,EAAA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,EAAAA,UAAAA,CAAWX,GAAG,CAACY,CAAAA,SAAAA,iBACZnC,GAAA,CAACyB,QAAAA,EAAAA;4DAEGC,IAAAA,EAAK,QAAA;4DACLpB,SAAAA,EAAU,sBAAA;4DACVqB,cAAAA,EAAcxC,MAAAA,CAAOgD,SAAS,KAAKA,SAAAA;AACnCN,4DAAAA,OAAAA,EAAS,IAAMxC,YAAAA,CAAa8C,SAAAA,CAAAA;AAC3BtD,4DAAAA,QAAAA,EAAAA,eAAe,CAACsD,SAAAA;AALZA,yDAAAA,EAAAA,SAAAA,CAAAA;;;;AAYxBjD,wCAAAA,KAAAA,CAAMkD;;;;;;;;;;AAOnC;;;;"}
1
+ {"version":3,"file":"ConfigPanel.js","sources":["../../../shell/ConfigPanel.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 { Drawer } from 'primereact/drawer';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ColorScheme, MenuTheme, colorSchemes, menuThemes, useLayoutConfig } from '../configuration';\nimport { LayoutModeSwitcher } from './LayoutModeSwitcher';\nimport { ThemeSwitcher } from './ThemeSwitcher';\nimport { readBoolean, readString } from './elementProperties';\n\n/** What each color scheme is called in the configurator. */\nconst colorSchemeLabels: Record<ColorScheme, string> = {\n [ColorScheme.Light]: 'Light',\n [ColorScheme.Dark]: 'Dark',\n};\n\n/** What each menu theme is called in the configurator. */\nconst menuThemeLabels: Record<MenuTheme, string> = {\n [MenuTheme.Light]: 'Light',\n [MenuTheme.Dark]: 'Dark',\n [MenuTheme.Primary]: 'Primary',\n};\n\n/**\n * The floating configurator.\n *\n * The axes are the ones the modern PrimeTek templates expose - color scheme, menu mode, menu theme and\n * theme - because those are the four choices that actually change how an application feels, and a\n * configurator with more knobs than that becomes a settings screen nobody finishes reading.\n *\n * The panel is `primereact/drawer`, which is the slide-in overlay this component has always wanted.\n * PrimeReact 11 gave the name `Sidebar` to something else entirely - a new app-shell primitive with\n * `SidebarLayout`/`SidebarAside`/`SidebarPanel` parts - so the v10 `Sidebar` import this file used to\n * carry would still resolve after the upgrade and would silently render an app shell inside the shell.\n * That is the one rename in the whole library that fails quietly rather than loudly, which is why it is\n * called out here: this is `Drawer`, deliberately, and it is not the {@link Sidebar} next door either -\n * that one is this package's own component for the docked panel's chrome.\n *\n * Open state is the drawer's own. `Drawer.Trigger` renders in place through `Drawer.Root`'s fragment, so\n * the floating cog sits exactly where it did while getting `aria-expanded`/`aria-controls` from the\n * component rather than from hand-written props that can drift out of step with the panel.\n */\nexport function ConfigPanel({ element, slots }: RegisteredComponentProps) {\n const { config, setColorScheme, setMenuTheme } = useLayoutConfig();\n const title = readString(element, 'title', 'Settings');\n const showsMenuTheme = readBoolean(element, 'showMenuTheme', true);\n const showsMode = readBoolean(element, 'showLayoutMode', true);\n\n return (\n <Drawer.Root position='right'>\n <Drawer.Trigger as={Button} rounded iconOnly className='layout-config-button' aria-label={title} data-scene-id={element.id}>\n <i className='pi pi-cog' aria-hidden='true' />\n </Drawer.Trigger>\n <Drawer.Portal>\n <Drawer.Backdrop />\n <Drawer.Popup>\n <Drawer.Header>\n <Drawer.Title>{title}</Drawer.Title>\n <Drawer.Close aria-label={`Close ${title}`}>\n <i className='pi pi-times' aria-hidden='true' />\n </Drawer.Close>\n </Drawer.Header>\n <Drawer.Content>\n <div className='layout-config-panel'>\n <div>\n <h3 className='layout-config-section-title'>Color scheme</h3>\n <div className='layout-config-options' role='group' aria-label='Color scheme'>\n {colorSchemes.map(scheme => (\n <button\n key={scheme}\n type='button'\n className='layout-config-option'\n aria-pressed={config.colorScheme === scheme}\n onClick={() => setColorScheme(scheme)}>\n {colorSchemeLabels[scheme]}\n </button>\n ))}\n </div>\n </div>\n\n <ThemeSwitcher\n element={{ ...element, id: `${element.id}-theme`, properties: { ...element.properties, label: 'Theme' } }}\n slots={{}}\n />\n\n {showsMode && (\n <LayoutModeSwitcher element={{ ...element, id: `${element.id}-mode`, properties: { label: 'Menu mode' } }} slots={{}} />\n )}\n\n {showsMenuTheme && (\n <div>\n <h3 className='layout-config-section-title'>Menu theme</h3>\n <div className='layout-config-options' role='group' aria-label='Menu theme'>\n {menuThemes.map(menuTheme => (\n <button\n key={menuTheme}\n type='button'\n className='layout-config-option'\n aria-pressed={config.menuTheme === menuTheme}\n onClick={() => setMenuTheme(menuTheme)}>\n {menuThemeLabels[menuTheme]}\n </button>\n ))}\n </div>\n </div>\n )}\n\n {slots.content}\n </div>\n </Drawer.Content>\n </Drawer.Popup>\n </Drawer.Portal>\n </Drawer.Root>\n );\n}\n"],"names":["colorSchemeLabels","ColorScheme","Light","Dark","menuThemeLabels","MenuTheme","Primary","ConfigPanel","element","slots","config","setColorScheme","setMenuTheme","useLayoutConfig","title","readString","showsMenuTheme","readBoolean","showsMode","_jsxs","Drawer","Root","position","_jsx","Trigger","as","Button","rounded","iconOnly","className","aria-label","data-scene-id","id","i","aria-hidden","Portal","Backdrop","Popup","Header","Title","Close","Content","div","h3","role","colorSchemes","map","scheme","button","type","aria-pressed","colorScheme","onClick","ThemeSwitcher","properties","label","LayoutModeSwitcher","menuThemes","menuTheme","content"],"mappings":";;;;;;;;;;AAWA,6DACA,MAAMA,iBAAAA,GAAiD;IACnD,CAACC,WAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,WAAAA,CAAYE,IAAI,GAAG;AACxB,CAAA;AAEA,2DACA,MAAMC,eAAAA,GAA6C;IAC/C,CAACC,SAAAA,CAAUH,KAAK,GAAG,OAAA;IACnB,CAACG,SAAAA,CAAUF,IAAI,GAAG,MAAA;IAClB,CAACE,SAAAA,CAAUC,OAAO,GAAG;AACzB,CAAA;AAEA;;;;;;;;;;;;;;;;;;AAkBC,IACM,SAASC,WAAAA,CAAY,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACpE,IAAA,MAAM,EAAEC,MAAM,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGC,eA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AY;oDAAEC,KAAAA,EAAO;AAAY;AAAE,6CAAA;AAAG9C,4CAAAA,KAAAA,EAAO;;AAGrHO,wCAAAA,cAAAA,kBACGG,IAAA,CAACuB,KAAAA,EAAAA;;8DACGnB,GAAA,CAACoB,IAAAA,EAAAA;oDAAGd,SAAAA,EAAU,6BAAA;AAA8B,oDAAA,QAAA,EAAA;;8DAC5CN,GAAA,CAACmB,KAAAA,EAAAA;oDAAIb,SAAAA,EAAU,uBAAA;oDAAwBe,IAAAA,EAAK,OAAA;oDAAQd,YAAAA,EAAW,YAAA;AAC1D2B,oDAAAA,QAAAA,EAAAA,UAAAA,CAAWX,GAAG,CAACY,CAAAA,SAAAA,iBACZnC,GAAA,CAACyB,QAAAA,EAAAA;4DAEGC,IAAAA,EAAK,QAAA;4DACLpB,SAAAA,EAAU,sBAAA;4DACVqB,cAAAA,EAAcxC,MAAAA,CAAOgD,SAAS,KAAKA,SAAAA;AACnCN,4DAAAA,OAAAA,EAAS,IAAMxC,YAAAA,CAAa8C,SAAAA,CAAAA;AAC3BtD,4DAAAA,QAAAA,EAAAA,eAAe,CAACsD,SAAAA;AALZA,yDAAAA,EAAAA,SAAAA,CAAAA;;;;AAYxBjD,wCAAAA,KAAAA,CAAMkD;;;;;;;;;;AAOnC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.js","sources":["../../../shell/Footer.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 { readString } from './elementProperties';\n\n/**\n * The strip below the content.\n *\n * Kept as its own slot rather than folded into the content because it is application chrome, not part of\n * a screen: the same footer is on every page, and a screen that had to render it would have to remember\n * to.\n */\nexport function Footer({ element, slots }: RegisteredComponentProps) {\n const text = readString(element, 'text');\n\n return (\n <>\n <span data-scene-id={element.id}>{text}</span>\n {slots.content}\n </>\n );\n}\n"],"names":["Footer","element","slots","text","readString","_jsxs","_Fragment","_jsx","span","data-scene-id","id","content"],"mappings":";;;AAAA;AACA;AAKA;;;;;;AAMC,IACM,SAASA,MAAAA,CAAO,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAC/D,MAAMC,IAAAA,GAAOC,WAAWH,OAAAA,EAAS,MAAA,CAAA;IAEjC,qBACII,IAAA,CAAAC,QAAA,EAAA;;0BACIC,GAAA,CAACC,MAAAA,EAAAA;AAAKC,gBAAAA,eAAAA,EAAeR,QAAQS,EAAE;AAAGP,gBAAAA,QAAAA,EAAAA;;AACjCD,YAAAA,KAAAA,CAAMS;;;AAGnB;;;;"}
1
+ {"version":3,"file":"Footer.js","sources":["../../../shell/Footer.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 { readString } from './elementProperties';\n\n/**\n * The strip below the content.\n *\n * Kept as its own slot rather than folded into the content because it is application chrome, not part of\n * a screen: the same footer is on every page, and a screen that had to render it would have to remember\n * to.\n */\nexport function Footer({ element, slots }: RegisteredComponentProps) {\n const text = readString(element, 'text');\n\n return (\n <>\n <span data-scene-id={element.id}>{text}</span>\n {slots.content}\n </>\n );\n}\n"],"names":["Footer","element","slots","text","readString","_jsxs","_Fragment","_jsx","span","data-scene-id","id","content"],"mappings":";;;AAAA;AACA;AAKA;;;;;;AAMC,IACM,SAASA,MAAAA,CAAO,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAC/D,MAAMC,IAAAA,GAAOC,WAAWH,OAAAA,EAAS,MAAA,CAAA;IAEjC,qBACII,IAAA,CAAAC,QAAA,EAAA;;0BACIC,GAAA,CAACC,MAAAA,EAAAA;AAAKC,gBAAAA,eAAAA,EAAeR,QAAQS,EAAE;AAAGP,gBAAAA,QAAAA,EAAAA;;AACjCD,YAAAA,KAAAA,CAAMS;;;AAGnB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FullPageShell.js","sources":["../../../shell/FullPageShell.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { LayoutConfigProvider, useOptionalLayoutConfig } from '../configuration';\nimport { SlotName } from '../layouts';\n\n/**\n * The chrome-less shell: content, an optional branding aside, and the configurator.\n *\n * Login, register, password reset, verification, lock, error, access-denied, not-found and landing screens\n * all render here rather than in a stripped-down application shell. That split is structural in every\n * PrimeTek template, and for a good reason: those screens have no navigation state to hold, no sidebar to\n * remember, and no breadcrumb to place, so hanging them off the application shell means every one of the\n * eight modes has to have an answer for a page that has no menu.\n *\n * The configurator stays, because a sign-in page still has to honor the chosen theme - it is very often\n * the first page anyone sees.\n */\nexport function FullPageShell({ element, slots }: RegisteredComponentProps) {\n const surface = <FullPageSurface elementId={element.id} slots={slots} />;\n return useOptionalLayoutConfig() ? surface : <LayoutConfigProvider>{surface}</LayoutConfigProvider>;\n}\n\ninterface FullPageSurfaceProps {\n elementId: string;\n slots: Record<string, ReactNode[]>;\n}\n\nfunction FullPageSurface({ elementId, slots }: FullPageSurfaceProps) {\n const hasAside = (slots[SlotName.Aside]?.length ?? 0) > 0;\n\n return (\n <div className='layout-full-page' data-scene-id={elementId}>\n {hasAside && <aside className='layout-full-page-aside'>{slots[SlotName.Aside]}</aside>}\n <main className='layout-full-page-content'>{slots[SlotName.Content]}</main>\n {slots[SlotName.ConfigPanel]}\n </div>\n );\n}\n"],"names":["FullPageShell","element","slots","surface","_jsx","FullPageSurface","elementId","id","useOptionalLayoutConfig","LayoutConfigProvider","hasAside","SlotName","Aside","length","_jsxs","div","className","data-scene-id","aside","main","Content","ConfigPanel"],"mappings":";;;;;;;;AAAA;AACA;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACtE,IAAA,MAAMC,wBAAUC,GAAA,CAACC,eAAAA,EAAAA;AAAgBC,QAAAA,SAAAA,EAAWL,QAAQM,EAAE;QAAEL,KAAAA,EAAOA;;IAC/D,OAAOM,uBAAAA,EAAAA,GAA4BL,wBAAUC,GAAA,CAACK,oBAAAA,EAAAA;AAAsBN,QAAAA,QAAAA,EAAAA;;AACxE;AAOA,SAASE,eAAAA,CAAgB,EAAEC,SAAS,EAAEJ,KAAK,EAAwB,EAAA;IAC/D,MAAMQ,QAAAA,GAAW,CAACR,KAAK,CAACS,QAAAA,CAASC,KAAK,CAAC,EAAEC,MAAAA,IAAU,CAAA,IAAK,CAAA;AAExD,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,kBAAA;QAAmBC,eAAAA,EAAeX,SAAAA;;AAC5CI,YAAAA,QAAAA,kBAAYN,GAAA,CAACc,OAAAA,EAAAA;gBAAMF,SAAAA,EAAU,wBAAA;0BAA0Bd,KAAK,CAACS,QAAAA,CAASC,KAAK;;0BAC5ER,GAAA,CAACe,MAAAA,EAAAA;gBAAKH,SAAAA,EAAU,0BAAA;0BAA4Bd,KAAK,CAACS,QAAAA,CAASS,OAAO;;YACjElB,KAAK,CAACS,QAAAA,CAASU,WAAW;;;AAGvC;;;;"}
1
+ {"version":3,"file":"FullPageShell.js","sources":["../../../shell/FullPageShell.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { LayoutConfigProvider, useOptionalLayoutConfig } from '../configuration';\nimport { SlotName } from '../layouts';\n\n/**\n * The chrome-less shell: content, an optional branding aside, and the configurator.\n *\n * Login, register, password reset, verification, lock, error, access-denied, not-found and landing screens\n * all render here rather than in a stripped-down application shell. That split is structural in every\n * PrimeTek template, and for a good reason: those screens have no navigation state to hold, no sidebar to\n * remember, and no breadcrumb to place, so hanging them off the application shell means every one of the\n * eight modes has to have an answer for a page that has no menu.\n *\n * The configurator stays, because a sign-in page still has to honor the chosen theme - it is very often\n * the first page anyone sees.\n */\nexport function FullPageShell({ element, slots }: RegisteredComponentProps) {\n const surface = <FullPageSurface elementId={element.id} slots={slots} />;\n return useOptionalLayoutConfig() ? surface : <LayoutConfigProvider>{surface}</LayoutConfigProvider>;\n}\n\ninterface FullPageSurfaceProps {\n elementId: string;\n slots: Record<string, ReactNode[]>;\n}\n\nfunction FullPageSurface({ elementId, slots }: FullPageSurfaceProps) {\n const hasAside = (slots[SlotName.Aside]?.length ?? 0) > 0;\n\n return (\n <div className='layout-full-page' data-scene-id={elementId}>\n {hasAside && <aside className='layout-full-page-aside'>{slots[SlotName.Aside]}</aside>}\n <main className='layout-full-page-content'>{slots[SlotName.Content]}</main>\n {slots[SlotName.ConfigPanel]}\n </div>\n );\n}\n"],"names":["FullPageShell","element","slots","surface","_jsx","FullPageSurface","elementId","id","useOptionalLayoutConfig","LayoutConfigProvider","hasAside","SlotName","Aside","length","_jsxs","div","className","data-scene-id","aside","main","Content","ConfigPanel"],"mappings":";;;;;;;;AAAA;AACA;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACtE,IAAA,MAAMC,wBAAUC,GAAA,CAACC,eAAAA,EAAAA;AAAgBC,QAAAA,SAAAA,EAAWL,QAAQM,EAAE;QAAEL,KAAAA,EAAOA;;IAC/D,OAAOM,uBAAAA,EAAAA,GAA4BL,wBAAUC,GAAA,CAACK,oBAAAA,EAAAA;AAAsBN,QAAAA,QAAAA,EAAAA;;AACxE;AAOA,SAASE,eAAAA,CAAgB,EAAEC,SAAS,EAAEJ,KAAK,EAAwB,EAAA;IAC/D,MAAMQ,QAAAA,GAAW,CAACR,KAAK,CAACS,QAAAA,CAASC,KAAK,CAAC,EAAEC,MAAAA,IAAU,CAAA,IAAK,CAAA;AAExD,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,kBAAA;QAAmBC,eAAAA,EAAeX,SAAAA;;AAC5CI,YAAAA,QAAAA,kBAAYN,GAAA,CAACc,OAAAA,EAAAA;gBAAMF,SAAAA,EAAU,wBAAA;0BAA0Bd,KAAK,CAACS,QAAAA,CAASC,KAAK;;0BAC5ER,GAAA,CAACe,MAAAA,EAAAA;gBAAKH,SAAAA,EAAU,0BAAA;0BAA4Bd,KAAK,CAACS,QAAAA,CAASS,OAAO;;YACjElB,KAAK,CAACS,QAAAA,CAASU,WAAW;;;AAGvC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutModeSwitcher.js","sources":["../../../shell/LayoutModeSwitcher.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 { LayoutMode, layoutModes, useLayoutConfig } from '../configuration';\nimport { readString } from './elementProperties';\n\n/** What each mode is called in the configurator - the same names the PrimeTek template line uses. */\nconst modeLabels: Record<LayoutMode, string> = {\n [LayoutMode.Static]: 'Static',\n [LayoutMode.Overlay]: 'Overlay',\n [LayoutMode.Slim]: 'Slim',\n [LayoutMode.SlimPlus]: 'Slim+',\n [LayoutMode.Compact]: 'Compact',\n [LayoutMode.Horizontal]: 'Horizontal',\n [LayoutMode.Reveal]: 'Reveal',\n [LayoutMode.Drawer]: 'Drawer',\n};\n\n/**\n * Switches between the layout modes.\n *\n * Below the mobile breakpoint every button is disabled and the panel says why, rather than the picker\n * disappearing. A control that vanishes reads as a bug; a disabled control with a sentence next to it\n * reads as a decision - and the choice is still recorded and still there when the window grows again.\n */\nexport function LayoutModeSwitcher({ element }: RegisteredComponentProps) {\n const { config, setMode } = useLayoutConfig();\n const label = readString(element, 'label', 'Menu mode');\n\n return (\n <div data-scene-id={element.id}>\n <h3 className='layout-config-section-title'>{label}</h3>\n <div className='layout-config-options' role='group' aria-label={label}>\n {layoutModes.map(mode => (\n <button\n key={mode}\n type='button'\n className='layout-config-option'\n disabled={config.isMobile}\n aria-pressed={config.mode === mode}\n onClick={() => setMode(mode)}>\n {modeLabels[mode]}\n </button>\n ))}\n </div>\n {config.isMobile && <p className='layout-config-note'>Below 991px every mode renders off-canvas, so the choice is kept but not applied.</p>}\n </div>\n );\n}\n"],"names":["modeLabels","LayoutMode","Static","Overlay","Slim","SlimPlus","Compact","Horizontal","Reveal","Drawer","LayoutModeSwitcher","element","config","setMode","useLayoutConfig","label","readString","_jsxs","div","data-scene-id","id","_jsx","h3","className","role","aria-label","layoutModes","map","mode","button","type","disabled","isMobile","aria-pressed","onClick","p"],"mappings":";;;;;AAAA;AACA;AAMA,sGACA,MAAMA,UAAAA,GAAyC;IAC3C,CAACC,UAAAA,CAAWC,MAAM,GAAG,QAAA;IACrB,CAACD,UAAAA,CAAWE,OAAO,GAAG,SAAA;IACtB,CAACF,UAAAA,CAAWG,IAAI,GAAG,MAAA;IACnB,CAACH,UAAAA,CAAWI,QAAQ,GAAG,OAAA;IACvB,CAACJ,UAAAA,CAAWK,OAAO,GAAG,SAAA;IACtB,CAACL,UAAAA,CAAWM,UAAU,GAAG,YAAA;IACzB,CAACN,UAAAA,CAAWO,MAAM,GAAG,QAAA;IACrB,CAACP,UAAAA,CAAWQ,MAAM,GAAG;AACzB,CAAA;AAEA;;;;;;AAMC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAM,EAAEC,MAAM,EAAEC,OAAO,EAAE,GAAGC,eAAAA,EAAAA;IAC5B,MAAMC,KAAAA,GAAQC,UAAAA,CAAWL,OAAAA,EAAS,OAAA,EAAS,WAAA,CAAA;AAE3C,IAAA,qBACIM,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;;0BAC1BC,GAAA,CAACC,IAAAA,EAAAA;gBAAGC,SAAAA,EAAU,6BAAA;AAA+BR,gBAAAA,QAAAA,EAAAA;;0BAC7CM,GAAA,CAACH,KAAAA,EAAAA;gBAAIK,SAAAA,EAAU,uBAAA;gBAAwBC,IAAAA,EAAK,OAAA;gBAAQC,YAAAA,EAAYV,KAAAA;AAC3DW,gBAAAA,QAAAA,EAAAA,WAAAA,CAAYC,GAAG,CAACC,CAAAA,IAAAA,iBACbP,GAAA,CAACQ,QAAAA,EAAAA;wBAEGC,IAAAA,EAAK,QAAA;wBACLP,SAAAA,EAAU,sBAAA;AACVQ,wBAAAA,QAAAA,EAAUnB,OAAOoB,QAAQ;wBACzBC,cAAAA,EAAcrB,MAAAA,CAAOgB,IAAI,KAAKA,IAAAA;AAC9BM,wBAAAA,OAAAA,EAAS,IAAMrB,OAAAA,CAAQe,IAAAA,CAAAA;AACtB5B,wBAAAA,QAAAA,EAAAA,UAAU,CAAC4B,IAAAA;AANPA,qBAAAA,EAAAA,IAAAA,CAAAA;;YAUhBhB,MAAAA,CAAOoB,QAAQ,kBAAIX,GAAA,CAACc,GAAAA,EAAAA;gBAAEZ,SAAAA,EAAU,oBAAA;AAAqB,gBAAA,QAAA,EAAA;;;;AAGlE;;;;"}
1
+ {"version":3,"file":"LayoutModeSwitcher.js","sources":["../../../shell/LayoutModeSwitcher.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 { LayoutMode, layoutModes, useLayoutConfig } from '../configuration';\nimport { readString } from './elementProperties';\n\n/** What each mode is called in the configurator - the same names the PrimeTek template line uses. */\nconst modeLabels: Record<LayoutMode, string> = {\n [LayoutMode.Static]: 'Static',\n [LayoutMode.Overlay]: 'Overlay',\n [LayoutMode.Slim]: 'Slim',\n [LayoutMode.SlimPlus]: 'Slim+',\n [LayoutMode.Compact]: 'Compact',\n [LayoutMode.Horizontal]: 'Horizontal',\n [LayoutMode.Reveal]: 'Reveal',\n [LayoutMode.Drawer]: 'Drawer',\n};\n\n/**\n * Switches between the layout modes.\n *\n * Below the mobile breakpoint every button is disabled and the panel says why, rather than the picker\n * disappearing. A control that vanishes reads as a bug; a disabled control with a sentence next to it\n * reads as a decision - and the choice is still recorded and still there when the window grows again.\n */\nexport function LayoutModeSwitcher({ element }: RegisteredComponentProps) {\n const { config, setMode } = useLayoutConfig();\n const label = readString(element, 'label', 'Menu mode');\n\n return (\n <div data-scene-id={element.id}>\n <h3 className='layout-config-section-title'>{label}</h3>\n <div className='layout-config-options' role='group' aria-label={label}>\n {layoutModes.map(mode => (\n <button\n key={mode}\n type='button'\n className='layout-config-option'\n disabled={config.isMobile}\n aria-pressed={config.mode === mode}\n onClick={() => setMode(mode)}>\n {modeLabels[mode]}\n </button>\n ))}\n </div>\n {config.isMobile && <p className='layout-config-note'>Below 991px every mode renders off-canvas, so the choice is kept but not applied.</p>}\n </div>\n );\n}\n"],"names":["modeLabels","LayoutMode","Static","Overlay","Slim","SlimPlus","Compact","Horizontal","Reveal","Drawer","LayoutModeSwitcher","element","config","setMode","useLayoutConfig","label","readString","_jsxs","div","data-scene-id","id","_jsx","h3","className","role","aria-label","layoutModes","map","mode","button","type","disabled","isMobile","aria-pressed","onClick","p"],"mappings":";;;;;AAAA;AACA;AAMA,sGACA,MAAMA,UAAAA,GAAyC;IAC3C,CAACC,UAAAA,CAAWC,MAAM,GAAG,QAAA;IACrB,CAACD,UAAAA,CAAWE,OAAO,GAAG,SAAA;IACtB,CAACF,UAAAA,CAAWG,IAAI,GAAG,MAAA;IACnB,CAACH,UAAAA,CAAWI,QAAQ,GAAG,OAAA;IACvB,CAACJ,UAAAA,CAAWK,OAAO,GAAG,SAAA;IACtB,CAACL,UAAAA,CAAWM,UAAU,GAAG,YAAA;IACzB,CAACN,UAAAA,CAAWO,MAAM,GAAG,QAAA;IACrB,CAACP,UAAAA,CAAWQ,MAAM,GAAG;AACzB,CAAA;AAEA;;;;;;AAMC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAM,EAAEC,MAAM,EAAEC,OAAO,EAAE,GAAGC,eAAAA,EAAAA;IAC5B,MAAMC,KAAAA,GAAQC,UAAAA,CAAWL,OAAAA,EAAS,OAAA,EAAS,WAAA,CAAA;AAE3C,IAAA,qBACIM,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;;0BAC1BC,GAAA,CAACC,IAAAA,EAAAA;gBAAGC,SAAAA,EAAU,6BAAA;AAA+BR,gBAAAA,QAAAA,EAAAA;;0BAC7CM,GAAA,CAACH,KAAAA,EAAAA;gBAAIK,SAAAA,EAAU,uBAAA;gBAAwBC,IAAAA,EAAK,OAAA;gBAAQC,YAAAA,EAAYV,KAAAA;AAC3DW,gBAAAA,QAAAA,EAAAA,WAAAA,CAAYC,GAAG,CAACC,CAAAA,IAAAA,iBACbP,GAAA,CAACQ,QAAAA,EAAAA;wBAEGC,IAAAA,EAAK,QAAA;wBACLP,SAAAA,EAAU,sBAAA;AACVQ,wBAAAA,QAAAA,EAAUnB,OAAOoB,QAAQ;wBACzBC,cAAAA,EAAcrB,MAAAA,CAAOgB,IAAI,KAAKA,IAAAA;AAC9BM,wBAAAA,OAAAA,EAAS,IAAMrB,OAAAA,CAAQe,IAAAA,CAAAA;AACtB5B,wBAAAA,QAAAA,EAAAA,UAAU,CAAC4B,IAAAA;AANPA,qBAAAA,EAAAA,IAAAA,CAAAA;;YAUhBhB,MAAAA,CAAOoB,QAAQ,kBAAIX,GAAA,CAACc,GAAAA,EAAAA;gBAAEZ,SAAAA,EAAU,oBAAA;AAAqB,gBAAA,QAAA,EAAA;;;;AAGlE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.js","sources":["../../../shell/Logo.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 { useSceneTheme } from '@cratis/scene.react';\nimport { readOptionalString, readString } from './elementProperties';\n\n/**\n * The brand mark.\n *\n * This is the one place in the shell that reads the active theme directly rather than through a token,\n * because picking between a light-background and a dark-background logo asset is a decision no CSS custom\n * property can express - the two are different files. `useSceneTheme` exists for exactly this case.\n */\nexport function Logo({ element }: RegisteredComponentProps) {\n const theme = useSceneTheme();\n const label = readString(element, 'label', 'Cratis');\n const initials = readString(element, 'initials', label.slice(0, 1).toUpperCase());\n const lightSource = readOptionalString(element, 'lightImageUrl');\n const darkSource = readOptionalString(element, 'darkImageUrl');\n const source = theme?.isDark ? darkSource ?? lightSource : lightSource ?? darkSource;\n const targetScreen = readString(element, 'targetScreen', 'Dashboard');\n\n return (\n <a className='layout-logo' href={`#/${targetScreen}`} data-scene-id={element.id}>\n {source ? <img src={source} alt={label} height={28} /> : <span className='layout-logo-mark'>{initials}</span>}\n <span>{label}</span>\n </a>\n );\n}\n"],"names":["Logo","element","theme","useSceneTheme","label","readString","initials","slice","toUpperCase","lightSource","readOptionalString","darkSource","source","isDark","targetScreen","_jsxs","a","className","href","data-scene-id","id","_jsx","img","src","alt","height","span"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;AAMC,IACM,SAASA,IAAAA,CAAK,EAAEC,OAAO,EAA4B,EAAA;AACtD,IAAA,MAAMC,KAAAA,GAAQC,aAAAA,EAAAA;IACd,MAAMC,KAAAA,GAAQC,UAAAA,CAAWJ,OAAAA,EAAS,OAAA,EAAS,QAAA,CAAA;IAC3C,MAAMK,QAAAA,GAAWD,WAAWJ,OAAAA,EAAS,UAAA,EAAYG,MAAMG,KAAK,CAAC,CAAA,EAAG,CAAA,CAAA,CAAGC,WAAW,EAAA,CAAA;IAC9E,MAAMC,WAAAA,GAAcC,mBAAmBT,OAAAA,EAAS,eAAA,CAAA;IAChD,MAAMU,UAAAA,GAAaD,mBAAmBT,OAAAA,EAAS,cAAA,CAAA;AAC/C,IAAA,MAAMW,MAAAA,GAASV,KAAAA,EAAOW,MAAAA,GAASF,UAAAA,IAAcF,cAAcA,WAAAA,IAAeE,UAAAA;IAC1E,MAAMG,YAAAA,GAAeT,UAAAA,CAAWJ,OAAAA,EAAS,cAAA,EAAgB,WAAA,CAAA;AAEzD,IAAA,qBACIc,IAAA,CAACC,GAAAA,EAAAA;QAAEC,SAAAA,EAAU,aAAA;QAAcC,IAAAA,EAAM,CAAC,EAAE,EAAEJ,YAAAA,CAAAA,CAAc;AAAEK,QAAAA,eAAAA,EAAelB,QAAQmB,EAAE;;AAC1ER,YAAAA,MAAAA,iBAASS,GAAA,CAACC,KAAAA,EAAAA;gBAAIC,GAAAA,EAAKX,MAAAA;gBAAQY,GAAAA,EAAKpB,KAAAA;gBAAOqB,MAAAA,EAAQ;+BAASJ,GAAA,CAACK,MAAAA,EAAAA;gBAAKT,SAAAA,EAAU,kBAAA;AAAoBX,gBAAAA,QAAAA,EAAAA;;0BAC7Fe,GAAA,CAACK,MAAAA,EAAAA;AAAMtB,gBAAAA,QAAAA,EAAAA;;;;AAGnB;;;;"}
1
+ {"version":3,"file":"Logo.js","sources":["../../../shell/Logo.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 { useSceneTheme } from '@cratis/scene.react';\nimport { readOptionalString, readString } from './elementProperties';\n\n/**\n * The brand mark.\n *\n * This is the one place in the shell that reads the active theme directly rather than through a token,\n * because picking between a light-background and a dark-background logo asset is a decision no CSS custom\n * property can express - the two are different files. `useSceneTheme` exists for exactly this case.\n */\nexport function Logo({ element }: RegisteredComponentProps) {\n const theme = useSceneTheme();\n const label = readString(element, 'label', 'Cratis');\n const initials = readString(element, 'initials', label.slice(0, 1).toUpperCase());\n const lightSource = readOptionalString(element, 'lightImageUrl');\n const darkSource = readOptionalString(element, 'darkImageUrl');\n const source = theme?.isDark ? darkSource ?? lightSource : lightSource ?? darkSource;\n const targetScreen = readString(element, 'targetScreen', 'Dashboard');\n\n return (\n <a className='layout-logo' href={`#/${targetScreen}`} data-scene-id={element.id}>\n {source ? <img src={source} alt={label} height={28} /> : <span className='layout-logo-mark'>{initials}</span>}\n <span>{label}</span>\n </a>\n );\n}\n"],"names":["Logo","element","theme","useSceneTheme","label","readString","initials","slice","toUpperCase","lightSource","readOptionalString","darkSource","source","isDark","targetScreen","_jsxs","a","className","href","data-scene-id","id","_jsx","img","src","alt","height","span"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;AAMC,IACM,SAASA,IAAAA,CAAK,EAAEC,OAAO,EAA4B,EAAA;AACtD,IAAA,MAAMC,KAAAA,GAAQC,aAAAA,EAAAA;IACd,MAAMC,KAAAA,GAAQC,UAAAA,CAAWJ,OAAAA,EAAS,OAAA,EAAS,QAAA,CAAA;IAC3C,MAAMK,QAAAA,GAAWD,WAAWJ,OAAAA,EAAS,UAAA,EAAYG,MAAMG,KAAK,CAAC,CAAA,EAAG,CAAA,CAAA,CAAGC,WAAW,EAAA,CAAA;IAC9E,MAAMC,WAAAA,GAAcC,mBAAmBT,OAAAA,EAAS,eAAA,CAAA;IAChD,MAAMU,UAAAA,GAAaD,mBAAmBT,OAAAA,EAAS,cAAA,CAAA;AAC/C,IAAA,MAAMW,MAAAA,GAASV,KAAAA,EAAOW,MAAAA,GAASF,UAAAA,IAAcF,cAAcA,WAAAA,IAAeE,UAAAA;IAC1E,MAAMG,YAAAA,GAAeT,UAAAA,CAAWJ,OAAAA,EAAS,cAAA,EAAgB,WAAA,CAAA;AAEzD,IAAA,qBACIc,IAAA,CAACC,GAAAA,EAAAA;QAAEC,SAAAA,EAAU,aAAA;QAAcC,IAAAA,EAAM,CAAC,EAAE,EAAEJ,YAAAA,CAAAA,CAAc;AAAEK,QAAAA,eAAAA,EAAelB,QAAQmB,EAAE;;AAC1ER,YAAAA,MAAAA,iBAASS,GAAA,CAACC,KAAAA,EAAAA;gBAAIC,GAAAA,EAAKX,MAAAA;gBAAQY,GAAAA,EAAKpB,KAAAA;gBAAOqB,MAAAA,EAAQ;+BAASJ,GAAA,CAACK,MAAAA,EAAAA;gBAAKT,SAAAA,EAAU,kBAAA;AAAoBX,gBAAAA,QAAAA,EAAAA;;0BAC7Fe,GAAA,CAACK,MAAAA,EAAAA;AAAMtB,gBAAAA,QAAAA,EAAAA;;;;AAGnB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Mask.js","sources":["../../../shell/Mask.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 { useLayoutConfig } from '../configuration';\n\n/**\n * The scrim behind a floating sidebar.\n *\n * It is a `button` rather than a `div` because its only job is to close the sidebar, and a click target\n * that is not focusable or reachable from the keyboard traps anyone not using a mouse behind an open\n * overlay with no way out. It renders nothing at all when no sidebar is floating, so it never sits\n * invisibly over the page swallowing clicks.\n */\nexport function LayoutMask() {\n const { isMaskVisible, setSidebarOpen } = useLayoutConfig();\n if (!isMaskVisible) {\n return undefined;\n }\n\n return <button type='button' className='layout-mask' aria-label='Close the menu' onClick={() => setSidebarOpen(false)} />;\n}\n\n/**\n * The `mask` component, for a template that wants to place the scrim itself rather than let\n * {@link AppShell} do it.\n */\nexport function Mask() {\n return <LayoutMask />;\n}\n"],"names":["LayoutMask","isMaskVisible","setSidebarOpen","useLayoutConfig","undefined","_jsx","button","type","className","aria-label","onClick","Mask"],"mappings":";;;AAKA;;;;;;;AAOC,IACM,SAASA,UAAAA,GAAAA;AACZ,IAAA,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAE,GAAGC,eAAAA,EAAAA;AAC1C,IAAA,IAAI,CAACF,aAAAA,EAAe;QAChB,OAAOG,SAAAA;AACX,IAAA;AAEA,IAAA,qBAAOC,GAAA,CAACC,QAAAA,EAAAA;QAAOC,IAAAA,EAAK,QAAA;QAASC,SAAAA,EAAU,aAAA;QAAcC,YAAAA,EAAW,gBAAA;AAAiBC,QAAAA,OAAAA,EAAS,IAAMR,cAAAA,CAAe,KAAA;;AACnH;AAEA;;;AAGC,IACM,SAASS,IAAAA,GAAAA;AACZ,IAAA,qBAAON,GAAA,CAACL,UAAAA,EAAAA,EAAAA,CAAAA;AACZ;;;;"}
1
+ {"version":3,"file":"Mask.js","sources":["../../../shell/Mask.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 { useLayoutConfig } from '../configuration';\n\n/**\n * The scrim behind a floating sidebar.\n *\n * It is a `button` rather than a `div` because its only job is to close the sidebar, and a click target\n * that is not focusable or reachable from the keyboard traps anyone not using a mouse behind an open\n * overlay with no way out. It renders nothing at all when no sidebar is floating, so it never sits\n * invisibly over the page swallowing clicks.\n */\nexport function LayoutMask() {\n const { isMaskVisible, setSidebarOpen } = useLayoutConfig();\n if (!isMaskVisible) {\n return undefined;\n }\n\n return <button type='button' className='layout-mask' aria-label='Close the menu' onClick={() => setSidebarOpen(false)} />;\n}\n\n/**\n * The `mask` component, for a template that wants to place the scrim itself rather than let\n * {@link AppShell} do it.\n */\nexport function Mask() {\n return <LayoutMask />;\n}\n"],"names":["LayoutMask","isMaskVisible","setSidebarOpen","useLayoutConfig","undefined","_jsx","button","type","className","aria-label","onClick","Mask"],"mappings":";;;AAKA;;;;;;;AAOC,IACM,SAASA,UAAAA,GAAAA;AACZ,IAAA,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAE,GAAGC,eAAAA,EAAAA;AAC1C,IAAA,IAAI,CAACF,aAAAA,EAAe;QAChB,OAAOG,SAAAA;AACX,IAAA;AAEA,IAAA,qBAAOC,GAAA,CAACC,QAAAA,EAAAA;QAAOC,IAAAA,EAAK,QAAA;QAASC,SAAAA,EAAU,aAAA;QAAcC,YAAAA,EAAW,gBAAA;AAAiBC,QAAAA,OAAAA,EAAS,IAAMR,cAAAA,CAAe,KAAA;;AACnH;AAEA;;;AAGC,IACM,SAASS,IAAAA,GAAAA;AACZ,IAAA,qBAAON,GAAA,CAACL,UAAAA,EAAAA,EAAAA,CAAAA;AACZ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.js","sources":["../../../shell/Menu.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 { readString } from './elementProperties';\n\n/**\n * A navigation list.\n *\n * One markup shape - a `nav` around a `ul` of {@link MenuItem}s - serves every mode; the difference\n * between a docked list, a circular icon rail, a stacked label rail and a horizontal strip with drop-down\n * submenus is entirely in the stylesheet. That is the point of the mode class vocabulary: the menu does\n * not know which mode it is in, so a screen's navigation cannot be written for one mode and broken in\n * another.\n */\nexport function Menu({ element, slots }: RegisteredComponentProps) {\n const title = readString(element, 'title');\n const label = readString(element, 'label', 'Main');\n\n return (\n <nav data-scene-id={element.id} aria-label={label}>\n {title && <div className='layout-menu-section-title'>{title}</div>}\n <ul className='layout-menu'>{slots.items}</ul>\n </nav>\n );\n}\n"],"names":["Menu","element","slots","title","readString","label","_jsxs","nav","data-scene-id","id","aria-label","_jsx","div","className","ul","items"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;;AAQC,IACM,SAASA,IAAAA,CAAK,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAC7D,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;IAClC,MAAMI,KAAAA,GAAQD,UAAAA,CAAWH,OAAAA,EAAS,OAAA,EAAS,MAAA,CAAA;AAE3C,IAAA,qBACIK,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QAAEC,YAAAA,EAAYL,KAAAA;;AACvCF,YAAAA,KAAAA,kBAASQ,GAAA,CAACC,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,2BAAA;AAA6BV,gBAAAA,QAAAA,EAAAA;;0BACtDQ,GAAA,CAACG,IAAAA,EAAAA;gBAAGD,SAAAA,EAAU,aAAA;AAAeX,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMa;;;;AAG/C;;;;"}
1
+ {"version":3,"file":"Menu.js","sources":["../../../shell/Menu.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 { readString } from './elementProperties';\n\n/**\n * A navigation list.\n *\n * One markup shape - a `nav` around a `ul` of {@link MenuItem}s - serves every mode; the difference\n * between a docked list, a circular icon rail, a stacked label rail and a horizontal strip with drop-down\n * submenus is entirely in the stylesheet. That is the point of the mode class vocabulary: the menu does\n * not know which mode it is in, so a screen's navigation cannot be written for one mode and broken in\n * another.\n */\nexport function Menu({ element, slots }: RegisteredComponentProps) {\n const title = readString(element, 'title');\n const label = readString(element, 'label', 'Main');\n\n return (\n <nav data-scene-id={element.id} aria-label={label}>\n {title && <div className='layout-menu-section-title'>{title}</div>}\n <ul className='layout-menu'>{slots.items}</ul>\n </nav>\n );\n}\n"],"names":["Menu","element","slots","title","readString","label","_jsxs","nav","data-scene-id","id","aria-label","_jsx","div","className","ul","items"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;;AAQC,IACM,SAASA,IAAAA,CAAK,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAC7D,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;IAClC,MAAMI,KAAAA,GAAQD,UAAAA,CAAWH,OAAAA,EAAS,OAAA,EAAS,MAAA,CAAA;AAE3C,IAAA,qBACIK,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QAAEC,YAAAA,EAAYL,KAAAA;;AACvCF,YAAAA,KAAAA,kBAASQ,GAAA,CAACC,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,2BAAA;AAA6BV,gBAAAA,QAAAA,EAAAA;;0BACtDQ,GAAA,CAACG,IAAAA,EAAAA;gBAAGD,SAAAA,EAAU,aAAA;AAAeX,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMa;;;;AAG/C;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.js","sources":["../../../shell/MenuItem.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 { readBoolean, readOptionalString, readString } from './elementProperties';\n\n/**\n * One entry in a navigation list, optionally with a submenu.\n *\n * Its properties are deliberately the {@link NavigationItem} contract - `label`, `targetScreen`,\n * `routeParameterBindings`, `order`, `group` - so the very same element can be handed to the\n * `Navigation` contribution point and read back by `extractNavigationItem`. A screen therefore declares\n * its navigation once and gets both the sidebar entry and the aggregated navigation for free, instead of\n * maintaining a menu and a contribution that drift apart.\n *\n * The route is rendered as a hash route against the target screen's name. A host with a real router\n * renders the shell inside it and rewrites these; hashes keep the gallery navigable with no router at all,\n * which is what a preview needs.\n */\nexport function MenuItem({ element, slots }: RegisteredComponentProps) {\n const label = readString(element, 'label');\n const icon = readOptionalString(element, 'icon');\n const badge = readOptionalString(element, 'badge');\n const targetScreen = readOptionalString(element, 'targetScreen');\n const isActive = readBoolean(element, 'isActive');\n const hasSubmenu = (slots.items?.length ?? 0) > 0;\n\n return (\n <li className='layout-menu-item' data-scene-id={element.id} data-active={isActive} data-target-screen={targetScreen}>\n <a className='layout-menu-link' href={targetScreen ? `#/${targetScreen}` : undefined} aria-current={isActive ? 'page' : undefined}>\n {icon && <i className={`layout-menu-icon ${icon}`} aria-hidden='true' />}\n <span className='layout-menu-label'>{label}</span>\n {badge && <span className='layout-menu-badge'>{badge}</span>}\n {hasSubmenu && <i className='pi pi-angle-down' aria-hidden='true' />}\n </a>\n {hasSubmenu && <ul className='layout-submenu'>{slots.items}</ul>}\n </li>\n );\n}\n"],"names":["MenuItem","element","slots","label","readString","icon","readOptionalString","badge","targetScreen","isActive","readBoolean","hasSubmenu","items","length","_jsxs","li","className","data-scene-id","id","data-active","data-target-screen","a","href","undefined","aria-current","_jsx","i","aria-hidden","span","ul"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;;;;;;AAYC,IACM,SAASA,QAAAA,CAAS,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACjE,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;IAClC,MAAMI,IAAAA,GAAOC,mBAAmBL,OAAAA,EAAS,MAAA,CAAA;IACzC,MAAMM,KAAAA,GAAQD,mBAAmBL,OAAAA,EAAS,OAAA,CAAA;IAC1C,MAAMO,YAAAA,GAAeF,mBAAmBL,OAAAA,EAAS,cAAA,CAAA;IACjD,MAAMQ,QAAAA,GAAWC,YAAYT,OAAAA,EAAS,UAAA,CAAA;IACtC,MAAMU,UAAAA,GAAa,CAACT,KAAAA,CAAMU,KAAK,EAAEC,MAAAA,IAAU,CAAA,IAAK,CAAA;AAEhD,IAAA,qBACIC,IAAA,CAACC,IAAAA,EAAAA;QAAGC,SAAAA,EAAU,kBAAA;AAAmBC,QAAAA,eAAAA,EAAehB,QAAQiB,EAAE;QAAEC,aAAAA,EAAaV,QAAAA;QAAUW,oBAAAA,EAAoBZ,YAAAA;;0BACnGM,IAAA,CAACO,GAAAA,EAAAA;gBAAEL,SAAAA,EAAU,kBAAA;AAAmBM,gBAAAA,IAAAA,EAAMd,YAAAA,GAAe,CAAC,EAAE,EAAEA,cAAc,GAAGe,SAAAA;AAAWC,gBAAAA,cAAAA,EAAcf,WAAW,MAAA,GAASc,SAAAA;;AACnHlB,oBAAAA,IAAAA,kBAAQoB,GAAA,CAACC,GAAAA,EAAAA;wBAAEV,SAAAA,EAAW,CAAC,iBAAiB,EAAEX,IAAAA,CAAAA,CAAM;wBAAEsB,aAAAA,EAAY;;kCAC/DF,GAAA,CAACG,MAAAA,EAAAA;wBAAKZ,SAAAA,EAAU,mBAAA;AAAqBb,wBAAAA,QAAAA,EAAAA;;AACpCI,oBAAAA,KAAAA,kBAASkB,GAAA,CAACG,MAAAA,EAAAA;wBAAKZ,SAAAA,EAAU,mBAAA;AAAqBT,wBAAAA,QAAAA,EAAAA;;AAC9CI,oBAAAA,UAAAA,kBAAcc,GAAA,CAACC,GAAAA,EAAAA;wBAAEV,SAAAA,EAAU,kBAAA;wBAAmBW,aAAAA,EAAY;;;;AAE9DhB,YAAAA,UAAAA,kBAAcc,GAAA,CAACI,IAAAA,EAAAA;gBAAGb,SAAAA,EAAU,gBAAA;AAAkBd,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMU;;;;AAGjE;;;;"}
1
+ {"version":3,"file":"MenuItem.js","sources":["../../../shell/MenuItem.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 { readBoolean, readOptionalString, readString } from './elementProperties';\n\n/**\n * One entry in a navigation list, optionally with a submenu.\n *\n * Its properties are deliberately the {@link NavigationItem} contract - `label`, `targetScreen`,\n * `routeParameterBindings`, `order`, `group` - so the very same element can be handed to the\n * `Navigation` contribution point and read back by `extractNavigationItem`. A screen therefore declares\n * its navigation once and gets both the sidebar entry and the aggregated navigation for free, instead of\n * maintaining a menu and a contribution that drift apart.\n *\n * The route is rendered as a hash route against the target screen's name. A host with a real router\n * renders the shell inside it and rewrites these; hashes keep the gallery navigable with no router at all,\n * which is what a preview needs.\n */\nexport function MenuItem({ element, slots }: RegisteredComponentProps) {\n const label = readString(element, 'label');\n const icon = readOptionalString(element, 'icon');\n const badge = readOptionalString(element, 'badge');\n const targetScreen = readOptionalString(element, 'targetScreen');\n const isActive = readBoolean(element, 'isActive');\n const hasSubmenu = (slots.items?.length ?? 0) > 0;\n\n return (\n <li className='layout-menu-item' data-scene-id={element.id} data-active={isActive} data-target-screen={targetScreen}>\n <a className='layout-menu-link' href={targetScreen ? `#/${targetScreen}` : undefined} aria-current={isActive ? 'page' : undefined}>\n {icon && <i className={`layout-menu-icon ${icon}`} aria-hidden='true' />}\n <span className='layout-menu-label'>{label}</span>\n {badge && <span className='layout-menu-badge'>{badge}</span>}\n {hasSubmenu && <i className='pi pi-angle-down' aria-hidden='true' />}\n </a>\n {hasSubmenu && <ul className='layout-submenu'>{slots.items}</ul>}\n </li>\n );\n}\n"],"names":["MenuItem","element","slots","label","readString","icon","readOptionalString","badge","targetScreen","isActive","readBoolean","hasSubmenu","items","length","_jsxs","li","className","data-scene-id","id","data-active","data-target-screen","a","href","undefined","aria-current","_jsx","i","aria-hidden","span","ul"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;;;;;;AAYC,IACM,SAASA,QAAAA,CAAS,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACjE,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;IAClC,MAAMI,IAAAA,GAAOC,mBAAmBL,OAAAA,EAAS,MAAA,CAAA;IACzC,MAAMM,KAAAA,GAAQD,mBAAmBL,OAAAA,EAAS,OAAA,CAAA;IAC1C,MAAMO,YAAAA,GAAeF,mBAAmBL,OAAAA,EAAS,cAAA,CAAA;IACjD,MAAMQ,QAAAA,GAAWC,YAAYT,OAAAA,EAAS,UAAA,CAAA;IACtC,MAAMU,UAAAA,GAAa,CAACT,KAAAA,CAAMU,KAAK,EAAEC,MAAAA,IAAU,CAAA,IAAK,CAAA;AAEhD,IAAA,qBACIC,IAAA,CAACC,IAAAA,EAAAA;QAAGC,SAAAA,EAAU,kBAAA;AAAmBC,QAAAA,eAAAA,EAAehB,QAAQiB,EAAE;QAAEC,aAAAA,EAAaV,QAAAA;QAAUW,oBAAAA,EAAoBZ,YAAAA;;0BACnGM,IAAA,CAACO,GAAAA,EAAAA;gBAAEL,SAAAA,EAAU,kBAAA;AAAmBM,gBAAAA,IAAAA,EAAMd,YAAAA,GAAe,CAAC,EAAE,EAAEA,cAAc,GAAGe,SAAAA;AAAWC,gBAAAA,cAAAA,EAAcf,WAAW,MAAA,GAASc,SAAAA;;AACnHlB,oBAAAA,IAAAA,kBAAQoB,GAAA,CAACC,GAAAA,EAAAA;wBAAEV,SAAAA,EAAW,CAAC,iBAAiB,EAAEX,IAAAA,CAAAA,CAAM;wBAAEsB,aAAAA,EAAY;;kCAC/DF,GAAA,CAACG,MAAAA,EAAAA;wBAAKZ,SAAAA,EAAU,mBAAA;AAAqBb,wBAAAA,QAAAA,EAAAA;;AACpCI,oBAAAA,KAAAA,kBAASkB,GAAA,CAACG,MAAAA,EAAAA;wBAAKZ,SAAAA,EAAU,mBAAA;AAAqBT,wBAAAA,QAAAA,EAAAA;;AAC9CI,oBAAAA,UAAAA,kBAAcc,GAAA,CAACC,GAAAA,EAAAA;wBAAEV,SAAAA,EAAU,kBAAA;wBAAmBW,aAAAA,EAAY;;;;AAE9DhB,YAAAA,UAAAA,kBAAcc,GAAA,CAACI,IAAAA,EAAAA;gBAAGb,SAAAA,EAAU,gBAAA;AAAkBd,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMU;;;;AAGjE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeader.js","sources":["../../../shell/PageHeader.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 { readString } from './elementProperties';\n\n/**\n * A screen's title, subtitle and actions.\n *\n * This belongs to the layout package rather than to each screen because it is the one piece of page\n * furniture every page template repeats. Centralizing it means the title/actions relationship is spaced\n * and aligned identically across the whole page set, which is most of what makes a template set look like\n * one product rather than twenty pages.\n */\nexport function PageHeader({ element, slots }: RegisteredComponentProps) {\n const title = readString(element, 'title');\n const subtitle = readString(element, 'subtitle');\n\n return (\n <div className='layout-page-header' data-scene-id={element.id}>\n <div>\n <h1 className='layout-page-header-title'>{title}</h1>\n {subtitle && <p className='layout-page-header-subtitle'>{subtitle}</p>}\n </div>\n {(slots.actions?.length ?? 0) > 0 && <div className='layout-page-header-actions'>{slots.actions}</div>}\n </div>\n );\n}\n"],"names":["PageHeader","element","slots","title","readString","subtitle","_jsxs","div","className","data-scene-id","id","_jsx","h1","p","actions","length"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;AAOC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACnE,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;IAClC,MAAMI,QAAAA,GAAWD,WAAWH,OAAAA,EAAS,UAAA,CAAA;AAErC,IAAA,qBACIK,IAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,oBAAA;AAAqBC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;;0BACzDJ,IAAA,CAACC,KAAAA,EAAAA;;kCACGI,GAAA,CAACC,IAAAA,EAAAA;wBAAGJ,SAAAA,EAAU,0BAAA;AAA4BL,wBAAAA,QAAAA,EAAAA;;AACzCE,oBAAAA,QAAAA,kBAAYM,GAAA,CAACE,GAAAA,EAAAA;wBAAEL,SAAAA,EAAU,6BAAA;AAA+BH,wBAAAA,QAAAA,EAAAA;;;;AAE3DH,YAAAA,CAAAA,MAAMY,OAAO,EAAEC,UAAU,CAAA,IAAK,mBAAKJ,GAAA,CAACJ,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,4BAAA;AAA8BN,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMY;;;;AAGpG;;;;"}
1
+ {"version":3,"file":"PageHeader.js","sources":["../../../shell/PageHeader.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 { readString } from './elementProperties';\n\n/**\n * A screen's title, subtitle and actions.\n *\n * This belongs to the layout package rather than to each screen because it is the one piece of page\n * furniture every page template repeats. Centralizing it means the title/actions relationship is spaced\n * and aligned identically across the whole page set, which is most of what makes a template set look like\n * one product rather than twenty pages.\n */\nexport function PageHeader({ element, slots }: RegisteredComponentProps) {\n const title = readString(element, 'title');\n const subtitle = readString(element, 'subtitle');\n\n return (\n <div className='layout-page-header' data-scene-id={element.id}>\n <div>\n <h1 className='layout-page-header-title'>{title}</h1>\n {subtitle && <p className='layout-page-header-subtitle'>{subtitle}</p>}\n </div>\n {(slots.actions?.length ?? 0) > 0 && <div className='layout-page-header-actions'>{slots.actions}</div>}\n </div>\n );\n}\n"],"names":["PageHeader","element","slots","title","readString","subtitle","_jsxs","div","className","data-scene-id","id","_jsx","h1","p","actions","length"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;AAOC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACnE,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;IAClC,MAAMI,QAAAA,GAAWD,WAAWH,OAAAA,EAAS,UAAA,CAAA;AAErC,IAAA,qBACIK,IAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,oBAAA;AAAqBC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;;0BACzDJ,IAAA,CAACC,KAAAA,EAAAA;;kCACGI,GAAA,CAACC,IAAAA,EAAAA;wBAAGJ,SAAAA,EAAU,0BAAA;AAA4BL,wBAAAA,QAAAA,EAAAA;;AACzCE,oBAAAA,QAAAA,kBAAYM,GAAA,CAACE,GAAAA,EAAAA;wBAAEL,SAAAA,EAAU,6BAAA;AAA+BH,wBAAAA,QAAAA,EAAAA;;;;AAE3DH,YAAAA,CAAAA,MAAMY,OAAO,EAAEC,UAAU,CAAA,IAAK,mBAAKJ,GAAA,CAACJ,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,4BAAA;AAA8BN,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMY;;;;AAGpG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"RightPanel.js","sources":["../../../shell/RightPanel.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 { readString } from './elementProperties';\n\n/**\n * The inspector panel down the right-hand edge.\n *\n * Sakai has no right panel; the premium PrimeTek templates all do, and it is where activity feeds, recent\n * items and inline help live. It is exposed as a slot the shell simply does not render when nothing fills\n * it, so a screen pays nothing for a region it does not use.\n */\nexport function RightPanel({ element, slots }: RegisteredComponentProps) {\n const title = readString(element, 'title');\n\n return (\n <section data-scene-id={element.id} aria-label={title || 'Panel'}>\n {title && <h2 className='layout-page-header-title'>{title}</h2>}\n {slots.content}\n </section>\n );\n}\n"],"names":["RightPanel","element","slots","title","readString","_jsxs","section","data-scene-id","id","aria-label","_jsx","h2","className","content"],"mappings":";;;AAAA;AACA;AAKA;;;;;;AAMC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACnE,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;AAElC,IAAA,qBACII,IAAA,CAACC,SAAAA,EAAAA;AAAQC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;AAAEC,QAAAA,YAAAA,EAAYN,KAAAA,IAAS,OAAA;;AACpDA,YAAAA,KAAAA,kBAASO,GAAA,CAACC,IAAAA,EAAAA;gBAAGC,SAAAA,EAAU,0BAAA;AAA4BT,gBAAAA,QAAAA,EAAAA;;AACnDD,YAAAA,KAAAA,CAAMW;;;AAGnB;;;;"}
1
+ {"version":3,"file":"RightPanel.js","sources":["../../../shell/RightPanel.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 { readString } from './elementProperties';\n\n/**\n * The inspector panel down the right-hand edge.\n *\n * Sakai has no right panel; the premium PrimeTek templates all do, and it is where activity feeds, recent\n * items and inline help live. It is exposed as a slot the shell simply does not render when nothing fills\n * it, so a screen pays nothing for a region it does not use.\n */\nexport function RightPanel({ element, slots }: RegisteredComponentProps) {\n const title = readString(element, 'title');\n\n return (\n <section data-scene-id={element.id} aria-label={title || 'Panel'}>\n {title && <h2 className='layout-page-header-title'>{title}</h2>}\n {slots.content}\n </section>\n );\n}\n"],"names":["RightPanel","element","slots","title","readString","_jsxs","section","data-scene-id","id","aria-label","_jsx","h2","className","content"],"mappings":";;;AAAA;AACA;AAKA;;;;;;AAMC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACnE,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;AAElC,IAAA,qBACII,IAAA,CAACC,SAAAA,EAAAA;AAAQC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;AAAEC,QAAAA,YAAAA,EAAYN,KAAAA,IAAS,OAAA;;AACpDA,YAAAA,KAAAA,kBAASO,GAAA,CAACC,IAAAA,EAAAA;gBAAGC,SAAAA,EAAU,0BAAA;AAA4BT,gBAAAA,QAAAA,EAAAA;;AACnDD,YAAAA,KAAAA,CAAMW;;;AAGnB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","sources":["../../../shell/Sidebar.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 { isPointerRevealMode, useLayoutConfig } from '../configuration';\nimport { readString } from './elementProperties';\n\n/**\n * The sidebar's own chrome, inside the panel {@link AppShell} positions.\n *\n * The panel and its contents are deliberately different components. Everything about *where* the sidebar\n * is - translated off-canvas, collapsed to a rail, growing on hover - belongs to the mode and therefore to\n * the shell; everything about *what is in it* belongs to the screen. A template can replace this header\n * wholesale without any of the mode CSS noticing.\n *\n * The pin button only appears in `reveal` and `drawer`, the two modes where the sidebar answers to the\n * pointer and therefore needs a way to be made to stay.\n */\nexport function Sidebar({ element, slots }: RegisteredComponentProps) {\n const { effectiveMode, config, toggleSidebarAnchor } = useLayoutConfig();\n const title = readString(element, 'title');\n const isPinnable = isPointerRevealMode(effectiveMode);\n\n return (\n <>\n <div className='layout-sidebar-header' data-scene-id={element.id}>\n {slots.logo}\n {title && <span className='layout-sidebar-title'>{title}</span>}\n {isPinnable && (\n <Button\n type='button'\n variant='text'\n rounded\n iconOnly\n aria-label={config.isSidebarAnchored ? 'Unpin the menu' : 'Pin the menu open'}\n aria-pressed={config.isSidebarAnchored}\n onClick={toggleSidebarAnchor}>\n <i className={config.isSidebarAnchored ? 'pi pi-lock' : 'pi pi-lock-open'} aria-hidden='true' />\n </Button>\n )}\n </div>\n {slots.content}\n </>\n );\n}\n"],"names":["Sidebar","element","slots","effectiveMode","config","toggleSidebarAnchor","useLayoutConfig","title","readString","isPinnable","isPointerRevealMode","_jsxs","_Fragment","div","className","data-scene-id","id","logo","_jsx","span","Button","type","variant","rounded","iconOnly","aria-label","isSidebarAnchored","aria-pressed","onClick","i","aria-hidden","content"],"mappings":";;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,OAAAA,CAAQ,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAChE,IAAA,MAAM,EAAEC,aAAa,EAAEC,MAAM,EAAEC,mBAAmB,EAAE,GAAGC,eAAAA,EAAAA;IACvD,MAAMC,KAAAA,GAAQC,WAAWP,OAAAA,EAAS,OAAA,CAAA;AAClC,IAAA,MAAMQ,aAAaC,mBAAAA,CAAoBP,aAAAA,CAAAA;IAEvC,qBACIQ,IAAA,CAAAC,QAAA,EAAA;;0BACID,IAAA,CAACE,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,uBAAA;AAAwBC,gBAAAA,eAAAA,EAAed,QAAQe,EAAE;;AAC3Dd,oBAAAA,KAAAA,CAAMe,IAAI;AACVV,oBAAAA,KAAAA,kBAASW,GAAA,CAACC,MAAAA,EAAAA;wBAAKL,SAAAA,EAAU,sBAAA;AAAwBP,wBAAAA,QAAAA,EAAAA;;AACjDE,oBAAAA,UAAAA,kBACGS,GAAA,CAACE,MAAAA,EAAAA;wBACGC,IAAAA,EAAK,QAAA;wBACLC,OAAAA,EAAQ,MAAA;wBACRC,OAAO,EAAA,IAAA;wBACPC,QAAQ,EAAA,IAAA;wBACRC,YAAAA,EAAYrB,MAAAA,CAAOsB,iBAAiB,GAAG,gBAAA,GAAmB,mBAAA;AAC1DC,wBAAAA,cAAAA,EAAcvB,OAAOsB,iBAAiB;wBACtCE,OAAAA,EAASvB,mBAAAA;AACT,wBAAA,QAAA,gBAAAa,GAAA,CAACW,GAAAA,EAAAA;4BAAEf,SAAAA,EAAWV,MAAAA,CAAOsB,iBAAiB,GAAG,YAAA,GAAe,iBAAA;4BAAmBI,aAAAA,EAAY;;;;;AAIlG5B,YAAAA,KAAAA,CAAM6B;;;AAGnB;;;;"}
1
+ {"version":3,"file":"Sidebar.js","sources":["../../../shell/Sidebar.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 { isPointerRevealMode, useLayoutConfig } from '../configuration';\nimport { readString } from './elementProperties';\n\n/**\n * The sidebar's own chrome, inside the panel {@link AppShell} positions.\n *\n * The panel and its contents are deliberately different components. Everything about *where* the sidebar\n * is - translated off-canvas, collapsed to a rail, growing on hover - belongs to the mode and therefore to\n * the shell; everything about *what is in it* belongs to the screen. A template can replace this header\n * wholesale without any of the mode CSS noticing.\n *\n * The pin button only appears in `reveal` and `drawer`, the two modes where the sidebar answers to the\n * pointer and therefore needs a way to be made to stay.\n */\nexport function Sidebar({ element, slots }: RegisteredComponentProps) {\n const { effectiveMode, config, toggleSidebarAnchor } = useLayoutConfig();\n const title = readString(element, 'title');\n const isPinnable = isPointerRevealMode(effectiveMode);\n\n return (\n <>\n <div className='layout-sidebar-header' data-scene-id={element.id}>\n {slots.logo}\n {title && <span className='layout-sidebar-title'>{title}</span>}\n {isPinnable && (\n <Button\n type='button'\n variant='text'\n rounded\n iconOnly\n aria-label={config.isSidebarAnchored ? 'Unpin the menu' : 'Pin the menu open'}\n aria-pressed={config.isSidebarAnchored}\n onClick={toggleSidebarAnchor}>\n <i className={config.isSidebarAnchored ? 'pi pi-lock' : 'pi pi-lock-open'} aria-hidden='true' />\n </Button>\n )}\n </div>\n {slots.content}\n </>\n );\n}\n"],"names":["Sidebar","element","slots","effectiveMode","config","toggleSidebarAnchor","useLayoutConfig","title","readString","isPinnable","isPointerRevealMode","_jsxs","_Fragment","div","className","data-scene-id","id","logo","_jsx","span","Button","type","variant","rounded","iconOnly","aria-label","isSidebarAnchored","aria-pressed","onClick","i","aria-hidden","content"],"mappings":";;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,OAAAA,CAAQ,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAChE,IAAA,MAAM,EAAEC,aAAa,EAAEC,MAAM,EAAEC,mBAAmB,EAAE,GAAGC,eAAAA,EAAAA;IACvD,MAAMC,KAAAA,GAAQC,WAAWP,OAAAA,EAAS,OAAA,CAAA;AAClC,IAAA,MAAMQ,aAAaC,mBAAAA,CAAoBP,aAAAA,CAAAA;IAEvC,qBACIQ,IAAA,CAAAC,QAAA,EAAA;;0BACID,IAAA,CAACE,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,uBAAA;AAAwBC,gBAAAA,eAAAA,EAAed,QAAQe,EAAE;;AAC3Dd,oBAAAA,KAAAA,CAAMe,IAAI;AACVV,oBAAAA,KAAAA,kBAASW,GAAA,CAACC,MAAAA,EAAAA;wBAAKL,SAAAA,EAAU,sBAAA;AAAwBP,wBAAAA,QAAAA,EAAAA;;AACjDE,oBAAAA,UAAAA,kBACGS,GAAA,CAACE,MAAAA,EAAAA;wBACGC,IAAAA,EAAK,QAAA;wBACLC,OAAAA,EAAQ,MAAA;wBACRC,OAAO,EAAA,IAAA;wBACPC,QAAQ,EAAA,IAAA;wBACRC,YAAAA,EAAYrB,MAAAA,CAAOsB,iBAAiB,GAAG,gBAAA,GAAmB,mBAAA;AAC1DC,wBAAAA,cAAAA,EAAcvB,OAAOsB,iBAAiB;wBACtCE,OAAAA,EAASvB,mBAAAA;AACT,wBAAA,QAAA,gBAAAa,GAAA,CAACW,GAAAA,EAAAA;4BAAEf,SAAAA,EAAWV,MAAAA,CAAOsB,iBAAiB,GAAG,YAAA,GAAe,iBAAA;4BAAmBI,aAAAA,EAAY;;;;;AAIlG5B,YAAAA,KAAAA,CAAM6B;;;AAGnB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeOption.js","sources":["../../../shell/ThemeOption.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 { ExternalComponent, Theme } from '@cratis/scene.model';\nimport { ColorScheme } from '../configuration';\nimport { readRecords, recordString } from './elementProperties';\n\n/**\n * One entry a theme switcher offers.\n *\n * A switcher needs a name to record and a color scheme to record alongside it, but must not need the\n * theme's tokens - the tokens belong to whoever applies the theme, and a switcher that carried them would\n * force every page template to inline a full palette just to offer a choice.\n */\nexport interface ThemeOption {\n /** The {@link Theme.name} to record when this option is chosen. */\n name: string;\n\n /** What to show on the button. */\n label: string;\n\n /** Which side of the light/dark axis choosing this option puts the shell on. */\n colorScheme: ColorScheme;\n}\n\n/**\n * Reads the themes a switcher should offer out of an element's properties, falling back to the ones\n * supplied by the host.\n *\n * A template says which themes it wants offered; a host that renders the shell with a different theme set\n * passes those as the fallback. Neither has to know the other's list.\n *\n * @param element The element carrying an optional `themes` property - an array of `{ name, label, isDark }`.\n * @param fallback The options to offer when the element names none.\n * @returns The options to render.\n */\nexport function readThemeOptions(element: ExternalComponent, fallback: ThemeOption[]): ThemeOption[] {\n const declared = readRecords(element, 'themes').map(\n (record): ThemeOption => ({\n name: recordString(record, 'name'),\n label: recordString(record, 'label') || recordString(record, 'name'),\n colorScheme: record.isDark === true ? ColorScheme.Dark : ColorScheme.Light,\n }),\n );\n\n const named = declared.filter(option => option.name.length > 0);\n return named.length > 0 ? named : fallback;\n}\n\n/**\n * Turns the {@link Theme}s a package ships into switcher options, so a host offering its own themes and a\n * host offering this package's use the same code path.\n */\nexport function themeOptionsFor(themes: Theme[]): ThemeOption[] {\n return themes.map(theme => ({\n name: theme.name,\n label: theme.name,\n colorScheme: theme.isDark ? ColorScheme.Dark : ColorScheme.Light,\n }));\n}\n"],"names":["readThemeOptions","element","fallback","declared","readRecords","map","record","name","recordString","label","colorScheme","isDark","ColorScheme","Dark","Light","named","filter","option","length","themeOptionsFor","themes","theme"],"mappings":";;;;;AAAA;AACA;AAwBA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiBC,OAA0B,EAAEC,QAAuB,EAAA;IAChF,MAAMC,QAAAA,GAAWC,YAAYH,OAAAA,EAAS,QAAA,CAAA,CAAUI,GAAG,CAC/C,CAACC,UAAyB;AACtBC,YAAAA,IAAAA,EAAMC,aAAaF,MAAAA,EAAQ,MAAA,CAAA;AAC3BG,YAAAA,KAAAA,EAAOD,YAAAA,CAAaF,MAAAA,EAAQ,OAAA,CAAA,IAAYE,YAAAA,CAAaF,MAAAA,EAAQ,MAAA,CAAA;YAC7DI,WAAAA,EAAaJ,MAAAA,CAAOK,MAAM,KAAK,IAAA,GAAOC,YAAYC,IAAI,GAAGD,YAAYE;SACzE,CAAA,CAAA;IAGJ,MAAMC,KAAAA,GAAQZ,QAAAA,CAASa,MAAM,CAACC,CAAAA,SAAUA,MAAAA,CAAOV,IAAI,CAACW,MAAM,GAAG,CAAA,CAAA;AAC7D,IAAA,OAAOH,KAAAA,CAAMG,MAAM,GAAG,CAAA,GAAIH,KAAAA,GAAQb,QAAAA;AACtC;AAEA;;;IAIO,SAASiB,eAAAA,CAAgBC,MAAe,EAAA;AAC3C,IAAA,OAAOA,MAAAA,CAAOf,GAAG,CAACgB,CAAAA,SAAU;AACxBd,YAAAA,IAAAA,EAAMc,MAAMd,IAAI;AAChBE,YAAAA,KAAAA,EAAOY,MAAMd,IAAI;AACjBG,YAAAA,WAAAA,EAAaW,MAAMV,MAAM,GAAGC,YAAYC,IAAI,GAAGD,YAAYE;SAC/D,CAAA,CAAA;AACJ;;;;"}
1
+ {"version":3,"file":"ThemeOption.js","sources":["../../../shell/ThemeOption.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 { ExternalComponent, Theme } from '@cratis/scene.model';\nimport { ColorScheme } from '../configuration';\nimport { readRecords, recordString } from './elementProperties';\n\n/**\n * One entry a theme switcher offers.\n *\n * A switcher needs a name to record and a color scheme to record alongside it, but must not need the\n * theme's tokens - the tokens belong to whoever applies the theme, and a switcher that carried them would\n * force every page template to inline a full palette just to offer a choice.\n */\nexport interface ThemeOption {\n /** The {@link Theme.name} to record when this option is chosen. */\n name: string;\n\n /** What to show on the button. */\n label: string;\n\n /** Which side of the light/dark axis choosing this option puts the shell on. */\n colorScheme: ColorScheme;\n}\n\n/**\n * Reads the themes a switcher should offer out of an element's properties, falling back to the ones\n * supplied by the host.\n *\n * A template says which themes it wants offered; a host that renders the shell with a different theme set\n * passes those as the fallback. Neither has to know the other's list.\n *\n * @param element The element carrying an optional `themes` property - an array of `{ name, label, isDark }`.\n * @param fallback The options to offer when the element names none.\n * @returns The options to render.\n */\nexport function readThemeOptions(element: ExternalComponent, fallback: ThemeOption[]): ThemeOption[] {\n const declared = readRecords(element, 'themes').map(\n (record): ThemeOption => ({\n name: recordString(record, 'name'),\n label: recordString(record, 'label') || recordString(record, 'name'),\n colorScheme: record.isDark === true ? ColorScheme.Dark : ColorScheme.Light,\n }),\n );\n\n const named = declared.filter(option => option.name.length > 0);\n return named.length > 0 ? named : fallback;\n}\n\n/**\n * Turns the {@link Theme}s a package ships into switcher options, so a host offering its own themes and a\n * host offering this package's use the same code path.\n */\nexport function themeOptionsFor(themes: Theme[]): ThemeOption[] {\n return themes.map(theme => ({\n name: theme.name,\n label: theme.name,\n colorScheme: theme.isDark ? ColorScheme.Dark : ColorScheme.Light,\n }));\n}\n"],"names":["readThemeOptions","element","fallback","declared","readRecords","map","record","name","recordString","label","colorScheme","isDark","ColorScheme","Dark","Light","named","filter","option","length","themeOptionsFor","themes","theme"],"mappings":";;;;;AAAA;AACA;AAwBA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiBC,OAA0B,EAAEC,QAAuB,EAAA;IAChF,MAAMC,QAAAA,GAAWC,YAAYH,OAAAA,EAAS,QAAA,CAAA,CAAUI,GAAG,CAC/C,CAACC,UAAyB;AACtBC,YAAAA,IAAAA,EAAMC,aAAaF,MAAAA,EAAQ,MAAA,CAAA;AAC3BG,YAAAA,KAAAA,EAAOD,YAAAA,CAAaF,MAAAA,EAAQ,OAAA,CAAA,IAAYE,YAAAA,CAAaF,MAAAA,EAAQ,MAAA,CAAA;YAC7DI,WAAAA,EAAaJ,MAAAA,CAAOK,MAAM,KAAK,IAAA,GAAOC,YAAYC,IAAI,GAAGD,YAAYE;SACzE,CAAA,CAAA;IAGJ,MAAMC,KAAAA,GAAQZ,QAAAA,CAASa,MAAM,CAACC,CAAAA,SAAUA,MAAAA,CAAOV,IAAI,CAACW,MAAM,GAAG,CAAA,CAAA;AAC7D,IAAA,OAAOH,KAAAA,CAAMG,MAAM,GAAG,CAAA,GAAIH,KAAAA,GAAQb,QAAAA;AACtC;AAEA;;;IAIO,SAASiB,eAAAA,CAAgBC,MAAe,EAAA;AAC3C,IAAA,OAAOA,MAAAA,CAAOf,GAAG,CAACgB,CAAAA,SAAU;AACxBd,YAAAA,IAAAA,EAAMc,MAAMd,IAAI;AAChBE,YAAAA,KAAAA,EAAOY,MAAMd,IAAI;AACjBG,YAAAA,WAAAA,EAAaW,MAAMV,MAAM,GAAGC,YAAYC,IAAI,GAAGD,YAAYE;SAC/D,CAAA,CAAA;AACJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeSwitcher.js","sources":["../../../shell/ThemeSwitcher.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 { useLayoutConfig } from '../configuration';\nimport { defaultBlueprintThemes } from '../themes';\nimport { readString } from './elementProperties';\nimport { readThemeOptions, themeOptionsFor } from './ThemeOption';\n\n/**\n * Switches between the themes a host offers.\n *\n * It records a name and a color scheme and nothing else - {@link LayoutThemeProvider} resolves the name\n * against the real theme set. That split is what makes switching live: the tokens are rewritten on the\n * element that already exists, so nothing below remounts and no form loses what was typed into it.\n */\nexport function ThemeSwitcher({ element }: RegisteredComponentProps) {\n const { config, setThemeName, setColorScheme } = useLayoutConfig();\n const label = readString(element, 'label', 'Theme');\n const options = readThemeOptions(element, themeOptionsFor(defaultBlueprintThemes));\n\n return (\n <div data-scene-id={element.id}>\n <h3 className='layout-config-section-title'>{label}</h3>\n <div className='layout-config-options' role='group' aria-label={label}>\n {options.map(option => (\n <button\n key={option.name}\n type='button'\n className='layout-config-option'\n aria-pressed={config.themeName === option.name}\n onClick={() => {\n setThemeName(option.name);\n setColorScheme(option.colorScheme);\n }}>\n {option.label}\n </button>\n ))}\n </div>\n </div>\n );\n}\n"],"names":["ThemeSwitcher","element","config","setThemeName","setColorScheme","useLayoutConfig","label","readString","options","readThemeOptions","themeOptionsFor","defaultBlueprintThemes","_jsxs","div","data-scene-id","id","_jsx","h3","className","role","aria-label","map","option","button","type","aria-pressed","themeName","name","onClick","colorScheme"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;;;;AAMC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,EAAEC,MAAM,EAAEC,YAAY,EAAEC,cAAc,EAAE,GAAGC,eAAAA,EAAAA;IACjD,MAAMC,KAAAA,GAAQC,UAAAA,CAAWN,OAAAA,EAAS,OAAA,EAAS,OAAA,CAAA;IAC3C,MAAMO,OAAAA,GAAUC,gBAAAA,CAAiBR,OAAAA,EAASS,eAAAA,CAAgBC,sBAAAA,CAAAA,CAAAA;AAE1D,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeb,QAAQc,EAAE;;0BAC1BC,GAAA,CAACC,IAAAA,EAAAA;gBAAGC,SAAAA,EAAU,6BAAA;AAA+BZ,gBAAAA,QAAAA,EAAAA;;0BAC7CU,GAAA,CAACH,KAAAA,EAAAA;gBAAIK,SAAAA,EAAU,uBAAA;gBAAwBC,IAAAA,EAAK,OAAA;gBAAQC,YAAAA,EAAYd,KAAAA;AAC3DE,gBAAAA,QAAAA,EAAAA,OAAAA,CAAQa,GAAG,CAACC,CAAAA,MAAAA,iBACTN,GAAA,CAACO,QAAAA,EAAAA;wBAEGC,IAAAA,EAAK,QAAA;wBACLN,SAAAA,EAAU,sBAAA;AACVO,wBAAAA,cAAAA,EAAcvB,MAAAA,CAAOwB,SAAS,KAAKJ,MAAAA,CAAOK,IAAI;wBAC9CC,OAAAA,EAAS,IAAA;AACLzB,4BAAAA,YAAAA,CAAamB,OAAOK,IAAI,CAAA;AACxBvB,4BAAAA,cAAAA,CAAekB,OAAOO,WAAW,CAAA;AACrC,wBAAA,CAAA;AACCP,wBAAAA,QAAAA,EAAAA,MAAAA,CAAOhB;AARHgB,qBAAAA,EAAAA,MAAAA,CAAOK,IAAI,CAAA;;;;AAcxC;;;;"}
1
+ {"version":3,"file":"ThemeSwitcher.js","sources":["../../../shell/ThemeSwitcher.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 { useLayoutConfig } from '../configuration';\nimport { defaultBlueprintThemes } from '../themes';\nimport { readString } from './elementProperties';\nimport { readThemeOptions, themeOptionsFor } from './ThemeOption';\n\n/**\n * Switches between the themes a host offers.\n *\n * It records a name and a color scheme and nothing else - {@link LayoutThemeProvider} resolves the name\n * against the real theme set. That split is what makes switching live: the tokens are rewritten on the\n * element that already exists, so nothing below remounts and no form loses what was typed into it.\n */\nexport function ThemeSwitcher({ element }: RegisteredComponentProps) {\n const { config, setThemeName, setColorScheme } = useLayoutConfig();\n const label = readString(element, 'label', 'Theme');\n const options = readThemeOptions(element, themeOptionsFor(defaultBlueprintThemes));\n\n return (\n <div data-scene-id={element.id}>\n <h3 className='layout-config-section-title'>{label}</h3>\n <div className='layout-config-options' role='group' aria-label={label}>\n {options.map(option => (\n <button\n key={option.name}\n type='button'\n className='layout-config-option'\n aria-pressed={config.themeName === option.name}\n onClick={() => {\n setThemeName(option.name);\n setColorScheme(option.colorScheme);\n }}>\n {option.label}\n </button>\n ))}\n </div>\n </div>\n );\n}\n"],"names":["ThemeSwitcher","element","config","setThemeName","setColorScheme","useLayoutConfig","label","readString","options","readThemeOptions","themeOptionsFor","defaultBlueprintThemes","_jsxs","div","data-scene-id","id","_jsx","h3","className","role","aria-label","map","option","button","type","aria-pressed","themeName","name","onClick","colorScheme"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;;;;AAMC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,EAAEC,MAAM,EAAEC,YAAY,EAAEC,cAAc,EAAE,GAAGC,eAAAA,EAAAA;IACjD,MAAMC,KAAAA,GAAQC,UAAAA,CAAWN,OAAAA,EAAS,OAAA,EAAS,OAAA,CAAA;IAC3C,MAAMO,OAAAA,GAAUC,gBAAAA,CAAiBR,OAAAA,EAASS,eAAAA,CAAgBC,sBAAAA,CAAAA,CAAAA;AAE1D,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeb,QAAQc,EAAE;;0BAC1BC,GAAA,CAACC,IAAAA,EAAAA;gBAAGC,SAAAA,EAAU,6BAAA;AAA+BZ,gBAAAA,QAAAA,EAAAA;;0BAC7CU,GAAA,CAACH,KAAAA,EAAAA;gBAAIK,SAAAA,EAAU,uBAAA;gBAAwBC,IAAAA,EAAK,OAAA;gBAAQC,YAAAA,EAAYd,KAAAA;AAC3DE,gBAAAA,QAAAA,EAAAA,OAAAA,CAAQa,GAAG,CAACC,CAAAA,MAAAA,iBACTN,GAAA,CAACO,QAAAA,EAAAA;wBAEGC,IAAAA,EAAK,QAAA;wBACLN,SAAAA,EAAU,sBAAA;AACVO,wBAAAA,cAAAA,EAAcvB,MAAAA,CAAOwB,SAAS,KAAKJ,MAAAA,CAAOK,IAAI;wBAC9CC,OAAAA,EAAS,IAAA;AACLzB,4BAAAA,YAAAA,CAAamB,OAAOK,IAAI,CAAA;AACxBvB,4BAAAA,cAAAA,CAAekB,OAAOO,WAAW,CAAA;AACrC,wBAAA,CAAA;AACCP,wBAAAA,QAAAA,EAAAA,MAAAA,CAAOhB;AARHgB,qBAAAA,EAAAA,MAAAA,CAAOK,IAAI,CAAA;;;;AAcxC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Topbar.js","sources":["../../../shell/Topbar.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 { LayoutMode, useLayoutConfig } from '../configuration';\nimport { readBoolean } from './elementProperties';\n\n/**\n * The fixed strip across the top of the application shell.\n *\n * It owns the one control every mode needs: the sidebar toggle. In `horizontal` mode it also hosts the\n * menu itself, which is why the menu arrives here as a slot rather than being hard-wired into the\n * sidebar - the same navigation markup has to be able to render in two places.\n *\n * The toggle hides itself in the rail modes, where there is nothing to toggle: `slim`, `slim-plus` and\n * `compact` are always showing, `reveal` and `drawer` answer to the pointer and the pin, and `horizontal`\n * has no sidebar at all. A button that does nothing is worse than no button.\n */\nexport function Topbar({ element, slots }: RegisteredComponentProps) {\n const { effectiveMode, config, toggleSidebar } = useLayoutConfig();\n const showsToggle = readBoolean(element, 'showToggle', true) && togglesSidebar(effectiveMode);\n\n return (\n <>\n <div className='layout-topbar-start' data-scene-id={element.id}>\n {showsToggle && (\n <Button\n type='button'\n variant='text'\n rounded\n iconOnly\n aria-label={config.isSidebarOpen ? 'Close the menu' : 'Open the menu'}\n aria-expanded={config.isSidebarOpen}\n onClick={toggleSidebar}>\n <i className='pi pi-bars' aria-hidden='true' />\n </Button>\n )}\n {slots.logo}\n {slots.start}\n </div>\n {slots.menu}\n <div className='layout-topbar-end'>{slots.end}</div>\n </>\n );\n}\n\nfunction togglesSidebar(mode: LayoutMode): boolean {\n return mode === LayoutMode.Static || mode === LayoutMode.Overlay;\n}\n"],"names":["Topbar","element","slots","effectiveMode","config","toggleSidebar","useLayoutConfig","showsToggle","readBoolean","togglesSidebar","_jsxs","_Fragment","div","className","data-scene-id","id","_jsx","Button","type","variant","rounded","iconOnly","aria-label","isSidebarOpen","aria-expanded","onClick","i","aria-hidden","logo","start","menu","end","mode","LayoutMode","Static","Overlay"],"mappings":";;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,MAAAA,CAAO,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAC/D,IAAA,MAAM,EAAEC,aAAa,EAAEC,MAAM,EAAEC,aAAa,EAAE,GAAGC,eAAAA,EAAAA;AACjD,IAAA,MAAMC,WAAAA,GAAcC,WAAAA,CAAYP,OAAAA,EAAS,YAAA,EAAc,SAASQ,cAAAA,CAAeN,aAAAA,CAAAA;IAE/E,qBACIO,IAAA,CAAAC,QAAA,EAAA;;0BACID,IAAA,CAACE,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,qBAAA;AAAsBC,gBAAAA,eAAAA,EAAeb,QAAQc,EAAE;;AACzDR,oBAAAA,WAAAA,kBACGS,GAAA,CAACC,MAAAA,EAAAA;wBACGC,IAAAA,EAAK,QAAA;wBACLC,OAAAA,EAAQ,MAAA;wBACRC,OAAO,EAAA,IAAA;wBACPC,QAAQ,EAAA,IAAA;wBACRC,YAAAA,EAAYlB,MAAAA,CAAOmB,aAAa,GAAG,gBAAA,GAAmB,eAAA;AACtDC,wBAAAA,eAAAA,EAAepB,OAAOmB,aAAa;wBACnCE,OAAAA,EAASpB,aAAAA;AACT,wBAAA,QAAA,gBAAAW,GAAA,CAACU,GAAAA,EAAAA;4BAAEb,SAAAA,EAAU,YAAA;4BAAac,aAAAA,EAAY;;;AAG7CzB,oBAAAA,KAAAA,CAAM0B,IAAI;AACV1B,oBAAAA,KAAAA,CAAM2B;;;AAEV3B,YAAAA,KAAAA,CAAM4B,IAAI;0BACXd,GAAA,CAACJ,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,mBAAA;AAAqBX,gBAAAA,QAAAA,EAAAA,KAAAA,CAAM6B;;;;AAGtD;AAEA,SAAStB,eAAeuB,IAAgB,EAAA;AACpC,IAAA,OAAOA,SAASC,UAAAA,CAAWC,MAAM,IAAIF,IAAAA,KAASC,WAAWE,OAAO;AACpE;;;;"}
1
+ {"version":3,"file":"Topbar.js","sources":["../../../shell/Topbar.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 { LayoutMode, useLayoutConfig } from '../configuration';\nimport { readBoolean } from './elementProperties';\n\n/**\n * The fixed strip across the top of the application shell.\n *\n * It owns the one control every mode needs: the sidebar toggle. In `horizontal` mode it also hosts the\n * menu itself, which is why the menu arrives here as a slot rather than being hard-wired into the\n * sidebar - the same navigation markup has to be able to render in two places.\n *\n * The toggle hides itself in the rail modes, where there is nothing to toggle: `slim`, `slim-plus` and\n * `compact` are always showing, `reveal` and `drawer` answer to the pointer and the pin, and `horizontal`\n * has no sidebar at all. A button that does nothing is worse than no button.\n */\nexport function Topbar({ element, slots }: RegisteredComponentProps) {\n const { effectiveMode, config, toggleSidebar } = useLayoutConfig();\n const showsToggle = readBoolean(element, 'showToggle', true) && togglesSidebar(effectiveMode);\n\n return (\n <>\n <div className='layout-topbar-start' data-scene-id={element.id}>\n {showsToggle && (\n <Button\n type='button'\n variant='text'\n rounded\n iconOnly\n aria-label={config.isSidebarOpen ? 'Close the menu' : 'Open the menu'}\n aria-expanded={config.isSidebarOpen}\n onClick={toggleSidebar}>\n <i className='pi pi-bars' aria-hidden='true' />\n </Button>\n )}\n {slots.logo}\n {slots.start}\n </div>\n {slots.menu}\n <div className='layout-topbar-end'>{slots.end}</div>\n </>\n );\n}\n\nfunction togglesSidebar(mode: LayoutMode): boolean {\n return mode === LayoutMode.Static || mode === LayoutMode.Overlay;\n}\n"],"names":["Topbar","element","slots","effectiveMode","config","toggleSidebar","useLayoutConfig","showsToggle","readBoolean","togglesSidebar","_jsxs","_Fragment","div","className","data-scene-id","id","_jsx","Button","type","variant","rounded","iconOnly","aria-label","isSidebarOpen","aria-expanded","onClick","i","aria-hidden","logo","start","menu","end","mode","LayoutMode","Static","Overlay"],"mappings":";;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,MAAAA,CAAO,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAC/D,IAAA,MAAM,EAAEC,aAAa,EAAEC,MAAM,EAAEC,aAAa,EAAE,GAAGC,eAAAA,EAAAA;AACjD,IAAA,MAAMC,WAAAA,GAAcC,WAAAA,CAAYP,OAAAA,EAAS,YAAA,EAAc,SAASQ,cAAAA,CAAeN,aAAAA,CAAAA;IAE/E,qBACIO,IAAA,CAAAC,QAAA,EAAA;;0BACID,IAAA,CAACE,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,qBAAA;AAAsBC,gBAAAA,eAAAA,EAAeb,QAAQc,EAAE;;AACzDR,oBAAAA,WAAAA,kBACGS,GAAA,CAACC,MAAAA,EAAAA;wBACGC,IAAAA,EAAK,QAAA;wBACLC,OAAAA,EAAQ,MAAA;wBACRC,OAAO,EAAA,IAAA;wBACPC,QAAQ,EAAA,IAAA;wBACRC,YAAAA,EAAYlB,MAAAA,CAAOmB,aAAa,GAAG,gBAAA,GAAmB,eAAA;AACtDC,wBAAAA,eAAAA,EAAepB,OAAOmB,aAAa;wBACnCE,OAAAA,EAASpB,aAAAA;AACT,wBAAA,QAAA,gBAAAW,GAAA,CAACU,GAAAA,EAAAA;4BAAEb,SAAAA,EAAU,YAAA;4BAAac,aAAAA,EAAY;;;AAG7CzB,oBAAAA,KAAAA,CAAM0B,IAAI;AACV1B,oBAAAA,KAAAA,CAAM2B;;;AAEV3B,YAAAA,KAAAA,CAAM4B,IAAI;0BACXd,GAAA,CAACJ,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,mBAAA;AAAqBX,gBAAAA,QAAAA,EAAAA,KAAAA,CAAM6B;;;;AAGtD;AAEA,SAAStB,eAAeuB,IAAgB,EAAA;AACpC,IAAA,OAAOA,SAASC,UAAAA,CAAWC,MAAM,IAAIF,IAAAA,KAASC,WAAWE,OAAO;AACpE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserMenu.js","sources":["../../../shell/UserMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Avatar } from 'primereact/avatar';\nimport { Button } from 'primereact/button';\nimport { Menu as PrimeMenu } from 'primereact/menu';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { MenuEntry } from './MenuEntry';\nimport { readRecords, readString, recordString } from './elementProperties';\n\n/**\n * The signed-in user's avatar and menu.\n *\n * The popup is PrimeReact's `Menu` rather than hand-written markup: an overlay that positions itself,\n * traps focus and closes on escape is framework behavior, and re-implementing it in a layout package is\n * how a shell ends up with its own subtly broken menu. The shell hand-writes CSS only where PrimeReact\n * has no primitive at all - the app-shell modes - and uses the library everywhere else.\n *\n * PrimeReact 11 replaced the `model` array with composition, so the entries are rendered here rather than\n * handed over as data - and `primereact/menuitem`, the type that array was made of, went with it, which is\n * why they are mapped into this package's own {@link MenuEntry}. The trade is worth taking: `Menu.Trigger`\n * now owns opening the popup and reporting `aria-haspopup`/`aria-expanded` for it, so the ref, the toggle\n * handler and the hand-maintained aria that used to sit here - and could drift out of step with the popup\n * they described - are gone.\n */\nexport function UserMenu({ element }: RegisteredComponentProps) {\n const name = readString(element, 'name');\n const role = readString(element, 'role');\n const initials = readString(element, 'initials', name.slice(0, 1).toUpperCase());\n const items = readRecords(element, 'items').map(\n (item): MenuEntry => ({\n label: recordString(item, 'label'),\n icon: recordString(item, 'icon') || undefined,\n url: recordString(item, 'targetScreen') ? `#/${recordString(item, 'targetScreen')}` : undefined,\n }),\n );\n\n return (\n <div className='layout-user-menu' data-scene-id={element.id}>\n <Avatar.Root shape='circle'>\n <Avatar.Fallback>{initials}</Avatar.Fallback>\n </Avatar.Root>\n <span className='layout-user-menu-name'>\n <span>{name}</span>\n {role && <span className='layout-user-menu-role'>{role}</span>}\n </span>\n <PrimeMenu.Root>\n <PrimeMenu.Trigger as={Button} variant='text' rounded iconOnly aria-label={`Open the menu for ${name}`}>\n <i className='pi pi-angle-down' aria-hidden='true' />\n </PrimeMenu.Trigger>\n <PrimeMenu.Portal>\n <PrimeMenu.Positioner>\n <PrimeMenu.Popup>\n <PrimeMenu.List>\n {items.map(item => (\n <PrimeMenu.Item key={item.label} as='a' href={item.url}>\n {item.icon && <i className={item.icon} aria-hidden='true' />}\n <span>{item.label}</span>\n </PrimeMenu.Item>\n ))}\n </PrimeMenu.List>\n </PrimeMenu.Popup>\n </PrimeMenu.Positioner>\n </PrimeMenu.Portal>\n </PrimeMenu.Root>\n </div>\n );\n}\n"],"names":["UserMenu","element","name","readString","role","initials","slice","toUpperCase","items","readRecords","map","item","label","recordString","icon","undefined","url","_jsxs","div","className","data-scene-id","id","_jsx","Avatar","Root","shape","Fallback","span","PrimeMenu","Trigger","as","Button","variant","rounded","iconOnly","aria-label","i","aria-hidden","Portal","Positioner","Popup","List","Item","href"],"mappings":";;;;;;AAUA;;;;;;;;;;;;;;AAcC,IACM,SAASA,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AAI,EAAA;;AACX,kCAAAF,GAAA,CAACM,KAAUC,OAAO,EAAA;wBAACC,EAAAA,EAAIC,MAAAA;wBAAQC,OAAAA,EAAQ,MAAA;wBAAOC,OAAO,EAAA,IAAA;wBAACC,QAAQ,EAAA,IAAA;wBAACC,YAAAA,EAAY,CAAC,kBAAkB,EAAEjC,IAAAA,CAAAA,CAAM;AAClG,wBAAA,QAAA,gBAAAoB,GAAA,CAACc,GAAAA,EAAAA;4BAAEjB,SAAAA,EAAU,kBAAA;4BAAmBkB,aAAAA,EAAY;;;AAEhD,kCAAAf,GAAA,CAACM,KAAUU,MAAM,EAAA;gDACbhB,GAAA,CAACM,KAAUW,UAAU,EAAA;oDACjBjB,GAAA,CAACM,KAAUY,KAAK,EAAA;wDACZlB,GAAA,CAACM,KAAUa,IAAI,EAAA;AACVjC,oCAAAA,QAAAA,EAAAA,KAAAA,CAAME,GAAG,CAACC,CAAAA,IAAAA,iBACPM,IAAA,CAACW,KAAUc,IAAI,EAAA;4CAAkBZ,EAAAA,EAAG,GAAA;AAAIa,4CAAAA,IAAAA,EAAMhC,KAAKK,GAAG;;gDACjDL,IAAAA,CAAKG,IAAI,kBAAIQ,GAAA,CAACc,GAAAA,EAAAA;AAAEjB,oDAAAA,SAAAA,EAAWR,KAAKG,IAAI;oDAAEuB,aAAAA,EAAY;;8DACnDf,GAAA,CAACK,MAAAA,EAAAA;AAAMhB,oDAAAA,QAAAA,EAAAA,IAAAA,CAAKC;;;AAFKD,yCAAAA,EAAAA,IAAAA,CAAKC,KAAK,CAAA;;;;;;;;;AAYnE;;;;"}
1
+ {"version":3,"file":"UserMenu.js","sources":["../../../shell/UserMenu.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Avatar } from 'primereact/avatar';\nimport { Button } from 'primereact/button';\nimport { Menu as PrimeMenu } from 'primereact/menu';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { MenuEntry } from './MenuEntry';\nimport { readRecords, readString, recordString } from './elementProperties';\n\n/**\n * The signed-in user's avatar and menu.\n *\n * The popup is PrimeReact's `Menu` rather than hand-written markup: an overlay that positions itself,\n * traps focus and closes on escape is framework behavior, and re-implementing it in a layout package is\n * how a shell ends up with its own subtly broken menu. The shell hand-writes CSS only where PrimeReact\n * has no primitive at all - the app-shell modes - and uses the library everywhere else.\n *\n * PrimeReact 11 replaced the `model` array with composition, so the entries are rendered here rather than\n * handed over as data - and `primereact/menuitem`, the type that array was made of, went with it, which is\n * why they are mapped into this package's own {@link MenuEntry}. The trade is worth taking: `Menu.Trigger`\n * now owns opening the popup and reporting `aria-haspopup`/`aria-expanded` for it, so the ref, the toggle\n * handler and the hand-maintained aria that used to sit here - and could drift out of step with the popup\n * they described - are gone.\n */\nexport function UserMenu({ element }: RegisteredComponentProps) {\n const name = readString(element, 'name');\n const role = readString(element, 'role');\n const initials = readString(element, 'initials', name.slice(0, 1).toUpperCase());\n const items = readRecords(element, 'items').map(\n (item): MenuEntry => ({\n label: recordString(item, 'label'),\n icon: recordString(item, 'icon') || undefined,\n url: recordString(item, 'targetScreen') ? `#/${recordString(item, 'targetScreen')}` : undefined,\n }),\n );\n\n return (\n <div className='layout-user-menu' data-scene-id={element.id}>\n <Avatar.Root shape='circle'>\n <Avatar.Fallback>{initials}</Avatar.Fallback>\n </Avatar.Root>\n <span className='layout-user-menu-name'>\n <span>{name}</span>\n {role && <span className='layout-user-menu-role'>{role}</span>}\n </span>\n <PrimeMenu.Root>\n <PrimeMenu.Trigger as={Button} variant='text' rounded iconOnly aria-label={`Open the menu for ${name}`}>\n <i className='pi pi-angle-down' aria-hidden='true' />\n </PrimeMenu.Trigger>\n <PrimeMenu.Portal>\n <PrimeMenu.Positioner>\n <PrimeMenu.Popup>\n <PrimeMenu.List>\n {items.map(item => (\n <PrimeMenu.Item key={item.label} as='a' href={item.url}>\n {item.icon && <i className={item.icon} aria-hidden='true' />}\n <span>{item.label}</span>\n </PrimeMenu.Item>\n ))}\n </PrimeMenu.List>\n </PrimeMenu.Popup>\n </PrimeMenu.Positioner>\n </PrimeMenu.Portal>\n </PrimeMenu.Root>\n </div>\n );\n}\n"],"names":["UserMenu","element","name","readString","role","initials","slice","toUpperCase","items","readRecords","map","item","label","recordString","icon","undefined","url","_jsxs","div","className","data-scene-id","id","_jsx","Avatar","Root","shape","Fallback","span","PrimeMenu","Trigger","as","Button","variant","rounded","iconOnly","aria-label","i","aria-hidden","Portal","Positioner","Popup","List","Item","href"],"mappings":";;;;;;AAUA;;;;;;;;;;;;;;AAcC,IACM,SAASA,QAAAA,CAAS,EAAEC,OAAO,EAA4B,EAAA;IAC1D,MAAMC,IAAAA,GAAOC,WAAWF,OAAAA,EAAS,MAAA,CAAA;IACjC,MAAMG,IAAAA,GAAOD,WAAWF,OAAAA,EAAS,MAAA,CAAA;IACjC,MAAMI,QAAAA,GAAWF,WAAWF,OAAAA,EAAS,UAAA,EAAYC,KAAKI,KAAK,CAAC,CAAA,EAAG,CAAA,CAAA,CAAGC,WAAW,EAAA,CAAA;IAC7E,MAAMC,KAAAA,GAAQC,YAAYR,OAAAA,EAAS,OAAA,CAAA,CAASS,GAAG,CAC3C,CAACC,QAAqB;AAClBC,YAAAA,KAAAA,EAAOC,aAAaF,IAAAA,EAAM,OAAA,CAAA;YAC1BG,IAAAA,EAAMD,YAAAA,CAAaF,MAAM,MAAA,CAAA,IAAWI,SAAAA;YACpCC,GAAAA,EAAKH,YAAAA,CAAaF,MAAM,cAAA,CAAA,GAAkB,CAAC,EAAE,EAAEE,YAAAA,CAAaF,IAAAA,EAAM,cAAA,CAAA,CAAA,CAAiB,GAAGI;SAC1F,CAAA,CAAA;AAGJ,IAAA,qBACIE,IAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,kBAAA;AAAmBC,QAAAA,eAAAA,EAAenB,QAAQoB,EAAE;;AACvD,0BAAAC,GAAA,CAACC,OAAOC,IAAI,EAAA;gBAACC,KAAAA,EA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AA;AAAMhB,oDAAAA,QAAAA,EAAAA,IAAAA,CAAKC;;;AAFKD,yCAAAA,EAAAA,IAAAA,CAAKC,KAAK,CAAA;;;;;;;;;AAYnE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"elementProperties.js","sources":["../../../shell/elementProperties.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 { ExternalComponent } from '@cratis/scene.model';\n\n/**\n * Typed reads out of a {@link SceneElement}'s open `properties` bag.\n *\n * The bag is `Record<string, unknown>` by design - it carries whatever a page template author wrote, and\n * Scene never re-validates it. A shell component that trusts it and reads `properties.label as string`\n * renders `[object Object]` or crashes the moment a template has a typo, so every read goes through one of\n * these instead and falls back to something renderable.\n */\n\n/** Reads a string property, or the fallback when it is absent or not a string. */\nexport function readString(element: ExternalComponent, name: string, fallback = ''): string {\n const value = element.properties[name];\n return typeof value === 'string' ? value : fallback;\n}\n\n/** Reads an optional string property, or `undefined` when it is absent or not a string. */\nexport function readOptionalString(element: ExternalComponent, name: string): string | undefined {\n const value = element.properties[name];\n return typeof value === 'string' ? value : undefined;\n}\n\n/** Reads a boolean property, or the fallback when it is absent or not a boolean. */\nexport function readBoolean(element: ExternalComponent, name: string, fallback = false): boolean {\n const value = element.properties[name];\n return typeof value === 'boolean' ? value : fallback;\n}\n\n/** Reads a number property, or the fallback when it is absent or not a number. */\nexport function readNumber(element: ExternalComponent, name: string, fallback = 0): number {\n const value = element.properties[name];\n return typeof value === 'number' ? value : fallback;\n}\n\n/** Reads an array of strings, or an empty array when the property is absent or holds anything else. */\nexport function readStrings(element: ExternalComponent, name: string): string[] {\n const value = element.properties[name];\n return Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === 'string') : [];\n}\n\n/**\n * Reads an array of objects - a breadcrumb trail, a set of table columns, a user menu's items.\n *\n * Entries that are not objects are dropped rather than rendered, for the same reason the scalar reads\n * fall back: half a table is a better failure than a thrown render.\n */\nexport function readRecords(element: ExternalComponent, name: string): Record<string, unknown>[] {\n const value = element.properties[name];\n if (!Array.isArray(value)) {\n return [];\n }\n\n return value.filter((entry): entry is Record<string, unknown> => typeof entry === 'object' && entry !== null && !Array.isArray(entry));\n}\n\n/** Reads a string out of one of {@link readRecords}' entries. */\nexport function recordString(record: Record<string, unknown>, name: string, fallback = ''): string {\n const value = record[name];\n return typeof value === 'string' ? value : fallback;\n}\n"],"names":["readString","element","name","fallback","value","properties","readOptionalString","undefined","readBoolean","readNumber","readStrings","Array","isArray","filter","entry","readRecords","recordString","record"],"mappings":"AAAA;AACA;AAIA;;;;;;;uFAUO,SAASA,UAAAA,CAAWC,OAA0B,EAAEC,IAAY,EAAEC,QAAAA,GAAW,EAAE,EAAA;AAC9E,IAAA,MAAMC,KAAAA,GAAQH,OAAAA,CAAQI,UAAU,CAACH,IAAAA,CAAK;IACtC,OAAO,OAAOE,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQD,QAAAA;AAC/C;AAEA,4FACO,SAASG,kBAAAA,CAAmBL,OAA0B,EAAEC,IAAY,EAAA;AACvE,IAAA,MAAME,KAAAA,GAAQH,OAAAA,CAAQI,UAAU,CAACH,IAAAA,CAAK;IACtC,OAAO,OAAOE,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQG,SAAAA;AAC/C;AAEA,qFACO,SAASC,WAAAA,CAAYP,OAA0B,EAAEC,IAAY,EAAEC,QAAAA,GAAW,KAAK,EAAA;AAClF,IAAA,MAAMC,KAAAA,GAAQH,OAAAA,CAAQI,UAAU,CAACH,IAAAA,CAAK;IACtC,OAAO,OAAOE,KAAAA,KAAU,SAAA,GAAYA,KAAAA,GAAQD,QAAAA;AAChD;AAEA,mFACO,SAASM,UAAAA,CAAWR,OAA0B,EAAEC,IAAY,EAAEC,QAAAA,GAAW,CAAC,EAAA;AAC7E,IAAA,MAAMC,KAAAA,GAAQH,OAAAA,CAAQI,UAAU,CAACH,IAAAA,CAAK;IACtC,OAAO,OAAOE,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQD,QAAAA;AAC/C;AAEA,wGACO,SAASO,WAAAA,CAAYT,OAA0B,EAAEC,IAAY,EAAA;AAChE,IAAA,MAAME,KAAAA,GAAQH,OAAAA,CAAQI,UAAU,CAACH,IAAAA,CAAK;AACtC,IAAA,OAAOS,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,GAASA,KAAAA,CAAMS,MAAM,CAAC,CAACC,KAAAA,GAA2B,OAAOA,KAAAA,KAAU,QAAA,CAAA,GAAY,EAAE;AAC1G;AAEA;;;;;AAKC,IACM,SAASC,WAAAA,CAAYd,OAA0B,EAAEC,IAAY,EAAA;AAChE,IAAA,MAAME,KAAAA,GAAQH,OAAAA,CAAQI,UAAU,CAACH,IAAAA,CAAK;AACtC,IAAA,IAAI,CAACS,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,EAAQ;AACvB,QAAA,OAAO,EAAE;AACb,IAAA;AAEA,IAAA,OAAOA,KAAAA,CAAMS,MAAM,CAAC,CAACC,KAAAA,GAA4C,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACH,KAAAA,CAAMC,OAAO,CAACE,KAAAA,CAAAA,CAAAA;AACnI;AAEA,kEACO,SAASE,YAAAA,CAAaC,MAA+B,EAAEf,IAAY,EAAEC,QAAAA,GAAW,EAAE,EAAA;IACrF,MAAMC,KAAAA,GAAQa,MAAM,CAACf,IAAAA,CAAK;IAC1B,OAAO,OAAOE,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQD,QAAAA;AAC/C;;;;"}
1
+ {"version":3,"file":"elementProperties.js","sources":["../../../shell/elementProperties.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 { ExternalComponent } from '@cratis/scene.model';\n\n/**\n * Typed reads out of a {@link SceneElement}'s open `properties` bag.\n *\n * The bag is `Record<string, unknown>` by design - it carries whatever a page template author wrote, and\n * Scene never re-validates it. A shell component that trusts it and reads `properties.label as string`\n * renders `[object Object]` or crashes the moment a template has a typo, so every read goes through one of\n * these instead and falls back to something renderable.\n */\n\n/** Reads a string property, or the fallback when it is absent or not a string. */\nexport function readString(element: ExternalComponent, name: string, fallback = ''): string {\n const value = element.properties[name];\n return typeof value === 'string' ? value : fallback;\n}\n\n/** Reads an optional string property, or `undefined` when it is absent or not a string. */\nexport function readOptionalString(element: ExternalComponent, name: string): string | undefined {\n const value = element.properties[name];\n return typeof value === 'string' ? value : undefined;\n}\n\n/** Reads a boolean property, or the fallback when it is absent or not a boolean. */\nexport function readBoolean(element: ExternalComponent, name: string, fallback = false): boolean {\n const value = element.properties[name];\n return typeof value === 'boolean' ? value : fallback;\n}\n\n/** Reads a number property, or the fallback when it is absent or not a number. */\nexport function readNumber(element: ExternalComponent, name: string, fallback = 0): number {\n const value = element.properties[name];\n return typeof value === 'number' ? value : fallback;\n}\n\n/** Reads an array of strings, or an empty array when the property is absent or holds anything else. */\nexport function readStrings(element: ExternalComponent, name: string): string[] {\n const value = element.properties[name];\n return Array.isArray(value) ? value.filter((entry): entry is string => typeof entry === 'string') : [];\n}\n\n/**\n * Reads an array of objects - a breadcrumb trail, a set of table columns, a user menu's items.\n *\n * Entries that are not objects are dropped rather than rendered, for the same reason the scalar reads\n * fall back: half a table is a better failure than a thrown render.\n */\nexport function readRecords(element: ExternalComponent, name: string): Record<string, unknown>[] {\n const value = element.properties[name];\n if (!Array.isArray(value)) {\n return [];\n }\n\n return value.filter((entry): entry is Record<string, unknown> => typeof entry === 'object' && entry !== null && !Array.isArray(entry));\n}\n\n/** Reads a string out of one of {@link readRecords}' entries. */\nexport function recordString(record: Record<string, unknown>, name: string, fallback = ''): string {\n const value = record[name];\n return typeof value === 'string' ? value : fallback;\n}\n"],"names":["readString","element","name","fallback","value","properties","readOptionalString","undefined","readBoolean","readNumber","readStrings","Array","isArray","filter","entry","readRecords","recordString","record"],"mappings":"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;;;AAKC,IACM,SAASC,WAAAA,CAAYd,OAA0B,EAAEC,IAAY,EAAA;AAChE,IAAA,MAAME,KAAAA,GAAQH,OAAAA,CAAQI,UAAU,CAACH,IAAAA,CAAK;AACtC,IAAA,IAAI,CAACS,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,EAAQ;AACvB,QAAA,OAAO,EAAE;AACb,IAAA;AAEA,IAAA,OAAOA,KAAAA,CAAMS,MAAM,CAAC,CAACC,KAAAA,GAA4C,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACH,KAAAA,CAAMC,OAAO,CAACE,KAAAA,CAAAA,CAAAA;AACnI;AAEA,kEACO,SAASE,YAAAA,CAAaC,MAA+B,EAAEf,IAAY,EAAEC,QAAAA,GAAW,EAAE,EAAA;IACrF,MAAMC,KAAAA,GAAQa,MAAM,CAACf,IAAAA,CAAK;IAC1B,OAAO,OAAOE,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQD,QAAAA;AAC/C;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutThemeProvider.js","sources":["../../../themes/LayoutThemeProvider.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode, useMemo } from 'react';\nimport { Theme } from '@cratis/scene.model';\nimport { SceneThemeProvider } from '@cratis/scene.react';\nimport { useLayoutConfig } from '../configuration';\nimport { defaultBlueprintThemes } from './defaultBlueprintThemes';\n\nexport interface LayoutThemeProviderProps {\n /** The themes to choose between. Defaults to the two this package ships. */\n themes?: Theme[];\n\n /** The shell the chosen theme applies to. */\n children?: ReactNode;\n\n /** A class name for the element the tokens land on. */\n className?: string;\n}\n\n/**\n * Applies whichever theme the shell's configuration currently names.\n *\n * This is the seam between the configurator and `SceneThemeProvider`: the configurator only ever records\n * a name, and this resolves that name against the theme set a host offers. Keeping the shell's state\n * free of the theme object itself is what lets a host swap in an entirely different theme set - its own\n * brand palettes - without the configurator or any shell component changing.\n *\n * Switching is live re-resolution, not a reload: `SceneThemeProvider` writes the new tokens onto the same\n * element, so nothing below it remounts and no state is lost.\n */\nexport function LayoutThemeProvider({ themes = defaultBlueprintThemes, children, className }: LayoutThemeProviderProps) {\n const { config } = useLayoutConfig();\n const theme = useMemo(() => themes.find(candidate => candidate.name === config.themeName) ?? themes[0], [themes, config.themeName]);\n\n return (\n <SceneThemeProvider theme={theme} className={className}>\n {children}\n </SceneThemeProvider>\n );\n}\n"],"names":["LayoutThemeProvider","themes","defaultBlueprintThemes","children","className","config","useLayoutConfig","theme","useMemo","find","candidate","name","themeName","_jsx","SceneThemeProvider"],"mappings":";;;;;;AAoBA;;;;;;;;;;IAWO,SAASA,mBAAAA,CAAoB,EAAEC,MAAAA,GAASC,sBAAsB,EAAEC,QAAQ,EAAEC,SAAS,EAA4B,EAAA;IAClH,MAAM,EAAEC,MAAM,EAAE,GAAGC,eAAAA,EAAAA;AACnB,IAAA,MAAMC,QAAQC,OAAAA,CAAQ,IAAMP,MAAAA,CAAOQ,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUC,IAAI,KAAKN,MAAAA,CAAOO,SAAS,KAAKX,MAAM,CAAC,EAAE,EAAE;AAACA,QAAAA,MAAAA;AAAQI,QAAAA,MAAAA,CAAOO;AAAU,KAAA,CAAA;AAElI,IAAA,qBACIC,GAAA,CAACC,kBAAAA,EAAAA;QAAmBP,KAAAA,EAAOA,KAAAA;QAAOH,SAAAA,EAAWA,SAAAA;AACxCD,QAAAA,QAAAA,EAAAA;;AAGb;;;;"}
1
+ {"version":3,"file":"LayoutThemeProvider.js","sources":["../../../themes/LayoutThemeProvider.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode, useMemo } from 'react';\nimport { Theme } from '@cratis/scene.model';\nimport { SceneThemeProvider } from '@cratis/scene.react';\nimport { useLayoutConfig } from '../configuration';\nimport { defaultBlueprintThemes } from './defaultBlueprintThemes';\n\nexport interface LayoutThemeProviderProps {\n /** The themes to choose between. Defaults to the two this package ships. */\n themes?: Theme[];\n\n /** The shell the chosen theme applies to. */\n children?: ReactNode;\n\n /** A class name for the element the tokens land on. */\n className?: string;\n}\n\n/**\n * Applies whichever theme the shell's configuration currently names.\n *\n * This is the seam between the configurator and `SceneThemeProvider`: the configurator only ever records\n * a name, and this resolves that name against the theme set a host offers. Keeping the shell's state\n * free of the theme object itself is what lets a host swap in an entirely different theme set - its own\n * brand palettes - without the configurator or any shell component changing.\n *\n * Switching is live re-resolution, not a reload: `SceneThemeProvider` writes the new tokens onto the same\n * element, so nothing below it remounts and no state is lost.\n */\nexport function LayoutThemeProvider({ themes = defaultBlueprintThemes, children, className }: LayoutThemeProviderProps) {\n const { config } = useLayoutConfig();\n const theme = useMemo(() => themes.find(candidate => candidate.name === config.themeName) ?? themes[0], [themes, config.themeName]);\n\n return (\n <SceneThemeProvider theme={theme} className={className}>\n {children}\n </SceneThemeProvider>\n );\n}\n"],"names":["LayoutThemeProvider","themes","defaultBlueprintThemes","children","className","config","useLayoutConfig","theme","useMemo","find","candidate","name","themeName","_jsx","SceneThemeProvider"],"mappings":";;;;;;AAoBA;;;;;;;;;;IAWO,SAASA,mBAAAA,CAAoB,EAAEC,MAAAA,GAASC,sBAAsB,EAAEC,QAAQ,EAAEC,SAAS,EAA4B,EAAA;IAClH,MAAM,EAAEC,MAAM,EAAE,GAAGC,eAAAA,EAAAA;AACnB,IAAA,MAAMC,QAAQC,OAAAA,CAAQ,IAAMP,MAAAA,CAAOQ,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUC,IAAI,KAAKN,MAAAA,CAAOO,SAAS,KAAKX,MAAM,CAAC,EAAE,EAAE;AAACA,QAAAA,MAAAA;AAAQI,QAAAA,MAAAA,CAAOO;AAAU,KAAA,CAAA;AAElI,IAAA,qBACIC,GAAA,CAACC,kBAAAA,EAAAA;QAAmBP,KAAAA,EAAOA,KAAAA;QAAOH,SAAAA,EAAWA,SAAAA;AACxCD,QAAAA,QAAAA,EAAAA;;AAGb;;"}