@simpleview/cms-foundation 0.0.24 → 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.
Files changed (121) hide show
  1. package/dist/components/App/App.js +5 -4
  2. package/dist/components/App/App.js.map +3 -3
  3. package/dist/components/App/index.js +1 -8
  4. package/dist/components/App/index.js.map +3 -3
  5. package/dist/components/Error/Error.js +11 -4
  6. package/dist/components/Error/Error.js.map +3 -3
  7. package/dist/components/Error/Error.types.js +0 -1
  8. package/dist/components/Error/index.js +2 -9
  9. package/dist/components/Error/index.js.map +3 -3
  10. package/dist/components/Layout/Layout.js +25 -4
  11. package/dist/components/Layout/Layout.js.map +3 -3
  12. package/dist/components/Layout/index.js +1 -8
  13. package/dist/components/Layout/index.js.map +3 -3
  14. package/dist/components/Preview/PreviewCivWrapper.js +25 -4
  15. package/dist/components/Preview/PreviewCivWrapper.js.map +3 -3
  16. package/dist/components/Preview/PreviewContent.js +10 -18
  17. package/dist/components/Preview/PreviewContent.js.map +3 -3
  18. package/dist/components/Preview/PreviewPageWrapper.js +85 -4
  19. package/dist/components/Preview/PreviewPageWrapper.js.map +3 -3
  20. package/dist/components/Preview/index.js +3 -29
  21. package/dist/components/Preview/index.js.map +3 -3
  22. package/dist/components/Section/Section.js +8 -18
  23. package/dist/components/Section/Section.js.map +3 -3
  24. package/dist/components/Section/Section.types.js +0 -1
  25. package/dist/components/Section/SectionItem.js +11 -18
  26. package/dist/components/Section/SectionItem.js.map +3 -3
  27. package/dist/components/Section/SectionItemCiv.js +19 -18
  28. package/dist/components/Section/SectionItemCiv.js.map +3 -3
  29. package/dist/components/Section/index.js +4 -25
  30. package/dist/components/Section/index.js.map +3 -3
  31. package/dist/components/Unknown/Unknown.js +28 -6
  32. package/dist/components/Unknown/Unknown.js.map +3 -3
  33. package/dist/components/Unknown/index.js +1 -10
  34. package/dist/components/Unknown/index.js.map +3 -3
  35. package/dist/components/index.js +6 -47
  36. package/dist/components/index.js.map +3 -3
  37. package/dist/contexts/ComponentMapContext.js +9 -19
  38. package/dist/contexts/ComponentMapContext.js.map +3 -3
  39. package/dist/contexts/index.js +1 -23
  40. package/dist/contexts/index.js.map +3 -3
  41. package/dist/routes/index.js +2 -7131
  42. package/dist/routes/index.js.map +4 -4
  43. package/dist/types/cms.js +0 -1
  44. package/dist/types/index.js +1 -2
  45. package/dist/types/index.js.map +3 -3
  46. package/dist/types/src/vite/config.d.ts +1 -0
  47. package/dist/types/src/vite/index.d.ts +1 -0
  48. package/dist/utils/getCmsUrl.js +5 -4
  49. package/dist/utils/getCmsUrl.js.map +3 -3
  50. package/dist/utils/getPageContent.js +50 -5
  51. package/dist/utils/getPageContent.js.map +3 -3
  52. package/dist/utils/index.js +2 -11
  53. package/dist/utils/index.js.map +3 -3
  54. package/dist/vite/config.js +37 -0
  55. package/dist/vite/config.js.map +7 -0
  56. package/dist/vite/index.js +2 -0
  57. package/dist/vite/index.js.map +7 -0
  58. package/package.json +11 -5
  59. package/dist/chunk-2WII7C3O.js +0 -31
  60. package/dist/chunk-2WII7C3O.js.map +0 -7
  61. package/dist/chunk-4LSFAAZW.js +0 -1
  62. package/dist/chunk-4LSFAAZW.js.map +0 -7
  63. package/dist/chunk-5WRI5ZAA.js +0 -31
  64. package/dist/chunk-5WRI5ZAA.js.map +0 -7
  65. package/dist/chunk-CMALSZV3.js +0 -1
  66. package/dist/chunk-CMALSZV3.js.map +0 -7
  67. package/dist/chunk-DG37VYL5.js +0 -1
  68. package/dist/chunk-DG37VYL5.js.map +0 -7
  69. package/dist/chunk-EEKFLXZI.js +0 -11
  70. package/dist/chunk-EEKFLXZI.js.map +0 -7
  71. package/dist/chunk-EG5F4AP4.js +0 -1
  72. package/dist/chunk-EG5F4AP4.js.map +0 -7
  73. package/dist/chunk-EWRVCIV6.js +0 -1
  74. package/dist/chunk-EWRVCIV6.js.map +0 -7
  75. package/dist/chunk-F5L7DWHD.js +0 -1
  76. package/dist/chunk-F5L7DWHD.js.map +0 -7
  77. package/dist/chunk-FJML4RHB.js +0 -59
  78. package/dist/chunk-FJML4RHB.js.map +0 -7
  79. package/dist/chunk-GPTPACV2.js +0 -33
  80. package/dist/chunk-GPTPACV2.js.map +0 -7
  81. package/dist/chunk-MPAGXIUB.js +0 -11
  82. package/dist/chunk-MPAGXIUB.js.map +0 -7
  83. package/dist/chunk-OEYLOZQK.js +0 -31
  84. package/dist/chunk-OEYLOZQK.js.map +0 -7
  85. package/dist/chunk-P3WX4DFS.js +0 -93
  86. package/dist/chunk-P3WX4DFS.js.map +0 -7
  87. package/dist/chunk-SPYOQSRR.js +0 -90
  88. package/dist/chunk-SPYOQSRR.js.map +0 -7
  89. package/dist/chunk-VV3NKXSX.js +0 -17
  90. package/dist/chunk-VV3NKXSX.js.map +0 -7
  91. package/dist/chunk-XG5CMDEI.js +0 -1
  92. package/dist/chunk-XG5CMDEI.js.map +0 -7
  93. package/dist/chunk-ZQUGFKHP.js +0 -1
  94. package/dist/chunk-ZQUGFKHP.js.map +0 -7
  95. /package/dist/types/{components → src/components}/App/App.d.ts +0 -0
  96. /package/dist/types/{components → src/components}/App/index.d.ts +0 -0
  97. /package/dist/types/{components → src/components}/Error/Error.d.ts +0 -0
  98. /package/dist/types/{components → src/components}/Error/Error.types.d.ts +0 -0
  99. /package/dist/types/{components → src/components}/Error/index.d.ts +0 -0
  100. /package/dist/types/{components → src/components}/Layout/Layout.d.ts +0 -0
  101. /package/dist/types/{components → src/components}/Layout/index.d.ts +0 -0
  102. /package/dist/types/{components → src/components}/Preview/PreviewCivWrapper.d.ts +0 -0
  103. /package/dist/types/{components → src/components}/Preview/PreviewContent.d.ts +0 -0
  104. /package/dist/types/{components → src/components}/Preview/PreviewPageWrapper.d.ts +0 -0
  105. /package/dist/types/{components → src/components}/Preview/index.d.ts +0 -0
  106. /package/dist/types/{components → src/components}/Section/Section.d.ts +0 -0
  107. /package/dist/types/{components → src/components}/Section/Section.types.d.ts +0 -0
  108. /package/dist/types/{components → src/components}/Section/SectionItem.d.ts +0 -0
  109. /package/dist/types/{components → src/components}/Section/SectionItemCiv.d.ts +0 -0
  110. /package/dist/types/{components → src/components}/Section/index.d.ts +0 -0
  111. /package/dist/types/{components → src/components}/Unknown/Unknown.d.ts +0 -0
  112. /package/dist/types/{components → src/components}/Unknown/index.d.ts +0 -0
  113. /package/dist/types/{components → src/components}/index.d.ts +0 -0
  114. /package/dist/types/{contexts → src/contexts}/ComponentMapContext.d.ts +0 -0
  115. /package/dist/types/{contexts → src/contexts}/index.d.ts +0 -0
  116. /package/dist/types/{routes → src/routes}/index.d.ts +0 -0
  117. /package/dist/types/{types → src/types}/cms.d.ts +0 -0
  118. /package/dist/types/{types → src/types}/index.d.ts +0 -0
  119. /package/dist/types/{utils → src/utils}/getCmsUrl.d.ts +0 -0
  120. /package/dist/types/{utils → src/utils}/getPageContent.d.ts +0 -0
  121. /package/dist/types/{utils → src/utils}/index.d.ts +0 -0
@@ -1,9 +1,31 @@
1
- import {
2
- Unknown
3
- } from "../../chunk-GPTPACV2.js";
4
- import "../../chunk-4LSFAAZW.js";
5
- import "../../chunk-ZQUGFKHP.js";
6
- import "../../chunk-5WRI5ZAA.js";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import {} from "../../types/index.js";
3
+ const Unknown = ({ civid, name, type, component }) => {
4
+ return /* @__PURE__ */ jsxs("div", { className: "bg-red-900 text-white p-6 my-5 flex flex-col rounded-lg", children: [
5
+ /* @__PURE__ */ jsxs("div", { children: [
6
+ /* @__PURE__ */ jsx("strong", { children: "Unknown Component" }),
7
+ component && /* @__PURE__ */ jsxs(Fragment, { children: [
8
+ /* @__PURE__ */ jsx("span", { children: " " }),
9
+ /* @__PURE__ */ jsxs("span", { children: [
10
+ "(",
11
+ component,
12
+ ")"
13
+ ] })
14
+ ] })
15
+ ] }),
16
+ /* @__PURE__ */ jsxs("div", { children: [
17
+ "civid: ",
18
+ civid
19
+ ] }),
20
+ /* @__PURE__ */ jsxs("div", { children: [
21
+ "name: ",
22
+ name,
23
+ " (",
24
+ type,
25
+ ")"
26
+ ] })
27
+ ] });
28
+ };
7
29
  export {
8
30
  Unknown
9
31
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
3
+ "sources": ["../../../src/components/Unknown/Unknown.tsx"],
4
+ "sourcesContent": ["import { type CivProps } from \"../../types/index.js\";\n\nexport const Unknown = ({ civid, name, type, component }: CivProps) => {\n\treturn (\n\t\t<div className=\"bg-red-900 text-white p-6 my-5 flex flex-col rounded-lg\">\n\t\t\t<div>\n\t\t\t\t<strong>Unknown Component</strong>\n\t\t\t\t{component && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<span> </span>\n\t\t\t\t\t\t<span>({component})</span>\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<div>civid: {civid}</div>\n\t\t\t<div>\n\t\t\t\tname: {name} ({type})\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"],
5
+ "mappings": "AAMI,SAEC,UAFD,KAIE,YAJF;AANJ,eAA8B;AAEvB,MAAM,UAAU,CAAC,EAAE,OAAO,MAAM,MAAM,UAAU,MAAgB;AACtE,SACC,qBAAC,SAAI,WAAU,2DACd;AAAA,yBAAC,SACA;AAAA,0BAAC,YAAO,+BAAiB;AAAA,MACxB,aACA,iCACC;AAAA,4BAAC,UAAK,eAAC;AAAA,QACP,qBAAC,UAAK;AAAA;AAAA,UAAE;AAAA,UAAU;AAAA,WAAC;AAAA,SACpB;AAAA,OAEF;AAAA,IACA,qBAAC,SAAI;AAAA;AAAA,MAAQ;AAAA,OAAM;AAAA,IACnB,qBAAC,SAAI;AAAA;AAAA,MACG;AAAA,MAAK;AAAA,MAAG;AAAA,MAAK;AAAA,OACrB;AAAA,KACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,2 @@
1
- import "../../chunk-DG37VYL5.js";
2
- import {
3
- Unknown
4
- } from "../../chunk-GPTPACV2.js";
5
- import "../../chunk-4LSFAAZW.js";
6
- import "../../chunk-ZQUGFKHP.js";
7
- import "../../chunk-5WRI5ZAA.js";
8
- export {
9
- Unknown
10
- };
1
+ export * from "./Unknown.js";
11
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
3
+ "sources": ["../../../src/components/Unknown/index.ts"],
4
+ "sourcesContent": ["export * from \"./Unknown.js\";\r\n"],
5
+ "mappings": "AAAA,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,48 +1,7 @@
1
- import {
2
- PreviewContent,
3
- Section,
4
- SectionItem,
5
- SectionItemCiv
6
- } from "../chunk-SPYOQSRR.js";
7
- import {
8
- PreviewCivWrapper
9
- } from "../chunk-OEYLOZQK.js";
10
- import {
11
- PreviewPageWrapper,
12
- usePreview
13
- } from "../chunk-P3WX4DFS.js";
14
- import "../chunk-F5L7DWHD.js";
15
- import {
16
- App
17
- } from "../chunk-MPAGXIUB.js";
18
- import "../chunk-CMALSZV3.js";
19
- import {
20
- Error
21
- } from "../chunk-VV3NKXSX.js";
22
- import "../chunk-EG5F4AP4.js";
23
- import "../chunk-XG5CMDEI.js";
24
- import {
25
- Layout
26
- } from "../chunk-2WII7C3O.js";
27
- import "../chunk-EWRVCIV6.js";
28
- import "../chunk-DG37VYL5.js";
29
- import {
30
- Unknown
31
- } from "../chunk-GPTPACV2.js";
32
- import "../chunk-4LSFAAZW.js";
33
- import "../chunk-ZQUGFKHP.js";
34
- import "../chunk-5WRI5ZAA.js";
35
- export {
36
- App,
37
- Error,
38
- Layout,
39
- PreviewCivWrapper,
40
- PreviewContent,
41
- PreviewPageWrapper,
42
- Section,
43
- SectionItem,
44
- SectionItemCiv,
45
- Unknown,
46
- usePreview
47
- };
1
+ export * from "./App/index.js";
2
+ export * from "./Error/index.js";
3
+ export * from "./Layout/index.js";
4
+ export * from "./Preview/index.js";
5
+ export * from "./Section/index.js";
6
+ export * from "./Unknown/index.js";
48
7
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
3
+ "sources": ["../../src/components/index.ts"],
4
+ "sourcesContent": ["export * from \"./App/index.js\";\r\nexport * from \"./Error/index.js\";\r\nexport * from \"./Layout/index.js\";\r\nexport * from \"./Preview/index.js\";\r\nexport * from \"./Section/index.js\";\r\nexport * from \"./Unknown/index.js\";\r\n"],
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,22 +1,12 @@
1
- import {
2
- ComponentMapProvider,
3
- useComponentMap
4
- } from "../chunk-SPYOQSRR.js";
5
- import "../chunk-OEYLOZQK.js";
6
- import "../chunk-P3WX4DFS.js";
7
- import "../chunk-F5L7DWHD.js";
8
- import "../chunk-MPAGXIUB.js";
9
- import "../chunk-CMALSZV3.js";
10
- import "../chunk-VV3NKXSX.js";
11
- import "../chunk-EG5F4AP4.js";
12
- import "../chunk-XG5CMDEI.js";
13
- import "../chunk-2WII7C3O.js";
14
- import "../chunk-EWRVCIV6.js";
15
- import "../chunk-DG37VYL5.js";
16
- import "../chunk-GPTPACV2.js";
17
- import "../chunk-4LSFAAZW.js";
18
- import "../chunk-ZQUGFKHP.js";
19
- import "../chunk-5WRI5ZAA.js";
1
+ import { Unknown, Error } from "../components/index.js";
2
+ import { createContext, useContext } from "react";
3
+ const ComponentMapContext = createContext({
4
+ civs: {},
5
+ Error,
6
+ Unknown
7
+ });
8
+ const ComponentMapProvider = ComponentMapContext.Provider;
9
+ const useComponentMap = () => useContext(ComponentMapContext);
20
10
  export {
21
11
  ComponentMapProvider,
22
12
  useComponentMap
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
3
+ "sources": ["../../src/contexts/ComponentMapContext.tsx"],
4
+ "sourcesContent": ["import { Unknown, Error, type ErrorProps } from \"../components/index.js\";\r\nimport type { CivProps, ComponentMap } from \"../types/index.js\";\r\nimport { createContext, useContext, type FC } from \"react\";\r\n\r\nconst ComponentMapContext = createContext<{\r\n\tcivs: ComponentMap;\r\n\tError: FC<ErrorProps>;\r\n\tUnknown: FC<CivProps>;\r\n}>({\r\n\tcivs: {},\r\n\tError,\r\n\tUnknown,\r\n});\r\n\r\nexport const ComponentMapProvider = ComponentMapContext.Provider;\r\n\r\nexport const useComponentMap = () => useContext(ComponentMapContext);\r\n"],
5
+ "mappings": "AAAA,SAAS,SAAS,aAA8B;AAEhD,SAAS,eAAe,kBAA2B;AAEnD,MAAM,sBAAsB,cAIzB;AAAA,EACF,MAAM,CAAC;AAAA,EACP;AAAA,EACA;AACD,CAAC;AAEM,MAAM,uBAAuB,oBAAoB;AAEjD,MAAM,kBAAkB,MAAM,WAAW,mBAAmB;",
6
6
  "names": []
7
7
  }
@@ -1,24 +1,2 @@
1
- import {
2
- ComponentMapProvider,
3
- useComponentMap
4
- } from "../chunk-SPYOQSRR.js";
5
- import "../chunk-OEYLOZQK.js";
6
- import "../chunk-P3WX4DFS.js";
7
- import "../chunk-F5L7DWHD.js";
8
- import "../chunk-MPAGXIUB.js";
9
- import "../chunk-CMALSZV3.js";
10
- import "../chunk-VV3NKXSX.js";
11
- import "../chunk-EG5F4AP4.js";
12
- import "../chunk-XG5CMDEI.js";
13
- import "../chunk-2WII7C3O.js";
14
- import "../chunk-EWRVCIV6.js";
15
- import "../chunk-DG37VYL5.js";
16
- import "../chunk-GPTPACV2.js";
17
- import "../chunk-4LSFAAZW.js";
18
- import "../chunk-ZQUGFKHP.js";
19
- import "../chunk-5WRI5ZAA.js";
20
- export {
21
- ComponentMapProvider,
22
- useComponentMap
23
- };
1
+ export * from "./ComponentMapContext.js";
24
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
3
+ "sources": ["../../src/contexts/index.ts"],
4
+ "sourcesContent": ["export * from \"./ComponentMapContext.js\";\r\n"],
5
+ "mappings": "AAAA,cAAc;",
6
6
  "names": []
7
7
  }