@cratis/components 4.42.2 → 4.43.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 (121) hide show
  1. package/compat-manifest.json +67 -13
  2. package/dist/esm/Chat/ChatTopicEmptyMessage.d.ts +9 -0
  3. package/dist/esm/Chat/ChatTopicEmptyMessage.d.ts.map +1 -0
  4. package/dist/esm/Chat/ChatTopicEmptyMessage.js +19 -0
  5. package/dist/esm/Chat/ChatTopicEmptyMessage.js.map +1 -0
  6. package/dist/esm/Chat/ChatTopicList.d.ts +2 -2
  7. package/dist/esm/Chat/ChatTopicList.d.ts.map +1 -1
  8. package/dist/esm/Chat/ChatTopicList.js +5 -20
  9. package/dist/esm/Chat/ChatTopicList.js.map +1 -1
  10. package/dist/esm/Chat/ChatTopicRow.d.ts +22 -0
  11. package/dist/esm/Chat/ChatTopicRow.d.ts.map +1 -0
  12. package/dist/esm/Chat/ChatTopicRow.js +23 -0
  13. package/dist/esm/Chat/ChatTopicRow.js.map +1 -0
  14. package/dist/esm/Chat/ChatTopicStartButton.d.ts +8 -0
  15. package/dist/esm/Chat/ChatTopicStartButton.d.ts.map +1 -0
  16. package/dist/esm/Chat/ChatTopicStartButton.js +7 -0
  17. package/dist/esm/Chat/ChatTopicStartButton.js.map +1 -0
  18. package/dist/esm/CommandForm/fields/ChipsField.d.ts.map +1 -1
  19. package/dist/esm/CommandForm/fields/ChipsField.js +2 -6
  20. package/dist/esm/CommandForm/fields/ChipsField.js.map +1 -1
  21. package/dist/esm/CommandForm/fields/ChipsRoot.d.ts +15 -0
  22. package/dist/esm/CommandForm/fields/ChipsRoot.d.ts.map +1 -0
  23. package/dist/esm/CommandForm/fields/ChipsRoot.js +11 -0
  24. package/dist/esm/CommandForm/fields/ChipsRoot.js.map +1 -0
  25. package/dist/esm/CommandForm/fields/PasswordField.d.ts.map +1 -1
  26. package/dist/esm/CommandForm/fields/PasswordField.js +4 -14
  27. package/dist/esm/CommandForm/fields/PasswordField.js.map +1 -1
  28. package/dist/esm/CommandForm/fields/PasswordInput.d.ts +17 -0
  29. package/dist/esm/CommandForm/fields/PasswordInput.d.ts.map +1 -0
  30. package/dist/esm/CommandForm/fields/PasswordInput.js +7 -0
  31. package/dist/esm/CommandForm/fields/PasswordInput.js.map +1 -0
  32. package/dist/esm/CommandForm/fields/PasswordRoot.d.ts +15 -0
  33. package/dist/esm/CommandForm/fields/PasswordRoot.d.ts.map +1 -0
  34. package/dist/esm/CommandForm/fields/PasswordRoot.js +7 -0
  35. package/dist/esm/CommandForm/fields/PasswordRoot.js.map +1 -0
  36. package/dist/esm/CommandForm/fields/PasswordToggle.d.ts +13 -0
  37. package/dist/esm/CommandForm/fields/PasswordToggle.d.ts.map +1 -0
  38. package/dist/esm/CommandForm/fields/PasswordToggle.js +9 -0
  39. package/dist/esm/CommandForm/fields/PasswordToggle.js.map +1 -0
  40. package/dist/esm/DataTables/TablePaginatorImplementation.js +1 -1
  41. package/dist/esm/Dialogs/DialogImplementation.js +1 -1
  42. package/dist/esm/Dropdown/useDropdownState.js +1 -1
  43. package/dist/esm/Filter/FilterPanel.d.ts +69 -0
  44. package/dist/esm/Filter/FilterPanel.d.ts.map +1 -1
  45. package/dist/esm/Filter/FilterPanel.js +6 -21
  46. package/dist/esm/Filter/FilterPanel.js.map +1 -1
  47. package/dist/esm/Filter/FilterPanelContent.d.ts +14 -0
  48. package/dist/esm/Filter/FilterPanelContent.d.ts.map +1 -0
  49. package/dist/esm/Filter/FilterPanelContent.js +8 -0
  50. package/dist/esm/Filter/FilterPanelContent.js.map +1 -0
  51. package/dist/esm/Filter/usePortalTarget.d.ts +13 -0
  52. package/dist/esm/Filter/usePortalTarget.d.ts.map +1 -0
  53. package/dist/esm/Filter/usePortalTarget.js +24 -0
  54. package/dist/esm/Filter/usePortalTarget.js.map +1 -0
  55. package/dist/esm/Notifications/ToastCloseButton.d.ts +11 -0
  56. package/dist/esm/Notifications/ToastCloseButton.d.ts.map +1 -0
  57. package/dist/esm/Notifications/ToastCloseButton.js +14 -0
  58. package/dist/esm/Notifications/ToastCloseButton.js.map +1 -0
  59. package/dist/esm/Notifications/ToastContent.d.ts +10 -0
  60. package/dist/esm/Notifications/ToastContent.d.ts.map +1 -0
  61. package/dist/esm/Notifications/ToastContent.js +7 -0
  62. package/dist/esm/Notifications/ToastContent.js.map +1 -0
  63. package/dist/esm/Notifications/Toaster.d.ts.map +1 -1
  64. package/dist/esm/Notifications/Toaster.js +8 -17
  65. package/dist/esm/Notifications/Toaster.js.map +1 -1
  66. package/dist/esm/Notifications/useToastAutoDismiss.d.ts +4 -0
  67. package/dist/esm/Notifications/useToastAutoDismiss.d.ts.map +1 -0
  68. package/dist/esm/Notifications/useToastAutoDismiss.js +20 -0
  69. package/dist/esm/Notifications/useToastAutoDismiss.js.map +1 -0
  70. package/dist/esm/PivotViewer/PivotViewer.d.ts +1 -1
  71. package/dist/esm/PivotViewer/PivotViewer.d.ts.map +1 -1
  72. package/dist/esm/PivotViewer/PivotViewer.js +24 -31
  73. package/dist/esm/PivotViewer/PivotViewer.js.map +1 -1
  74. package/dist/esm/PivotViewer/components/PivotViewerContent.d.ts +40 -0
  75. package/dist/esm/PivotViewer/components/PivotViewerContent.d.ts.map +1 -0
  76. package/dist/esm/PivotViewer/components/PivotViewerContent.js +13 -0
  77. package/dist/esm/PivotViewer/components/PivotViewerContent.js.map +1 -0
  78. package/dist/esm/PivotViewer/hooks/usePivotViewerViewState.d.ts +37 -0
  79. package/dist/esm/PivotViewer/hooks/usePivotViewerViewState.d.ts.map +1 -0
  80. package/dist/esm/PivotViewer/hooks/usePivotViewerViewState.js +35 -0
  81. package/dist/esm/PivotViewer/hooks/usePivotViewerViewState.js.map +1 -0
  82. package/dist/esm/TimeMachine/EventCard.d.ts +9 -0
  83. package/dist/esm/TimeMachine/EventCard.d.ts.map +1 -0
  84. package/dist/esm/TimeMachine/EventCard.js +8 -0
  85. package/dist/esm/TimeMachine/EventCard.js.map +1 -0
  86. package/dist/esm/TimeMachine/EventSeparator.d.ts +11 -0
  87. package/dist/esm/TimeMachine/EventSeparator.d.ts.map +1 -0
  88. package/dist/esm/TimeMachine/EventSeparator.js +7 -0
  89. package/dist/esm/TimeMachine/EventSeparator.js.map +1 -0
  90. package/dist/esm/TimeMachine/EventTimelineItem.d.ts +14 -0
  91. package/dist/esm/TimeMachine/EventTimelineItem.d.ts.map +1 -0
  92. package/dist/esm/TimeMachine/EventTimelineItem.js +9 -0
  93. package/dist/esm/TimeMachine/EventTimelineItem.js.map +1 -0
  94. package/dist/esm/TimeMachine/EventsScrollButton.d.ts +10 -0
  95. package/dist/esm/TimeMachine/EventsScrollButton.d.ts.map +1 -0
  96. package/dist/esm/TimeMachine/EventsScrollButton.js +6 -0
  97. package/dist/esm/TimeMachine/EventsScrollButton.js.map +1 -0
  98. package/dist/esm/TimeMachine/EventsView.d.ts +1 -1
  99. package/dist/esm/TimeMachine/EventsView.d.ts.map +1 -1
  100. package/dist/esm/TimeMachine/EventsView.js +6 -39
  101. package/dist/esm/TimeMachine/EventsView.js.map +1 -1
  102. package/dist/esm/TimeMachine/useScrollEdges.d.ts +13 -0
  103. package/dist/esm/TimeMachine/useScrollEdges.d.ts.map +1 -0
  104. package/dist/esm/TimeMachine/useScrollEdges.js +40 -0
  105. package/dist/esm/TimeMachine/useScrollEdges.js.map +1 -0
  106. package/dist/esm/Toolbar/ToolbarFolder.js +1 -1
  107. package/dist/esm/renderer/index.d.ts +1 -1
  108. package/dist/esm/renderer/index.d.ts.map +1 -1
  109. package/dist/esm/renderer/index.js +1 -1
  110. package/dist/esm/renderer/manifest.d.ts.map +1 -1
  111. package/dist/esm/renderer/manifest.js +23 -3
  112. package/dist/esm/renderer/manifest.js.map +1 -1
  113. package/dist/esm/renderer/presentation.d.ts +45 -2
  114. package/dist/esm/renderer/presentation.d.ts.map +1 -1
  115. package/dist/esm/renderer/presentation.js +113 -29
  116. package/dist/esm/renderer/presentation.js.map +1 -1
  117. package/dist/esm/renderer/resolve.d.ts +4 -1
  118. package/dist/esm/renderer/resolve.d.ts.map +1 -1
  119. package/dist/esm/renderer/resolve.js +24 -15
  120. package/dist/esm/renderer/resolve.js.map +1 -1
  121. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { classNames } from '../ClassNames/classNames.js';
3
+
4
+ const EventSeparator = ({ isSelected, hasConnector, pt }) => (jsxs("div", { ...pt?.separator, className: classNames('events-view-timeline-separator', pt?.separator?.className), "data-cratis-part": 'separator', children: [jsx("div", { ...pt?.marker, className: classNames('events-view-marker', pt?.marker?.className), "data-cratis-part": 'marker', "data-selected": isSelected || undefined, children: jsx("div", { className: 'events-view-marker-dot' }) }), hasConnector && (jsx("div", { ...pt?.connector, className: classNames('events-view-timeline-connector', pt?.connector?.className), "data-cratis-part": 'connector' }))] }));
5
+
6
+ export { EventSeparator };
7
+ //# sourceMappingURL=EventSeparator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventSeparator.js","sources":["../../../TimeMachine/EventSeparator.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 { classNames } from '../ClassNames/classNames';\nimport type { EventsViewParts } from './EventsView';\n\n/** Props for {@link EventSeparator}. */\nexport interface EventSeparatorProps {\n isSelected: boolean | undefined;\n /** Whether a connector line follows the marker. */\n hasConnector: boolean;\n pt?: EventsViewParts;\n}\n\n/** The timeline spine segment of one event: its marker and the connector to the next event. */\nexport const EventSeparator = ({ isSelected, hasConnector, pt }: EventSeparatorProps) => (\n <div\n {...pt?.separator}\n className={classNames('events-view-timeline-separator', pt?.separator?.className)}\n data-cratis-part='separator'\n >\n <div\n {...pt?.marker}\n className={classNames('events-view-marker', pt?.marker?.className)}\n data-cratis-part='marker'\n data-selected={isSelected || undefined}\n >\n <div className='events-view-marker-dot' />\n </div>\n {hasConnector && (\n <div\n {...pt?.connector}\n className={classNames('events-view-timeline-connector', pt?.connector?.className)}\n data-cratis-part='connector'\n />\n )}\n </div>\n);\n"],"names":["_jsxs","_jsx"],"mappings":";;;MAea,cAAc,GAAG,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,EAAuB,MAChFA,iBACQ,EAAE,EAAE,SAAS,EACjB,SAAS,EAAE,UAAU,CAAC,gCAAgC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,EAAA,kBAAA,EAChE,WAAW,EAAA,QAAA,EAAA,CAE5BC,GAAA,CAAA,KAAA,EAAA,EAAA,GACQ,EAAE,EAAE,MAAM,EACd,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAA,kBAAA,EACjD,QAAQ,mBACV,UAAU,IAAI,SAAS,EAAA,QAAA,EAEtCA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,wBAAwB,GAAG,EAAA,CACxC,EACL,YAAY,KACTA,gBACQ,EAAE,EAAE,SAAS,EACjB,SAAS,EAAE,UAAU,CAAC,gCAAgC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,EAAA,kBAAA,EAChE,WAAW,EAAA,CAC9B,CACL,CAAA,EAAA,CACC;;"}
@@ -0,0 +1,14 @@
1
+ import type { EventsViewParts } from './EventsView.js';
2
+ import type { Event } from './types.js';
3
+ /** Props for {@link EventTimelineItem}. */
4
+ export interface EventTimelineItemProps {
5
+ event: Event;
6
+ position: 'left' | 'right';
7
+ isSelected: boolean | undefined;
8
+ /** Whether a connector line follows this event. */
9
+ hasConnector: boolean;
10
+ pt?: EventsViewParts;
11
+ }
12
+ /** One event on the timeline: separator with marker and connector, and the event card. */
13
+ export declare const EventTimelineItem: ({ event, position, isSelected, hasConnector, pt }: EventTimelineItemProps) => import("react").JSX.Element;
14
+ //# sourceMappingURL=EventTimelineItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventTimelineItem.d.ts","sourceRoot":"","sources":["../../../TimeMachine/EventTimelineItem.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAc,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC;AAErC,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,mDAAmD;IACnD,YAAY,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,0FAA0F;AAC1F,eAAO,MAAM,iBAAiB,sDAAuD,sBAAsB,gCAiB1G,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { classNames } from '../ClassNames/classNames.js';
3
+ import { EventCard } from './EventCard.js';
4
+ import { EventSeparator } from './EventSeparator.js';
5
+
6
+ const EventTimelineItem = ({ event, position, isSelected, hasConnector, pt }) => (jsxs("article", { ...pt?.event, className: classNames('events-view-timeline-event', pt?.event?.className), "data-cratis-part": 'event', "data-position": position, "data-selected": isSelected || undefined, children: [jsx(EventSeparator, { isSelected: isSelected, hasConnector: hasConnector, pt: pt }), jsx("div", { ...pt?.content, className: classNames('events-view-timeline-content', pt?.content?.className), "data-cratis-part": 'content', children: jsx(EventCard, { event: event, position: position }) })] }));
7
+
8
+ export { EventTimelineItem };
9
+ //# sourceMappingURL=EventTimelineItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventTimelineItem.js","sources":["../../../TimeMachine/EventTimelineItem.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 { classNames } from '../ClassNames/classNames';\nimport { EventCard } from './EventCard';\nimport { EventSeparator } from './EventSeparator';\nimport type { EventsViewParts } from './EventsView';\nimport type { Event } from './types';\n\n/** Props for {@link EventTimelineItem}. */\nexport interface EventTimelineItemProps {\n event: Event;\n position: 'left' | 'right';\n isSelected: boolean | undefined;\n /** Whether a connector line follows this event. */\n hasConnector: boolean;\n pt?: EventsViewParts;\n}\n\n/** One event on the timeline: separator with marker and connector, and the event card. */\nexport const EventTimelineItem = ({ event, position, isSelected, hasConnector, pt }: EventTimelineItemProps) => (\n <article\n {...pt?.event}\n className={classNames('events-view-timeline-event', pt?.event?.className)}\n data-cratis-part='event'\n data-position={position}\n data-selected={isSelected || undefined}\n >\n <EventSeparator isSelected={isSelected} hasConnector={hasConnector} pt={pt} />\n <div\n {...pt?.content}\n className={classNames('events-view-timeline-content', pt?.content?.className)}\n data-cratis-part='content'\n >\n <EventCard event={event} position={position} />\n </div>\n </article>\n);\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;MAoBa,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,EAA0B,MACvGA,IAAA,CAAA,SAAA,EAAA,EAAA,GACQ,EAAE,EAAE,KAAK,EACb,SAAS,EAAE,UAAU,CAAC,4BAA4B,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,EAAA,kBAAA,EACxD,OAAO,EAAA,eAAA,EACT,QAAQ,mBACR,UAAU,IAAI,SAAS,EAAA,QAAA,EAAA,CAEtCC,GAAA,CAAC,cAAc,IAAC,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE,GAAI,EAC9EA,GAAA,CAAA,KAAA,EAAA,EAAA,GACQ,EAAE,EAAE,OAAO,EACf,SAAS,EAAE,UAAU,CAAC,8BAA8B,EAAE,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,sBAC5D,SAAS,EAAA,QAAA,EAE1BA,IAAC,SAAS,EAAA,EAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAA,CAAI,EAAA,CAC7C,CAAA,EAAA,CACA;;"}
@@ -0,0 +1,10 @@
1
+ /** Props for {@link EventsScrollButton}. */
2
+ export interface EventsScrollButtonProps {
3
+ /** Which edge of the timeline the button scrolls to. */
4
+ edge: 'top' | 'bottom';
5
+ label: string;
6
+ onClick: () => void;
7
+ }
8
+ /** A button floating at one edge of the events timeline that scrolls to that edge. */
9
+ export declare const EventsScrollButton: ({ edge, label, onClick }: EventsScrollButtonProps) => import("react").JSX.Element;
10
+ //# sourceMappingURL=EventsScrollButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventsScrollButton.d.ts","sourceRoot":"","sources":["../../../TimeMachine/EventsScrollButton.tsx"],"names":[],"mappings":"AAGA,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACpC,wDAAwD;IACxD,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,sFAAsF;AACtF,eAAO,MAAM,kBAAkB,6BAA8B,uBAAuB,gCAWnF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+
3
+ const EventsScrollButton = ({ edge, label, onClick }) => (jsx("div", { className: `events-view-scroll-button-wrapper events-view-scroll-button-wrapper--${edge}`, children: jsx("button", { type: 'button', className: `events-view-scroll-button events-view-scroll-button--${edge}`, onClick: onClick, "aria-label": label, children: edge === 'top' ? '↑' : '↓' }) }));
4
+
5
+ export { EventsScrollButton };
6
+ //# sourceMappingURL=EventsScrollButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventsScrollButton.js","sources":["../../../TimeMachine/EventsScrollButton.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\n/** Props for {@link EventsScrollButton}. */\nexport interface EventsScrollButtonProps {\n /** Which edge of the timeline the button scrolls to. */\n edge: 'top' | 'bottom';\n label: string;\n onClick: () => void;\n}\n\n/** A button floating at one edge of the events timeline that scrolls to that edge. */\nexport const EventsScrollButton = ({ edge, label, onClick }: EventsScrollButtonProps) => (\n <div className={`events-view-scroll-button-wrapper events-view-scroll-button-wrapper--${edge}`}>\n <button\n type='button'\n className={`events-view-scroll-button events-view-scroll-button--${edge}`}\n onClick={onClick}\n aria-label={label}\n >\n {edge === 'top' ? '↑' : '↓'}\n </button>\n </div>\n);\n"],"names":["_jsx"],"mappings":";;AAYO,MAAM,kBAAkB,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAA2B,MAChFA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,CAAA,qEAAA,EAAwE,IAAI,CAAA,CAAE,EAAA,QAAA,EAC1FA,GAAA,CAAA,QAAA,EAAA,EACI,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAA,qDAAA,EAAwD,IAAI,CAAA,CAAE,EACzE,OAAO,EAAE,OAAO,EAAA,YAAA,EACJ,KAAK,EAAA,QAAA,EAEhB,IAAI,KAAK,KAAK,GAAG,GAAG,GAAG,GAAG,EAAA,CACtB,EAAA,CACP;;"}
@@ -1,6 +1,6 @@
1
1
  import { type HTMLAttributes } from 'react';
2
- import type { Event } from './types.js';
3
2
  import { type TimeMachineLabels } from './TimeMachineLabels.js';
3
+ import type { Event } from './types.js';
4
4
  /** Stable part attributes for {@link EventsView}. */
5
5
  export interface EventsViewParts {
6
6
  /** Scrollable container wrapping the entire vertical timeline. */
@@ -1 +1 @@
1
- {"version":3,"file":"EventsView.d.ts","sourceRoot":"","sources":["../../../TimeMachine/EventsView.tsx"],"names":[],"mappings":"AAGA,OAAO,EAMH,KAAK,cAAc,EACtB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAS,CAAC;AACrC,OAAO,EAAE,KAAK,iBAAiB,EAA4B,MAAM,wBAAqB,CAAC;AAMvF,qDAAqD;AACrD,MAAM,WAAW,eAAe;I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,cAAc,CAAC,CAAC;IAC1C,4EAA4E;IAC5E,KAAK,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACpC,0EAA0E;IAC1E,SAAS,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC3C,6DAA6D;IAC7D,MAAM,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IACxC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC3C,0EAA0E;IAC1E,OAAO,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CAC5C;AAKD,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC5B,wEAAwE;IACxE,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mGAAmG;IACnG,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yFAAyF;IACzF,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,eAAO,MAAM,mCAAmC,0DACa,CAAC;AAE9D,6EAA6E;AAC7E,eAAO,MAAM,UAAU,uCAKpB,eAAe,gCA2CjB,CAAC"}
@@ -1,49 +1,16 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { createContext, useRef, useContext, useState, useEffect } from 'react';
2
+ import { createContext, useContext } from 'react';
3
3
  import { defaultTimeMachineLabels } from './TimeMachineLabels.js';
4
- import { Properties } from './Properties.js';
4
+ import { EventsScrollButton } from './EventsScrollButton.js';
5
+ import { EventTimelineItem } from './EventTimelineItem.js';
6
+ import { useScrollEdges } from './useScrollEdges.js';
5
7
  import { classNames } from '../ClassNames/classNames.js';
6
8
 
7
9
  const SelectedEventSequenceNumbersContext = createContext(undefined);
8
10
  const EventsView = ({ events, className, pt, labels = defaultTimeMachineLabels, }) => {
9
- const containerRef = useRef(null);
10
11
  const selectedEventSequenceNumbers = useContext(SelectedEventSequenceNumbersContext);
11
- const [canScrollUp, setCanScrollUp] = useState(false);
12
- const [canScrollDown, setCanScrollDown] = useState(false);
13
- const updateScrollState = () => {
14
- const container = containerRef.current;
15
- if (!container) {
16
- setCanScrollUp(false);
17
- setCanScrollDown(false);
18
- return;
19
- }
20
- const { scrollTop, scrollHeight, clientHeight } = container;
21
- setCanScrollUp(scrollTop > 1);
22
- setCanScrollDown(scrollTop + clientHeight < scrollHeight - 1);
23
- };
24
- useEffect(() => {
25
- updateScrollState();
26
- const container = containerRef.current;
27
- if (!container)
28
- return;
29
- container.addEventListener('scroll', updateScrollState);
30
- return () => container.removeEventListener('scroll', updateScrollState);
31
- }, [events.length]);
32
- const scrollBehavior = () => window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth';
33
- const scrollToTop = () => containerRef.current?.scrollTo({ top: 0, behavior: scrollBehavior() });
34
- const scrollToBottom = () => {
35
- const container = containerRef.current;
36
- if (container)
37
- container.scrollTo({
38
- top: container.scrollHeight,
39
- behavior: scrollBehavior(),
40
- });
41
- };
42
- return (jsxs("div", { className: 'events-view-container', ref: containerRef, role: 'group', "aria-label": labels.eventTimelineRegion, tabIndex: 0, children: [canScrollUp && (jsx("div", { className: 'events-view-scroll-button-wrapper events-view-scroll-button-wrapper--top', children: jsx("button", { type: 'button', className: 'events-view-scroll-button events-view-scroll-button--top', onClick: scrollToTop, "aria-label": labels.scrollToTop, children: "\u2191" }) })), jsx("div", { ...pt?.timeline, className: classNames('events-view-timeline', pt?.timeline?.className, className), "data-cratis-part": 'timeline', children: events.map((event, index) => {
43
- const position = index % 2 === 0 ? 'right' : 'left';
44
- const isSelected = selectedEventSequenceNumbers?.has(event.sequenceNumber);
45
- return (jsxs("article", { ...pt?.event, className: classNames('events-view-timeline-event', pt?.event?.className), "data-cratis-part": 'event', "data-position": position, "data-selected": isSelected || undefined, children: [jsxs("div", { ...pt?.separator, className: classNames('events-view-timeline-separator', pt?.separator?.className), "data-cratis-part": 'separator', children: [jsx("div", { ...pt?.marker, className: classNames('events-view-marker', pt?.marker?.className), "data-cratis-part": 'marker', "data-selected": isSelected || undefined, children: jsx("div", { className: 'events-view-marker-dot' }) }), index < events.length - 1 && (jsx("div", { ...pt?.connector, className: classNames('events-view-timeline-connector', pt?.connector?.className), "data-cratis-part": 'connector' }))] }), jsx("div", { ...pt?.content, className: classNames('events-view-timeline-content', pt?.content?.className), "data-cratis-part": 'content', children: jsxs("div", { className: `events-view-event-card events-view-event-card--${position}`, children: [jsxs("div", { className: `events-view-event-header ${position === 'left' ? 'events-view-event-header--right' : ''}`, children: [jsx("h3", { className: `events-view-event-name ${position === 'left' ? 'events-view-event-name--right' : ''}`, children: event.type }), jsx("div", { className: `events-view-event-timestamp ${position === 'left' ? 'events-view-event-timestamp--right' : ''}`, children: event.occurred.toLocaleString() })] }), jsx("div", { className: 'events-view-event-properties', children: jsx(Properties, { data: event.content || {}, align: 'left' }) })] }) })] }, `${event.type}-${event.occurred.toISOString()}-${index}`));
46
- }) }), canScrollDown && (jsx("div", { className: 'events-view-scroll-button-wrapper events-view-scroll-button-wrapper--bottom', children: jsx("button", { type: 'button', className: 'events-view-scroll-button events-view-scroll-button--bottom', onClick: scrollToBottom, "aria-label": labels.scrollToBottom, children: "\u2193" }) }))] }));
12
+ const { containerRef, canScrollUp, canScrollDown, scrollToTop, scrollToBottom } = useScrollEdges(events.length);
13
+ return (jsxs("div", { className: 'events-view-container', ref: containerRef, role: 'group', "aria-label": labels.eventTimelineRegion, tabIndex: 0, children: [canScrollUp && (jsx(EventsScrollButton, { edge: 'top', label: labels.scrollToTop, onClick: scrollToTop })), jsx("div", { ...pt?.timeline, className: classNames('events-view-timeline', pt?.timeline?.className, className), "data-cratis-part": 'timeline', children: events.map((event, index) => (jsx(EventTimelineItem, { event: event, position: index % 2 === 0 ? 'right' : 'left', isSelected: selectedEventSequenceNumbers?.has(event.sequenceNumber), hasConnector: index < events.length - 1, pt: pt }, `${event.type}-${event.occurred.toISOString()}-${index}`))) }), canScrollDown && (jsx(EventsScrollButton, { edge: 'bottom', label: labels.scrollToBottom, onClick: scrollToBottom }))] }));
47
14
  };
48
15
 
49
16
  export { EventsView, SelectedEventSequenceNumbersContext };
@@ -1 +1 @@
1
- {"version":3,"file":"EventsView.js","sources":["../../../TimeMachine/EventsView.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 {\n createContext,\n useContext,\n useEffect,\n useRef,\n useState,\n type HTMLAttributes,\n} from 'react';\nimport type { Event } from './types';\nimport { type TimeMachineLabels, defaultTimeMachineLabels } from './TimeMachineLabels';\nimport { Properties } from './Properties';\nimport type { ExactPartKeys } from '../types/ExactPartKeys';\nimport type { PartsOf } from '../types/parts';\nimport { classNames } from '../ClassNames/classNames';\n\n/** Stable part attributes for {@link EventsView}. */\nexport interface EventsViewParts {\n /** Scrollable container wrapping the entire vertical timeline. */\n timeline?: HTMLAttributes<HTMLDivElement>;\n /** One timeline event article element with `data-position` (left/right). */\n event?: HTMLAttributes<HTMLElement>;\n /** Separator column containing the marker and optional connector line. */\n separator?: HTMLAttributes<HTMLDivElement>;\n /** Event marker (the circular dot on the timeline spine). */\n marker?: HTMLAttributes<HTMLDivElement>;\n /** Vertical line connecting consecutive event markers. */\n connector?: HTMLAttributes<HTMLDivElement>;\n /** Content panel showing the event card (type, timestamp, properties). */\n content?: HTMLAttributes<HTMLDivElement>;\n}\n\nconst eventsViewPartsMatchManifest: ExactPartKeys<EventsViewParts, PartsOf<'EventsView'>> = true;\nvoid eventsViewPartsMatchManifest;\n\n/** Props for the standalone, localized event timeline. */\nexport interface EventsViewProps {\n /** Ordered list of domain events to render in the vertical timeline. */\n events: Event[];\n /** CSS class name applied to the timeline root. */\n className?: string;\n /** Cratis-owned per-part attributes for timeline, event, separator, marker, connector, content. */\n pt?: EventsViewParts;\n /**\n * @deprecated Cratis parts always merge. Remove this renderer-era option.\n */\n ptOptions?: object;\n /**\n * @deprecated Components always uses consumer-owned CSS. Customize through `pt` and CSS instead.\n */\n unstyled?: boolean;\n /** Override any user-facing string (for localization). See {@link TimeMachineLabels}. */\n labels?: TimeMachineLabels;\n}\n\nexport const SelectedEventSequenceNumbersContext =\n createContext<ReadonlySet<number> | undefined>(undefined);\n\n/** Vertical, alternating timeline visualization of an ordered event list. */\nexport const EventsView = ({\n events,\n className,\n pt,\n labels = defaultTimeMachineLabels,\n}: EventsViewProps) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const selectedEventSequenceNumbers = useContext(\n SelectedEventSequenceNumbersContext,\n );\n const [canScrollUp, setCanScrollUp] = useState(false);\n const [canScrollDown, setCanScrollDown] = useState(false);\n\n const updateScrollState = () => {\n const container = containerRef.current;\n if (!container) {\n setCanScrollUp(false);\n setCanScrollDown(false);\n return;\n }\n const { scrollTop, scrollHeight, clientHeight } = container;\n setCanScrollUp(scrollTop > 1);\n setCanScrollDown(scrollTop + clientHeight < scrollHeight - 1);\n };\n\n useEffect(() => {\n updateScrollState();\n const container = containerRef.current;\n if (!container) return;\n container.addEventListener('scroll', updateScrollState);\n return () => container.removeEventListener('scroll', updateScrollState);\n }, [events.length]);\n\n const scrollBehavior = (): ScrollBehavior =>\n window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth';\n const scrollToTop = () =>\n containerRef.current?.scrollTo({ top: 0, behavior: scrollBehavior() });\n const scrollToBottom = () => {\n const container = containerRef.current;\n if (container)\n container.scrollTo({\n top: container.scrollHeight,\n behavior: scrollBehavior(),\n });\n };\n\n return (\n <div\n className='events-view-container'\n ref={containerRef}\n role='group'\n aria-label={labels.eventTimelineRegion}\n tabIndex={0}\n >\n {canScrollUp && (\n <div className='events-view-scroll-button-wrapper events-view-scroll-button-wrapper--top'>\n <button\n type='button'\n className='events-view-scroll-button events-view-scroll-button--top'\n onClick={scrollToTop}\n aria-label={labels.scrollToTop}\n >\n ↑\n </button>\n </div>\n )}\n <div\n {...pt?.timeline}\n className={classNames(\n 'events-view-timeline',\n pt?.timeline?.className,\n className,\n )}\n data-cratis-part='timeline'\n >\n {events.map((event, index) => {\n const position = index % 2 === 0 ? 'right' : 'left';\n const isSelected = selectedEventSequenceNumbers?.has(\n event.sequenceNumber,\n );\n return (\n <article\n key={`${event.type}-${event.occurred.toISOString()}-${index}`}\n {...pt?.event}\n className={classNames(\n 'events-view-timeline-event',\n pt?.event?.className,\n )}\n data-cratis-part='event'\n data-position={position}\n data-selected={isSelected || undefined}\n >\n <div\n {...pt?.separator}\n className={classNames(\n 'events-view-timeline-separator',\n pt?.separator?.className,\n )}\n data-cratis-part='separator'\n >\n <div\n {...pt?.marker}\n className={classNames(\n 'events-view-marker',\n pt?.marker?.className,\n )}\n data-cratis-part='marker'\n data-selected={isSelected || undefined}\n >\n <div className='events-view-marker-dot' />\n </div>\n {index < events.length - 1 && (\n <div\n {...pt?.connector}\n className={classNames(\n 'events-view-timeline-connector',\n pt?.connector?.className,\n )}\n data-cratis-part='connector'\n />\n )}\n </div>\n <div\n {...pt?.content}\n className={classNames(\n 'events-view-timeline-content',\n pt?.content?.className,\n )}\n data-cratis-part='content'\n >\n <div\n className={`events-view-event-card events-view-event-card--${position}`}\n >\n <div\n className={`events-view-event-header ${position === 'left' ? 'events-view-event-header--right' : ''}`}\n >\n <h3\n className={`events-view-event-name ${position === 'left' ? 'events-view-event-name--right' : ''}`}\n >\n {event.type}\n </h3>\n <div\n className={`events-view-event-timestamp ${position === 'left' ? 'events-view-event-timestamp--right' : ''}`}\n >\n {event.occurred.toLocaleString()}\n </div>\n </div>\n <div className='events-view-event-properties'>\n <Properties\n data={event.content || {}}\n align='left'\n />\n </div>\n </div>\n </div>\n </article>\n );\n })}\n </div>\n {canScrollDown && (\n <div className='events-view-scroll-button-wrapper events-view-scroll-button-wrapper--bottom'>\n <button\n type='button'\n className='events-view-scroll-button events-view-scroll-button--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cAAc,EAAA,YAAA,EACX,MAAM,CAAC,cAAc,EAAA,QAAA,EAAA,QAAA,EAAA,CAG5B,EAAA,CACP,CACT,CAAA,EAAA,CACC;AAEd;;"}
1
+ {"version":3,"file":"EventsView.js","sources":["../../../TimeMachine/EventsView.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 {\n createContext,\n useContext,\n type HTMLAttributes,\n} from 'react';\nimport { type TimeMachineLabels, defaultTimeMachineLabels } from './TimeMachineLabels';\nimport { EventsScrollButton } from './EventsScrollButton';\nimport { EventTimelineItem } from './EventTimelineItem';\nimport { useScrollEdges } from './useScrollEdges';\nimport type { Event } from './types';\nimport type { ExactPartKeys } from '../types/ExactPartKeys';\nimport type { PartsOf } from '../types/parts';\nimport { classNames } from '../ClassNames/classNames';\n\n/** Stable part attributes for {@link EventsView}. */\nexport interface EventsViewParts {\n /** Scrollable container wrapping the entire vertical timeline. */\n timeline?: HTMLAttributes<HTMLDivElement>;\n /** One timeline event article element with `data-position` (left/right). */\n event?: HTMLAttributes<HTMLElement>;\n /** Separator column containing the marker and optional connector line. */\n separator?: HTMLAttributes<HTMLDivElement>;\n /** Event marker (the circular dot on the timeline spine). */\n marker?: HTMLAttributes<HTMLDivElement>;\n /** Vertical line connecting consecutive event markers. */\n connector?: HTMLAttributes<HTMLDivElement>;\n /** Content panel showing the event card (type, timestamp, properties). */\n content?: HTMLAttributes<HTMLDivElement>;\n}\n\nconst eventsViewPartsMatchManifest: ExactPartKeys<EventsViewParts, PartsOf<'EventsView'>> = true;\nvoid eventsViewPartsMatchManifest;\n\n/** Props for the standalone, localized event timeline. */\nexport interface EventsViewProps {\n /** Ordered list of domain events to render in the vertical timeline. */\n events: Event[];\n /** CSS class name applied to the timeline root. */\n className?: string;\n /** Cratis-owned per-part attributes for timeline, event, separator, marker, connector, content. */\n pt?: EventsViewParts;\n /**\n * @deprecated Cratis parts always merge. Remove this renderer-era option.\n */\n ptOptions?: object;\n /**\n * @deprecated Components always uses consumer-owned CSS. Customize through `pt` and CSS instead.\n */\n unstyled?: boolean;\n /** Override any user-facing string (for localization). See {@link TimeMachineLabels}. */\n labels?: TimeMachineLabels;\n}\n\nexport const SelectedEventSequenceNumbersContext =\n createContext<ReadonlySet<number> | undefined>(undefined);\n\n/** Vertical, alternating timeline visualization of an ordered event list. */\nexport const EventsView = ({\n events,\n className,\n pt,\n labels = defaultTimeMachineLabels,\n}: EventsViewProps) => {\n const selectedEventSequenceNumbers = useContext(\n SelectedEventSequenceNumbersContext,\n );\n const { containerRef, canScrollUp, canScrollDown, scrollToTop, scrollToBottom } =\n useScrollEdges(events.length);\n\n return (\n <div\n className='events-view-container'\n ref={containerRef}\n role='group'\n aria-label={labels.eventTimelineRegion}\n tabIndex={0}\n >\n {canScrollUp && (\n <EventsScrollButton edge='top' label={labels.scrollToTop} onClick={scrollToTop} />\n )}\n <div\n {...pt?.timeline}\n className={classNames(\n 'events-view-timeline',\n pt?.timeline?.className,\n className,\n )}\n data-cratis-part='timeline'\n >\n {events.map((event, index) => (\n <EventTimelineItem\n key={`${event.type}-${event.occurred.toISOString()}-${index}`}\n event={event}\n position={index % 2 === 0 ? 'right' : 'left'}\n isSelected={selectedEventSequenceNumbers?.has(event.sequenceNumber)}\n hasConnector={index < events.length - 1}\n pt={pt}\n />\n ))}\n </div>\n {canScrollDown && (\n <EventsScrollButton edge='bottom' label={labels.scrollToBottom} onClick={scrollToBottom} />\n )}\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;MAwDa,mCAAmC,GAC5C,aAAa,CAAkC,SAAS;AAGrD,MAAM,UAAU,GAAG,CAAC,EACvB,MAAM,EACN,SAAS,EACT,EAAE,EACF,MAAM,GAAG,wBAAwB,GACnB,KAAI;AAClB,IAAA,MAAM,4BAA4B,GAAG,UAAU,CAC3C,mCAAmC,CACtC;AACD,IAAA,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa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 -0,0 +1,13 @@
1
+ /**
2
+ * Tracks whether a scrollable container has content above or below its viewport
3
+ * and offers scrolling to either end, honoring the reduced-motion preference.
4
+ * @param contentKey A value that changes when the content size changes, so the edges are measured again.
5
+ */
6
+ export declare const useScrollEdges: (contentKey: number) => {
7
+ containerRef: import("react").RefObject<HTMLDivElement | null>;
8
+ canScrollUp: boolean;
9
+ canScrollDown: boolean;
10
+ scrollToTop: () => void | undefined;
11
+ scrollToBottom: () => void;
12
+ };
13
+ //# sourceMappingURL=useScrollEdges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollEdges.d.ts","sourceRoot":"","sources":["../../../TimeMachine/useScrollEdges.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,cAAc,eAAgB,MAAM;;;;;;CAqChD,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { useRef, useState, useEffect } from 'react';
2
+
3
+ const scrollBehavior = () => window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth';
4
+ const useScrollEdges = (contentKey) => {
5
+ const containerRef = useRef(null);
6
+ const [canScrollUp, setCanScrollUp] = useState(false);
7
+ const [canScrollDown, setCanScrollDown] = useState(false);
8
+ const updateScrollState = () => {
9
+ const container = containerRef.current;
10
+ if (!container) {
11
+ setCanScrollUp(false);
12
+ setCanScrollDown(false);
13
+ return;
14
+ }
15
+ const { scrollTop, scrollHeight, clientHeight } = container;
16
+ setCanScrollUp(scrollTop > 1);
17
+ setCanScrollDown(scrollTop + clientHeight < scrollHeight - 1);
18
+ };
19
+ useEffect(() => {
20
+ updateScrollState();
21
+ const container = containerRef.current;
22
+ if (!container)
23
+ return;
24
+ container.addEventListener('scroll', updateScrollState);
25
+ return () => container.removeEventListener('scroll', updateScrollState);
26
+ }, [contentKey]);
27
+ const scrollToTop = () => containerRef.current?.scrollTo({ top: 0, behavior: scrollBehavior() });
28
+ const scrollToBottom = () => {
29
+ const container = containerRef.current;
30
+ if (container)
31
+ container.scrollTo({
32
+ top: container.scrollHeight,
33
+ behavior: scrollBehavior(),
34
+ });
35
+ };
36
+ return { containerRef, canScrollUp, canScrollDown, scrollToTop, scrollToBottom };
37
+ };
38
+
39
+ export { useScrollEdges };
40
+ //# sourceMappingURL=useScrollEdges.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollEdges.js","sources":["../../../TimeMachine/useScrollEdges.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 { useEffect, useRef, useState } from 'react';\n\nconst scrollBehavior = (): ScrollBehavior =>\n window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth';\n\n/**\n * Tracks whether a scrollable container has content above or below its viewport\n * and offers scrolling to either end, honoring the reduced-motion preference.\n * @param contentKey A value that changes when the content size changes, so the edges are measured again.\n */\nexport const useScrollEdges = (contentKey: number) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [canScrollUp, setCanScrollUp] = useState(false);\n const [canScrollDown, setCanScrollDown] = useState(false);\n\n const updateScrollState = () => {\n const container = containerRef.current;\n if (!container) {\n setCanScrollUp(false);\n setCanScrollDown(false);\n return;\n }\n const { scrollTop, scrollHeight, clientHeight } = container;\n setCanScrollUp(scrollTop > 1);\n setCanScrollDown(scrollTop + clientHeight < scrollHeight - 1);\n };\n\n useEffect(() => {\n updateScrollState();\n const container = containerRef.current;\n if (!container) return;\n container.addEventListener('scroll', updateScrollState);\n return () => container.removeEventListener('scroll', updateScrollState);\n }, [contentKey]);\n\n const scrollToTop = () =>\n containerRef.current?.scrollTo({ top: 0, behavior: scrollBehavior() });\n const scrollToBottom = () => {\n const container = containerRef.current;\n if (container)\n container.scrollTo({\n top: container.scrollHeight,\n behavior: scrollBehavior(),\n });\n };\n\n return { containerRef, canScrollUp, canScrollDown, scrollToTop, scrollToBottom };\n};\n"],"names":[],"mappings":";;AAKA,MAAM,cAAc,GAAG,MACnB,MAAM,CAAC,UAA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O;AACtC,QAAA,IAAI,SAAS;YACT,SAAS,CAAC,QAAQ,CAAC;gBACf,GAAG,EAAE,SAAS,CAAC,YAAY;gBAC3B,QAAQ,EAAE,cAAc,EAAE;AAC7B,aAAA,CAAC;AACV,IAAA,CAAC;IAED,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE;AACpF;;"}
@@ -8,8 +8,8 @@ import 'react-aria-components';
8
8
  import 'ts-deepmerge';
9
9
  import 'react-dom';
10
10
  import { useCratisComponentsConfig } from '../configuration/CratisComponentsContext.js';
11
- import { useCratisIcon } from '../configuration/useCratisIcon.js';
12
11
  import '../Notifications/toast.js';
12
+ import { useCratisIcon } from '../configuration/useCratisIcon.js';
13
13
  import '../renderer/RendererContext.js';
14
14
  import { ToolbarDrawerContext } from './ToolbarDrawerContext.js';
15
15
  import { resolveToolbarDrawerPlacement } from './ToolbarDrawerPlacement.js';
@@ -54,7 +54,7 @@ export type { unstable_CapabilityId } from './capabilities.js';
54
54
  export { unstable_AdapterError, unstable_adapterErrorCodes, type unstable_AdapterDiagnostic, type unstable_AdapterErrorCode, } from './errors.js';
55
55
  export { unstable_CRATIS_UI_ABI_VERSION, unstable_composeUiLibraries, unstable_defineUiLibrary, type CratisPresentationUiLibraryProviderProps, type CratisRendererSetup, type CratisRendererSetupExtensions, type unstable_RendererSetup, type unstable_RendererSetupExtensions, type unstable_UiLibrary, type unstable_UiLibraryProviderProps, } from './manifest.js';
56
56
  export { unstable_defaultOverlayEnvironment, type CratisOverlayEnvironment, type unstable_CratisOverlayEnvironment, } from './overlayEnvironment.js';
57
- export { CRATIS_PRESENTATION_ABI_VERSION, CRATIS_PRESENTATION_PROFILE, cratisPresentationSlotIds, definePresentationUiLibrary, type CratisPresentationCapabilities, type CratisPresentationCapabilityId, type CratisPresentationSlotDeclaration, type CratisPresentationSlotId, type CratisPresentationSlotMap, type CratisPresentationSlots, type CratisPresentationUiLibrary, } from './presentation.js';
57
+ export { CRATIS_PRESENTATION_ABI_VERSION, CRATIS_PRESENTATION_PROFILE, cratisPresentationSlotIds, definePresentationUiLibrary, type CratisPresentationCapabilities, type CratisPresentationCapabilityId, type CratisPresentationSlotDeclaration, type CratisPresentationSlotId, type CratisPresentationSlotMap, type CratisPresentationSlots, type CratisPresentationUiLibrary, cratisAtomicSlotIds, type CratisAtomicSlotDeclaration, type CratisAtomicSlotId, type CratisAtomicSlotMap, type CratisAtomicSlots, } from './presentation.js';
58
58
  export { unstable_useCapability, unstable_useOverlayEnvironment, unstable_useRendererId, } from './RendererContext.js';
59
59
  export { unstable_RendererScope, type unstable_RendererScopeProps, } from './RendererScope.js';
60
60
  export type { unstable_BehaviorMode, unstable_CratisSlots, unstable_Fidelity, unstable_SlotDeclaration, unstable_SlotId, unstable_SlotMap, } from './slots.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../renderer/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAA8B,CAAC;AACxE,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,qBAAqB,EACrB,0BAA0B,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,GACjC,MAAM,aAAU,CAAC;AAClB,OAAO,EACH,8BAA8B,EAC9B,2BAA2B,EAC3B,wBAAwB,EACxB,KAAK,wCAAwC,EAC7C,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,GACvC,MAAM,eAAY,CAAC;AACpB,OAAO,EACH,kCAAkC,EAClC,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,GACzC,MAAM,yBAAsB,CAAC;AAC9B,OAAO,EACH,+BAA+B,EAC/B,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC3B,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,KAAK,iCAAiC,EACtC,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,mBAAmB,EACnB,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACzB,MAAM,mBAAgB,CAAC;AACxB,OAAO,EACH,sBAAsB,EACtB,8BAA8B,EAC9B,sBAAsB,GACzB,MAAM,sBAAmB,CAAC;AAC3B,OAAO,EACH,sBAAsB,EACtB,KAAK,2BAA2B,GACnC,MAAM,oBAAiB,CAAC;AACzB,YAAY,EACR,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,gBAAgB,GACnB,MAAM,YAAS,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export { unstable_AdapterError, unstable_adapterErrorCodes } from './errors.js';
2
2
  export { unstable_CRATIS_UI_ABI_VERSION, unstable_composeUiLibraries, unstable_defineUiLibrary } from './manifest.js';
3
3
  export { unstable_defaultOverlayEnvironment } from './overlayEnvironment.js';
4
- export { CRATIS_PRESENTATION_ABI_VERSION, CRATIS_PRESENTATION_PROFILE, cratisPresentationSlotIds, definePresentationUiLibrary } from './presentation.js';
4
+ export { CRATIS_PRESENTATION_ABI_VERSION, CRATIS_PRESENTATION_PROFILE, cratisAtomicSlotIds, cratisPresentationSlotIds, definePresentationUiLibrary } from './presentation.js';
5
5
  export { unstable_useCapability, unstable_useOverlayEnvironment, unstable_useRendererId } from './RendererContext.js';
6
6
  export { unstable_RendererScope } from './RendererScope.js';
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../renderer/manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAS,CAAC;AAEjE;;;GAGG;AAIH,MAAM,WAAW,6BAA8B,SAAQ,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC;CAAG;AAE9E;;;;GAIG;AAGH,MAAM,WAAW,gCAAiC,SAAQ,6BAA6B;CAAG;AAE1F,iFAAiF;AACjF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;KAEnC,GAAG,IACC,MAAM,6BAA6B,GAAG,MAAM,gCAAgC,CACnF,CAAC,EAAE,OAAO;CACd,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAEzD,yEAAyE;AACzE,MAAM,WAAW,wCAAwC;IACrD,sFAAsF;IACtF,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,2BAA2B;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,M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CAAC,YAAY,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACnD,iEAAiE;IACjE,QAAQ,CAAC,YAAY,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACxD,+CAA+C;IAC/C,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,wCAAwC,CAAC,CAAC;IAC5E,uFAAuF;IACvF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,SAAS,0BAA0B,EAAE,CAAC;CACpE;AAoCD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,GAAI,KAAK,CAAC,CAAC,SAAS,kBAAkB,WAC9D,CAAC,KACX,CAQQ,CAAC;AAEZ;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,iBACtB,SAAS,kBAAkB,EAAE,KAC5C,kBAiBF,CAAC"}
@@ -1,12 +1,32 @@
1
+ import { stableAtomicSlotsOf } from './presentation.js';
2
+
1
3
  const unstable_CRATIS_UI_ABI_VERSION = 1;
4
+ const defineOwnSlot = (target, slotId, value) => {
5
+ Object.defineProperty(target, slotId, {
6
+ value,
7
+ enumerable: true,
8
+ writable: true,
9
+ configurable: true,
10
+ });
11
+ };
2
12
  const frozenSlots = (slots) => {
3
13
  const copy = {};
4
14
  for (const [slotId, declaration] of Object.entries(slots)) {
5
15
  if (declaration)
6
- copy[slotId] = Object.freeze({ ...declaration });
16
+ defineOwnSlot(copy, slotId, Object.freeze({ ...declaration }));
7
17
  }
8
18
  return Object.freeze(copy);
9
19
  };
20
+ const mergedSlots = (libraries) => {
21
+ const slots = {};
22
+ for (const library of libraries) {
23
+ const librarySlots = { ...library.slots, ...stableAtomicSlotsOf(library) };
24
+ for (const [slotId, declaration] of Object.entries(librarySlots)) {
25
+ defineOwnSlot(slots, slotId, declaration);
26
+ }
27
+ }
28
+ return slots;
29
+ };
10
30
  const unstable_defineUiLibrary = (library) => Object.freeze({
11
31
  ...library,
12
32
  capabilities: Object.freeze([...library.capabilities]),
@@ -23,7 +43,7 @@ const unstable_composeUiLibraries = (...libraries) => {
23
43
  const capabilities = [
24
44
  ...new Set(libraries.flatMap((library) => library.capabilities)),
25
45
  ];
26
- const slots = Object.assign({}, ...libraries.map((library) => library.slots));
46
+ const slots = mergedSlots(libraries);
27
47
  return unstable_defineUiLibrary({
28
48
  ...last,
29
49
  capabilities,
@@ -32,5 +52,5 @@ const unstable_composeUiLibraries = (...libraries) => {
32
52
  });
33
53
  };
34
54
 
35
- export { unstable_CRATIS_UI_ABI_VERSION, unstable_composeUiLibraries, unstable_defineUiLibrary };
55
+ export { defineOwnSlot, unstable_CRATIS_UI_ABI_VERSION, unstable_composeUiLibraries, unstable_defineUiLibrary };
36
56
  //# sourceMappingURL=manifest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sources":["../../../renderer/manifest.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 type { ComponentType, ReactNode } from 'react';\nimport type { unstable_CapabilityId } from './capabilities';\nimport type { unstable_AdapterDiagnostic } from './errors';\nimport type { unstable_SlotId, unstable_SlotMap } from './slots';\n\n/**\n * Open declaration-merging surface for renderer-specific, non-secret setup attestations.\n * Adapter packages add boolean keys only; credentials never belong in this interface.\n */\n// Adapter packages add only non-secret boolean attestations through declaration merging.\n// biome-ignore lint/style/useConsistentTypeDefinitions: declaration merging requires an interface.\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface CratisRendererSetupExtensions extends Record<never, never> {}\n\n/**\n * Compatibility declaration-merging surface for renderer setup attestations.\n *\n * @deprecated Merge new adapter keys into {@link CratisRendererSetupExtensions}.\n */\n// biome-ignore lint/style/useConsistentTypeDefinitions: declaration merging requires an interface.\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface unstable_RendererSetupExtensions extends CratisRendererSetupExtensions {}\n\n/** Non-secret application setup attestations supplied to a renderer provider. */\nexport type CratisRendererSetup = Readonly<{\n [\n Key in\n keyof CratisRendererSetupExtensions | keyof unstable_RendererSetupExtensions\n ]?: boolean;\n}>;\n\n/**\n * Compatibility alias for {@link CratisRendererSetup}.\n *\n * @deprecated Use {@link CratisRendererSetup}.\n */\nexport type unstable_RendererSetup = CratisRendererSetup;\n\n/** Props supplied to a stable presentation renderer library provider. */\nexport interface CratisPresentationUiLibraryProviderProps {\n /** Non-secret application setup attestations. Never credentials or license tokens. */\n readonly setup: CratisRendererSetup;\n /** Application content. */\n readonly children: ReactNode;\n}\n\n/**\n * Compatibility alias for {@link CratisPresentationUiLibraryProviderProps}.\n *\n * @deprecated Use {@link CratisPresentationUiLibraryProviderProps}.\n */\nexport type unstable_UiLibraryProviderProps = CratisPresentationUiLibraryProviderProps;\n\n/**\n * Renderer ABI major implemented by this package.\n *\n * @unstable Adapter-author contract. Expect changes until renderer conformance gates promote it.\n */\nexport const unstable_CRATIS_UI_ABI_VERSION = 1;\n\n/**\n * Runtime renderer manifest. Manifests are immutable values and are never passed through the\n * Components configuration deep-merge path.\n *\n * @unstable Adapter-author contract. Expect changes until renderer conformance gates promote it.\n */\nexport interface unstable_UiLibrary {\n /** Stable, package-local renderer identity used for diagnostics and telemetry. */\n readonly id: string;\n /** Human-readable renderer name. */\n readonly displayName: string;\n /** Renderer ABI major implemented by this library. */\n readonly abi: number;\n /** Breadth and ownership level offered by the library. */\n readonly level: 'full' | 'primitive' | 'behavior' | 'portal' | 'theme';\n /** Named contract profile promised by the library. */\n readonly profile: string;\n /**\n * Slots promised by the named profile. When omitted, the library promises its own slot keys.\n */\n readonly profileSlots?: readonly unstable_SlotId[];\n /** Core-owned capabilities honestly supported by the library. */\n readonly capabilities: readonly unstable_CapabilityId[];\n /** Typed partial slot implementation table. */\n readonly slots: unstable_SlotMap;\n /** Optional library-level provider mounted once around the selected renderer scope. */\n readonly Provider?: ComponentType<CratisPresentationUiLibraryProviderProps>;\n /** Optional static diagnostic preflight evaluated by renderer providers and scopes. */\n readonly preflight?: () => readonly unstable_AdapterDiagnostic[];\n}\n\nconst frozenSlots = (slots: unstable_SlotMap): unstable_SlotMap => {\n const copy: Record<string, object> = {};\n for (const [slotId, declaration] of Object.entries(slots)) {\n if (declaration) copy[slotId] = Object.freeze({ ...declaration });\n }\n return Object.freeze(copy) as unstable_SlotMap;\n};\n\n/**\n * Defines a renderer library while preserving its inferred literal type. The helper is\n * side-effect-free and defensively copies/freezes mutable manifest containers; component and\n * callback references remain untouched.\n *\n * @param library Renderer library to define.\n * @returns A frozen defensive copy with the same inferred public type.\n * @unstable Adapter-author contract. Expect changes until renderer conformance gates promote it.\n */\nexport const unstable_defineUiLibrary = <const T extends unstable_UiLibrary>(\n library: T,\n): T =>\n Object.freeze({\n ...library,\n capabilities: Object.freeze([...library.capabilities]),\n profileSlots: Object.freeze([\n ...(library.profileSlots ?? Object.keys(library.slots)),\n ]),\n slots: frozenSlots(library.slots),\n }) as T;\n\n/**\n * Composes one or more renderer libraries. Slot declarations and metadata use last-library-wins\n * semantics; capabilities are de-duplicated in first-seen order for deterministic diagnostics.\n * The result is defensively copied and frozen through {@link unstable_defineUiLibrary}.\n *\n * @param libraries Libraries in increasing precedence order.\n * @returns One frozen renderer library containing the union of capabilities and slots.\n * @throws {RangeError} When no libraries are supplied.\n * @unstable Adapter-author contract. Expect changes until renderer conformance gates promote it.\n */\nexport const unstable_composeUiLibraries = (\n ...libraries: readonly unstable_UiLibrary[]\n): unstable_UiLibrary => {\n if (libraries.length === 0) {\n throw new RangeError('At least one UI library is required for composition.');\n }\n\n const last = libraries[libraries.length - 1];\n const capabilities = [\n ...new Set(libraries.flatMap((library) => library.capabilities)),\n ];\n const slots = Object.assign({}, ...libraries.map((library) => library.slots));\n\n return unstable_defineUiLibrary({\n ...last,\n capabilities,\n profileSlots: last.profileSlots ?? (Object.keys(slots) as unstable_SlotId[]),\n slots,\n });\n};\n"],"names":[],"mappings":"AA6DO,MAAM,8BAA8B,G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C,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;AAE7E,IAAA,OAAO,wBAAwB,CAAC;AAC5B,QAAA,GAAG,IAAI;QACP,YAAY;QACZ,YAAY,EAAE,IAAI,CAAC,YAAY,IAAK,MAAM,CAAC,IAAI,CAAC,KAAK,CAAuB;QAC5E,KAAK;AACR,KAAA,CAAC;AACN;;"}
1
+ {"version":3,"file":"manifest.js","sources":["../../../renderer/manifest.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 type { ComponentType, ReactNode } from 'react';\nimport type { unstable_CapabilityId } from './capabilities';\nimport type { unstable_AdapterDiagnostic } from './errors';\nimport { stableAtomicSlotsOf } from './presentation';\nimport type { unstable_SlotId, unstable_SlotMap } from './slots';\n\n/**\n * Open declaration-merging surface for renderer-specific, non-secret setup attestations.\n * Adapter packages add boolean keys only; credentials never belong in this interface.\n */\n// Adapter packages add only non-secret boolean attestations through declaration merging.\n// biome-ignore lint/style/useConsistentTypeDefinitions: declaration merging requires an interface.\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface CratisRendererSetupExtensions extends Record<never, never> {}\n\n/**\n * Compatibility declaration-merging surface for renderer setup attestations.\n *\n * @deprecated Merge new adapter keys into {@link CratisRendererSetupExtensions}.\n */\n// biome-ignore lint/style/useConsistentTypeDefinitions: declaration merging requires an interface.\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface unstable_RendererSetupExtensions extends CratisRendererSetupExtensions {}\n\n/** Non-secret application setup attestations supplied to a renderer provider. */\nexport type CratisRendererSetup = Readonly<{\n [\n Key in\n keyof CratisRendererSetupExtensions | keyof unstable_RendererSetupExtensions\n ]?: boolean;\n}>;\n\n/**\n * Compatibility alias for {@link CratisRendererSetup}.\n *\n * @deprecated Use {@link CratisRendererSetup}.\n */\nexport type unstable_RendererSetup = CratisRendererSetup;\n\n/** Props supplied to a stable presentation renderer library provider. */\nexport interface CratisPresentationUiLibraryProviderProps {\n /** Non-secret application setup attestations. Never credentials or license tokens. */\n readonly setup: CratisRendererSetup;\n /** Application content. */\n readonly children: ReactNode;\n}\n\n/**\n * Compatibility alias for {@link CratisPresentationUiLibraryProviderProps}.\n *\n * @deprecated Use {@link CratisPresentationUiLibraryProviderProps}.\n */\nexport type unstable_UiLibraryProviderProps = CratisPresentationUiLibraryProviderProps;\n\n/**\n * Renderer ABI major implemented by this package.\n *\n * @unstable Adapter-author contract. Expect changes until renderer conformance gates promote it.\n */\nexport const unstable_CRATIS_UI_ABI_VERSION = 1;\n\n/**\n * Runtime renderer manifest. Manifests are immutable values and are never passed through the\n * Components configuration deep-merge path.\n *\n * @unstable Adapter-author contract. Expect changes until renderer conformance gates promote it.\n */\nexport interface unstable_UiLibrary {\n /** Stable, package-local renderer identity used for diagnostics and telemetry. */\n readonly id: string;\n /** Human-readable renderer name. */\n readonly displayName: string;\n /** Renderer ABI major implemented by this library. */\n readonly abi: number;\n /** Breadth and ownership level offered by the library. */\n readonly level: 'full' | 'primitive' | 'behavior' | 'portal' | 'theme';\n /** Named contract profile promised by the library. */\n readonly profile: string;\n /**\n * Slots promised by the named profile. When omitted, the library promises its own slot keys.\n */\n readonly profileSlots?: readonly unstable_SlotId[];\n /** Core-owned capabilities honestly supported by the library. */\n readonly capabilities: readonly unstable_CapabilityId[];\n /** Typed partial slot implementation table. */\n readonly slots: unstable_SlotMap;\n /** Optional library-level provider mounted once around the selected renderer scope. */\n readonly Provider?: ComponentType<CratisPresentationUiLibraryProviderProps>;\n /** Optional static diagnostic preflight evaluated by renderer providers and scopes. */\n readonly preflight?: () => readonly unstable_AdapterDiagnostic[];\n}\n\n/**\n * Sets an own enumerable data property. Unlike assignment, an own `__proto__` key cannot change\n * the target's prototype.\n *\n * @internal Slot-map construction helper; not part of the public package surface.\n */\nexport const defineOwnSlot = (target: Record<string, unknown>, slotId: string, value: unknown) => {\n Object.defineProperty(target, slotId, {\n value,\n enumerable: true,\n writable: true,\n configurable: true,\n });\n};\n\nconst frozenSlots = (slots: unstable_SlotMap): unstable_SlotMap => {\n const copy: Record<string, object> = {};\n for (const [slotId, declaration] of Object.entries(slots)) {\n if (declaration) defineOwnSlot(copy, slotId, Object.freeze({ ...declaration }));\n }\n return Object.freeze(copy) as unstable_SlotMap;\n};\n\nconst mergedSlots = (libraries: readonly unstable_UiLibrary[]): unstable_SlotMap => {\n const slots: Record<string, unknown> = {};\n for (const library of libraries) {\n const librarySlots = { ...library.slots, ...stableAtomicSlotsOf(library) };\n for (const [slotId, declaration] of Object.entries(librarySlots)) {\n defineOwnSlot(slots, slotId, declaration);\n }\n }\n return slots as unstable_SlotMap;\n};\n\n/**\n * Defines a renderer library while preserving its inferred literal type. The helper is\n * side-effect-free and defensively copies/freezes mutable manifest containers; component and\n * callback references remain untouched.\n *\n * @param library Renderer library to define.\n * @returns A frozen defensive copy with the same inferred public type.\n * @unstable Adapter-author contract. Expect changes until renderer conformance gates promote it.\n */\nexport const unstable_defineUiLibrary = <const T extends unstable_UiLibrary>(\n library: T,\n): T =>\n Object.freeze({\n ...library,\n capabilities: Object.freeze([...library.capabilities]),\n profileSlots: Object.freeze([\n ...(library.profileSlots ?? Object.keys(library.slots)),\n ]),\n slots: frozenSlots(library.slots),\n }) as T;\n\n/**\n * Composes one or more renderer libraries. Slot declarations and metadata use last-library-wins\n * semantics; capabilities are de-duplicated in first-seen order for deterministic diagnostics.\n * The result is defensively copied and frozen through {@link unstable_defineUiLibrary}.\n *\n * @param libraries Libraries in increasing precedence order.\n * @returns One frozen renderer library containing the union of capabilities and slots.\n * @throws {RangeError} When no libraries are supplied.\n * @unstable Adapter-author contract. Expect changes until renderer conformance gates promote it.\n */\nexport const unstable_composeUiLibraries = (\n ...libraries: readonly unstable_UiLibrary[]\n): unstable_UiLibrary => {\n if (libraries.length === 0) {\n throw new RangeError('At least one UI library is required for composition.');\n }\n\n const last = libraries[libraries.length - 1];\n const capabilities = [\n ...new Set(libraries.flatMap((library) => library.capabilities)),\n ];\n const slots = mergedSlots(libraries);\n\n return unstable_defineUiLibrary({\n ...last,\n capabilities,\n profileSlots: last.profileSlots ?? (Object.keys(slots) as unstable_SlotId[]),\n slots,\n });\n};\n"],"names":[],"mappings":";;AA8DO,MAAM,8BAA8B,GAAG;AAuCvC,MAAM,aAAa,GAAG,CAAC,MAA+B,EAAE,MAAc,EAAE,KAAc,KAAI;AAC7F,IAAA,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;QAClC,KAAK;AACL,QAAA,UAAU,EAAE,IAAI;AAChB,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,YAAY,EAAE,IAAI;AACrB,KAAA,CAAC;AACN;AAEA,MAAM,WAAW,GAAG,CAAC,KAAuB,KAAsB;IAC9D,MAAM,IAAI,GAA2B,EAAE;AACvC,IAAA,KAAK,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACvD,QAAA,IAAI,WAAW;AAAE,YAAA,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC,CAAC;IACnF;AACA,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAqB;AAClD,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,SAAwC,KAAsB;IAC/E,MAAM,KAAK,GAA4B,EAAE;AACzC,IAAA,KAAK,MAAM,OAAO,IAAI,SAAS,EAAE;AAC7B,QAAA,MAAM,YAAY,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG,mBAAmB,CAAC,OAAO,CAAC,EAAE;AAC1E,QAAA,KAAK,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AAC9D,YAAA,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC;QAC7C;IACJ;AACA,IAAA,OAAO,KAAyB;AACpC,CAAC;AAWM,MAAM,wBAAwB,GAAG,CACpC,OAAU,KAEV,MAAM,CAAC,MAAM,CAAC;AACV,IAAA,GAAG,OAAO;IACV,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACtD,IAAA,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC;AACxB,QAAA,IAAI,OAAO,CAAC,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAC1D,CAAC;AACF,IAAA,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC;AACpC,CAAA;MAYQ,2BAA2B,GAAG,CACvC,GAAG,SAAwC,KACvB;AACpB,IAAA,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;AACxB,QAAA,MAAM,IAAI,UAAU,CAAC,sDAAsD,CAAC;IAChF;IAEA,MAAM,IAAI,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;AAC5C,IAAA,MAAM,YAAY,GAAG;AACjB,QAAA,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;KACnE;AACD,IAAA,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC;AAEpC,IAAA,OAAO,wBAAwB,CAAC;AAC5B,QAAA,GAAG,IAAI;QACP,YAAY;QACZ,YAAY,EAAE,IAAI,CAAC,YAAY,IAAK,MAAM,CAAC,IAAI,CAAC,KAAK,CAAuB;QAC5E,KAAK;AACR,KAAA,CAAC;AACN;;"}
@@ -7,6 +7,7 @@ import type { SurfaceProps } from '../Common/Surface.js';
7
7
  import type { SwitchProps } from '../Common/Switch.js';
8
8
  import type { TextAreaProps } from '../Common/TextArea.js';
9
9
  import type { TextInputProps } from '../Common/TextInput.js';
10
+ import type { TablePaginatorProps } from '../DataTables/TablePaginator.js';
10
11
  import type { ProgressBarProps } from '../Display/ProgressBar.js';
11
12
  import type { CratisPresentationUiLibraryProviderProps } from './manifest.js';
12
13
  /** Stable renderer profile implemented by certified presentation adapters. */
@@ -51,6 +52,35 @@ export interface CratisPresentationSlotDeclaration<SlotId extends CratisPresenta
51
52
  export type CratisPresentationSlotMap = {
52
53
  readonly [SlotId in CratisPresentationSlotId]: CratisPresentationSlotDeclaration<SlotId>;
53
54
  };
55
+ /**
56
+ * Immutable list of the atomic slots whose contracts are stable. A stable presentation library may
57
+ * implement any of them through {@link CratisPresentationUiLibrary.atomicSlots}; new ids are only
58
+ * ever appended.
59
+ */
60
+ export declare const cratisAtomicSlotIds: readonly ["datatables.paginator"];
61
+ /** Identifier of one stable atomic slot. */
62
+ export type CratisAtomicSlotId = (typeof cratisAtomicSlotIds)[number];
63
+ /** Exact public component prop contracts covered by the stable atomic slots. */
64
+ export interface CratisAtomicSlots {
65
+ /**
66
+ * Table paginator contract: zero-based `page`, `pageCount`, zero-based `onPageChange`, the
67
+ * `TablePaginatorParts` parts and no ref.
68
+ */
69
+ readonly 'datatables.paginator': TablePaginatorProps;
70
+ }
71
+ /** One stable, adapter-owned atomic slot declaration. */
72
+ export interface CratisAtomicSlotDeclaration<SlotId extends CratisAtomicSlotId> {
73
+ /** Stable atomic slots give the adapter ownership of the complete interaction. */
74
+ readonly mode: 'atomic';
75
+ /** Unsupported declarations are expressed by omitting the slot. */
76
+ readonly fidelity: 'native' | 'emulated';
77
+ /** Component implementing the slot's exact public props contract. */
78
+ readonly render: ComponentType<CratisAtomicSlots[SlotId]>;
79
+ }
80
+ /** Optional atomic implementations. An omitted slot keeps the built-in Components implementation. */
81
+ export type CratisAtomicSlotMap = {
82
+ readonly [SlotId in CratisAtomicSlotId]?: CratisAtomicSlotDeclaration<SlotId>;
83
+ };
54
84
  /** Capabilities whose meaning is stable for the bounded presentation profile. */
55
85
  export type CratisPresentationCapabilityId = 'slot.render' | 'parts.passthrough' | 'ssr.staticRender' | 'rtl' | 'forcedColors' | 'motion.reduced';
56
86
  type CratisPresentationOptionalCapabilityId = Exclude<CratisPresentationCapabilityId, 'slot.render' | 'parts.passthrough' | 'ssr.staticRender'>;
@@ -81,14 +111,27 @@ export interface CratisPresentationUiLibrary {
81
111
  readonly slots: CratisPresentationSlotMap;
82
112
  /** Optional provider mounted once around the selected renderer scope. */
83
113
  readonly Provider?: ComponentType<CratisPresentationUiLibraryProviderProps>;
114
+ /**
115
+ * Optional adapter-owned implementations of stable atomic slots. Omitted slots resolve to the
116
+ * built-in Components implementation.
117
+ */
118
+ readonly atomicSlots?: CratisAtomicSlotMap;
84
119
  }
85
120
  /**
86
- * Defines and freezes a complete implementation of the stable nine-slot presentation profile.
87
- * Runtime validation protects JavaScript callers from claiming a profile they do not implement.
121
+ * Defines and freezes a complete implementation of the stable nine-slot presentation profile,
122
+ * plus any optional stable atomic slots. Runtime validation protects JavaScript callers from
123
+ * claiming a profile they do not implement.
88
124
  *
89
125
  * @param library Stable presentation library declaration.
90
126
  * @returns A defensive, deeply frozen manifest copy.
91
127
  */
92
128
  export declare const definePresentationUiLibrary: (library: CratisPresentationUiLibrary) => CratisPresentationUiLibrary;
129
+ /** One reason a stable presentation library's atomic slot cannot be resolved. */
130
+ export interface StableAtomicSlotProblem {
131
+ /** Offending slot id, when the problem concerns a single entry. */
132
+ readonly slotId?: string;
133
+ /** Human-readable reason. */
134
+ readonly message: string;
135
+ }
93
136
  export {};
94
137
  //# sourceMappingURL=presentation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../renderer/presentation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAoB,CAAC;AACxD,OAAO,KAAK,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