@aicut/core 0.1.0 → 0.2.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.
package/dist/index.js CHANGED
@@ -1,3 +1,6 @@
1
+ import { mergeLocale, applyTheme, formatLabel } from './chunk-CCDON7CU.js';
2
+ export { formatLabel, localeEn, localeZh, mergeLocale } from './chunk-CCDON7CU.js';
3
+
1
4
  // src/events.ts
2
5
  var EventBus = class {
3
6
  listeners = /* @__PURE__ */ new Map();
@@ -513,90 +516,6 @@ var PlaybackEngine = class {
513
516
  }
514
517
  };
515
518
 
516
- // src/theme.ts
517
- var THEME_VARS = {
518
- brand: "--color-brand",
519
- secondary: "--color-secondary",
520
- surface: "--color-surface",
521
- dark: "--color-dark",
522
- muted: "--color-muted",
523
- card: "--color-card",
524
- success: "--color-success",
525
- warning: "--color-warning",
526
- info: "--color-info",
527
- error: "--color-error",
528
- controlsBg: "--aicut-controls-bg",
529
- controlsBorder: "--aicut-controls-border",
530
- controlsText: "--aicut-controls-text",
531
- controlsHover: "--aicut-controls-hover",
532
- controlsActive: "--aicut-controls-active",
533
- previewBg: "--aicut-preview-bg",
534
- radiusSm: "--aicut-radius-sm",
535
- radiusMd: "--aicut-radius-md",
536
- radiusLg: "--aicut-radius-lg"
537
- };
538
- function applyTheme(root, theme) {
539
- if (!theme) return;
540
- for (const key of Object.keys(theme)) {
541
- const cssVar = THEME_VARS[key];
542
- const value = theme[key];
543
- if (cssVar && value) root.style.setProperty(cssVar, value);
544
- }
545
- }
546
-
547
- // src/i18n.ts
548
- var localeEn = {
549
- undo: "Undo",
550
- redo: "Redo",
551
- split: "Split",
552
- trimLeft: "Trim left edge",
553
- trimRight: "Trim right edge",
554
- speedComingSoon: "Speed (coming soon)",
555
- playPause: "Play / Pause (Space)",
556
- fullscreen: "Fullscreen preview",
557
- snap: "Snap",
558
- snapOnTitle: "Turn off snap",
559
- snapOffTitle: "Turn on snap",
560
- zoomOut: "Zoom out",
561
- zoomIn: "Zoom in",
562
- reset: "Reset edits (keep sources)",
563
- exitFullscreen: "Exit fullscreen",
564
- exitFullscreenTitle: "Exit fullscreen (Esc)",
565
- newTrack: "+ New track",
566
- videoTrackLabel: "Video {n}",
567
- audioTrackLabel: "Audio {n}"
568
- };
569
- var localeZh = {
570
- undo: "\u64A4\u9500",
571
- redo: "\u91CD\u505A",
572
- split: "\u5206\u5272",
573
- trimLeft: "\u5411\u5DE6\u88C1\u526A",
574
- trimRight: "\u5411\u53F3\u88C1\u526A",
575
- speedComingSoon: "\u53D8\u901F\uFF08\u5373\u5C06\u5230\u6765\uFF09",
576
- playPause: "\u64AD\u653E / \u6682\u505C (Space)",
577
- fullscreen: "\u5168\u5C4F\u9884\u89C8",
578
- snap: "\u5438\u9644",
579
- snapOnTitle: "\u5173\u95ED\u5438\u9644",
580
- snapOffTitle: "\u5F00\u542F\u5438\u9644",
581
- zoomOut: "\u7F29\u5C0F",
582
- zoomIn: "\u653E\u5927",
583
- reset: "\u91CD\u7F6E\u7F16\u8F91\uFF08\u4FDD\u7559\u89C6\u9891\u6E90\uFF09",
584
- exitFullscreen: "\u9000\u51FA\u5168\u5C4F",
585
- exitFullscreenTitle: "\u9000\u51FA\u5168\u5C4F (Esc)",
586
- newTrack: "+ \u65B0\u8F68\u9053",
587
- videoTrackLabel: "\u89C6\u9891 {n}",
588
- audioTrackLabel: "\u97F3\u9891 {n}"
589
- };
590
- function mergeLocale(partial) {
591
- return partial ? { ...localeEn, ...partial } : localeEn;
592
- }
593
- function formatLabel(template, vars) {
594
- return template.replace(
595
- /\{(\w+)\}/g,
596
- (_, k) => k in vars ? String(vars[k]) : `{${k}}`
597
- );
598
- }
599
-
600
519
  // src/ui/thumbnails.ts
601
520
  var THUMB_HEIGHT = 44;
602
521
  var THUMB_WIDTH = Math.round(THUMB_HEIGHT * (16 / 9));
@@ -3326,6 +3245,6 @@ function clampScale2(s) {
3326
3245
  return Math.max(MIN_PX_PER_SEC, Math.min(MAX_PX_PER_SEC, s));
3327
3246
  }
3328
3247
 
3329
- export { Editor, HEADER_WIDTH, RULER_HEIGHT, TRACK_HEIGHT, Timeline, createEmptyProject, createId, formatLabel, localeEn, localeZh, mergeLocale, normalizeProject };
3248
+ export { Editor, HEADER_WIDTH, RULER_HEIGHT, TRACK_HEIGHT, Timeline, createEmptyProject, createId, normalizeProject };
3330
3249
  //# sourceMappingURL=index.js.map
3331
3250
  //# sourceMappingURL=index.js.map