pptx-svelte-viewer 1.4.0 → 2.1.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/CHANGELOG.md +470 -0
- package/README.md +175 -17
- package/dist/AiChatPanel-CkC2py3J.js +1082 -0
- package/dist/__vite-browser-external-DOmiXdGM.js +7 -0
- package/dist/{dist-DZ-fjucV.js → dist-AHWCPEmj.js} +44226 -40236
- package/dist/export-CtfwVh4-.js +97263 -0
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +2193 -99
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -22
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/rolldown-runtime--_vEcKDh.js +29 -0
- package/dist/{translator-D4a_pxY4.js → translator-Ddi-liGk.js} +251 -7
- package/dist/viewer/ai/ai-bridge.d.ts +61 -0
- package/dist/viewer/ai/ai-bridge.d.ts.map +1 -0
- package/dist/viewer/ai/ai-history-persist.d.ts +13 -0
- package/dist/viewer/ai/ai-history-persist.d.ts.map +1 -0
- package/dist/viewer/ai/ai-log-export.d.ts +71 -0
- package/dist/viewer/ai/ai-log-export.d.ts.map +1 -0
- package/dist/viewer/ai/ai-panel-controller.svelte.d.ts +77 -0
- package/dist/viewer/ai/ai-panel-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/ai/chat.svelte.d.ts +43 -0
- package/dist/viewer/ai/chat.svelte.d.ts.map +1 -0
- package/dist/viewer/ai/focus-targets.d.ts +36 -0
- package/dist/viewer/ai/focus-targets.d.ts.map +1 -0
- package/dist/viewer/ai/index.d.ts +11 -0
- package/dist/viewer/ai/index.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-deps.d.ts +23 -0
- package/dist/viewer/collab/collaboration-deps.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-effects.svelte.d.ts +17 -0
- package/dist/viewer/collab/collaboration-effects.svelte.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-provider.d.ts.map +1 -1
- package/dist/viewer/collab/collaboration-remote-sync.d.ts +32 -1
- package/dist/viewer/collab/collaboration-remote-sync.d.ts.map +1 -1
- package/dist/viewer/collab/collaboration.svelte.d.ts +12 -22
- package/dist/viewer/collab/collaboration.svelte.d.ts.map +1 -1
- package/dist/viewer/collab/components/props.d.ts +12 -0
- package/dist/viewer/collab/components/props.d.ts.map +1 -1
- package/dist/viewer/collab/components/remote-selection.d.ts +29 -0
- package/dist/viewer/collab/components/remote-selection.d.ts.map +1 -0
- package/dist/viewer/collab/components/share-helpers.d.ts +7 -28
- package/dist/viewer/collab/components/share-helpers.d.ts.map +1 -1
- package/dist/viewer/collab/index.d.ts +1 -1
- package/dist/viewer/collab/index.d.ts.map +1 -1
- package/dist/viewer/components/props.d.ts +68 -2
- package/dist/viewer/components/props.d.ts.map +1 -1
- package/dist/viewer/components/ribbon/ribbon-types.d.ts +7 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts.map +1 -1
- package/dist/viewer/components/typed-exports.d.ts +19 -0
- package/dist/viewer/components/typed-exports.d.ts.map +1 -0
- package/dist/viewer/editor/editor-controller-deps.d.ts +15 -0
- package/dist/viewer/editor/editor-controller-deps.d.ts.map +1 -1
- package/dist/viewer/editor/editor-controller.svelte.d.ts +5 -0
- package/dist/viewer/editor/editor-controller.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-state.svelte.d.ts +6 -0
- package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
- package/dist/viewer/export/export-ui.svelte.d.ts +5 -0
- package/dist/viewer/export/export-ui.svelte.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +2816 -22
- package/dist/viewer/index.d.ts.map +1 -1
- package/dist/viewer/index.js +392 -14
- package/dist/viewer/presentation/animation-playback-helpers.d.ts +43 -0
- package/dist/viewer/presentation/animation-playback-helpers.d.ts.map +1 -0
- package/dist/viewer/presentation/animation-playback.svelte.d.ts +50 -40
- package/dist/viewer/presentation/animation-playback.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/animation-sound.d.ts +20 -0
- package/dist/viewer/presentation/animation-sound.d.ts.map +1 -0
- package/dist/viewer/presentation/apply-animation-styles.d.ts +6 -5
- package/dist/viewer/presentation/apply-animation-styles.d.ts.map +1 -1
- package/dist/viewer/presentation/index.d.ts +2 -1
- package/dist/viewer/presentation/index.d.ts.map +1 -1
- package/dist/viewer/presentation/keyframes.d.ts +9 -0
- package/dist/viewer/presentation/keyframes.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts +32 -10
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts +6 -2
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts.map +1 -1
- package/dist/viewer/presentation/presentation-triggers.d.ts +18 -0
- package/dist/viewer/presentation/presentation-triggers.d.ts.map +1 -0
- package/dist/viewer/presentation/transition-overlay.d.ts +23 -0
- package/dist/viewer/presentation/transition-overlay.d.ts.map +1 -0
- package/dist/viewer/render/smartart-view.d.ts +7 -2
- package/dist/viewer/render/smartart-view.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts +37 -0
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts +42 -0
- package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts +36 -0
- package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts +30 -0
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-types.d.ts +134 -0
- package/dist/viewer/state/create-viewer-state-types.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state.svelte.d.ts +30 -0
- package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -0
- package/dist/viewer/state/index.d.ts +2 -0
- package/dist/viewer/state/index.d.ts.map +1 -1
- package/dist/viewer/state/presentation-element-states-context.d.ts +37 -0
- package/dist/viewer/state/presentation-element-states-context.d.ts.map +1 -0
- package/dist/viewer/state/render-context.d.ts +3 -1
- package/dist/viewer/state/render-context.d.ts.map +1 -1
- package/dist/viewer/state/viewer-effects.svelte.d.ts +8 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -1
- package/dist/viewer/state/viewer-options-context.d.ts +10 -0
- package/dist/viewer/state/viewer-options-context.d.ts.map +1 -0
- package/dist/viewer/state/viewer-options-wiring.svelte.d.ts +31 -0
- package/dist/viewer/state/viewer-options-wiring.svelte.d.ts.map +1 -0
- package/dist/viewer/state/viewer-options.svelte.d.ts +55 -0
- package/dist/viewer/state/viewer-options.svelte.d.ts.map +1 -0
- package/dist/viewer/style/element-style.d.ts +3 -3
- package/dist/viewer/style/element-style.d.ts.map +1 -1
- package/dist/viewer/types.d.ts +16 -5
- package/dist/viewer/types.d.ts.map +1 -1
- package/dist/{y-webrtc-BdH40MC6.js → y-webrtc-BiViqyU2.js} +1079 -1101
- package/package.json +18 -5
- package/dist/export-N-hrLHrd.js +0 -38592
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var _ = Object.create, u = Object.defineProperty, s = Object.getOwnPropertyDescriptor, f = Object.getOwnPropertyNames, c = Object.getPrototypeOf, v = Object.prototype.hasOwnProperty, O = (e, r) => () => (r || (e((r = { exports: {} }).exports, r), e = null), r.exports), b = (e, r) => {
|
|
2
|
+
let t = {};
|
|
3
|
+
for (var o in e)
|
|
4
|
+
u(t, o, {
|
|
5
|
+
get: e[o],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return r || u(t, Symbol.toStringTag, { value: "Module" }), t;
|
|
9
|
+
}, g = (e, r, t, o) => {
|
|
10
|
+
if (r && typeof r == "object" || typeof r == "function")
|
|
11
|
+
for (var i = f(r), a = 0, p = i.length, n; a < p; a++)
|
|
12
|
+
n = i[a], !v.call(e, n) && n !== t && u(e, n, {
|
|
13
|
+
get: ((l) => r[l]).bind(null, n),
|
|
14
|
+
enumerable: !(o = s(r, n)) || o.enumerable
|
|
15
|
+
});
|
|
16
|
+
return e;
|
|
17
|
+
}, P = (e, r, t) => (t = e != null ? _(c(e)) : {}, g(r || !e || !e.__esModule ? u(t, "default", {
|
|
18
|
+
value: e,
|
|
19
|
+
enumerable: !0
|
|
20
|
+
}) : t, e)), d = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (r, t) => (typeof require < "u" ? require : r)[t] }) : e)(function(e) {
|
|
21
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
22
|
+
throw Error('Calling `require` for "' + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
P as i,
|
|
26
|
+
b as n,
|
|
27
|
+
d as r,
|
|
28
|
+
O as t
|
|
29
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var r = {
|
|
2
2
|
"pptx.statusBar.allSaved": "All saved",
|
|
3
3
|
"pptx.statusBar.unsavedChanges": "Unsaved changes",
|
|
4
4
|
"pptx.statusBar.slideOf": "Slide {{current}} of {{total}}",
|
|
@@ -51,6 +51,64 @@ var a = {
|
|
|
51
51
|
"pptx.toolbar.settingsShortcuts": "Settings & Shortcuts",
|
|
52
52
|
"pptx.toolbar.settings": "Settings",
|
|
53
53
|
"pptx.toolbar.readOnly": "Read-only",
|
|
54
|
+
"pptx.toolbar.toggleAiAssistant": "Toggle AI assistant",
|
|
55
|
+
"pptx.ai.title": "AI Assistant",
|
|
56
|
+
"pptx.ai.close": "Close AI assistant",
|
|
57
|
+
"pptx.ai.placeholder": "Ask about this deck…",
|
|
58
|
+
"pptx.ai.send": "Send",
|
|
59
|
+
"pptx.ai.stop": "Stop",
|
|
60
|
+
"pptx.ai.thinking": "Thinking…",
|
|
61
|
+
"pptx.ai.you": "You",
|
|
62
|
+
"pptx.ai.assistant": "Assistant",
|
|
63
|
+
"pptx.ai.emptyTitle": "Ask the assistant",
|
|
64
|
+
"pptx.ai.emptyHint": "Describe a change or ask a question about your presentation.",
|
|
65
|
+
"pptx.ai.unavailableTitle": "AI assistant unavailable",
|
|
66
|
+
"pptx.ai.unavailableHint": 'The optional "ai" SDK is not installed.',
|
|
67
|
+
"pptx.ai.errorPrefix": "Something went wrong",
|
|
68
|
+
"pptx.ai.retry": "Retry",
|
|
69
|
+
"pptx.ai.toolRunning": "Working",
|
|
70
|
+
"pptx.ai.toolDone": "Done",
|
|
71
|
+
"pptx.ai.toolFailed": "Failed",
|
|
72
|
+
"pptx.ai.toolDetails": "Details",
|
|
73
|
+
"pptx.ai.proposedChange": "Suggested change",
|
|
74
|
+
"pptx.ai.accept": "Apply",
|
|
75
|
+
"pptx.ai.reject": "Discard",
|
|
76
|
+
"pptx.ai.acceptAll": "Apply all",
|
|
77
|
+
"pptx.ai.pendingChanges": "Suggested changes ({{count}})",
|
|
78
|
+
"pptx.ai.moreChanges": "+{{count}} more",
|
|
79
|
+
"pptx.ai.askAboutElement": "Ask AI about this",
|
|
80
|
+
"pptx.ai.fixElement": "Fix with AI",
|
|
81
|
+
"pptx.ai.focusScope": "Focus",
|
|
82
|
+
"pptx.ai.pinFocus": "Pin this selection",
|
|
83
|
+
"pptx.ai.pinnedFocus": "Pinned",
|
|
84
|
+
"pptx.ai.clearFocus": "Clear focus",
|
|
85
|
+
"pptx.ai.mergeSelectedTables": "Merge selected tables",
|
|
86
|
+
"pptx.ai.pickElement": "Point at a slide element",
|
|
87
|
+
"pptx.ai.pickElementHint": "Click an element on the slide",
|
|
88
|
+
"pptx.ai.pickDone": "Done",
|
|
89
|
+
"pptx.ai.pickClear": "Clear",
|
|
90
|
+
"pptx.ai.pickAria": "Pick an element for the assistant",
|
|
91
|
+
"pptx.ai.applied": "Applied",
|
|
92
|
+
"pptx.ai.undo": "Undo",
|
|
93
|
+
"pptx.ai.chats": "Chats",
|
|
94
|
+
"pptx.ai.newChat": "New chat",
|
|
95
|
+
"pptx.ai.clearChat": "Clear chat",
|
|
96
|
+
"pptx.ai.deleteChat": "Delete chat",
|
|
97
|
+
"pptx.ai.historyTitle": "Saved chats",
|
|
98
|
+
"pptx.ai.historyEmpty": "No saved chats yet.",
|
|
99
|
+
"pptx.ai.historyHint": "Chats are saved in this browser.",
|
|
100
|
+
"pptx.ai.untitledChat": "Untitled chat",
|
|
101
|
+
"pptx.ai.messageCount": "{{count}} messages",
|
|
102
|
+
"pptx.ai.settingsSectionTitle": "AI",
|
|
103
|
+
"pptx.ai.exportLogs": "Export chat logs",
|
|
104
|
+
"pptx.ai.exportLogsHint": "Download a detailed log of every saved AI chat, including each tool call's inputs and outputs. For technical users and debugging.",
|
|
105
|
+
"pptx.ai.exportLogsCounting": "Counting saved chats…",
|
|
106
|
+
"pptx.ai.exportLogsStoredCount": "{{count}} saved chats in this browser.",
|
|
107
|
+
"pptx.ai.exportLogsDetailed": "Include tool call inputs and outputs",
|
|
108
|
+
"pptx.ai.exportLogsJson": "Export JSON",
|
|
109
|
+
"pptx.ai.exportLogsMarkdown": "Export Markdown",
|
|
110
|
+
"pptx.ai.exportLogsDone": "Exported {{count}} chats.",
|
|
111
|
+
"pptx.ai.noChatsToExport": "No saved chats to export.",
|
|
54
112
|
"pptx.findReplace.title": "Find & Replace",
|
|
55
113
|
"pptx.findReplace.closeEscape": "Close (Escape)",
|
|
56
114
|
"pptx.findReplace.closeAriaLabel": "Close find and replace",
|
|
@@ -2392,7 +2450,193 @@ Item 3`,
|
|
|
2392
2450
|
"pptx.connectorArrows.startLength": "Start Length",
|
|
2393
2451
|
"pptx.connectorArrows.endLength": "End Length",
|
|
2394
2452
|
"pptx.slideThumbnail.transitionTooltip": "Transition: {{name}}",
|
|
2395
|
-
"pptx.ribbon.groupShapeStyles": "Shape Styles"
|
|
2453
|
+
"pptx.ribbon.groupShapeStyles": "Shape Styles",
|
|
2454
|
+
"pptx.options.title": "Options",
|
|
2455
|
+
"pptx.options.resetAll": "Reset all options",
|
|
2456
|
+
"pptx.options.resetTab": "Reset this tab",
|
|
2457
|
+
"pptx.options.general.description": "General options for working with the viewer.",
|
|
2458
|
+
"pptx.options.general.userInterface": "User Interface options",
|
|
2459
|
+
"pptx.options.general.displayOptimization": "When using multiple displays",
|
|
2460
|
+
"pptx.options.displayOptimization.appearance": "Optimize for best appearance",
|
|
2461
|
+
"pptx.options.displayOptimization.compatibility": "Optimize for compatibility",
|
|
2462
|
+
"pptx.options.general.showMiniToolbar": "Show Mini Toolbar on selection",
|
|
2463
|
+
"pptx.options.general.showMiniToolbarInfo": "Shows the floating formatting toolbar when you select text.",
|
|
2464
|
+
"pptx.options.general.enableLivePreview": "Enable Live Preview",
|
|
2465
|
+
"pptx.options.general.enableLivePreviewInfo": "Previews formatting changes on the slide as you hover over gallery choices.",
|
|
2466
|
+
"pptx.options.general.collapseRibbon": "Collapse the ribbon automatically",
|
|
2467
|
+
"pptx.options.general.collapseSearch": "Collapse the search box by default",
|
|
2468
|
+
"pptx.options.general.screenTipStyle": "ScreenTip style",
|
|
2469
|
+
"pptx.options.screenTipStyle.descriptions": "Show feature descriptions in ScreenTips",
|
|
2470
|
+
"pptx.options.screenTipStyle.plain": "Don't show feature descriptions in ScreenTips",
|
|
2471
|
+
"pptx.options.screenTipStyle.off": "Don't show ScreenTips",
|
|
2472
|
+
"pptx.options.general.personalize": "Personalize your copy of the viewer",
|
|
2473
|
+
"pptx.options.general.userName": "User name",
|
|
2474
|
+
"pptx.options.general.userInitials": "Initials",
|
|
2475
|
+
"pptx.options.general.appearance": "Viewer theme",
|
|
2476
|
+
"pptx.options.general.startup": "Start up options",
|
|
2477
|
+
"pptx.options.general.showStartScreen": "Show the Start screen when this application starts",
|
|
2478
|
+
"pptx.options.proofing.label": "Proofing",
|
|
2479
|
+
"pptx.options.proofing.description": "Change how the viewer corrects and formats your text.",
|
|
2480
|
+
"pptx.options.proofing.autoCorrect": "AutoCorrect options",
|
|
2481
|
+
"pptx.options.proofing.autoCorrectDescription": "Change how text is corrected and formatted as you type.",
|
|
2482
|
+
"pptx.options.proofing.twoInitialCapitals": "Correct TWo INitial CApitals",
|
|
2483
|
+
"pptx.options.proofing.capitalizeFirstLetter": "Capitalize first letter of sentences",
|
|
2484
|
+
"pptx.options.proofing.capitalizeDayNames": "Capitalize names of days",
|
|
2485
|
+
"pptx.options.proofing.smartQuotes": "Replace straight quotes with smart quotes",
|
|
2486
|
+
"pptx.options.proofing.hyphensToDash": "Replace hyphens (--) with dash",
|
|
2487
|
+
"pptx.options.proofing.fractions": "Replace fractions (1/2) with fraction characters (½)",
|
|
2488
|
+
"pptx.options.proofing.ordinals": "Replace ordinals (1st) with superscript",
|
|
2489
|
+
"pptx.options.proofing.spellingOffice": "When correcting spelling",
|
|
2490
|
+
"pptx.options.proofing.ignoreUppercase": "Ignore words in UPPERCASE",
|
|
2491
|
+
"pptx.options.proofing.ignoreWordsWithNumbers": "Ignore words that contain numbers",
|
|
2492
|
+
"pptx.options.proofing.ignoreInternetAddresses": "Ignore Internet and file addresses",
|
|
2493
|
+
"pptx.options.proofing.flagRepeatedWords": "Flag repeated words",
|
|
2494
|
+
"pptx.options.proofing.spellingViewer": "When correcting spelling in the viewer",
|
|
2495
|
+
"pptx.options.proofing.checkSpellingAsYouType": "Check spelling as you type",
|
|
2496
|
+
"pptx.options.proofing.hideSpellingErrors": "Hide spelling errors",
|
|
2497
|
+
"pptx.options.save.label": "Save",
|
|
2498
|
+
"pptx.options.save.description": "Customize how documents are saved.",
|
|
2499
|
+
"pptx.options.save.savePresentations": "Save presentations",
|
|
2500
|
+
"pptx.options.save.autoSave": "Save changes automatically (AutoSave)",
|
|
2501
|
+
"pptx.options.save.autoSaveInfo": "Snapshots are stored locally and offered for recovery when you reopen.",
|
|
2502
|
+
"pptx.options.save.defaultFormat": "Save files in this format",
|
|
2503
|
+
"pptx.options.saveFormat.pptx": "PowerPoint Presentation (*.pptx)",
|
|
2504
|
+
"pptx.options.saveFormat.pdf": "PDF Document (*.pdf)",
|
|
2505
|
+
"pptx.options.saveFormat.png": "PNG Images (*.png)",
|
|
2506
|
+
"pptx.options.save.autoRecoverInterval": "Save AutoRecover information every",
|
|
2507
|
+
"pptx.options.save.minutes": "minutes",
|
|
2508
|
+
"pptx.options.save.keepLastAutoRecovered": "Keep the last AutoRecovered version if I close without saving",
|
|
2509
|
+
"pptx.options.save.fidelity": "Preserve fidelity when sharing this presentation",
|
|
2510
|
+
"pptx.options.save.embedFonts": "Embed fonts in the file",
|
|
2511
|
+
"pptx.options.save.embedFontsInfo": "Embedding fonts increases file size but keeps text identical on other devices.",
|
|
2512
|
+
"pptx.options.save.embedAllCharacters": "Embed all characters (best for editing by other people)",
|
|
2513
|
+
"pptx.options.save.cache": "Cache Settings",
|
|
2514
|
+
"pptx.options.save.cacheRetentionDays": "Days to keep files in the local document cache",
|
|
2515
|
+
"pptx.options.save.days": "days",
|
|
2516
|
+
"pptx.options.save.clearCacheOnClose": "Delete files from the local document cache when they are closed",
|
|
2517
|
+
"pptx.options.save.clearCacheNow": "Delete cached files",
|
|
2518
|
+
"pptx.options.save.clearCacheDescription": "Deletes locally stored recovery snapshots and recent files. This does not affect the open presentation.",
|
|
2519
|
+
"pptx.options.language.description": "Set the viewer language preferences.",
|
|
2520
|
+
"pptx.options.language.displayLanguage": "Display language",
|
|
2521
|
+
"pptx.options.language.displayLanguageDescription": "Buttons, menus, and other controls will show in the selected language.",
|
|
2522
|
+
"pptx.options.accessibility.label": "Accessibility",
|
|
2523
|
+
"pptx.options.accessibility.description": "Make the viewer more accessible.",
|
|
2524
|
+
"pptx.options.accessibility.assistant": "Make your document accessible to others",
|
|
2525
|
+
"pptx.options.accessibility.showStatus": "Show accessibility status in the status bar",
|
|
2526
|
+
"pptx.options.accessibility.feedback": "Feedback options",
|
|
2527
|
+
"pptx.options.accessibility.feedbackWithSound": "Provide feedback with sound",
|
|
2528
|
+
"pptx.options.accessibility.soundScheme": "Sound Scheme",
|
|
2529
|
+
"pptx.options.soundScheme.modern": "Modern",
|
|
2530
|
+
"pptx.options.soundScheme.classic": "Classic",
|
|
2531
|
+
"pptx.options.accessibility.display": "Application display options",
|
|
2532
|
+
"pptx.options.accessibility.showShortcutKeys": "Show shortcut keys in ScreenTips",
|
|
2533
|
+
"pptx.options.advanced.label": "Advanced",
|
|
2534
|
+
"pptx.options.advanced.description": "Advanced options for working with the viewer.",
|
|
2535
|
+
"pptx.options.advanced.editing": "Editing options",
|
|
2536
|
+
"pptx.options.advanced.autoSelectWord": "When selecting, automatically select entire word",
|
|
2537
|
+
"pptx.options.advanced.textDragAndDrop": "Allow text to be dragged and dropped",
|
|
2538
|
+
"pptx.options.advanced.maximumUndoSteps": "Maximum number of undos",
|
|
2539
|
+
"pptx.options.advanced.cutCopyPaste": "Cut, copy, and paste",
|
|
2540
|
+
"pptx.options.advanced.smartCutAndPaste": "Use smart cut and paste",
|
|
2541
|
+
"pptx.options.advanced.showPasteOptions": "Show Paste Options button when content is pasted",
|
|
2542
|
+
"pptx.options.advanced.imageQuality": "Image Size and Quality",
|
|
2543
|
+
"pptx.options.advanced.doNotCompressImages": "Do not compress images in file",
|
|
2544
|
+
"pptx.options.advanced.defaultResolution": "Default resolution",
|
|
2545
|
+
"pptx.options.resolution.highFidelity": "High fidelity",
|
|
2546
|
+
"pptx.options.resolution.ppi330": "330 ppi",
|
|
2547
|
+
"pptx.options.resolution.ppi220": "220 ppi",
|
|
2548
|
+
"pptx.options.resolution.ppi150": "150 ppi",
|
|
2549
|
+
"pptx.options.resolution.ppi96": "96 ppi",
|
|
2550
|
+
"pptx.options.advanced.chart": "Chart",
|
|
2551
|
+
"pptx.options.advanced.chartFollowDataPoint": "Properties follow chart data point",
|
|
2552
|
+
"pptx.options.advanced.display": "Display",
|
|
2553
|
+
"pptx.options.advanced.recentCount": "Show this number of Recent Presentations",
|
|
2554
|
+
"pptx.options.advanced.disableHardwareAcceleration": "Disable hardware graphics acceleration",
|
|
2555
|
+
"pptx.options.advanced.openDocumentsView": "Open all documents using this view",
|
|
2556
|
+
"pptx.options.openView.savedView": "The view saved in the file",
|
|
2557
|
+
"pptx.options.openView.normal": "Normal",
|
|
2558
|
+
"pptx.options.openView.outline": "Outline",
|
|
2559
|
+
"pptx.options.openView.slideSorter": "Slide Sorter",
|
|
2560
|
+
"pptx.options.openView.notes": "Notes",
|
|
2561
|
+
"pptx.options.advanced.slideShow": "Slide Show",
|
|
2562
|
+
"pptx.options.advanced.showMenuOnRightClick": "Show menu on right mouse click",
|
|
2563
|
+
"pptx.options.advanced.showPopupToolbar": "Show popup toolbar",
|
|
2564
|
+
"pptx.options.advanced.promptKeepInk": "Prompt to keep ink annotations when exiting",
|
|
2565
|
+
"pptx.options.advanced.endWithBlackSlide": "End with black slide",
|
|
2566
|
+
"pptx.options.advanced.print": "Print",
|
|
2567
|
+
"pptx.options.advanced.printInBackground": "Print in background",
|
|
2568
|
+
"pptx.options.advanced.printHighQuality": "High quality",
|
|
2569
|
+
"pptx.options.advanced.printUseMostRecent": "Use the most recently used print settings",
|
|
2570
|
+
"pptx.options.advanced.printWhat": "Print what",
|
|
2571
|
+
"pptx.options.printWhat.slides": "Full Page Slides",
|
|
2572
|
+
"pptx.options.printWhat.handouts": "Handouts",
|
|
2573
|
+
"pptx.options.printWhat.notes": "Notes Pages",
|
|
2574
|
+
"pptx.options.printWhat.outline": "Outline",
|
|
2575
|
+
"pptx.options.advanced.printColorMode": "Color/grayscale",
|
|
2576
|
+
"pptx.options.printColorMode.color": "Color",
|
|
2577
|
+
"pptx.options.printColorMode.grayscale": "Grayscale",
|
|
2578
|
+
"pptx.options.printColorMode.blackAndWhite": "Pure Black and White",
|
|
2579
|
+
"pptx.options.advanced.printHiddenSlides": "Print hidden slides",
|
|
2580
|
+
"pptx.options.advanced.printScaleToFit": "Scale to fit paper",
|
|
2581
|
+
"pptx.options.advanced.printFrameSlides": "Frame slides",
|
|
2582
|
+
"pptx.options.ribbon.label": "Customize Ribbon",
|
|
2583
|
+
"pptx.options.ribbon.description": "Customize the ribbon.",
|
|
2584
|
+
"pptx.options.ribbon.tabsTitle": "Main Tabs",
|
|
2585
|
+
"pptx.options.ribbon.tabsDescription": "Untick a tab to hide it from the ribbon. The File tab is always shown.",
|
|
2586
|
+
"pptx.options.ribbon.reset": "Reset ribbon customizations",
|
|
2587
|
+
"pptx.options.quickAccess.label": "Quick Access Toolbar",
|
|
2588
|
+
"pptx.options.quickAccess.description": "Customize the Quick Access Toolbar.",
|
|
2589
|
+
"pptx.options.quickAccess.optionsTitle": "Quick Access Toolbar options",
|
|
2590
|
+
"pptx.options.quickAccess.show": "Show Quick Access Toolbar",
|
|
2591
|
+
"pptx.options.quickAccess.position": "Toolbar Position",
|
|
2592
|
+
"pptx.options.quickAccessPosition.above": "Above Ribbon",
|
|
2593
|
+
"pptx.options.quickAccessPosition.below": "Below Ribbon",
|
|
2594
|
+
"pptx.options.quickAccess.showLabels": "Always show command labels",
|
|
2595
|
+
"pptx.options.quickAccess.chooseCommands": "Choose commands",
|
|
2596
|
+
"pptx.options.quickAccess.currentCommands": "Customize Quick Access Toolbar",
|
|
2597
|
+
"pptx.options.quickAccess.add": "Add",
|
|
2598
|
+
"pptx.options.quickAccess.remove": "Remove",
|
|
2599
|
+
"pptx.options.quickAccess.moveUp": "Move Up",
|
|
2600
|
+
"pptx.options.quickAccess.moveDown": "Move Down",
|
|
2601
|
+
"pptx.options.quickAccess.reset": "Reset",
|
|
2602
|
+
"pptx.options.quickAccess.command.presentFromStart": "From Beginning",
|
|
2603
|
+
"pptx.options.quickAccess.command.print": "Print",
|
|
2604
|
+
"pptx.options.quickAccess.command.exportPdf": "Export as PDF",
|
|
2605
|
+
"pptx.options.quickAccess.command.newSlide": "New Slide",
|
|
2606
|
+
"pptx.options.quickAccess.command.zoomIn": "Zoom In",
|
|
2607
|
+
"pptx.options.quickAccess.command.zoomOut": "Zoom Out",
|
|
2608
|
+
"pptx.options.addIns.label": "Add-ins",
|
|
2609
|
+
"pptx.options.addIns.description": "View and manage viewer capability modules.",
|
|
2610
|
+
"pptx.options.addIns.name": "Name",
|
|
2611
|
+
"pptx.options.addIns.location": "Location",
|
|
2612
|
+
"pptx.options.addIns.type": "Type",
|
|
2613
|
+
"pptx.options.addIns.active": "Active Capability Modules",
|
|
2614
|
+
"pptx.options.addIns.inactive": "Inactive Capability Modules",
|
|
2615
|
+
"pptx.options.addInType.renderer": "Renderer",
|
|
2616
|
+
"pptx.options.addInType.converter": "Converter",
|
|
2617
|
+
"pptx.options.addInType.collaboration": "Collaboration",
|
|
2618
|
+
"pptx.options.addInType.localization": "Localization",
|
|
2619
|
+
"pptx.options.addIns.smartArt3d": "SmartArt 3D Renderer",
|
|
2620
|
+
"pptx.options.addIns.smartArt3dDescription": "Opt-in three.js renderer for extruded and spatial SmartArt layouts.",
|
|
2621
|
+
"pptx.options.addIns.model3d": "3D Model Renderer",
|
|
2622
|
+
"pptx.options.addIns.model3dDescription": "Interactive GLB/GLTF model rendering on slides.",
|
|
2623
|
+
"pptx.options.addIns.emfConverter": "EMF/WMF Converter",
|
|
2624
|
+
"pptx.options.addIns.emfConverterDescription": "Converts EMF and WMF metafile images to PNG for display.",
|
|
2625
|
+
"pptx.options.addIns.mtxDecompressor": "MicroType Express Font Decompressor",
|
|
2626
|
+
"pptx.options.addIns.mtxDecompressorDescription": "Decompresses embedded MicroType Express fonts.",
|
|
2627
|
+
"pptx.options.addIns.collaboration": "Real-time Collaboration",
|
|
2628
|
+
"pptx.options.addIns.collaborationDescription": "CRDT-based co-editing, presence, and sync relay support.",
|
|
2629
|
+
"pptx.options.addIns.locales": "Locale Packs",
|
|
2630
|
+
"pptx.options.addIns.localesDescription": "Additional display languages for the viewer chrome.",
|
|
2631
|
+
"pptx.options.trust.label": "Trust Center",
|
|
2632
|
+
"pptx.options.trust.description": "Help keep your documents safe and secure.",
|
|
2633
|
+
"pptx.options.trust.settingsTitle": "Security settings",
|
|
2634
|
+
"pptx.options.trust.settingsDescription": "These settings help keep the content you open safe. We recommend the defaults.",
|
|
2635
|
+
"pptx.options.trust.protectedView": "Open presentations in Protected View",
|
|
2636
|
+
"pptx.options.trust.protectedViewInfo": "Documents open read-only; use Enable Editing to make changes.",
|
|
2637
|
+
"pptx.options.trust.allowExternalContent": "Allow external content (remote images and media)",
|
|
2638
|
+
"pptx.options.trust.allowExternalContentInfo": "When off, only content embedded in the file is displayed.",
|
|
2639
|
+
"pptx.options.trust.confirmHyperlinks": "Confirm before opening external hyperlinks"
|
|
2396
2640
|
};
|
|
2397
2641
|
function n(e) {
|
|
2398
2642
|
return (e.split(".").pop() ?? e).replace(/(?<lower>[a-z])(?<upper>[A-Z])/gu, "$<lower> $<upper>").replace(/^./u, (t) => t.toUpperCase());
|
|
@@ -2418,7 +2662,7 @@ var x = [
|
|
|
2418
2662
|
label: "German",
|
|
2419
2663
|
nativeLabel: "Deutsch"
|
|
2420
2664
|
}
|
|
2421
|
-
], i = /* @__PURE__ */ new Map([["en",
|
|
2665
|
+
], i = /* @__PURE__ */ new Map([["en", r]]);
|
|
2422
2666
|
function d(e, t) {
|
|
2423
2667
|
const p = i.get(e);
|
|
2424
2668
|
i.set(e, p ? {
|
|
@@ -2430,13 +2674,13 @@ function c() {
|
|
|
2430
2674
|
return [...i.keys()];
|
|
2431
2675
|
}
|
|
2432
2676
|
function s(e, t) {
|
|
2433
|
-
return t ? e.replace(/\{\{(?<name>\w+)\}\}/gu, (p,
|
|
2434
|
-
const o = t[
|
|
2677
|
+
return t ? e.replace(/\{\{(?<name>\w+)\}\}/gu, (p, a) => {
|
|
2678
|
+
const o = t[a];
|
|
2435
2679
|
return o === void 0 ? p : String(o);
|
|
2436
2680
|
}) : e;
|
|
2437
2681
|
}
|
|
2438
2682
|
function l(e, t, p) {
|
|
2439
|
-
const
|
|
2683
|
+
const a = e.split("-")[0], o = i.get(e)?.[t] ?? i.get(a)?.[t] ?? r[t];
|
|
2440
2684
|
return o !== void 0 ? s(o, p) : n(t);
|
|
2441
2685
|
}
|
|
2442
2686
|
function m(e) {
|
|
@@ -2444,7 +2688,7 @@ function m(e) {
|
|
|
2444
2688
|
}
|
|
2445
2689
|
export {
|
|
2446
2690
|
l as a,
|
|
2447
|
-
|
|
2691
|
+
r as c,
|
|
2448
2692
|
d as i,
|
|
2449
2693
|
c as n,
|
|
2450
2694
|
x as o,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxHandler, PptxPresentationProperties, PptxSection, PptxSlide, PptxTheme } from 'pptx-viewer-core';
|
|
2
|
+
import { PptxAiBridge, PptxAiNotifyLevel } from 'pptx-viewer-shared/ai';
|
|
3
|
+
/** Live editor accessors the bridge closes over (all read from viewer runes). */
|
|
4
|
+
export interface SvelteAiBridgeDeps {
|
|
5
|
+
/** The editable slides array (the single source of truth the AI mutates). */
|
|
6
|
+
getSlides(): PptxSlide[];
|
|
7
|
+
/** Zero-based index of the active slide. */
|
|
8
|
+
getActiveSlideIndex(): number;
|
|
9
|
+
/** Slide canvas size in CSS pixels. */
|
|
10
|
+
getCanvasSize(): {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
/** The resolved presentation theme, when available. */
|
|
15
|
+
getTheme(): PptxTheme | undefined;
|
|
16
|
+
/** The loaded core handler, or null before a deck is open. */
|
|
17
|
+
getHandler(): PptxHandler | null;
|
|
18
|
+
/** Optional display file name, used as a friendly deck title. */
|
|
19
|
+
getFileName(): string | undefined;
|
|
20
|
+
/** Navigate the viewer to a slide by zero-based index. */
|
|
21
|
+
goToSlide(index: number): void;
|
|
22
|
+
/** Select elements on a slide (navigates first when off-slide). */
|
|
23
|
+
selectElements(slideIndex: number, elementIds: string[]): void;
|
|
24
|
+
/**
|
|
25
|
+
* Install a new slides array as ONE undoable history entry. The
|
|
26
|
+
* implementation is responsible for ensuring the editor is editable (so the
|
|
27
|
+
* commit is not silently dropped) before recording the step.
|
|
28
|
+
*/
|
|
29
|
+
commitSlides(next: PptxSlide[], label: string): void;
|
|
30
|
+
/** Apply partial theme updates (colour/font scheme) and re-render. */
|
|
31
|
+
applyTheme(updates: Partial<PptxTheme>): void;
|
|
32
|
+
/** Optional host notification sink (status line / toast / console). */
|
|
33
|
+
notify?(message: string, level?: PptxAiNotifyLevel): void;
|
|
34
|
+
/** Deck sections (editor-tracked, undoable). */
|
|
35
|
+
getSections(): PptxSection[];
|
|
36
|
+
/** Deck-wide slide-show / print settings (editor-tracked, undoable). */
|
|
37
|
+
getPresentationProperties(): PptxPresentationProperties;
|
|
38
|
+
/** Document core properties (Title / Author / ...), when present. */
|
|
39
|
+
getCoreProperties(): PptxCoreProperties | undefined;
|
|
40
|
+
/** Application properties (Company / Application), when present. */
|
|
41
|
+
getAppProperties(): PptxAppProperties | undefined;
|
|
42
|
+
/** Custom document-property list (editor-tracked, undoable). */
|
|
43
|
+
getCustomProperties(): PptxCustomProperty[];
|
|
44
|
+
/** Resize the slide canvas (loader value + editor history entry). */
|
|
45
|
+
setCanvasSize(size: {
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
}): void;
|
|
49
|
+
/** Replace the section list. */
|
|
50
|
+
setSections(sections: PptxSection[]): void;
|
|
51
|
+
/** Replace the deck-wide presentation properties. */
|
|
52
|
+
setPresentationProperties(props: PptxPresentationProperties): void;
|
|
53
|
+
/**
|
|
54
|
+
* Replace the document properties as one unit. Svelte's editor commits
|
|
55
|
+
* core / app / custom together, so the bridge fans all three through here.
|
|
56
|
+
*/
|
|
57
|
+
setDocumentProperties(core: PptxCoreProperties, app: PptxAppProperties, custom: PptxCustomProperty[]): void;
|
|
58
|
+
}
|
|
59
|
+
/** Build the AI bridge that exposes the live Svelte viewer to the AI core. */
|
|
60
|
+
export declare function createSvelteAiBridge(deps: SvelteAiBridgeDeps): PptxAiBridge;
|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,EAAE,KAAK,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAM1D,gDAAgD;IAChD,WAAW,IAAI,WAAW,EAAE,CAAC;IAC7B,wEAAwE;IACxE,yBAAyB,IAAI,0BAA0B,CAAC;IACxD,qEAAqE;IACrE,iBAAiB,IAAI,kBAAkB,GAAG,SAAS,CAAC;IACpD,oEAAoE;IACpE,gBAAgB,IAAI,iBAAiB,GAAG,SAAS,CAAC;IAClD,gEAAgE;IAChE,mBAAmB,IAAI,kBAAkB,EAAE,CAAC;IAC5C,qEAAqE;IACrE,aAAa,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC7D,gCAAgC;IAChC,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAC3C,qDAAqD;IACrD,yBAAyB,CAAC,KAAK,EAAE,0BAA0B,GAAG,IAAI,CAAC;IACnE;;;OAGG;IACH,qBAAqB,CACpB,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,kBAAkB,EAAE,GAC1B,IAAI,CAAC;CACR;AAED,8EAA8E;AAC9E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,YAAY,CA6F3E"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PptxAiBridge, PptxAiUIMessage } from 'pptx-viewer-shared/ai';
|
|
2
|
+
/** Fresh chat id (matches the React binding's format). */
|
|
3
|
+
export declare function newChatId(): string;
|
|
4
|
+
/**
|
|
5
|
+
* Derive a stable-ish per-deck id for scoping saved chats. There is no true
|
|
6
|
+
* document id, so we combine the deck title with the slide count; good enough to
|
|
7
|
+
* keep one deck's chats grouped without colliding across obviously-different
|
|
8
|
+
* decks. Mirrors the React binding's `deckIdFromBridge`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function deckIdFromBridge(bridge: PptxAiBridge): string;
|
|
11
|
+
/** First user message text -> a short chat title. */
|
|
12
|
+
export declare function deriveChatTitle(messages: readonly PptxAiUIMessage[]): string;
|
|
13
|
+
//# sourceMappingURL=ai-history-persist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-history-persist.d.ts","sourceRoot":"","sources":["../../../src/viewer/ai/ai-history-persist.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI3E,0DAA0D;AAC1D,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAI7D;AAED,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAe5E"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { PptxAiChatStore, PptxAiStoredChat } from 'pptx-viewer-shared/ai';
|
|
2
|
+
/** One tool invocation captured with its full technical detail. */
|
|
3
|
+
export interface AiLogToolCall {
|
|
4
|
+
toolName: string;
|
|
5
|
+
toolCallId: string;
|
|
6
|
+
state: string;
|
|
7
|
+
input: unknown;
|
|
8
|
+
output: unknown;
|
|
9
|
+
errorText?: string;
|
|
10
|
+
}
|
|
11
|
+
/** One message: its role, concatenated prose, and any tool calls it made. */
|
|
12
|
+
export interface AiLogMessage {
|
|
13
|
+
role: string;
|
|
14
|
+
text: string;
|
|
15
|
+
toolCalls: AiLogToolCall[];
|
|
16
|
+
}
|
|
17
|
+
/** One chat conversation in export form. */
|
|
18
|
+
export interface AiLogChat {
|
|
19
|
+
id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
deckId?: string;
|
|
22
|
+
createdAt: number;
|
|
23
|
+
updatedAt: number;
|
|
24
|
+
createdAtIso: string;
|
|
25
|
+
updatedAtIso: string;
|
|
26
|
+
messageCount: number;
|
|
27
|
+
messages: AiLogMessage[];
|
|
28
|
+
}
|
|
29
|
+
/** Top-level detailed export document. */
|
|
30
|
+
export interface AiLogExport {
|
|
31
|
+
format: 'pptx-ai-chat-log';
|
|
32
|
+
version: 1;
|
|
33
|
+
exportedAt: string;
|
|
34
|
+
detailed: boolean;
|
|
35
|
+
chatCount: number;
|
|
36
|
+
chats: AiLogChat[];
|
|
37
|
+
}
|
|
38
|
+
/** Options controlling how the export document is built. */
|
|
39
|
+
export interface BuildChatLogOptions {
|
|
40
|
+
/** Include tool-call inputs/outputs. Default `true`. */
|
|
41
|
+
detailed?: boolean;
|
|
42
|
+
/** Epoch ms stamped as `exportedAt`. Default `Date.now()`. */
|
|
43
|
+
now?: number;
|
|
44
|
+
}
|
|
45
|
+
/** Build the detailed export document from already-loaded chats (pure). */
|
|
46
|
+
export declare function buildChatLogExport(chats: readonly PptxAiStoredChat[], options?: BuildChatLogOptions): AiLogExport;
|
|
47
|
+
/** Render the same detailed export as a human-readable Markdown transcript. */
|
|
48
|
+
export declare function buildChatLogMarkdown(doc: AiLogExport): string;
|
|
49
|
+
/** Load every stored chat (newest first) in full detail from a store. */
|
|
50
|
+
export declare function collectStoredChats(store: PptxAiChatStore): Promise<PptxAiStoredChat[]>;
|
|
51
|
+
/** File format to download. */
|
|
52
|
+
export type AiLogFormat = 'json' | 'markdown';
|
|
53
|
+
/** Options for {@link exportAiChatLogs}. */
|
|
54
|
+
export interface ExportAiChatLogsOptions {
|
|
55
|
+
/** Store to read from. Defaults to the shared `createChatHistoryStore()`. */
|
|
56
|
+
store?: PptxAiChatStore;
|
|
57
|
+
/** `'json'` (default) or `'markdown'`. */
|
|
58
|
+
format?: AiLogFormat;
|
|
59
|
+
/** Include tool inputs/outputs. Default `true`. */
|
|
60
|
+
detailed?: boolean;
|
|
61
|
+
/** Epoch ms for the filename + `exportedAt`. Default `Date.now()`. */
|
|
62
|
+
now?: number;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Read all stored chats and trigger a browser download of the detailed log.
|
|
66
|
+
*
|
|
67
|
+
* @returns the number of chats exported. When `0`, no file is downloaded so the
|
|
68
|
+
* caller can surface an empty-state message instead.
|
|
69
|
+
*/
|
|
70
|
+
export declare function exportAiChatLogs(options?: ExportAiChatLogsOptions): Promise<number>;
|
|
71
|
+
//# sourceMappingURL=ai-log-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-log-export.d.ts","sourceRoot":"","sources":["../../../src/viewer/ai/ai-log-export.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,6EAA6E;AAC7E,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,4CAA4C;AAC5C,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,0CAA0C;AAC1C,MAAM,WAAW,WAAW;IAC3B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,EAAE,CAAC;CACnB;AAED,4DAA4D;AAC5D,MAAM,WAAW,mBAAmB;IACnC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AA0CD,2EAA2E;AAC3E,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,SAAS,gBAAgB,EAAE,EAClC,OAAO,CAAC,EAAE,mBAAmB,GAC3B,WAAW,CAWb;AAmBD,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM,CA+B7D;AAED,yEAAyE;AACzE,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAU5F;AAWD,+BAA+B;AAC/B,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC;AAE9C,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACvC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBzF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { PptxElement } from 'pptx-viewer-core';
|
|
2
|
+
import { AiChangeBatch, PptxAiFocusedTarget, ToolCanvasTarget } from 'pptx-viewer-shared/ai';
|
|
3
|
+
/** One element ring to draw on the canvas: an explicit pick or a live-tool focus. */
|
|
4
|
+
export interface AiCanvasHighlight {
|
|
5
|
+
slideIndex: number;
|
|
6
|
+
elementId: string;
|
|
7
|
+
/** `pick` = persistent user pick; `active` = transient AI-is-working ring. */
|
|
8
|
+
variant: 'pick' | 'active';
|
|
9
|
+
}
|
|
10
|
+
/** Live viewer accessors + the panel-open hook the controller closes over. */
|
|
11
|
+
export interface AiPanelControllerDeps {
|
|
12
|
+
getActiveSlideIndex(): number;
|
|
13
|
+
getSelectedElementId(): string | null;
|
|
14
|
+
getSelectedElementIds(): readonly string[];
|
|
15
|
+
/** The primary selected element, for building the "Fix with AI" directive. */
|
|
16
|
+
getSelectedElement(): PptxElement | undefined;
|
|
17
|
+
/** Open the panel (askAboutSelection / fixSelection / startPicking need it). */
|
|
18
|
+
openPanel(): void;
|
|
19
|
+
}
|
|
20
|
+
export declare class AiPanelController {
|
|
21
|
+
#private;
|
|
22
|
+
/** Pinned focus override (null follows the live selection). */
|
|
23
|
+
pinnedFocus: PptxAiFocusedTarget[] | null;
|
|
24
|
+
/** One-shot composer prefill. `nonce` bumps on every ask/fix. */
|
|
25
|
+
prefill: {
|
|
26
|
+
text: string;
|
|
27
|
+
nonce: number;
|
|
28
|
+
};
|
|
29
|
+
/** True while the user is picking element(s) on the canvas for the assistant. */
|
|
30
|
+
pickMode: boolean;
|
|
31
|
+
/** The elements the user has explicitly handed to the assistant. */
|
|
32
|
+
pickTargets: PptxAiFocusedTarget[];
|
|
33
|
+
/** The batch of just-applied element changes the canvas should animate. */
|
|
34
|
+
changeBatch: AiChangeBatch | null;
|
|
35
|
+
constructor(deps: AiPanelControllerDeps);
|
|
36
|
+
/** Focused targets derived live from the current canvas selection. */
|
|
37
|
+
get liveFocusTargets(): PptxAiFocusedTarget[];
|
|
38
|
+
/** True when there are explicit picks (they win over a pin / live selection). */
|
|
39
|
+
get hasPicks(): boolean;
|
|
40
|
+
/** The targets the assistant should scope to: picks > pin > live selection. */
|
|
41
|
+
get effectiveTargets(): PptxAiFocusedTarget[];
|
|
42
|
+
/** Whether a pin is currently the active focus (no picks override it). */
|
|
43
|
+
get isPinned(): boolean;
|
|
44
|
+
/** Element rings the canvas should draw (picks + the live tool focus). */
|
|
45
|
+
get canvasHighlights(): AiCanvasHighlight[];
|
|
46
|
+
/** True while the canvas should tween colour changes (AI is active). */
|
|
47
|
+
get canvasAnimating(): boolean;
|
|
48
|
+
pinFocus(): void;
|
|
49
|
+
clearPinnedFocus(): void;
|
|
50
|
+
/** Open the panel scoped to the current selection, empty composer (focused). */
|
|
51
|
+
askAboutSelection(): void;
|
|
52
|
+
/** Open the panel scoped to the current selection, prefilled fix directive. */
|
|
53
|
+
fixSelection(): void;
|
|
54
|
+
/** Enter pick mode (the next canvas element clicks become picks). */
|
|
55
|
+
startPicking(): void;
|
|
56
|
+
/** Leave pick mode without clearing the accumulated picks. */
|
|
57
|
+
stopPicking(): void;
|
|
58
|
+
/** Add one clicked canvas element to the pick set (and highlight it). */
|
|
59
|
+
addPick(slideIndex: number, elementId: string): void;
|
|
60
|
+
/** Empty the pick set and leave pick mode. */
|
|
61
|
+
clearPicks(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Flash a transient "the AI is working on this" highlight for a running tool,
|
|
64
|
+
* and enable colour tweening for a short settle window. Pass `null` to just
|
|
65
|
+
* enable tweening (e.g. a theme-colour edit with no single element target).
|
|
66
|
+
*/
|
|
67
|
+
flashToolTarget(target: ToolCanvasTarget | null): void;
|
|
68
|
+
/**
|
|
69
|
+
* Push (or clear) the change batch the AI apply path published, so the canvas
|
|
70
|
+
* overlay animates the just-applied edit (glide old->new, fade/scale in-out,
|
|
71
|
+
* glow). Pass `null` to clear once the animation has settled.
|
|
72
|
+
*/
|
|
73
|
+
showChangeBatch(batch: AiChangeBatch | null): void;
|
|
74
|
+
/** Cancel the pending flash timer (call on teardown). */
|
|
75
|
+
dispose(): void;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=ai-panel-controller.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|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C1E,IAAI,gBAAgB,IAAI,iBAAiB,EAAE,CAc1C;IAED,wEAAwE;IACxE,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,QAAQ,IAAI,IAAI;IAIhB,gBAAgB,IAAI,IAAI;IAIxB,gFAAgF;IAChF,iBAAiB,IAAI,IAAI;IAMzB,+EAA+E;IAC/E,YAAY,IAAI,IAAI;IAQpB,qEAAqE;IACrE,YAAY,IAAI,IAAI;IAKpB,8DAA8D;IAC9D,WAAW,IAAI,IAAI;IAInB,yEAAyE;IACzE,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAOpD,8CAA8C;IAC9C,UAAU,IAAI,IAAI;IAKlB;;;;OAIG;IACH,eAAe,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI;IAgBtD;;;;OAIG;IACH,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI;IAIlD,yDAAyD;IACzD,OAAO,IAAI,IAAI;CAMf"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ChatStatus } from 'ai';
|
|
2
|
+
import { PptxAiBridge, PptxAiChatSession, PptxAiConfig, PptxAiUIMessage, ProposalView, ToolCanvasTarget } from 'pptx-viewer-shared/ai';
|
|
3
|
+
/** Lifecycle of the AI session bootstrap. */
|
|
4
|
+
export type AiChatInitState = 'checking' | 'unavailable' | 'ready' | 'error';
|
|
5
|
+
/** Inputs + injectable seams (tests replace the async builders). */
|
|
6
|
+
export interface SvelteAiChatDeps {
|
|
7
|
+
bridge: PptxAiBridge;
|
|
8
|
+
config: PptxAiConfig;
|
|
9
|
+
/** Availability probe; defaults to {@link isAiAvailable}. */
|
|
10
|
+
checkAvailable?: () => Promise<boolean>;
|
|
11
|
+
/** Session builder; defaults to {@link createAiChatSession}. */
|
|
12
|
+
createSession?: (bridge: PptxAiBridge, config: PptxAiConfig) => Promise<PptxAiChatSession>;
|
|
13
|
+
/**
|
|
14
|
+
* Called as each tool call starts, with the slide / element(s) it references
|
|
15
|
+
* (or `null` for deck-wide tools). Lets the panel navigate + highlight the
|
|
16
|
+
* canvas so the viewer mirrors what the assistant is doing in real time.
|
|
17
|
+
*/
|
|
18
|
+
onToolTarget?: (target: ToolCanvasTarget | null) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare class SvelteAiChat {
|
|
21
|
+
#private;
|
|
22
|
+
initState: AiChatInitState;
|
|
23
|
+
initError: Error | undefined;
|
|
24
|
+
/** Mirror of the session's staged proposals (refreshed imperatively). */
|
|
25
|
+
proposals: ProposalView[];
|
|
26
|
+
constructor(deps: SvelteAiChatDeps);
|
|
27
|
+
get messages(): PptxAiUIMessage[];
|
|
28
|
+
get status(): ChatStatus;
|
|
29
|
+
get error(): Error | undefined;
|
|
30
|
+
get isStreaming(): boolean;
|
|
31
|
+
/** The live session, exposed for tests that stage a proposal directly. */
|
|
32
|
+
get session(): PptxAiChatSession | undefined;
|
|
33
|
+
/** Bootstrap the session + chat. Safe to call once (from the panel `$effect`). */
|
|
34
|
+
init(): Promise<void>;
|
|
35
|
+
send(text: string): void;
|
|
36
|
+
stop(): void;
|
|
37
|
+
clearError(): void;
|
|
38
|
+
refreshProposals(): void;
|
|
39
|
+
applyProposal(id: string): void;
|
|
40
|
+
rejectProposal(id: string): void;
|
|
41
|
+
acceptAllProposals(): void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=chat.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/ai/chat.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAErC,OAAO,KAAK,EACX,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,MAAM,uBAAuB,CAAC;AAE/B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