@open-aippt/core 1.13.2
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/LICENSE +21 -0
- package/README.md +98 -0
- package/bin.js +2 -0
- package/dist/build-DxTqmvsO.js +17 -0
- package/dist/cli/bin.d.ts +1 -0
- package/dist/cli/bin.js +86 -0
- package/dist/config-CjzqjrEA.js +4280 -0
- package/dist/config-DIC-yVPp.d.ts +23 -0
- package/dist/design-cpzS8aud.js +35 -0
- package/dist/dev-BYuTeJbA.js +20 -0
- package/dist/format-BCeKbTOM.js +1605 -0
- package/dist/index.d.ts +134 -0
- package/dist/index.js +467 -0
- package/dist/locale/index.d.ts +24 -0
- package/dist/locale/index.js +3 -0
- package/dist/preview-DlQvnJPq.js +18 -0
- package/dist/sync-BPZ0m27m.js +139 -0
- package/dist/sync-EsYusbbL.js +3 -0
- package/dist/types-CHmFPIG_.d.ts +430 -0
- package/dist/vite/index.d.ts +14 -0
- package/dist/vite/index.js +4 -0
- package/env.d.ts +59 -0
- package/package.json +103 -0
- package/skills/apply-comments/SKILL.md +83 -0
- package/skills/create-slide/SKILL.md +91 -0
- package/skills/create-theme/SKILL.md +250 -0
- package/skills/current-slide/SKILL.md +110 -0
- package/skills/slide-authoring/SKILL.md +625 -0
- package/src/app/app.tsx +47 -0
- package/src/app/components/asset-view.tsx +966 -0
- package/src/app/components/history-provider.tsx +120 -0
- package/src/app/components/image-placeholder.tsx +243 -0
- package/src/app/components/inspector/asset-picker-dialog.tsx +196 -0
- package/src/app/components/inspector/comment-widget.tsx +93 -0
- package/src/app/components/inspector/image-crop-dialog.tsx +212 -0
- package/src/app/components/inspector/inspect-overlay.tsx +387 -0
- package/src/app/components/inspector/inspector-panel.tsx +1115 -0
- package/src/app/components/inspector/inspector-provider.tsx +1218 -0
- package/src/app/components/inspector/save-bar.tsx +48 -0
- package/src/app/components/language-toggle.tsx +39 -0
- package/src/app/components/notes-drawer.tsx +120 -0
- package/src/app/components/overview-grid.tsx +363 -0
- package/src/app/components/panel/panel-fields.tsx +60 -0
- package/src/app/components/panel/panel-shell.tsx +80 -0
- package/src/app/components/panel/save-card.tsx +142 -0
- package/src/app/components/pdf-progress-toast.tsx +32 -0
- package/src/app/components/player.tsx +466 -0
- package/src/app/components/pptx-progress-toast.tsx +32 -0
- package/src/app/components/present/blackout-overlay.tsx +18 -0
- package/src/app/components/present/control-bar.tsx +315 -0
- package/src/app/components/present/help-overlay.tsx +57 -0
- package/src/app/components/present/jump-input.tsx +74 -0
- package/src/app/components/present/laser-pointer.tsx +39 -0
- package/src/app/components/present/progress-bar.tsx +26 -0
- package/src/app/components/present/use-idle.ts +46 -0
- package/src/app/components/present/use-pointer-near-bottom.ts +34 -0
- package/src/app/components/present/use-presenter-channel.ts +66 -0
- package/src/app/components/present/use-touch-swipe.ts +66 -0
- package/src/app/components/shared-element.tsx +48 -0
- package/src/app/components/sidebar/folder-item.tsx +258 -0
- package/src/app/components/sidebar/icon-picker.tsx +61 -0
- package/src/app/components/sidebar/mobile-pill.tsx +34 -0
- package/src/app/components/sidebar/sidebar-footer.tsx +105 -0
- package/src/app/components/sidebar/sidebar.tsx +284 -0
- package/src/app/components/slide-canvas.tsx +102 -0
- package/src/app/components/slide-transition-layer.tsx +844 -0
- package/src/app/components/style-panel/design-provider.tsx +148 -0
- package/src/app/components/style-panel/style-panel.tsx +349 -0
- package/src/app/components/style-panel/use-design.ts +112 -0
- package/src/app/components/theme-toggle.tsx +59 -0
- package/src/app/components/themes/theme-detail.tsx +305 -0
- package/src/app/components/themes/themes-gallery.tsx +149 -0
- package/src/app/components/thumbnail-rail.tsx +805 -0
- package/src/app/components/ui/badge.tsx +45 -0
- package/src/app/components/ui/button.tsx +99 -0
- package/src/app/components/ui/card.tsx +92 -0
- package/src/app/components/ui/context-menu.tsx +237 -0
- package/src/app/components/ui/dialog.tsx +157 -0
- package/src/app/components/ui/dropdown-menu.tsx +245 -0
- package/src/app/components/ui/input.tsx +25 -0
- package/src/app/components/ui/label.tsx +24 -0
- package/src/app/components/ui/popover.tsx +75 -0
- package/src/app/components/ui/progress.tsx +31 -0
- package/src/app/components/ui/scroll-area.tsx +53 -0
- package/src/app/components/ui/select.tsx +196 -0
- package/src/app/components/ui/separator.tsx +28 -0
- package/src/app/components/ui/slider.tsx +61 -0
- package/src/app/components/ui/sonner.tsx +48 -0
- package/src/app/components/ui/tabs.tsx +79 -0
- package/src/app/components/ui/textarea.tsx +22 -0
- package/src/app/components/ui/toggle-group.tsx +83 -0
- package/src/app/components/ui/toggle.tsx +45 -0
- package/src/app/components/ui/tooltip.tsx +58 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/index.html +13 -0
- package/src/app/lib/assets.ts +242 -0
- package/src/app/lib/design-presets.ts +94 -0
- package/src/app/lib/design.ts +58 -0
- package/src/app/lib/export-html.ts +326 -0
- package/src/app/lib/export-pdf.ts +298 -0
- package/src/app/lib/export-pptx.ts +284 -0
- package/src/app/lib/folders.ts +239 -0
- package/src/app/lib/inspector/fiber.test.ts +154 -0
- package/src/app/lib/inspector/fiber.ts +85 -0
- package/src/app/lib/inspector/use-comments.ts +74 -0
- package/src/app/lib/inspector/use-editor.ts +73 -0
- package/src/app/lib/inspector/use-notes.ts +134 -0
- package/src/app/lib/locale-store.ts +67 -0
- package/src/app/lib/page-context.tsx +38 -0
- package/src/app/lib/print-ready.test.ts +32 -0
- package/src/app/lib/print-ready.ts +51 -0
- package/src/app/lib/sdk.test.ts +13 -0
- package/src/app/lib/sdk.ts +37 -0
- package/src/app/lib/slides.ts +26 -0
- package/src/app/lib/step-context.tsx +261 -0
- package/src/app/lib/themes.ts +22 -0
- package/src/app/lib/transition.ts +30 -0
- package/src/app/lib/use-agent-socket.ts +18 -0
- package/src/app/lib/use-click-page-navigation.ts +60 -0
- package/src/app/lib/use-is-mobile.ts +21 -0
- package/src/app/lib/use-locale.ts +8 -0
- package/src/app/lib/use-prefers-reduced-motion.ts +19 -0
- package/src/app/lib/use-slide-module.ts +48 -0
- package/src/app/lib/use-wheel-page-navigation.ts +99 -0
- package/src/app/lib/utils.test.ts +25 -0
- package/src/app/lib/utils.ts +6 -0
- package/src/app/main.tsx +14 -0
- package/src/app/routes/assets.tsx +9 -0
- package/src/app/routes/home-shell.tsx +213 -0
- package/src/app/routes/home.tsx +807 -0
- package/src/app/routes/presenter.tsx +418 -0
- package/src/app/routes/slide.tsx +1108 -0
- package/src/app/routes/themes.tsx +34 -0
- package/src/app/styles.css +429 -0
- package/src/app/virtual.d.ts +51 -0
- package/src/locale/en.ts +416 -0
- package/src/locale/format.ts +12 -0
- package/src/locale/index.ts +6 -0
- package/src/locale/ja.ts +422 -0
- package/src/locale/types.ts +443 -0
- package/src/locale/zh-cn.ts +414 -0
- package/src/locale/zh-tw.ts +414 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Locale } from "./types-CHmFPIG_.js";
|
|
2
|
+
|
|
3
|
+
//#region src/config.d.ts
|
|
4
|
+
type OpenAipptBuildConfig = {
|
|
5
|
+
showSlideBrowser?: boolean;
|
|
6
|
+
showSlideUi?: boolean;
|
|
7
|
+
allowHtmlDownload?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type OpenAipptConfig = {
|
|
10
|
+
base?: string;
|
|
11
|
+
slidesDir?: string;
|
|
12
|
+
themesDir?: string;
|
|
13
|
+
assetsDir?: string;
|
|
14
|
+
port?: number;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Pick the UI language from the language switcher in the slide UI
|
|
17
|
+
* instead. When set, this only seeds the initial language until the user
|
|
18
|
+
* chooses one (their choice is then remembered locally).
|
|
19
|
+
*/
|
|
20
|
+
locale?: Locale;
|
|
21
|
+
build?: OpenAipptBuildConfig;
|
|
22
|
+
}; //#endregion
|
|
23
|
+
export { OpenAipptConfig };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/app/lib/design.ts
|
|
2
|
+
function designToCssVars(d) {
|
|
3
|
+
return {
|
|
4
|
+
"--osd-bg": d.palette.bg,
|
|
5
|
+
"--osd-text": d.palette.text,
|
|
6
|
+
"--osd-accent": d.palette.accent,
|
|
7
|
+
"--osd-font-display": d.fonts.display,
|
|
8
|
+
"--osd-font-body": d.fonts.body,
|
|
9
|
+
"--osd-size-hero": `${d.typeScale.hero}px`,
|
|
10
|
+
"--osd-size-body": `${d.typeScale.body}px`,
|
|
11
|
+
"--osd-radius": `${d.radius}px`
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function cssVarsToString(vars) {
|
|
15
|
+
return Object.entries(vars).map(([k, v]) => ` ${k}: ${v};`).join("\n");
|
|
16
|
+
}
|
|
17
|
+
const defaultDesign = {
|
|
18
|
+
palette: {
|
|
19
|
+
bg: "#f7f5f0",
|
|
20
|
+
text: "#1a1814",
|
|
21
|
+
accent: "#6d4cff"
|
|
22
|
+
},
|
|
23
|
+
fonts: {
|
|
24
|
+
display: "Georgia, \"Times New Roman\", serif",
|
|
25
|
+
body: "-apple-system, BlinkMacSystemFont, \"Inter\", system-ui, sans-serif"
|
|
26
|
+
},
|
|
27
|
+
typeScale: {
|
|
28
|
+
hero: 168,
|
|
29
|
+
body: 36
|
|
30
|
+
},
|
|
31
|
+
radius: 12
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { cssVarsToString, defaultDesign, designToCssVars };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./design-cpzS8aud.js";
|
|
2
|
+
import { createViteConfig } from "./config-CjzqjrEA.js";
|
|
3
|
+
import { createServer, mergeConfig } from "vite";
|
|
4
|
+
|
|
5
|
+
//#region src/cli/dev.ts
|
|
6
|
+
async function dev(opts = {}) {
|
|
7
|
+
const base = await createViteConfig({ userCwd: process.cwd() });
|
|
8
|
+
const config = mergeConfig(base, { server: {
|
|
9
|
+
...opts.port !== void 0 ? { port: opts.port } : {},
|
|
10
|
+
...opts.host !== void 0 ? { host: opts.host } : {},
|
|
11
|
+
...opts.open !== void 0 ? { open: opts.open } : {}
|
|
12
|
+
} });
|
|
13
|
+
const server = await createServer(config);
|
|
14
|
+
await server.listen();
|
|
15
|
+
server.printUrls();
|
|
16
|
+
server.bindCLIShortcuts({ print: true });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { dev };
|