@rebasepro/cms 0.19.1 → 0.19.2-canary.g09316f6
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/{CollectionEditorDialog-BeX4b92r.js → CollectionEditorDialog-DQjLtp1W.js} +75 -70
- package/dist/CollectionEditorDialog-DQjLtp1W.js.map +1 -0
- package/dist/{PropertyEditView-C7thfj4L.js → PropertyEditView-BMCCD2OI.js} +6 -6
- package/dist/PropertyEditView-BMCCD2OI.js.map +1 -0
- package/dist/{RouterCollectionsStudioView-BtjzvB6E.js → RouterCollectionsStudioView-DwsbIAqr.js} +9 -9
- package/dist/RouterCollectionsStudioView-DwsbIAqr.js.map +1 -0
- package/dist/{SchemaChangeDialog-CkqK6KOC.js → SchemaChangeDialog-BeP0A4MJ.js} +3 -3
- package/dist/SchemaChangeDialog-BeP0A4MJ.js.map +1 -0
- package/dist/collection_editor/serializable_types.d.ts +20 -0
- package/dist/collection_editor_ui.js +5 -5
- package/dist/components/CollectionTableBinding/fields/CompactEntityCellField.d.ts +23 -0
- package/dist/components/CollectionTableBinding/fields/TableRelationSelectorField.d.ts +1 -1
- package/dist/components/RelationSelector.d.ts +5 -1
- package/dist/data_import/utils/file_headers.d.ts +28 -4
- package/dist/editor.js +11 -11
- package/dist/editor.js.map +1 -1
- package/dist/{export--arni_VY.js → export-DJoGYb89.js} +2 -2
- package/dist/{export--arni_VY.js.map → export-DJoGYb89.js.map} +1 -1
- package/dist/{history-C2TpoQwi.js → history-BBpsdTrJ.js} +4 -4
- package/dist/history-BBpsdTrJ.js.map +1 -0
- package/dist/{import-DTkXNoBg.js → import-C4VQ0rwO.js} +2 -2
- package/dist/{import-DTkXNoBg.js.map → import-C4VQ0rwO.js.map} +1 -1
- package/dist/index.js +30 -35
- package/dist/index.js.map +1 -1
- package/dist/{markdown-CklalUUk.js → markdown-CCqp8ibf.js} +3 -3
- package/dist/markdown-CCqp8ibf.js.map +1 -0
- package/dist/util/view_constants.d.ts +3 -3
- package/dist/{util-DE1WQW6h.js → util-4oPxPkbp.js} +339 -155
- package/dist/util-4oPxPkbp.js.map +1 -0
- package/dist/{util-CfLFggP7.js → util-DB31IoJE.js} +4 -4
- package/dist/{util-CfLFggP7.js.map → util-DB31IoJE.js.map} +1 -1
- package/package.json +12 -11
- package/dist/CollectionEditorDialog-BeX4b92r.js.map +0 -1
- package/dist/PropertyEditView-C7thfj4L.js.map +0 -1
- package/dist/RouterCollectionsStudioView-BtjzvB6E.js.map +0 -1
- package/dist/SchemaChangeDialog-CkqK6KOC.js.map +0 -1
- package/dist/history-C2TpoQwi.js.map +0 -1
- package/dist/markdown-CklalUUk.js.map +0 -1
- package/dist/util-DE1WQW6h.js.map +0 -1
|
@@ -44,9 +44,9 @@ function getThumbnailMeasure(size) {
|
|
|
44
44
|
function getPreviewSizeFrom(size) {
|
|
45
45
|
switch (size) {
|
|
46
46
|
case "xs":
|
|
47
|
-
case "s":
|
|
48
|
-
case "m": return "
|
|
49
|
-
case "l":
|
|
47
|
+
case "s":
|
|
48
|
+
case "m": return "small";
|
|
49
|
+
case "l": return "medium";
|
|
50
50
|
case "xl": return "large";
|
|
51
51
|
default: throw Error("Missing mapping value in getPreviewSizeFrom: " + size);
|
|
52
52
|
}
|
|
@@ -54,4 +54,4 @@ function getPreviewSizeFrom(size) {
|
|
|
54
54
|
//#endregion
|
|
55
55
|
export { getThumbnailMeasure as n, sanitizeUrl as r, getPreviewSizeFrom as t };
|
|
56
56
|
|
|
57
|
-
//# sourceMappingURL=util-
|
|
57
|
+
//# sourceMappingURL=util-DB31IoJE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util-
|
|
1
|
+
{"version":3,"file":"util-DB31IoJE.js","names":[],"sources":["../src/preview/util.ts"],"sourcesContent":["import { CollectionSize } from \"@rebasepro/cms-types\";\nimport type { PreviewSize } from \"../types/components/PropertyPreviewProps\";\n/**\n * The schemes a preview link may use — everything else becomes `about:blank`.\n *\n * An allowlist, because the blocklist it replaces could be walked around and\n * the walk-arounds are not exotic. Browsers strip tabs, newlines and carriage\n * returns from a URL before parsing the scheme, so `java\\tscript:alert(1)` and\n * `java%0ascript:…` navigate exactly as `javascript:` does while matching none\n * of the names a blocklist knows. A leading control character does the same.\n *\n * Turned around, none of that matters: a string is either one of these four\n * schemes or it is not a link this panel will follow. `mailto:` and `tel:` are\n * here because a contact field is an ordinary thing to preview; `data:` is not,\n * even for images — a preview renders an `<img>` from its own value rather than\n * navigating to one.\n *\n * Relative URLs are allowed and deliberately: a preview commonly holds\n * `/uploads/x.png`, and a string with no scheme cannot carry one.\n */\nconst ALLOWED_URL_SCHEMES = new Set([\"http:\", \"https:\", \"mailto:\", \"tel:\"]);\n\nexport function sanitizeUrl(url: string | undefined): string {\n if (!url) return \"about:blank\";\n\n // The characters a browser removes before it decides what the scheme is.\n // Stripped here for the same reason, so this function is looking at the\n // string the browser will act on rather than the one it was handed.\n //\n // The control characters are the point, so the rule that objects to them is\n // off for this line rather than the expression rewritten to hide them from\n // it: `java\\tscript:` and `java\\nscript:` are the bypasses this exists to\n // close, and a regex that cannot name a control character cannot remove one.\n // eslint-disable-next-line no-control-regex\n const trimmed = url.trim().replace(/[\\u0000-\\u001F\\u007F]/g, \"\");\n if (!trimmed) return \"about:blank\";\n\n // No scheme at all — a relative link, which cannot navigate anywhere the\n // page could not already reach.\n if (!/^[a-z][a-z0-9+.-]*:/i.test(trimmed)) return trimmed;\n\n try {\n // `new URL` normalizes percent-encoding and case, so\n // `JaVaScRiPt%3aalert(1)` is judged as what it resolves to. The base is\n // there only so a protocol-relative `//host/path` parses.\n const parsed = new URL(trimmed, \"https://example.invalid\");\n return ALLOWED_URL_SCHEMES.has(parsed.protocol) ? trimmed : \"about:blank\";\n } catch {\n return \"about:blank\";\n }\n}\n\nexport const SMALL_THUMBNAIL = 40;\nexport const MEDIUM_THUMBNAIL = 100;\nexport const LARGE_THUMBNAIL = 200;\n\nexport function getThumbnailMeasure(size: PreviewSize): number {\n if (size === \"small\")\n return SMALL_THUMBNAIL;\n else if (size === \"medium\")\n return MEDIUM_THUMBNAIL;\n else if (size === \"large\")\n return LARGE_THUMBNAIL;\n else throw Error(\"Thumbnail size not mapped\");\n}\n\nexport function getPreviewSizeFrom(size: CollectionSize): PreviewSize {\n switch (size) {\n case \"xs\":\n case \"s\":\n case \"m\":\n return \"small\";\n case \"l\":\n return \"medium\";\n case \"xl\":\n return \"large\";\n default:\n throw Error(\"Missing mapping value in getPreviewSizeFrom: \" + size);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,IAAM,sCAAsB,IAAI,IAAI;CAAC;CAAS;CAAU;CAAW;AAAM,CAAC;AAE1E,SAAgB,YAAY,KAAiC;CACzD,IAAI,CAAC,KAAK,OAAO;CAWjB,MAAM,UAAU,IAAI,KAAK,CAAC,CAAC,QAAQ,0BAA0B,EAAE;CAC/D,IAAI,CAAC,SAAS,OAAO;CAIrB,IAAI,CAAC,uBAAuB,KAAK,OAAO,GAAG,OAAO;CAElD,IAAI;EAIA,MAAM,SAAS,IAAI,IAAI,SAAS,yBAAyB;EACzD,OAAO,oBAAoB,IAAI,OAAO,QAAQ,IAAI,UAAU;CAChE,QAAQ;EACJ,OAAO;CACX;AACJ;AAMA,SAAgB,oBAAoB,MAA2B;CAC3D,IAAI,SAAS,SACT,OAAA;MACC,IAAI,SAAS,UACd,OAAA;MACC,IAAI,SAAS,SACd,OAAA;MACC,MAAM,MAAM,2BAA2B;AAChD;AAEA,SAAgB,mBAAmB,MAAmC;CAClE,QAAQ,MAAR;EACI,KAAK;EACL,KAAK;EACL,KAAK,KACD,OAAO;EACX,KAAK,KACD,OAAO;EACX,KAAK,MACD,OAAO;EACX,SACI,MAAM,MAAM,kDAAkD,IAAI;CAC1E;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/cms",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.2-canary.g09316f6",
|
|
4
4
|
"description": "Rebase CMS — content management views, forms, and routing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rebase",
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
"@floating-ui/dom": "^1.8.0",
|
|
64
64
|
"cmdk": "^1.1.1",
|
|
65
65
|
"date-fns": "^4.4.0",
|
|
66
|
-
"exceljs": "^4.4.0",
|
|
67
66
|
"fast-equals": "6.0.2",
|
|
68
67
|
"fractional-indexing": "4.0.0",
|
|
69
68
|
"fuse.js": "^7.5.0",
|
|
@@ -88,15 +87,16 @@
|
|
|
88
87
|
"prosemirror-view": "^1.42.2",
|
|
89
88
|
"react-dropzone": "^19.1.1",
|
|
90
89
|
"react-use-measure": "^2.1.7",
|
|
90
|
+
"read-excel-file": "^9.3.10",
|
|
91
91
|
"zod": "^4.4.3",
|
|
92
|
-
"@rebasepro/cms-types": "0.19.
|
|
93
|
-
"@rebasepro/app": "0.19.
|
|
94
|
-
"@rebasepro/
|
|
95
|
-
"@rebasepro/
|
|
96
|
-
"@rebasepro/inference": "0.19.
|
|
97
|
-
"@rebasepro/ui": "0.19.
|
|
98
|
-
"@rebasepro/utils": "0.19.
|
|
99
|
-
"@rebasepro/
|
|
92
|
+
"@rebasepro/cms-types": "0.19.2-canary.g09316f6",
|
|
93
|
+
"@rebasepro/app": "0.19.2-canary.g09316f6",
|
|
94
|
+
"@rebasepro/forms": "0.19.2-canary.g09316f6",
|
|
95
|
+
"@rebasepro/types": "0.19.2-canary.g09316f6",
|
|
96
|
+
"@rebasepro/inference": "0.19.2-canary.g09316f6",
|
|
97
|
+
"@rebasepro/ui": "0.19.2-canary.g09316f6",
|
|
98
|
+
"@rebasepro/utils": "0.19.2-canary.g09316f6",
|
|
99
|
+
"@rebasepro/common": "0.19.2-canary.g09316f6"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"react": "^19.2.7",
|
|
@@ -107,15 +107,16 @@
|
|
|
107
107
|
"@jest/globals": "^30.4.1",
|
|
108
108
|
"@testing-library/react": "^16.3.2",
|
|
109
109
|
"@types/jest": "^30.0.0",
|
|
110
|
-
"notistack": "^3.0.2",
|
|
111
110
|
"@types/markdown-it": "^14.1.2",
|
|
112
111
|
"@types/node": "^26.1.2",
|
|
113
112
|
"@types/react": "^19.2.17",
|
|
114
113
|
"@types/react-dom": "^19.2.3",
|
|
115
114
|
"@types/react-measure": "^2.0.12",
|
|
116
115
|
"@vitejs/plugin-react": "^6.0.4",
|
|
116
|
+
"exceljs": "^4.4.0",
|
|
117
117
|
"fast-check": "^4.9.0",
|
|
118
118
|
"jest": "^30.4.2",
|
|
119
|
+
"notistack": "^3.0.2",
|
|
119
120
|
"react-router": "^8.3.0",
|
|
120
121
|
"ts-jest": "^29.4.12",
|
|
121
122
|
"typescript": "^6.0.3",
|