@uniformdev/next-app-router 20.72.2-alpha.3 → 20.72.3-alpha.2

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/dist/component.js CHANGED
@@ -899,11 +899,11 @@ var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
899
899
  var ATTRIBUTE_PARAMETER_TYPE = "data-uniform-parameter-type";
900
900
 
901
901
  // src/components/UniformRichText.tsx
902
- var import_richtext6 = require("@uniformdev/richtext");
902
+ var import_richtext5 = require("@uniformdev/richtext");
903
903
  var import_react12 = __toESM(require("react"));
904
904
 
905
905
  // src/components/UniformRichTextNode.tsx
906
- var import_richtext5 = require("@uniformdev/richtext");
906
+ var import_richtext4 = require("@uniformdev/richtext");
907
907
  var import_react11 = __toESM(require("react"));
908
908
 
909
909
  // src/components/nodes/AssetRichTextNode.tsx
@@ -941,11 +941,11 @@ var LinebreakRichTextNode = () => {
941
941
  };
942
942
 
943
943
  // src/components/nodes/LinkRichTextNode.tsx
944
- var import_richtext = require("@uniformdev/richtext");
944
+ var import_canvas_react = require("@uniformdev/canvas-react");
945
945
  var import_react4 = __toESM(require("react"));
946
946
  var LinkRichTextNode = ({ children, node }) => {
947
947
  const { link } = node;
948
- return /* @__PURE__ */ import_react4.default.createElement("a", { href: (0, import_richtext.linkParamValueToHref)(link) }, children);
948
+ return /* @__PURE__ */ import_react4.default.createElement("a", { ...(0, import_canvas_react.linkParamValueToAnchorProps)(link) }, children);
949
949
  };
950
950
 
951
951
  // src/components/nodes/ListItemRichTextNode.tsx
@@ -964,26 +964,26 @@ var ListRichTextNode = ({ children, node }) => {
964
964
  };
965
965
 
966
966
  // src/components/nodes/ParagraphRichTextNode.tsx
967
- var import_richtext2 = require("@uniformdev/richtext");
967
+ var import_richtext = require("@uniformdev/richtext");
968
968
  var import_react7 = __toESM(require("react"));
969
969
  var ParagraphRichTextNode = ({ children, node }) => {
970
970
  const { format, direction } = node;
971
971
  return /* @__PURE__ */ import_react7.default.createElement(
972
972
  "p",
973
973
  {
974
- dir: (0, import_richtext2.isPureDirection)(direction) ? direction : void 0,
975
- style: (0, import_richtext2.isPureTextAlign)(format) ? { textAlign: format } : void 0
974
+ dir: (0, import_richtext.isPureDirection)(direction) ? direction : void 0,
975
+ style: (0, import_richtext.isPureTextAlign)(format) ? { textAlign: format } : void 0
976
976
  },
977
977
  children
978
978
  );
979
979
  };
980
980
 
981
981
  // src/components/nodes/TableCellRichTextNode.tsx
982
- var import_richtext3 = require("@uniformdev/richtext");
982
+ var import_richtext2 = require("@uniformdev/richtext");
983
983
  var import_react8 = __toESM(require("react"));
984
984
  var TableCellRichTextNode = ({ children, node }) => {
985
985
  const { headerState } = node;
986
- const TableCellTag = (0, import_richtext3.getRichTextTagFromTableCellHeaderState)(headerState);
986
+ const TableCellTag = (0, import_richtext2.getRichTextTagFromTableCellHeaderState)(headerState);
987
987
  return /* @__PURE__ */ import_react8.default.createElement(TableCellTag, null, children);
988
988
  };
989
989
 
@@ -994,18 +994,18 @@ var TabRichTextNode = () => {
994
994
  };
995
995
 
996
996
  // src/components/nodes/TextRichTextNode.tsx
997
- var import_richtext4 = require("@uniformdev/richtext");
997
+ var import_richtext3 = require("@uniformdev/richtext");
998
998
  var import_react10 = __toESM(require("react"));
999
999
  var TextRichTextNode = ({ node }) => {
1000
1000
  const { text, format } = node;
1001
- const tags = (0, import_richtext4.getRichTextTagsFromTextFormat)(format);
1001
+ const tags = (0, import_richtext3.getRichTextTagsFromTextFormat)(format);
1002
1002
  return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, tags.length > 0 ? tags.reduceRight((children, Tag) => /* @__PURE__ */ import_react10.default.createElement(Tag, null, children), text) : text);
1003
1003
  };
1004
1004
 
1005
1005
  // src/components/UniformRichTextNode.tsx
1006
1006
  function UniformRichTextNode({ node, ...props }) {
1007
1007
  var _a;
1008
- if (!(0, import_richtext5.isRichTextNode)(node)) return null;
1008
+ if (!(0, import_richtext4.isRichTextNode)(node)) return null;
1009
1009
  let NodeRenderer = (_a = props.resolveRichTextRenderer) == null ? void 0 : _a.call(props, node);
1010
1010
  if (typeof NodeRenderer === "undefined") {
1011
1011
  NodeRenderer = resolveRichTextDefaultRenderer(node);
@@ -1059,8 +1059,8 @@ var UniformRichText = import_react12.default.forwardRef(function UniformRichText
1059
1059
  }
1060
1060
  const computedPlaceholder = typeof placeholder === "function" ? placeholder({ id: parameter.parameterId }) : placeholder;
1061
1061
  const value = parameter.value;
1062
- if (!value || !(0, import_richtext6.isRichTextValue)(value)) return null;
1063
- if (!isContextualEditing && (0, import_richtext6.isRichTextValueConsideredEmpty)(value)) return null;
1062
+ if (!value || !(0, import_richtext5.isRichTextValue)(value)) return null;
1063
+ if (!isContextualEditing && (0, import_richtext5.isRichTextValueConsideredEmpty)(value)) return null;
1064
1064
  return Tag === null ? /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react12.default.createElement(
1065
1065
  Tag,
1066
1066
  {
@@ -1072,7 +1072,7 @@ var UniformRichText = import_react12.default.forwardRef(function UniformRichText
1072
1072
  [ATTRIBUTE_PARAMETER_TYPE]: "richText"
1073
1073
  } : {}
1074
1074
  },
1075
- (0, import_richtext6.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react12.default.createElement("p", null, /* @__PURE__ */ import_react12.default.createElement("i", null, computedPlaceholder)) : /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
1075
+ (0, import_richtext5.isRichTextValueConsideredEmpty)(value) ? /* @__PURE__ */ import_react12.default.createElement("p", null, /* @__PURE__ */ import_react12.default.createElement("i", null, computedPlaceholder)) : /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer })
1076
1076
  );
1077
1077
  });
1078
1078
 
@@ -929,11 +929,11 @@ var LinebreakRichTextNode = () => {
929
929
  };
930
930
 
931
931
  // src/components/nodes/LinkRichTextNode.tsx
932
- import { linkParamValueToHref } from "@uniformdev/richtext";
932
+ import { linkParamValueToAnchorProps } from "@uniformdev/canvas-react";
933
933
  import React4 from "react";
934
934
  var LinkRichTextNode = ({ children, node }) => {
935
935
  const { link } = node;
936
- return /* @__PURE__ */ React4.createElement("a", { href: linkParamValueToHref(link) }, children);
936
+ return /* @__PURE__ */ React4.createElement("a", { ...linkParamValueToAnchorProps(link) }, children);
937
937
  };
938
938
 
939
939
  // src/components/nodes/ListItemRichTextNode.tsx
package/dist/handler.js CHANGED
@@ -2419,6 +2419,38 @@ var _Route = class _Route2 {
2419
2419
  }
2420
2420
  return segment.slice(_Route2.dynamicSegmentPrefix.length);
2421
2421
  }
2422
+ /**
2423
+ * Splits a path into the path portion and an optional `#fragment`
2424
+ * (everything after the first `#`).
2425
+ *
2426
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
2427
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
2428
+ * delimiter is the first `#` that falls outside of a variable expression.
2429
+ */
2430
+ static splitFragment(path) {
2431
+ let fragmentIndex = -1;
2432
+ let length = 0;
2433
+ parseVariableExpression(path, (token, type) => {
2434
+ if (type === "variable") {
2435
+ length += createVariableReference(token).length;
2436
+ return;
2437
+ }
2438
+ const hashOffset = token.indexOf("#");
2439
+ if (hashOffset === -1) {
2440
+ length += token.length;
2441
+ return;
2442
+ }
2443
+ fragmentIndex = length + hashOffset;
2444
+ return false;
2445
+ });
2446
+ if (fragmentIndex === -1) {
2447
+ return { path, fragment: void 0 };
2448
+ }
2449
+ return {
2450
+ path: path.slice(0, fragmentIndex),
2451
+ fragment: path.slice(fragmentIndex + 1)
2452
+ };
2453
+ }
2422
2454
  };
2423
2455
  _routeInfo = /* @__PURE__ */ new WeakMap();
2424
2456
  _Route_static = /* @__PURE__ */ new WeakSet();
package/dist/handler.mjs CHANGED
@@ -2404,6 +2404,38 @@ var _Route = class _Route2 {
2404
2404
  }
2405
2405
  return segment.slice(_Route2.dynamicSegmentPrefix.length);
2406
2406
  }
2407
+ /**
2408
+ * Splits a path into the path portion and an optional `#fragment`
2409
+ * (everything after the first `#`).
2410
+ *
2411
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
2412
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
2413
+ * delimiter is the first `#` that falls outside of a variable expression.
2414
+ */
2415
+ static splitFragment(path) {
2416
+ let fragmentIndex = -1;
2417
+ let length = 0;
2418
+ parseVariableExpression(path, (token, type) => {
2419
+ if (type === "variable") {
2420
+ length += createVariableReference(token).length;
2421
+ return;
2422
+ }
2423
+ const hashOffset = token.indexOf("#");
2424
+ if (hashOffset === -1) {
2425
+ length += token.length;
2426
+ return;
2427
+ }
2428
+ fragmentIndex = length + hashOffset;
2429
+ return false;
2430
+ });
2431
+ if (fragmentIndex === -1) {
2432
+ return { path, fragment: void 0 };
2433
+ }
2434
+ return {
2435
+ path: path.slice(0, fragmentIndex),
2436
+ fragment: path.slice(fragmentIndex + 1)
2437
+ };
2438
+ }
2407
2439
  };
2408
2440
  _routeInfo = /* @__PURE__ */ new WeakMap();
2409
2441
  _Route_static = /* @__PURE__ */ new WeakSet();
package/dist/index.esm.js CHANGED
@@ -2702,6 +2702,38 @@ var _Route = class _Route2 {
2702
2702
  }
2703
2703
  return segment.slice(_Route2.dynamicSegmentPrefix.length);
2704
2704
  }
2705
+ /**
2706
+ * Splits a path into the path portion and an optional `#fragment`
2707
+ * (everything after the first `#`).
2708
+ *
2709
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
2710
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
2711
+ * delimiter is the first `#` that falls outside of a variable expression.
2712
+ */
2713
+ static splitFragment(path) {
2714
+ let fragmentIndex = -1;
2715
+ let length = 0;
2716
+ parseVariableExpression(path, (token, type) => {
2717
+ if (type === "variable") {
2718
+ length += createVariableReference(token).length;
2719
+ return;
2720
+ }
2721
+ const hashOffset = token.indexOf("#");
2722
+ if (hashOffset === -1) {
2723
+ length += token.length;
2724
+ return;
2725
+ }
2726
+ fragmentIndex = length + hashOffset;
2727
+ return false;
2728
+ });
2729
+ if (fragmentIndex === -1) {
2730
+ return { path, fragment: void 0 };
2731
+ }
2732
+ return {
2733
+ path: path.slice(0, fragmentIndex),
2734
+ fragment: path.slice(fragmentIndex + 1)
2735
+ };
2736
+ }
2705
2737
  };
2706
2738
  _routeInfo = /* @__PURE__ */ new WeakMap();
2707
2739
  _Route_static = /* @__PURE__ */ new WeakSet();
package/dist/index.js CHANGED
@@ -2729,6 +2729,38 @@ var _Route = class _Route2 {
2729
2729
  }
2730
2730
  return segment.slice(_Route2.dynamicSegmentPrefix.length);
2731
2731
  }
2732
+ /**
2733
+ * Splits a path into the path portion and an optional `#fragment`
2734
+ * (everything after the first `#`).
2735
+ *
2736
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
2737
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
2738
+ * delimiter is the first `#` that falls outside of a variable expression.
2739
+ */
2740
+ static splitFragment(path) {
2741
+ let fragmentIndex = -1;
2742
+ let length = 0;
2743
+ parseVariableExpression(path, (token, type) => {
2744
+ if (type === "variable") {
2745
+ length += createVariableReference(token).length;
2746
+ return;
2747
+ }
2748
+ const hashOffset = token.indexOf("#");
2749
+ if (hashOffset === -1) {
2750
+ length += token.length;
2751
+ return;
2752
+ }
2753
+ fragmentIndex = length + hashOffset;
2754
+ return false;
2755
+ });
2756
+ if (fragmentIndex === -1) {
2757
+ return { path, fragment: void 0 };
2758
+ }
2759
+ return {
2760
+ path: path.slice(0, fragmentIndex),
2761
+ fragment: path.slice(fragmentIndex + 1)
2762
+ };
2763
+ }
2732
2764
  };
2733
2765
  _routeInfo = /* @__PURE__ */ new WeakMap();
2734
2766
  _Route_static = /* @__PURE__ */ new WeakSet();
package/dist/index.mjs CHANGED
@@ -2702,6 +2702,38 @@ var _Route = class _Route2 {
2702
2702
  }
2703
2703
  return segment.slice(_Route2.dynamicSegmentPrefix.length);
2704
2704
  }
2705
+ /**
2706
+ * Splits a path into the path portion and an optional `#fragment`
2707
+ * (everything after the first `#`).
2708
+ *
2709
+ * Variable expressions (`${...}`) may legitimately contain `#` characters
2710
+ * (e.g. JSON-pointer tokens like `${#jptr:/foo/_slug}`), so the fragment
2711
+ * delimiter is the first `#` that falls outside of a variable expression.
2712
+ */
2713
+ static splitFragment(path) {
2714
+ let fragmentIndex = -1;
2715
+ let length = 0;
2716
+ parseVariableExpression(path, (token, type) => {
2717
+ if (type === "variable") {
2718
+ length += createVariableReference(token).length;
2719
+ return;
2720
+ }
2721
+ const hashOffset = token.indexOf("#");
2722
+ if (hashOffset === -1) {
2723
+ length += token.length;
2724
+ return;
2725
+ }
2726
+ fragmentIndex = length + hashOffset;
2727
+ return false;
2728
+ });
2729
+ if (fragmentIndex === -1) {
2730
+ return { path, fragment: void 0 };
2731
+ }
2732
+ return {
2733
+ path: path.slice(0, fragmentIndex),
2734
+ fragment: path.slice(fragmentIndex + 1)
2735
+ };
2736
+ }
2705
2737
  };
2706
2738
  _routeInfo = /* @__PURE__ */ new WeakMap();
2707
2739
  _Route_static = /* @__PURE__ */ new WeakSet();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/next-app-router",
3
- "version": "20.72.2-alpha.3+a1f072e7b4",
3
+ "version": "20.72.3-alpha.2+36e92d30ab",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -98,12 +98,12 @@
98
98
  "vitest": "4.1.9"
99
99
  },
100
100
  "dependencies": {
101
- "@uniformdev/canvas-react": "20.72.2-alpha.3+a1f072e7b4",
102
- "@uniformdev/next-app-router-client": "20.72.2-alpha.3+a1f072e7b4",
103
- "@uniformdev/next-app-router-shared": "20.72.2-alpha.3+a1f072e7b4",
104
- "@uniformdev/redirect": "20.72.2-alpha.3+a1f072e7b4",
105
- "@uniformdev/richtext": "20.72.2-alpha.3+a1f072e7b4",
106
- "@uniformdev/webhooks": "20.72.2-alpha.3+a1f072e7b4",
101
+ "@uniformdev/canvas-react": "20.72.3-alpha.2+36e92d30ab",
102
+ "@uniformdev/next-app-router-client": "20.72.3-alpha.2+36e92d30ab",
103
+ "@uniformdev/next-app-router-shared": "20.72.3-alpha.2+36e92d30ab",
104
+ "@uniformdev/redirect": "20.72.3-alpha.2+36e92d30ab",
105
+ "@uniformdev/richtext": "20.72.3-alpha.2+36e92d30ab",
106
+ "@uniformdev/webhooks": "20.72.3-alpha.2+36e92d30ab",
107
107
  "@vercel/functions": "^3.7.2",
108
108
  "encoding": "^0.1.13",
109
109
  "server-only": "^0.0.1",
@@ -120,5 +120,5 @@
120
120
  "publishConfig": {
121
121
  "access": "public"
122
122
  },
123
- "gitHead": "a1f072e7b42ac4b3c694ebdd2e75216efd74a9c2"
123
+ "gitHead": "36e92d30ab1b97fc68cf16fc22c6f7865ac8ba97"
124
124
  }