@bagelink/blox 1.19.4 → 1.20.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Bagel Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/ssg/cli.mjs CHANGED
File without changes
@@ -33,10 +33,10 @@ function timestamp(value) {
33
33
  if (typeof value !== "string" || !value.trim()) return void 0;
34
34
  return Number.isNaN(Date.parse(value)) ? void 0 : value;
35
35
  }
36
- function pageLastmod(data) {
36
+ function pageLastmod(data, override) {
37
37
  var _a, _b;
38
38
  const primary = (_a = llmArtifacts.primaryContextEntry(data == null ? void 0 : data.contexts)) == null ? void 0 : _a.ctx;
39
- return timestamp(primary == null ? void 0 : primary.updated_at) ?? timestamp(primary == null ? void 0 : primary.modified_at) ?? timestamp(primary == null ? void 0 : primary.created_at) ?? timestamp((_b = data == null ? void 0 : data.page) == null ? void 0 : _b.content_updated_at);
39
+ return timestamp(override == null ? void 0 : override.modifiedTime) ?? timestamp(override == null ? void 0 : override.publishedTime) ?? timestamp(primary == null ? void 0 : primary.updated_at) ?? timestamp(primary == null ? void 0 : primary.modified_at) ?? timestamp(primary == null ? void 0 : primary.created_at) ?? timestamp((_b = data == null ? void 0 : data.page) == null ? void 0 : _b.content_updated_at);
40
40
  }
41
41
  async function renderBloxSsgPage(options) {
42
42
  var _a, _b, _c, _d, _e;
@@ -130,7 +130,7 @@ ${jsonLd}`;
130
130
  head,
131
131
  htmlAttrs,
132
132
  teleports: ssrContext.teleports,
133
- lastmod: pageLastmod(seoData),
133
+ lastmod: pageLastmod(seoData, seoOverride),
134
134
  llm: llmEntry,
135
135
  noindex: pageNoindex
136
136
  };
@@ -10,10 +10,10 @@ function timestamp(value) {
10
10
  if (typeof value !== "string" || !value.trim()) return void 0;
11
11
  return Number.isNaN(Date.parse(value)) ? void 0 : value;
12
12
  }
13
- function pageLastmod(data) {
13
+ function pageLastmod(data, override) {
14
14
  var _a, _b;
15
15
  const primary = (_a = primaryContextEntry(data == null ? void 0 : data.contexts)) == null ? void 0 : _a.ctx;
16
- return timestamp(primary == null ? void 0 : primary.updated_at) ?? timestamp(primary == null ? void 0 : primary.modified_at) ?? timestamp(primary == null ? void 0 : primary.created_at) ?? timestamp((_b = data == null ? void 0 : data.page) == null ? void 0 : _b.content_updated_at);
16
+ return timestamp(override == null ? void 0 : override.modifiedTime) ?? timestamp(override == null ? void 0 : override.publishedTime) ?? timestamp(primary == null ? void 0 : primary.updated_at) ?? timestamp(primary == null ? void 0 : primary.modified_at) ?? timestamp(primary == null ? void 0 : primary.created_at) ?? timestamp((_b = data == null ? void 0 : data.page) == null ? void 0 : _b.content_updated_at);
17
17
  }
18
18
  async function renderBloxSsgPage(options) {
19
19
  var _a, _b, _c, _d, _e;
@@ -107,7 +107,7 @@ ${jsonLd}`;
107
107
  head,
108
108
  htmlAttrs,
109
109
  teleports: ssrContext.teleports,
110
- lastmod: pageLastmod(seoData),
110
+ lastmod: pageLastmod(seoData, seoOverride),
111
111
  llm: llmEntry,
112
112
  noindex: pageNoindex
113
113
  };
@@ -10,7 +10,7 @@ export interface BloxSsgRouterLike {
10
10
  isReady: () => Promise<void>;
11
11
  }
12
12
  /** Stable content timestamp for sitemap lastmod; never falls back to render time. */
13
- export declare function pageLastmod(data: SeoPageData | null | undefined): string | undefined;
13
+ export declare function pageLastmod(data: SeoPageData | null | undefined, override?: BloxSeoHead): string | undefined;
14
14
  /**
15
15
  * Render a Blox CMS page to static HTML with embedded state and full SEO head.
16
16
  *
@@ -1 +1 @@
1
- {"version":3,"file":"render-resolved-page.d.ts","sourceRoot":"","sources":["../../src/ssg/render-resolved-page.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAGvE,UAAU,cAAc;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC;AAED,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5B;AAOD,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAMpF;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE;IACtD,GAAG,EAAE,MAAM,CAA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ACZ;QAAE,GAAG,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,iBAAiB,CAAC;QAAC,YAAY,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAA;IAC9E,8EAA8E;IAC9E,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrE,sEAAsE;IACtE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,WAAW,CAAA;IACxD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+EAA+E;IAC/E,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACpD,8EAA8E;IAC9E,GAAG,CAAC,EAAE,kBAAkB,CAAA;CACxB,GAAG,OAAO,CAAC;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,YAAY,CAAA;IAClB,kFAAkF;IAClF,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC,CAiID;AAED,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE/C"}
package/package.json CHANGED
@@ -1,126 +1,125 @@
1
1
  {
2
- "name": "@bagelink/blox",
3
- "type": "module",
4
- "version": "1.19.4",
5
- "description": "Blox page builder library for drag-and-drop page building and static data management",
6
- "author": {
7
- "name": "Bagel Studio",
8
- "email": "info@bagelstudio.co.il",
9
- "url": "https://bagelstudio.co.il"
10
- },
11
- "license": "MIT",
12
- "homepage": "https://github.com/bageldb/bagelink/tree/master/packages/blox#readme",
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/bageldb/bagelink.git",
16
- "directory": "packages/blox"
17
- },
18
- "bugs": "https://github.com/bageldb/bagelink/issues",
19
- "keywords": [
20
- "blox",
21
- "page-builder",
22
- "preview",
23
- "external-preview",
24
- "cms",
25
- "vue",
26
- "component-library",
27
- "drag-and-drop",
28
- "static-pages"
29
- ],
30
- "bin": {
31
- "blox-ssg": "dist/ssg/cli.mjs"
32
- },
33
- "sideEffects": [
34
- "**/*.css",
35
- "**/*.vue"
36
- ],
37
- "exports": {
38
- "./package.json": "./package.json",
39
- "./vite": {
40
- "types": "./dist/vite-plugin.d.ts",
41
- "import": "./dist/vite-plugin.mjs"
42
- },
43
- ".": {
44
- "types": "./dist/index.d.ts",
45
- "require": "./dist/index.cjs",
46
- "import": "./dist/index.mjs"
47
- },
48
- "./ssg": {
49
- "types": "./dist/ssg/index.d.ts",
50
- "import": "./dist/ssg/index.mjs"
51
- },
52
- "./ssg/client": {
53
- "types": "./dist/ssg/client.d.ts",
54
- "import": "./dist/ssg/client.mjs"
55
- },
56
- "./ssg/build-grant": {
57
- "types": "./dist/ssg/build-grant.d.ts",
58
- "import": "./dist/ssg/build-grant.mjs"
59
- },
60
- "./style.css": "./dist/style.css",
61
- "./dist/style.css": "./dist/style.css"
62
- },
63
- "main": "./dist/index.cjs",
64
- "module": "./dist/index.mjs",
65
- "types": "./dist/index.d.ts",
66
- "typesVersions": {
67
- "*": {
68
- "*": [
69
- "./dist/*",
70
- "./dist/index.d.ts"
71
- ]
72
- }
73
- },
74
- "files": [
75
- "dist",
76
- "core",
77
- "components",
78
- "config",
79
- "ssg",
80
- "utils",
81
- "views",
82
- "setup.ts",
83
- "index.ts",
84
- "README.md"
85
- ],
86
- "scripts": {
87
- "prepublishOnly": "pnpm build",
88
- "dev": "vite build --watch",
89
- "build": "vite build",
90
- "typecheck": "vue-tsc --noEmit"
91
- },
92
- "publishConfig": {
93
- "access": "public"
94
- },
95
- "peerDependencies": {
96
- "@bagelink/vue": "*",
97
- "happy-dom": ">=14.0.0",
98
- "vite": ">=5.0.0",
99
- "vue": "^3.3.0",
100
- "vue-router": "^4.0.0"
101
- },
102
- "peerDependenciesMeta": {
103
- "happy-dom": {
104
- "optional": true
105
- },
106
- "vite": {
107
- "optional": true
108
- }
109
- },
110
- "devDependencies": {
111
- "@vitejs/plugin-vue": "^5.2.4",
112
- "@vue/tsconfig": "^0.7.0",
113
- "typescript": "^5.9.3",
114
- "vite": "^5.4.21",
115
- "vite-plugin-dts": "^4.5.4",
116
- "vite-tsconfig-paths": "^5.1.4",
117
- "vitest": "^3.2.7",
118
- "vue": "^3.5.43",
119
- "vue-router": "^4.6.4",
120
- "vue-tsc": "^2.2.12"
121
- },
122
- "dependencies": {
123
- "magic-string": "^0.30.21",
124
- "pinia": "^3.0.4"
125
- }
126
- }
2
+ "name": "@bagelink/blox",
3
+ "type": "module",
4
+ "version": "1.20.1",
5
+ "description": "Blox page builder library for drag-and-drop page building and static data management",
6
+ "author": {
7
+ "name": "Bagel Studio",
8
+ "email": "info@bagelstudio.co.il",
9
+ "url": "https://bagelstudio.co.il"
10
+ },
11
+ "license": "MIT",
12
+ "homepage": "https://github.com/bageldb/bagelink/tree/master/packages/blox#readme",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/bageldb/bagelink.git",
16
+ "directory": "packages/blox"
17
+ },
18
+ "bugs": "https://github.com/bageldb/bagelink/issues",
19
+ "keywords": [
20
+ "blox",
21
+ "page-builder",
22
+ "preview",
23
+ "external-preview",
24
+ "cms",
25
+ "vue",
26
+ "component-library",
27
+ "drag-and-drop",
28
+ "static-pages"
29
+ ],
30
+ "bin": {
31
+ "blox-ssg": "dist/ssg/cli.mjs"
32
+ },
33
+ "sideEffects": [
34
+ "**/*.css",
35
+ "**/*.vue"
36
+ ],
37
+ "exports": {
38
+ "./package.json": "./package.json",
39
+ "./vite": {
40
+ "types": "./dist/vite-plugin.d.ts",
41
+ "import": "./dist/vite-plugin.mjs"
42
+ },
43
+ ".": {
44
+ "types": "./dist/index.d.ts",
45
+ "require": "./dist/index.cjs",
46
+ "import": "./dist/index.mjs"
47
+ },
48
+ "./ssg": {
49
+ "types": "./dist/ssg/index.d.ts",
50
+ "import": "./dist/ssg/index.mjs"
51
+ },
52
+ "./ssg/client": {
53
+ "types": "./dist/ssg/client.d.ts",
54
+ "import": "./dist/ssg/client.mjs"
55
+ },
56
+ "./ssg/build-grant": {
57
+ "types": "./dist/ssg/build-grant.d.ts",
58
+ "import": "./dist/ssg/build-grant.mjs"
59
+ },
60
+ "./style.css": "./dist/style.css",
61
+ "./dist/style.css": "./dist/style.css"
62
+ },
63
+ "main": "./dist/index.cjs",
64
+ "module": "./dist/index.mjs",
65
+ "types": "./dist/index.d.ts",
66
+ "typesVersions": {
67
+ "*": {
68
+ "*": [
69
+ "./dist/*",
70
+ "./dist/index.d.ts"
71
+ ]
72
+ }
73
+ },
74
+ "files": [
75
+ "dist",
76
+ "core",
77
+ "components",
78
+ "config",
79
+ "ssg",
80
+ "utils",
81
+ "views",
82
+ "setup.ts",
83
+ "index.ts",
84
+ "README.md"
85
+ ],
86
+ "publishConfig": {
87
+ "access": "public"
88
+ },
89
+ "peerDependencies": {
90
+ "@bagelink/vue": "*",
91
+ "happy-dom": ">=14.0.0",
92
+ "vite": ">=5.0.0",
93
+ "vue": "^3.3.0",
94
+ "vue-router": "^4.0.0"
95
+ },
96
+ "peerDependenciesMeta": {
97
+ "happy-dom": {
98
+ "optional": true
99
+ },
100
+ "vite": {
101
+ "optional": true
102
+ }
103
+ },
104
+ "devDependencies": {
105
+ "@vitejs/plugin-vue": "^5.2.4",
106
+ "@vue/tsconfig": "^0.7.0",
107
+ "typescript": "^5.9.3",
108
+ "vite": "^5.4.21",
109
+ "vite-plugin-dts": "^4.5.4",
110
+ "vite-tsconfig-paths": "^5.1.4",
111
+ "vitest": "^3.2.7",
112
+ "vue": "^3.5.43",
113
+ "vue-router": "^4.6.4",
114
+ "vue-tsc": "^2.2.12"
115
+ },
116
+ "dependencies": {
117
+ "magic-string": "^0.30.21",
118
+ "pinia": "^3.0.4"
119
+ },
120
+ "scripts": {
121
+ "dev": "vite build --watch",
122
+ "build": "vite build",
123
+ "typecheck": "vue-tsc --noEmit"
124
+ }
125
+ }