@evotecit/canopyx 0.3.13 → 0.3.16

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 (103) hide show
  1. package/CanopyX.Html/Assets/canopyx-calendar-edit.js +36 -18
  2. package/CanopyX.Html/Assets/canopyx-calendar-ics.js +7 -5
  3. package/CanopyX.Html/Assets/canopyx-calendar.css +124 -116
  4. package/CanopyX.Html/Assets/canopyx-calendar.js +74 -54
  5. package/CanopyX.Html/Assets/canopyx-cell-range.css +8 -8
  6. package/CanopyX.Html/Assets/canopyx-cell-range.js +1 -1
  7. package/CanopyX.Html/Assets/canopyx-changes.css +113 -113
  8. package/CanopyX.Html/Assets/canopyx-changes.js +7 -10
  9. package/CanopyX.Html/Assets/canopyx-column-groups.css +5 -5
  10. package/CanopyX.Html/Assets/canopyx-column-groups.js +1 -1
  11. package/CanopyX.Html/Assets/canopyx-data.js +2 -2
  12. package/CanopyX.Html/Assets/canopyx-detail-rows.css +9 -9
  13. package/CanopyX.Html/Assets/canopyx-detail-rows.js +2 -2
  14. package/CanopyX.Html/Assets/canopyx-editing.css +18 -18
  15. package/CanopyX.Html/Assets/canopyx-editing.js +1 -1
  16. package/CanopyX.Html/Assets/canopyx-enhance.js +2 -2
  17. package/CanopyX.Html/Assets/canopyx-facets.css +33 -33
  18. package/CanopyX.Html/Assets/canopyx-facets.js +5 -6
  19. package/CanopyX.Html/Assets/canopyx-filter-editor.css +57 -57
  20. package/CanopyX.Html/Assets/canopyx-filter-editor.js +7 -5
  21. package/CanopyX.Html/Assets/canopyx-flow-checks.css +13 -11
  22. package/CanopyX.Html/Assets/canopyx-flow-checks.js +5 -4
  23. package/CanopyX.Html/Assets/canopyx-flow-command.css +7 -7
  24. package/CanopyX.Html/Assets/canopyx-flow-command.js +1 -1
  25. package/CanopyX.Html/Assets/canopyx-flow-dialog.css +9 -7
  26. package/CanopyX.Html/Assets/canopyx-flow-dialog.js +1 -1
  27. package/CanopyX.Html/Assets/canopyx-flow-drafts.css +7 -7
  28. package/CanopyX.Html/Assets/canopyx-flow-drafts.js +1 -1
  29. package/CanopyX.Html/Assets/canopyx-flow-entry.css +17 -76
  30. package/CanopyX.Html/Assets/canopyx-flow-entry.js +11 -5
  31. package/CanopyX.Html/Assets/canopyx-flow-facts.js +2 -0
  32. package/CanopyX.Html/Assets/canopyx-flow-host.css +4 -4
  33. package/CanopyX.Html/Assets/canopyx-flow-host.js +1 -1
  34. package/CanopyX.Html/Assets/canopyx-flow-module.mjs +11 -5
  35. package/CanopyX.Html/Assets/canopyx-flow-pick.css +4 -4
  36. package/CanopyX.Html/Assets/canopyx-flow-pick.js +1 -1
  37. package/CanopyX.Html/Assets/canopyx-flow-preview.css +6 -6
  38. package/CanopyX.Html/Assets/canopyx-flow-preview.js +1 -1
  39. package/CanopyX.Html/Assets/canopyx-flow-records.css +3 -3
  40. package/CanopyX.Html/Assets/canopyx-flow-records.js +1 -1
  41. package/CanopyX.Html/Assets/canopyx-flow-tasks.css +17 -17
  42. package/CanopyX.Html/Assets/canopyx-flow-tasks.js +1 -1
  43. package/CanopyX.Html/Assets/canopyx-flow.css +79 -79
  44. package/CanopyX.Html/Assets/canopyx-flow.js +8 -7
  45. package/CanopyX.Html/Assets/canopyx-format-editor.css +23 -23
  46. package/CanopyX.Html/Assets/canopyx-format-editor.js +2 -3
  47. package/CanopyX.Html/Assets/canopyx-formatting.css +17 -17
  48. package/CanopyX.Html/Assets/canopyx-formatting.js +5 -5
  49. package/CanopyX.Html/Assets/canopyx-forms.css +5 -5
  50. package/CanopyX.Html/Assets/canopyx-forms.js +1 -1
  51. package/CanopyX.Html/Assets/canopyx-grid-module.mjs +97 -54
  52. package/CanopyX.Html/Assets/canopyx-grid-options.css +10 -0
  53. package/CanopyX.Html/Assets/canopyx-grid-options.js +47 -0
  54. package/CanopyX.Html/Assets/canopyx-grid.css +199 -261
  55. package/CanopyX.Html/Assets/canopyx-grid.js +97 -54
  56. package/CanopyX.Html/Assets/canopyx-grouping.css +17 -17
  57. package/CanopyX.Html/Assets/canopyx-grouping.js +12 -9
  58. package/CanopyX.Html/Assets/canopyx-highlight.css +14 -14
  59. package/CanopyX.Html/Assets/canopyx-highlight.js +2 -2
  60. package/CanopyX.Html/Assets/canopyx-interactive.css +94 -155
  61. package/CanopyX.Html/Assets/canopyx-interactive.js +33 -14
  62. package/CanopyX.Html/Assets/canopyx-labels-de.js +5 -0
  63. package/CanopyX.Html/Assets/canopyx-labels-es.js +5 -0
  64. package/CanopyX.Html/Assets/canopyx-labels-fr.js +5 -0
  65. package/CanopyX.Html/Assets/canopyx-labels-it.js +5 -0
  66. package/CanopyX.Html/Assets/canopyx-labels-pl.js +5 -0
  67. package/CanopyX.Html/Assets/canopyx-layouts.css +17 -17
  68. package/CanopyX.Html/Assets/canopyx-layouts.js +2 -10
  69. package/CanopyX.Html/Assets/canopyx-link.css +7 -7
  70. package/CanopyX.Html/Assets/canopyx-link.js +1 -1
  71. package/CanopyX.Html/Assets/canopyx-live.css +9 -9
  72. package/CanopyX.Html/Assets/canopyx-live.js +20 -15
  73. package/CanopyX.Html/Assets/canopyx-matrix.css +74 -74
  74. package/CanopyX.Html/Assets/canopyx-matrix.js +3 -4
  75. package/CanopyX.Html/Assets/canopyx-module.mjs +33 -14
  76. package/CanopyX.Html/Assets/canopyx-pager.css +2 -2
  77. package/CanopyX.Html/Assets/canopyx-pager.js +1 -1
  78. package/CanopyX.Html/Assets/canopyx-presenters.js +2 -2
  79. package/CanopyX.Html/Assets/canopyx-record-panel.css +57 -49
  80. package/CanopyX.Html/Assets/canopyx-record-panel.js +13 -8
  81. package/CanopyX.Html/Assets/canopyx-reporting-module.mjs +101 -57
  82. package/CanopyX.Html/Assets/canopyx-reporting.css +214 -276
  83. package/CanopyX.Html/Assets/canopyx-reporting.js +101 -57
  84. package/CanopyX.Html/Assets/canopyx-timeline.css +28 -28
  85. package/CanopyX.Html/Assets/canopyx-timeline.js +11 -10
  86. package/CanopyX.Html/Assets/canopyx-tree-tools.css +47 -47
  87. package/CanopyX.Html/Assets/canopyx-tree-tools.js +3 -3
  88. package/CanopyX.Html/Assets/canopyx.css +81 -142
  89. package/CanopyX.Html/Assets/canopyx.js +33 -14
  90. package/JavaScript/calendar.d.ts +15 -0
  91. package/JavaScript/flow.d.ts +6 -0
  92. package/JavaScript/grid.d.ts +29 -4
  93. package/JavaScript/live.d.ts +2 -0
  94. package/JavaScript/locales/de.mjs +5 -0
  95. package/JavaScript/locales/es.mjs +5 -0
  96. package/JavaScript/locales/fr.mjs +5 -0
  97. package/JavaScript/locales/it.mjs +5 -0
  98. package/JavaScript/locales/pl.mjs +5 -0
  99. package/JavaScript/plugins.d.ts +4 -0
  100. package/JavaScript/protocol.d.ts +1 -1
  101. package/JavaScript/records.d.ts +18 -4
  102. package/README.md +6 -2
  103. package/package.json +5 -1
@@ -1,35 +1,35 @@
1
1
  /* ---------- row grouping: the group-by bar,headings and the totals row ---------- */
2
- .cx-groupbar{flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:var(--cx-size-8px);padding:var(--cx-size-6px) var(--cx-size-12px);border-bottom:var(--cx-size-1px) solid var(--cx-line);background:var(--cx-group-bg);font-size:var(--cx-size-13px);color:var(--cx-muted);min-height:var(--cx-size-38px);}
3
- .cx-gchip{display:inline-flex;align-items:center;gap:var(--cx-size-6px);height:var(--cx-size-26px);padding:0 var(--cx-size-6px);border:var(--cx-size-1px) solid var(--cx-line-strong);border-radius:var(--cx-radius);background:var(--cx-surface);color:var(--cx-text);}
2
+ .cx-groupbar{flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:var(--cx-size-8px);padding:var(--cx-size-6px) var(--cx-size-12px);border-bottom:var(--cx-size-1px) solid var(--hfx-color-border,light-dark(#e2e4e7,#272a30));background:var(--hfx-color-row-alt,light-dark(#fafafa,#1d1f23));font-size:var(--cx-size-13px);color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));min-height:var(--cx-size-38px);}
3
+ .cx-gchip{display:inline-flex;align-items:center;gap:var(--cx-size-6px);height:var(--cx-size-26px);padding:0 var(--cx-size-6px);border:var(--cx-size-1px) solid var(--hfx-color-border-strong,light-dark(#cdd0d5,#363a42));border-radius:var(--hfx-radius-control,var(--hfx-radius-md,6px));background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));}
4
4
  .cx-data-grid .cx-gchip .cx-button{width:var(--cx-size-18px);min-height:var(--cx-size-18px);height:var(--cx-size-18px);padding:0;}
5
- .cx-data-grid .cx-grid-group{background:var(--cx-group-bg);font-weight:700;}
5
+ .cx-data-grid .cx-grid-group{background:var(--hfx-color-row-alt,light-dark(#fafafa,#1d1f23));font-weight:700;}
6
6
  .cx-grid-group-toggle{flex:0 0 auto;padding:0;margin-right:var(--cx-size-6px);border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;}
7
- .cx-grid-group-toggle:focus-visible{outline:var(--cx-size-2px) solid var(--cx-accent);outline-offset:var(--cx-size-neg-2px);}
7
+ .cx-grid-group-toggle:focus-visible{outline:var(--hfx-focus-width,2px) solid var(--hfx-color-focus-ring,light-dark(#02726a,#37c9b8));outline-offset:var(--hfx-focus-offset,2px);}
8
8
  .cx-data-grid .cx-grid-group .cx-cell:first-child{overflow:visible;z-index:3;}
9
9
  .cx-grid-group-label{flex:none;display:flex;align-items:center;min-width:0;overflow:hidden;white-space:nowrap;}
10
10
  .cx-grid-group-text{flex:0 0 auto;max-width:100%;overflow:hidden;text-overflow:ellipsis;}
11
- .cx-grid-group-count{flex:none;margin-left:var(--cx-size-8px);color:var(--cx-muted);font-size:var(--cx-size-12px);font-weight:400;}
12
- .cx-data-grid .cx-grid-group .cx-cell{background:var(--cx-group-bg);}
13
- .cx-data-grid .cx-grid-summary{position:sticky;bottom:0;z-index:4;background:var(--cx-head-bg);border-top:var(--cx-size-1px) solid var(--cx-line-strong);font:inherit;}
14
- .cx-summary-row{display:flex;height:var(--cx-head-h);font-weight:700;}
15
- .cx-data-grid .cx-summary-row .cx-cell[data-cx-pin]{background:var(--cx-head-bg);}
16
- .cx-summary-row .cx-summary-caption{font-size:var(--cx-size-11d5px);letter-spacing:var(--cx-size-d04em);text-transform:uppercase;color:var(--cx-muted);}
11
+ .cx-grid-group-count{flex:none;margin-left:var(--cx-size-8px);color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));font-size:var(--cx-size-12px);font-weight:400;}
12
+ .cx-data-grid .cx-grid-group .cx-cell{background:var(--hfx-color-row-alt,light-dark(#fafafa,#1d1f23));}
13
+ .cx-data-grid .cx-grid-summary{position:sticky;bottom:0;z-index:4;background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));border-top:var(--cx-size-1px) solid var(--hfx-color-border-strong,light-dark(#cdd0d5,#363a42));font:inherit;}
14
+ .cx-summary-row{display:flex;height:var(--hfx-table-header-height,calc(40px - var(--cx-compact,0) * 8px));font-weight:700;}
15
+ .cx-data-grid .cx-summary-row .cx-cell[data-cx-pin]{background:var(--hfx-color-surface-sunken,light-dark(#f7f8f9,#111317));}
16
+ .cx-summary-row .cx-summary-caption{font-size:var(--cx-size-11d5px);letter-spacing:var(--cx-size-d04em);text-transform:uppercase;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));}
17
17
  .cx-groupbar-label{flex:none;}
18
18
  .cx-groupbar-hint{font-style:italic;}
19
19
  .cx-groupbar-spacer{flex:1 1 auto;}
20
- .cx-groupbar.cx-group-drop{outline:var(--cx-size-2px) dashed var(--cx-accent);outline-offset:var(--cx-size-neg-2px);}
20
+ .cx-groupbar.cx-group-drop{outline:var(--cx-size-2px) dashed var(--hfx-color-accent,light-dark(#11776f,#37c9b8));outline-offset:var(--hfx-focus-offset,2px);}
21
21
  .cx-data-grid .cx-groupbar .cx-groupbar-all{min-height:var(--cx-size-26px);height:var(--cx-size-26px);padding:0 var(--cx-size-8px);font-size:var(--cx-size-12px);}
22
22
  .cx-gchip-name{cursor:grab;touch-action:none;white-space:nowrap;}
23
23
  .cx-data-grid .cx-gchip .cx-gchip-fold{font-weight:700;line-height:1;}
24
- .cx-gchip-order{height:var(--cx-size-20px);max-width:var(--cx-size-140px);border:var(--cx-size-1px) solid var(--cx-control-border);border-radius:var(--cx-radius-sm);background:var(--cx-surface);color:var(--cx-text);font:inherit;font-size:var(--cx-size-12px);}
25
- .cx-gchip:focus-within{border-color:var(--cx-accent);}
26
- .cx-data-grid .cx-grid-group .cx-cell:first-child{padding-inline-start:calc(var(--cx-cell-px) + var(--cx-group-level,0) * var(--cx-size-16px));}
27
- .cx-grid-group-column{color:var(--cx-muted);font-weight:400;}
24
+ .cx-gchip-order{height:var(--cx-size-20px);max-width:var(--cx-size-140px);border:var(--cx-size-1px) solid var(--hfx-color-border-control,light-dark(#8a8f98,#6e737c));border-radius:var(--hfx-radius-sm,4px);background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));font:inherit;font-size:var(--cx-size-12px);}
25
+ .cx-gchip:focus-within{border-color:var(--hfx-color-accent,light-dark(#11776f,#37c9b8));}
26
+ .cx-data-grid .cx-grid-group .cx-cell:first-child{padding-inline-start:calc(var(--hfx-cell-padding-x,calc(12px - var(--cx-compact,0) * 4px)) + var(--cx-group-level,0) * var(--cx-size-16px));}
27
+ .cx-grid-group-column{color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));font-weight:400;}
28
28
  .cx-grid-group-select{margin-inline-end:var(--cx-size-6px);}
29
29
  .cx-aggregate{font-variant-numeric:tabular-nums;}
30
30
  .cx-aggregate:not(:first-child){overflow:hidden;text-overflow:clip;}
31
- .cx-grid-group-aggregates{flex:0 1000 auto;min-width:0;margin-inline-start:var(--cx-size-12px);overflow:hidden;text-overflow:ellipsis;color:var(--cx-muted);font:inherit;font-weight:400;font-variant-numeric:tabular-nums;border:0;background:transparent;padding:0;cursor:pointer;white-space:nowrap;}
32
- .cx-grid-group-aggregates:focus-visible{outline:var(--cx-size-2px) solid var(--cx-accent);outline-offset:var(--cx-size-neg-2px);}
31
+ .cx-grid-group-aggregates{flex:0 1000 auto;min-width:0;margin-inline-start:var(--cx-size-12px);overflow:hidden;text-overflow:ellipsis;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));font:inherit;font-weight:400;font-variant-numeric:tabular-nums;border:0;background:transparent;padding:0;cursor:pointer;white-space:nowrap;}
32
+ .cx-grid-group-aggregates:focus-visible{outline:var(--hfx-focus-width,2px) solid var(--hfx-color-focus-ring,light-dark(#02726a,#37c9b8));outline-offset:var(--hfx-focus-offset,2px);}
33
33
  .cx-summary-row .cx-grid-group-aggregates{text-transform:none;letter-spacing:normal;font-size:var(--cx-size-13px);}
34
34
  .cx-aggregate > .cx-aggregate-button{max-width:100%;margin-inline-start:0;font:inherit;color:inherit;flex:0 1 auto;text-align:left;}
35
35
  .cx-phone .cx-groupbar{padding:var(--cx-size-4px) var(--cx-size-8px);gap:var(--cx-size-6px);}
@@ -1,16 +1,19 @@
1
- (function(global){"use strict";const installed=new WeakSet();const part={version:"0e0a3529c0b099d7",requires:["detail-rows"],install(context){if(installed.has(context.DataGrid.prototype))return;const{DataGrid,GRID_ROWS,GRID_REPORTING,h,setText,fill,numberFormat,formatValue,cellValue,cellText,isCellObject,gridScalar,gridQuery,gridFreeze,gridOrder,gridIdOrder,gridQueryRows,gridButton,gridDecorateButton,gridCellRenderer,gridPresenterTone,GRID_TONE_RANK,validateGridRows,validateGridPage,checkDocument,requireIdentifier,validStructuralCount,PROTOCOL,gridOperationActive,reportingGroupKey,reportingGroupCompare,reportingSummaryEnabled,reportingDynamicGroups,GROUP_OPERATIONS,reportingAggregateParts,disposeRowHostCells,quietControls,TreeGrid}=context;const groupCounting=operation=>operation==="count"||operation==="distinctCount";function groupCustomAggregates(grid){const found=new Map();for(const plugin of grid.plugins)for(const[name,entry]of Object.entries(plugin.aggregates||{})){const definition=typeof entry==="function"?{compute:entry}:entry;if(!/^[a-z][a-zA-Z\d]{0,31}$/.test(name) || GROUP_OPERATIONS.includes(name) || !definition || typeof definition.compute !== "function" ||
1
+ (function(global){"use strict";const installed=new WeakSet();const part={version:"eedafc8438ac1b2b",requires:["detail-rows"],install(context){if(installed.has(context.DataGrid.prototype))return;const{DataGrid,GRID_ROWS,GRID_REPORTING,GRID_OPTIONS,GRID_OPTION_GRIDS,h,setText,fill,numberFormat,formatValue,cellValue,cellText,isCellObject,gridScalar,gridQuery,gridFreeze,gridOrder,gridIdOrder,gridQueryRows,gridButton,gridDecorateButton,gridCellRenderer,gridPresenterTone,GRID_TONE_RANK,validateGridRows,validateGridPage,checkDocument,requireIdentifier,validStructuralCount,PROTOCOL,gridOperationActive,reportingGroupKey,reportingGroupCompare,reportingSummaryEnabled,reportingDynamicGroups,GROUP_OPERATIONS,reportingAggregateParts,disposeRowHostCells,quietControls,TreeGrid}=context;const groupCounting=operation=>operation==="count"||operation==="distinctCount";function groupSummaryAggregates(view){const bindings=new Map();const add=aggregate=>{const existing=bindings.get(aggregate.id);if(existing&&(existing.column!==aggregate.column||existing.operation!==aggregate.operation))
2
+ throw new Error("CanopyX: an aggregate identity must use the same column and operation.");if(!existing)bindings.set(aggregate.id,aggregate)};for(const aggregate of view.reporting?.aggregates||[])add(aggregate);for(const footer of view.footers||[])if(footer.scope==="all"||view.presentation!=="paged")
3
+ footer.aggregates.forEach(add);if(bindings.size>32)throw new Error("CanopyX: at most 32 full-query aggregates are supported.");return[...bindings.values()]}
4
+ function groupCustomAggregates(grid){const found=new Map();for(const plugin of grid.plugins)for(const[name,entry]of Object.entries(plugin.aggregates||{})){const definition=typeof entry==="function"?{compute:entry}:entry;if(!/^[a-z][a-zA-Z\d]{0,31}$/.test(name) || GROUP_OPERATIONS.includes(name) || !definition || typeof definition.compute !== "function" ||
2
5
  definition.label!==undefined&&(typeof definition.label!=="string"||!definition.label.includes("{value}")||definition.label.length>64))
3
6
  throw new Error("CanopyX: plugin '"+plugin.name+"' registers an invalid aggregate '"+name+"'.");found.set(name,definition)}
4
7
  return found}
5
8
  function groupAggregateValue(grid,aggregate,rows,first,last){const column=grid.view.columns.find(item=>item.id===aggregate.column),operation=aggregate.operation;if(!GROUP_OPERATIONS.includes(operation)){const values=[];for(let i=first;i<last;i++){const value=gridScalar(rows[i].cells[column.id],column);if(value!==null)values.push(value)}
6
9
  const value=grid.groupAggregates.get(operation).compute(Object.freeze(values),Object.freeze({column:column.id,aggregate:aggregate.id}));if(value!==null&&(typeof value!=="number"||!Number.isFinite(value)||Math.abs(value)>Number.MAX_SAFE_INTEGER))
7
10
  throw new Error("CanopyX: custom aggregate '"+operation+"' returned a value that is not a finite number or null.");return value}
8
- let count=0,sum=0,correction=0,minimum=Infinity,maximum=-Infinity;const distinct=operation==="distinctCount"?new Set():null;for(let i=first;i<last;i++){const value=gridScalar(rows[i].cells[column.id],column);if(value===null)continue;count++;if(distinct)distinct.add(reportingGroupKey(value));else if(operation!=="count"){const next=value-correction,total=sum+next;correction=total-sum-next;sum=total;minimum=Math.min(minimum,value);maximum=Math.max(maximum,value)}}
11
+ let count=0,sum=0,correction=0,minimum=Infinity,maximum=-Infinity;const distinct=operation==="distinctCount"?new Set():null;for(let i=first;i<last;i++){const value=gridScalar(rows[i].cells[column.id],column);if(value===null)continue;count++;if(distinct)distinct.add(reportingGroupKey(value));else if(operation!=="count"){const total=sum+value;correction +=Math.abs(sum)>=Math.abs(value)?sum-total+value:value-total+sum;sum=total;minimum=Math.min(minimum,value);maximum=Math.max(maximum,value)}}
9
12
  return operation==="count"?count:distinct?distinct.size:!count?null:
10
- operation==="sum"?sum:operation==="average"?sum / count : operation === "minimum" ? minimum : maximum;
13
+ operation==="sum"?sum+correction:operation==="average"?(sum+correction)/ count : operation === "minimum" ? minimum : maximum;
11
14
  }
12
- function groupAggregateValues(grid,rows,first=0,last=rows.length){const values=Object.create(null);for(const aggregate of grid.view.reporting.aggregates||[])values[aggregate.id]=groupAggregateValue(grid,aggregate,rows,first,last);return values}
13
- function groupCheckValues(view,values,count){const declarations=view.reporting.aggregates||[];if(!values||typeof values!=="object"||Array.isArray(values)||Object.keys(values).length!==declarations.length)
15
+ function groupAggregateValues(grid,rows,first=0,last=rows.length){const values=Object.create(null);for(const aggregate of groupSummaryAggregates(grid.view))values[aggregate.id]=groupAggregateValue(grid,aggregate,rows,first,last);return values}
16
+ function groupCheckValues(view,values,count){const declarations=groupSummaryAggregates(view);if(!values||typeof values!=="object"||Array.isArray(values)||Object.keys(values).length!==declarations.length)
14
17
  throw new Error("CanopyX: summary aggregate bindings differ.");for(const aggregate of declarations){const value=values[aggregate.id];if(!Object.hasOwn(values,aggregate.id)||value!==null&&(typeof value!=="number"||!Number.isFinite(value)||Math.abs(value)>Number.MAX_SAFE_INTEGER)||
15
18
  groupCounting(aggregate.operation)&&(!validStructuralCount(value)||value>count)||
16
19
  !count&&!groupCounting(aggregate.operation)&&value!==null)throw new Error("CanopyX: invalid aggregate value.")}}
@@ -30,8 +33,8 @@ if(offset!==start+count)throw new Error("CanopyX: groups omit matching records."
30
33
  function groupPath(summary,ordinal){const path=[];for(let list=summary.groups;list?.length;){let low=0,high=list.length;while(low<high){const middle=(low+high)>>>1;if(list[middle].offset<=ordinal)low=middle+1;else high=middle}
31
34
  const group=low?list[low-1]:null;if(!group||ordinal>=group.offset+group.count)break;path.push(group);list=group.groups}
32
35
  return path}
33
- const GROUP_GRIDS=new WeakMap();GRID_ROWS.order=(view,query)=>{const grid=GROUP_GRIDS.get(view),columns=new Map(view.columns.map(column=>[column.id,column])),levels=query.groupBy;const compare=GRID_REPORTING.compare(view),rest=query.sort.filter(sort=>!levels.some(level=>level.column===sort.column));const within=(a,b)=>{for(const sort of rest){const result=compare(a,b,columns.get(sort.column),sort.direction);if(result)return result}return gridIdOrder(a.id,b.id)};const arrange=(rows,depth)=>{if(depth===levels.length)return rows.sort(within);const level=levels[depth],column=columns.get(level.column),buckets=new Map();for(const row of rows){const key=reportingGroupKey(gridScalar(row.cells[column.id],column));if(!buckets.has(key))buckets.set(key,[]);buckets.get(key).push(row)}
34
- const groups=[...buckets.values()].map(list=>({list,value:cellValue(list[0].cells[column.id])??null,aggregates:level.aggregate?{[level.aggregate]:groupAggregateValue(grid,view.reporting.aggregates.find(item=>item.id===level.aggregate),list,0,list.length)}:{}}));groups.sort(groupOrder(view,level));return groups.flatMap(group=>arrange(group.list,depth+1))};return arrange(gridQueryRows(view,query,columns,null),0)};function groupInnerKey(parent,key){const text=parent+"\u001f"+key;if(text.length<=4096)return text;let a=0x811c9dc5,b=0x01000193;for(let i=0;i<text.length;i++){const code=text.charCodeAt(i);a=Math.imul(a^code,16777619);b=Math.imul(b^code,2246822519)^(b>>>13)}
36
+ const GROUP_GRIDS=new WeakMap();GRID_ROWS.order=(view,query)=>{const grid=GROUP_GRIDS.get(view),columns=new Map(view.columns.map(column=>[column.id,column])),levels=query.groupBy;const baseCompare=GRID_REPORTING.compare(view),compare=GRID_OPTION_GRIDS.has(view)?GRID_OPTIONS.compare(view,query,columns,baseCompare):baseCompare;const rest=query.sort.filter(sort=>!levels.some(level=>level.column===sort.column));const within=(a,b)=>{for(const sort of rest){const result=compare(a,b,columns.get(sort.column),sort.direction);if(result)return result}return gridIdOrder(a.id,b.id)};const arrange=(rows,depth)=>{if(depth===levels.length)return rows.sort(within);const level=levels[depth],column=columns.get(level.column),buckets=new Map();for(const row of rows){const key=reportingGroupKey(gridScalar(row.cells[column.id],column));if(!buckets.has(key))buckets.set(key,[]);buckets.get(key).push(row)}
37
+ const groups=[...buckets.values()].map(list=>({list,value:cellValue(list[0].cells[column.id])??null,aggregates:level.aggregate?{[level.aggregate]:groupAggregateValue(grid,view.reporting.aggregates.find(item=>item.id===level.aggregate),list,0,list.length)}:{}}));groups.sort(groupOrder(view,level));return groups.flatMap(group=>arrange(group.list,depth+1))};return arrange(gridQueryRows(view,query,columns,null),0)};GRID_OPTIONS.groupRows=GRID_ROWS.order;function groupInnerKey(parent,key){const text=parent+"\u001f"+key;if(text.length<=4096)return text;let a=0x811c9dc5,b=0x01000193;for(let i=0;i<text.length;i++){const code=text.charCodeAt(i);a=Math.imul(a^code,16777619);b=Math.imul(b^code,2246822519)^(b>>>13)}
35
38
  return "#" +(a>>>0).toString(36)+(b>>>0).toString(36)+ ":"+text.length}
36
39
  function groupInlineSummary(grid,query){const view=grid.view,columns=new Map(view.columns.map(column=>[column.id,column])),levels=groupLevelsOf(view,query);const rows=query.groupBy?.length?GRID_ROWS.order(view,query):gridQueryRows(view,query,columns,GRID_REPORTING.compare(view));let total=0;const build=(start,end,depth,parent)=>{const column=columns.get(levels[depth].column),groups=[];for(let offset=start;offset<end;){const value=cellValue(rows[offset].cells[column.id])??null,key=reportingGroupKey(gridScalar(value,column));let last=offset+1;while(last<end&&reportingGroupKey(gridScalar(rows[last].cells[column.id],column))===key)last++;const id=parent===null?key:groupInnerKey(parent,key);if(++total>10000||id.length>4096)throw new Error("CanopyX: inline grouping exceeds its metadata bounds.");const group={key:id,value,offset,count:last-offset,aggregates:groupAggregateValues(grid,rows,offset,last),...groupWorstCells(view,rows,offset,last)};if(depth+1<levels.length)group.groups=build(offset,last,depth+1,id);groups.push(group);offset=last}
37
40
  return groups};return{protocol:PROTOCOL,type:"gridSummary",view:view.id,revision:query.revision,query,matched:rows.length,groups:levels.length?build(0,rows.length,0,null):[],aggregates:groupAggregateValues(grid,rows)}}
@@ -56,8 +59,8 @@ const group=row.group,level=row.level,collapsed=this.collapsedGroups.has(group.k
56
59
  else{element.removeAttribute("aria-level");element.removeAttribute("aria-expanded")}
57
60
  element.style.height=this.rowH+"px";element.style.width=this.rowWidth+"px";element.style.setProperty("--cx-group-level",String(level-1));const priorButton=previous?.[0].cell.querySelector(".cx-grid-group-toggle"),button=priorButton||h("button","cx-grid-group-toggle");if(!priorButton){button.type="button";button.tabIndex=-1}
58
61
  if(button.disabled!==!!this.pendingQuery)button.disabled=!!this.pendingQuery;button.setAttribute("aria-expanded",String(!collapsed));button.setAttribute("aria-label",collapsed?this.labels.gridGroupExpand:this.labels.gridGroupCollapse);if(button.textContent!==(collapsed?"▸":"▾"))setText(button,collapsed?"▸":"▾");if(!priorButton)button.addEventListener("click",()=>{if(this.pendingQuery)return;try{this.setFocus(row,false);this.setGroupCollapsed(group.key,!this.collapsedGroups.has(group.key));this.setFocus(this.focused,true)}
59
- catch(error){this.emit("error",{error})}});const value=group.value===null?this.labels.gridGroupMissing:cellText(group.value,groupColumn,this.fmt),count=numberFormat(this.lang).format(group.count);const label=fill(this.labels.gridGroupHeading,{column:groupColumn.title,value,count}),cells=[];this.cols.forEach((column,index)=>{const cell=previous?.[index].cell||this.cell(element,index,column.width,column.kind);cells.push({cell,content:cell});if(index===0){const priorHeading=cell.querySelector(".cx-grid-group-label"),heading=priorHeading||h("span","cx-grid-group-label");const text=heading.querySelector(".cx-grid-group-text")||h("span","cx-grid-group-text"),badge=heading.querySelector(".cx-grid-group-count")||h("span","cx-grid-group-count");text.replaceChildren();if(levels.length>1){const name=h("span","cx-grid-group-column");setText(name,groupColumn.title);text.append(name,document.createTextNode(" "))}
60
- text.appendChild(document.createTextNode(value));setText(badge,count);if(!priorHeading)heading.append(text,badge);if(!priorButton)cell.append(button);this.paintGroupSelection(cell,group);if(!priorHeading)cell.append(heading);cell.title=label;this.paintHiddenAggregates(heading,group.aggregates,cell,column.id,label);return}
62
+ catch(error){this.emit("error",{error})}});const value=group.value===null?this.labels.gridGroupMissing:cellText(group.value,groupColumn,this.fmt),count=numberFormat(this.lang).format(group.count);const label=fill(this.view.reporting?.grouping?.headerTemplate||this.labels.gridGroupHeading,{column:groupColumn.title,value,count}),cells=[];this.cols.forEach((column,index)=>{const cell=previous?.[index].cell||this.cell(element,index,column.width,column.kind);cells.push({cell,content:cell});if(index===0){const priorHeading=cell.querySelector(".cx-grid-group-label"),heading=priorHeading||h("span","cx-grid-group-label");const text=heading.querySelector(".cx-grid-group-text")||h("span","cx-grid-group-text"),badge=heading.querySelector(".cx-grid-group-count")||h("span","cx-grid-group-count");text.replaceChildren();if(levels.length>1&&!this.view.reporting?.grouping?.headerTemplate){const name=h("span","cx-grid-group-column");setText(name,groupColumn.title);text.append(name,document.createTextNode(" "))}
63
+ text.appendChild(document.createTextNode(this.view.reporting?.grouping?.headerTemplate?label:value));setText(badge,count);badge.hidden=!!this.view.reporting?.grouping?.headerTemplate;if(!priorHeading)heading.append(text,badge);if(!priorButton)cell.append(button);this.paintGroupSelection(cell,group);if(!priorHeading)cell.append(heading);cell.title=label;this.paintHiddenAggregates(heading,group.aggregates,cell,column.id,label);return}
61
64
  const aggregates=(this.view.reporting.aggregates||[]).filter(item=>item.column===column.id);if(aggregates.length)this.paintAggregates(cell,column,aggregates,group.aggregates);else{cell.replaceChildren();if(Object.hasOwn(group.cells||{},column.id)){const options=column.presenter||this.view.reporting.presenters?.[column.id];if(options)gridCellRenderer(this,column,options)({id:group.key,cells:group.cells},cell);else setText(cell,cellText(group.cells[column.id],column,this.fmt))}}});let room=this.cols[0].renderWidth??this.cols[0].width;for(let index=1;index<cells.length&&!cells[index].cell.textContent;index++)room +=this.cols[index].renderWidth??this.cols[index].width;const heading=cells[0].cell.querySelector(".cx-grid-group-label");heading.style.maxWidth=Math.max(40,room-44 -(level-1)*16 -(this.view.reporting.selectionControls&&this.multi?22:0))+ "px";element._cells=cells;quietControls(element);this.paintGridHighlights(element,row)},paintGroupSelection(cell,group){if(!this.view.reporting.selectionControls||!this.multi)return;const previous=cell.querySelector(".cx-grid-group-select"),check=previous||h("input","cx-grid-row-select cx-grid-group-select");if(!previous){check.type="checkbox";check.tabIndex=-1}
62
65
  const state=this.groupSelection(group);check.checked=state===true;check.indeterminate=state==="mixed";check.disabled=!!this.pendingQuery;check.setAttribute("aria-label",fill(this.labels.gridSelectGroup,{group:group.value===null?this.labels.gridGroupMissing:String(group.value)}));if(!previous)check.addEventListener("click",event=>{event.preventDefault();event.stopPropagation();this.runReportingSelection(()=>this.selectRange(group.offset,group.offset+group.count-1,{selected:this.groupSelection(group)!==true,additive:true}))});if(!previous)cell.appendChild(check)},groupSelection(group){let selected=0,loaded=0;for(const[ordinal,record]of this.rowCache){if(ordinal<group.offset||ordinal>=group.offset+group.count)continue;loaded++;if(this.reportingRowSelected(record))selected++}
63
66
  if(this.querySelection)return selected===loaded?true:selected?"mixed":false;return selected&&selected===group.count?true:selected?"mixed":false},paintHiddenAggregates(target,values,cell=target,headingColumn=null,title=this.labels.gridSummary||this.view.label){const shown=new Set(this.cols.filter(column=>column.id!==headingColumn).map(column=>column.id)),parts=[],details=[];for(const column of this.columns){const aggregates=shown.has(column.id)?[]:(this.view.reporting.aggregates||[]).filter(item=>item.column===column.id);if(aggregates.length){const formatted=reportingAggregateParts(this,column,aggregates,values);if(formatted.text){parts.push(column.title+" "+formatted.text);details.push(column.title+"\n"+formatted.title)}}}
@@ -1,27 +1,27 @@
1
1
  /* Search hits and filter hits. Hosts restyle them with the tokens --cx-hit-search-bg,--cx-hit-filter-bg,--cx-hit-current-bg,
2
2
  * --cx-hit-current-ring and --cx-hit-text;the defaults derive from the tones,so both palettes and host themes follow. */
3
- mark.cx-hit{color:var(--cx-hit-text,var(--cx-text));background:var(--cx-hit-search-bg,color-mix(in srgb,var(--cx-tone-warning) var(--cx-hit-mix,28%),var(--cx-surface)));border-radius:var(--cx-size-2px);padding:0;box-decoration-break:clone;-webkit-box-decoration-break:clone;}
4
- mark.cx-hit-filter{background:var(--cx-hit-filter-bg,color-mix(in srgb,var(--cx-tone-info) var(--cx-hit-mix,24%),var(--cx-surface)));box-shadow:inset 0 calc(-1 * var(--cx-size-1px)) 0 color-mix(in srgb,var(--cx-tone-info) 70%,transparent);}
5
- mark.cx-hit-toned{background:color-mix(in srgb,var(--cx-hit-tone) var(--cx-hit-mix,24%),var(--cx-surface));box-shadow:inset 0 calc(-1 * var(--cx-size-1px)) 0 color-mix(in srgb,var(--cx-hit-tone) 75%,transparent);}
6
- mark.cx-hit-current{background:var(--cx-hit-current-bg,color-mix(in srgb,var(--cx-tone-warning) calc(var(--cx-hit-mix,28%) + 24%),var(--cx-surface)));outline:var(--cx-size-2px) solid var(--cx-hit-current-ring,var(--cx-accent));outline-offset:0;}
3
+ mark.cx-hit{color:var(--cx-hit-text,var(--hfx-color-text,light-dark(#16181c,#f2f3f5)));background:var(--cx-hit-search-bg,color-mix(in srgb,var(--hfx-color-status-warn-fg,light-dark(#8c5c05,#eeb640)) var(--cx-hit-mix,28%),var(--hfx-color-surface,light-dark(#ffffff,#16181c))));border-radius:var(--cx-size-2px);padding:0;box-decoration-break:clone;-webkit-box-decoration-break:clone;}
4
+ mark.cx-hit-filter{background:var(--cx-hit-filter-bg,color-mix(in srgb,var(--hfx-color-status-info-fg,light-dark(#2b5fc0,#74a2f7)) var(--cx-hit-mix,24%),var(--hfx-color-surface,light-dark(#ffffff,#16181c))));box-shadow:inset 0 calc(-1 * var(--cx-size-1px)) 0 color-mix(in srgb,var(--hfx-color-status-info-fg,light-dark(#2b5fc0,#74a2f7)) 70%,transparent);}
5
+ mark.cx-hit-toned{background:color-mix(in srgb,var(--cx-hit-tone) var(--cx-hit-mix,24%),var(--hfx-color-surface,light-dark(#ffffff,#16181c)));box-shadow:inset 0 calc(-1 * var(--cx-size-1px)) 0 color-mix(in srgb,var(--cx-hit-tone) 75%,transparent);}
6
+ mark.cx-hit-current{background:var(--cx-hit-current-bg,color-mix(in srgb,var(--hfx-color-status-warn-fg,light-dark(#8c5c05,#eeb640)) calc(var(--cx-hit-mix,28%) + 24%),var(--hfx-color-surface,light-dark(#ffffff,#16181c))));outline:var(--cx-size-2px) solid var(--cx-hit-current-ring,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)));outline-offset:0;}
7
7
  .cx-host[data-cx-theme="dark"] mark.cx-hit{--cx-hit-mix:36%;}
8
- .cx-host[data-cx-theme="dark"] mark.cx-hit-current{color:var(--cx-hit-text,var(--cx-surface));background:var(--cx-hit-current-bg,color-mix(in srgb,var(--cx-tone-warning) 88%,var(--cx-text)));}
8
+ .cx-host[data-cx-theme="dark"] mark.cx-hit-current{color:var(--cx-hit-text,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));background:var(--cx-hit-current-bg,color-mix(in srgb,var(--hfx-color-status-warn-fg,light-dark(#8c5c05,#eeb640)) 88%,var(--hfx-color-text,light-dark(#16181c,#f2f3f5))));}
9
9
  @media (prefers-color-scheme:dark){
10
10
  .cx-host[data-cx-theme="auto"] mark.cx-hit{--cx-hit-mix:36%;}
11
- .cx-host[data-cx-theme="auto"] mark.cx-hit-current{color:var(--cx-hit-text,var(--cx-surface));background:var(--cx-hit-current-bg,color-mix(in srgb,var(--cx-tone-warning) 88%,var(--cx-text)));}
11
+ .cx-host[data-cx-theme="auto"] mark.cx-hit-current{color:var(--cx-hit-text,var(--hfx-color-surface,light-dark(#ffffff,#16181c)));background:var(--cx-hit-current-bg,color-mix(in srgb,var(--hfx-color-status-warn-fg,light-dark(#8c5c05,#eeb640)) 88%,var(--hfx-color-text,light-dark(#16181c,#f2f3f5))));}
12
12
  }
13
- .cx-cell.cx-hit-cell{box-shadow:inset 0 0 0 var(--cx-size-2px) var(--cx-hit-current-ring,var(--cx-accent));}
14
- .cx-search .cx-matches{display:inline-flex;align-items:center;gap:var(--cx-size-2px);flex:none;margin-left:auto;color:var(--cx-muted);font-size:var(--cx-size-12d5px);font-variant-numeric:tabular-nums;white-space:nowrap;}
15
- .cx-toolbar > .cx-matches{display:inline-flex;align-items:center;gap:var(--cx-size-2px);color:var(--cx-muted);font-size:var(--cx-size-12d5px);}
13
+ .cx-cell.cx-hit-cell{box-shadow:inset 0 0 0 var(--cx-size-2px) var(--cx-hit-current-ring,var(--hfx-color-accent,light-dark(#11776f,#37c9b8)));}
14
+ .cx-search .cx-matches{display:inline-flex;align-items:center;gap:var(--cx-size-2px);flex:none;margin-left:auto;color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));font-size:var(--cx-size-12d5px);font-variant-numeric:tabular-nums;white-space:nowrap;}
15
+ .cx-toolbar > .cx-matches{display:inline-flex;align-items:center;gap:var(--cx-size-2px);color:var(--hfx-color-text-muted,light-dark(#626770,#8f949d));font-size:var(--cx-size-12d5px);}
16
16
  .cx-matches-count{padding:0 var(--cx-size-4px);}
17
- .cx-matches-step{display:inline-grid;place-items:center;width:var(--cx-size-24px);height:var(--cx-size-24px);padding:0;border:0;border-radius:var(--cx-radius-sm);background:transparent;color:var(--cx-text-2);cursor:pointer;}
18
- .cx-matches-step:hover:not(:disabled){background:var(--cx-hover-bg);color:var(--cx-text);}
17
+ .cx-matches-step{display:inline-grid;place-items:center;width:var(--cx-size-24px);height:var(--cx-size-24px);padding:0;border:0;border-radius:var(--hfx-radius-sm,4px);background:transparent;color:var(--hfx-color-text-secondary,light-dark(#4d525b,#b0b4bc));cursor:pointer;}
18
+ .cx-matches-step:hover:not(:disabled){background:var(--hfx-color-hover,light-dark(#f5f5f5,#232529));color:var(--hfx-color-text,light-dark(#16181c,#f2f3f5));}
19
19
  .cx-matches-step:disabled{opacity:.4;cursor:default;}
20
- .cx-matches-step:focus-visible{outline:var(--cx-size-2px) solid var(--cx-accent);outline-offset:0;}
20
+ .cx-matches-step:focus-visible{outline:var(--hfx-focus-width,2px) solid var(--hfx-color-focus-ring,light-dark(#02726a,#37c9b8));outline-offset:0;}
21
21
  .cx-search.cx-has-matches kbd{display:none;}
22
22
  .cx-phone .cx-matches-step{width:var(--cx-size-36px);height:var(--cx-size-36px);}
23
- .cx-matches-toggle::before{content:"";flex:none;width:var(--cx-size-14px);height:var(--cx-size-14px);border:var(--cx-size-1px) solid var(--cx-control-border);border-radius:var(--cx-radius-sm);background:var(--cx-surface);}
24
- .cx-matches-toggle.on::before{border-color:var(--cx-accent);background:var(--cx-accent) center/var(--cx-size-10px) no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 6.5 2.5 2.5 4.5-6' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");}
23
+ .cx-matches-toggle::before{content:"";flex:none;width:var(--cx-size-14px);height:var(--cx-size-14px);border:var(--cx-size-1px) solid var(--hfx-color-border-control,light-dark(#8a8f98,#6e737c));border-radius:var(--hfx-radius-sm,4px);background:var(--hfx-color-surface,light-dark(#ffffff,#16181c));}
24
+ .cx-matches-toggle.on::before{content:"✓" / "";display:inline-grid;place-items:center;border-color:var(--hfx-color-accent,light-dark(#11776f,#37c9b8));background:var(--hfx-color-accent,light-dark(#11776f,#37c9b8));color:var(--hfx-color-accent-contrast,light-dark(#ffffff,#0c0d10));font-weight:var(--hfx-weight-semibold,600);font-size:var(--hfx-type-caption-size,0.75rem);font-family:var(--hfx-font-sans,"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif);line-height:1;}
25
25
  @media (forced-colors:active){
26
26
  mark.cx-hit{forced-color-adjust:none;background:Mark !important;color:MarkText !important;}
27
27
  mark.cx-hit-filter,mark.cx-hit-toned{background:Canvas !important;color:CanvasText !important;box-shadow:none;text-decoration:underline var(--cx-size-2px) CanvasText;text-underline-offset:var(--cx-size-2px);}
@@ -1,4 +1,4 @@
1
- (function(global){"use strict";const installed=new WeakSet();const part={version:"f39423961654c1e2",install(context){if(installed.has(context.VIEW_MODES))return;const{VIEW_MODES,TreeGrid,h,setText,fill,numberFormat,foldText,cellText,cellValue,isCellObject,setAttr,toneOf,watchFlyout,densityRowHeight,MAX_PROTOCOL_INTEGER,LAYOUT_DENSITIES,plural,svgIcon}=context;const HL_ASCII=/^[\x00-\x7f]*$/, HL_MARKS = /[\u0300-\u036f]/, HL_SEPARATOR = /[\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]/;
1
+ (function(global){"use strict";const installed=new WeakSet();const part={version:"459b28e174406d32",install(context){if(installed.has(context.VIEW_MODES))return;const{toneVariable,VIEW_MODES,TreeGrid,h,setText,fill,numberFormat,foldText,cellText,cellValue,isCellObject,setAttr,toneOf,watchFlyout,densityRowHeight,layoutAnchor,layoutRows,layoutApplyTree,MAX_PROTOCOL_INTEGER,LAYOUT_DENSITIES,plural,svgIcon}=context;const HL_ASCII=/^[\x00-\x7f]*$/, HL_MARKS = /[\u0300-\u036f]/, HL_SEPARATOR = /[\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]/;
2
2
  const HL_BASE=new Map(Object.entries({"\u0142":"l","\u0141":"L","\u0111":"d","\u0110":"D","\u00f8":"o","\u00d8":"O","\u0127":"h","\u0126":"H","\u0167":"t","\u0166":"T","\u0131":"i"}));function hlBase(unit){let base=HL_BASE.get(unit);if(base===undefined){const parts=unit.normalize("NFD");base=parts.length>1&&/^[\u0300-\u036f]+$/.test(parts.slice(1)) ? parts.charAt(0) : unit;
3
3
  HL_BASE.set(unit,base)}
4
4
  return base}
@@ -23,7 +23,7 @@ function hlWhole(whole,record){try{return!!record?.cells&&VIEW_MODES.gridMatches
23
23
  const HL_SKIP="button,svg,input,select,textarea,script,style,mark,.cx-badge,.cx-hidden-fields,[aria-hidden=true],[contenteditable],[data-cx-no-highlight]";function hlHostDrawn(column){return!!column.render&&column.hostRenderer!==false}
24
24
  function hlUnmark(element){const marks=element._cxMarks;if(!marks)return;element._cxMarks=null;for(const entry of marks){if(entry.cell){entry.cell.classList.remove("cx-hit-cell");continue}
25
25
  for(const node of entry.added)node.remove();entry.node.data=entry.text}}
26
- function hlMark(kind,tone,current){const mark=h("mark","cx-hit cx-hit-"+kind +(current?" cx-hit-current":"")+(tone?" cx-hit-toned":""));if(tone)mark.style.setProperty("--cx-hit-tone","var(--cx-tone-"+tone+")");return mark}
26
+ function hlMark(kind,tone,current){const mark=h("mark","cx-hit cx-hit-"+kind +(current?" cx-hit-current":"")+(tone?" cx-hit-toned":""));if(tone)mark.style.setProperty("--cx-hit-tone",toneVariable(tone));return mark}
27
27
  function hlMarkCell(owner,cell,applicable,options,record,current){const nodes=[],walker=document.createTreeWalker(cell,NodeFilter.SHOW_TEXT);for(let node=walker.nextNode();node;node=walker.nextNode()){const skip=node.data.trim()?node.parentElement.closest(HL_SKIP):cell;if(!skip||!cell.contains(skip)&&skip!==cell)nodes.push(node)}
28
28
  if(!nodes.length)return 0;const whole=applicable.wholes.find(item=>hlWhole(item,record)),entries=owner._cxMarks||(owner._cxMarks=[]);let count=0;const wrap=(node,ranges)=>{const text=node.data,added=[];let cursor=ranges[0];const after=node.nextSibling,parent=node.parentNode;for(let i=0;i<ranges.length;i +=3){let end=ranges[i+1];while(end<text.length&&HL_MARKS.test(text.charAt(end)))end++;if(ranges[i]>cursor)added.push(document.createTextNode(text.slice(cursor,ranges[i])));const term=ranges[i+2],mark=hlMark(term.kind,term.tone,current===(whole?0:count));mark.appendChild(document.createTextNode(text.slice(ranges[i],end)));added.push(mark);cursor=end;if(!whole)count++}
29
29
  if(cursor<text.length)added.push(document.createTextNode(text.slice(cursor)));node.data=text.slice(0,ranges[0]);for(const item of added)parent.insertBefore(item,after);entries.push({node,text,added})};if(whole){const term={kind:"filter",tone:whole.tone};for(const node of nodes)wrap(node,[0,node.data.length,term]);return 1}