@uniweb/build 0.6.11 → 0.6.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "0.6.11",
3
+ "version": "0.6.13",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -50,9 +50,9 @@
50
50
  "sharp": "^0.33.2"
51
51
  },
52
52
  "optionalDependencies": {
53
- "@uniweb/runtime": "0.5.17",
53
+ "@uniweb/content-reader": "1.1.2",
54
54
  "@uniweb/schemas": "0.2.1",
55
- "@uniweb/content-reader": "1.1.2"
55
+ "@uniweb/runtime": "0.5.19"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
@@ -61,7 +61,7 @@
61
61
  "@tailwindcss/vite": "^4.0.0",
62
62
  "@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
63
63
  "vite-plugin-svgr": "^4.0.0",
64
- "@uniweb/core": "0.4.4"
64
+ "@uniweb/core": "0.4.6"
65
65
  },
66
66
  "peerDependenciesMeta": {
67
67
  "vite": {
package/src/prerender.js CHANGED
@@ -900,7 +900,7 @@ function injectContent(shell, renderedContent, page, siteContent) {
900
900
  contentForJson.theme = { ...contentForJson.theme }
901
901
  delete contentForJson.theme.css
902
902
  }
903
- const contentScript = `<script id="__SITE_CONTENT__" type="application/json">${JSON.stringify(contentForJson)}</script>`
903
+ const contentScript = `<script id="__SITE_CONTENT__" type="application/json">${JSON.stringify(contentForJson).replace(/</g, '\\u003c')}</script>`
904
904
  if (html.includes('__SITE_CONTENT__')) {
905
905
  // Replace existing site content with updated version (includes expanded dynamic routes)
906
906
  // Match script tag with attributes in any order
@@ -917,7 +917,7 @@ function injectContent(shell, renderedContent, page, siteContent) {
917
917
 
918
918
  // Inject icon cache so client can render icons immediately without CDN fetches
919
919
  if (siteContent._iconCache) {
920
- const iconScript = `<script id="__ICON_CACHE__" type="application/json">${JSON.stringify(siteContent._iconCache)}</script>`
920
+ const iconScript = `<script id="__ICON_CACHE__" type="application/json">${JSON.stringify(siteContent._iconCache).replace(/</g, '\\u003c')}</script>`
921
921
  if (html.includes('__ICON_CACHE__')) {
922
922
  html = html.replace(
923
923
  /<script[^>]*id="__ICON_CACHE__"[^>]*>[\s\S]*?<\/script>/,
@@ -380,7 +380,7 @@ async function processMarkdownFile(filePath, id, siteRoot, defaultStableId = nul
380
380
  const section = {
381
381
  id,
382
382
  stableId,
383
- component: type || component || 'Section',
383
+ type: type || component || null, // frontmatter: type > component (legacy)
384
384
  preset,
385
385
  input,
386
386
  params: { ...params, ...props },
@@ -937,7 +937,7 @@ export function siteContentPlugin(options = {}) {
937
937
 
938
938
  // Inject content as JSON script tag
939
939
  if (inject) {
940
- headInjection += ` <script type="application/json" id="${variableName}">${JSON.stringify(contentToInject)}</script>\n`
940
+ headInjection += ` <script type="application/json" id="${variableName}">${JSON.stringify(contentToInject).replace(/</g, '\\u003c')}</script>\n`
941
941
  }
942
942
 
943
943
  if (!headInjection) return html