@preprio/toolkit 1.0.0-rc.4 → 1.0.0-rc.6
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/README.md +2 -0
- package/dist/astro/index.cjs +126 -18
- package/dist/astro/index.js +128 -19
- package/dist/{chunk-A2J7R4LR.js → chunk-I26P2EQI.js} +1 -1
- package/dist/{chunk-QWTSVPEQ.js → chunk-OCTRCNW2.js} +1 -1
- package/dist/{chunk-KM2GME62.js → chunk-RWFAFYHU.js} +90 -1
- package/dist/{chunk-6PMBN7OR.js → chunk-SAOE54OB.js} +1 -1
- package/dist/{chunk-K62RW46G.js → chunk-WQRPW3TM.js} +1 -1
- package/dist/index.cjs +128 -19
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +44 -23
- package/dist/{live-preview-HCBNBC6C.js → live-preview-NUDEDAYQ.js} +2 -2
- package/dist/nextjs/components.cjs +1 -1
- package/dist/nextjs/components.js +2 -2
- package/dist/nextjs/index.cjs +189 -20
- package/dist/nextjs/index.d.cts +47 -1
- package/dist/nextjs/index.d.ts +47 -1
- package/dist/nextjs/index.js +190 -21
- package/dist/nextjs/live-action.js +3 -3
- package/dist/nextjs/live.cjs +102 -6
- package/dist/nextjs/live.d.cts +7 -1
- package/dist/nextjs/live.d.ts +7 -1
- package/dist/nextjs/live.js +8 -6
- package/dist/nuxt/index.cjs +1 -1
- package/dist/nuxt/index.js +1 -1
- package/dist/nuxt/{live-preview-KO4IKWTX.js → live-preview-V2X6GPSK.js} +88 -1
- package/dist/nuxt/live.cjs +130 -17
- package/dist/nuxt/live.js +38 -18
- package/dist/react/components.cjs +1 -1
- package/dist/react/components.js +1 -1
- package/dist/sveltekit/index.cjs +1 -1
- package/dist/sveltekit/index.js +1 -1
- package/dist/sveltekit/{live-preview-KO4IKWTX.js → live-preview-V2X6GPSK.js} +88 -1
- package/dist/sveltekit/live.cjs +130 -17
- package/dist/sveltekit/live.js +38 -18
- package/package.json +1 -1
|
@@ -3703,7 +3703,7 @@ function createPreprPreview(opts = {}) {
|
|
|
3703
3703
|
}
|
|
3704
3704
|
|
|
3705
3705
|
// src/version.ts
|
|
3706
|
-
var VERSION = "1.0.0-rc.
|
|
3706
|
+
var VERSION = "1.0.0-rc.6";
|
|
3707
3707
|
|
|
3708
3708
|
// src/core/pixel.ts
|
|
3709
3709
|
var PIXEL_SCRIPT_URL = "https://cdn.tracking.prepr.io/js/prepr.min.js";
|
package/dist/react/components.js
CHANGED
|
@@ -3679,7 +3679,7 @@ function createPreprPreview(opts = {}) {
|
|
|
3679
3679
|
}
|
|
3680
3680
|
|
|
3681
3681
|
// src/version.ts
|
|
3682
|
-
var VERSION = "1.0.0-rc.
|
|
3682
|
+
var VERSION = "1.0.0-rc.6";
|
|
3683
3683
|
|
|
3684
3684
|
// src/core/pixel.ts
|
|
3685
3685
|
var PIXEL_SCRIPT_URL = "https://cdn.tracking.prepr.io/js/prepr.min.js";
|
package/dist/sveltekit/index.cjs
CHANGED
package/dist/sveltekit/index.js
CHANGED
|
@@ -150,6 +150,92 @@ function isTextEntry(record) {
|
|
|
150
150
|
return "html" in record || "text" in record && "format" in record;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
// src/core/live-preview/internal-links.ts
|
|
154
|
+
var INTERNAL_HREF = /^[pa]uuid#/;
|
|
155
|
+
var ANCHOR = /<a\b([^>]*)>([\s\S]*?)<\/a>/gi;
|
|
156
|
+
var HREF = /(\shref\s*=\s*)(["'])(.*?)\2/i;
|
|
157
|
+
var TAGS = /<[^>]+>/g;
|
|
158
|
+
function anchorsIn(html) {
|
|
159
|
+
const out = [];
|
|
160
|
+
for (const match of html.matchAll(ANCHOR)) {
|
|
161
|
+
const attributes = match[1];
|
|
162
|
+
const inner = match[2];
|
|
163
|
+
out.push({
|
|
164
|
+
start: match.index ?? 0,
|
|
165
|
+
end: (match.index ?? 0) + match[0].length,
|
|
166
|
+
attributes,
|
|
167
|
+
inner,
|
|
168
|
+
href: HREF.exec(attributes)?.[3] ?? null,
|
|
169
|
+
text: inner.replace(TAGS, "").trim()
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
return out;
|
|
173
|
+
}
|
|
174
|
+
var isInternal = (anchor) => anchor.href !== null && INTERNAL_HREF.test(anchor.href);
|
|
175
|
+
function fit(pushed, page) {
|
|
176
|
+
if (!isInternal(pushed) && pushed.href !== page.href) return 0;
|
|
177
|
+
if (isInternal(pushed) && page.href !== null && INTERNAL_HREF.test(page.href))
|
|
178
|
+
return 0;
|
|
179
|
+
return pushed.text === page.text ? 2 : 1;
|
|
180
|
+
}
|
|
181
|
+
function align(pushed, page) {
|
|
182
|
+
const rows = pushed.length + 1;
|
|
183
|
+
const cols = page.length + 1;
|
|
184
|
+
const score = Array.from(
|
|
185
|
+
{ length: rows },
|
|
186
|
+
() => new Array(cols).fill(0)
|
|
187
|
+
);
|
|
188
|
+
for (let i2 = pushed.length - 1; i2 >= 0; i2--) {
|
|
189
|
+
for (let j2 = page.length - 1; j2 >= 0; j2--) {
|
|
190
|
+
const pair = fit(pushed[i2], page[j2]);
|
|
191
|
+
score[i2][j2] = Math.max(
|
|
192
|
+
score[i2 + 1][j2],
|
|
193
|
+
score[i2][j2 + 1],
|
|
194
|
+
pair ? pair + score[i2 + 1][j2 + 1] : 0
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
const out = new Array(pushed.length).fill(-1);
|
|
199
|
+
let i = 0;
|
|
200
|
+
let j = 0;
|
|
201
|
+
while (i < pushed.length && j < page.length) {
|
|
202
|
+
const pair = fit(pushed[i], page[j]);
|
|
203
|
+
if (pair && score[i][j] === pair + score[i + 1][j + 1]) {
|
|
204
|
+
out[i++] = j++;
|
|
205
|
+
} else if (score[i + 1][j] >= score[i][j + 1]) {
|
|
206
|
+
i++;
|
|
207
|
+
} else {
|
|
208
|
+
j++;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return out;
|
|
212
|
+
}
|
|
213
|
+
function resolveInternalLinks(current, value) {
|
|
214
|
+
const pushed = anchorsIn(value);
|
|
215
|
+
if (!pushed.some(isInternal)) return value;
|
|
216
|
+
const page = typeof current === "string" ? anchorsIn(current) : [];
|
|
217
|
+
const pairs = align(pushed, page);
|
|
218
|
+
let out = "";
|
|
219
|
+
let cursor = 0;
|
|
220
|
+
pushed.forEach((anchor, i) => {
|
|
221
|
+
if (!isInternal(anchor)) return;
|
|
222
|
+
out += value.slice(cursor, anchor.start);
|
|
223
|
+
const match = pairs[i] >= 0 ? page[pairs[i]] : null;
|
|
224
|
+
if (match?.href != null) {
|
|
225
|
+
const href = match.href;
|
|
226
|
+
const attributes = anchor.attributes.replace(
|
|
227
|
+
HREF,
|
|
228
|
+
(_all, lead, quote) => `${lead}${quote}${href}${quote}`
|
|
229
|
+
);
|
|
230
|
+
out += `<a${attributes}>${anchor.inner}</a>`;
|
|
231
|
+
} else {
|
|
232
|
+
out += anchor.inner;
|
|
233
|
+
}
|
|
234
|
+
cursor = anchor.end;
|
|
235
|
+
});
|
|
236
|
+
return out + value.slice(cursor);
|
|
237
|
+
}
|
|
238
|
+
|
|
153
239
|
// src/core/live-preview/patch.ts
|
|
154
240
|
var INDEX_SEGMENT = /^\d+$/;
|
|
155
241
|
var FORBIDDEN_SEGMENTS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
@@ -319,7 +405,8 @@ function writeAtPath(root, fullPath, value, markChanged = () => {
|
|
|
319
405
|
} else if (!isPatchable(container[key])) {
|
|
320
406
|
return root;
|
|
321
407
|
} else {
|
|
322
|
-
|
|
408
|
+
const linked = typeof value === "string" ? resolveInternalLinks(container[key], value) : value;
|
|
409
|
+
next = keepEditLink(container[key], linked);
|
|
323
410
|
}
|
|
324
411
|
if (container[key] === next) return root;
|
|
325
412
|
const newRoot = cloneNode(root);
|
package/dist/sveltekit/live.cjs
CHANGED
|
@@ -540,6 +540,98 @@ var init_field_name = __esm({
|
|
|
540
540
|
}
|
|
541
541
|
});
|
|
542
542
|
|
|
543
|
+
// src/core/live-preview/internal-links.ts
|
|
544
|
+
function anchorsIn(html) {
|
|
545
|
+
const out = [];
|
|
546
|
+
for (const match of html.matchAll(ANCHOR)) {
|
|
547
|
+
const attributes = match[1];
|
|
548
|
+
const inner = match[2];
|
|
549
|
+
out.push({
|
|
550
|
+
start: match.index ?? 0,
|
|
551
|
+
end: (match.index ?? 0) + match[0].length,
|
|
552
|
+
attributes,
|
|
553
|
+
inner,
|
|
554
|
+
href: HREF.exec(attributes)?.[3] ?? null,
|
|
555
|
+
text: inner.replace(TAGS, "").trim()
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
return out;
|
|
559
|
+
}
|
|
560
|
+
function fit(pushed, page) {
|
|
561
|
+
if (!isInternal(pushed) && pushed.href !== page.href) return 0;
|
|
562
|
+
if (isInternal(pushed) && page.href !== null && INTERNAL_HREF.test(page.href))
|
|
563
|
+
return 0;
|
|
564
|
+
return pushed.text === page.text ? 2 : 1;
|
|
565
|
+
}
|
|
566
|
+
function align(pushed, page) {
|
|
567
|
+
const rows = pushed.length + 1;
|
|
568
|
+
const cols = page.length + 1;
|
|
569
|
+
const score = Array.from(
|
|
570
|
+
{ length: rows },
|
|
571
|
+
() => new Array(cols).fill(0)
|
|
572
|
+
);
|
|
573
|
+
for (let i2 = pushed.length - 1; i2 >= 0; i2--) {
|
|
574
|
+
for (let j2 = page.length - 1; j2 >= 0; j2--) {
|
|
575
|
+
const pair = fit(pushed[i2], page[j2]);
|
|
576
|
+
score[i2][j2] = Math.max(
|
|
577
|
+
score[i2 + 1][j2],
|
|
578
|
+
score[i2][j2 + 1],
|
|
579
|
+
pair ? pair + score[i2 + 1][j2 + 1] : 0
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
const out = new Array(pushed.length).fill(-1);
|
|
584
|
+
let i = 0;
|
|
585
|
+
let j = 0;
|
|
586
|
+
while (i < pushed.length && j < page.length) {
|
|
587
|
+
const pair = fit(pushed[i], page[j]);
|
|
588
|
+
if (pair && score[i][j] === pair + score[i + 1][j + 1]) {
|
|
589
|
+
out[i++] = j++;
|
|
590
|
+
} else if (score[i + 1][j] >= score[i][j + 1]) {
|
|
591
|
+
i++;
|
|
592
|
+
} else {
|
|
593
|
+
j++;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
return out;
|
|
597
|
+
}
|
|
598
|
+
function resolveInternalLinks(current, value) {
|
|
599
|
+
const pushed = anchorsIn(value);
|
|
600
|
+
if (!pushed.some(isInternal)) return value;
|
|
601
|
+
const page = typeof current === "string" ? anchorsIn(current) : [];
|
|
602
|
+
const pairs = align(pushed, page);
|
|
603
|
+
let out = "";
|
|
604
|
+
let cursor = 0;
|
|
605
|
+
pushed.forEach((anchor, i) => {
|
|
606
|
+
if (!isInternal(anchor)) return;
|
|
607
|
+
out += value.slice(cursor, anchor.start);
|
|
608
|
+
const match = pairs[i] >= 0 ? page[pairs[i]] : null;
|
|
609
|
+
if (match?.href != null) {
|
|
610
|
+
const href = match.href;
|
|
611
|
+
const attributes = anchor.attributes.replace(
|
|
612
|
+
HREF,
|
|
613
|
+
(_all, lead, quote) => `${lead}${quote}${href}${quote}`
|
|
614
|
+
);
|
|
615
|
+
out += `<a${attributes}>${anchor.inner}</a>`;
|
|
616
|
+
} else {
|
|
617
|
+
out += anchor.inner;
|
|
618
|
+
}
|
|
619
|
+
cursor = anchor.end;
|
|
620
|
+
});
|
|
621
|
+
return out + value.slice(cursor);
|
|
622
|
+
}
|
|
623
|
+
var INTERNAL_HREF, ANCHOR, HREF, TAGS, isInternal;
|
|
624
|
+
var init_internal_links = __esm({
|
|
625
|
+
"src/core/live-preview/internal-links.ts"() {
|
|
626
|
+
"use strict";
|
|
627
|
+
INTERNAL_HREF = /^[pa]uuid#/;
|
|
628
|
+
ANCHOR = /<a\b([^>]*)>([\s\S]*?)<\/a>/gi;
|
|
629
|
+
HREF = /(\shref\s*=\s*)(["'])(.*?)\2/i;
|
|
630
|
+
TAGS = /<[^>]+>/g;
|
|
631
|
+
isInternal = (anchor) => anchor.href !== null && INTERNAL_HREF.test(anchor.href);
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
|
|
543
635
|
// src/core/live-preview/patch.ts
|
|
544
636
|
function mergeObject(current, incoming) {
|
|
545
637
|
let changed = false;
|
|
@@ -707,7 +799,8 @@ function writeAtPath(root, fullPath, value, markChanged = () => {
|
|
|
707
799
|
} else if (!isPatchable(container[key])) {
|
|
708
800
|
return root;
|
|
709
801
|
} else {
|
|
710
|
-
|
|
802
|
+
const linked = typeof value === "string" ? resolveInternalLinks(container[key], value) : value;
|
|
803
|
+
next = keepEditLink(container[key], linked);
|
|
711
804
|
}
|
|
712
805
|
if (container[key] === next) return root;
|
|
713
806
|
const newRoot = cloneNode(root);
|
|
@@ -823,6 +916,7 @@ var init_patch = __esm({
|
|
|
823
916
|
init_guards();
|
|
824
917
|
import_stega2 = require("@vercel/stega");
|
|
825
918
|
init_field_name();
|
|
919
|
+
init_internal_links();
|
|
826
920
|
INDEX_SEGMENT = /^\d+$/;
|
|
827
921
|
FORBIDDEN_SEGMENTS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
828
922
|
}
|
|
@@ -1740,34 +1834,53 @@ function entryIdOf(element) {
|
|
|
1740
1834
|
const first = element.items[0];
|
|
1741
1835
|
return isObject(first) && typeof first._id === "string" ? first._id : void 0;
|
|
1742
1836
|
}
|
|
1743
|
-
function
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1837
|
+
function encodeLink(payload) {
|
|
1838
|
+
try {
|
|
1839
|
+
return (0, import_stega.legacyStegaEncode)(payload);
|
|
1840
|
+
} catch {
|
|
1841
|
+
return (0, import_stega.vercelStegaEncode)(payload);
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
function rewriteLink(encoded, entryId, entryField, entryOwnerId) {
|
|
1747
1845
|
let payload;
|
|
1748
1846
|
try {
|
|
1749
1847
|
payload = (0, import_stega.vercelStegaDecode)(encoded);
|
|
1750
1848
|
} catch {
|
|
1751
|
-
return
|
|
1849
|
+
return "";
|
|
1752
1850
|
}
|
|
1753
|
-
if (typeof payload?.href !== "string") return
|
|
1851
|
+
if (typeof payload?.href !== "string") return "";
|
|
1754
1852
|
let url;
|
|
1755
1853
|
try {
|
|
1756
1854
|
url = new URL(payload.href);
|
|
1757
1855
|
} catch {
|
|
1758
|
-
return
|
|
1856
|
+
return "";
|
|
1759
1857
|
}
|
|
1760
|
-
if (url.searchParams.has(ENTRY_PARAM)) return
|
|
1761
|
-
url.searchParams.set(ENTRY_PARAM,
|
|
1858
|
+
if (url.searchParams.has(ENTRY_PARAM)) return "";
|
|
1859
|
+
url.searchParams.set(ENTRY_PARAM, entryId);
|
|
1762
1860
|
const itemId = decodeURIComponent(url.pathname.split("/").pop() ?? "");
|
|
1763
|
-
if (!url.searchParams.has("field") &&
|
|
1764
|
-
url.searchParams.set("field",
|
|
1861
|
+
if (!url.searchParams.has("field") && entryField && itemId === entryOwnerId) {
|
|
1862
|
+
url.searchParams.set("field", entryField);
|
|
1765
1863
|
}
|
|
1766
|
-
return (
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1864
|
+
return encodeLink({ ...payload, href: url.toString() });
|
|
1865
|
+
}
|
|
1866
|
+
var MAX_REWRITTEN = 1e4;
|
|
1867
|
+
var rewritten = /* @__PURE__ */ new Map();
|
|
1868
|
+
function annotate(value, ctx) {
|
|
1869
|
+
if (!ctx.entryId) return value;
|
|
1870
|
+
const { cleaned, encoded } = (0, import_stega.vercelStegaSplit)(value);
|
|
1871
|
+
if (!encoded) return value;
|
|
1872
|
+
const entryField = ctx.entryField && TOP_LEVEL_ENTRY.test(ctx.entryField) ? ctx.entryField : "";
|
|
1873
|
+
const key = `${ctx.entryId}
|
|
1874
|
+
${entryField}
|
|
1875
|
+
${ctx.entryOwnerId ?? ""}
|
|
1876
|
+
${encoded}`;
|
|
1877
|
+
let link = rewritten.get(key);
|
|
1878
|
+
if (link === void 0) {
|
|
1879
|
+
link = rewriteLink(encoded, ctx.entryId, entryField, ctx.entryOwnerId);
|
|
1880
|
+
if (rewritten.size >= MAX_REWRITTEN) rewritten.clear();
|
|
1881
|
+
rewritten.set(key, link);
|
|
1882
|
+
}
|
|
1883
|
+
return link ? cleaned + link : value;
|
|
1771
1884
|
}
|
|
1772
1885
|
function walk(value, selections, ctx) {
|
|
1773
1886
|
if (typeof value === "string") return annotate(value, ctx);
|
package/dist/sveltekit/live.js
CHANGED
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/core/live-preview/edit-links.ts
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
legacyStegaEncode,
|
|
10
10
|
vercelStegaDecode,
|
|
11
|
+
vercelStegaEncode,
|
|
11
12
|
vercelStegaSplit
|
|
12
13
|
} from "@vercel/stega";
|
|
13
14
|
var ENTRY_PARAM = "entry";
|
|
@@ -21,34 +22,53 @@ function entryIdOf(element) {
|
|
|
21
22
|
const first = element.items[0];
|
|
22
23
|
return isObject(first) && typeof first._id === "string" ? first._id : void 0;
|
|
23
24
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
function encodeLink(payload) {
|
|
26
|
+
try {
|
|
27
|
+
return legacyStegaEncode(payload);
|
|
28
|
+
} catch {
|
|
29
|
+
return vercelStegaEncode(payload);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function rewriteLink(encoded, entryId, entryField, entryOwnerId) {
|
|
28
33
|
let payload;
|
|
29
34
|
try {
|
|
30
35
|
payload = vercelStegaDecode(encoded);
|
|
31
36
|
} catch {
|
|
32
|
-
return
|
|
37
|
+
return "";
|
|
33
38
|
}
|
|
34
|
-
if (typeof payload?.href !== "string") return
|
|
39
|
+
if (typeof payload?.href !== "string") return "";
|
|
35
40
|
let url;
|
|
36
41
|
try {
|
|
37
42
|
url = new URL(payload.href);
|
|
38
43
|
} catch {
|
|
39
|
-
return
|
|
44
|
+
return "";
|
|
40
45
|
}
|
|
41
|
-
if (url.searchParams.has(ENTRY_PARAM)) return
|
|
42
|
-
url.searchParams.set(ENTRY_PARAM,
|
|
46
|
+
if (url.searchParams.has(ENTRY_PARAM)) return "";
|
|
47
|
+
url.searchParams.set(ENTRY_PARAM, entryId);
|
|
43
48
|
const itemId = decodeURIComponent(url.pathname.split("/").pop() ?? "");
|
|
44
|
-
if (!url.searchParams.has("field") &&
|
|
45
|
-
url.searchParams.set("field",
|
|
49
|
+
if (!url.searchParams.has("field") && entryField && itemId === entryOwnerId) {
|
|
50
|
+
url.searchParams.set("field", entryField);
|
|
51
|
+
}
|
|
52
|
+
return encodeLink({ ...payload, href: url.toString() });
|
|
53
|
+
}
|
|
54
|
+
var MAX_REWRITTEN = 1e4;
|
|
55
|
+
var rewritten = /* @__PURE__ */ new Map();
|
|
56
|
+
function annotate(value, ctx) {
|
|
57
|
+
if (!ctx.entryId) return value;
|
|
58
|
+
const { cleaned, encoded } = vercelStegaSplit(value);
|
|
59
|
+
if (!encoded) return value;
|
|
60
|
+
const entryField = ctx.entryField && TOP_LEVEL_ENTRY.test(ctx.entryField) ? ctx.entryField : "";
|
|
61
|
+
const key = `${ctx.entryId}
|
|
62
|
+
${entryField}
|
|
63
|
+
${ctx.entryOwnerId ?? ""}
|
|
64
|
+
${encoded}`;
|
|
65
|
+
let link = rewritten.get(key);
|
|
66
|
+
if (link === void 0) {
|
|
67
|
+
link = rewriteLink(encoded, ctx.entryId, entryField, ctx.entryOwnerId);
|
|
68
|
+
if (rewritten.size >= MAX_REWRITTEN) rewritten.clear();
|
|
69
|
+
rewritten.set(key, link);
|
|
46
70
|
}
|
|
47
|
-
return
|
|
48
|
-
cleaned,
|
|
49
|
-
{ ...payload, href: url.toString() },
|
|
50
|
-
false
|
|
51
|
-
);
|
|
71
|
+
return link ? cleaned + link : value;
|
|
52
72
|
}
|
|
53
73
|
function walk(value, selections, ctx) {
|
|
54
74
|
if (typeof value === "string") return annotate(value, ctx);
|
|
@@ -135,7 +155,7 @@ function createLiveStarter(options = {}) {
|
|
|
135
155
|
}
|
|
136
156
|
},
|
|
137
157
|
start() {
|
|
138
|
-
starting ?? (starting = import("./live-preview-
|
|
158
|
+
starting ?? (starting = import("./live-preview-V2X6GPSK.js").then((runtime) => {
|
|
139
159
|
const started = runtime.createLiveStore(options.storeOptions?.());
|
|
140
160
|
options.onStart?.(started, runtime);
|
|
141
161
|
bridge = runtime.createLiveBridge(started, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@preprio/toolkit",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.6",
|
|
4
4
|
"description": "Prepr personalization, A/B testing and preview toolkit for React, Next.js, Nuxt, Astro, SvelteKit and Express",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Prepr B.V. (https://prepr.io)",
|