@knime/kds-components 2.8.0 → 2.8.1

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,12 @@
1
1
  # @knime/kds-components
2
2
 
3
+ ## 2.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 33e87f5: KdsEmptyState: Action buttons always use small size instead of medium.
8
+ - @knime/kds-styles@2.8.1
9
+
3
10
  ## 2.8.0
4
11
 
5
12
  ### Patch Changes
package/dist/index.css CHANGED
@@ -1655,7 +1655,7 @@ li {
1655
1655
  }
1656
1656
  }
1657
1657
 
1658
- .kds-empty-state[data-v-2528c8c7] {
1658
+ .kds-empty-state[data-v-cf1ab519] {
1659
1659
  display: flex;
1660
1660
  flex-direction: column;
1661
1661
  gap: var(--kds-spacing-container-0-5x);
@@ -1663,19 +1663,19 @@ li {
1663
1663
  max-width: 280px;
1664
1664
  padding: var(--kds-spacing-container-0-5x);
1665
1665
  }
1666
- .kds-empty-state-headline[data-v-2528c8c7] {
1666
+ .kds-empty-state-headline[data-v-cf1ab519] {
1667
1667
  margin: 0;
1668
1668
  font: var(--kds-font-base-title-small);
1669
1669
  color: var(--kds-color-text-and-icon-muted);
1670
1670
  text-align: center;
1671
1671
  }
1672
- .kds-empty-state-description[data-v-2528c8c7] {
1672
+ .kds-empty-state-description[data-v-cf1ab519] {
1673
1673
  margin: 0;
1674
1674
  font: var(--kds-font-base-body-small);
1675
1675
  color: var(--kds-color-text-and-icon-muted);
1676
1676
  text-align: center;
1677
1677
  }
1678
- .kds-empty-state-action[data-v-2528c8c7] {
1678
+ .kds-empty-state-action[data-v-cf1ab519] {
1679
1679
  display: flex;
1680
1680
  flex-wrap: wrap;
1681
1681
  gap: var(--kds-spacing-container-0-5x);
@@ -1685,8 +1685,8 @@ li {
1685
1685
  margin-top: var(--kds-spacing-container-0-12x);
1686
1686
  }
1687
1687
  .kds-empty-state.disabled {
1688
- & .kds-empty-state-headline[data-v-2528c8c7],
1689
- & .kds-empty-state-description[data-v-2528c8c7] {
1688
+ & .kds-empty-state-headline[data-v-cf1ab519],
1689
+ & .kds-empty-state-description[data-v-cf1ab519] {
1690
1690
  color: var(--kds-color-text-and-icon-disabled);
1691
1691
  }
1692
1692
  }
package/dist/index.js CHANGED
@@ -6884,8 +6884,8 @@ function prettyBytes(number, options) {
6884
6884
  return applyFixedWidth(result, options.fixedWidth);
6885
6885
  }
6886
6886
  //#endregion
6887
- //#region ../../node_modules/.pnpm/dompurify@3.4.11/node_modules/dompurify/dist/purify.es.mjs
6888
- /*! @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 */
6887
+ //#region ../../node_modules/.pnpm/dompurify@3.4.12/node_modules/dompurify/dist/purify.es.mjs
6888
+ /*! @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 */
6889
6889
  function _arrayLikeToArray(r, a) {
6890
6890
  (null == a || a > r.length) && (a = r.length);
6891
6891
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
@@ -7524,6 +7524,7 @@ var svg = freeze([
7524
7524
  "direction",
7525
7525
  "display",
7526
7526
  "divisor",
7527
+ "dominant-baseline",
7527
7528
  "dur",
7528
7529
  "edgemode",
7529
7530
  "elevation",
@@ -7651,6 +7652,7 @@ var svg = freeze([
7651
7652
  "transform-origin",
7652
7653
  "text-anchor",
7653
7654
  "text-decoration",
7655
+ "text-orientation",
7654
7656
  "text-rendering",
7655
7657
  "textlength",
7656
7658
  "type",
@@ -7833,7 +7835,7 @@ var _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options)
7833
7835
  function createDOMPurify() {
7834
7836
  let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
7835
7837
  const DOMPurify = (root) => createDOMPurify(root);
7836
- DOMPurify.version = "3.4.11";
7838
+ DOMPurify.version = "3.4.12";
7837
7839
  DOMPurify.removed = [];
7838
7840
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
7839
7841
  DOMPurify.isSupported = false;
@@ -8300,6 +8302,7 @@ function createDOMPurify() {
8300
8302
  * @param root the in-place root to empty
8301
8303
  */
8302
8304
  const _neutralizeRoot = function _neutralizeRoot(root) {
8305
+ _neutralizeSubtree(root);
8303
8306
  const childNodes = getChildNodes(root);
8304
8307
  if (childNodes) {
8305
8308
  const snapshot = [];
@@ -8401,6 +8404,65 @@ function createDOMPurify() {
8401
8404
  }
8402
8405
  };
8403
8406
  /**
8407
+ * _neutralizePatchLinkage
8408
+ *
8409
+ * IN_PLACE entry pre-pass (declarative-partial-updates / streaming
8410
+ * hardening, https://github.com/WICG/declarative-partial-updates).
8411
+ *
8412
+ * The main walk strips patch linkage (`for`/`patchsrc`) and removes range
8413
+ * markers (PIs / markup comments) node-by-node, in document order, AS it
8414
+ * reaches each node. On a live in-place root that leaves a window: from the
8415
+ * moment the root is connected until the walk arrives at a given node, that
8416
+ * node's linkage is live. A patch applied on connection/stream can fire as
8417
+ * a microtask during the walk and inject or teleport an unsanitized DOM
8418
+ * range into a region the iterator has already passed and will not revisit,
8419
+ * so the post-return "tree is sanitized" contract is violated. Sweep the
8420
+ * whole tree once up front and sever every linkage before the walk begins,
8421
+ * closing that window.
8422
+ *
8423
+ * This CANNOT undo a patch that already fired before sanitize ran — that is
8424
+ * the irreducible "do not IN_PLACE a live-connected attacker tree" caveat —
8425
+ * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML
8426
+ * to group with the rest of the declarative-partial-updates handling and
8427
+ * stay overridable, consistent with the codebase.
8428
+ *
8429
+ * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a
8430
+ * clobbered root cannot defeat the sweep of its non-clobbered descendants.
8431
+ *
8432
+ * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe
8433
+ * .html Q1): this mirrors the existing policy of keeping `for` on
8434
+ * <label>/<output>. If the shipping feature can drive a patch through a
8435
+ * surviving `for`-on-label/output + `id` pair, this pre-pass and the
8436
+ * attribute check at _isBasicCustomElement's caller must additionally drop
8437
+ * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.
8438
+ *
8439
+ * @param root the in-place root to sweep
8440
+ */
8441
+ const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
8442
+ if (!SAFE_FOR_XML) return;
8443
+ const stack = [root];
8444
+ while (stack.length > 0) {
8445
+ const node = stack.pop();
8446
+ const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
8447
+ if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
8448
+ try {
8449
+ remove(node);
8450
+ } catch (_) {}
8451
+ continue;
8452
+ }
8453
+ if (nodeType === NODE_TYPE.element) {
8454
+ const element = node;
8455
+ const lcTag = transformCaseFunc(getNodeName ? getNodeName(node) : node.nodeName);
8456
+ try {
8457
+ if (element.hasAttribute && element.hasAttribute("patchsrc")) element.removeAttribute("patchsrc");
8458
+ if (element.hasAttribute && element.hasAttribute("for") && lcTag !== "label" && lcTag !== "output") element.removeAttribute("for");
8459
+ } catch (_) {}
8460
+ }
8461
+ const childNodes = getChildNodes(node);
8462
+ if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
8463
+ }
8464
+ };
8465
+ /**
8404
8466
  * _initDocument
8405
8467
  *
8406
8468
  * @param dirty - a string of dirty markup
@@ -8568,9 +8630,15 @@ function createDOMPurify() {
8568
8630
  /**
8569
8631
  * Handle a node whose tag is forbidden or not allowlisted: keep
8570
8632
  * allowed custom elements (false return exits _sanitizeElements
8571
- * early - namespace/fallback checks and the afterSanitizeElements
8572
- * hook are intentionally skipped for kept custom elements), else
8573
- * hoist content per KEEP_CONTENT and remove.
8633
+ * early - the namespace and fallback-tag removal checks are
8634
+ * intentionally skipped for kept custom elements), else hoist
8635
+ * content per KEEP_CONTENT and remove.
8636
+ *
8637
+ * A kept custom element is the ONLY case in which this function
8638
+ * returns false, so the caller uses that return value to run the
8639
+ * afterSanitizeElements hook on the kept element and keep the
8640
+ * element-hook lifecycle consistent with normal allowlisted
8641
+ * elements (GHSA-c2j3-45gr-mqc4).
8574
8642
  *
8575
8643
  * @param currentNode the disallowed node
8576
8644
  * @param tagName the node's transformCaseFunc'd tag name
@@ -8604,8 +8672,9 @@ function createDOMPurify() {
8604
8672
  * @param currentNode to check for permission to exist
8605
8673
  * @return true if node was killed, false if left alive
8606
8674
  */
8607
- const _sanitizeElements = function _sanitizeElements(currentNode) {
8675
+ const _sanitizeElements = function _sanitizeElements(currentNode, root) {
8608
8676
  _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
8677
+ if (currentNode !== root && getParentNode(currentNode) === null) return true;
8609
8678
  if (_isClobbered(currentNode)) {
8610
8679
  _forceRemove(currentNode);
8611
8680
  return true;
@@ -8615,11 +8684,16 @@ function createDOMPurify() {
8615
8684
  tagName,
8616
8685
  allowedTags: ALLOWED_TAGS
8617
8686
  });
8687
+ if (currentNode !== root && getParentNode(currentNode) === null) return true;
8618
8688
  if (_isUnsafeNode(currentNode, tagName)) {
8619
8689
  _forceRemove(currentNode);
8620
8690
  return true;
8621
8691
  }
8622
- if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) return _sanitizeDisallowedNode(currentNode, tagName);
8692
+ if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
8693
+ const removed = _sanitizeDisallowedNode(currentNode, tagName);
8694
+ if (removed === false) _executeHooks(hooks.afterSanitizeElements, currentNode, null);
8695
+ return removed;
8696
+ }
8623
8697
  if ((getNodeType ? getNodeType(currentNode) : currentNode.nodeType) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
8624
8698
  _forceRemove(currentNode);
8625
8699
  return true;
@@ -8648,6 +8722,8 @@ function createDOMPurify() {
8648
8722
  */
8649
8723
  const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
8650
8724
  if (FORBID_ATTR[lcName]) return false;
8725
+ if (SAFE_FOR_XML && lcName === "patchsrc") return false;
8726
+ if (SAFE_FOR_XML && lcName === "for" && lcTag !== "label" && lcTag !== "output") return false;
8651
8727
  if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) return false;
8652
8728
  const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
8653
8729
  if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName));
@@ -8801,7 +8877,7 @@ function createDOMPurify() {
8801
8877
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
8802
8878
  while (shadowNode = shadowIterator.nextNode()) {
8803
8879
  _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
8804
- _sanitizeElements(shadowNode);
8880
+ _sanitizeElements(shadowNode, fragment);
8805
8881
  _sanitizeAttributes(shadowNode);
8806
8882
  if (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);
8807
8883
  if ((getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType) === NODE_TYPE.element) {
@@ -8895,12 +8971,19 @@ function createDOMPurify() {
8895
8971
  DOMPurify.removed = [];
8896
8972
  const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
8897
8973
  if (inPlace) {
8974
+ _neutralizePatchLinkage(dirty);
8898
8975
  const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;
8899
8976
  if (typeof nn === "string") {
8900
8977
  const tagName = transformCaseFunc(nn);
8901
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
8978
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
8979
+ _neutralizeRoot(dirty);
8980
+ throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
8981
+ }
8982
+ }
8983
+ if (_isClobbered(dirty)) {
8984
+ _neutralizeRoot(dirty);
8985
+ throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
8902
8986
  }
8903
- if (_isClobbered(dirty)) throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
8904
8987
  try {
8905
8988
  _sanitizeAttachedShadowRoots(dirty);
8906
8989
  } catch (error) {
@@ -8920,15 +9003,21 @@ function createDOMPurify() {
8920
9003
  if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
8921
9004
  }
8922
9005
  if (body && FORCE_BODY) _forceRemove(body.firstChild);
8923
- const nodeIterator = _createNodeIterator(inPlace ? dirty : body);
9006
+ const walkRoot = inPlace ? dirty : body;
9007
+ const nodeIterator = _createNodeIterator(walkRoot);
8924
9008
  try {
8925
9009
  while (currentNode = nodeIterator.nextNode()) {
8926
- _sanitizeElements(currentNode);
9010
+ _sanitizeElements(currentNode, walkRoot);
8927
9011
  _sanitizeAttributes(currentNode);
8928
9012
  if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
8929
9013
  }
8930
9014
  } catch (error) {
8931
- if (inPlace) _neutralizeRoot(dirty);
9015
+ if (inPlace) {
9016
+ _neutralizeRoot(dirty);
9017
+ arrayForEach(DOMPurify.removed, (entry) => {
9018
+ if (entry.element) _neutralizeSubtree(entry.element);
9019
+ });
9020
+ }
8932
9021
  throw error;
8933
9022
  }
8934
9023
  if (inPlace) {
@@ -12348,11 +12437,11 @@ var KdsEmptyState_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
12348
12437
  })) : createCommentVNode("", true),
12349
12438
  createElementVNode("p", _hoisted_2$32, toDisplayString(props.headline), 1),
12350
12439
  props.description ? (openBlock(), createElementBlock("p", _hoisted_3$24, toDisplayString(props.description), 1)) : createCommentVNode("", true),
12351
- resolvedPrimaryAction.value ? (openBlock(), createElementBlock("div", _hoisted_4$22, [createVNode(ActionButton_default, mergeProps(resolvedPrimaryAction.value, { size: "medium" }), null, 16), resolvedSecondaryAction.value ? (openBlock(), createBlock(ActionButton_default, mergeProps({ key: 0 }, resolvedSecondaryAction.value, { size: "medium" }), null, 16)) : createCommentVNode("", true)])) : createCommentVNode("", true)
12440
+ resolvedPrimaryAction.value ? (openBlock(), createElementBlock("div", _hoisted_4$22, [createVNode(ActionButton_default, mergeProps(resolvedPrimaryAction.value, { size: "small" }), null, 16), resolvedSecondaryAction.value ? (openBlock(), createBlock(ActionButton_default, mergeProps({ key: 0 }, resolvedSecondaryAction.value, { size: "small" }), null, 16)) : createCommentVNode("", true)])) : createCommentVNode("", true)
12352
12441
  ], 10, _hoisted_1$53);
12353
12442
  };
12354
12443
  }
12355
- }), [["__scopeId", "data-v-2528c8c7"]]);
12444
+ }), [["__scopeId", "data-v-cf1ab519"]]);
12356
12445
  //#endregion
12357
12446
  //#region src/components/feedback/InlineMessage/KdsInlineMessage.vue?vue&type=script&setup=true&lang.ts
12358
12447
  var _hoisted_1$52 = ["role"];