@cratis/scene.components 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/cjs/bindings/ArcRuntimeBoundary.js.map +1 -1
  2. package/dist/cjs/bindings/BindingKind.js.map +1 -1
  3. package/dist/cjs/bindings/MissingBinding.js.map +1 -1
  4. package/dist/cjs/bindings/Placeholder.js.map +1 -1
  5. package/dist/cjs/bindings/bindingRegistry.js.map +1 -1
  6. package/dist/cjs/bindings/resolveElementBinding.js.map +1 -1
  7. package/dist/cjs/common/SceneDropdown.js.map +1 -1
  8. package/dist/cjs/common/SceneErrorBoundary.js.map +1 -1
  9. package/dist/cjs/common/SceneIcon.js.map +1 -1
  10. package/dist/cjs/common/SceneTooltip.js.map +1 -1
  11. package/dist/cjs/cratisComponents.js.map +1 -1
  12. package/dist/cjs/cratisComponentsPackage.js.map +1 -1
  13. package/dist/cjs/data/SceneDataTable.js.map +1 -1
  14. package/dist/cjs/data/SceneObservableDataTable.js.map +1 -1
  15. package/dist/cjs/dialogs/SceneBusyIndicatorDialog.js.map +1 -1
  16. package/dist/cjs/dialogs/SceneCommandDialog.js.map +1 -1
  17. package/dist/cjs/dialogs/SceneConfirmationDialog.js.map +1 -1
  18. package/dist/cjs/dialogs/SceneDialog.js.map +1 -1
  19. package/dist/cjs/dialogs/SceneStepperCommandDialog.js.map +1 -1
  20. package/dist/cjs/editors/SceneFilterPanel.js.map +1 -1
  21. package/dist/cjs/editors/SceneObjectContentEditor.js.map +1 -1
  22. package/dist/cjs/editors/SceneObjectNavigationalBar.js.map +1 -1
  23. package/dist/cjs/editors/SceneSchemaEditor.js.map +1 -1
  24. package/dist/cjs/editors/SceneTimeMachine.js.map +1 -1
  25. package/dist/cjs/editors/filterDefinitions.js.map +1 -1
  26. package/dist/cjs/editors/timeMachineVersions.js.map +1 -1
  27. package/dist/cjs/editors/useEditableCopy.js.map +1 -1
  28. package/dist/cjs/forms/SceneCommandForm.js.map +1 -1
  29. package/dist/cjs/forms/fields/CommandFormField.js.map +1 -1
  30. package/dist/cjs/forms/fields/SceneCalendarField.js.map +1 -1
  31. package/dist/cjs/forms/fields/SceneCheckboxField.js.map +1 -1
  32. package/dist/cjs/forms/fields/SceneChipsField.js.map +1 -1
  33. package/dist/cjs/forms/fields/SceneColorPickerField.js.map +1 -1
  34. package/dist/cjs/forms/fields/SceneDropdownField.js.map +1 -1
  35. package/dist/cjs/forms/fields/SceneInputTextField.js.map +1 -1
  36. package/dist/cjs/forms/fields/SceneMultiSelectField.js.map +1 -1
  37. package/dist/cjs/forms/fields/SceneNumberField.js.map +1 -1
  38. package/dist/cjs/forms/fields/SceneRadioButtonField.js.map +1 -1
  39. package/dist/cjs/forms/fields/SceneRadioGroupField.js.map +1 -1
  40. package/dist/cjs/forms/fields/SceneSliderField.js.map +1 -1
  41. package/dist/cjs/forms/fields/SceneTextAreaField.js.map +1 -1
  42. package/dist/cjs/forms/fields/resolveFieldBinding.js.map +1 -1
  43. package/dist/cjs/pages/SceneDataPage.js.map +1 -1
  44. package/dist/cjs/pages/SceneFormElement.js.map +1 -1
  45. package/dist/cjs/pages/ScenePage.js.map +1 -1
  46. package/dist/cjs/properties.js.map +1 -1
  47. package/dist/cjs/toolbar/SceneToolbar.js.map +1 -1
  48. package/dist/cjs/toolbar/SceneToolbarButton.js.map +1 -1
  49. package/dist/cjs/toolbar/SceneToolbarGroup.js.map +1 -1
  50. package/dist/cjs/toolbar/SceneToolbarSeparator.js.map +1 -1
  51. package/dist/esm/bindings/ArcRuntimeBoundary.js.map +1 -1
  52. package/dist/esm/bindings/BindingKind.js.map +1 -1
  53. package/dist/esm/bindings/MissingBinding.js.map +1 -1
  54. package/dist/esm/bindings/Placeholder.js.map +1 -1
  55. package/dist/esm/bindings/bindingRegistry.js.map +1 -1
  56. package/dist/esm/bindings/resolveElementBinding.js.map +1 -1
  57. package/dist/esm/common/SceneDropdown.js.map +1 -1
  58. package/dist/esm/common/SceneErrorBoundary.js.map +1 -1
  59. package/dist/esm/common/SceneIcon.js.map +1 -1
  60. package/dist/esm/common/SceneTooltip.js.map +1 -1
  61. package/dist/esm/cratisComponents.js.map +1 -1
  62. package/dist/esm/cratisComponentsPackage.js.map +1 -1
  63. package/dist/esm/data/SceneDataTable.js.map +1 -1
  64. package/dist/esm/data/SceneObservableDataTable.js.map +1 -1
  65. package/dist/esm/dialogs/SceneBusyIndicatorDialog.js.map +1 -1
  66. package/dist/esm/dialogs/SceneCommandDialog.js.map +1 -1
  67. package/dist/esm/dialogs/SceneConfirmationDialog.js.map +1 -1
  68. package/dist/esm/dialogs/SceneDialog.js.map +1 -1
  69. package/dist/esm/dialogs/SceneStepperCommandDialog.js.map +1 -1
  70. package/dist/esm/editors/SceneFilterPanel.js.map +1 -1
  71. package/dist/esm/editors/SceneObjectContentEditor.js.map +1 -1
  72. package/dist/esm/editors/SceneObjectNavigationalBar.js.map +1 -1
  73. package/dist/esm/editors/SceneSchemaEditor.js.map +1 -1
  74. package/dist/esm/editors/SceneTimeMachine.js.map +1 -1
  75. package/dist/esm/editors/filterDefinitions.js.map +1 -1
  76. package/dist/esm/editors/timeMachineVersions.js.map +1 -1
  77. package/dist/esm/editors/useEditableCopy.js.map +1 -1
  78. package/dist/esm/forms/SceneCommandForm.js.map +1 -1
  79. package/dist/esm/forms/fields/CommandFormField.js.map +1 -1
  80. package/dist/esm/forms/fields/SceneCalendarField.js.map +1 -1
  81. package/dist/esm/forms/fields/SceneCheckboxField.js.map +1 -1
  82. package/dist/esm/forms/fields/SceneChipsField.js.map +1 -1
  83. package/dist/esm/forms/fields/SceneColorPickerField.js.map +1 -1
  84. package/dist/esm/forms/fields/SceneDropdownField.js.map +1 -1
  85. package/dist/esm/forms/fields/SceneInputTextField.js.map +1 -1
  86. package/dist/esm/forms/fields/SceneMultiSelectField.js.map +1 -1
  87. package/dist/esm/forms/fields/SceneNumberField.js.map +1 -1
  88. package/dist/esm/forms/fields/SceneRadioButtonField.js.map +1 -1
  89. package/dist/esm/forms/fields/SceneRadioGroupField.js.map +1 -1
  90. package/dist/esm/forms/fields/SceneSliderField.js.map +1 -1
  91. package/dist/esm/forms/fields/SceneTextAreaField.js.map +1 -1
  92. package/dist/esm/forms/fields/resolveFieldBinding.js.map +1 -1
  93. package/dist/esm/pages/SceneDataPage.js.map +1 -1
  94. package/dist/esm/pages/SceneFormElement.js.map +1 -1
  95. package/dist/esm/pages/ScenePage.js.map +1 -1
  96. package/dist/esm/properties.js.map +1 -1
  97. package/dist/esm/toolbar/SceneToolbar.js.map +1 -1
  98. package/dist/esm/toolbar/SceneToolbarButton.js.map +1 -1
  99. package/dist/esm/toolbar/SceneToolbarGroup.js.map +1 -1
  100. package/dist/esm/toolbar/SceneToolbarSeparator.js.map +1 -1
  101. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  102. package/package.json +15 -15
@@ -1 +1 @@
1
- {"version":3,"file":"SceneDropdownField.js","sources":["../../../../forms/fields/SceneDropdownField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { objectArrayProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst DropdownField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).DropdownField }));\n\n/**\n * The `Cratis.Components:dropdownField` component - `DropdownField` from `@cratis/components/CommandForm`.\n *\n * Single selection from a fixed list the screen carries inline. `optionLabel` and `optionValue` default\n * to `label` and `value`, the shape an authored list takes when nobody says otherwise, so the common\n * case needs only `options`.\n *\n * Options that have to come from the backend are a different component: bind the list to a query with\n * `dataTable`, or register the lookup as its own query. A property bag is the wrong place for data.\n */\nexport function SceneDropdownField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <DropdownField\n {...binding}\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n placeholder={stringProperty(element.properties, 'placeholder')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["DropdownField","lazy","default","SceneDropdownField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","className"],"mappings":";;;;;AAQA,MAAMA,aAAAA,iBAAgBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;;;;;AASC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;AACXC,gBAAAA,OAAAA,EAASC,mBAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;gBAClEI,WAAAA,EAAaF,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDK,SAAAA,EAAWH,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
1
+ {"version":3,"file":"SceneDropdownField.js","sources":["../../../../forms/fields/SceneDropdownField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { objectArrayProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst DropdownField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).DropdownField }));\n\n/**\n * The `Cratis.Components:dropdownField` component - `DropdownField` from `@cratis/components/CommandForm`.\n *\n * Single selection from a fixed list the screen carries inline. `optionLabel` and `optionValue` default\n * to `label` and `value`, the shape an authored list takes when nobody says otherwise, so the common\n * case needs only `options`.\n *\n * Options that have to come from the backend are a different component: bind the list to a query with\n * `dataTable`, or register the lookup as its own query. A property bag is the wrong place for data.\n */\nexport function SceneDropdownField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <DropdownField\n {...binding}\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n placeholder={stringProperty(element.properties, 'placeholder')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["DropdownField","lazy","default","SceneDropdownField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","className"],"mappings":";;;;;AAQA,MAAMA,aAAAA,iBAAgBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;;;;;AASC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;AACXC,gBAAAA,OAAAA,EAASC,mBAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;gBAClEI,WAAAA,EAAaF,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDK,SAAAA,EAAWH,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneInputTextField.js","sources":["../../../../forms/fields/SceneInputTextField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst InputTextField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).InputTextField }));\n\n/**\n * The HTML input types `InputTextField` supports, as a tuple so `unionProperty` narrows an authored\n * string to exactly one of them and falls back to the component's own default for anything else.\n */\nconst inputTypes = ['text', 'email', 'password', 'color', 'date', 'datetime-local', 'time', 'url', 'tel', 'search'] as const;\n\n/**\n * The `Cratis.Components:inputTextField` component - `InputTextField` from `@cratis/components/CommandForm`.\n *\n * The single-line text field, and the one a screen reaches for most. `type` carries all the way through\n * to the HTML input, so `email`, `password` and `url` fields are this component too rather than separate\n * names - the browser's own keyboard and validation behavior is what differs, not the binding.\n */\nexport function SceneInputTextField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <InputTextField\n {...binding}\n type={unionProperty(element.properties, 'type', inputTypes)}\n placeholder={stringProperty(element.properties, 'placeholder')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["InputTextField","lazy","default","inputTypes","SceneInputTextField","element","_jsx","CommandFormField","binding","type","unionProperty","properties","placeholder","stringProperty","className"],"mappings":";;;;;AAQA,MAAMA,cAAAA,iBAAiBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAe,CAAA,CAAA;AAEpH;;;AAGC,IACD,MAAMG,UAAAA,GAAa;AAAC,IAAA,MAAA;AAAQ,IAAA,OAAA;AAAS,IAAA,UAAA;AAAY,IAAA,OAAA;AAAS,IAAA,MAAA;AAAQ,IAAA,gBAAA;AAAkB,IAAA,MAAA;AAAQ,IAAA,KAAA;AAAO,IAAA,KAAA;AAAO,IAAA;AAAS,CAAA;AAEnH;;;;;;AAMC,IACM,SAASC,mBAAAA,CAAoB,EAAEC,OAAO,EAA4B,EAAA;AACrE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACN,cAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;AACXC,gBAAAA,IAAAA,EAAMC,aAAAA,CAAcL,OAAAA,CAAQM,UAAU,EAAE,MAAA,EAAQR,UAAAA,CAAAA;gBAChDS,WAAAA,EAAaC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDG,SAAAA,EAAWD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
1
+ {"version":3,"file":"SceneInputTextField.js","sources":["../../../../forms/fields/SceneInputTextField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst InputTextField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).InputTextField }));\n\n/**\n * The HTML input types `InputTextField` supports, as a tuple so `unionProperty` narrows an authored\n * string to exactly one of them and falls back to the component's own default for anything else.\n */\nconst inputTypes = ['text', 'email', 'password', 'color', 'date', 'datetime-local', 'time', 'url', 'tel', 'search'] as const;\n\n/**\n * The `Cratis.Components:inputTextField` component - `InputTextField` from `@cratis/components/CommandForm`.\n *\n * The single-line text field, and the one a screen reaches for most. `type` carries all the way through\n * to the HTML input, so `email`, `password` and `url` fields are this component too rather than separate\n * names - the browser's own keyboard and validation behavior is what differs, not the binding.\n */\nexport function SceneInputTextField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <InputTextField\n {...binding}\n type={unionProperty(element.properties, 'type', inputTypes)}\n placeholder={stringProperty(element.properties, 'placeholder')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["InputTextField","lazy","default","inputTypes","SceneInputTextField","element","_jsx","CommandFormField","binding","type","unionProperty","properties","placeholder","stringProperty","className"],"mappings":";;;;;AAQA,MAAMA,cAAAA,iBAAiBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAe,CAAA,CAAA;AAEpH;;;AAGC,IACD,MAAMG,UAAAA,GAAa;AAAC,IAAA,MAAA;AAAQ,IAAA,OAAA;AAAS,IAAA,UAAA;AAAY,IAAA,OAAA;AAAS,IAAA,MAAA;AAAQ,IAAA,gBAAA;AAAkB,IAAA,MAAA;AAAQ,IAAA,KAAA;AAAO,IAAA,KAAA;AAAO,IAAA;AAAS,CAAA;AAEnH;;;;;;AAMC,IACM,SAASC,mBAAAA,CAAoB,EAAEC,OAAO,EAA4B,EAAA;AACrE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACN,cAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;AACXC,gBAAAA,IAAAA,EAAMC,aAAAA,CAAcL,OAAAA,CAAQM,UAAU,EAAE,MAAA,EAAQR,UAAAA,CAAAA;gBAChDS,WAAAA,EAAaC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDG,SAAAA,EAAWD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneMultiSelectField.js","sources":["../../../../forms/fields/SceneMultiSelectField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, objectArrayProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst MultiSelectField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).MultiSelectField }));\n\n/**\n * The `Cratis.Components:multiSelectField` component - `MultiSelectField` from\n * `@cratis/components/CommandForm`.\n *\n * The many-valued counterpart to `dropdownField`, binding to a collection property on the command rather\n * than a scalar one.\n *\n * The `display` and `maxSelectedLabels` properties this adapter used to expose are gone. In\n * `@cratis/components` 3.0.0 the field is re-expressed over the library's own `Dropdown` in multiple\n * mode, because PrimeReact 11's `Select` has no `multiple` prop of the version 10 shape and renders the\n * selection through its own value slot - so there is no comma mode, no chip mode, and no label-collapse\n * threshold left to choose between. Both props are still declared upstream so call sites compile, and\n * neither is read. Passing them on would have let a screen state a preference the control cannot honor.\n */\nexport function SceneMultiSelectField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <MultiSelectField\n {...binding}\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n placeholder={stringProperty(element.properties, 'placeholder')}\n filter={booleanProperty(element.properties, 'filter')}\n showClear={booleanProperty(element.properties, 'showClear')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["MultiSelectField","lazy","default","SceneMultiSelectField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","filter","booleanProperty","showClear","className"],"mappings":";;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;;;;AAaC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,gBAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;AACXC,gBAAAA,OAAAA,EAASC,mBAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;gBAClEI,WAAAA,EAAaF,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDK,MAAAA,EAAQC,eAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;gBAC5CO,SAAAA,EAAWD,eAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;gBAC/CQ,SAAAA,EAAWN,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
1
+ {"version":3,"file":"SceneMultiSelectField.js","sources":["../../../../forms/fields/SceneMultiSelectField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, objectArrayProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst MultiSelectField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).MultiSelectField }));\n\n/**\n * The `Cratis.Components:multiSelectField` component - `MultiSelectField` from\n * `@cratis/components/CommandForm`.\n *\n * The many-valued counterpart to `dropdownField`, binding to a collection property on the command rather\n * than a scalar one.\n *\n * The `display` and `maxSelectedLabels` properties this adapter used to expose are gone. In\n * `@cratis/components` 3.0.0 the field is re-expressed over the library's own `Dropdown` in multiple\n * mode, because PrimeReact 11's `Select` has no `multiple` prop of the version 10 shape and renders the\n * selection through its own value slot - so there is no comma mode, no chip mode, and no label-collapse\n * threshold left to choose between. Both props are still declared upstream so call sites compile, and\n * neither is read. Passing them on would have let a screen state a preference the control cannot honor.\n */\nexport function SceneMultiSelectField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <MultiSelectField\n {...binding}\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n placeholder={stringProperty(element.properties, 'placeholder')}\n filter={booleanProperty(element.properties, 'filter')}\n showClear={booleanProperty(element.properties, 'showClear')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["MultiSelectField","lazy","default","SceneMultiSelectField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","filter","booleanProperty","showClear","className"],"mappings":";;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;;;;AAaC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,gBAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;AACXC,gBAAAA,OAAAA,EAASC,mBAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;gBAClEI,WAAAA,EAAaF,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDK,MAAAA,EAAQC,eAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;gBAC5CO,SAAAA,EAAWD,eAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;gBAC/CQ,SAAAA,EAAWN,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneNumberField.js","sources":["../../../../forms/fields/SceneNumberField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst NumberField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).NumberField }));\n\n/**\n * The `Cratis.Components:numberField` component - `NumberField` from `@cratis/components/CommandForm`.\n *\n * PrimeReact's `InputNumber` behind the command binding, so the bound property stays a number rather\n * than the string an `<input type=\"number\">` would hand back. `min`, `max` and `step` are client-side\n * affordances only - the authoritative check is still the backend's validation on the command.\n */\nexport function SceneNumberField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <NumberField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n min={numberProperty(element.properties, 'min')}\n max={numberProperty(element.properties, 'max')}\n step={numberProperty(element.properties, 'step')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["NumberField","lazy","default","SceneNumberField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","min","numberProperty","max","step","className"],"mappings":";;;;;AAQA,MAAMA,WAAAA,iBAAcC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAY,CAAA,CAAA;AAE9G;;;;;;AAMC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,WAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,GAAAA,EAAKC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCG,GAAAA,EAAKD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCI,IAAAA,EAAMF,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCK,SAAAA,EAAWN,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
1
+ {"version":3,"file":"SceneNumberField.js","sources":["../../../../forms/fields/SceneNumberField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst NumberField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).NumberField }));\n\n/**\n * The `Cratis.Components:numberField` component - `NumberField` from `@cratis/components/CommandForm`.\n *\n * PrimeReact's `InputNumber` behind the command binding, so the bound property stays a number rather\n * than the string an `<input type=\"number\">` would hand back. `min`, `max` and `step` are client-side\n * affordances only - the authoritative check is still the backend's validation on the command.\n */\nexport function SceneNumberField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <NumberField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n min={numberProperty(element.properties, 'min')}\n max={numberProperty(element.properties, 'max')}\n step={numberProperty(element.properties, 'step')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["NumberField","lazy","default","SceneNumberField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","min","numberProperty","max","step","className"],"mappings":";;;;;AAQA,MAAMA,WAAAA,iBAAcC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAY,CAAA,CAAA;AAE9G;;;;;;AAMC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,WAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,GAAAA,EAAKC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCG,GAAAA,EAAKD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCI,IAAAA,EAAMF,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCK,SAAAA,EAAWN,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneRadioButtonField.js","sources":["../../../../forms/fields/SceneRadioButtonField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioButtonField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioButtonField }));\n\n/**\n * The `Cratis.Components:radioButtonField` component - `RadioButtonField` from\n * `@cratis/components/CommandForm`.\n *\n * One button of a mutually exclusive set, for a screen that needs the choices placed individually rather\n * than as a block. `buttonValue` is the value this particular button writes to the bound property, and\n * the whole set is tied together by every button naming the same `property`.\n *\n * `buttonValue` is read as a string first and a number second, since a choice is usually a string but a\n * numeric code is common enough that forcing it through as `'1'` would bind the wrong value.\n */\nexport function SceneRadioButtonField({ element }: RegisteredComponentProps) {\n const buttonValue = stringProperty(element.properties, 'buttonValue') ?? numberProperty(element.properties, 'buttonValue') ?? '';\n\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioButtonField\n {...binding}\n buttonValue={buttonValue}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioButtonField","lazy","default","SceneRadioButtonField","element","buttonValue","stringProperty","properties","numberProperty","_jsx","CommandFormField","binding","label","className"],"mappings":";;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;AAUC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;IACvE,MAAMC,WAAAA,GAAcC,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,kBAAkBC,cAAAA,CAAeJ,OAAAA,CAAQG,UAAU,EAAE,aAAA,CAAA,IAAkB,EAAA;AAE9H,IAAA,qBACIE,GAAA,CAACC,gBAAAA,EAAAA;QAAiBN,OAAAA,EAASA,OAAAA;AACtBO,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACT,gBAAAA,EAAAA;AACI,gBAAA,GAAGW,OAAO;gBACXN,WAAAA,EAAaA,WAAAA;gBACbO,KAAAA,EAAON,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA;gBAC1CM,SAAAA,EAAWP,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
1
+ {"version":3,"file":"SceneRadioButtonField.js","sources":["../../../../forms/fields/SceneRadioButtonField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioButtonField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioButtonField }));\n\n/**\n * The `Cratis.Components:radioButtonField` component - `RadioButtonField` from\n * `@cratis/components/CommandForm`.\n *\n * One button of a mutually exclusive set, for a screen that needs the choices placed individually rather\n * than as a block. `buttonValue` is the value this particular button writes to the bound property, and\n * the whole set is tied together by every button naming the same `property`.\n *\n * `buttonValue` is read as a string first and a number second, since a choice is usually a string but a\n * numeric code is common enough that forcing it through as `'1'` would bind the wrong value.\n */\nexport function SceneRadioButtonField({ element }: RegisteredComponentProps) {\n const buttonValue = stringProperty(element.properties, 'buttonValue') ?? numberProperty(element.properties, 'buttonValue') ?? '';\n\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioButtonField\n {...binding}\n buttonValue={buttonValue}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioButtonField","lazy","default","SceneRadioButtonField","element","buttonValue","stringProperty","properties","numberProperty","_jsx","CommandFormField","binding","label","className"],"mappings":";;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;AAUC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;IACvE,MAAMC,WAAAA,GAAcC,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,kBAAkBC,cAAAA,CAAeJ,OAAAA,CAAQG,UAAU,EAAE,aAAA,CAAA,IAAkB,EAAA;AAE9H,IAAA,qBACIE,GAAA,CAACC,gBAAAA,EAAAA;QAAiBN,OAAAA,EAASA,OAAAA;AACtBO,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACT,gBAAAA,EAAAA;AACI,gBAAA,GAAGW,OAAO;gBACXN,WAAAA,EAAaA,WAAAA;gBACbO,KAAAA,EAAON,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA;gBAC1CM,SAAAA,EAAWP,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,WAAA;;;AAKlE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneRadioGroupField.js","sources":["../../../../forms/fields/SceneRadioGroupField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { objectArrayProperty, stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioGroupField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioGroupField }));\n\n/** Whether the group's buttons stack or sit in a row. */\nconst layouts = ['horizontal', 'vertical'] as const;\n\n/**\n * The `Cratis.Components:radioGroupField` component - `RadioGroupField` from\n * `@cratis/components/CommandForm`.\n *\n * A whole mutually exclusive choice from one options list, which is what a screen almost always wants.\n * Use `radioButtonField` only when the individual buttons have to be placed apart from one another.\n */\nexport function SceneRadioGroupField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioGroupField\n {...binding}\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n layout={unionProperty(element.properties, 'layout', layouts)}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioGroupField","lazy","default","layouts","SceneRadioGroupField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","layout","unionProperty","className"],"mappings":";;;;;AAQA,MAAMA,eAAAA,iBAAkBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAgB,CAAA,CAAA;AAEtH,0DACA,MAAMG,OAAAA,GAAU;AAAC,IAAA,YAAA;AAAc,IAAA;AAAW,CAAA;AAE1C;;;;;;AAMC,IACM,SAASC,oBAAAA,CAAqB,EAAEC,OAAO,EAA4B,EAAA;AACtE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACN,eAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;AACXC,gBAAAA,OAAAA,EAASC,mBAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEI,gBAAAA,MAAAA,EAAQC,aAAAA,CAAcX,OAAAA,CAAQM,UAAU,EAAE,QAAA,EAAUR,OAAAA,CAAAA;gBACpDc,SAAAA,EAAWJ,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
1
+ {"version":3,"file":"SceneRadioGroupField.js","sources":["../../../../forms/fields/SceneRadioGroupField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { objectArrayProperty, stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioGroupField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioGroupField }));\n\n/** Whether the group's buttons stack or sit in a row. */\nconst layouts = ['horizontal', 'vertical'] as const;\n\n/**\n * The `Cratis.Components:radioGroupField` component - `RadioGroupField` from\n * `@cratis/components/CommandForm`.\n *\n * A whole mutually exclusive choice from one options list, which is what a screen almost always wants.\n * Use `radioButtonField` only when the individual buttons have to be placed apart from one another.\n */\nexport function SceneRadioGroupField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioGroupField\n {...binding}\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n layout={unionProperty(element.properties, 'layout', layouts)}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioGroupField","lazy","default","layouts","SceneRadioGroupField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","layout","unionProperty","className"],"mappings":";;;;;AAQA,MAAMA,eAAAA,iBAAkBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAgB,CAAA,CAAA;AAEtH,0DACA,MAAMG,OAAAA,GAAU;AAAC,IAAA,YAAA;AAAc,IAAA;AAAW,CAAA;AAE1C;;;;;;AAMC,IACM,SAASC,oBAAAA,CAAqB,EAAEC,OAAO,EAA4B,EAAA;AACtE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACN,eAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;AACXC,gBAAAA,OAAAA,EAASC,mBAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEI,gBAAAA,MAAAA,EAAQC,aAAAA,CAAcX,OAAAA,CAAQM,UAAU,EAAE,QAAA,EAAUR,OAAAA,CAAAA;gBACpDc,SAAAA,EAAWJ,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneSliderField.js","sources":["../../../../forms/fields/SceneSliderField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst SliderField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).SliderField }));\n\n/**\n * The `Cratis.Components:sliderField` component - `SliderField` from `@cratis/components/CommandForm`.\n *\n * A numeric field where the range itself is the point - a percentage, a threshold, a weighting. Prefer\n * `numberField` whenever the exact value matters more than its position in a range; a slider trades\n * precision for a sense of scale, and that is only ever a deliberate choice.\n */\nexport function SceneSliderField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <SliderField\n {...binding}\n min={numberProperty(element.properties, 'min')}\n max={numberProperty(element.properties, 'max')}\n step={numberProperty(element.properties, 'step')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["SliderField","lazy","default","SceneSliderField","element","_jsx","CommandFormField","binding","min","numberProperty","properties","max","step","className","stringProperty"],"mappings":";;;;;AAQA,MAAMA,WAAAA,iBAAcC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAY,CAAA,CAAA;AAE9G;;;;;;AAMC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,WAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,GAAAA,EAAKC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCC,GAAAA,EAAKF,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCE,IAAAA,EAAMH,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCG,SAAAA,EAAWC,cAAAA,CAAeV,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
1
+ {"version":3,"file":"SceneSliderField.js","sources":["../../../../forms/fields/SceneSliderField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst SliderField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).SliderField }));\n\n/**\n * The `Cratis.Components:sliderField` component - `SliderField` from `@cratis/components/CommandForm`.\n *\n * A numeric field where the range itself is the point - a percentage, a threshold, a weighting. Prefer\n * `numberField` whenever the exact value matters more than its position in a range; a slider trades\n * precision for a sense of scale, and that is only ever a deliberate choice.\n */\nexport function SceneSliderField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <SliderField\n {...binding}\n min={numberProperty(element.properties, 'min')}\n max={numberProperty(element.properties, 'max')}\n step={numberProperty(element.properties, 'step')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["SliderField","lazy","default","SceneSliderField","element","_jsx","CommandFormField","binding","min","numberProperty","properties","max","step","className","stringProperty"],"mappings":";;;;;AAQA,MAAMA,WAAAA,iBAAcC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAY,CAAA,CAAA;AAE9G;;;;;;AAMC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,WAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,GAAAA,EAAKC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCC,GAAAA,EAAKF,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCE,IAAAA,EAAMH,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCG,SAAAA,EAAWC,cAAAA,CAAeV,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneTextAreaField.js","sources":["../../../../forms/fields/SceneTextAreaField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst TextAreaField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).TextAreaField }));\n\n/**\n * The `Cratis.Components:textAreaField` component - `TextAreaField` from `@cratis/components/CommandForm`.\n *\n * The multi-line counterpart to `inputTextField`. A separate name rather than a `multiline` flag on that\n * one, because the two wrap different PrimeReact inputs and take different sizing props - collapsing\n * them would mean a `rows` property that is meaningless half the time.\n */\nexport function SceneTextAreaField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <TextAreaField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n rows={numberProperty(element.properties, 'rows')}\n cols={numberProperty(element.properties, 'cols')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["TextAreaField","lazy","default","SceneTextAreaField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","rows","numberProperty","cols","className"],"mappings":";;;;;AAQA,MAAMA,aAAAA,iBAAgBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;;AAMC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,IAAAA,EAAMC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCG,IAAAA,EAAMD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCI,SAAAA,EAAWL,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
1
+ {"version":3,"file":"SceneTextAreaField.js","sources":["../../../../forms/fields/SceneTextAreaField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst TextAreaField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).TextAreaField }));\n\n/**\n * The `Cratis.Components:textAreaField` component - `TextAreaField` from `@cratis/components/CommandForm`.\n *\n * The multi-line counterpart to `inputTextField`. A separate name rather than a `multiline` flag on that\n * one, because the two wrap different PrimeReact inputs and take different sizing props - collapsing\n * them would mean a `rows` property that is meaningless half the time.\n */\nexport function SceneTextAreaField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <TextAreaField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n rows={numberProperty(element.properties, 'rows')}\n cols={numberProperty(element.properties, 'cols')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["TextAreaField","lazy","default","SceneTextAreaField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","rows","numberProperty","cols","className"],"mappings":";;;;;AAQA,MAAMA,aAAAA,iBAAgBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;;AAMC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,IAAAA,EAAMC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCG,IAAAA,EAAMD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCI,SAAAA,EAAWL,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveFieldBinding.js","sources":["../../../../forms/fields/resolveFieldBinding.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';\nimport { stringProperty } from '../../properties';\nimport { FieldBinding } from './FieldBinding';\n\n/**\n * Turns an element's `property` name into the {@link FieldBinding} a `@cratis/components` field takes,\n * or `undefined` when the screen never named a property.\n *\n * `undefined` rather than a default accessor, because a field bound to nothing is not a field with an\n * empty value - it is a field that would silently never read or write anything, and the screen author\n * needs to see that. The caller renders a placeholder instead.\n *\n * The label falls back to the property name, so a field is legible before anyone has written a `title`.\n */\nexport function resolveFieldBinding(element: ExternalComponent): FieldBinding | undefined {\n const property = stringProperty(element.properties, 'property');\n if (property === undefined) return undefined;\n\n return {\n value: (instance: Record<string, unknown>) => instance[property],\n title: stringProperty(element.properties, 'title') ?? property,\n description: stringProperty(element.properties, 'description'),\n };\n}\n"],"names":["resolveFieldBinding","element","property","stringProperty","properties","undefined","value","instance","title","description"],"mappings":";;AAAA;AACA;AAMA;;;;;;;;;IAUO,SAASA,mBAAAA,CAAoBC,OAA0B,EAAA;AAC1D,IAAA,MAAMC,QAAAA,GAAWC,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,UAAA,CAAA;IACpD,IAAIF,QAAAA,KAAaG,WAAW,OAAOA,SAAAA;IAEnC,OAAO;AACHC,QAAAA,KAAAA,EAAO,CAACC,QAAAA,GAAsCA,QAAQ,CAACL,QAAAA,CAAS;AAChEM,QAAAA,KAAAA,EAAOL,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA,IAAYF,QAAAA;QACtDO,WAAAA,EAAaN,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,aAAA;AACpD,KAAA;AACJ;;;;"}
1
+ {"version":3,"file":"resolveFieldBinding.js","sources":["../../../../forms/fields/resolveFieldBinding.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';\nimport { stringProperty } from '../../properties';\nimport { FieldBinding } from './FieldBinding';\n\n/**\n * Turns an element's `property` name into the {@link FieldBinding} a `@cratis/components` field takes,\n * or `undefined` when the screen never named a property.\n *\n * `undefined` rather than a default accessor, because a field bound to nothing is not a field with an\n * empty value - it is a field that would silently never read or write anything, and the screen author\n * needs to see that. The caller renders a placeholder instead.\n *\n * The label falls back to the property name, so a field is legible before anyone has written a `title`.\n */\nexport function resolveFieldBinding(element: ExternalComponent): FieldBinding | undefined {\n const property = stringProperty(element.properties, 'property');\n if (property === undefined) return undefined;\n\n return {\n value: (instance: Record<string, unknown>) => instance[property],\n title: stringProperty(element.properties, 'title') ?? property,\n description: stringProperty(element.properties, 'description'),\n };\n}\n"],"names":["resolveFieldBinding","element","property","stringProperty","properties","undefined","value","instance","title","description"],"mappings":";;AAAA;AACA;AAMA;;;;;;;;;IAUO,SAASA,mBAAAA,CAAoBC,OAA0B,EAAA;AAC1D,IAAA,MAAMC,QAAAA,GAAWC,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,UAAA,CAAA;IACpD,IAAIF,QAAAA,KAAaG,WAAW,OAAOA,SAAAA;IAEnC,OAAO;AACHC,QAAAA,KAAAA,EAAO,CAACC,QAAAA,GAAsCA,QAAQ,CAACL,QAAAA,CAAS;AAChEM,QAAAA,KAAAA,EAAOL,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA,IAAYF,QAAAA;QACtDO,WAAAA,EAAaN,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,aAAA;AACpD,KAAA;AACJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneDataPage.js","sources":["../../../pages/SceneDataPage.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataPage = lazy(async () => ({ default: (await import('@cratis/components/DataPage')).DataPage }));\n\n/**\n * The `Cratis.Components:dataPage` component - `DataPage` from `@cratis/components/DataPage`.\n *\n * The library's whole list-screen composite in one name: title bar, action toolbar, filterable table and\n * optional details pane, all driven from a single query. It is the single highest-leverage thing this\n * package exposes, because reproducing it out of `table` and `toolbar` in a screen would be pages of\n * modeling for a worse result.\n *\n * The `query` property names an Arc query proxy; the columns and menu items come from the `content`\n * slot as `DataPage.Columns` / `DataPage.MenuItems` children.\n *\n * No `clientFiltering` property, for the same reason `dataTable` no longer exposes one: 3.0.0 keeps the\n * prop so call sites compile but never reads it, and a screen setting that cannot take effect is a worse\n * thing to offer than nothing.\n */\nexport function SceneDataPage({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataPage\n title={stringProperty(element.properties, 'title') ?? ''}\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n >\n {slots.content}\n </DataPage>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataPage","lazy","default","SceneDataPage","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","query","emptyMessage","dataKey","globalFilterFields","stringArrayProperty","content"],"mappings":";;;;;;;;AAQA,MAAMA,QAAAA,iBAAWC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,6BAAA,CAA6B,EAAGF;KAAS,CAAA,CAAA;AAErG;;;;;;;;;;;;;;AAcC,IACM,SAASG,aAAAA,CAAc,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACtE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,qBAAAA,CAAsBJ,OAAAA,EAASK,WAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,GAAA,CAACC,cAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,YAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,GAAA,CAACG,kBAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,GAAA,CAACX,QAAAA,EAAAA;AACGe,YAAAA,KAAAA,EAAOC,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,KAAAA,EAAOX,MAAAA;AACPY,YAAAA,YAAAA,EAAcH,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEG,OAAAA,EAASJ,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CI,kBAAAA,EAAoBC,mBAAAA,CAAoBlB,OAAAA,CAAQa,UAAU,EAAE,oBAAA,CAAA;AAE3DZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;;;"}
1
+ {"version":3,"file":"SceneDataPage.js","sources":["../../../pages/SceneDataPage.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataPage = lazy(async () => ({ default: (await import('@cratis/components/DataPage')).DataPage }));\n\n/**\n * The `Cratis.Components:dataPage` component - `DataPage` from `@cratis/components/DataPage`.\n *\n * The library's whole list-screen composite in one name: title bar, action toolbar, filterable table and\n * optional details pane, all driven from a single query. It is the single highest-leverage thing this\n * package exposes, because reproducing it out of `table` and `toolbar` in a screen would be pages of\n * modeling for a worse result.\n *\n * The `query` property names an Arc query proxy; the columns and menu items come from the `content`\n * slot as `DataPage.Columns` / `DataPage.MenuItems` children.\n *\n * No `clientFiltering` property, for the same reason `dataTable` no longer exposes one: 3.0.0 keeps the\n * prop so call sites compile but never reads it, and a screen setting that cannot take effect is a worse\n * thing to offer than nothing.\n */\nexport function SceneDataPage({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataPage\n title={stringProperty(element.properties, 'title') ?? ''}\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n >\n {slots.content}\n </DataPage>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataPage","lazy","default","SceneDataPage","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","query","emptyMessage","dataKey","globalFilterFields","stringArrayProperty","content"],"mappings":";;;;;;;;AAQA,MAAMA,QAAAA,iBAAWC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,6BAAA,CAA6B,EAAGF;KAAS,CAAA,CAAA;AAErG;;;;;;;;;;;;;;AAcC,IACM,SAASG,aAAAA,CAAc,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACtE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,qBAAAA,CAAsBJ,OAAAA,EAASK,WAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,GAAA,CAACC,cAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,YAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,GAAA,CAACG,kBAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,GAAA,CAACX,QAAAA,EAAAA;AACGe,YAAAA,KAAAA,EAAOC,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,KAAAA,EAAOX,MAAAA;AACPY,YAAAA,YAAAA,EAAcH,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEG,OAAAA,EAASJ,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CI,kBAAAA,EAAoBC,mBAAAA,CAAoBlB,OAAAA,CAAQa,UAAU,EAAE,oBAAA,CAAA;AAE3DZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneFormElement.js","sources":["../../../pages/SceneFormElement.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 { FormElement, IconDisplay } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:formElement` component - `FormElement` from `@cratis/components/Common`.\n *\n * Pairs an input with a leading icon addon so a row of unrelated inputs still lines up. The icon can be\n * given two ways, and both are worth supporting: the `icon` property for the common case of a PrimeIcons\n * class name, and an `icon` slot for a screen that wants a real component there. The slot wins when both\n * are present, since a slot is the more specific statement.\n */\nexport function SceneFormElement({ element, slots }: RegisteredComponentProps) {\n const icon = stringProperty(element.properties, 'icon');\n const iconContent = slots.icon?.length ? slots.icon : icon === undefined ? undefined : <IconDisplay icon={icon} />;\n\n return <FormElement icon={iconContent}>{slots.content}</FormElement>;\n}\n"],"names":["SceneFormElement","element","slots","icon","stringProperty","properties","iconContent","length","undefined","_jsx","IconDisplay","FormElement","content"],"mappings":";;;;AAOA;;;;;;;AAOC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACzE,IAAA,MAAMC,IAAAA,GAAOC,cAAAA,CAAeH,OAAAA,CAAQI,UAAU,EAAE,MAAA,CAAA;IAChD,MAAMC,WAAAA,GAAcJ,KAAAA,CAAMC,IAAI,EAAEI,MAAAA,GAASL,KAAAA,CAAMC,IAAI,GAAGA,IAAAA,KAASK,SAAAA,GAAYA,SAAAA,iBAAYC,GAAA,CAACC,WAAAA,EAAAA;QAAYP,IAAAA,EAAMA;;AAE1G,IAAA,qBAAOM,GAAA,CAACE,WAAAA,EAAAA;QAAYR,IAAAA,EAAMG,WAAAA;AAAcJ,QAAAA,QAAAA,EAAAA,KAAAA,CAAMU;;AAClD;;;;"}
1
+ {"version":3,"file":"SceneFormElement.js","sources":["../../../pages/SceneFormElement.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 { FormElement, IconDisplay } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:formElement` component - `FormElement` from `@cratis/components/Common`.\n *\n * Pairs an input with a leading icon addon so a row of unrelated inputs still lines up. The icon can be\n * given two ways, and both are worth supporting: the `icon` property for the common case of a PrimeIcons\n * class name, and an `icon` slot for a screen that wants a real component there. The slot wins when both\n * are present, since a slot is the more specific statement.\n */\nexport function SceneFormElement({ element, slots }: RegisteredComponentProps) {\n const icon = stringProperty(element.properties, 'icon');\n const iconContent = slots.icon?.length ? slots.icon : icon === undefined ? undefined : <IconDisplay icon={icon} />;\n\n return <FormElement icon={iconContent}>{slots.content}</FormElement>;\n}\n"],"names":["SceneFormElement","element","slots","icon","stringProperty","properties","iconContent","length","undefined","_jsx","IconDisplay","FormElement","content"],"mappings":";;;;AAOA;;;;;;;AAOC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACzE,IAAA,MAAMC,IAAAA,GAAOC,cAAAA,CAAeH,OAAAA,CAAQI,UAAU,EAAE,MAAA,CAAA;IAChD,MAAMC,WAAAA,GAAcJ,KAAAA,CAAMC,IAAI,EAAEI,MAAAA,GAASL,KAAAA,CAAMC,IAAI,GAAGA,IAAAA,KAASK,SAAAA,GAAYA,SAAAA,iBAAYC,GAAA,CAACC,WAAAA,EAAAA;QAAYP,IAAAA,EAAMA;;AAE1G,IAAA,qBAAOM,GAAA,CAACE,WAAAA,EAAAA;QAAYR,IAAAA,EAAMG,WAAAA;AAAcJ,QAAAA,QAAAA,EAAAA,KAAAA,CAAMU;;AAClD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScenePage.js","sources":["../../../pages/ScenePage.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 { Page } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:page` component - `Page` from `@cratis/components/Common`.\n *\n * The library's page primitive rather than a plain `div`, because it is what every other component in\n * the library is laid out inside: a full-height flex column whose optional `panel` chrome is drawn from\n * the same `--cratis-*` tokens as the tables and dialogs it contains. A screen that wraps its content in\n * this gets that consistency for free; one that wraps it in a `div` has to reinvent it and will drift.\n *\n * Imported statically - `Page` is one of the library's Arc-free components, so it costs a screen nothing\n * to use it without an Arc runtime present.\n */\nexport function ScenePage({ element, slots }: RegisteredComponentProps) {\n return (\n <Page\n data-scene-id={element.id}\n title={stringProperty(element.properties, 'title') ?? ''}\n showTitle={booleanProperty(element.properties, 'showTitle')}\n panel={booleanProperty(element.properties, 'panel')}\n >\n {slots.content}\n </Page>\n );\n}\n"],"names":["ScenePage","element","slots","_jsx","Page","data-scene-id","id","title","stringProperty","properties","showTitle","booleanProperty","panel","content"],"mappings":";;;;AAOA;;;;;;;;;;AAUC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAClE,IAAA,qBACIC,GAAA,CAACC,IAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;AACzBC,QAAAA,KAAAA,EAAOC,cAAAA,CAAeP,OAAAA,CAAQQ,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;QACtDC,SAAAA,EAAWC,eAAAA,CAAgBV,OAAAA,CAAQQ,UAAU,EAAE,WAAA,CAAA;QAC/CG,KAAAA,EAAOD,eAAAA,CAAgBV,OAAAA,CAAQQ,UAAU,EAAE,OAAA,CAAA;AAE1CP,QAAAA,QAAAA,EAAAA,KAAAA,CAAMW;;AAGnB;;;;"}
1
+ {"version":3,"file":"ScenePage.js","sources":["../../../pages/ScenePage.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 { Page } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:page` component - `Page` from `@cratis/components/Common`.\n *\n * The library's page primitive rather than a plain `div`, because it is what every other component in\n * the library is laid out inside: a full-height flex column whose optional `panel` chrome is drawn from\n * the same `--cratis-*` tokens as the tables and dialogs it contains. A screen that wraps its content in\n * this gets that consistency for free; one that wraps it in a `div` has to reinvent it and will drift.\n *\n * Imported statically - `Page` is one of the library's Arc-free components, so it costs a screen nothing\n * to use it without an Arc runtime present.\n */\nexport function ScenePage({ element, slots }: RegisteredComponentProps) {\n return (\n <Page\n data-scene-id={element.id}\n title={stringProperty(element.properties, 'title') ?? ''}\n showTitle={booleanProperty(element.properties, 'showTitle')}\n panel={booleanProperty(element.properties, 'panel')}\n >\n {slots.content}\n </Page>\n );\n}\n"],"names":["ScenePage","element","slots","_jsx","Page","data-scene-id","id","title","stringProperty","properties","showTitle","booleanProperty","panel","content"],"mappings":";;;;AAOA;;;;;;;;;;AAUC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAClE,IAAA,qBACIC,GAAA,CAACC,IAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;AACzBC,QAAAA,KAAAA,EAAOC,cAAAA,CAAeP,OAAAA,CAAQQ,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;QACtDC,SAAAA,EAAWC,eAAAA,CAAgBV,OAAAA,CAAQQ,UAAU,EAAE,WAAA,CAAA;QAC/CG,KAAAA,EAAOD,eAAAA,CAAgBV,OAAAA,CAAQQ,UAAU,EAAE,OAAA,CAAA;AAE1CP,QAAAA,QAAAA,EAAAA,KAAAA,CAAMW;;AAGnB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"properties.js","sources":["../../properties.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Narrow readers for an {@link ExternalComponent}'s `properties` bag.\n *\n * The bag is `Record<string, unknown>` because it survives a round trip through JSON - a `.play` screen\n * is authored as text, compiled by Stage, and re-read by Studio, and none of those steps carry a\n * TypeScript type with it. An adapter therefore has to narrow every value it reads, and the tempting\n * shortcut (`element.properties.title as string`) is a lie the compiler will happily believe: a screen\n * that writes `title: 42` then reaches the wrapped component as a number and fails somewhere far away.\n *\n * These helpers all answer the same way - the value when it really is of the asked-for type, `undefined`\n * otherwise - so an adapter reads a property and applies its own default in one expression, and a\n * mistyped property degrades to the default instead of corrupting the render.\n */\n\n/**\n * Reads a string property, or `undefined` when it is absent or not a string.\n */\nexport function stringProperty(properties: Record<string, unknown>, name: string): string | undefined {\n const value = properties[name];\n return typeof value === 'string' ? value : undefined;\n}\n\n/**\n * Reads a boolean property, or `undefined` when it is absent or not a boolean.\n *\n * Deliberately not truthiness: a screen that sets `showTitle: 0` means something different from one that\n * leaves it out, and only the second should fall back to the adapter's default.\n */\nexport function booleanProperty(properties: Record<string, unknown>, name: string): boolean | undefined {\n const value = properties[name];\n return typeof value === 'boolean' ? value : undefined;\n}\n\n/**\n * Reads a numeric property, or `undefined` when it is absent, not a number, or `NaN`.\n *\n * `NaN` is excluded because it is the one number that makes every downstream comparison silently false -\n * a slider with `min: NaN` renders without complaint and behaves as if it had no minimum at all.\n */\nexport function numberProperty(properties: Record<string, unknown>, name: string): number | undefined {\n const value = properties[name];\n return typeof value === 'number' && !Number.isNaN(value) ? value : undefined;\n}\n\n/**\n * Reads an array property, or `undefined` when it is absent or not an array.\n *\n * The element type is deliberately left as `unknown` - narrowing the elements is the caller's job,\n * through {@link stringArrayProperty} or its own mapping - so this helper never has to guess what a\n * heterogeneous list was supposed to be.\n */\nexport function arrayProperty(properties: Record<string, unknown>, name: string): unknown[] | undefined {\n const value = properties[name];\n return Array.isArray(value) ? value : undefined;\n}\n\n/**\n * Reads an array property and keeps only its string elements, or `undefined` when the property is absent\n * or not an array.\n *\n * Non-string elements are dropped rather than rejecting the whole list, because these lists are\n * column names, filter fields and the like: one bad entry should cost that one entry, not the entire\n * table's filtering.\n */\nexport function stringArrayProperty(properties: Record<string, unknown>, name: string): string[] | undefined {\n return arrayProperty(properties, name)?.filter((value): value is string => typeof value === 'string');\n}\n\n/**\n * Reads an object property as a plain record, or `undefined` when it is absent, `null`, or an array.\n *\n * Arrays are excluded even though `typeof [] === 'object'`, because every caller here wants a keyed\n * object - a JSON schema, a document being edited - and an array reaching one of those would be a\n * different bug entirely.\n */\nexport function objectProperty(properties: Record<string, unknown>, name: string): Record<string, unknown> | undefined {\n const value = properties[name];\n return typeof value === 'object' && value !== null && !Array.isArray(value) ? (value as Record<string, unknown>) : undefined;\n}\n\n/**\n * Reads an array property and keeps only its plain-object elements, or `undefined` when the property is\n * absent or not an array.\n *\n * This is what an authored `options` list arrives as - `[{ label: 'Draft', value: 'draft' }, ...]` - and\n * the same forgiving rule as {@link stringArrayProperty} applies: one malformed entry costs that entry,\n * not the whole dropdown.\n */\nexport function objectArrayProperty(properties: Record<string, unknown>, name: string): Record<string, unknown>[] | undefined {\n return arrayProperty(properties, name)?.filter(\n (value): value is Record<string, unknown> => typeof value === 'object' && value !== null && !Array.isArray(value)\n );\n}\n\n/**\n * Reads a string property that has to be one of a fixed set of values, or `undefined` when it is absent\n * or outside the set.\n *\n * Several of the wrapped `@cratis/components` props are string literal unions (`'horizontal' | 'vertical'`,\n * `'top' | 'right' | 'bottom' | 'left'`). This is what turns an arbitrary authored string into one of\n * them without an assertion: an unrecognized value falls back to the component's own default rather than\n * being forced through as a value the component never expects to see.\n *\n * @param allowed The permitted values, most usefully written as a `const` tuple so `T` infers as the union.\n */\nexport function unionProperty<T extends string>(properties: Record<string, unknown>, name: string, allowed: readonly T[]): T | undefined {\n const value = stringProperty(properties, name);\n return value !== undefined && (allowed as readonly string[]).includes(value) ? (value as T) : undefined;\n}\n"],"names":["stringProperty","properties","name","value","undefined","booleanProperty","numberProperty","Number","isNaN","arrayProperty","Array","isArray","stringArrayProperty","filter","objectProperty","objectArrayProperty","unionProperty","allowed","includes"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;AAgBC,IACM,SAASA,cAAAA,CAAeC,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQC,SAAAA;AAC/C;AAEA;;;;;AAKC,IACM,SAASC,eAAAA,CAAgBJ,UAAmC,EAAEC,IAAY,EAAA;IAC7E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,SAAA,GAAYA,KAAAA,GAAQC,SAAAA;AAChD;AAEA;;;;;AAKC,IACM,SAASE,cAAAA,CAAeL,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,UAAU,QAAA,IAAY,CAACI,OAAOC,KAAK,CAACL,SAASA,KAAAA,GAAQC,SAAAA;AACvE;AAEA;;;;;;AAMC,IACM,SAASK,aAAAA,CAAcR,UAAmC,EAAEC,IAAY,EAAA;IAC3E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;AAC9B,IAAA,OAAOQ,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,GAASA,KAAAA,GAAQC,SAAAA;AAC1C;AAEA;;;;;;;AAOC,IACM,SAASQ,mBAAAA,CAAoBX,UAAmC,EAAEC,IAAY,EAAA;AACjF,IAAA,OAAOO,cAAcR,UAAAA,EAAYC,IAAAA,CAAAA,EAAOW,OAAO,CAACV,KAAAA,GAA2B,OAAOA,KAAAA,KAAU,QAAA,CAAA;AAChG;AAEA;;;;;;AAMC,IACM,SAASW,cAAAA,CAAeb,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,GAAUA,KAAAA,GAAoCC,SAAAA;AACvH;AAEA;;;;;;;AAOC,IACM,SAASW,mBAAAA,CAAoBd,UAAmC,EAAEC,IAAY,EAAA;AACjF,IAAA,OAAOO,aAAAA,CAAcR,UAAAA,EAAYC,IAAAA,CAAAA,EAAOW,MAAAA,CACpC,CAACV,KAAAA,GAA4C,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,CAAAA;AAEnH;AAEA;;;;;;;;;;AAUC,IACM,SAASa,aAAAA,CAAgCf,UAAmC,EAAEC,IAAY,EAAEe,OAAqB,EAAA;IACpH,MAAMd,KAAAA,GAAQH,eAAeC,UAAAA,EAAYC,IAAAA,CAAAA;AACzC,IAAA,OAAOC,UAAUC,SAAAA,IAAca,QAA8BC,QAAQ,CAACf,SAAUA,KAAAA,GAAcC,SAAAA;AAClG;;;;"}
1
+ {"version":3,"file":"properties.js","sources":["../../properties.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Narrow readers for an {@link ExternalComponent}'s `properties` bag.\n *\n * The bag is `Record<string, unknown>` because it survives a round trip through JSON - a `.play` screen\n * is authored as text, compiled by Stage, and re-read by Studio, and none of those steps carry a\n * TypeScript type with it. An adapter therefore has to narrow every value it reads, and the tempting\n * shortcut (`element.properties.title as string`) is a lie the compiler will happily believe: a screen\n * that writes `title: 42` then reaches the wrapped component as a number and fails somewhere far away.\n *\n * These helpers all answer the same way - the value when it really is of the asked-for type, `undefined`\n * otherwise - so an adapter reads a property and applies its own default in one expression, and a\n * mistyped property degrades to the default instead of corrupting the render.\n */\n\n/**\n * Reads a string property, or `undefined` when it is absent or not a string.\n */\nexport function stringProperty(properties: Record<string, unknown>, name: string): string | undefined {\n const value = properties[name];\n return typeof value === 'string' ? value : undefined;\n}\n\n/**\n * Reads a boolean property, or `undefined` when it is absent or not a boolean.\n *\n * Deliberately not truthiness: a screen that sets `showTitle: 0` means something different from one that\n * leaves it out, and only the second should fall back to the adapter's default.\n */\nexport function booleanProperty(properties: Record<string, unknown>, name: string): boolean | undefined {\n const value = properties[name];\n return typeof value === 'boolean' ? value : undefined;\n}\n\n/**\n * Reads a numeric property, or `undefined` when it is absent, not a number, or `NaN`.\n *\n * `NaN` is excluded because it is the one number that makes every downstream comparison silently false -\n * a slider with `min: NaN` renders without complaint and behaves as if it had no minimum at all.\n */\nexport function numberProperty(properties: Record<string, unknown>, name: string): number | undefined {\n const value = properties[name];\n return typeof value === 'number' && !Number.isNaN(value) ? value : undefined;\n}\n\n/**\n * Reads an array property, or `undefined` when it is absent or not an array.\n *\n * The element type is deliberately left as `unknown` - narrowing the elements is the caller's job,\n * through {@link stringArrayProperty} or its own mapping - so this helper never has to guess what a\n * heterogeneous list was supposed to be.\n */\nexport function arrayProperty(properties: Record<string, unknown>, name: string): unknown[] | undefined {\n const value = properties[name];\n return Array.isArray(value) ? value : undefined;\n}\n\n/**\n * Reads an array property and keeps only its string elements, or `undefined` when the property is absent\n * or not an array.\n *\n * Non-string elements are dropped rather than rejecting the whole list, because these lists are\n * column names, filter fields and the like: one bad entry should cost that one entry, not the entire\n * table's filtering.\n */\nexport function stringArrayProperty(properties: Record<string, unknown>, name: string): string[] | undefined {\n return arrayProperty(properties, name)?.filter((value): value is string => typeof value === 'string');\n}\n\n/**\n * Reads an object property as a plain record, or `undefined` when it is absent, `null`, or an array.\n *\n * Arrays are excluded even though `typeof [] === 'object'`, because every caller here wants a keyed\n * object - a JSON schema, a document being edited - and an array reaching one of those would be a\n * different bug entirely.\n */\nexport function objectProperty(properties: Record<string, unknown>, name: string): Record<string, unknown> | undefined {\n const value = properties[name];\n return typeof value === 'object' && value !== null && !Array.isArray(value) ? (value as Record<string, unknown>) : undefined;\n}\n\n/**\n * Reads an array property and keeps only its plain-object elements, or `undefined` when the property is\n * absent or not an array.\n *\n * This is what an authored `options` list arrives as - `[{ label: 'Draft', value: 'draft' }, ...]` - and\n * the same forgiving rule as {@link stringArrayProperty} applies: one malformed entry costs that entry,\n * not the whole dropdown.\n */\nexport function objectArrayProperty(properties: Record<string, unknown>, name: string): Record<string, unknown>[] | undefined {\n return arrayProperty(properties, name)?.filter(\n (value): value is Record<string, unknown> => typeof value === 'object' && value !== null && !Array.isArray(value)\n );\n}\n\n/**\n * Reads a string property that has to be one of a fixed set of values, or `undefined` when it is absent\n * or outside the set.\n *\n * Several of the wrapped `@cratis/components` props are string literal unions (`'horizontal' | 'vertical'`,\n * `'top' | 'right' | 'bottom' | 'left'`). This is what turns an arbitrary authored string into one of\n * them without an assertion: an unrecognized value falls back to the component's own default rather than\n * being forced through as a value the component never expects to see.\n *\n * @param allowed The permitted values, most usefully written as a `const` tuple so `T` infers as the union.\n */\nexport function unionProperty<T extends string>(properties: Record<string, unknown>, name: string, allowed: readonly T[]): T | undefined {\n const value = stringProperty(properties, name);\n return value !== undefined && (allowed as readonly string[]).includes(value) ? (value as T) : undefined;\n}\n"],"names":["stringProperty","properties","name","value","undefined","booleanProperty","numberProperty","Number","isNaN","arrayProperty","Array","isArray","stringArrayProperty","filter","objectProperty","objectArrayProperty","unionProperty","allowed","includes"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;AAgBC,IACM,SAASA,cAAAA,CAAeC,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQC,SAAAA;AAC/C;AAEA;;;;;AAKC,IACM,SAASC,eAAAA,CAAgBJ,UAAmC,EAAEC,IAAY,EAAA;IAC7E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,SAAA,GAAYA,KAAAA,GAAQC,SAAAA;AAChD;AAEA;;;;;AAKC,IACM,SAASE,cAAAA,CAAeL,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,UAAU,QAAA,IAAY,CAACI,OAAOC,KAAK,CAACL,SAASA,KAAAA,GAAQC,SAAAA;AACvE;AAEA;;;;;;AAMC,IACM,SAASK,aAAAA,CAAcR,UAAmC,EAAEC,IAAY,EAAA;IAC3E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;AAC9B,IAAA,OAAOQ,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,GAASA,KAAAA,GAAQC,SAAAA;AAC1C;AAEA;;;;;;;AAOC,IACM,SAASQ,mBAAAA,CAAoBX,UAAmC,EAAEC,IAAY,EAAA;AACjF,IAAA,OAAOO,cAAcR,UAAAA,EAAYC,IAAAA,CAAAA,EAAOW,OAAO,CAACV,KAAAA,GAA2B,OAAOA,KAAAA,KAAU,QAAA,CAAA;AAChG;AAEA;;;;;;AAMC,IACM,SAASW,cAAAA,CAAeb,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,GAAUA,KAAAA,GAAoCC,SAAAA;AACvH;AAEA;;;;;;;AAOC,IACM,SAASW,mBAAAA,CAAoBd,UAAmC,EAAEC,IAAY,EAAA;AACjF,IAAA,OAAOO,aAAAA,CAAcR,UAAAA,EAAYC,IAAAA,CAAAA,EAAOW,MAAAA,CACpC,CAACV,KAAAA,GAA4C,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,CAAAA;AAEnH;AAEA;;;;;;;;;;AAUC,IACM,SAASa,aAAAA,CAAgCf,UAAmC,EAAEC,IAAY,EAAEe,OAAqB,EAAA;IACpH,MAAMd,KAAAA,GAAQH,eAAeC,UAAAA,EAAYC,IAAAA,CAAAA;AACzC,IAAA,OAAOC,UAAUC,SAAAA,IAAca,QAA8BC,QAAQ,CAACf,SAAUA,KAAAA,GAAcC,SAAAA;AAClG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneToolbar.js","sources":["../../../toolbar/SceneToolbar.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 { Toolbar } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, unionProperty } from '../properties';\n\n/** Whether the toolbar runs down the side or across the top. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbar` component - `Toolbar` from `@cratis/components/Toolbar`.\n *\n * The container for a tool palette: it draws the rounded chrome and, more importantly, establishes the\n * drag context every `toolbarButton` inside it reads. `draggable` therefore belongs here rather than on\n * each button - it is a property of the palette, and setting it per button is how you end up with a\n * palette that is half draggable.\n */\nexport function SceneToolbar({ element, slots }: RegisteredComponentProps) {\n return (\n <Toolbar\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n draggable={booleanProperty(element.properties, 'draggable')}\n >\n {slots.content}\n </Toolbar>\n );\n}\n"],"names":["orientations","SceneToolbar","element","slots","_jsx","Toolbar","orientation","unionProperty","properties","draggable","booleanProperty","content"],"mappings":";;;;AAOA,iEACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,GAAA,CAACC,OAAAA,EAAAA;AACGC,QAAAA,WAAAA,EAAaC,aAAAA,CAAcL,OAAAA,CAAQM,UAAU,EAAE,aAAA,EAAeR,YAAAA,CAAAA;QAC9DS,SAAAA,EAAWC,eAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;AAE9CL,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB;;;;"}
1
+ {"version":3,"file":"SceneToolbar.js","sources":["../../../toolbar/SceneToolbar.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 { Toolbar } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, unionProperty } from '../properties';\n\n/** Whether the toolbar runs down the side or across the top. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbar` component - `Toolbar` from `@cratis/components/Toolbar`.\n *\n * The container for a tool palette: it draws the rounded chrome and, more importantly, establishes the\n * drag context every `toolbarButton` inside it reads. `draggable` therefore belongs here rather than on\n * each button - it is a property of the palette, and setting it per button is how you end up with a\n * palette that is half draggable.\n */\nexport function SceneToolbar({ element, slots }: RegisteredComponentProps) {\n return (\n <Toolbar\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n draggable={booleanProperty(element.properties, 'draggable')}\n >\n {slots.content}\n </Toolbar>\n );\n}\n"],"names":["orientations","SceneToolbar","element","slots","_jsx","Toolbar","orientation","unionProperty","properties","draggable","booleanProperty","content"],"mappings":";;;;AAOA,iEACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,GAAA,CAACC,OAAAA,EAAAA;AACGC,QAAAA,WAAAA,EAAaC,aAAAA,CAAcL,OAAAA,CAAQM,UAAU,EAAE,aAAA,EAAeR,YAAAA,CAAAA;QAC9DS,SAAAA,EAAWC,eAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;AAE9CL,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneToolbarButton.js","sources":["../../../toolbar/SceneToolbarButton.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 { ToolbarButton } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\n/** Which side of the button its tooltip appears on. */\nconst tooltipPositions = ['top', 'right', 'bottom', 'left'] as const;\n\n/**\n * The `Cratis.Components:toolbarButton` component - `ToolbarButton` from `@cratis/components/Toolbar`.\n *\n * `title` is required by the underlying component and is not decoration: it is both the tooltip text and\n * the accessible name, so a toolbar of icon-only buttons is still usable by anyone who cannot see the\n * icons. It defaults to the `text` property rather than to an empty string, so a button that has a\n * visible label is never left nameless.\n */\nexport function SceneToolbarButton({ element }: RegisteredComponentProps) {\n const text = stringProperty(element.properties, 'text');\n\n return (\n <ToolbarButton\n icon={stringProperty(element.properties, 'icon')}\n text={text}\n title={stringProperty(element.properties, 'title') ?? text ?? ''}\n active={booleanProperty(element.properties, 'active')}\n tooltipPosition={unionProperty(element.properties, 'tooltipPosition', tooltipPositions)}\n />\n );\n}\n"],"names":["tooltipPositions","SceneToolbarButton","element","text","stringProperty","properties","_jsx","ToolbarButton","icon","title","active","booleanProperty","tooltipPosition","unionProperty"],"mappings":";;;;AAOA,wDACA,MAAMA,gBAAAA,GAAmB;AAAC,IAAA,KAAA;AAAO,IAAA,OAAA;AAAS,IAAA,QAAA;AAAU,IAAA;AAAO,CAAA;AAE3D;;;;;;;AAOC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAMC,IAAAA,GAAOC,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,MAAA,CAAA;AAEhD,IAAA,qBACIC,GAAA,CAACC,aAAAA,EAAAA;QACGC,IAAAA,EAAMJ,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,MAAA,CAAA;QACzCF,IAAAA,EAAMA,IAAAA;AACNM,QAAAA,KAAAA,EAAOL,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,YAAYF,IAAAA,IAAQ,EAAA;QAC9DO,MAAAA,EAAQC,eAAAA,CAAgBT,OAAAA,CAAQG,UAAU,EAAE,QAAA,CAAA;AAC5CO,QAAAA,eAAAA,EAAiBC,aAAAA,CAAcX,OAAAA,CAAQG,UAAU,EAAE,iBAAA,EAAmBL,gBAAAA;;AAGlF;;;;"}
1
+ {"version":3,"file":"SceneToolbarButton.js","sources":["../../../toolbar/SceneToolbarButton.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 { ToolbarButton } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\n/** Which side of the button its tooltip appears on. */\nconst tooltipPositions = ['top', 'right', 'bottom', 'left'] as const;\n\n/**\n * The `Cratis.Components:toolbarButton` component - `ToolbarButton` from `@cratis/components/Toolbar`.\n *\n * `title` is required by the underlying component and is not decoration: it is both the tooltip text and\n * the accessible name, so a toolbar of icon-only buttons is still usable by anyone who cannot see the\n * icons. It defaults to the `text` property rather than to an empty string, so a button that has a\n * visible label is never left nameless.\n */\nexport function SceneToolbarButton({ element }: RegisteredComponentProps) {\n const text = stringProperty(element.properties, 'text');\n\n return (\n <ToolbarButton\n icon={stringProperty(element.properties, 'icon')}\n text={text}\n title={stringProperty(element.properties, 'title') ?? text ?? ''}\n active={booleanProperty(element.properties, 'active')}\n tooltipPosition={unionProperty(element.properties, 'tooltipPosition', tooltipPositions)}\n />\n );\n}\n"],"names":["tooltipPositions","SceneToolbarButton","element","text","stringProperty","properties","_jsx","ToolbarButton","icon","title","active","booleanProperty","tooltipPosition","unionProperty"],"mappings":";;;;AAOA,wDACA,MAAMA,gBAAAA,GAAmB;AAAC,IAAA,KAAA;AAAO,IAAA,OAAA;AAAS,IAAA,QAAA;AAAU,IAAA;AAAO,CAAA;AAE3D;;;;;;;AAOC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAMC,IAAAA,GAAOC,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,MAAA,CAAA;AAEhD,IAAA,qBACIC,GAAA,CAACC,aAAAA,EAAAA;QACGC,IAAAA,EAAMJ,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,MAAA,CAAA;QACzCF,IAAAA,EAAMA,IAAAA;AACNM,QAAAA,KAAAA,EAAOL,cAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,YAAYF,IAAAA,IAAQ,EAAA;QAC9DO,MAAAA,EAAQC,eAAAA,CAAgBT,OAAAA,CAAQG,UAAU,EAAE,QAAA,CAAA;AAC5CO,QAAAA,eAAAA,EAAiBC,aAAAA,CAAcX,OAAAA,CAAQG,UAAU,EAAE,iBAAA,EAAmBL,gBAAAA;;AAGlF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneToolbarGroup.js","sources":["../../../toolbar/SceneToolbarGroup.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 { ToolbarGroup } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty, unionProperty } from '../properties';\n\n/** Whether the group's buttons stack or sit in a row. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbarGroup` component - `ToolbarGroup` from `@cratis/components/Toolbar`.\n *\n * Keeps related buttons together inside a toolbar. `slotName` opts the group into the library's toolbar\n * slot mechanism, which lets content contributed from elsewhere in the application land in this group -\n * the same idea as Scene's own contribution points, and the reason the property is worth exposing rather\n * than treating the group as purely visual.\n */\nexport function SceneToolbarGroup({ element, slots }: RegisteredComponentProps) {\n return (\n <ToolbarGroup\n slotName={stringProperty(element.properties, 'slotName')}\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n >\n {slots.content}\n </ToolbarGroup>\n );\n}\n"],"names":["orientations","SceneToolbarGroup","element","slots","_jsx","ToolbarGroup","slotName","stringProperty","properties","orientation","unionProperty","content"],"mappings":";;;;AAOA,0DACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,iBAAAA,CAAkB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAC1E,IAAA,qBACIC,GAAA,CAACC,YAAAA,EAAAA;QACGC,QAAAA,EAAUC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAC7CC,QAAAA,WAAAA,EAAaC,aAAAA,CAAcR,OAAAA,CAAQM,UAAU,EAAE,aAAA,EAAeR,YAAAA,CAAAA;AAE7DG,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB;;;;"}
1
+ {"version":3,"file":"SceneToolbarGroup.js","sources":["../../../toolbar/SceneToolbarGroup.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 { ToolbarGroup } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty, unionProperty } from '../properties';\n\n/** Whether the group's buttons stack or sit in a row. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbarGroup` component - `ToolbarGroup` from `@cratis/components/Toolbar`.\n *\n * Keeps related buttons together inside a toolbar. `slotName` opts the group into the library's toolbar\n * slot mechanism, which lets content contributed from elsewhere in the application land in this group -\n * the same idea as Scene's own contribution points, and the reason the property is worth exposing rather\n * than treating the group as purely visual.\n */\nexport function SceneToolbarGroup({ element, slots }: RegisteredComponentProps) {\n return (\n <ToolbarGroup\n slotName={stringProperty(element.properties, 'slotName')}\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n >\n {slots.content}\n </ToolbarGroup>\n );\n}\n"],"names":["orientations","SceneToolbarGroup","element","slots","_jsx","ToolbarGroup","slotName","stringProperty","properties","orientation","unionProperty","content"],"mappings":";;;;AAOA,0DACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,iBAAAA,CAAkB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAC1E,IAAA,qBACIC,GAAA,CAACC,YAAAA,EAAAA;QACGC,QAAAA,EAAUC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAC7CC,QAAAA,WAAAA,EAAaC,aAAAA,CAAcR,OAAAA,CAAQM,UAAU,EAAE,aAAA,EAAeR,YAAAA,CAAAA;AAE7DG,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneToolbarSeparator.js","sources":["../../../toolbar/SceneToolbarSeparator.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 { ToolbarSeparator } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { unionProperty } from '../properties';\n\n/** Whether the separator is drawn as a horizontal rule or a vertical one. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbarSeparator` component - `ToolbarSeparator` from\n * `@cratis/components/Toolbar`.\n *\n * The divider between groups of tools. Its `orientation` describes the *toolbar* it sits in rather than\n * the line it draws - a vertical toolbar gets a horizontal rule - which matches how the toolbar's own\n * `orientation` reads, so a screen sets the same value on both.\n */\nexport function SceneToolbarSeparator({ element }: RegisteredComponentProps) {\n return <ToolbarSeparator orientation={unionProperty(element.properties, 'orientation', orientations)} />;\n}\n"],"names":["orientations","SceneToolbarSeparator","element","_jsx","ToolbarSeparator","orientation","unionProperty","properties"],"mappings":";;;;AAOA,8EACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBAAOC,GAAA,CAACC,gBAAAA,EAAAA;AAAiBC,QAAAA,WAAAA,EAAaC,aAAAA,CAAcJ,OAAAA,CAAQK,UAAU,EAAE,aAAA,EAAeP,YAAAA;;AAC3F;;;;"}
1
+ {"version":3,"file":"SceneToolbarSeparator.js","sources":["../../../toolbar/SceneToolbarSeparator.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 { ToolbarSeparator } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { unionProperty } from '../properties';\n\n/** Whether the separator is drawn as a horizontal rule or a vertical one. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbarSeparator` component - `ToolbarSeparator` from\n * `@cratis/components/Toolbar`.\n *\n * The divider between groups of tools. Its `orientation` describes the *toolbar* it sits in rather than\n * the line it draws - a vertical toolbar gets a horizontal rule - which matches how the toolbar's own\n * `orientation` reads, so a screen sets the same value on both.\n */\nexport function SceneToolbarSeparator({ element }: RegisteredComponentProps) {\n return <ToolbarSeparator orientation={unionProperty(element.properties, 'orientation', orientations)} />;\n}\n"],"names":["orientations","SceneToolbarSeparator","element","_jsx","ToolbarSeparator","orientation","unionProperty","properties"],"mappings":";;;;AAOA,8EACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBAAOC,GAAA,CAACC,gBAAAA,EAAAA;AAAiBC,QAAAA,WAAAA,EAAaC,aAAAA,CAAcJ,OAAAA,CAAQK,UAAU,EAAE,aAAA,EAAeP,YAAAA;;AAC3F;;"}