@simpleview/cms-foundation 0.0.27 → 0.0.29
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/chunk-2WII7C3O.js +31 -0
- package/dist/chunk-2WII7C3O.js.map +7 -0
- package/dist/chunk-4LSFAAZW.js +1 -0
- package/dist/chunk-4LSFAAZW.js.map +7 -0
- package/dist/chunk-5WRI5ZAA.js +31 -0
- package/dist/chunk-5WRI5ZAA.js.map +7 -0
- package/dist/chunk-CMALSZV3.js +1 -0
- package/dist/chunk-CMALSZV3.js.map +7 -0
- package/dist/chunk-DG37VYL5.js +1 -0
- package/dist/chunk-DG37VYL5.js.map +7 -0
- package/dist/chunk-EDXU7MNB.js +39 -0
- package/dist/chunk-EDXU7MNB.js.map +7 -0
- package/dist/chunk-EEKFLXZI.js +11 -0
- package/dist/chunk-EEKFLXZI.js.map +7 -0
- package/dist/chunk-EG5F4AP4.js +1 -0
- package/dist/chunk-EG5F4AP4.js.map +7 -0
- package/dist/chunk-EWRVCIV6.js +1 -0
- package/dist/chunk-EWRVCIV6.js.map +7 -0
- package/dist/chunk-F5L7DWHD.js +1 -0
- package/dist/chunk-F5L7DWHD.js.map +7 -0
- package/dist/chunk-FJML4RHB.js +59 -0
- package/dist/chunk-FJML4RHB.js.map +7 -0
- package/dist/chunk-GPTPACV2.js +33 -0
- package/dist/chunk-GPTPACV2.js.map +7 -0
- package/dist/chunk-JT6WIXOP.js +81 -0
- package/dist/chunk-JT6WIXOP.js.map +7 -0
- package/dist/chunk-MPAGXIUB.js +11 -0
- package/dist/chunk-MPAGXIUB.js.map +7 -0
- package/dist/chunk-OEYLOZQK.js +31 -0
- package/dist/chunk-OEYLOZQK.js.map +7 -0
- package/dist/chunk-P3WX4DFS.js +93 -0
- package/dist/chunk-P3WX4DFS.js.map +7 -0
- package/dist/chunk-VV3NKXSX.js +17 -0
- package/dist/chunk-VV3NKXSX.js.map +7 -0
- package/dist/chunk-XG5CMDEI.js +1 -0
- package/dist/chunk-XG5CMDEI.js.map +7 -0
- package/dist/chunk-ZQUGFKHP.js +1 -0
- package/dist/chunk-ZQUGFKHP.js.map +7 -0
- package/dist/components/App/App.js +4 -5
- package/dist/components/App/App.js.map +3 -3
- package/dist/components/App/index.js +8 -1
- package/dist/components/App/index.js.map +3 -3
- package/dist/components/Error/Error.js +4 -11
- package/dist/components/Error/Error.js.map +3 -3
- package/dist/components/Error/Error.types.js +1 -0
- package/dist/components/Error/index.js +9 -2
- package/dist/components/Error/index.js.map +3 -3
- package/dist/components/Layout/Layout.js +4 -25
- package/dist/components/Layout/Layout.js.map +3 -3
- package/dist/components/Layout/index.js +8 -1
- package/dist/components/Layout/index.js.map +3 -3
- package/dist/components/Preview/PreviewCivWrapper.js +4 -25
- package/dist/components/Preview/PreviewCivWrapper.js.map +3 -3
- package/dist/components/Preview/PreviewContent.js +18 -10
- package/dist/components/Preview/PreviewContent.js.map +3 -3
- package/dist/components/Preview/PreviewPageWrapper.js +4 -85
- package/dist/components/Preview/PreviewPageWrapper.js.map +3 -3
- package/dist/components/Preview/index.js +29 -3
- package/dist/components/Preview/index.js.map +3 -3
- package/dist/components/Section/Section.js +18 -8
- package/dist/components/Section/Section.js.map +3 -3
- package/dist/components/Section/Section.types.js +1 -0
- package/dist/components/Section/SectionItem.js +18 -11
- package/dist/components/Section/SectionItem.js.map +3 -3
- package/dist/components/Section/SectionItemCiv.js +18 -19
- package/dist/components/Section/SectionItemCiv.js.map +3 -3
- package/dist/components/Section/index.js +25 -4
- package/dist/components/Section/index.js.map +3 -3
- package/dist/components/Unknown/Unknown.js +6 -28
- package/dist/components/Unknown/Unknown.js.map +3 -3
- package/dist/components/Unknown/index.js +10 -1
- package/dist/components/Unknown/index.js.map +3 -3
- package/dist/components/index.js +47 -6
- package/dist/components/index.js.map +3 -3
- package/dist/contexts/ComponentMapContext.js +19 -9
- package/dist/contexts/ComponentMapContext.js.map +3 -3
- package/dist/contexts/index.js +23 -1
- package/dist/contexts/index.js.map +3 -3
- package/dist/routes/index.js +7131 -2
- package/dist/routes/index.js.map +4 -4
- package/dist/types/cms.js +1 -0
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +3 -3
- package/dist/utils/getCmsUrl.js +4 -5
- package/dist/utils/getCmsUrl.js.map +3 -3
- package/dist/utils/getPageContent.js +5 -50
- package/dist/utils/getPageContent.js.map +3 -3
- package/dist/utils/index.js +11 -2
- package/dist/utils/index.js.map +3 -3
- package/dist/vite/config.js +4 -33
- package/dist/vite/config.js.map +3 -3
- package/dist/vite/index.js +7 -1
- package/dist/vite/index.js.map +3 -3
- package/package.json +3 -2
- /package/dist/types/{src/components → components}/App/App.d.ts +0 -0
- /package/dist/types/{src/components → components}/App/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/Error/Error.d.ts +0 -0
- /package/dist/types/{src/components → components}/Error/Error.types.d.ts +0 -0
- /package/dist/types/{src/components → components}/Error/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/Layout/Layout.d.ts +0 -0
- /package/dist/types/{src/components → components}/Layout/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/Preview/PreviewCivWrapper.d.ts +0 -0
- /package/dist/types/{src/components → components}/Preview/PreviewContent.d.ts +0 -0
- /package/dist/types/{src/components → components}/Preview/PreviewPageWrapper.d.ts +0 -0
- /package/dist/types/{src/components → components}/Preview/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/Section/Section.d.ts +0 -0
- /package/dist/types/{src/components → components}/Section/Section.types.d.ts +0 -0
- /package/dist/types/{src/components → components}/Section/SectionItem.d.ts +0 -0
- /package/dist/types/{src/components → components}/Section/SectionItemCiv.d.ts +0 -0
- /package/dist/types/{src/components → components}/Section/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/Unknown/Unknown.d.ts +0 -0
- /package/dist/types/{src/components → components}/Unknown/index.d.ts +0 -0
- /package/dist/types/{src/components → components}/index.d.ts +0 -0
- /package/dist/types/{src/contexts → contexts}/ComponentMapContext.d.ts +0 -0
- /package/dist/types/{src/contexts → contexts}/index.d.ts +0 -0
- /package/dist/types/{src/routes → routes}/index.d.ts +0 -0
- /package/dist/types/{src/types → types}/cms.d.ts +0 -0
- /package/dist/types/{src/types → types}/index.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/getCmsUrl.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/getPageContent.d.ts +0 -0
- /package/dist/types/{src/utils → utils}/index.d.ts +0 -0
- /package/dist/types/{src/vite → vite}/config.d.ts +0 -0
- /package/dist/types/{src/vite → vite}/index.d.ts +0 -0
package/dist/types/cms.js
CHANGED
package/dist/types/index.js
CHANGED
package/dist/types/index.js.map
CHANGED
package/dist/utils/getCmsUrl.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
getCmsUrl
|
|
3
|
+
} from "../chunk-EEKFLXZI.js";
|
|
4
|
+
import "../chunk-5WRI5ZAA.js";
|
|
6
5
|
export {
|
|
7
6
|
getCmsUrl
|
|
8
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": [],
|
|
4
|
+
"sourcesContent": [],
|
|
5
|
+
"mappings": "",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,53 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (!incomingUrl.pathname.endsWith("/") || /\.[^/]+$/.test(incomingUrl.pathname)) {
|
|
7
|
-
cmsUrl.pathname = incomingUrl.pathname + "/content.json";
|
|
8
|
-
} else {
|
|
9
|
-
cmsUrl.pathname = incomingUrl.pathname + "content.json";
|
|
10
|
-
}
|
|
11
|
-
const headers = {
|
|
12
|
-
"Accept-Encoding": "gzip",
|
|
13
|
-
"X-Forwarded-For": req.headers.get("x-real-ip") || req.headers.get("x-forwarded-host") || "",
|
|
14
|
-
"User-Agent": req.headers.get("user-agent") || ""
|
|
15
|
-
};
|
|
16
|
-
try {
|
|
17
|
-
let body = void 0;
|
|
18
|
-
if (req.method === "POST" && incomingUrl.pathname === previewPath) {
|
|
19
|
-
incomingUrl.searchParams.forEach((val, key) => {
|
|
20
|
-
cmsUrl.searchParams.set(key, val);
|
|
21
|
-
});
|
|
22
|
-
const formData = await req.formData();
|
|
23
|
-
const civs = formData.get("headless_civs");
|
|
24
|
-
if (typeof civs !== "string") {
|
|
25
|
-
throw new Error(
|
|
26
|
-
"Posted CIVs were not a base64 encoded string."
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
const data = JSON.parse(atob(civs));
|
|
30
|
-
return data;
|
|
31
|
-
}
|
|
32
|
-
const url = cmsUrl.toString();
|
|
33
|
-
const { method } = req;
|
|
34
|
-
const fetchParams = {
|
|
35
|
-
method,
|
|
36
|
-
headers,
|
|
37
|
-
body
|
|
38
|
-
};
|
|
39
|
-
console.log("Making page content request:", {
|
|
40
|
-
url,
|
|
41
|
-
...fetchParams
|
|
42
|
-
});
|
|
43
|
-
const result = await fetch(url, fetchParams).then((res) => res.json());
|
|
44
|
-
return result;
|
|
45
|
-
} catch (err) {
|
|
46
|
-
const status = err?.response?.status || 500;
|
|
47
|
-
const message = err?.response?.statusText || "Server Error";
|
|
48
|
-
throw new Error(`Status ${status}: ${message}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
getPageContent
|
|
3
|
+
} from "../chunk-FJML4RHB.js";
|
|
4
|
+
import "../chunk-EEKFLXZI.js";
|
|
5
|
+
import "../chunk-5WRI5ZAA.js";
|
|
51
6
|
export {
|
|
52
7
|
getPageContent
|
|
53
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": [],
|
|
4
|
+
"sourcesContent": [],
|
|
5
|
+
"mappings": "",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
getPageContent
|
|
3
|
+
} from "../chunk-FJML4RHB.js";
|
|
4
|
+
import {
|
|
5
|
+
getCmsUrl
|
|
6
|
+
} from "../chunk-EEKFLXZI.js";
|
|
7
|
+
import "../chunk-5WRI5ZAA.js";
|
|
8
|
+
export {
|
|
9
|
+
getCmsUrl,
|
|
10
|
+
getPageContent
|
|
11
|
+
};
|
|
3
12
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": [],
|
|
4
|
+
"sourcesContent": [],
|
|
5
|
+
"mappings": "",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/vite/config.js
CHANGED
|
@@ -1,36 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV)
|
|
6
|
-
},
|
|
7
|
-
build: {
|
|
8
|
-
target: "es2022",
|
|
9
|
-
cssMinify: process.env.NODE_ENV === "production",
|
|
10
|
-
rollupOptions: {
|
|
11
|
-
external: [/node:.*/, "fsevents"]
|
|
12
|
-
},
|
|
13
|
-
assetsInlineLimit: (source) => {
|
|
14
|
-
if (source.endsWith("sprite.svg") || source.endsWith("favicon.svg") || source.endsWith("apple-touch-icon.png")) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
sourcemap: process.env.NODE_ENV === "development" ? true : false
|
|
19
|
-
},
|
|
20
|
-
plugins: [tsconfigPaths()],
|
|
21
|
-
server: {
|
|
22
|
-
allowedHosts: [".local.simpleviewcms.app"],
|
|
23
|
-
watch: {
|
|
24
|
-
usePolling: true
|
|
25
|
-
},
|
|
26
|
-
hmr: {
|
|
27
|
-
path: "/__cms_hmr_ws",
|
|
28
|
-
port: 24678,
|
|
29
|
-
clientPort: 443,
|
|
30
|
-
protocol: "wss"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
1
|
+
import {
|
|
2
|
+
config
|
|
3
|
+
} from "../chunk-EDXU7MNB.js";
|
|
4
|
+
import "../chunk-5WRI5ZAA.js";
|
|
34
5
|
export {
|
|
35
6
|
config
|
|
36
7
|
};
|
package/dist/vite/config.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": [],
|
|
4
|
+
"sourcesContent": [],
|
|
5
|
+
"mappings": "",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/vite/index.js
CHANGED
package/dist/vite/index.js.map
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simpleview/cms-foundation",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.29",
|
|
5
5
|
"description": "Provides helper types and components to assist when working with Granicus CMS Reactor.",
|
|
6
6
|
"packageManager": "yarn@4.6.0+sha224.acd0786f07ffc6c933940eb65fc1d627131ddf5455bddcc295dc90fd",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"install:host": "npm install -f --package-lock false",
|
|
9
9
|
"typecheck": "tsc --noEmit",
|
|
10
10
|
"build": "tsx build",
|
|
11
|
-
"start": "tsx build --watch"
|
|
11
|
+
"start": "tsx build --watch",
|
|
12
|
+
"tsc": "tsc"
|
|
12
13
|
},
|
|
13
14
|
"exports": {
|
|
14
15
|
"./types": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|