@open-slide/core 2.0.0-beta.3 → 2.0.0-beta.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 +1 -1
- package/dist/{build-Bzy-qlGc.js → build-Cu5_qRyE.js} +1 -1
- package/dist/cli/bin.js +3 -3
- package/dist/{config-nbSvY7z_.js → config-BQ6rD2iE.js} +226 -27
- package/dist/{config-DjWifhaA.d.ts → config-GMR1QUlM.d.ts} +1 -1
- package/dist/{dev-MXa5Tod4.js → dev-BK641O5e.js} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/{preview-DEpQcKz3.js → preview-BuCI-RMW.js} +1 -1
- package/dist/{types-BWg-Dtbg.d.ts → types-BcbaKTNY.d.ts} +60 -0
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +1 -1
- package/dist/{zh-tw-DlKyeNX7.js → zh-tw-DlZoAc2-.js} +271 -35
- package/package.json +6 -6
- package/src/app/components/asset-view.tsx +448 -0
- package/src/app/components/history-provider.tsx +68 -44
- package/src/app/components/icon-switcher-indicator.tsx +10 -0
- package/src/app/components/inspector/arrange-panel.tsx +449 -0
- package/src/app/components/inspector/inline-text-editor.tsx +170 -284
- package/src/app/components/inspector/inspect-overlay.tsx +642 -295
- package/src/app/components/inspector/inspector-panel.tsx +434 -427
- package/src/app/components/inspector/inspector-provider.tsx +564 -293
- package/src/app/components/inspector/save-bar.tsx +36 -0
- package/src/app/components/note-markdown.test.tsx +42 -0
- package/src/app/components/note-markdown.tsx +85 -0
- package/src/app/components/panel/editor-sidebar.tsx +50 -0
- package/src/app/components/panel/panel-fields.tsx +204 -16
- package/src/app/components/panel/panel-shell.tsx +3 -18
- package/src/app/components/style-panel/style-panel.tsx +4 -69
- package/src/app/lib/assets.ts +33 -0
- package/src/app/lib/export-html.ts +48 -5
- package/src/app/lib/inspector/geometry.test.ts +324 -0
- package/src/app/lib/inspector/geometry.ts +207 -0
- package/src/app/lib/inspector/text-edit-timeline.test.ts +121 -0
- package/src/app/lib/inspector/text-edit-timeline.ts +12 -0
- package/src/app/lib/inspector/text-selection.ts +117 -0
- package/src/app/lib/inspector/use-editor.ts +1 -1
- package/src/app/lib/inspector/use-visual-editor.ts +429 -0
- package/src/app/lib/inspector/visual-dom.ts +255 -0
- package/src/app/lib/keys.ts +9 -0
- package/src/app/lib/note-markdown.test.ts +147 -0
- package/src/app/lib/note-markdown.ts +116 -0
- package/src/app/routes/presenter.tsx +3 -2
- package/src/app/routes/slide.tsx +34 -9
- package/src/locale/en.ts +71 -9
- package/src/locale/ja.ts +73 -8
- package/src/locale/types.ts +60 -0
- package/src/locale/zh-cn.ts +69 -9
- package/src/locale/zh-tw.ts +69 -9
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @open-slide/core
|
|
2
2
|
|
|
3
|
-
Runtime and CLI for [open-slide](https://github.com/
|
|
3
|
+
Runtime and CLI for [open-slide](https://github.com/open-slide/open-slide) — a React-based slide framework where you write slides and the framework handles the Vite/React stack, layout, navigation, hot reload, and fullscreen play mode.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as printHeader, t as createCliLogger } from "./cli/bin.js";
|
|
2
|
-
import { t as createViteConfig } from "./config-
|
|
2
|
+
import { t as createViteConfig } from "./config-BQ6rD2iE.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { build as build$1, mergeConfig } from "vite";
|
|
5
5
|
//#region src/cli/build.ts
|
package/dist/cli/bin.js
CHANGED
|
@@ -363,17 +363,17 @@ async function run(argv) {
|
|
|
363
363
|
program.command("dev").description("Start the dev server").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").option("--no-skills-check", "skip the built-in skills drift check").action(async (flags) => {
|
|
364
364
|
if (flags.skillsCheck !== false) await runSkillsDriftCheck(resolveBuiltinSkillsDir());
|
|
365
365
|
assertViteResolvesToCore();
|
|
366
|
-
const { dev } = await import("../dev-
|
|
366
|
+
const { dev } = await import("../dev-BK641O5e.js");
|
|
367
367
|
await dev(flags);
|
|
368
368
|
});
|
|
369
369
|
program.command("build").description("Build a static site").option("--out-dir <dir>", "output directory (defaults to `dist`)").action(async (flags) => {
|
|
370
370
|
assertViteResolvesToCore();
|
|
371
|
-
const { build } = await import("../build-
|
|
371
|
+
const { build } = await import("../build-Cu5_qRyE.js");
|
|
372
372
|
await build(flags);
|
|
373
373
|
});
|
|
374
374
|
program.command("preview").description("Preview the production build").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").action(async (flags) => {
|
|
375
375
|
assertViteResolvesToCore();
|
|
376
|
-
const { preview } = await import("../preview-
|
|
376
|
+
const { preview } = await import("../preview-BuCI-RMW.js");
|
|
377
377
|
await preview(flags);
|
|
378
378
|
});
|
|
379
379
|
program.command("sync:skills").description("Sync built-in skills from @open-slide/core into this workspace").option("--dry-run", "show what would change without writing").action(async (flags) => {
|
|
@@ -926,17 +926,25 @@ function planReplacePlaceholder(ast, element, assetPath) {
|
|
|
926
926
|
};
|
|
927
927
|
}
|
|
928
928
|
function applyEdit(source, line, column, ops) {
|
|
929
|
-
|
|
929
|
+
const plan = planEdit(source, line, column, ops);
|
|
930
|
+
if (!plan.ok) return plan;
|
|
931
|
+
return plan.splices.length ? applySplices(source, plan.splices) : {
|
|
930
932
|
ok: true,
|
|
931
933
|
source
|
|
932
934
|
};
|
|
935
|
+
}
|
|
936
|
+
function planEdit(source, line, column, ops, exactLocation = false) {
|
|
937
|
+
if (ops.length === 0) return {
|
|
938
|
+
ok: true,
|
|
939
|
+
splices: []
|
|
940
|
+
};
|
|
933
941
|
const ast = parseSource(source);
|
|
934
942
|
if (!ast) return {
|
|
935
943
|
ok: false,
|
|
936
944
|
status: 422,
|
|
937
945
|
error: "could not parse source"
|
|
938
946
|
};
|
|
939
|
-
const element = findElementForEdit(ast, line, column, ops);
|
|
947
|
+
const element = exactLocation ? findJsxByStart(ast, line, column) : findElementForEdit(ast, line, column, ops);
|
|
940
948
|
if (!element) return {
|
|
941
949
|
ok: false,
|
|
942
950
|
status: 422,
|
|
@@ -1029,11 +1037,10 @@ function applyEdit(source, line, column, ops) {
|
|
|
1029
1037
|
});
|
|
1030
1038
|
}
|
|
1031
1039
|
}
|
|
1032
|
-
|
|
1040
|
+
return {
|
|
1033
1041
|
ok: true,
|
|
1034
|
-
|
|
1042
|
+
splices
|
|
1035
1043
|
};
|
|
1036
|
-
return applySplices(source, splices);
|
|
1037
1044
|
}
|
|
1038
1045
|
//#endregion
|
|
1039
1046
|
//#region src/editing/revert-asset.ts
|
|
@@ -2319,6 +2326,114 @@ function registerCommentRoutes(server, ctx) {
|
|
|
2319
2326
|
});
|
|
2320
2327
|
}
|
|
2321
2328
|
//#endregion
|
|
2329
|
+
//#region src/editing/batch-edit.ts
|
|
2330
|
+
function rebaseOffset(offset, splices, target) {
|
|
2331
|
+
let shift = 0;
|
|
2332
|
+
for (const splice of splices) {
|
|
2333
|
+
if (offset < splice.from) break;
|
|
2334
|
+
if (offset >= splice.to) shift += splice.text.length - (splice.to - splice.from);
|
|
2335
|
+
else if (offset === splice.from && offset === target) return offset + shift;
|
|
2336
|
+
else return null;
|
|
2337
|
+
}
|
|
2338
|
+
return offset + shift;
|
|
2339
|
+
}
|
|
2340
|
+
function applyEditBatch(source, edits) {
|
|
2341
|
+
const ast = parseSource(source);
|
|
2342
|
+
const targets = /* @__PURE__ */ new Map();
|
|
2343
|
+
const textTargets = /* @__PURE__ */ new Map();
|
|
2344
|
+
const tracked = edits.map((edit, index) => {
|
|
2345
|
+
if (!edit || !Number.isInteger(edit.line) || (edit.line ?? 0) < 1 || !Number.isInteger(edit.column ?? 0) || (edit.column ?? 0) < 0 || !Array.isArray(edit.ops) || edit.dependsOn !== void 0 && (!Number.isInteger(edit.dependsOn) || edit.dependsOn < 0 || edit.dependsOn >= index)) return {
|
|
2346
|
+
offset: null,
|
|
2347
|
+
ops: [],
|
|
2348
|
+
error: "invalid edit"
|
|
2349
|
+
};
|
|
2350
|
+
if (!edit.ops.length) return {
|
|
2351
|
+
offset: null,
|
|
2352
|
+
ops: [],
|
|
2353
|
+
dependsOn: edit.dependsOn
|
|
2354
|
+
};
|
|
2355
|
+
if (!ast) return {
|
|
2356
|
+
offset: null,
|
|
2357
|
+
ops: edit.ops,
|
|
2358
|
+
error: "could not parse source"
|
|
2359
|
+
};
|
|
2360
|
+
const location = `${edit.line}:${edit.column ?? 0}:`;
|
|
2361
|
+
const textOp = edit.ops.find((op) => "prevText" in op && op.prevText !== void 0);
|
|
2362
|
+
const prevText = textOp && "prevText" in textOp ? textOp.prevText : void 0;
|
|
2363
|
+
const offset = (edit.dependsOn === void 0 ? void 0 : targets.get(edit.dependsOn)) ?? (prevText === void 0 ? void 0 : textTargets.get(`${location}${prevText}`)) ?? findElementForEdit(ast, edit.line ?? 0, edit.column ?? 0, edit.ops)?.start ?? null;
|
|
2364
|
+
if (offset !== null) {
|
|
2365
|
+
targets.set(index, offset);
|
|
2366
|
+
for (const op of edit.ops) if (op.kind === "set-text") textTargets.set(`${location}${op.value}`, offset);
|
|
2367
|
+
}
|
|
2368
|
+
return {
|
|
2369
|
+
offset,
|
|
2370
|
+
ops: edit.ops,
|
|
2371
|
+
dependsOn: edit.dependsOn,
|
|
2372
|
+
...offset === null ? { error: "no JSX element at location" } : {}
|
|
2373
|
+
};
|
|
2374
|
+
});
|
|
2375
|
+
let next = source;
|
|
2376
|
+
const results = [];
|
|
2377
|
+
for (const edit of tracked) {
|
|
2378
|
+
if (edit.dependsOn !== void 0 && !results[edit.dependsOn]?.ok) {
|
|
2379
|
+
results.push({
|
|
2380
|
+
ok: false,
|
|
2381
|
+
error: "an earlier edit for this text failed"
|
|
2382
|
+
});
|
|
2383
|
+
continue;
|
|
2384
|
+
}
|
|
2385
|
+
if (edit.error) {
|
|
2386
|
+
results.push({
|
|
2387
|
+
ok: false,
|
|
2388
|
+
error: edit.error
|
|
2389
|
+
});
|
|
2390
|
+
continue;
|
|
2391
|
+
}
|
|
2392
|
+
if (!edit.ops.length) {
|
|
2393
|
+
results.push({ ok: true });
|
|
2394
|
+
continue;
|
|
2395
|
+
}
|
|
2396
|
+
if (edit.offset === null) {
|
|
2397
|
+
results.push({
|
|
2398
|
+
ok: false,
|
|
2399
|
+
error: "target was removed by an earlier edit"
|
|
2400
|
+
});
|
|
2401
|
+
continue;
|
|
2402
|
+
}
|
|
2403
|
+
const before = next.slice(0, edit.offset);
|
|
2404
|
+
const line = before.split("\n").length;
|
|
2405
|
+
const column = edit.offset - before.lastIndexOf("\n") - 1;
|
|
2406
|
+
const plan = planEdit(next, line, column, edit.ops, true);
|
|
2407
|
+
if (!plan.ok) {
|
|
2408
|
+
results.push({
|
|
2409
|
+
ok: false,
|
|
2410
|
+
error: plan.error
|
|
2411
|
+
});
|
|
2412
|
+
continue;
|
|
2413
|
+
}
|
|
2414
|
+
const result = plan.splices.length ? applySplices(next, plan.splices) : {
|
|
2415
|
+
ok: true,
|
|
2416
|
+
source: next
|
|
2417
|
+
};
|
|
2418
|
+
if (!result.ok) {
|
|
2419
|
+
results.push({
|
|
2420
|
+
ok: false,
|
|
2421
|
+
error: result.error
|
|
2422
|
+
});
|
|
2423
|
+
continue;
|
|
2424
|
+
}
|
|
2425
|
+
const target = edit.offset;
|
|
2426
|
+
const splices = [...plan.splices].sort((a, b) => a.from - b.from || a.to - b.to);
|
|
2427
|
+
for (const pending of tracked) if (pending.offset !== null) pending.offset = rebaseOffset(pending.offset, splices, target);
|
|
2428
|
+
next = result.source;
|
|
2429
|
+
results.push({ ok: true });
|
|
2430
|
+
}
|
|
2431
|
+
return {
|
|
2432
|
+
source: next,
|
|
2433
|
+
results
|
|
2434
|
+
};
|
|
2435
|
+
}
|
|
2436
|
+
//#endregion
|
|
2322
2437
|
//#region src/vite/routes/edit.ts
|
|
2323
2438
|
function registerEditRoutes(server, ctx) {
|
|
2324
2439
|
server.middlewares.use("/__edit", async (req, res, next) => {
|
|
@@ -2370,28 +2485,9 @@ function registerEditRoutes(server, ctx) {
|
|
|
2370
2485
|
if (!Array.isArray(body.edits)) return json(res, 400, { error: "missing edits" });
|
|
2371
2486
|
const source = await readSlideSource(file);
|
|
2372
2487
|
if (source === null) return json(res, 404, { error: "slide not found" });
|
|
2373
|
-
|
|
2374
|
-
const
|
|
2375
|
-
|
|
2376
|
-
for (const edit of body.edits) {
|
|
2377
|
-
if (!edit.line || edit.line < 1 || !Array.isArray(edit.ops)) {
|
|
2378
|
-
results.push({
|
|
2379
|
-
ok: false,
|
|
2380
|
-
error: "invalid edit"
|
|
2381
|
-
});
|
|
2382
|
-
continue;
|
|
2383
|
-
}
|
|
2384
|
-
const r = applyEdit(next, edit.line, edit.column ?? 0, edit.ops);
|
|
2385
|
-
if (r.ok) {
|
|
2386
|
-
next = r.source;
|
|
2387
|
-
results.push({ ok: true });
|
|
2388
|
-
} else results.push({
|
|
2389
|
-
ok: false,
|
|
2390
|
-
error: r.error
|
|
2391
|
-
});
|
|
2392
|
-
}
|
|
2393
|
-
const changed = next !== original;
|
|
2394
|
-
if (changed) await fs.writeFile(file, next, "utf8");
|
|
2488
|
+
const { source: updated, results } = applyEditBatch(source, body.edits);
|
|
2489
|
+
const changed = updated !== source;
|
|
2490
|
+
if (changed) await fs.writeFile(file, updated, "utf8");
|
|
2395
2491
|
return json(res, 200, {
|
|
2396
2492
|
ok: true,
|
|
2397
2493
|
changed,
|
|
@@ -2501,6 +2597,108 @@ function registerFolderRoutes(server, ctx) {
|
|
|
2501
2597
|
}
|
|
2502
2598
|
});
|
|
2503
2599
|
}
|
|
2600
|
+
//#endregion
|
|
2601
|
+
//#region src/vite/routes/gfonts.ts
|
|
2602
|
+
const CATALOG_URL = "https://fonts.google.com/metadata/fonts";
|
|
2603
|
+
const CATALOG_TTL = 36e5;
|
|
2604
|
+
const LEGACY_UA = "Mozilla/5.0";
|
|
2605
|
+
const FONT_EXTS = /* @__PURE__ */ new Set([
|
|
2606
|
+
"ttf",
|
|
2607
|
+
"otf",
|
|
2608
|
+
"woff",
|
|
2609
|
+
"woff2"
|
|
2610
|
+
]);
|
|
2611
|
+
let catalogCache = null;
|
|
2612
|
+
let catalogInflight = null;
|
|
2613
|
+
async function loadCatalog() {
|
|
2614
|
+
if (catalogCache && Date.now() - catalogCache.at < CATALOG_TTL) return catalogCache.entries;
|
|
2615
|
+
if (catalogInflight) return catalogInflight;
|
|
2616
|
+
catalogInflight = (async () => {
|
|
2617
|
+
const res = await fetch(CATALOG_URL);
|
|
2618
|
+
if (!res.ok) throw new Error(`metadata ${res.status}`);
|
|
2619
|
+
const text = await res.text();
|
|
2620
|
+
const start = text.indexOf("{");
|
|
2621
|
+
const entries = (JSON.parse(start > 0 ? text.slice(start) : text).familyMetadataList ?? []).map((f) => ({
|
|
2622
|
+
family: f.family,
|
|
2623
|
+
category: f.category ?? "",
|
|
2624
|
+
variants: Object.keys(f.fonts ?? {}),
|
|
2625
|
+
popularity: typeof f.popularity === "number" ? f.popularity : Number.MAX_SAFE_INTEGER
|
|
2626
|
+
}));
|
|
2627
|
+
catalogCache = {
|
|
2628
|
+
at: Date.now(),
|
|
2629
|
+
entries
|
|
2630
|
+
};
|
|
2631
|
+
return entries;
|
|
2632
|
+
})();
|
|
2633
|
+
try {
|
|
2634
|
+
return await catalogInflight;
|
|
2635
|
+
} finally {
|
|
2636
|
+
catalogInflight = null;
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
function cssFamilyParam(family) {
|
|
2640
|
+
return encodeURIComponent(family).replace(/%20/g, "+");
|
|
2641
|
+
}
|
|
2642
|
+
async function resolveFontFile(family, variant) {
|
|
2643
|
+
const italic = /i(talic)?$/.test(variant);
|
|
2644
|
+
const weight = variant.replace(/i(talic)?$/, "") || "400";
|
|
2645
|
+
const style = italic ? `${weight}italic` : weight;
|
|
2646
|
+
const cssUrl = `https://fonts.googleapis.com/css?family=${cssFamilyParam(family)}:${style}`;
|
|
2647
|
+
const css = await fetch(cssUrl, { headers: { "user-agent": LEGACY_UA } });
|
|
2648
|
+
if (!css.ok) return null;
|
|
2649
|
+
const match = (await css.text()).match(/url\((https:\/\/[^)]+)\)/);
|
|
2650
|
+
if (!match) return null;
|
|
2651
|
+
let parsed;
|
|
2652
|
+
try {
|
|
2653
|
+
parsed = new URL(match[1]);
|
|
2654
|
+
} catch {
|
|
2655
|
+
return null;
|
|
2656
|
+
}
|
|
2657
|
+
if (!parsed.hostname.toLowerCase().endsWith("gstatic.com")) return null;
|
|
2658
|
+
const rawExt = parsed.pathname.split(".").pop()?.toLowerCase() ?? "";
|
|
2659
|
+
const ext = FONT_EXTS.has(rawExt) ? rawExt : "ttf";
|
|
2660
|
+
return {
|
|
2661
|
+
url: parsed.toString(),
|
|
2662
|
+
ext
|
|
2663
|
+
};
|
|
2664
|
+
}
|
|
2665
|
+
function registerGfontsRoutes(server) {
|
|
2666
|
+
server.middlewares.use("/__gfonts", async (req, res, next) => {
|
|
2667
|
+
const reqUrl = new URL(req.url ?? "/", "http://local");
|
|
2668
|
+
if ((req.method ?? "GET") !== "GET") return next();
|
|
2669
|
+
try {
|
|
2670
|
+
if (reqUrl.pathname === "/search") {
|
|
2671
|
+
const q = (reqUrl.searchParams.get("q") ?? "").trim().toLowerCase();
|
|
2672
|
+
const limit = Number(reqUrl.searchParams.get("limit")) || 30;
|
|
2673
|
+
let entries = await loadCatalog();
|
|
2674
|
+
if (q) entries = entries.filter((e) => e.family.toLowerCase().includes(q));
|
|
2675
|
+
return json(res, 200, entries.slice().sort((a, b) => a.popularity - b.popularity).slice(0, limit).map((e) => ({
|
|
2676
|
+
family: e.family,
|
|
2677
|
+
category: e.category,
|
|
2678
|
+
variants: e.variants
|
|
2679
|
+
})));
|
|
2680
|
+
}
|
|
2681
|
+
if (reqUrl.pathname === "/download") {
|
|
2682
|
+
const family = reqUrl.searchParams.get("family");
|
|
2683
|
+
const variant = reqUrl.searchParams.get("variant") || "400";
|
|
2684
|
+
if (!family) return json(res, 400, { error: "missing family" });
|
|
2685
|
+
const resolved = await resolveFontFile(family, variant);
|
|
2686
|
+
if (!resolved) return json(res, 404, { error: "font not found" });
|
|
2687
|
+
const upstream = await fetch(resolved.url);
|
|
2688
|
+
if (!upstream.ok) return json(res, 502, { error: `gstatic ${upstream.status}` });
|
|
2689
|
+
res.statusCode = 200;
|
|
2690
|
+
res.setHeader("content-type", upstream.headers.get("content-type") ?? "font/ttf");
|
|
2691
|
+
res.setHeader("x-font-ext", resolved.ext);
|
|
2692
|
+
res.setHeader("cache-control", "no-store");
|
|
2693
|
+
res.end(Buffer.from(await upstream.arrayBuffer()));
|
|
2694
|
+
return;
|
|
2695
|
+
}
|
|
2696
|
+
return next();
|
|
2697
|
+
} catch (err) {
|
|
2698
|
+
json(res, 502, { error: String(err.message ?? err) });
|
|
2699
|
+
}
|
|
2700
|
+
});
|
|
2701
|
+
}
|
|
2504
2702
|
const DEV_SUPERVISED_ENV = "OPEN_SLIDE_DEV_SUPERVISED";
|
|
2505
2703
|
const executionId = randomUUID();
|
|
2506
2704
|
function isSupervised() {
|
|
@@ -2920,6 +3118,7 @@ function apiPlugin(opts) {
|
|
|
2920
3118
|
registerSlideRoutes(server, ctx);
|
|
2921
3119
|
registerAssetRoutes(server, ctx);
|
|
2922
3120
|
registerSvglRoutes(server);
|
|
3121
|
+
registerGfontsRoutes(server);
|
|
2923
3122
|
registerFolderRoutes(server, ctx);
|
|
2924
3123
|
registerUpdateRoutes(server, ctx);
|
|
2925
3124
|
registerRestartRoutes(server);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as printUrls, i as printShortcutsHint, n as formatError, o as shortcutsEnabled, r as printHeader, s as startupDuration, t as createCliLogger } from "./cli/bin.js";
|
|
2
|
-
import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-
|
|
2
|
+
import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-BQ6rD2iE.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { fork } from "node:child_process";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Plural, t as Locale } from "./types-
|
|
2
|
-
import { t as OpenSlideConfig } from "./config-
|
|
1
|
+
import { n as Plural, t as Locale } from "./types-BcbaKTNY.js";
|
|
2
|
+
import { t as OpenSlideConfig } from "./config-GMR1QUlM.js";
|
|
3
3
|
import { CSSProperties, ComponentType, HTMLAttributes, PropsWithChildren, ReactNode } from "react";
|
|
4
4
|
//#region src/app/components/image-placeholder.d.ts
|
|
5
5
|
type ImagePlaceholderProps = {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as en, n as zhCN, r as ja, t as zhTW } from "./zh-tw-
|
|
1
|
+
import { i as en, n as zhCN, r as ja, t as zhTW } from "./zh-tw-DlZoAc2-.js";
|
|
2
2
|
import { n as defaultDesign, r as designToCssVars, t as cssVarsToString } from "./design-Cpqx7SJs.js";
|
|
3
3
|
import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { toast } from "sonner";
|
package/dist/locale/index.d.ts
CHANGED
package/dist/locale/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as en, n as zhCN, r as ja, t as zhTW } from "../zh-tw-
|
|
1
|
+
import { i as en, n as zhCN, r as ja, t as zhTW } from "../zh-tw-DlZoAc2-.js";
|
|
2
2
|
//#region src/locale/format.ts
|
|
3
3
|
function format(template, vars) {
|
|
4
4
|
return template.replace(/\{(\w+)\}/g, (m, key) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as printUrls, i as printShortcutsHint, o as shortcutsEnabled, r as printHeader, s as startupDuration, t as createCliLogger } from "./cli/bin.js";
|
|
2
|
-
import { t as createViteConfig } from "./config-
|
|
2
|
+
import { t as createViteConfig } from "./config-BQ6rD2iE.js";
|
|
3
3
|
import { mergeConfig, preview as preview$1 } from "vite";
|
|
4
4
|
//#region src/cli/preview.ts
|
|
5
5
|
async function preview(opts = {}) {
|
|
@@ -196,6 +196,51 @@ type Locale = {
|
|
|
196
196
|
nowBadge: string;
|
|
197
197
|
};
|
|
198
198
|
inspector: {
|
|
199
|
+
format: string;
|
|
200
|
+
editMode: string;
|
|
201
|
+
previewMode: string;
|
|
202
|
+
closeFormatPanel: string;
|
|
203
|
+
editText: string;
|
|
204
|
+
emptySelectionTitle: string;
|
|
205
|
+
emptySelectionHint: string;
|
|
206
|
+
textSelectionHint: string;
|
|
207
|
+
elementText: string;
|
|
208
|
+
elementImage: string;
|
|
209
|
+
elementShape: string;
|
|
210
|
+
sourceSection: string;
|
|
211
|
+
rotateHandle: string;
|
|
212
|
+
resizeHandle: string;
|
|
213
|
+
arrangeSection: string;
|
|
214
|
+
selectionCount: string;
|
|
215
|
+
positionLabel: string;
|
|
216
|
+
positionX: string;
|
|
217
|
+
positionY: string;
|
|
218
|
+
widthLabel: string;
|
|
219
|
+
heightLabel: string;
|
|
220
|
+
rotationLabel: string;
|
|
221
|
+
alignToLabel: string;
|
|
222
|
+
alignToSelection: string;
|
|
223
|
+
alignToSlide: string;
|
|
224
|
+
alignLeft: string;
|
|
225
|
+
alignCenter: string;
|
|
226
|
+
alignRight: string;
|
|
227
|
+
alignTop: string;
|
|
228
|
+
alignMiddle: string;
|
|
229
|
+
alignBottom: string;
|
|
230
|
+
distributeLabel: string;
|
|
231
|
+
distributeHorizontal: string;
|
|
232
|
+
distributeVertical: string;
|
|
233
|
+
layerLabel: string;
|
|
234
|
+
bringToFront: string;
|
|
235
|
+
bringForward: string;
|
|
236
|
+
sendBackward: string;
|
|
237
|
+
sendToBack: string;
|
|
238
|
+
smartGuides: string;
|
|
239
|
+
selectParent: string;
|
|
240
|
+
visualEditorHint: string;
|
|
241
|
+
sharedLayoutHint: string;
|
|
242
|
+
inlineLayoutHint: string;
|
|
243
|
+
layerLayoutHint: string;
|
|
199
244
|
inspect: string;
|
|
200
245
|
deselect: string;
|
|
201
246
|
agentWatching: string;
|
|
@@ -319,6 +364,7 @@ type Locale = {
|
|
|
319
364
|
noMatchingAssetsHint: string;
|
|
320
365
|
clearFilters: string;
|
|
321
366
|
searchLogos: string;
|
|
367
|
+
searchFonts: string;
|
|
322
368
|
upload: string;
|
|
323
369
|
dropToUpload: string;
|
|
324
370
|
loading: string;
|
|
@@ -364,6 +410,19 @@ type Locale = {
|
|
|
364
410
|
logoSearchEmptyHintSuffix: string;
|
|
365
411
|
logoVariantLight: string;
|
|
366
412
|
logoVariantDark: string;
|
|
413
|
+
fontSearchTitle: string;
|
|
414
|
+
fontSearchPoweredByPrefix: string;
|
|
415
|
+
fontSearchPlaceholder: string;
|
|
416
|
+
fontSearchPreviewPlaceholder: string;
|
|
417
|
+
fontSearchErrorTitle: string;
|
|
418
|
+
fontSearchErrorBody: string;
|
|
419
|
+
/** template: 'No fonts for "{query}"' */
|
|
420
|
+
fontSearchNoResults: string;
|
|
421
|
+
fontSearchEmpty: string;
|
|
422
|
+
fontSearchEmptyHintPrefix: string;
|
|
423
|
+
fontSearchEmptyHintSuffix: string;
|
|
424
|
+
fontWeightLabel: string;
|
|
425
|
+
fontPreviewSample: string;
|
|
367
426
|
/** template: "Upload failed ({status})" */
|
|
368
427
|
toastUploadFailed: string;
|
|
369
428
|
/** template: "Replaced {name}" */
|
|
@@ -381,6 +440,7 @@ type Locale = {
|
|
|
381
440
|
/** template: "Deleted {name}" */
|
|
382
441
|
toastDeleted: string;
|
|
383
442
|
toastDownloadFailed: string;
|
|
443
|
+
toastFontDownloadFailed: string;
|
|
384
444
|
toastSearchFailed: string;
|
|
385
445
|
};
|
|
386
446
|
thumbnailRail: {
|
package/dist/vite/index.d.ts
CHANGED
package/dist/vite/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createViteConfig } from "../config-
|
|
1
|
+
import { t as createViteConfig } from "../config-BQ6rD2iE.js";
|
|
2
2
|
export { createViteConfig };
|