@simpleview/cms-foundation 0.0.23 → 0.0.25
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/components/App/App.js +5 -4
- package/dist/components/App/App.js.map +3 -3
- package/dist/components/App/index.js +1 -8
- package/dist/components/App/index.js.map +3 -3
- package/dist/components/Error/Error.js +11 -4
- package/dist/components/Error/Error.js.map +3 -3
- package/dist/components/Error/Error.types.js +0 -1
- package/dist/components/Error/index.js +2 -9
- package/dist/components/Error/index.js.map +3 -3
- package/dist/components/Layout/Layout.js +25 -4
- package/dist/components/Layout/Layout.js.map +3 -3
- package/dist/components/Layout/index.js +1 -8
- package/dist/components/Layout/index.js.map +3 -3
- package/dist/components/Preview/PreviewCivWrapper.js +25 -4
- package/dist/components/Preview/PreviewCivWrapper.js.map +3 -3
- package/dist/components/Preview/PreviewContent.js +10 -18
- package/dist/components/Preview/PreviewContent.js.map +3 -3
- package/dist/components/Preview/PreviewPageWrapper.js +85 -4
- package/dist/components/Preview/PreviewPageWrapper.js.map +3 -3
- package/dist/components/Preview/index.js +3 -29
- package/dist/components/Preview/index.js.map +3 -3
- package/dist/components/Section/Section.js +8 -18
- package/dist/components/Section/Section.js.map +3 -3
- package/dist/components/Section/Section.types.js +0 -1
- package/dist/components/Section/SectionItem.js +11 -18
- package/dist/components/Section/SectionItem.js.map +3 -3
- package/dist/components/Section/SectionItemCiv.js +19 -18
- package/dist/components/Section/SectionItemCiv.js.map +3 -3
- package/dist/components/Section/index.js +4 -25
- package/dist/components/Section/index.js.map +3 -3
- package/dist/components/Unknown/Unknown.js +28 -6
- package/dist/components/Unknown/Unknown.js.map +3 -3
- package/dist/components/Unknown/index.js +1 -10
- package/dist/components/Unknown/index.js.map +3 -3
- package/dist/components/index.js +6 -47
- package/dist/components/index.js.map +3 -3
- package/dist/contexts/ComponentMapContext.js +9 -19
- package/dist/contexts/ComponentMapContext.js.map +3 -3
- package/dist/contexts/index.js +1 -23
- package/dist/contexts/index.js.map +3 -3
- package/dist/routes/index.js +2 -7131
- package/dist/routes/index.js.map +4 -4
- package/dist/types/cms.js +0 -1
- package/dist/types/index.js +1 -2
- package/dist/types/index.js.map +3 -3
- package/dist/types/src/vite/config.d.ts +1 -0
- package/dist/types/src/vite/index.d.ts +1 -0
- package/dist/utils/getCmsUrl.js +5 -4
- package/dist/utils/getCmsUrl.js.map +3 -3
- package/dist/utils/getPageContent.js +50 -5
- package/dist/utils/getPageContent.js.map +3 -3
- package/dist/utils/index.js +2 -11
- package/dist/utils/index.js.map +3 -3
- package/dist/vite/config.js +37 -0
- package/dist/vite/config.js.map +7 -0
- package/dist/vite/index.js +2 -0
- package/dist/vite/index.js.map +7 -0
- package/package.json +11 -5
- package/dist/chunk-2WII7C3O.js +0 -31
- package/dist/chunk-2WII7C3O.js.map +0 -7
- package/dist/chunk-4GSRDXHP.js +0 -87
- package/dist/chunk-4GSRDXHP.js.map +0 -7
- package/dist/chunk-4LSFAAZW.js +0 -1
- package/dist/chunk-4LSFAAZW.js.map +0 -7
- package/dist/chunk-5WRI5ZAA.js +0 -31
- package/dist/chunk-5WRI5ZAA.js.map +0 -7
- package/dist/chunk-CMALSZV3.js +0 -1
- package/dist/chunk-CMALSZV3.js.map +0 -7
- package/dist/chunk-DG37VYL5.js +0 -1
- package/dist/chunk-DG37VYL5.js.map +0 -7
- package/dist/chunk-EEKFLXZI.js +0 -11
- package/dist/chunk-EEKFLXZI.js.map +0 -7
- package/dist/chunk-EG5F4AP4.js +0 -1
- package/dist/chunk-EG5F4AP4.js.map +0 -7
- package/dist/chunk-EWRVCIV6.js +0 -1
- package/dist/chunk-EWRVCIV6.js.map +0 -7
- package/dist/chunk-F5L7DWHD.js +0 -1
- package/dist/chunk-F5L7DWHD.js.map +0 -7
- package/dist/chunk-FJML4RHB.js +0 -59
- package/dist/chunk-FJML4RHB.js.map +0 -7
- package/dist/chunk-GPTPACV2.js +0 -33
- package/dist/chunk-GPTPACV2.js.map +0 -7
- package/dist/chunk-MPAGXIUB.js +0 -11
- package/dist/chunk-MPAGXIUB.js.map +0 -7
- package/dist/chunk-OEYLOZQK.js +0 -31
- package/dist/chunk-OEYLOZQK.js.map +0 -7
- package/dist/chunk-P3WX4DFS.js +0 -93
- package/dist/chunk-P3WX4DFS.js.map +0 -7
- package/dist/chunk-VV3NKXSX.js +0 -17
- package/dist/chunk-VV3NKXSX.js.map +0 -7
- package/dist/chunk-XG5CMDEI.js +0 -1
- package/dist/chunk-XG5CMDEI.js.map +0 -7
- package/dist/chunk-ZQUGFKHP.js +0 -1
- package/dist/chunk-ZQUGFKHP.js.map +0 -7
- /package/dist/types/{components → src/components}/App/App.d.ts +0 -0
- /package/dist/types/{components → src/components}/App/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/Error/Error.d.ts +0 -0
- /package/dist/types/{components → src/components}/Error/Error.types.d.ts +0 -0
- /package/dist/types/{components → src/components}/Error/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/Layout/Layout.d.ts +0 -0
- /package/dist/types/{components → src/components}/Layout/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/Preview/PreviewCivWrapper.d.ts +0 -0
- /package/dist/types/{components → src/components}/Preview/PreviewContent.d.ts +0 -0
- /package/dist/types/{components → src/components}/Preview/PreviewPageWrapper.d.ts +0 -0
- /package/dist/types/{components → src/components}/Preview/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/Section/Section.d.ts +0 -0
- /package/dist/types/{components → src/components}/Section/Section.types.d.ts +0 -0
- /package/dist/types/{components → src/components}/Section/SectionItem.d.ts +0 -0
- /package/dist/types/{components → src/components}/Section/SectionItemCiv.d.ts +0 -0
- /package/dist/types/{components → src/components}/Section/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/Unknown/Unknown.d.ts +0 -0
- /package/dist/types/{components → src/components}/Unknown/index.d.ts +0 -0
- /package/dist/types/{components → src/components}/index.d.ts +0 -0
- /package/dist/types/{contexts → src/contexts}/ComponentMapContext.d.ts +0 -0
- /package/dist/types/{contexts → src/contexts}/index.d.ts +0 -0
- /package/dist/types/{routes → src/routes}/index.d.ts +0 -0
- /package/dist/types/{types → src/types}/cms.d.ts +0 -0
- /package/dist/types/{types → src/types}/index.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/getCmsUrl.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/getPageContent.d.ts +0 -0
- /package/dist/types/{utils → src/utils}/index.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/App/App.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Outlet } from \"react-router\";\n\nexport function App() {\n\treturn <Outlet />;\n}\n"],
|
|
5
|
+
"mappings": "AAGQ;AAHR,SAAS,cAAc;AAEhB,SAAS,MAAM;AACrB,SAAO,oBAAC,UAAO;AAChB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
function Error({ status, message }) {
|
|
3
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4
|
+
/* @__PURE__ */ jsx("h1", { children: "Error" }),
|
|
5
|
+
/* @__PURE__ */ jsxs("h3", { children: [
|
|
6
|
+
"Status Code: ",
|
|
7
|
+
status
|
|
8
|
+
] }),
|
|
9
|
+
/* @__PURE__ */ jsx("p", { children: message })
|
|
10
|
+
] });
|
|
11
|
+
}
|
|
5
12
|
export {
|
|
6
13
|
Error
|
|
7
14
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Error/Error.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { ErrorProps } from \"./Error.types.js\";\r\n\r\nexport function Error({ status, message }: ErrorProps) {\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<h1>Error</h1>\r\n\t\t\t<h3>Status Code: {status}</h3>\r\n\t\t\t<p>{message}</p>\r\n\t\t</>\r\n\t);\r\n}\r\n"],
|
|
5
|
+
"mappings": "AAIE,mBACC,KACA,YAFD;AAFK,SAAS,MAAM,EAAE,QAAQ,QAAQ,GAAe;AACtD,SACC,iCACC;AAAA,wBAAC,QAAG,mBAAK;AAAA,IACT,qBAAC,QAAG;AAAA;AAAA,MAAc;AAAA,OAAO;AAAA,IACzB,oBAAC,OAAG,mBAAQ;AAAA,KACb;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Error
|
|
4
|
-
} from "../../chunk-VV3NKXSX.js";
|
|
5
|
-
import "../../chunk-EG5F4AP4.js";
|
|
6
|
-
import "../../chunk-5WRI5ZAA.js";
|
|
7
|
-
export {
|
|
8
|
-
Error
|
|
9
|
-
};
|
|
1
|
+
export * from "./Error.js";
|
|
2
|
+
export * from "./Error.types.js";
|
|
10
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Error/index.ts"],
|
|
4
|
+
"sourcesContent": ["export * from \"./Error.js\";\r\nexport * from \"./Error.types.js\";\r\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Links, Meta, Scripts, ScrollRestoration } from "react-router";
|
|
3
|
+
const allowIndexing = process.env.NODE_ENV === "production";
|
|
4
|
+
function Layout({ children }) {
|
|
5
|
+
return /* @__PURE__ */ jsxs("html", { lang: "en", children: [
|
|
6
|
+
/* @__PURE__ */ jsxs("head", { children: [
|
|
7
|
+
/* @__PURE__ */ jsx(Meta, {}),
|
|
8
|
+
/* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
|
|
9
|
+
/* @__PURE__ */ jsx(
|
|
10
|
+
"meta",
|
|
11
|
+
{
|
|
12
|
+
name: "viewport",
|
|
13
|
+
content: "width=device-width,initial-scale=1"
|
|
14
|
+
}
|
|
15
|
+
),
|
|
16
|
+
allowIndexing && /* @__PURE__ */ jsx("meta", { name: "robots", content: "noindex, nofollow" }),
|
|
17
|
+
/* @__PURE__ */ jsx(Links, {})
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsxs("body", { children: [
|
|
20
|
+
children,
|
|
21
|
+
/* @__PURE__ */ jsx(ScrollRestoration, {}),
|
|
22
|
+
/* @__PURE__ */ jsx(Scripts, {})
|
|
23
|
+
] })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
5
26
|
export {
|
|
6
27
|
Layout
|
|
7
28
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Layout/Layout.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Links, Meta, Scripts, ScrollRestoration } from \"react-router\";\n\n// FIXME: This is not ideal as its client-level and we really need site-level\nconst allowIndexing = process.env.NODE_ENV === \"production\";\n\ninterface LayoutProps {\n\tchildren: React.ReactNode;\n}\n\nexport function Layout({ children }: LayoutProps) {\n\treturn (\n\t\t<html lang=\"en\">\n\t\t\t<head>\n\t\t\t\t<Meta />\n\t\t\t\t<meta charSet=\"utf-8\" />\n\t\t\t\t<meta\n\t\t\t\t\tname=\"viewport\"\n\t\t\t\t\tcontent=\"width=device-width,initial-scale=1\"\n\t\t\t\t/>\n\t\t\t\t{allowIndexing && (\n\t\t\t\t\t<meta name=\"robots\" content=\"noindex, nofollow\" />\n\t\t\t\t)}\n\t\t\t\t<Links />\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t{children}\n\t\t\t\t<ScrollRestoration />\n\t\t\t\t<Scripts />\n\t\t\t</body>\n\t\t</html>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "AAYG,SACC,KADD;AAZH,SAAS,OAAO,MAAM,SAAS,yBAAyB;AAGxD,MAAM,gBAAgB,QAAQ,IAAI,aAAa;AAMxC,SAAS,OAAO,EAAE,SAAS,GAAgB;AACjD,SACC,qBAAC,UAAK,MAAK,MACV;AAAA,yBAAC,UACA;AAAA,0BAAC,QAAK;AAAA,MACN,oBAAC,UAAK,SAAQ,SAAQ;AAAA,MACtB;AAAA,QAAC;AAAA;AAAA,UACA,MAAK;AAAA,UACL,SAAQ;AAAA;AAAA,MACT;AAAA,MACC,iBACA,oBAAC,UAAK,MAAK,UAAS,SAAQ,qBAAoB;AAAA,MAEjD,oBAAC,SAAM;AAAA,OACR;AAAA,IACA,qBAAC,UACC;AAAA;AAAA,MACD,oBAAC,qBAAkB;AAAA,MACnB,oBAAC,WAAQ;AAAA,OACV;AAAA,KACD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
function PreviewCivWrapper({
|
|
3
|
+
children,
|
|
4
|
+
civid,
|
|
5
|
+
onCivEnter,
|
|
6
|
+
highlighted,
|
|
7
|
+
register
|
|
8
|
+
}) {
|
|
9
|
+
const onMouseEnter = (e) => {
|
|
10
|
+
e.stopPropagation();
|
|
11
|
+
onCivEnter(civid);
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
style: highlighted === civid ? {
|
|
17
|
+
outlineOffset: 5,
|
|
18
|
+
outline: "rgb(217, 83, 30) solid 7px"
|
|
19
|
+
} : void 0,
|
|
20
|
+
onMouseEnter,
|
|
21
|
+
ref: register(civid),
|
|
22
|
+
children
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
5
26
|
export {
|
|
6
27
|
PreviewCivWrapper
|
|
7
28
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Preview/PreviewCivWrapper.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { PropsWithChildren, MouseEventHandler } from \"react\";\r\nimport type { PreviewContextState } from \"./PreviewPageWrapper.js\";\r\n\r\ntype PreviewCivWrapper = PropsWithChildren<{\r\n\tcivid: string;\r\n}> &\r\n\tPreviewContextState;\r\n\r\nexport function PreviewCivWrapper({\r\n\tchildren,\r\n\tcivid,\r\n\tonCivEnter,\r\n\thighlighted,\r\n\tregister,\r\n}: PreviewCivWrapper) {\r\n\tconst onMouseEnter: MouseEventHandler = (e) => {\r\n\t\te.stopPropagation();\r\n\t\tonCivEnter(civid);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<div\r\n\t\t\tstyle={\r\n\t\t\t\thighlighted === civid\r\n\t\t\t\t\t? {\r\n\t\t\t\t\t\t\toutlineOffset: 5,\r\n\t\t\t\t\t\t\toutline: \"rgb(217, 83, 30) solid 7px\",\r\n\t\t\t\t\t }\r\n\t\t\t\t\t: undefined\r\n\t\t\t}\r\n\t\t\tonMouseEnter={onMouseEnter}\r\n\t\t\tref={register(civid)}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t</div>\r\n\t);\r\n}\r\n"],
|
|
5
|
+
"mappings": "AAqBE;AAbK,SAAS,kBAAkB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAsB;AACrB,QAAM,eAAkC,CAAC,MAAM;AAC9C,MAAE,gBAAgB;AAClB,eAAW,KAAK;AAAA,EACjB;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OACC,gBAAgB,QACb;AAAA,QACA,eAAe;AAAA,QACf,SAAS;AAAA,MACT,IACA;AAAA,MAEJ;AAAA,MACA,KAAK,SAAS,KAAK;AAAA,MAElB;AAAA;AAAA,EACF;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import "../../chunk-XG5CMDEI.js";
|
|
12
|
-
import "../../chunk-2WII7C3O.js";
|
|
13
|
-
import "../../chunk-EWRVCIV6.js";
|
|
14
|
-
import "../../chunk-DG37VYL5.js";
|
|
15
|
-
import "../../chunk-GPTPACV2.js";
|
|
16
|
-
import "../../chunk-4LSFAAZW.js";
|
|
17
|
-
import "../../chunk-ZQUGFKHP.js";
|
|
18
|
-
import "../../chunk-5WRI5ZAA.js";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Section } from "../Section/Section.js";
|
|
3
|
+
import { usePreview } from "./PreviewPageWrapper.js";
|
|
4
|
+
function PreviewContent() {
|
|
5
|
+
const preview = usePreview();
|
|
6
|
+
if (!preview || !preview.pageData) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return /* @__PURE__ */ jsx(Section, { section: [preview.pageData.body] });
|
|
10
|
+
}
|
|
19
11
|
export {
|
|
20
12
|
PreviewContent
|
|
21
13
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Preview/PreviewContent.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Section } from \"../Section/Section.js\";\r\nimport { usePreview } from \"./PreviewPageWrapper.js\";\r\n\r\nexport function PreviewContent() {\r\n\tconst preview = usePreview();\r\n\r\n\tif (!preview || !preview.pageData) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn <Section section={[preview.pageData.body]} />;\r\n}\r\n"],
|
|
5
|
+
"mappings": "AAUQ;AAVR,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAEpB,SAAS,iBAAiB;AAChC,QAAM,UAAU,WAAW;AAE3B,MAAI,CAAC,WAAW,CAAC,QAAQ,UAAU;AAClC,WAAO;AAAA,EACR;AAEA,SAAO,oBAAC,WAAQ,SAAS,CAAC,QAAQ,SAAS,IAAI,GAAG;AACnD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,89 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
createContext,
|
|
4
|
+
useContext,
|
|
5
|
+
useMemo,
|
|
6
|
+
useEffect,
|
|
7
|
+
useState,
|
|
8
|
+
useRef
|
|
9
|
+
} from "react";
|
|
10
|
+
const PreviewContext = createContext(
|
|
11
|
+
void 0
|
|
12
|
+
);
|
|
13
|
+
const usePreview = () => useContext(PreviewContext);
|
|
14
|
+
const post = (message) => {
|
|
15
|
+
const parent = window.opener || window.parent;
|
|
16
|
+
const fullMessage = typeof message === "string" ? message : {
|
|
17
|
+
...message,
|
|
18
|
+
namespace: "sv_preview"
|
|
19
|
+
};
|
|
20
|
+
parent.postMessage(fullMessage, "*");
|
|
21
|
+
};
|
|
22
|
+
function PreviewPageWrapper({
|
|
23
|
+
children,
|
|
24
|
+
pageContent
|
|
25
|
+
}) {
|
|
26
|
+
const refs = useRef({});
|
|
27
|
+
const [highlighted, setHighlighted] = useState(
|
|
28
|
+
void 0
|
|
29
|
+
);
|
|
30
|
+
const [pageData, setPageData] = useState(
|
|
31
|
+
pageContent
|
|
32
|
+
);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
setPageData(pageContent);
|
|
35
|
+
}, [pageContent]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
post("init");
|
|
38
|
+
const handleMessage = ({ data }) => {
|
|
39
|
+
if (!data || !("namespace" in data) || data.namespace !== "sv_preview" || !("event" in data) || !("args" in data)) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const { event, args } = data;
|
|
43
|
+
if (event === "highlight") {
|
|
44
|
+
setHighlighted(args.civid);
|
|
45
|
+
}
|
|
46
|
+
if (event === "scrollTo") {
|
|
47
|
+
if (!refs.current[args.civid]) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
refs.current[args.civid].scrollIntoView({
|
|
51
|
+
behavior: "smooth",
|
|
52
|
+
block: "nearest"
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (event === "update") {
|
|
56
|
+
setPageData((prevPageData) => {
|
|
57
|
+
if (!prevPageData) return null;
|
|
58
|
+
return { ...prevPageData, body: args.body };
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
window.addEventListener("message", handleMessage);
|
|
63
|
+
return () => window.removeEventListener("message", handleMessage);
|
|
64
|
+
}, [setPageData]);
|
|
65
|
+
const previewContextState = useMemo(
|
|
66
|
+
() => ({
|
|
67
|
+
register: (civid) => {
|
|
68
|
+
return (ref) => refs.current[civid] = ref;
|
|
69
|
+
},
|
|
70
|
+
onCivEnter: (civid) => {
|
|
71
|
+
post({
|
|
72
|
+
event: "pbScrollTo",
|
|
73
|
+
args: { civid }
|
|
74
|
+
});
|
|
75
|
+
post({
|
|
76
|
+
event: "pbHighlight",
|
|
77
|
+
args: { civid }
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
highlighted,
|
|
81
|
+
pageData
|
|
82
|
+
}),
|
|
83
|
+
[highlighted, pageData]
|
|
84
|
+
);
|
|
85
|
+
return /* @__PURE__ */ jsx(PreviewContext.Provider, { value: previewContextState, children });
|
|
86
|
+
}
|
|
6
87
|
export {
|
|
7
88
|
PreviewPageWrapper,
|
|
8
89
|
usePreview
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Preview/PreviewPageWrapper.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { PropsWithChildren } from \"react\";\r\nimport {\r\n\tcreateContext,\r\n\tuseContext,\r\n\tuseMemo,\r\n\tuseEffect,\r\n\tuseState,\r\n\tuseRef,\r\n} from \"react\";\r\nimport type { CivProps, PageData } from \"../../types/index.js\";\r\n\r\nexport interface PreviewContextState {\r\n\tonCivEnter: (civid: string) => void;\r\n\thighlighted?: string;\r\n\tregister: (civid: string) => (ref: HTMLDivElement) => void;\r\n\tpageData: PageData<CivProps> | null;\r\n}\r\n\r\nconst PreviewContext = createContext<PreviewContextState | undefined>(\r\n\tundefined\r\n);\r\n\r\nexport const usePreview = (): PreviewContextState | undefined =>\r\n\tuseContext(PreviewContext);\r\n\r\ntype PostMessage =\r\n\t| \"init\"\r\n\t| { event: \"pbScrollTo\"; args: { civid: string } }\r\n\t| { event: \"pbHighlight\"; args: { civid: string } }\r\n\t| { event: \"pbUpdate\"; args: { body: CivProps } };\r\n\r\nconst post = (message: PostMessage) => {\r\n\tconst parent = window.opener || window.parent;\r\n\tconst fullMessage =\r\n\t\ttypeof message === \"string\"\r\n\t\t\t? message\r\n\t\t\t: {\r\n\t\t\t\t\t...message,\r\n\t\t\t\t\tnamespace: \"sv_preview\",\r\n\t\t\t };\r\n\r\n\tparent.postMessage(fullMessage, \"*\");\r\n};\r\n\r\nexport function PreviewPageWrapper({\r\n\tchildren,\r\n\tpageContent,\r\n}: PropsWithChildren<{ pageContent: PageData<CivProps> }>) {\r\n\tconst refs = useRef<Record<string, HTMLDivElement>>({});\r\n\tconst [highlighted, setHighlighted] = useState<string | undefined>(\r\n\t\tundefined\r\n\t);\r\n\tconst [pageData, setPageData] = useState<PageData<CivProps> | null>(\r\n\t\tpageContent\r\n\t);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetPageData(pageContent);\r\n\t}, [pageContent]);\r\n\r\n\tuseEffect(() => {\r\n\t\tpost(\"init\");\r\n\r\n\t\tconst handleMessage = ({ data }: WindowEventMap[\"message\"]) => {\r\n\t\t\tif (\r\n\t\t\t\t!data ||\r\n\t\t\t\t!(\"namespace\" in data) ||\r\n\t\t\t\tdata.namespace !== \"sv_preview\" ||\r\n\t\t\t\t!(\"event\" in data) ||\r\n\t\t\t\t!(\"args\" in data)\r\n\t\t\t) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst { event, args } = data;\r\n\r\n\t\t\tif (event === \"highlight\") {\r\n\t\t\t\tsetHighlighted(args.civid);\r\n\t\t\t}\r\n\r\n\t\t\tif (event === \"scrollTo\") {\r\n\t\t\t\tif (!refs.current[args.civid]) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\trefs.current[args.civid].scrollIntoView({\r\n\t\t\t\t\tbehavior: \"smooth\",\r\n\t\t\t\t\tblock: \"nearest\",\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (event === \"update\") {\r\n\t\t\t\tsetPageData((prevPageData) => {\r\n\t\t\t\t\tif (!prevPageData) return null;\r\n\t\t\t\t\treturn { ...prevPageData, body: args.body };\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\twindow.addEventListener(\"message\", handleMessage);\r\n\t\treturn () => window.removeEventListener(\"message\", handleMessage);\r\n\t}, [setPageData]);\r\n\r\n\tconst previewContextState = useMemo<PreviewContextState>(\r\n\t\t() => ({\r\n\t\t\tregister: (civid) => {\r\n\t\t\t\treturn (ref) => (refs.current[civid] = ref);\r\n\t\t\t},\r\n\t\t\tonCivEnter: (civid) => {\r\n\t\t\t\tpost({\r\n\t\t\t\t\tevent: \"pbScrollTo\",\r\n\t\t\t\t\targs: { civid },\r\n\t\t\t\t});\r\n\t\t\t\tpost({\r\n\t\t\t\t\tevent: \"pbHighlight\",\r\n\t\t\t\t\targs: { civid },\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\thighlighted,\r\n\t\t\tpageData,\r\n\t\t}),\r\n\t\t[highlighted, pageData]\r\n\t);\r\n\r\n\treturn (\r\n\t\t<PreviewContext.Provider value={previewContextState}>\r\n\t\t\t{children}\r\n\t\t</PreviewContext.Provider>\r\n\t);\r\n}\r\n"],
|
|
5
|
+
"mappings": "AA6HE;AA5HF;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAUP,MAAM,iBAAiB;AAAA,EACtB;AACD;AAEO,MAAM,aAAa,MACzB,WAAW,cAAc;AAQ1B,MAAM,OAAO,CAAC,YAAyB;AACtC,QAAM,SAAS,OAAO,UAAU,OAAO;AACvC,QAAM,cACL,OAAO,YAAY,WAChB,UACA;AAAA,IACA,GAAG;AAAA,IACH,WAAW;AAAA,EACX;AAEJ,SAAO,YAAY,aAAa,GAAG;AACpC;AAEO,SAAS,mBAAmB;AAAA,EAClC;AAAA,EACA;AACD,GAA2D;AAC1D,QAAM,OAAO,OAAuC,CAAC,CAAC;AACtD,QAAM,CAAC,aAAa,cAAc,IAAI;AAAA,IACrC;AAAA,EACD;AACA,QAAM,CAAC,UAAU,WAAW,IAAI;AAAA,IAC/B;AAAA,EACD;AAEA,YAAU,MAAM;AACf,gBAAY,WAAW;AAAA,EACxB,GAAG,CAAC,WAAW,CAAC;AAEhB,YAAU,MAAM;AACf,SAAK,MAAM;AAEX,UAAM,gBAAgB,CAAC,EAAE,KAAK,MAAiC;AAC9D,UACC,CAAC,QACD,EAAE,eAAe,SACjB,KAAK,cAAc,gBACnB,EAAE,WAAW,SACb,EAAE,UAAU,OACX;AACD;AAAA,MACD;AAEA,YAAM,EAAE,OAAO,KAAK,IAAI;AAExB,UAAI,UAAU,aAAa;AAC1B,uBAAe,KAAK,KAAK;AAAA,MAC1B;AAEA,UAAI,UAAU,YAAY;AACzB,YAAI,CAAC,KAAK,QAAQ,KAAK,KAAK,GAAG;AAC9B;AAAA,QACD;AAEA,aAAK,QAAQ,KAAK,KAAK,EAAE,eAAe;AAAA,UACvC,UAAU;AAAA,UACV,OAAO;AAAA,QACR,CAAC;AAAA,MACF;AAEA,UAAI,UAAU,UAAU;AACvB,oBAAY,CAAC,iBAAiB;AAC7B,cAAI,CAAC,aAAc,QAAO;AAC1B,iBAAO,EAAE,GAAG,cAAc,MAAM,KAAK,KAAK;AAAA,QAC3C,CAAC;AAAA,MACF;AAAA,IACD;AAEA,WAAO,iBAAiB,WAAW,aAAa;AAChD,WAAO,MAAM,OAAO,oBAAoB,WAAW,aAAa;AAAA,EACjE,GAAG,CAAC,WAAW,CAAC;AAEhB,QAAM,sBAAsB;AAAA,IAC3B,OAAO;AAAA,MACN,UAAU,CAAC,UAAU;AACpB,eAAO,CAAC,QAAS,KAAK,QAAQ,KAAK,IAAI;AAAA,MACxC;AAAA,MACA,YAAY,CAAC,UAAU;AACtB,aAAK;AAAA,UACJ,OAAO;AAAA,UACP,MAAM,EAAE,MAAM;AAAA,QACf,CAAC;AACD,aAAK;AAAA,UACJ,OAAO;AAAA,UACP,MAAM,EAAE,MAAM;AAAA,QACf,CAAC;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,CAAC,aAAa,QAAQ;AAAA,EACvB;AAEA,SACC,oBAAC,eAAe,UAAf,EAAwB,OAAO,qBAC9B,UACF;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
PreviewCivWrapper
|
|
6
|
-
} from "../../chunk-OEYLOZQK.js";
|
|
7
|
-
import {
|
|
8
|
-
PreviewPageWrapper,
|
|
9
|
-
usePreview
|
|
10
|
-
} from "../../chunk-P3WX4DFS.js";
|
|
11
|
-
import "../../chunk-F5L7DWHD.js";
|
|
12
|
-
import "../../chunk-MPAGXIUB.js";
|
|
13
|
-
import "../../chunk-CMALSZV3.js";
|
|
14
|
-
import "../../chunk-VV3NKXSX.js";
|
|
15
|
-
import "../../chunk-EG5F4AP4.js";
|
|
16
|
-
import "../../chunk-XG5CMDEI.js";
|
|
17
|
-
import "../../chunk-2WII7C3O.js";
|
|
18
|
-
import "../../chunk-EWRVCIV6.js";
|
|
19
|
-
import "../../chunk-DG37VYL5.js";
|
|
20
|
-
import "../../chunk-GPTPACV2.js";
|
|
21
|
-
import "../../chunk-4LSFAAZW.js";
|
|
22
|
-
import "../../chunk-ZQUGFKHP.js";
|
|
23
|
-
import "../../chunk-5WRI5ZAA.js";
|
|
24
|
-
export {
|
|
25
|
-
PreviewCivWrapper,
|
|
26
|
-
PreviewContent,
|
|
27
|
-
PreviewPageWrapper,
|
|
28
|
-
usePreview
|
|
29
|
-
};
|
|
1
|
+
export * from "./PreviewCivWrapper.js";
|
|
2
|
+
export * from "./PreviewPageWrapper.js";
|
|
3
|
+
export * from "./PreviewContent.js";
|
|
30
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Preview/index.ts"],
|
|
4
|
+
"sourcesContent": ["export * from \"./PreviewCivWrapper.js\";\r\nexport * from \"./PreviewPageWrapper.js\";\r\nexport * from \"./PreviewContent.js\";\r\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "../../chunk-VV3NKXSX.js";
|
|
10
|
-
import "../../chunk-EG5F4AP4.js";
|
|
11
|
-
import "../../chunk-XG5CMDEI.js";
|
|
12
|
-
import "../../chunk-2WII7C3O.js";
|
|
13
|
-
import "../../chunk-EWRVCIV6.js";
|
|
14
|
-
import "../../chunk-DG37VYL5.js";
|
|
15
|
-
import "../../chunk-GPTPACV2.js";
|
|
16
|
-
import "../../chunk-4LSFAAZW.js";
|
|
17
|
-
import "../../chunk-ZQUGFKHP.js";
|
|
18
|
-
import "../../chunk-5WRI5ZAA.js";
|
|
1
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SectionItem } from "./SectionItem.js";
|
|
3
|
+
function Section({ section }) {
|
|
4
|
+
if (!Array.isArray(section) || !section.length) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
return /* @__PURE__ */ jsx(Fragment, { children: section.map((civ) => /* @__PURE__ */ jsx(SectionItem, { ...civ }, civ.civid)) });
|
|
8
|
+
}
|
|
19
9
|
export {
|
|
20
10
|
Section
|
|
21
11
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Section/Section.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { SectionProps } from \"./Section.types.js\";\r\nimport { SectionItem } from \"./SectionItem.js\";\r\n\r\nexport function Section({ section }: SectionProps) {\r\n\tif (!Array.isArray(section) || !section.length) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{section.map((civ) => (\r\n\t\t\t\t<SectionItem key={civ.civid} {...civ} />\r\n\t\t\t))}\r\n\t\t</>\r\n\t);\r\n}\r\n"],
|
|
5
|
+
"mappings": "AASE,mBAEE,WAFF;AARF,SAAS,mBAAmB;AAErB,SAAS,QAAQ,EAAE,QAAQ,GAAiB;AAClD,MAAI,CAAC,MAAM,QAAQ,OAAO,KAAK,CAAC,QAAQ,QAAQ;AAC/C,WAAO;AAAA,EACR;AAEA,SACC,gCACE,kBAAQ,IAAI,CAAC,QACb,oBAAC,eAA6B,GAAG,OAAf,IAAI,KAAgB,CACtC,GACF;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import "../../chunk-2WII7C3O.js";
|
|
13
|
-
import "../../chunk-EWRVCIV6.js";
|
|
14
|
-
import "../../chunk-DG37VYL5.js";
|
|
15
|
-
import "../../chunk-GPTPACV2.js";
|
|
16
|
-
import "../../chunk-4LSFAAZW.js";
|
|
17
|
-
import "../../chunk-ZQUGFKHP.js";
|
|
18
|
-
import "../../chunk-5WRI5ZAA.js";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PreviewCivWrapper } from "../Preview/index.js";
|
|
3
|
+
import { usePreview } from "../Preview/PreviewPageWrapper.js";
|
|
4
|
+
import { SectionItemCiv } from "./SectionItemCiv.js";
|
|
5
|
+
function SectionItem(civ) {
|
|
6
|
+
const preview = usePreview();
|
|
7
|
+
if (!preview) {
|
|
8
|
+
return /* @__PURE__ */ jsx(SectionItemCiv, { ...civ });
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ jsx(PreviewCivWrapper, { civid: civ.civid, ...preview, children: /* @__PURE__ */ jsx(SectionItemCiv, { ...civ }) });
|
|
11
|
+
}
|
|
19
12
|
export {
|
|
20
13
|
SectionItem
|
|
21
14
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Section/SectionItem.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { CivProps } from \"../../types/index.js\";\r\nimport { PreviewCivWrapper } from \"../Preview/index.js\";\r\nimport { usePreview } from \"../Preview/PreviewPageWrapper.js\";\r\nimport { SectionItemCiv } from \"./SectionItemCiv.js\";\r\n\r\nexport function SectionItem(civ: CivProps) {\r\n\tconst preview = usePreview();\r\n\r\n\tif (!preview) {\r\n\t\treturn <SectionItemCiv {...civ} />;\r\n\t}\r\n\r\n\treturn (\r\n\t\t<PreviewCivWrapper civid={civ.civid} {...preview}>\r\n\t\t\t<SectionItemCiv {...civ} />\r\n\t\t</PreviewCivWrapper>\r\n\t);\r\n}\r\n"],
|
|
5
|
+
"mappings": "AASS;AART,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAExB,SAAS,YAAY,KAAe;AAC1C,QAAM,UAAU,WAAW;AAE3B,MAAI,CAAC,SAAS;AACb,WAAO,oBAAC,kBAAgB,GAAG,KAAK;AAAA,EACjC;AAEA,SACC,oBAAC,qBAAkB,OAAO,IAAI,OAAQ,GAAG,SACxC,8BAAC,kBAAgB,GAAG,KAAK,GAC1B;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useComponentMap } from "../../contexts/index.js";
|
|
3
|
+
function SectionItemCiv(civ) {
|
|
4
|
+
const map = useComponentMap();
|
|
5
|
+
if (civ === void 0) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
map.Error,
|
|
8
|
+
{
|
|
9
|
+
status: 500,
|
|
10
|
+
message: "Is the CMS API running? I bet it isn't \u{1F609}"
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
const Component = map.civs[civ.component];
|
|
15
|
+
if (Component === void 0) {
|
|
16
|
+
return /* @__PURE__ */ jsx(map.Unknown, { ...civ });
|
|
17
|
+
}
|
|
18
|
+
return /* @__PURE__ */ jsx(Component, { ...civ });
|
|
19
|
+
}
|
|
19
20
|
export {
|
|
20
21
|
SectionItemCiv
|
|
21
22
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Section/SectionItemCiv.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useComponentMap } from \"../../contexts/index.js\";\r\nimport type { CivProps } from \"../../types/index.js\";\r\n\r\nexport function SectionItemCiv(civ: CivProps) {\r\n\tconst map = useComponentMap();\r\n\r\n\tif (civ === undefined) {\r\n\t\treturn (\r\n\t\t\t<map.Error\r\n\t\t\t\tstatus={500}\r\n\t\t\t\tmessage=\"Is the CMS API running? I bet it isn't \uD83D\uDE09\"\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\tconst Component = map.civs[civ.component];\r\n\r\n\tif (Component === undefined) {\r\n\t\treturn <map.Unknown {...civ} />;\r\n\t}\r\n\r\n\treturn <Component {...civ} />;\r\n}\r\n"],
|
|
5
|
+
"mappings": "AAQG;AARH,SAAS,uBAAuB;AAGzB,SAAS,eAAe,KAAe;AAC7C,QAAM,MAAM,gBAAgB;AAE5B,MAAI,QAAQ,QAAW;AACtB,WACC;AAAA,MAAC,IAAI;AAAA,MAAJ;AAAA,QACA,QAAQ;AAAA,QACR,SAAQ;AAAA;AAAA,IACT;AAAA,EAEF;AAEA,QAAM,YAAY,IAAI,KAAK,IAAI,SAAS;AAExC,MAAI,cAAc,QAAW;AAC5B,WAAO,oBAAC,IAAI,SAAJ,EAAa,GAAG,KAAK;AAAA,EAC9B;AAEA,SAAO,oBAAC,aAAW,GAAG,KAAK;AAC5B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "../../chunk-4GSRDXHP.js";
|
|
6
|
-
import "../../chunk-OEYLOZQK.js";
|
|
7
|
-
import "../../chunk-P3WX4DFS.js";
|
|
8
|
-
import "../../chunk-F5L7DWHD.js";
|
|
9
|
-
import "../../chunk-MPAGXIUB.js";
|
|
10
|
-
import "../../chunk-CMALSZV3.js";
|
|
11
|
-
import "../../chunk-VV3NKXSX.js";
|
|
12
|
-
import "../../chunk-EG5F4AP4.js";
|
|
13
|
-
import "../../chunk-XG5CMDEI.js";
|
|
14
|
-
import "../../chunk-2WII7C3O.js";
|
|
15
|
-
import "../../chunk-EWRVCIV6.js";
|
|
16
|
-
import "../../chunk-DG37VYL5.js";
|
|
17
|
-
import "../../chunk-GPTPACV2.js";
|
|
18
|
-
import "../../chunk-4LSFAAZW.js";
|
|
19
|
-
import "../../chunk-ZQUGFKHP.js";
|
|
20
|
-
import "../../chunk-5WRI5ZAA.js";
|
|
21
|
-
export {
|
|
22
|
-
Section,
|
|
23
|
-
SectionItem,
|
|
24
|
-
SectionItemCiv
|
|
25
|
-
};
|
|
1
|
+
export * from "./Section.js";
|
|
2
|
+
export * from "./SectionItem.js";
|
|
3
|
+
export * from "./SectionItemCiv.js";
|
|
4
|
+
export * from "./Section.types.js";
|
|
26
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [],
|
|
4
|
-
"sourcesContent": [],
|
|
5
|
-
"mappings": "",
|
|
3
|
+
"sources": ["../../../src/components/Section/index.ts"],
|
|
4
|
+
"sourcesContent": ["export * from \"./Section.js\";\r\nexport * from \"./SectionItem.js\";\r\nexport * from \"./SectionItemCiv.js\";\r\nexport * from \"./Section.types.js\";\r\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|