@open-slide/core 1.13.5 → 1.14.0

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.
@@ -1,5 +1,5 @@
1
1
  import "./design-cpzS8aud.js";
2
- import { createViteConfig } from "./config-CU_NISD6.js";
2
+ import { createViteConfig } from "./config-DvRA48y9.js";
3
3
  import path from "node:path";
4
4
  import { build as build$1, mergeConfig } from "vite";
5
5
 
package/dist/cli/bin.js CHANGED
@@ -57,15 +57,15 @@ async function run(argv) {
57
57
  program.name("open-slide").description("Author slides — we handle the Vite/React stack.").version(version, "-v, --version", "print version").helpOption("-h, --help", "show help").showHelpAfterError(chalk.dim("(run `open-slide --help` for usage)"));
58
58
  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) => {
59
59
  if (flags.skillsCheck !== false) await runSkillsDriftCheck(resolveBuiltinSkillsDir());
60
- const { dev } = await import("../dev-C78J1TLR.js");
60
+ const { dev } = await import("../dev-BGXWqVUZ.js");
61
61
  await dev(flags);
62
62
  });
63
63
  program.command("build").description("Build a static site").option("--out-dir <dir>", "output directory (defaults to `dist`)").action(async (flags) => {
64
- const { build } = await import("../build-OAZ8maw5.js");
64
+ const { build } = await import("../build-Dx-qTg82.js");
65
65
  await build(flags);
66
66
  });
67
67
  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) => {
68
- const { preview } = await import("../preview-DZLZ3L9v.js");
68
+ const { preview } = await import("../preview-CdQnIB39.js");
69
69
  await preview(flags);
70
70
  });
71
71
  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) => {
@@ -1,4 +1,4 @@
1
- import { Locale } from "./types-DucrShh9.js";
1
+ import { Locale } from "./types-GA4ekcYB.js";
2
2
 
3
3
  //#region src/config.d.ts
4
4
  type OpenSlideBuildConfig = {
@@ -1802,6 +1802,9 @@ function mimeForFilename(name) {
1802
1802
  const ext = name.slice(dot + 1).toLowerCase();
1803
1803
  return MIME_BY_EXT[ext] ?? "application/octet-stream";
1804
1804
  }
1805
+ function assetCreatedAt(birthtimeMs, mtimeMs) {
1806
+ return Number.isFinite(birthtimeMs) && birthtimeMs > 0 ? birthtimeMs : mtimeMs;
1807
+ }
1805
1808
  function validateAssetName(v) {
1806
1809
  if (typeof v !== "string") return null;
1807
1810
  const trimmed = v.trim();
@@ -2034,6 +2037,7 @@ function registerAssetRoutes(server, ctx) {
2034
2037
  assets.push({
2035
2038
  name,
2036
2039
  size: stat.size,
2040
+ createdAt: assetCreatedAt(stat.birthtimeMs, stat.mtimeMs),
2037
2041
  mtime: stat.mtimeMs,
2038
2042
  mime: mimeForFilename(name),
2039
2043
  url: `/__assets/${slideId}/${encodeURIComponent(name)}`,
@@ -2118,10 +2122,13 @@ function registerAssetRoutes(server, ctx) {
2118
2122
  });
2119
2123
  if (oversized) return json(res, 413, { error: "file too large" });
2120
2124
  await fs.writeFile(file, Buffer.concat(chunks));
2125
+ const stat = await fs.stat(file);
2121
2126
  return json(res, 200, {
2122
2127
  ok: true,
2123
2128
  name: filename,
2124
- size: total,
2129
+ size: stat.size,
2130
+ createdAt: assetCreatedAt(stat.birthtimeMs, stat.mtimeMs),
2131
+ mtime: stat.mtimeMs,
2125
2132
  mime: mimeForFilename(filename),
2126
2133
  url: `/__assets/${slideId}/${encodeURIComponent(filename)}`
2127
2134
  });
@@ -2629,6 +2636,33 @@ function registerFolderRoutes(server, ctx) {
2629
2636
  });
2630
2637
  }
2631
2638
 
2639
+ //#endregion
2640
+ //#region src/vite/routes/restart.ts
2641
+ const RESTART_EXIT_CODE = 52;
2642
+ const DEV_SUPERVISED_ENV = "OPEN_SLIDE_DEV_SUPERVISED";
2643
+ const executionId = randomUUID();
2644
+ function isSupervised() {
2645
+ return process.env[DEV_SUPERVISED_ENV] === "1";
2646
+ }
2647
+ function registerRestartRoutes(server) {
2648
+ server.middlewares.use("/__server-status", (req, res, next) => {
2649
+ if ((req.method ?? "GET") !== "GET") return next();
2650
+ res.setHeader("cache-control", "no-store");
2651
+ json(res, 200, {
2652
+ executionId,
2653
+ canRestart: isSupervised()
2654
+ });
2655
+ });
2656
+ server.middlewares.use("/__restart-server", (req, res, next) => {
2657
+ if ((req.method ?? "GET") !== "POST") return next();
2658
+ const guard = validateMutationRequest(req);
2659
+ if (!guard.ok) return json(res, guard.status, { error: guard.error });
2660
+ if (!isSupervised()) return json(res, 409, { error: "dev server was not started by the open-slide CLI" });
2661
+ res.on("finish", () => process.exit(RESTART_EXIT_CODE));
2662
+ json(res, 200, { restarting: true });
2663
+ });
2664
+ }
2665
+
2632
2666
  //#endregion
2633
2667
  //#region src/vite/routes/slides.ts
2634
2668
  function registerSlideRoutes(server, ctx) {
@@ -3037,6 +3071,7 @@ function apiPlugin(opts) {
3037
3071
  registerSvglRoutes(server);
3038
3072
  registerFolderRoutes(server, ctx);
3039
3073
  registerUpdateRoutes(server, ctx);
3074
+ registerRestartRoutes(server);
3040
3075
  }
3041
3076
  };
3042
3077
  }
@@ -4277,4 +4312,4 @@ async function createViteConfig(opts) {
4277
4312
  }
4278
4313
 
4279
4314
  //#endregion
4280
- export { createViteConfig };
4315
+ export { DEV_SUPERVISED_ENV, RESTART_EXIT_CODE, createViteConfig };
@@ -0,0 +1,94 @@
1
+ import "./design-cpzS8aud.js";
2
+ import { DEV_SUPERVISED_ENV, RESTART_EXIT_CODE, createViteConfig } from "./config-DvRA48y9.js";
3
+ import chalk from "chalk";
4
+ import path from "node:path";
5
+ import { existsSync } from "node:fs";
6
+ import { fork } from "node:child_process";
7
+ import { createServer, mergeConfig } from "vite";
8
+
9
+ //#region src/cli/dev.ts
10
+ async function dev(opts = {}) {
11
+ if (process.env[DEV_SUPERVISED_ENV] === "1") {
12
+ await startServer(opts);
13
+ return;
14
+ }
15
+ supervise(opts);
16
+ }
17
+ async function startServer(opts) {
18
+ const base = await createViteConfig({ userCwd: process.cwd() });
19
+ const config = mergeConfig(base, { server: {
20
+ ...opts.port !== void 0 ? { port: opts.port } : {},
21
+ ...opts.host !== void 0 ? { host: opts.host } : {},
22
+ ...opts.open !== void 0 ? { open: opts.open } : {}
23
+ } });
24
+ const server = await createServer(config);
25
+ await server.listen();
26
+ server.printUrls();
27
+ server.bindCLIShortcuts({ print: true });
28
+ const address = server.httpServer?.address();
29
+ if (process.send && address && typeof address === "object") process.send({
30
+ type: "open-slide:listening",
31
+ port: address.port
32
+ });
33
+ }
34
+ function supervise(opts) {
35
+ const userCwd = process.cwd();
36
+ let port = opts.port;
37
+ let openBrowser = opts.open;
38
+ let child;
39
+ let shuttingDown = false;
40
+ const spawnChild = () => {
41
+ child = fork(resolveDevEntry(userCwd), devArgs({
42
+ ...opts,
43
+ port,
44
+ open: openBrowser
45
+ }), {
46
+ cwd: userCwd,
47
+ stdio: "inherit",
48
+ env: {
49
+ ...process.env,
50
+ [DEV_SUPERVISED_ENV]: "1"
51
+ }
52
+ });
53
+ child.on("error", (err) => {
54
+ process.stderr.write(`${chalk.red("error:")} ${err.message}\n`);
55
+ process.exit(1);
56
+ });
57
+ child.on("message", (message) => {
58
+ if (typeof message !== "object" || message === null) return;
59
+ const { type, port: reportedPort } = message;
60
+ if (type === "open-slide:listening" && typeof reportedPort === "number") port = reportedPort;
61
+ });
62
+ child.on("exit", (code, signal) => {
63
+ if (shuttingDown) process.exit(0);
64
+ if (code === RESTART_EXIT_CODE) {
65
+ openBrowser = false;
66
+ spawnChild();
67
+ return;
68
+ }
69
+ if (signal) process.exit(1);
70
+ process.exit(code ?? 0);
71
+ });
72
+ };
73
+ for (const signal of ["SIGINT", "SIGTERM"]) process.on(signal, () => {
74
+ shuttingDown = true;
75
+ child?.kill(signal);
76
+ });
77
+ spawnChild();
78
+ }
79
+ function devArgs(opts) {
80
+ const args = ["dev", "--no-skills-check"];
81
+ if (opts.port !== void 0) args.push("--port", String(opts.port));
82
+ if (opts.host === true) args.push("--host");
83
+ else if (typeof opts.host === "string") args.push("--host", opts.host);
84
+ if (opts.open) args.push("--open");
85
+ return args;
86
+ }
87
+ function resolveDevEntry(userCwd) {
88
+ const installed = path.join(userCwd, "node_modules", "@open-slide", "core", "bin.js");
89
+ if (existsSync(installed)) return installed;
90
+ return process.argv[1];
91
+ }
92
+
93
+ //#endregion
94
+ export { dev };
@@ -42,11 +42,14 @@ const en = {
42
42
  menu: "Menu",
43
43
  newFolder: "New folder",
44
44
  folderName: "Folder name",
45
- updateAvailable: "open-slide {version} is available — update the package to get the latest.",
45
+ updateAvailable: "open-slide {version} is available",
46
46
  updatePackage: "Update",
47
47
  updatingPackage: "Updating",
48
48
  updatePackageDone: "Updated. Restart the dev server to use the new version.",
49
49
  updatePackageFailed: "Update failed. Check the dev server output.",
50
+ restartServer: "Restart dev server",
51
+ restartingServer: "Restarting",
52
+ restartServerFailed: "Restart failed. Restart the dev server manually.",
50
53
  changeIcon: "Change icon",
51
54
  iconEmojiTab: "Emoji",
52
55
  iconColorTab: "Color",
@@ -278,7 +281,35 @@ const en = {
278
281
  one: "{count} file",
279
282
  other: "{count} files"
280
283
  },
284
+ createdAt: "Created",
285
+ modifiedAt: "Modified",
286
+ nameColumn: "Name",
287
+ typeColumn: "Type",
288
+ sizeColumn: "Size",
289
+ statusColumn: "Status",
290
+ sortAria: "Sort assets",
291
+ sortByColumn: "Sort by {column}",
292
+ sortAscending: "Ascending",
293
+ sortDescending: "Descending",
294
+ assetSearchPlaceholder: "Search assets…",
295
+ clearAssetSearch: "Clear asset search",
296
+ usageFilterAria: "Filter by usage",
297
+ usageAll: "All usage",
298
+ usageUsed: "Used",
281
299
  usageUnused: "Unused",
300
+ typeFilterAria: "Filter by file type",
301
+ typeAll: "All types",
302
+ typeImage: "Images",
303
+ typeFont: "Fonts",
304
+ typeVideo: "Videos",
305
+ typeOther: "Other",
306
+ gridViewAria: "Grid view",
307
+ listViewAria: "List view",
308
+ gridColumnsAria: "Grid columns",
309
+ gridColumnsValue: "{count} columns",
310
+ noMatchingAssets: "No matching assets",
311
+ noMatchingAssetsHint: "Try adjusting your search or filters.",
312
+ clearFilters: "Clear filters",
282
313
  searchLogos: "Search logos",
283
314
  upload: "Upload",
284
315
  dropToUpload: "Drop to upload",
@@ -341,7 +372,9 @@ const en = {
341
372
  resizeRail: "Resize thumbnail rail",
342
373
  transitionIndicator: "Has slide transition",
343
374
  stepsIndicator: "Has step-by-step reveals",
344
- overviewAria: "Slide overview (O)"
375
+ overviewAria: "Slide overview (O)",
376
+ scrollUpToCurrentPage: "Scroll up to current page {n}",
377
+ scrollDownToCurrentPage: "Scroll down to current page {n}"
345
378
  },
346
379
  pdfToast: {
347
380
  title: "Exporting PDF",
@@ -444,11 +477,14 @@ const ja = {
444
477
  menu: "メニュー",
445
478
  newFolder: "新規フォルダ",
446
479
  folderName: "フォルダ名",
447
- updateAvailable: "open-slide {version} が利用可能です — パッケージを更新して最新版を入手してください。",
480
+ updateAvailable: "open-slide {version} が利用可能です",
448
481
  updatePackage: "更新",
449
482
  updatingPackage: "更新中",
450
483
  updatePackageDone: "更新しました。新しいバージョンを使うには dev server を再起動してください。",
451
484
  updatePackageFailed: "更新に失敗しました。dev server の出力を確認してください。",
485
+ restartServer: "dev server を再起動",
486
+ restartingServer: "再起動中",
487
+ restartServerFailed: "再起動に失敗しました。dev server を手動で再起動してください。",
452
488
  changeIcon: "アイコンを変更",
453
489
  iconEmojiTab: "絵文字",
454
490
  iconColorTab: "カラー",
@@ -680,7 +716,35 @@ const ja = {
680
716
  one: "ファイル {count} 件",
681
717
  other: "ファイル {count} 件"
682
718
  },
719
+ createdAt: "作成日時",
720
+ modifiedAt: "更新日時",
721
+ nameColumn: "名前",
722
+ typeColumn: "種類",
723
+ sizeColumn: "サイズ",
724
+ statusColumn: "状態",
725
+ sortAria: "アセットを並べ替え",
726
+ sortByColumn: "{column}で並べ替え",
727
+ sortAscending: "昇順",
728
+ sortDescending: "降順",
729
+ assetSearchPlaceholder: "アセットを検索…",
730
+ clearAssetSearch: "アセット検索をクリア",
731
+ usageFilterAria: "使用状況で絞り込む",
732
+ usageAll: "すべての使用状況",
733
+ usageUsed: "使用中",
683
734
  usageUnused: "未使用",
735
+ typeFilterAria: "ファイル形式で絞り込む",
736
+ typeAll: "すべての形式",
737
+ typeImage: "画像",
738
+ typeFont: "フォント",
739
+ typeVideo: "動画",
740
+ typeOther: "その他",
741
+ gridViewAria: "グリッド表示",
742
+ listViewAria: "リスト表示",
743
+ gridColumnsAria: "グリッドの列数",
744
+ gridColumnsValue: "{count} 列",
745
+ noMatchingAssets: "一致するアセットがありません",
746
+ noMatchingAssetsHint: "検索条件またはフィルターを調整してください。",
747
+ clearFilters: "フィルターをクリア",
684
748
  searchLogos: "ロゴを検索",
685
749
  upload: "アップロード",
686
750
  dropToUpload: "ドロップでアップロード",
@@ -743,7 +807,9 @@ const ja = {
743
807
  resizeRail: "サムネイル幅を調整",
744
808
  transitionIndicator: "スライドトランジションあり",
745
809
  stepsIndicator: "ステップ表示あり",
746
- overviewAria: "スライド一覧 (O)"
810
+ overviewAria: "スライド一覧 (O)",
811
+ scrollUpToCurrentPage: "上にスクロールして現在のページ {n} へ移動",
812
+ scrollDownToCurrentPage: "下にスクロールして現在のページ {n} へ移動"
747
813
  },
748
814
  pdfToast: {
749
815
  title: "PDF を書き出し中",
@@ -846,11 +912,14 @@ const zhCN = {
846
912
  menu: "菜单",
847
913
  newFolder: "新建文件夹",
848
914
  folderName: "文件夹名称",
849
- updateAvailable: "open-slide {version} 已发布,请更新软件包以获取最新版本。",
915
+ updateAvailable: "open-slide {version} 已发布",
850
916
  updatePackage: "更新",
851
917
  updatingPackage: "更新中",
852
918
  updatePackageDone: "已更新。请重启 dev server 以使用新版本。",
853
919
  updatePackageFailed: "更新失败,请查看 dev server 输出。",
920
+ restartServer: "重启 dev server",
921
+ restartingServer: "重启中",
922
+ restartServerFailed: "重启失败,请手动重启 dev server。",
854
923
  changeIcon: "更换图标",
855
924
  iconEmojiTab: "Emoji",
856
925
  iconColorTab: "颜色",
@@ -1082,7 +1151,35 @@ const zhCN = {
1082
1151
  one: "{count} 个文件",
1083
1152
  other: "{count} 个文件"
1084
1153
  },
1154
+ createdAt: "创建时间",
1155
+ modifiedAt: "修改时间",
1156
+ nameColumn: "名称",
1157
+ typeColumn: "类型",
1158
+ sizeColumn: "大小",
1159
+ statusColumn: "状态",
1160
+ sortAria: "素材排序",
1161
+ sortByColumn: "按{column}排序",
1162
+ sortAscending: "升序",
1163
+ sortDescending: "降序",
1164
+ assetSearchPlaceholder: "搜索素材…",
1165
+ clearAssetSearch: "清除素材搜索",
1166
+ usageFilterAria: "按使用状态筛选",
1167
+ usageAll: "所有状态",
1168
+ usageUsed: "使用中",
1085
1169
  usageUnused: "未使用",
1170
+ typeFilterAria: "按文件类型筛选",
1171
+ typeAll: "所有类型",
1172
+ typeImage: "图片",
1173
+ typeFont: "字体",
1174
+ typeVideo: "视频",
1175
+ typeOther: "其他",
1176
+ gridViewAria: "网格视图",
1177
+ listViewAria: "列表视图",
1178
+ gridColumnsAria: "网格列数",
1179
+ gridColumnsValue: "{count} 列",
1180
+ noMatchingAssets: "找不到匹配的素材",
1181
+ noMatchingAssetsHint: "请调整搜索或筛选条件。",
1182
+ clearFilters: "清除筛选",
1086
1183
  searchLogos: "搜索 Logo",
1087
1184
  upload: "上传",
1088
1185
  dropToUpload: "拖入即可上传",
@@ -1145,7 +1242,9 @@ const zhCN = {
1145
1242
  resizeRail: "调整缩略图栏宽度",
1146
1243
  transitionIndicator: "有换页转场",
1147
1244
  stepsIndicator: "有逐步揭示",
1148
- overviewAria: "幻灯片总览 (O)"
1245
+ overviewAria: "幻灯片总览 (O)",
1246
+ scrollUpToCurrentPage: "向上滚动至当前第 {n} 页",
1247
+ scrollDownToCurrentPage: "向下滚动至当前第 {n} 页"
1149
1248
  },
1150
1249
  pdfToast: {
1151
1250
  title: "导出 PDF",
@@ -1248,11 +1347,14 @@ const zhTW = {
1248
1347
  menu: "選單",
1249
1348
  newFolder: "新增資料夾",
1250
1349
  folderName: "資料夾名稱",
1251
- updateAvailable: "open-slide {version} 已發布,請更新套件以取得最新版本。",
1350
+ updateAvailable: "open-slide {version} 已發布",
1252
1351
  updatePackage: "更新",
1253
1352
  updatingPackage: "更新中",
1254
1353
  updatePackageDone: "已更新。請重新啟動 dev server 以使用新版本。",
1255
1354
  updatePackageFailed: "更新失敗,請查看 dev server 輸出。",
1355
+ restartServer: "重新啟動 dev server",
1356
+ restartingServer: "重新啟動中",
1357
+ restartServerFailed: "重新啟動失敗,請手動重新啟動 dev server。",
1256
1358
  changeIcon: "變更圖示",
1257
1359
  iconEmojiTab: "Emoji",
1258
1360
  iconColorTab: "顏色",
@@ -1484,7 +1586,35 @@ const zhTW = {
1484
1586
  one: "{count} 個檔案",
1485
1587
  other: "{count} 個檔案"
1486
1588
  },
1589
+ createdAt: "建立時間",
1590
+ modifiedAt: "修改時間",
1591
+ nameColumn: "名稱",
1592
+ typeColumn: "類型",
1593
+ sizeColumn: "大小",
1594
+ statusColumn: "狀態",
1595
+ sortAria: "素材排序",
1596
+ sortByColumn: "依{column}排序",
1597
+ sortAscending: "升冪",
1598
+ sortDescending: "降冪",
1599
+ assetSearchPlaceholder: "搜尋素材…",
1600
+ clearAssetSearch: "清除素材搜尋",
1601
+ usageFilterAria: "依使用狀態篩選",
1602
+ usageAll: "所有狀態",
1603
+ usageUsed: "使用中",
1487
1604
  usageUnused: "未使用",
1605
+ typeFilterAria: "依檔案類型篩選",
1606
+ typeAll: "所有類型",
1607
+ typeImage: "圖片",
1608
+ typeFont: "字型",
1609
+ typeVideo: "影片",
1610
+ typeOther: "其他",
1611
+ gridViewAria: "格狀檢視",
1612
+ listViewAria: "列表檢視",
1613
+ gridColumnsAria: "網格欄數",
1614
+ gridColumnsValue: "{count} 欄",
1615
+ noMatchingAssets: "找不到相符的素材",
1616
+ noMatchingAssetsHint: "請調整搜尋或篩選條件。",
1617
+ clearFilters: "清除篩選",
1488
1618
  searchLogos: "搜尋 Logo",
1489
1619
  upload: "上傳",
1490
1620
  dropToUpload: "拖入即可上傳",
@@ -1547,7 +1677,9 @@ const zhTW = {
1547
1677
  resizeRail: "調整縮圖欄寬度",
1548
1678
  transitionIndicator: "有換頁轉場",
1549
1679
  stepsIndicator: "有逐步揭示",
1550
- overviewAria: "投影片總覽 (O)"
1680
+ overviewAria: "投影片總覽 (O)",
1681
+ scrollUpToCurrentPage: "向上捲動至目前的第 {n} 頁",
1682
+ scrollDownToCurrentPage: "向下捲動至目前的第 {n} 頁"
1551
1683
  },
1552
1684
  pdfToast: {
1553
1685
  title: "匯出 PDF",
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { Locale, Plural } from "./types-DucrShh9.js";
2
- import { OpenSlideConfig } from "./config-CvzwK0tq.js";
1
+ import { Locale, Plural } from "./types-GA4ekcYB.js";
2
+ import { OpenSlideConfig } from "./config-CE2sKgqH.js";
3
3
  import { CSSProperties, ComponentType, HTMLAttributes, PropsWithChildren, ReactNode } from "react";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
5
- import * as react_jsx_runtime1 from "react/jsx-runtime";
6
4
  import * as react_jsx_runtime4 from "react/jsx-runtime";
7
5
  import * as react_jsx_runtime5 from "react/jsx-runtime";
6
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
7
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
8
8
 
9
9
  //#region src/app/components/image-placeholder.d.ts
10
10
  type ImagePlaceholderProps = {
@@ -21,7 +21,7 @@ declare function ImagePlaceholder({
21
21
  style,
22
22
  className,
23
23
  ...rest
24
- }: ImagePlaceholderProps): react_jsx_runtime0.JSX.Element;
24
+ }: ImagePlaceholderProps): react_jsx_runtime4.JSX.Element;
25
25
 
26
26
  //#endregion
27
27
  //#region src/app/components/shared-element.d.ts
@@ -36,7 +36,7 @@ declare function unstable_SharedElement({
36
36
  children,
37
37
  className,
38
38
  style
39
- }: unstable_SharedElementProps): react_jsx_runtime1.JSX.Element;
39
+ }: unstable_SharedElementProps): react_jsx_runtime5.JSX.Element;
40
40
 
41
41
  //#endregion
42
42
  //#region src/app/lib/design.d.ts
@@ -117,7 +117,7 @@ declare const CANVAS_HEIGHT = 1080;
117
117
  type StepsProps = PropsWithChildren;
118
118
  declare function Steps({
119
119
  children
120
- }: StepsProps): react_jsx_runtime4.JSX.Element;
120
+ }: StepsProps): react_jsx_runtime2.JSX.Element;
121
121
  type StepProps = PropsWithChildren<{
122
122
  duration?: number;
123
123
  }>;
@@ -128,7 +128,7 @@ declare function Step({
128
128
  children,
129
129
  duration,
130
130
  _revealed
131
- }: InternalStepProps): react_jsx_runtime5.JSX.Element;
131
+ }: InternalStepProps): react_jsx_runtime3.JSX.Element;
132
132
 
133
133
  //#endregion
134
134
  export { CANVAS_HEIGHT, CANVAS_WIDTH, DesignFonts, DesignPalette, DesignSystem, DesignTypeScale, ImagePlaceholder, ImagePlaceholderProps, Locale, OpenSlideConfig, Page, Plural, SharedElementTransition, SlideMeta, SlideModule, SlideTransition, Step, StepProps, Steps, StepsProps, TransitionPhase, cssVarsToString, defaultDesign, designToCssVars, unstable_SharedElement, unstable_SharedElementProps, useSlidePageNumber };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { en, ja, zhCN, zhTW } from "./format-CXtO6ORA.js";
1
+ import { en, ja, zhCN, zhTW } from "./format-afijk371.js";
2
2
  import { cssVarsToString, defaultDesign, designToCssVars } from "./design-cpzS8aud.js";
3
3
  import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { toast } from "sonner";
@@ -38,10 +38,12 @@ async function uploadWithAutoRename(slideId, file) {
38
38
  entry: null
39
39
  };
40
40
  const body = await res.json().catch(() => null);
41
+ const now = Date.now();
41
42
  const entry = {
42
43
  name: body?.name ?? uploaded.name,
43
44
  size: body?.size ?? uploaded.size,
44
- mtime: body?.mtime ?? Date.now(),
45
+ createdAt: body?.createdAt ?? now,
46
+ mtime: body?.mtime ?? now,
45
47
  mime: body?.mime ?? uploaded.type ?? "application/octet-stream",
46
48
  url: body?.url ?? `/__assets/${slideId}/${encodeURIComponent(uploaded.name)}`,
47
49
  unused: body?.unused ?? false
@@ -1,4 +1,4 @@
1
- import { Locale, Plural } from "../types-DucrShh9.js";
1
+ import { Locale, Plural } from "../types-GA4ekcYB.js";
2
2
 
3
3
  //#region src/locale/en.d.ts
4
4
  declare const en: Locale;
@@ -1,3 +1,3 @@
1
- import { en, format, ja, plural, zhCN, zhTW } from "../format-CXtO6ORA.js";
1
+ import { en, format, ja, plural, zhCN, zhTW } from "../format-afijk371.js";
2
2
 
3
3
  export { en, format, ja, plural, zhCN, zhTW };
@@ -1,5 +1,5 @@
1
1
  import "./design-cpzS8aud.js";
2
- import { createViteConfig } from "./config-CU_NISD6.js";
2
+ import { createViteConfig } from "./config-DvRA48y9.js";
3
3
  import { mergeConfig, preview as preview$1 } from "vite";
4
4
 
5
5
  //#region src/cli/preview.ts
@@ -51,6 +51,9 @@ type Locale = {
51
51
  updatingPackage: string;
52
52
  updatePackageDone: string;
53
53
  updatePackageFailed: string;
54
+ restartServer: string;
55
+ restartingServer: string;
56
+ restartServerFailed: string;
54
57
  changeIcon: string;
55
58
  iconEmojiTab: string;
56
59
  iconColorTab: string;
@@ -285,7 +288,37 @@ type Locale = {
285
288
  scopeGlobal: string;
286
289
  /** templates: "{count} file" / "{count} files" */
287
290
  fileCount: Plural;
291
+ createdAt: string;
292
+ modifiedAt: string;
293
+ nameColumn: string;
294
+ typeColumn: string;
295
+ sizeColumn: string;
296
+ statusColumn: string;
297
+ sortAria: string;
298
+ /** template: "Sort by {column}" */
299
+ sortByColumn: string;
300
+ sortAscending: string;
301
+ sortDescending: string;
302
+ assetSearchPlaceholder: string;
303
+ clearAssetSearch: string;
304
+ usageFilterAria: string;
305
+ usageAll: string;
306
+ usageUsed: string;
288
307
  usageUnused: string;
308
+ typeFilterAria: string;
309
+ typeAll: string;
310
+ typeImage: string;
311
+ typeFont: string;
312
+ typeVideo: string;
313
+ typeOther: string;
314
+ gridViewAria: string;
315
+ listViewAria: string;
316
+ gridColumnsAria: string;
317
+ /** template: "{count} columns" */
318
+ gridColumnsValue: string;
319
+ noMatchingAssets: string;
320
+ noMatchingAssetsHint: string;
321
+ clearFilters: string;
289
322
  searchLogos: string;
290
323
  upload: string;
291
324
  dropToUpload: string;
@@ -369,6 +402,10 @@ type Locale = {
369
402
  transitionIndicator: string;
370
403
  stepsIndicator: string;
371
404
  overviewAria: string;
405
+ /** template: "Scroll up to current page {n}" */
406
+ scrollUpToCurrentPage: string;
407
+ /** template: "Scroll down to current page {n}" */
408
+ scrollDownToCurrentPage: string;
372
409
  };
373
410
  pdfToast: {
374
411
  title: string;
@@ -1,5 +1,5 @@
1
- import "../types-DucrShh9.js";
2
- import { OpenSlideConfig } from "../config-CvzwK0tq.js";
1
+ import "../types-GA4ekcYB.js";
2
+ import { OpenSlideConfig } from "../config-CE2sKgqH.js";
3
3
  import { InlineConfig } from "vite";
4
4
 
5
5
  //#region src/vite/config.d.ts
@@ -1,4 +1,4 @@
1
1
  import "../design-cpzS8aud.js";
2
- import { createViteConfig } from "../config-CU_NISD6.js";
2
+ import { createViteConfig } from "../config-DvRA48y9.js";
3
3
 
4
4
  export { createViteConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-slide/core",
3
- "version": "1.13.5",
3
+ "version": "1.14.0",
4
4
  "description": "Runtime and CLI for open-slide — write slides in slides/, we handle the rest.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -73,7 +73,7 @@
73
73
  "commander": "^15.0.0",
74
74
  "emoji-picker-react": "^4.19.1",
75
75
  "fast-glob": "^3.3.2",
76
- "fflate": "^0.8.2",
76
+ "fflate": "^0.8.3",
77
77
  "html-to-image": "^1.11.13",
78
78
  "lucide-react": "^1.8.0",
79
79
  "next-themes": "^0.4.6",
@@ -81,8 +81,8 @@
81
81
  "react": "^18.3.1",
82
82
  "react-dom": "^18.3.1",
83
83
  "react-image-crop": "^11.0.10",
84
- "react-router-dom": "^7.18.0",
85
- "shadcn": "^4.11.0",
84
+ "react-router-dom": "^7.18.1",
85
+ "shadcn": "^4.12.0",
86
86
  "sonner": "^2.0.7",
87
87
  "tailwind-merge": "^3.5.0",
88
88
  "tailwindcss": "^4.2.2",