@uniformdev/next-app-router 20.75.1-alpha.0 → 20.75.1-alpha.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.
- package/dist/component.js +31 -15
- package/dist/component.mjs +18 -2
- package/package.json +8 -8
package/dist/component.js
CHANGED
|
@@ -936,11 +936,11 @@ var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
|
|
936
936
|
var ATTRIBUTE_PARAMETER_TYPE = "data-uniform-parameter-type";
|
|
937
937
|
|
|
938
938
|
// src/components/UniformRichText.tsx
|
|
939
|
-
var
|
|
939
|
+
var import_richtext8 = require("@uniformdev/richtext");
|
|
940
940
|
var import_react12 = __toESM(require("react"));
|
|
941
941
|
|
|
942
942
|
// src/components/UniformRichTextNode.tsx
|
|
943
|
-
var
|
|
943
|
+
var import_richtext7 = require("@uniformdev/richtext");
|
|
944
944
|
var import_react11 = __toESM(require("react"));
|
|
945
945
|
|
|
946
946
|
// src/components/nodes/AssetRichTextNode.tsx
|
|
@@ -986,41 +986,57 @@ var LinkRichTextNode = ({ children, node }) => {
|
|
|
986
986
|
};
|
|
987
987
|
|
|
988
988
|
// src/components/nodes/ListItemRichTextNode.tsx
|
|
989
|
+
var import_richtext2 = require("@uniformdev/richtext");
|
|
989
990
|
var import_react5 = __toESM(require("react"));
|
|
990
991
|
var ListItemRichTextNode = ({ children, node }) => {
|
|
991
992
|
const { value } = node;
|
|
992
|
-
|
|
993
|
+
const normalizedValue = (0, import_richtext2.getRichTextListItemValue)(value);
|
|
994
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
|
995
|
+
"li",
|
|
996
|
+
{
|
|
997
|
+
value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
|
|
998
|
+
},
|
|
999
|
+
children
|
|
1000
|
+
);
|
|
993
1001
|
};
|
|
994
1002
|
|
|
995
1003
|
// src/components/nodes/ListRichTextNode.tsx
|
|
1004
|
+
var import_richtext3 = require("@uniformdev/richtext");
|
|
996
1005
|
var import_react6 = __toESM(require("react"));
|
|
997
1006
|
var ListRichTextNode = ({ children, node }) => {
|
|
998
1007
|
const { tag, start } = node;
|
|
999
1008
|
const ListTag = tag != null ? tag : "ul";
|
|
1000
|
-
|
|
1009
|
+
const normalizedStart = (0, import_richtext3.getRichTextListStart)(start);
|
|
1010
|
+
return /* @__PURE__ */ import_react6.default.createElement(
|
|
1011
|
+
ListTag,
|
|
1012
|
+
{
|
|
1013
|
+
start: typeof normalizedStart === "number" && Number.isFinite(normalizedStart) && normalizedStart > 0 ? normalizedStart : void 0
|
|
1014
|
+
},
|
|
1015
|
+
children
|
|
1016
|
+
);
|
|
1001
1017
|
};
|
|
1002
1018
|
|
|
1003
1019
|
// src/components/nodes/ParagraphRichTextNode.tsx
|
|
1004
|
-
var
|
|
1020
|
+
var import_richtext4 = require("@uniformdev/richtext");
|
|
1005
1021
|
var import_react7 = __toESM(require("react"));
|
|
1006
1022
|
var ParagraphRichTextNode = ({ children, node }) => {
|
|
1007
1023
|
const { format, direction } = node;
|
|
1008
1024
|
return /* @__PURE__ */ import_react7.default.createElement(
|
|
1009
1025
|
"p",
|
|
1010
1026
|
{
|
|
1011
|
-
dir: (0,
|
|
1012
|
-
style: (0,
|
|
1027
|
+
dir: (0, import_richtext4.isPureDirection)(direction) ? direction : void 0,
|
|
1028
|
+
style: (0, import_richtext4.isPureTextAlign)(format) ? { textAlign: format } : void 0
|
|
1013
1029
|
},
|
|
1014
1030
|
children
|
|
1015
1031
|
);
|
|
1016
1032
|
};
|
|
1017
1033
|
|
|
1018
1034
|
// src/components/nodes/TableCellRichTextNode.tsx
|
|
1019
|
-
var
|
|
1035
|
+
var import_richtext5 = require("@uniformdev/richtext");
|
|
1020
1036
|
var import_react8 = __toESM(require("react"));
|
|
1021
1037
|
var TableCellRichTextNode = ({ children, node }) => {
|
|
1022
1038
|
const { headerState } = node;
|
|
1023
|
-
const TableCellTag = (0,
|
|
1039
|
+
const TableCellTag = (0, import_richtext5.getRichTextTagFromTableCellHeaderState)(headerState);
|
|
1024
1040
|
return /* @__PURE__ */ import_react8.default.createElement(TableCellTag, null, children);
|
|
1025
1041
|
};
|
|
1026
1042
|
|
|
@@ -1031,18 +1047,18 @@ var TabRichTextNode = () => {
|
|
|
1031
1047
|
};
|
|
1032
1048
|
|
|
1033
1049
|
// src/components/nodes/TextRichTextNode.tsx
|
|
1034
|
-
var
|
|
1050
|
+
var import_richtext6 = require("@uniformdev/richtext");
|
|
1035
1051
|
var import_react10 = __toESM(require("react"));
|
|
1036
1052
|
var TextRichTextNode = ({ node }) => {
|
|
1037
1053
|
const { text, format } = node;
|
|
1038
|
-
const tags = (0,
|
|
1054
|
+
const tags = (0, import_richtext6.getRichTextTagsFromTextFormat)(format);
|
|
1039
1055
|
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);
|
|
1040
1056
|
};
|
|
1041
1057
|
|
|
1042
1058
|
// src/components/UniformRichTextNode.tsx
|
|
1043
1059
|
function UniformRichTextNode({ node, ...props }) {
|
|
1044
1060
|
var _a;
|
|
1045
|
-
if (!(0,
|
|
1061
|
+
if (!(0, import_richtext7.isRichTextNode)(node)) return null;
|
|
1046
1062
|
let NodeRenderer = (_a = props.resolveRichTextRenderer) == null ? void 0 : _a.call(props, node);
|
|
1047
1063
|
if (typeof NodeRenderer === "undefined") {
|
|
1048
1064
|
NodeRenderer = resolveRichTextDefaultRenderer(node);
|
|
@@ -1096,8 +1112,8 @@ var UniformRichText = import_react12.default.forwardRef(function UniformRichText
|
|
|
1096
1112
|
}
|
|
1097
1113
|
const computedPlaceholder = typeof placeholder === "function" ? placeholder({ id: parameter.parameterId }) : placeholder;
|
|
1098
1114
|
const value = parameter.value;
|
|
1099
|
-
if (!value || !(0,
|
|
1100
|
-
if (!isContextualEditing && (0,
|
|
1115
|
+
if (!value || !(0, import_richtext8.isRichTextValue)(value)) return null;
|
|
1116
|
+
if (!isContextualEditing && (0, import_richtext8.isRichTextValueConsideredEmpty)(value)) return null;
|
|
1101
1117
|
return Tag === null ? /* @__PURE__ */ import_react12.default.createElement(UniformRichTextNode, { node: value.root, resolveRichTextRenderer }) : /* @__PURE__ */ import_react12.default.createElement(
|
|
1102
1118
|
Tag,
|
|
1103
1119
|
{
|
|
@@ -1109,7 +1125,7 @@ var UniformRichText = import_react12.default.forwardRef(function UniformRichText
|
|
|
1109
1125
|
[ATTRIBUTE_PARAMETER_TYPE]: "richText"
|
|
1110
1126
|
} : {}
|
|
1111
1127
|
},
|
|
1112
|
-
(0,
|
|
1128
|
+
(0, import_richtext8.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 })
|
|
1113
1129
|
);
|
|
1114
1130
|
});
|
|
1115
1131
|
|
package/dist/component.mjs
CHANGED
|
@@ -974,18 +974,34 @@ var LinkRichTextNode = ({ children, node }) => {
|
|
|
974
974
|
};
|
|
975
975
|
|
|
976
976
|
// src/components/nodes/ListItemRichTextNode.tsx
|
|
977
|
+
import { getRichTextListItemValue } from "@uniformdev/richtext";
|
|
977
978
|
import React5 from "react";
|
|
978
979
|
var ListItemRichTextNode = ({ children, node }) => {
|
|
979
980
|
const { value } = node;
|
|
980
|
-
|
|
981
|
+
const normalizedValue = getRichTextListItemValue(value);
|
|
982
|
+
return /* @__PURE__ */ React5.createElement(
|
|
983
|
+
"li",
|
|
984
|
+
{
|
|
985
|
+
value: typeof normalizedValue === "number" && Number.isFinite(normalizedValue) && normalizedValue > 0 ? normalizedValue : void 0
|
|
986
|
+
},
|
|
987
|
+
children
|
|
988
|
+
);
|
|
981
989
|
};
|
|
982
990
|
|
|
983
991
|
// src/components/nodes/ListRichTextNode.tsx
|
|
992
|
+
import { getRichTextListStart } from "@uniformdev/richtext";
|
|
984
993
|
import React6 from "react";
|
|
985
994
|
var ListRichTextNode = ({ children, node }) => {
|
|
986
995
|
const { tag, start } = node;
|
|
987
996
|
const ListTag = tag != null ? tag : "ul";
|
|
988
|
-
|
|
997
|
+
const normalizedStart = getRichTextListStart(start);
|
|
998
|
+
return /* @__PURE__ */ React6.createElement(
|
|
999
|
+
ListTag,
|
|
1000
|
+
{
|
|
1001
|
+
start: typeof normalizedStart === "number" && Number.isFinite(normalizedStart) && normalizedStart > 0 ? normalizedStart : void 0
|
|
1002
|
+
},
|
|
1003
|
+
children
|
|
1004
|
+
);
|
|
989
1005
|
};
|
|
990
1006
|
|
|
991
1007
|
// src/components/nodes/ParagraphRichTextNode.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/next-app-router",
|
|
3
|
-
"version": "20.75.1-alpha.
|
|
3
|
+
"version": "20.75.1-alpha.16+4e56d1cd21",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -100,12 +100,12 @@
|
|
|
100
100
|
"vitest": "4.1.9"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@uniformdev/canvas-react": "20.75.1-alpha.
|
|
104
|
-
"@uniformdev/next-app-router-client": "20.75.1-alpha.
|
|
105
|
-
"@uniformdev/next-app-router-shared": "20.75.1-alpha.
|
|
106
|
-
"@uniformdev/redirect": "20.75.1-alpha.
|
|
107
|
-
"@uniformdev/richtext": "20.75.1-alpha.
|
|
108
|
-
"@uniformdev/webhooks": "20.75.1-alpha.
|
|
103
|
+
"@uniformdev/canvas-react": "20.75.1-alpha.16+4e56d1cd21",
|
|
104
|
+
"@uniformdev/next-app-router-client": "20.75.1-alpha.16+4e56d1cd21",
|
|
105
|
+
"@uniformdev/next-app-router-shared": "20.75.1-alpha.16+4e56d1cd21",
|
|
106
|
+
"@uniformdev/redirect": "20.75.1-alpha.16+4e56d1cd21",
|
|
107
|
+
"@uniformdev/richtext": "20.75.1-alpha.16+4e56d1cd21",
|
|
108
|
+
"@uniformdev/webhooks": "20.75.1-alpha.16+4e56d1cd21",
|
|
109
109
|
"@vercel/functions": "^3.7.2",
|
|
110
110
|
"encoding": "^0.1.13",
|
|
111
111
|
"server-only": "^0.0.1",
|
|
@@ -122,5 +122,5 @@
|
|
|
122
122
|
"publishConfig": {
|
|
123
123
|
"access": "public"
|
|
124
124
|
},
|
|
125
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "4e56d1cd21f2d4a02b13d733e51fb71441cac298"
|
|
126
126
|
}
|