@plitzi/sdk-shared 0.38.13 → 0.38.14
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/CHANGELOG.md +145 -0
- package/dist/authoring/declare.d.ts +6 -0
- package/dist/helpers/clipboard.d.ts +10 -0
- package/dist/helpers/clipboard.mjs +17 -0
- package/dist/helpers/enclosingSpace.d.ts +9 -0
- package/dist/helpers/enclosingSpace.mjs +5 -0
- package/dist/helpers/spaceRoot.d.ts +4 -0
- package/dist/helpers/spaceRoot.mjs +4 -0
- package/dist/project/network.d.ts +12 -0
- package/dist/project/network.mjs +4 -0
- package/dist/store/index.d.ts +33 -33
- package/dist/store/renderSettings.d.ts +1 -0
- package/dist/store/renderSettings.mjs +9 -5
- package/dist/types/StoreTypes.d.ts +8 -2
- package/package.json +17 -2
- package/setupTests.ts +6 -5
|
@@ -10,9 +10,10 @@ var n = {
|
|
|
10
10
|
hydrated: !1,
|
|
11
11
|
overQuota: !1,
|
|
12
12
|
testAttributes: !0,
|
|
13
|
-
ownsHead: !0
|
|
13
|
+
ownsHead: !0,
|
|
14
|
+
enclosed: !1
|
|
14
15
|
}, r = () => {
|
|
15
|
-
let [[r, i, a, o, s, c, l, u, d]] = e([
|
|
16
|
+
let [[r, i, a, o, s, c, l, u, d, f]] = e([
|
|
16
17
|
"render.previewMode",
|
|
17
18
|
"render.debugMode",
|
|
18
19
|
"render.renderMode",
|
|
@@ -21,7 +22,8 @@ var n = {
|
|
|
21
22
|
"render.hydrated",
|
|
22
23
|
"render.overQuota",
|
|
23
24
|
"render.testAttributes",
|
|
24
|
-
"render.ownsHead"
|
|
25
|
+
"render.ownsHead",
|
|
26
|
+
"render.enclosed"
|
|
25
27
|
]);
|
|
26
28
|
return t(() => ({
|
|
27
29
|
previewMode: r ?? n.previewMode,
|
|
@@ -32,7 +34,8 @@ var n = {
|
|
|
32
34
|
hydrated: c ?? n.hydrated,
|
|
33
35
|
overQuota: l ?? n.overQuota,
|
|
34
36
|
testAttributes: u ?? n.testAttributes,
|
|
35
|
-
ownsHead: d ?? n.ownsHead
|
|
37
|
+
ownsHead: d ?? n.ownsHead,
|
|
38
|
+
enclosed: f ?? n.enclosed
|
|
36
39
|
}), [
|
|
37
40
|
r,
|
|
38
41
|
i,
|
|
@@ -42,7 +45,8 @@ var n = {
|
|
|
42
45
|
c,
|
|
43
46
|
l,
|
|
44
47
|
u,
|
|
45
|
-
d
|
|
48
|
+
d,
|
|
49
|
+
f
|
|
46
50
|
]);
|
|
47
51
|
}, i = (e) => {
|
|
48
52
|
let n = r();
|
|
@@ -152,12 +152,18 @@ export type RenderSettings = {
|
|
|
152
152
|
/**
|
|
153
153
|
* Whether the page may write the document's head — its SEO title and description. On, as a page's own document is.
|
|
154
154
|
*
|
|
155
|
-
* Off where the page is drawn in a
|
|
156
|
-
* manager writes the head of the document its code runs in, which there is the editor's — and the builder is itself
|
|
155
|
+
* Off where the page is drawn in a host whose document is not the page's: the builder's canvas, a space drawn inside
|
|
156
|
+
* another one. A head manager writes the head of the document its code runs in, which there is the editor's — and the builder is itself
|
|
157
157
|
* mounted in a page that manages that head, so a second manager under it rewrote the host's tags and took the
|
|
158
158
|
* builder's own stylesheet away the moment a preview showed a page with SEO.
|
|
159
159
|
*/
|
|
160
160
|
ownsHead?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Whether this space is drawn inside another one — the `plitziSdk` element, a plugin rendering a space. The
|
|
163
|
+
* document is then the outer space's: this one wears its theme on its own root, keeps its stylesheet to that root,
|
|
164
|
+
* and starts in the outer space's theme when its own is left to the machine.
|
|
165
|
+
*/
|
|
166
|
+
enclosed?: boolean;
|
|
161
167
|
};
|
|
162
168
|
/** Absent `endpoint` is the whole feature switch: a render with no server tier leaves every `serverAction` step
|
|
163
169
|
* inert instead of letting each click discover a 404. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-shared",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.14",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -322,10 +322,18 @@
|
|
|
322
322
|
"types": "./dist/helpers/canonicalJson.d.ts",
|
|
323
323
|
"import": "./dist/helpers/canonicalJson.mjs"
|
|
324
324
|
},
|
|
325
|
+
"./helpers/clipboard": {
|
|
326
|
+
"types": "./dist/helpers/clipboard.d.ts",
|
|
327
|
+
"import": "./dist/helpers/clipboard.mjs"
|
|
328
|
+
},
|
|
325
329
|
"./helpers/cookies": {
|
|
326
330
|
"types": "./dist/helpers/cookies.d.ts",
|
|
327
331
|
"import": "./dist/helpers/cookies.mjs"
|
|
328
332
|
},
|
|
333
|
+
"./helpers/enclosingSpace": {
|
|
334
|
+
"types": "./dist/helpers/enclosingSpace.d.ts",
|
|
335
|
+
"import": "./dist/helpers/enclosingSpace.mjs"
|
|
336
|
+
},
|
|
329
337
|
"./helpers/eventTarget": {
|
|
330
338
|
"types": "./dist/helpers/eventTarget.d.ts",
|
|
331
339
|
"import": "./dist/helpers/eventTarget.mjs"
|
|
@@ -386,6 +394,10 @@
|
|
|
386
394
|
"types": "./dist/helpers/sharedContext.d.ts",
|
|
387
395
|
"import": "./dist/helpers/sharedContext.mjs"
|
|
388
396
|
},
|
|
397
|
+
"./helpers/spaceRoot": {
|
|
398
|
+
"types": "./dist/helpers/spaceRoot.d.ts",
|
|
399
|
+
"import": "./dist/helpers/spaceRoot.mjs"
|
|
400
|
+
},
|
|
389
401
|
"./helpers/stripTypename": {
|
|
390
402
|
"types": "./dist/helpers/stripTypename.d.ts",
|
|
391
403
|
"import": "./dist/helpers/stripTypename.mjs"
|
|
@@ -1115,6 +1127,10 @@
|
|
|
1115
1127
|
"types": "./dist/project/layout.d.ts",
|
|
1116
1128
|
"import": "./dist/project/layout.mjs"
|
|
1117
1129
|
},
|
|
1130
|
+
"./project/network": {
|
|
1131
|
+
"types": "./dist/project/network.d.ts",
|
|
1132
|
+
"import": "./dist/project/network.mjs"
|
|
1133
|
+
},
|
|
1118
1134
|
"./project/paths": {
|
|
1119
1135
|
"types": "./dist/project/paths.d.ts",
|
|
1120
1136
|
"import": "./dist/project/paths.mjs"
|
|
@@ -1618,7 +1634,6 @@
|
|
|
1618
1634
|
"react": "^19.3.0",
|
|
1619
1635
|
"react-dom": "^19.3.0",
|
|
1620
1636
|
"tailwindcss": "^4.3.3",
|
|
1621
|
-
"terser": "^5.51.2",
|
|
1622
1637
|
"typescript": "^6.0.3",
|
|
1623
1638
|
"typescript-eslint": "^8.71.0",
|
|
1624
1639
|
"vite": "^8.3.2",
|
package/setupTests.ts
CHANGED
|
@@ -9,13 +9,14 @@ import createFetchMock from 'vitest-fetch-mock';
|
|
|
9
9
|
const fetchMocker = createFetchMock(vi);
|
|
10
10
|
fetchMocker.enableMocks();
|
|
11
11
|
|
|
12
|
+
// A class, as the browser's is: what calls it calls it with `new`, which an arrow function refuses.
|
|
12
13
|
vi.stubGlobal(
|
|
13
14
|
'ResizeObserver',
|
|
14
|
-
|
|
15
|
-
observe
|
|
16
|
-
unobserve
|
|
17
|
-
disconnect
|
|
18
|
-
}
|
|
15
|
+
class {
|
|
16
|
+
observe = vi.fn();
|
|
17
|
+
unobserve = vi.fn();
|
|
18
|
+
disconnect = vi.fn();
|
|
19
|
+
}
|
|
19
20
|
);
|
|
20
21
|
|
|
21
22
|
// Only where there is a window: a file that opts into `@vitest-environment node` (one running a bundler) has none.
|