@knime/kds-table 0.8.0 → 2.9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @knime/kds-table
2
2
 
3
+ ## 2.9.0
4
+
5
+ ### Patch Changes
6
+
7
+ - f1a63fb: `@knime/kds-table` now versions in lockstep with the other `@knime/kds-*` packages (fixed version group): its version jumps from 0.x to match theirs, and every release of the design system ships a matching `@knime/kds-table` release. Update your dependency range (e.g. `^0.8.1` → `^2.8.2`) to keep receiving releases.
8
+ - Updated dependencies [216447a]
9
+ - @knime/kds-components@2.9.0
10
+ - @knime/kds-styles@2.9.0
11
+
12
+ ## 0.8.1
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [7e008e1]
17
+ - Updated dependencies [6fa993e]
18
+ - @knime/utils@2.0.0
19
+ - @knime/kds-components@2.7.0
20
+ - @knime/kds-styles@2.7.0
21
+
3
22
  ## 0.8.0
4
23
 
5
24
  ### Minor Changes
package/README.md CHANGED
@@ -35,14 +35,6 @@ pnpm run coverage # Generate coverage reports
35
35
 
36
36
  Coverage data is collected at the root level and merged with Storybook coverage for SonarQube reporting.
37
37
 
38
- ### Running security audit
39
-
40
- Security audits are run at the monorepo root:
41
-
42
- ```sh
43
- pnpm run audit
44
- ```
45
-
46
38
  ### TypeScript setup
47
39
 
48
40
  The package-level [tsconfig.json](tsconfig.json) is the source of truth for editor support and `pnpm run type-check`.
package/dist/index.js CHANGED
@@ -1093,6 +1093,24 @@ var dimension = {
1093
1093
  variable: "var(--kds-dimension-icon-1-25x)"
1094
1094
  }
1095
1095
  }
1096
+ },
1097
+ chart: {
1098
+ "line-width": {
1099
+ value: 1.5,
1100
+ unit: "px",
1101
+ css: {
1102
+ value: "1.5px",
1103
+ variable: "var(--kds-dimension-chart-line-width)"
1104
+ }
1105
+ },
1106
+ "segment-gap": {
1107
+ value: .75,
1108
+ unit: "px",
1109
+ css: {
1110
+ value: "0.75px",
1111
+ variable: "var(--kds-dimension-chart-segment-gap)"
1112
+ }
1113
+ }
1096
1114
  }
1097
1115
  };
1098
1116
  //#endregion
@@ -1548,8 +1566,8 @@ var oe = class extends b {
1548
1566
  }
1549
1567
  };
1550
1568
  //#endregion
1551
- //#region ../../node_modules/.pnpm/dompurify@3.4.11/node_modules/dompurify/dist/purify.es.mjs
1552
- /*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
1569
+ //#region ../../node_modules/.pnpm/dompurify@3.4.12/node_modules/dompurify/dist/purify.es.mjs
1570
+ /*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */
1553
1571
  function _arrayLikeToArray(r, a) {
1554
1572
  (null == a || a > r.length) && (a = r.length);
1555
1573
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
@@ -2188,6 +2206,7 @@ var svg = freeze([
2188
2206
  "direction",
2189
2207
  "display",
2190
2208
  "divisor",
2209
+ "dominant-baseline",
2191
2210
  "dur",
2192
2211
  "edgemode",
2193
2212
  "elevation",
@@ -2315,6 +2334,7 @@ var svg = freeze([
2315
2334
  "transform-origin",
2316
2335
  "text-anchor",
2317
2336
  "text-decoration",
2337
+ "text-orientation",
2318
2338
  "text-rendering",
2319
2339
  "textlength",
2320
2340
  "type",
@@ -2497,7 +2517,7 @@ var _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options)
2497
2517
  function createDOMPurify() {
2498
2518
  let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
2499
2519
  const DOMPurify = (root) => createDOMPurify(root);
2500
- DOMPurify.version = "3.4.11";
2520
+ DOMPurify.version = "3.4.12";
2501
2521
  DOMPurify.removed = [];
2502
2522
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
2503
2523
  DOMPurify.isSupported = false;
@@ -2964,6 +2984,7 @@ function createDOMPurify() {
2964
2984
  * @param root the in-place root to empty
2965
2985
  */
2966
2986
  const _neutralizeRoot = function _neutralizeRoot(root) {
2987
+ _neutralizeSubtree(root);
2967
2988
  const childNodes = getChildNodes(root);
2968
2989
  if (childNodes) {
2969
2990
  const snapshot = [];
@@ -3065,6 +3086,65 @@ function createDOMPurify() {
3065
3086
  }
3066
3087
  };
3067
3088
  /**
3089
+ * _neutralizePatchLinkage
3090
+ *
3091
+ * IN_PLACE entry pre-pass (declarative-partial-updates / streaming
3092
+ * hardening, https://github.com/WICG/declarative-partial-updates).
3093
+ *
3094
+ * The main walk strips patch linkage (`for`/`patchsrc`) and removes range
3095
+ * markers (PIs / markup comments) node-by-node, in document order, AS it
3096
+ * reaches each node. On a live in-place root that leaves a window: from the
3097
+ * moment the root is connected until the walk arrives at a given node, that
3098
+ * node's linkage is live. A patch applied on connection/stream can fire as
3099
+ * a microtask during the walk and inject or teleport an unsanitized DOM
3100
+ * range into a region the iterator has already passed and will not revisit,
3101
+ * so the post-return "tree is sanitized" contract is violated. Sweep the
3102
+ * whole tree once up front and sever every linkage before the walk begins,
3103
+ * closing that window.
3104
+ *
3105
+ * This CANNOT undo a patch that already fired before sanitize ran — that is
3106
+ * the irreducible "do not IN_PLACE a live-connected attacker tree" caveat —
3107
+ * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML
3108
+ * to group with the rest of the declarative-partial-updates handling and
3109
+ * stay overridable, consistent with the codebase.
3110
+ *
3111
+ * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a
3112
+ * clobbered root cannot defeat the sweep of its non-clobbered descendants.
3113
+ *
3114
+ * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe
3115
+ * .html Q1): this mirrors the existing policy of keeping `for` on
3116
+ * <label>/<output>. If the shipping feature can drive a patch through a
3117
+ * surviving `for`-on-label/output + `id` pair, this pre-pass and the
3118
+ * attribute check at _isBasicCustomElement's caller must additionally drop
3119
+ * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.
3120
+ *
3121
+ * @param root the in-place root to sweep
3122
+ */
3123
+ const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
3124
+ if (!SAFE_FOR_XML) return;
3125
+ const stack = [root];
3126
+ while (stack.length > 0) {
3127
+ const node = stack.pop();
3128
+ const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
3129
+ if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
3130
+ try {
3131
+ remove(node);
3132
+ } catch (_) {}
3133
+ continue;
3134
+ }
3135
+ if (nodeType === NODE_TYPE.element) {
3136
+ const element = node;
3137
+ const lcTag = transformCaseFunc(getNodeName ? getNodeName(node) : node.nodeName);
3138
+ try {
3139
+ if (element.hasAttribute && element.hasAttribute("patchsrc")) element.removeAttribute("patchsrc");
3140
+ if (element.hasAttribute && element.hasAttribute("for") && lcTag !== "label" && lcTag !== "output") element.removeAttribute("for");
3141
+ } catch (_) {}
3142
+ }
3143
+ const childNodes = getChildNodes(node);
3144
+ if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
3145
+ }
3146
+ };
3147
+ /**
3068
3148
  * _initDocument
3069
3149
  *
3070
3150
  * @param dirty - a string of dirty markup
@@ -3232,9 +3312,15 @@ function createDOMPurify() {
3232
3312
  /**
3233
3313
  * Handle a node whose tag is forbidden or not allowlisted: keep
3234
3314
  * allowed custom elements (false return exits _sanitizeElements
3235
- * early - namespace/fallback checks and the afterSanitizeElements
3236
- * hook are intentionally skipped for kept custom elements), else
3237
- * hoist content per KEEP_CONTENT and remove.
3315
+ * early - the namespace and fallback-tag removal checks are
3316
+ * intentionally skipped for kept custom elements), else hoist
3317
+ * content per KEEP_CONTENT and remove.
3318
+ *
3319
+ * A kept custom element is the ONLY case in which this function
3320
+ * returns false, so the caller uses that return value to run the
3321
+ * afterSanitizeElements hook on the kept element and keep the
3322
+ * element-hook lifecycle consistent with normal allowlisted
3323
+ * elements (GHSA-c2j3-45gr-mqc4).
3238
3324
  *
3239
3325
  * @param currentNode the disallowed node
3240
3326
  * @param tagName the node's transformCaseFunc'd tag name
@@ -3268,8 +3354,9 @@ function createDOMPurify() {
3268
3354
  * @param currentNode to check for permission to exist
3269
3355
  * @return true if node was killed, false if left alive
3270
3356
  */
3271
- const _sanitizeElements = function _sanitizeElements(currentNode) {
3357
+ const _sanitizeElements = function _sanitizeElements(currentNode, root) {
3272
3358
  _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
3359
+ if (currentNode !== root && getParentNode(currentNode) === null) return true;
3273
3360
  if (_isClobbered(currentNode)) {
3274
3361
  _forceRemove(currentNode);
3275
3362
  return true;
@@ -3279,11 +3366,16 @@ function createDOMPurify() {
3279
3366
  tagName,
3280
3367
  allowedTags: ALLOWED_TAGS
3281
3368
  });
3369
+ if (currentNode !== root && getParentNode(currentNode) === null) return true;
3282
3370
  if (_isUnsafeNode(currentNode, tagName)) {
3283
3371
  _forceRemove(currentNode);
3284
3372
  return true;
3285
3373
  }
3286
- if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) return _sanitizeDisallowedNode(currentNode, tagName);
3374
+ if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
3375
+ const removed = _sanitizeDisallowedNode(currentNode, tagName);
3376
+ if (removed === false) _executeHooks(hooks.afterSanitizeElements, currentNode, null);
3377
+ return removed;
3378
+ }
3287
3379
  if ((getNodeType ? getNodeType(currentNode) : currentNode.nodeType) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
3288
3380
  _forceRemove(currentNode);
3289
3381
  return true;
@@ -3312,6 +3404,8 @@ function createDOMPurify() {
3312
3404
  */
3313
3405
  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
3314
3406
  if (FORBID_ATTR[lcName]) return false;
3407
+ if (SAFE_FOR_XML && lcName === "patchsrc") return false;
3408
+ if (SAFE_FOR_XML && lcName === "for" && lcTag !== "label" && lcTag !== "output") return false;
3315
3409
  if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) return false;
3316
3410
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
3317
3411
  if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName));
@@ -3465,7 +3559,7 @@ function createDOMPurify() {
3465
3559
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
3466
3560
  while (shadowNode = shadowIterator.nextNode()) {
3467
3561
  _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
3468
- _sanitizeElements(shadowNode);
3562
+ _sanitizeElements(shadowNode, fragment);
3469
3563
  _sanitizeAttributes(shadowNode);
3470
3564
  if (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);
3471
3565
  if ((getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType) === NODE_TYPE.element) {
@@ -3559,12 +3653,19 @@ function createDOMPurify() {
3559
3653
  DOMPurify.removed = [];
3560
3654
  const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
3561
3655
  if (inPlace) {
3656
+ _neutralizePatchLinkage(dirty);
3562
3657
  const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;
3563
3658
  if (typeof nn === "string") {
3564
3659
  const tagName = transformCaseFunc(nn);
3565
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
3660
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
3661
+ _neutralizeRoot(dirty);
3662
+ throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
3663
+ }
3664
+ }
3665
+ if (_isClobbered(dirty)) {
3666
+ _neutralizeRoot(dirty);
3667
+ throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
3566
3668
  }
3567
- if (_isClobbered(dirty)) throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
3568
3669
  try {
3569
3670
  _sanitizeAttachedShadowRoots(dirty);
3570
3671
  } catch (error) {
@@ -3584,15 +3685,21 @@ function createDOMPurify() {
3584
3685
  if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
3585
3686
  }
3586
3687
  if (body && FORCE_BODY) _forceRemove(body.firstChild);
3587
- const nodeIterator = _createNodeIterator(inPlace ? dirty : body);
3688
+ const walkRoot = inPlace ? dirty : body;
3689
+ const nodeIterator = _createNodeIterator(walkRoot);
3588
3690
  try {
3589
3691
  while (currentNode = nodeIterator.nextNode()) {
3590
- _sanitizeElements(currentNode);
3692
+ _sanitizeElements(currentNode, walkRoot);
3591
3693
  _sanitizeAttributes(currentNode);
3592
3694
  if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
3593
3695
  }
3594
3696
  } catch (error) {
3595
- if (inPlace) _neutralizeRoot(dirty);
3697
+ if (inPlace) {
3698
+ _neutralizeRoot(dirty);
3699
+ arrayForEach(DOMPurify.removed, (entry) => {
3700
+ if (entry.element) _neutralizeSubtree(entry.element);
3701
+ });
3702
+ }
3596
3703
  throw error;
3597
3704
  }
3598
3705
  if (inPlace) {