@mintplayer/web-components 2.16.0 → 2.17.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 (117) hide show
  1. package/accordion/index.mjs +5 -5
  2. package/calendar/index.mjs +1 -1
  3. package/carousel/index.mjs +57 -143
  4. package/charts/core/index.mjs +30 -20
  5. package/charts/core/src/attributes.d.ts +18 -0
  6. package/charts/core/src/index.d.ts +2 -0
  7. package/charts/core/src/view-window.d.ts +46 -0
  8. package/charts/hierarchy/index.mjs +245 -256
  9. package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +1 -3
  10. package/charts/sparkline/index.mjs +27 -26
  11. package/charts/trend/index.mjs +21 -20
  12. package/checkbox/index.mjs +1 -1
  13. package/checkbox/src/components/mp-checkbox.d.ts +1 -0
  14. package/chunks/attributes-L3eKsbdy.mjs +16 -0
  15. package/chunks/color-mode-warning-71FmlzWX.mjs +13 -0
  16. package/chunks/{form-check.styles-B0pxJ6YC.mjs → form-check.styles-DqvBnspm.mjs} +24 -3
  17. package/chunks/{mp-calendar.element-CJ8-t-Zn.mjs → mp-calendar.element-BIHS9SZZ.mjs} +11 -6
  18. package/chunks/{mp-checkbox-CzwS7Y_t.mjs → mp-checkbox-zV83gILn.mjs} +44 -36
  19. package/chunks/{mp-datatable-B7st6G-I.mjs → mp-datatable-eRpl7-2V.mjs} +173 -173
  20. package/chunks/{mp-datetime-picker.element-DsWA1AFs.mjs → mp-datetime-picker.element-Cxu5-qRE.mjs} +29 -32
  21. package/chunks/{mp-pagination-Dea75mD4.mjs → mp-pagination-hGy4dL7p.mjs} +9 -4
  22. package/chunks/{mp-radio-cL46sUA0.mjs → mp-radio-BhRVNdKp.mjs} +32 -28
  23. package/chunks/{mp-select-BNrbPwN4.mjs → mp-select-CgqYFvUj.mjs} +41 -26
  24. package/chunks/{mp-splitter-Ckn1kN4v.mjs → mp-splitter-DLehrw3Y.mjs} +144 -120
  25. package/chunks/{mp-timepicker.element-CwaAAOcm.mjs → mp-timepicker.element-BiB9lkgc.mjs} +58 -45
  26. package/chunks/{mp-toggle-button-eo_aTQtu.mjs → mp-toggle-button-CaS9uYLE.mjs} +26 -24
  27. package/chunks/{mp-treeview-C8iltDbq.mjs → mp-treeview-CaMTDrvY.mjs} +51 -50
  28. package/chunks/{overlay-controller-DifgO6jT.mjs → overlay-controller-BHDagokg.mjs} +96 -92
  29. package/chunks/{id-DNZVAnGC.mjs → resource.service--lqLwEqk.mjs} +144 -206
  30. package/chunks/view-window-DGvFiDnW.mjs +263 -0
  31. package/code-snippet/index.mjs +70 -66
  32. package/code-snippet/src/hljs-loaders.generated.d.ts +1 -1
  33. package/custom-elements.json +65750 -0
  34. package/datatable/index.mjs +1 -1
  35. package/datatable/src/components/column-resize.d.ts +11 -0
  36. package/datatable/src/components/mp-datatable.d.ts +5 -0
  37. package/datepicker/index.mjs +10 -9
  38. package/datetime-picker/index.mjs +1 -1
  39. package/datetime-picker/src/mp-datetime-picker.element.d.ts +3 -0
  40. package/dock/index.mjs +430 -463
  41. package/dock/src/components/mint-dock-manager.element.d.ts +25 -2
  42. package/dock/src/core/resize.d.ts +60 -0
  43. package/dropdown-menu/index.mjs +4 -2
  44. package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +6 -1
  45. package/dropdown-menu/src/index.d.ts +1 -1
  46. package/dropdown-menu/src/types/dropdown.d.ts +14 -1
  47. package/dropdown-menu/src/types/index.d.ts +1 -1
  48. package/file-manager/index.mjs +63 -61
  49. package/file-manager/src/components/mp-file-manager.d.ts +4 -3
  50. package/multi-range/index.mjs +56 -50
  51. package/multi-range/src/mint-multi-range.element.d.ts +4 -10
  52. package/multi-range/src/pointer-geometry.d.ts +31 -0
  53. package/navbar/index.mjs +89 -439
  54. package/overlay/index.mjs +1 -1
  55. package/overlay/src/overlay-controller.d.ts +0 -14
  56. package/overlay/src/placement.d.ts +48 -0
  57. package/package.json +7 -1
  58. package/pagination/index.mjs +1 -1
  59. package/phone-input/index.mjs +44 -40
  60. package/phone-input/src/components/stack.d.ts +8 -0
  61. package/query-builder/index.mjs +418 -466
  62. package/query-builder/src/dnd/drag-controller.d.ts +12 -8
  63. package/query-builder/src/mp-query-builder.element.d.ts +5 -1
  64. package/query-builder/src/mp-query-condition.element.d.ts +1 -0
  65. package/radio/index.mjs +1 -1
  66. package/radio-group/index.mjs +1 -1
  67. package/ribbon/index.mjs +477 -498
  68. package/ribbon/src/core/band-text-color.d.ts +10 -0
  69. package/ribbon/src/core/key-tip-allocator.d.ts +10 -0
  70. package/ribbon/src/core/plan-reduce-steps.d.ts +62 -0
  71. package/ribbon/src/mp-ribbon.element.d.ts +0 -27
  72. package/scheduler/index.mjs +726 -711
  73. package/scheduler/src/components/mp-scheduler.d.ts +19 -3
  74. package/scheduler/src/drag/drag-manager.d.ts +1 -9
  75. package/scheduler/src/input/input-handler.d.ts +12 -2
  76. package/scheduler/src/utils/geometry.d.ts +39 -0
  77. package/scheduler/src/views/timeline-view.d.ts +0 -1
  78. package/scheduler-core/index.mjs +84 -71
  79. package/scheduler-core/src/services/resource.service.d.ts +0 -12
  80. package/scheduler-core/src/services/timeline.service.d.ts +0 -9
  81. package/select/index.mjs +1 -1
  82. package/select/src/components/mp-select.d.ts +1 -0
  83. package/signature-pad/index.mjs +21 -23
  84. package/signature-pad/src/canvas-point.d.ts +26 -0
  85. package/signature-pad/src/mp-signature-pad.element.d.ts +1 -7
  86. package/splitter/index.mjs +1 -1
  87. package/splitter/src/components/mp-splitter.d.ts +16 -0
  88. package/splitter/src/managers/index.d.ts +1 -0
  89. package/splitter/src/managers/rescale-panel-sizes.d.ts +14 -0
  90. package/swiper-core/index.mjs +2 -2
  91. package/theming/bs-theme-preboot.js +1 -0
  92. package/theming/color-mode.css +36 -0
  93. package/theming/index.d.ts +1 -0
  94. package/theming/index.mjs +327 -0
  95. package/theming/src/components/mp-theme-toggle.d.ts +71 -0
  96. package/theming/src/cookie.d.ts +31 -0
  97. package/theming/src/index.d.ts +5 -0
  98. package/theming/src/preboot.d.ts +1 -0
  99. package/theming/src/resolve.d.ts +36 -0
  100. package/theming/src/store.d.ts +27 -0
  101. package/theming/src/styles/theme-toggle.styles.d.ts +2 -0
  102. package/theming/src/testing/fake-broadcast-channel.d.ts +35 -0
  103. package/theming/src/toggle-modes.d.ts +23 -0
  104. package/tile-manager/index.mjs +252 -211
  105. package/tile-manager/src/components/mint-tile-manager.element.d.ts +8 -0
  106. package/tile-manager/src/utils/grid-geometry.d.ts +49 -0
  107. package/timeline/index.mjs +156 -164
  108. package/timeline/src/components/mp-timeline.d.ts +41 -7
  109. package/timepicker/index.mjs +7 -4
  110. package/timepicker/src/mp-time-list.element.d.ts +26 -0
  111. package/timepicker/src/mp-timepicker.element.d.ts +3 -0
  112. package/toggle-button/index.mjs +1 -1
  113. package/tree-select/index.mjs +21 -9
  114. package/treeview/index.mjs +1 -1
  115. package/treeview/src/components/mp-treeview.d.ts +6 -4
  116. package/chunks/color-DIeST-IS.mjs +0 -224
  117. package/query-builder/src/mp-query-condition.element.template.d.ts +0 -2
@@ -0,0 +1,10 @@
1
+ /** Text colour on a pastel band. */
2
+ export declare const BAND_TEXT_DARK = "#262626";
3
+ /** Text colour on a saturated band. */
4
+ export declare const BAND_TEXT_LIGHT = "#FFFFFF";
5
+ /**
6
+ * Office-faithful contrast rule for a contextual tab set's band: dark text on
7
+ * pastel bands, white text on saturated ones, by W3C relative luminance with a
8
+ * 0.6 cutoff. A colour that is not hex falls back to dark (the safe default).
9
+ */
10
+ export declare function bandTextColor(background: string): string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Deterministic 1-letter KeyTip allocator (FR-12). Tries, in order:
3
+ * 1. the explicit `data-key-tip` (first character, upper-cased);
4
+ * 2. the label's first character, when it is a letter or digit;
5
+ * 3. the label's later consonants;
6
+ * 4. any letter of the label;
7
+ * 5. digits 1-9, then the alphabet, then 0.
8
+ * Returns '?' when all of those are taken. The chosen tip is added to `used`.
9
+ */
10
+ export declare function allocateKeyTip(label: string, explicit: string | null, used: Set<string>): string;
@@ -0,0 +1,62 @@
1
+ import { RibbonGroupSize, RibbonReduceStep } from '../mp-ribbon-tab.element';
2
+ /** Item sizes a group can resolve its items to. */
3
+ export type RibbonItemSize = 'large' | 'medium' | 'small';
4
+ /** Gap between adjacent groups in the active tab, in px. */
5
+ export declare const RIBBON_GROUP_GAP = 8;
6
+ /** One group of the active tab, as measured by the caller. */
7
+ export interface ReduceGroup {
8
+ /** The group's current rendered width. */
9
+ width: number;
10
+ /** The group's width when last seen expanded (0 when never seen). */
11
+ naturalWidth: number;
12
+ /** Author priority; lower collapses first, higher expands first. */
13
+ priority: number;
14
+ /** False for `auto-scale="false"`: never collapsed by the reflow. */
15
+ autoScale: boolean;
16
+ /** True while the group is collapsed to its popup trigger. */
17
+ collapsed: boolean;
18
+ }
19
+ export interface ReduceModel {
20
+ /** Width the active tab offers its groups. */
21
+ available: number;
22
+ gap: number;
23
+ groups: readonly ReduceGroup[];
24
+ }
25
+ /** The next mutation the priority reflow should make, by group index. */
26
+ export type ReduceStep = {
27
+ action: 'collapse' | 'expand';
28
+ index: number;
29
+ };
30
+ /** Total width the groups occupy, gaps included. */
31
+ export declare function occupiedWidth(widths: readonly number[], gap: number): number;
32
+ /**
33
+ * Plan the priority reflow's next step from measured widths. Over budget, it
34
+ * collapses the next candidate; under budget, it expands the next collapsed
35
+ * group but only when the group's natural width would still fit. Null means
36
+ * the layout is settled: it fits exactly, nothing can collapse, or the next
37
+ * expansion would overflow.
38
+ *
39
+ * The caller applies the step, re-measures (a collapsed group's width is
40
+ * only known once it has been laid out collapsed) and asks again.
41
+ */
42
+ export declare function planReduceStep(model: ReduceModel): ReduceStep | null;
43
+ /** Width the Simplified layout keeps free for its overflow chevron, in px. */
44
+ export declare const SIMPLIFIED_CHEVRON_RESERVATION = 40;
45
+ /**
46
+ * Simplified layout (FR-39): the index of the first group that no longer fits
47
+ * beside the overflow chevron. That group and every later one move into the
48
+ * chevron's menu. Equals `widths.length` when everything fits.
49
+ */
50
+ export declare function simplifiedOverflowStart(widths: readonly number[], available: number): number;
51
+ /**
52
+ * The resolved size of `groupId` after the first `count` steps of an
53
+ * author-declared reduceOrder have been applied, starting from its ideal size
54
+ * (`large` when unset).
55
+ */
56
+ export declare function sizeAtStepIndex(steps: readonly RibbonReduceStep[], count: number, groupId: string, idealSizes: Record<string, RibbonGroupSize>): RibbonGroupSize;
57
+ /**
58
+ * The rendered size of an item given its consumer-declared size and its
59
+ * group's resolved size. Items only ever shrink, never grow past what the
60
+ * consumer declared.
61
+ */
62
+ export declare function deriveItemSize(original: RibbonItemSize, groupSize: Exclude<RibbonGroupSize, 'popup'>): RibbonItemSize;
@@ -112,15 +112,6 @@ export declare class MpRibbon extends LitElement {
112
112
  * triggers, click opens the menu. delegatesFocus + `click()` covers both.
113
113
  */
114
114
  private activateKeyTipTarget;
115
- /**
116
- * Deterministic 1-letter tip allocator (FR-12). Tries (in order):
117
- * 1. Explicit `data-key-tip` attribute on the element.
118
- * 2. First letter of the label that isn't already taken.
119
- * 3. Subsequent consonants in the label.
120
- * 4. Other letters of the label.
121
- * 5. Digits 1-9 then 0 (fallback when every letter is taken).
122
- */
123
- private allocateKeyTip;
124
115
  /** Compute key-tip badges anchored under each tab button in the strip. */
125
116
  private deriveTabBadges;
126
117
  /** Compute key-tip badges for every item inside the currently active tab. */
@@ -151,12 +142,6 @@ export declare class MpRibbon extends LitElement {
151
142
  render(): TemplateResult;
152
143
  private renderKeyTipOverlay;
153
144
  private renderTabStripItems;
154
- /**
155
- * Office-faithful contrast rule: dark text on pastel bands, white text on
156
- * saturated bands. Uses W3C relative luminance with a 0.6 cutoff. Accepts
157
- * 6-digit hex; falls back to dark on parse failure (safe default).
158
- */
159
- private getBandTextColor;
160
145
  private renderTabButton;
161
146
  private onSlotChange;
162
147
  private processSlot;
@@ -196,12 +181,6 @@ export declare class MpRibbon extends LitElement {
196
181
  * time and the runtime treats it as a no-op.
197
182
  */
198
183
  private applyAuthorReduceOrder;
199
- /**
200
- * Compute the resolved size of `groupId` after the first `count` steps of
201
- * `steps` have been applied. The starting point is `idealSizes[groupId]`
202
- * or `large` if unset.
203
- */
204
- private sizeAtStepIndex;
205
184
  /**
206
185
  * Apply a resolved size to a group + mutate slotted item sizes so the
207
186
  * intermediate (`medium` / `small`) sizes have a visible effect. Saves
@@ -209,12 +188,6 @@ export declare class MpRibbon extends LitElement {
209
188
  * group downsizes, so going back to `large` restores it.
210
189
  */
211
190
  private applyGroupSize;
212
- /**
213
- * Compute the rendered item size given its consumer-declared "original"
214
- * size and the group's resolved size. Items can only ever shrink, never
215
- * grow above their original.
216
- */
217
- private deriveItemSize;
218
191
  private collectGroupItems;
219
192
  /**
220
193
  * Returns the `<mp-ribbon-group>` elements assigned to the active tab's slot.