@qoretechnologies/reqore 0.78.5-pr.708.gb827156 → 0.78.5-pr.708.gbb7157e

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 (100) hide show
  1. package/.claude/CLAUDE.md +14 -0
  2. package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
  3. package/dist/components/Breadcrumbs/index.js +209 -30
  4. package/dist/components/Breadcrumbs/index.js.map +1 -1
  5. package/dist/components/Drawer/index.d.ts +172 -0
  6. package/dist/components/Drawer/index.d.ts.map +1 -1
  7. package/dist/components/Drawer/index.js +260 -14
  8. package/dist/components/Drawer/index.js.map +1 -1
  9. package/dist/components/Dropdown/list.d.ts.map +1 -1
  10. package/dist/components/Dropdown/list.js +35 -2
  11. package/dist/components/Dropdown/list.js.map +1 -1
  12. package/dist/components/EntityRow/index.d.ts +11 -0
  13. package/dist/components/EntityRow/index.d.ts.map +1 -1
  14. package/dist/components/EntityRow/index.js +25 -8
  15. package/dist/components/EntityRow/index.js.map +1 -1
  16. package/dist/components/FadeScroller/index.d.ts.map +1 -1
  17. package/dist/components/FadeScroller/index.js +47 -17
  18. package/dist/components/FadeScroller/index.js.map +1 -1
  19. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  20. package/dist/components/InternalPopover/index.js +19 -1
  21. package/dist/components/InternalPopover/index.js.map +1 -1
  22. package/dist/components/Modal/index.d.ts +12 -2
  23. package/dist/components/Modal/index.d.ts.map +1 -1
  24. package/dist/components/Modal/index.js +2 -2
  25. package/dist/components/Modal/index.js.map +1 -1
  26. package/dist/components/Notifications/notification.d.ts +11 -1
  27. package/dist/components/Notifications/notification.d.ts.map +1 -1
  28. package/dist/components/Notifications/notification.js +96 -19
  29. package/dist/components/Notifications/notification.js.map +1 -1
  30. package/dist/components/Panel/index.d.ts.map +1 -1
  31. package/dist/components/Panel/index.js +22 -1
  32. package/dist/components/Panel/index.js.map +1 -1
  33. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  34. package/dist/components/RichTextEditor/index.js +26 -2
  35. package/dist/components/RichTextEditor/index.js.map +1 -1
  36. package/dist/components/RowActionsMenu/index.d.ts +53 -0
  37. package/dist/components/RowActionsMenu/index.d.ts.map +1 -0
  38. package/dist/components/RowActionsMenu/index.js +93 -0
  39. package/dist/components/RowActionsMenu/index.js.map +1 -0
  40. package/dist/components/SeverityRow/index.d.ts +12 -0
  41. package/dist/components/SeverityRow/index.d.ts.map +1 -1
  42. package/dist/components/SeverityRow/index.js +14 -8
  43. package/dist/components/SeverityRow/index.js.map +1 -1
  44. package/dist/components/Statistic/index.d.ts.map +1 -1
  45. package/dist/components/Statistic/index.js +1 -1
  46. package/dist/components/Statistic/index.js.map +1 -1
  47. package/dist/components/Table/headerCell.d.ts.map +1 -1
  48. package/dist/components/Table/headerCell.js +3 -1
  49. package/dist/components/Table/headerCell.js.map +1 -1
  50. package/dist/components/Table/helpers.d.ts +20 -0
  51. package/dist/components/Table/helpers.d.ts.map +1 -1
  52. package/dist/components/Table/helpers.js +53 -1
  53. package/dist/components/Table/helpers.js.map +1 -1
  54. package/dist/components/Table/index.d.ts +40 -2
  55. package/dist/components/Table/index.d.ts.map +1 -1
  56. package/dist/components/Table/index.js +101 -23
  57. package/dist/components/Table/index.js.map +1 -1
  58. package/dist/components/Table/row.d.ts +3 -1
  59. package/dist/components/Table/row.d.ts.map +1 -1
  60. package/dist/components/Table/row.js +25 -7
  61. package/dist/components/Table/row.js.map +1 -1
  62. package/dist/components/Tag/index.d.ts.map +1 -1
  63. package/dist/components/Tag/index.js +7 -4
  64. package/dist/components/Tag/index.js.map +1 -1
  65. package/dist/components/Textarea/index.d.ts.map +1 -1
  66. package/dist/components/Textarea/index.js +37 -1
  67. package/dist/components/Textarea/index.js.map +1 -1
  68. package/dist/components/Tier/group.d.ts +5 -4
  69. package/dist/components/Tier/group.d.ts.map +1 -1
  70. package/dist/components/Tier/group.js +43 -122
  71. package/dist/components/Tier/group.js.map +1 -1
  72. package/dist/constants/sizes.d.ts +5 -0
  73. package/dist/constants/sizes.d.ts.map +1 -1
  74. package/dist/constants/sizes.js +6 -1
  75. package/dist/constants/sizes.js.map +1 -1
  76. package/dist/containers/ReqoreProvider.d.ts.map +1 -1
  77. package/dist/containers/ReqoreProvider.js +6 -8
  78. package/dist/containers/ReqoreProvider.js.map +1 -1
  79. package/dist/helpers/gestures.d.ts +30 -0
  80. package/dist/helpers/gestures.d.ts.map +1 -0
  81. package/dist/helpers/gestures.js +36 -0
  82. package/dist/helpers/gestures.js.map +1 -0
  83. package/dist/hooks/useDragToScroll.d.ts +10 -5
  84. package/dist/hooks/useDragToScroll.d.ts.map +1 -1
  85. package/dist/hooks/useDragToScroll.js +10 -5
  86. package/dist/hooks/useDragToScroll.js.map +1 -1
  87. package/dist/hooks/usePointerDrag.d.ts +77 -0
  88. package/dist/hooks/usePointerDrag.d.ts.map +1 -0
  89. package/dist/hooks/usePointerDrag.js +202 -0
  90. package/dist/hooks/usePointerDrag.js.map +1 -0
  91. package/dist/hooks/useReqoreMedia.d.ts +24 -0
  92. package/dist/hooks/useReqoreMedia.d.ts.map +1 -0
  93. package/dist/hooks/useReqoreMedia.js +32 -0
  94. package/dist/hooks/useReqoreMedia.js.map +1 -0
  95. package/dist/index.d.ts +4 -0
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js +17 -3
  98. package/dist/index.js.map +1 -1
  99. package/package.json +2 -3
  100. package/vitest.config.ts +98 -31
package/.claude/CLAUDE.md CHANGED
@@ -184,6 +184,20 @@ release on npm.
184
184
  - **Location:** `src/stories/` (e.g. `Collection.stories.tsx`).
185
185
  - **Pattern:** ArgTypes for props, canvas controls, visual testing via Chromatic.
186
186
  - **Command:** `yarn build-storybook` builds the static site.
187
+ - **Touch stories:** a story whose play calls `withTouchScreen` (`src/stories/utils/touchScreen.ts`)
188
+ carries `tags: ['touch']`. `yarn test:stories` runs those stories in their own Vitest project
189
+ (`storybook-touch`), whose browser context is a phone from the start (Playwright's `isMobile` and
190
+ `hasTouch`, 390×844), and before the others; an untagged one fails with the reason. Never turn
191
+ Chromium's touch emulation on or off over the DevTools protocol: turning it off leaves the page
192
+ with the machine's hover and pointer, not the mouse Playwright launched it with, and a Linux CI
193
+ runner has none, so every later story in the page finds `(hover: none)` (it never shows on a Mac,
194
+ which always reports a mouse). `.storybook/vitest.setup.ts` checks every story's browser is its
195
+ project's: `(hover: hover) and (pointer: fine)`, or on the phone `(hover: none) and (pointer: coarse)`.
196
+ - **No layout change inside a ResizeObserver callback:** a story fails when the browser reports
197
+ "ResizeObserver loop completed with undelivered notifications" (`.storybook/vitest.setup.ts`). It
198
+ means a resize callback changed the layout it observes in the same frame, often by setting state
199
+ synchronously (react-popper's `forceUpdate` renders with `flushSync`). Defer that change to the next
200
+ frame (`requestAnimationFrame`, once per frame), or measure without changing the layout.
187
201
 
188
202
  ### Verifying a visual fix locally with Qlip — reqore mechanics
189
203
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAuC,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAgB,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAG/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAK9C,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,GAAG,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,aAAa,CAAC;CACjC;AAED,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB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B;IACxC,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,GAAG,CAAC;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,aAAa,CAAC;CACjC;AAED,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,GAAG,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,yBAAyB,CAAC;CACtC;AAED,MAAM,WAAW,uBACf,SAAQ,gBAAgB,EACtB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAG3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;CAC7C;AA+MD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAgVxD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -58,14 +58,23 @@ var __rest = (this && this.__rest) || function (s, e) {
58
58
  }
59
59
  return t;
60
60
  };
61
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
62
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
63
+ if (ar || !(i in from)) {
64
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
65
+ ar[i] = from[i];
66
+ }
67
+ }
68
+ return to.concat(ar || Array.prototype.slice.call(from));
69
+ };
61
70
  var __importDefault = (this && this.__importDefault) || function (mod) {
62
71
  return (mod && mod.__esModule) ? mod : { "default": mod };
63
72
  };
64
73
  Object.defineProperty(exports, "__esModule", { value: true });
65
74
  var jsx_runtime_1 = require("react/jsx-runtime");
66
75
  var lodash_1 = require("lodash");
67
- var react_1 = __importDefault(require("react"));
68
- var react_overflow_list_1 = require("react-overflow-list");
76
+ var react_1 = __importStar(require("react"));
77
+ var react_dom_1 = require("react-dom");
69
78
  var styled_components_1 = require("styled-components");
70
79
  var styled_1 = __importDefault(require("../../helpers/styled"));
71
80
  var __1 = require("../..");
@@ -91,9 +100,9 @@ var StyledReqoreBreadcrumbs = styled_1.default.div(templateObject_2 || (template
91
100
  // The trail region — takes all the width the right element leaves and clips.
92
101
  // `min-width: 0` lets it shrink below its content so the current page can
93
102
  // ellipsise; `overflow: hidden` is the final safety net. Its single child (the
94
- // `OverflowList` row, or the static row) fills it so `OverflowList` measures the
95
- // AVAILABLE width, not its own content.
96
- var StyledTrail = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n display: flex;\n align-items: center;\n color: ", ";\n\n > * {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n /* The OverflowList container sets only display/flexWrap/minWidth inline (no\n align-items), so without this its crumbs top-align against the tallest one\n \u2014 e.g. a crumb carrying a two-line description. Center them so the row\n reads as a single baseline, matching the static trail. */\n .reqore-breadcrumbs-overflow-list {\n align-items: center;\n }\n\n /* Force the readable item colour onto the crumbs + collapsed dropdowns, as the\n original did with a descendant selector. A minimal/flat button sets its OWN\n text colour directly on the element \u2014 for a chromatic custom theme that\n resolves to a near-white tint (saturate(tint(0.8, main))) \u2014 which beats the\n trail's merely-inherited colour. Overriding it here keeps the labels legible\n (readable-dark on a light themed bar) instead of washing out to white. */\n .reqore-breadcrumbs-item,\n .reqore-dropdown-control {\n color: ", ";\n }\n"], ["\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n display: flex;\n align-items: center;\n color: ", ";\n\n > * {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n /* The OverflowList container sets only display/flexWrap/minWidth inline (no\n align-items), so without this its crumbs top-align against the tallest one\n \u2014 e.g. a crumb carrying a two-line description. Center them so the row\n reads as a single baseline, matching the static trail. */\n .reqore-breadcrumbs-overflow-list {\n align-items: center;\n }\n\n /* Force the readable item colour onto the crumbs + collapsed dropdowns, as the\n original did with a descendant selector. A minimal/flat button sets its OWN\n text colour directly on the element \u2014 for a chromatic custom theme that\n resolves to a near-white tint (saturate(tint(0.8, main))) \u2014 which beats the\n trail's merely-inherited colour. Overriding it here keeps the labels legible\n (readable-dark on a light themed bar) instead of washing out to white. */\n .reqore-breadcrumbs-item,\n .reqore-dropdown-control {\n color: ", ";\n }\n"])), function (_a) {
103
+ // folding row, or the static row) fills it, so the row's end is the end of the
104
+ // AVAILABLE width, not of its own content.
105
+ var StyledTrail = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n display: flex;\n align-items: center;\n color: ", ";\n\n > * {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n /* Force the readable item colour onto the crumbs + collapsed dropdowns, as the\n original did with a descendant selector. A minimal/flat button sets its OWN\n text colour directly on the element \u2014 for a chromatic custom theme that\n resolves to a near-white tint (saturate(tint(0.8, main))) \u2014 which beats the\n trail's merely-inherited colour. Overriding it here keeps the labels legible\n (readable-dark on a light themed bar) instead of washing out to white. */\n .reqore-breadcrumbs-item,\n .reqore-dropdown-control {\n color: ", ";\n }\n"], ["\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n display: flex;\n align-items: center;\n color: ", ";\n\n > * {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n /* Force the readable item colour onto the crumbs + collapsed dropdowns, as the\n original did with a descendant selector. A minimal/flat button sets its OWN\n text colour directly on the element \u2014 for a chromatic custom theme that\n resolves to a near-white tint (saturate(tint(0.8, main))) \u2014 which beats the\n trail's merely-inherited colour. Overriding it here keeps the labels legible\n (readable-dark on a light themed bar) instead of washing out to white. */\n .reqore-breadcrumbs-item,\n .reqore-dropdown-control {\n color: ", ";\n }\n"])), function (_a) {
97
106
  var $color = _a.$color;
98
107
  return $color;
99
108
  }, function (_a) {
@@ -104,7 +113,59 @@ var StyledTrail = styled_1.default.div(templateObject_3 || (templateObject_3 = _
104
113
  // structurally impossible at any width.
105
114
  var StyledRight = styled_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n margin-left: 8px;\n"], ["\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n margin-left: 8px;\n"])));
106
115
  var StyledStaticTrail = styled_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n min-width: 0;\n"], ["\n display: flex;\n align-items: center;\n min-width: 0;\n"])));
107
- var StyledBreadcrumbsTabsWrapper = styled_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n overflow: hidden;\n min-width: 0;\n"], ["\n display: flex;\n align-items: center;\n overflow: hidden;\n min-width: 0;\n"])));
116
+ // The responsive trail's row: its crumbs on one line, centred against the tallest
117
+ // (a crumb with a two-line description), and as wide as the trail, whatever they
118
+ // need - what does not fit is folded into the menu at its start.
119
+ var StyledFoldingTrail = styled_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n min-width: 0;\n"], ["\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n min-width: 0;\n"])));
120
+ /**
121
+ * Whether the trail draws more than it has room for: a part (a crumb, an arrow, the menu) reaches past its end,
122
+ * or the crumb holding tabs is squeezed so that it clips them while a crumb before it could fold instead. When
123
+ * it is the first crumb shown, it is squeezed rather than folded, and its tabs fold into their own menu.
124
+ */
125
+ var trailOverflows = function (row) {
126
+ if (!row) {
127
+ return false;
128
+ }
129
+ var end = row.getBoundingClientRect().right;
130
+ return Array.from(row.children).some(function (part) {
131
+ return part.getBoundingClientRect().right > end + 0.5 ||
132
+ (part instanceof HTMLElement &&
133
+ part.classList.contains('reqore-breadcrumbs-tabs') &&
134
+ part.dataset.position !== '0' &&
135
+ part.scrollWidth > part.clientWidth + 0.5);
136
+ });
137
+ };
138
+ /**
139
+ * Whether two trails are drawn alike, so the second needs no measuring again: the same crumbs, each with the
140
+ * same values. Handlers are left out (a page that passes new ones on every render still passes the same
141
+ * trail), and an object value (`props`, an `effect`) is compared one level down.
142
+ */
143
+ var sameTrail = function (one, other) {
144
+ if (one === other) {
145
+ return true;
146
+ }
147
+ if (one.length !== other.length) {
148
+ return false;
149
+ }
150
+ var sameValue = function (a, b) {
151
+ if (a === b || (typeof a === 'function' && typeof b === 'function')) {
152
+ return true;
153
+ }
154
+ if (!a || !b || typeof a !== 'object' || typeof b !== 'object' || react_1.default.isValidElement(a)) {
155
+ return false;
156
+ }
157
+ var keys = Object.keys(a);
158
+ return (keys.length === Object.keys(b).length &&
159
+ keys.every(function (key) { return a[key] === b[key]; }));
160
+ };
161
+ return one.every(function (crumb, index) {
162
+ var keys = Object.keys(crumb);
163
+ var otherCrumb = other[index];
164
+ return (keys.length === Object.keys(otherCrumb).length &&
165
+ keys.every(function (key) { return sameValue(crumb[key], otherCrumb[key]); }));
166
+ });
167
+ };
168
+ var StyledBreadcrumbsTabsWrapper = styled_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n overflow: hidden;\n min-width: 0;\n"], ["\n display: flex;\n align-items: center;\n overflow: hidden;\n min-width: 0;\n"])));
108
169
  // The overflow dropdowns present the collapsed crumbs as a NAVIGATION MENU, so
109
170
  // each crumb must render as a clean left-aligned menu row — not as the pill/chip
110
171
  // it is in the trail. Strip the crumb's trail-only layout treatment (raised /
@@ -156,24 +217,145 @@ var ReqoreBreadcrumbs = function (_a) {
156
217
  ? (0, colors_2.getReadableColorFrom)(theme.breadcrumbs.main, true)
157
218
  : (0, colors_2.getReadableColor)(theme, undefined, undefined, true));
158
219
  var leafItem = items[items.length - 1];
220
+ /* The crumbs folded from the start of the trail into its menu: as many as it takes for every part the
221
+ trail draws to lie inside it - the current page too, into one dropdown labelled with it, when even it
222
+ does not fit. It is settled before the browser paints, so no frame ever draws a crumb past the trail
223
+ (qorus#646: when the page changed its crumbs, the trail used to fold one crumb per frame, and a phone
224
+ showed "… › New chat" running 79px past the trail for 50ms). After each render a layout effect
225
+ measures the parts and folds one more crumb while one reaches past the trail (or the crumb holding
226
+ tabs clips them, see `trailOverflows`), or one fewer while everything fits and the trail is
227
+ unfolding; each step is a render React makes before the browser paints.
228
+
229
+ What measures the trail again:
230
+ - a new trail (`items`, unless it is drawn alike) or crumb size: from what is folded now, unfolding
231
+ while everything fits;
232
+ - the trail getting wider, or a part narrower: unfolding the same way;
233
+ - the trail getting narrower, or a part wider (a badge arriving, padding animating after the page has
234
+ loaded), so that a part reaches past it: folding.
235
+ The last two come from a ResizeObserver, after the browser's layout and before its paint. It renders
236
+ the new fold there and then (`flushSync`), so that frame is painted folded too. It lets go of every
237
+ part first and takes them up again in the next frame: a size changed inside the observer's own
238
+ callback would be left unreported, which the browser reports as an error. A part's width is taken
239
+ when the trail draws it, not from the observer's first report, which can come after it has changed. */
240
+ var rowRef = (0, react_1.useRef)(null);
241
+ var _g = (0, react_1.useState)({ items: items, size: size, folded: 0, unfolding: false }), fold = _g[0], setFold = _g[1];
242
+ var folded = Math.min(fold.folded, (0, lodash_1.size)(items));
243
+ if (fold.size !== size || !sameTrail(fold.items, items)) {
244
+ // measured again during this render, so no frame shows the old fold over the new crumbs
245
+ setFold({ items: items, size: size, folded: folded, unfolding: folded > 0 });
246
+ }
247
+ (0, react_1.useLayoutEffect)(function () {
248
+ if (!responsive) {
249
+ return;
250
+ }
251
+ if (trailOverflows(rowRef.current)) {
252
+ if (folded < (0, lodash_1.size)(items)) {
253
+ setFold(function (current) { return (__assign(__assign({}, current), { folded: folded + 1, unfolding: false })); });
254
+ }
255
+ else if (fold.unfolding) {
256
+ setFold(function (current) { return (__assign(__assign({}, current), { unfolding: false })); });
257
+ }
258
+ }
259
+ else if (fold.unfolding) {
260
+ setFold(function (current) {
261
+ return folded > 0 ? __assign(__assign({}, current), { folded: folded - 1 }) : __assign(__assign({}, current), { unfolding: false });
262
+ });
263
+ }
264
+ });
265
+ // The parts the observer watches, taken up after every render (see above).
266
+ var watchParts = (0, react_1.useRef)();
267
+ (0, react_1.useLayoutEffect)(function () {
268
+ if (!responsive || typeof ResizeObserver === 'undefined') {
269
+ return undefined;
270
+ }
271
+ var widths = new Map();
272
+ var suspended = false;
273
+ var frame = 0;
274
+ var observer = new ResizeObserver(function (entries) {
275
+ var _a, _b, _c;
276
+ var row = rowRef.current;
277
+ if (!row || suspended) {
278
+ return;
279
+ }
280
+ var unfold = false;
281
+ for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
282
+ var entry = entries_1[_i];
283
+ var width = (_c = (_b = (_a = entry.borderBoxSize) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.inlineSize) !== null && _c !== void 0 ? _c : entry.contentRect.width;
284
+ var was = widths.get(entry.target);
285
+ if (was !== undefined && Math.abs(width - was) >= 0.5) {
286
+ widths.set(entry.target, width);
287
+ // the trail wider, or a part narrower: more may fit
288
+ if (entry.target === row ? width > was : width < was) {
289
+ unfold = true;
290
+ }
291
+ }
292
+ }
293
+ if (!unfold && !trailOverflows(row)) {
294
+ return;
295
+ }
296
+ observer.disconnect();
297
+ widths.clear();
298
+ suspended = true;
299
+ try {
300
+ (0, react_dom_1.flushSync)(function () { return setFold(function (current) { return (__assign(__assign({}, current), { unfolding: unfold || current.unfolding })); }); });
301
+ }
302
+ finally {
303
+ frame = requestAnimationFrame(function () {
304
+ var _a;
305
+ frame = 0;
306
+ suspended = false;
307
+ (_a = watchParts.current) === null || _a === void 0 ? void 0 : _a.call(watchParts);
308
+ });
309
+ }
310
+ });
311
+ watchParts.current = function () {
312
+ var row = rowRef.current;
313
+ if (!row || suspended) {
314
+ return;
315
+ }
316
+ var parts = __spreadArray([row], Array.from(row.children), true);
317
+ for (var _i = 0, _a = Array.from(widths.keys()); _i < _a.length; _i++) {
318
+ var element = _a[_i];
319
+ if (!parts.includes(element)) {
320
+ observer.unobserve(element);
321
+ widths.delete(element);
322
+ }
323
+ }
324
+ for (var _b = 0, parts_1 = parts; _b < parts_1.length; _b++) {
325
+ var element = parts_1[_b];
326
+ if (!widths.has(element)) {
327
+ // the border box: a crumb that grows by its padding keeps its content box
328
+ observer.observe(element, { box: 'border-box' });
329
+ }
330
+ widths.set(element, element.getBoundingClientRect().width);
331
+ }
332
+ };
333
+ watchParts.current();
334
+ return function () {
335
+ cancelAnimationFrame(frame);
336
+ observer.disconnect();
337
+ watchParts.current = undefined;
338
+ };
339
+ }, [responsive]);
340
+ (0, react_1.useLayoutEffect)(function () {
341
+ var _a;
342
+ (_a = watchParts.current) === null || _a === void 0 ? void 0 : _a.call(watchParts);
343
+ });
159
344
  var renderArrow = function (key) { return ((0, jsx_runtime_1.jsx)(Icon_1.default, { icon: 'ArrowRightSLine', size: size, margin: 'both', effect: { opacity: 0.5 } }, key)); };
160
- // `OverflowList` calls this for every VISIBLE crumb (collapsed ancestors go to
161
- // `renderOverflow` instead), passing the crumb's POSITION. Both the React key
162
- // and the separator are derived from that position — NOT from the item's
163
- // identity or `items.indexOf(item)`. This matters because on a re-render with a
164
- // new `items` array, OverflowList briefly maps over its previous (stale) item
165
- // objects; `indexOf` would return -1 for them, collapsing every crumb onto the
166
- // same key `crumb--1` and making React accumulate DOM (a new crumb appended on
167
- // every render). A positional key is always valid and unique.
345
+ // Draws every VISIBLE crumb (folded ones go to `renderOverflow` instead), by its
346
+ // POSITION among them. The React key is the crumb's place in the WHOLE trail
347
+ // (`folded + index`): a key by its place among the visible crumbs gave a folded
348
+ // crumb's element to the next crumb along, which then animated from that
349
+ // crumb's look to its own - and was measured while it did.
168
350
  //
169
351
  // The separator precedes every visible crumb except the one at position 0. When
170
352
  // ancestors collapse, `renderOverflow` emits the "…" group followed by its own
171
353
  // trailing "›", so the first visible crumb (position 0, no leading separator)
172
354
  // still connects to it.
173
- var renderItem = function (item, index) {
174
- var key = "crumb-".concat(index);
355
+ var renderItem = function (item, index, folded) {
356
+ var key = "crumb-".concat(folded + index);
175
357
  if (item.withTabs) {
176
- return ((0, jsx_runtime_1.jsxs)(StyledBreadcrumbsTabsWrapper, { children: [index !== 0 && renderArrow("".concat(key, "-arrow")), (0, jsx_runtime_1.jsx)(list_1.default, { tabs: item.withTabs.tabs, onTabChange: item.withTabs.onTabChange, activeTab: item.withTabs.activeTab, activeTabIntent: item.withTabs.activeTabIntent, customTheme: customTheme, flat: flat, size: size })] }, key));
358
+ return ((0, jsx_runtime_1.jsxs)(StyledBreadcrumbsTabsWrapper, { className: 'reqore-breadcrumbs-tabs', "data-position": index, children: [index !== 0 && renderArrow("".concat(key, "-arrow")), (0, jsx_runtime_1.jsx)(list_1.default, { tabs: item.withTabs.tabs, onTabChange: item.withTabs.onTabChange, activeTab: item.withTabs.activeTab, activeTabIntent: item.withTabs.activeTabIntent, customTheme: customTheme, flat: flat, size: size })] }, key));
177
359
  }
178
360
  // Every crumb (including the current page) keeps its natural width and does
179
361
  // NOT shrink — a crumb is either shown in full and readable, or it collapses
@@ -184,7 +366,7 @@ var ReqoreBreadcrumbs = function (_a) {
184
366
  return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [index !== 0 && renderArrow("".concat(key, "-arrow")), (0, jsx_runtime_1.jsx)(item_2.default, __assign({ customTheme: customTheme }, item, { size: size }))] }, key));
185
367
  };
186
368
  // The collapsed crumbs, folded into a dropdown at the start of the trail.
187
- // Two shapes, because collapse happens from the start (`collapseFrom:'start'`):
369
+ // Two shapes, because crumbs fold from the start:
188
370
  //
189
371
  // - Only ancestors collapsed → a compact "…" with a hidden-count badge; the
190
372
  // current page stays inline (in full) to its right.
@@ -194,13 +376,11 @@ var ReqoreBreadcrumbs = function (_a) {
194
376
  // "one button that reads as the current page instead of just …" behaviour,
195
377
  // and it guarantees the current page is always legible however tight it gets.
196
378
  var renderOverflow = function (overflowItems) {
197
- var _a, _b, _c;
379
+ var _a, _b, _c, _d, _e;
198
380
  if (!(0, lodash_1.size)(overflowItems)) {
199
381
  return null;
200
382
  }
201
- // Count-based, not identity-based: everything collapsed ⇒ the overflow holds
202
- // as many crumbs as the trail has. (Identity would break when OverflowList
203
- // maps over stale item objects during a re-render.)
383
+ // everything folded: the menu stands in for the current page
204
384
  var isFullyCollapsed = (0, lodash_1.size)(overflowItems) >= (0, lodash_1.size)(items);
205
385
  if (isFullyCollapsed) {
206
386
  return ((0, jsx_runtime_1.jsx)(__1.ReqoreDropdown, { className: 'reqore-breadcrumbs-overflow-current', handler: 'hoverStay', delay: 500, size: size,
@@ -216,7 +396,7 @@ var ReqoreBreadcrumbs = function (_a) {
216
396
  // collapsed button IS that same solid chip; a minimal leaf stays
217
397
  // minimal. Mirrors ReqoreBreadcrumbsItem (minimal + flat defaults,
218
398
  // overridden by the item's own active/minimal/flat).
219
- active: leafItem === null || leafItem === void 0 ? void 0 : leafItem.active, minimal: (_b = leafItem === null || leafItem === void 0 ? void 0 : leafItem.minimal) !== null && _b !== void 0 ? _b : true, flat: (_c = leafItem === null || leafItem === void 0 ? void 0 : leafItem.flat) !== null && _c !== void 0 ? _c : true, raised: leafItem === null || leafItem === void 0 ? void 0 : leafItem.raised, showCaret: false, icon: leafItem === null || leafItem === void 0 ? void 0 : leafItem.icon, rightIcon: 'ArrowDownSLine', intent: leafItem === null || leafItem === void 0 ? void 0 : leafItem.intent, label: leafItem === null || leafItem === void 0 ? void 0 : leafItem.label, badge: leafItem === null || leafItem === void 0 ? void 0 : leafItem.badge,
399
+ active: leafItem === null || leafItem === void 0 ? void 0 : leafItem.active, minimal: (_b = leafItem === null || leafItem === void 0 ? void 0 : leafItem.minimal) !== null && _b !== void 0 ? _b : true, flat: (_c = leafItem === null || leafItem === void 0 ? void 0 : leafItem.flat) !== null && _c !== void 0 ? _c : true, raised: leafItem === null || leafItem === void 0 ? void 0 : leafItem.raised, showCaret: false, icon: leafItem === null || leafItem === void 0 ? void 0 : leafItem.icon, rightIcon: 'ArrowDownSLine', intent: leafItem === null || leafItem === void 0 ? void 0 : leafItem.intent, label: leafItem === null || leafItem === void 0 ? void 0 : leafItem.label, badge: leafItem === null || leafItem === void 0 ? void 0 : leafItem.badge, "aria-label": (_d = leafItem === null || leafItem === void 0 ? void 0 : leafItem['aria-label']) !== null && _d !== void 0 ? _d : leafItem === null || leafItem === void 0 ? void 0 : leafItem.label, title: (_e = leafItem === null || leafItem === void 0 ? void 0 : leafItem.title) !== null && _e !== void 0 ? _e : leafItem === null || leafItem === void 0 ? void 0 : leafItem.label,
220
400
  // A floor so the current page always keeps a few readable characters —
221
401
  // never just an icon — however tight the bar gets. This can't cause an
222
402
  // overlap: the trail is `min-width: 0; overflow: hidden`, so it clips
@@ -228,13 +408,12 @@ var ReqoreBreadcrumbs = function (_a) {
228
408
  // separator) connects to it as "… › current page".
229
409
  return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(__1.ReqoreDropdown, { handler: 'hoverStay', delay: 500, size: size, customTheme: customTheme, showCaret: false, badge: (0, lodash_1.size)(overflowItems), items: toMenuItems(overflowItems), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { icon: 'MoreLine', effect: { opacity: colors_1.CONTROL_ICON_OPACITY } }) }, 'reqore-breadcrumbs-overflow-menu'), renderArrow('reqore-breadcrumbs-overflow-arrow')] }, 'reqore-breadcrumbs-overflow'));
230
410
  };
231
- return ((0, jsx_runtime_1.jsx)(__1.ReqoreErrorBoundary, __assign({}, errorBoundaryOptions, { children: (0, jsx_runtime_1.jsxs)(StyledReqoreBreadcrumbs, __assign({}, rest, { className: "".concat(rest.className || '', " reqore-breadcrumbs-wrapper"), flat: flat, theme: theme, size: size, responsive: responsive, children: [(0, jsx_runtime_1.jsx)(StyledTrail, { className: 'reqore-breadcrumbs-trail', "$color": itemColor, children: responsive ? ((0, jsx_runtime_1.jsx)(react_overflow_list_1.OverflowList, { className: 'reqore-breadcrumbs-overflow-list', items: items, collapseFrom: 'start',
232
- // 0, not 1: when even the current page can't fit, it must be
233
- // allowed to collapse too so `renderOverflow` can fold the trail
234
- // into the single current-page-labelled dropdown. Keeping 1 here is
235
- // what forced the leaf to stay and shrink to an unreadable stub.
236
- minVisibleItems: 0, itemRenderer: renderItem, overflowRenderer: renderOverflow })) : ((0, jsx_runtime_1.jsx)(StyledStaticTrail, { children: items.map(renderItem) })) }), rightElement && ((0, jsx_runtime_1.jsx)(StyledRight, { className: 'reqore-breadcrumbs-right', children: rightElement }))] })) })));
411
+ return ((0, jsx_runtime_1.jsx)(__1.ReqoreErrorBoundary, __assign({}, errorBoundaryOptions, { children: (0, jsx_runtime_1.jsxs)(StyledReqoreBreadcrumbs, __assign({}, rest, { className: "".concat(rest.className || '', " reqore-breadcrumbs-wrapper"), flat: flat, theme: theme, size: size, responsive: responsive, children: [(0, jsx_runtime_1.jsx)(StyledTrail, { className: 'reqore-breadcrumbs-trail', "$color": itemColor, children: responsive ? (
412
+ // Every crumb may fold, the current page too: when even it does not fit, the trail is the one
413
+ // dropdown labelled with it. Keeping the current page out of the fold is what used to leave it
414
+ // squeezed to an unreadable stub.
415
+ (0, jsx_runtime_1.jsxs)(StyledFoldingTrail, { ref: rowRef, className: 'reqore-breadcrumbs-overflow-list', children: [renderOverflow(items.slice(0, folded)), items.slice(folded).map(function (item, index) { return renderItem(item, index, folded); })] })) : ((0, jsx_runtime_1.jsx)(StyledStaticTrail, { children: items.map(function (item, index) { return renderItem(item, index, 0); }) })) }), rightElement && ((0, jsx_runtime_1.jsx)(StyledRight, { className: 'reqore-breadcrumbs-right', children: rightElement }))] })) })));
237
416
  };
238
417
  exports.default = ReqoreBreadcrumbs;
239
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
418
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
240
419
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuC;AACvC,gDAA0B;AAC1B,2DAAmD;AACnD,uDAAwC;AACxC,gEAA0C;AAC1C,2BAA4D;AAC5D,iDAA8D;AAC9D,+CAAoF;AAEpF,+CAA+F;AAC/F,iDAAsD;AAItD,iDAAiC;AAEjC,qCAAiD;AACjD,mDAAoE;AACpE,gDAA2C;AA6C3C,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAC3E,gFAAgF;AAChF,+EAA+E;AAC/E,yEAAyE;AACzE,IAAM,uBAAuB,GAAG,gBAAM,CAAC,GAAG,+EAAoB,MAC1D,EAgBD,IACF,KAjBG,UAAC,EAAqF;;QAAnF,KAAK,WAAA,EAAE,IAAI,UAAA,EAAE,IAAI,UAAA,EAAE,cAAa,EAAb,MAAM,mBAAG,IAAI,KAAA,EAAE,cAAe,EAAf,MAAM,mBAAG,MAAM,KAAA,EAAE,UAAU,gBAAA;IAA2B,WAAA,uBAAG,qWAAA,eACrF,EAA+B,qBAC1B,EAAmE,0BAChE,EAAsE,oEAG1E,EAAqC,0BACjC,EAAmE,2BAChE,EAAwC,WAE1D,EAAoB,iCAGpB,EAAoB,IAAK,EAAiB,wCAG7C,KAfU,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC1B,MAA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C,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EACtC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAC,IAAI,EAAE,KAAK,IAAK,OAAA,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,EAA/B,CAA+B,CAAC,IACvD,CACtB,CAAC,CAAC,CAAC,CACF,uBAAC,iBAAiB,cAAE,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI,EAAE,KAAK,IAAK,OAAA,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,EAA1B,CAA0B,CAAC,GAAqB,CAChG,GACW,EACb,YAAY,IAAI,CACf,uBAAC,WAAW,IAAC,SAAS,EAAC,0BAA0B,YAAE,YAAY,GAAe,CAC/E,KACuB,IACN,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
@@ -1,7 +1,131 @@
1
1
  import { IReqoreTheme } from '../../constants/theme';
2
2
  import type { IReqoreConfirmationModal } from '../../containers/ReqoreProvider';
3
+ import { IPointerDragDelta } from '../../hooks/usePointerDrag';
3
4
  import { IReqorePanelProps } from '../Panel';
4
5
  export type TPosition = 'top' | 'bottom' | 'left' | 'right';
6
+ /**
7
+ * The viewport width (px, inclusive) at or below which a `responsiveLayout`
8
+ * drawer becomes a sheet when the caller names no breakpoint. 900 is the
9
+ * number qorus-ide converged on for every one of its drawers: a 620–720px
10
+ * side panel in a 900px window leaves a sliver of page that is not usable
11
+ * anyway, so the sheet is the honest layout there. The provider's own
12
+ * `isMobile` (≤ 480px) is too narrow for drawers that wide — at 600px such a
13
+ * panel covers the viewport with its handle off-screen — and
14
+ * `isMobileOrTablet` (≤ 1200px) would put sheets on landscape tablets.
15
+ */
16
+ export declare const DRAWER_SHEET_BREAKPOINT = 900;
17
+ /**
18
+ * Which viewport width switches a `responsiveLayout` drawer into a sheet:
19
+ * `'mobile'` is the provider's `isMobile` (≤ 480px), `'tablet'` is its
20
+ * `isMobileOrTablet` (≤ 1200px), and a number is a width in px, inclusive.
21
+ * Omitted, it is `DRAWER_SHEET_BREAKPOINT`. Reqore owns these numbers; a
22
+ * consumer never carries a media query of its own for this.
23
+ */
24
+ export type TReqoreDrawerResponsiveBreakpoint = 'mobile' | 'tablet' | number;
25
+ export interface IReqoreDrawerResponsiveLayout {
26
+ /** Which viewport width switches the layout. Defaults to `DRAWER_SHEET_BREAKPOINT` (900px). */
27
+ below?: TReqoreDrawerResponsiveBreakpoint;
28
+ /** The edge the sheet attaches to while the layout is active. Defaults to `'bottom'`. */
29
+ position?: TPosition;
30
+ /** The sheet's size on the axis it occupies. Defaults to `'100%'`. */
31
+ size?: string;
32
+ /**
33
+ * The cap on that axis. Defaults to `'90vh'` — the same cap every drawer has
34
+ * on its cross axis by default, so a bottom sheet rises to 90% of the screen
35
+ * and leaves a strip of page above it where a tap on the backdrop closes it.
36
+ * Pass `'100%'` for an edge-to-edge sheet. Separate from the drawer's own
37
+ * `maxSize` on purpose: that one caps the SIDE drawer's width, and a value
38
+ * meant as a width must never become a sheet's height.
39
+ */
40
+ maxSize?: string;
41
+ }
42
+ export interface IReqoreDrawerResolvedResponsiveLayout {
43
+ /** Whether the sheet layout is in force for the current viewport. */
44
+ active: boolean;
45
+ /** The edge the sheet attaches to; only set while `active`. */
46
+ position?: TPosition;
47
+ /** The sheet's size on its axis; only set while `active`. */
48
+ size?: string;
49
+ /** The cap on that axis; only set while `active`. */
50
+ maxSize?: string;
51
+ }
52
+ export declare const DRAWER_RESPONSIVE_LAYOUT_DEFAULTS: Required<IReqoreDrawerResponsiveLayout>;
53
+ /**
54
+ * What the resolver needs to know about the viewport. The two named flags are
55
+ * the provider's; `belowSheetBreakpoint` answers "is the viewport at or below
56
+ * the numeric `below` (or `DRAWER_SHEET_BREAKPOINT` when none is given)" and
57
+ * is ignored when `below` names a provider breakpoint. The component evaluates
58
+ * it with one media query; a consumer calling the resolver itself evaluates
59
+ * it however it already measures the viewport.
60
+ */
61
+ export interface IReqoreDrawerResponsiveViewport {
62
+ isMobile: boolean;
63
+ isMobileOrTablet: boolean;
64
+ belowSheetBreakpoint: boolean;
65
+ }
66
+ /**
67
+ * Decides whether a drawer's `responsiveLayout` is in force, and with what
68
+ * geometry. Pure, so the decision is unit-testable without a viewport: jsdom
69
+ * has no `matchMedia`, so every breakpoint is fixed `false` in unit tests, and
70
+ * the rendered sheet is proven in a real browser instead — the
71
+ * `Dialogs/Drawer` `ResponsiveSheet*` stories do that at 380px and 800px.
72
+ *
73
+ * A modal (`_isModal`) is never turned into a sheet: it is already centred
74
+ * and sized for its content, and it has no edge to attach to.
75
+ */
76
+ export declare const resolveDrawerResponsiveLayout: (responsiveLayout: boolean | IReqoreDrawerResponsiveLayout | undefined, viewport: IReqoreDrawerResponsiveViewport, isModal?: boolean) => IReqoreDrawerResolvedResponsiveLayout;
77
+ /**
78
+ * The px width behind a `responsiveLayout` config's numeric `below`, or the
79
+ * default when it names a provider breakpoint or nothing — the component
80
+ * always subscribes to exactly one query, so a hook never comes and goes.
81
+ */
82
+ export declare const drawerSheetBreakpointPx: (responsiveLayout: boolean | IReqoreDrawerResponsiveLayout | undefined) => number;
83
+ /** An offset of the drawer's box from where it would otherwise sit, in px. */
84
+ export interface IReqoreDrawerDragOffset {
85
+ x: number;
86
+ y: number;
87
+ }
88
+ /**
89
+ * What a sheet dragged by `delta` does. `offset` is where to draw it meanwhile: it follows the
90
+ * finger toward the edge it is attached to and stays put when pulled the other way — a bottom
91
+ * sheet is not lifted off its edge. `closes` is whether letting go here closes it: past
92
+ * `SWIPE.distance` of its `size` on that axis, or with a flick (`SWIPE.velocity`) toward the edge.
93
+ */
94
+ export declare const getSheetSwipe: (position: TPosition, delta: IPointerDragDelta, size: number) => {
95
+ offset: IReqoreDrawerDragOffset;
96
+ closes: boolean;
97
+ };
98
+ /** What a modal's drag is held within. */
99
+ export interface IReqoreModalDragBounds {
100
+ /** The box with no offset applied: where the modal sits at rest. */
101
+ box: {
102
+ left: number;
103
+ top: number;
104
+ width: number;
105
+ height: number;
106
+ };
107
+ viewport: {
108
+ width: number;
109
+ height: number;
110
+ };
111
+ /** The height of the title bar, the part that has to stay reachable. */
112
+ handleHeight: number;
113
+ }
114
+ /**
115
+ * `offset` held so the modal's title bar stays whole in the viewport: the box's left and right
116
+ * edges inside it, the bar fully below the top and above the bottom. The title bar is what the
117
+ * modal is dragged and closed by, and one pushed off-screen has no way back. A box wider than
118
+ * the viewport cannot satisfy that on its axis; it is held to always span the viewport instead.
119
+ */
120
+ export declare const clampModalDragOffset: (offset: IReqoreDrawerDragOffset, { box, viewport, handleHeight }: IReqoreModalDragBounds) => IReqoreDrawerDragOffset;
121
+ /**
122
+ * Whether a press at `target` lands on the drawer's own title bar — the handle a sheet is swiped
123
+ * and a modal dragged by — and not on a control in it. The bar is the drawer panel's direct
124
+ * `.reqore-panel-title`; a panel in the drawer's content has one of its own, and that one is
125
+ * not a handle. A press on a button (the close control, an action), a link, a field or the
126
+ * actions' control group is theirs.
127
+ */
128
+ export declare const isDrawerHeaderGrab: (target: EventTarget | null, box: HTMLElement) => boolean;
5
129
  /** The floor an EDGE drawer cannot be dragged below, on the axis it resizes. */
6
130
  export declare const DRAWER_MIN_SIZE = "150px";
7
131
  /**
@@ -116,6 +240,54 @@ export interface IReqoreDrawerProps extends Omit<IReqorePanelProps, 'size' | 're
116
240
  confirmOnClose?: boolean | IReqoreConfirmationModal;
117
241
  /** Whether to trap focus within the drawer when open. Defaults to true for modals and drawers with backdrop. */
118
242
  focusTrap?: boolean;
243
+ /**
244
+ * Become a full-width sheet on small screens instead of a fixed-size edge
245
+ * panel. OPT-IN, because it changes geometry a caller may have sized for.
246
+ *
247
+ * A `size='720px'` right-hand drawer is unusable at 380px: it covers the
248
+ * whole viewport, its resize handle sits off-screen and nothing says why
249
+ * the page behind it stopped responding. With `responsiveLayout`, at or
250
+ * below the breakpoint — `DRAWER_SHEET_BREAKPOINT` (900px) unless `below`
251
+ * says `'mobile'` (≤ 480px), `'tablet'` (≤ 1200px) or a px number — the
252
+ * drawer attaches to the bottom edge (or the `position` given), takes
253
+ * `100%` of that axis (or the `size` given) up to a `maxSize` of `90vh`
254
+ * (or the one given; `'100%'` for edge to edge), and drops the affordances
255
+ * that make no sense on a sheet — `resizable`, `hidable` and `floating` are
256
+ * off while the layout is active, and a drawer the user had hidden on a
257
+ * wide screen is shown again rather than left hidden with no control to
258
+ * bring it back. Above the breakpoint nothing changes.
259
+ *
260
+ * These defaults are qorus-ide's `useResponsiveDrawerProps` behaviour moved
261
+ * into the library: bottom, full width, 90% of the height, at 900px. Pass
262
+ * `true` for them, or `{ below, position, size, maxSize }` to tune them.
263
+ * The root carries `.reqore-drawer-sheet` while the layout is active, so a
264
+ * story or test can assert which branch rendered.
265
+ *
266
+ * Reqore owns the breakpoints: consumers must not hand-roll a `matchMedia`
267
+ * for this — that is exactly the local workaround this prop replaces.
268
+ * Modals (`ReqoreModal`) ignore it; they are centred and content-sized
269
+ * already.
270
+ */
271
+ responsiveLayout?: boolean | IReqoreDrawerResponsiveLayout;
272
+ /**
273
+ * Whether the sheet can be pushed away. While `responsiveLayout` has made the drawer a sheet,
274
+ * dragging its title bar toward the edge it is attached to follows the finger, and letting go
275
+ * past `SWIPE.distance` (18%) of the sheet's size on that axis — or with a flick toward the
276
+ * edge — closes it through the same path as the close button, so `confirmOnClose` still asks
277
+ * first. A shorter drag springs back; at once under `prefers-reduced-motion` or with
278
+ * `animations.dialogs` off. The title bar alone is the handle (not a button, an action or a
279
+ * field in it), so the content scrolls as it always did, and every sheet `position` swipes
280
+ * toward its own edge. The box carries `.reqore-drawer-swipeable` while it is on and
281
+ * `.reqore-drawer-dragging` during a drag. Default `true`: a sheet a finger cannot push away
282
+ * reads as stuck. Nothing outside the sheet layout, and nothing without an `onClose`.
283
+ */
284
+ swipeToClose?: boolean;
285
+ /**
286
+ * `ReqoreModal`'s `draggable`, handed over under another name so that the HTML attribute of
287
+ * that name never reaches the DOM — it would start the browser's own drag of the panel.
288
+ * @internal
289
+ */
290
+ _draggable?: boolean;
119
291
  }
120
292
  export interface IReqoreDrawerStyle extends IReqoreDrawerProps {
121
293
  theme: IReqoreTheme;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAMhF,OAAO,EAAsB,iBAAiB,EAAe,MAAM,UAAU,CAAC;AAG9E,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAE5D,gFAAgF;AAChF,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,WAAW,CAAC;IACvF,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,CA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