supadeck 0.0.5 → 0.0.7

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.
Files changed (59) hide show
  1. package/dist/cli/index.js +30532 -88
  2. package/dist/content/rehype-shiki-code-blocks.d.ts +9 -0
  3. package/dist/index.js +2808 -11
  4. package/dist/metafile-esm.json +1 -0
  5. package/dist/runtime/main.js +2868 -21
  6. package/dist/runtime/themes/base/theme.css +183 -145
  7. package/dist/runtime/themes/default/index.js +312 -15
  8. package/dist/runtime/themes/default/theme.css +17 -0
  9. package/dist/runtime/themes/sunset/index.js +2737 -10
  10. package/dist/runtime/vite-config.js +30206 -196
  11. package/package.json +16 -10
  12. package/dist/cli/export.js +0 -35
  13. package/dist/cli/serve.js +0 -12
  14. package/dist/cli/templates.js +0 -69
  15. package/dist/cli/workspace.js +0 -26
  16. package/dist/content/parse-deck.js +0 -136
  17. package/dist/content/remark-unwrap-jsx-paragraphs.js +0 -63
  18. package/dist/export/pdf.js +0 -40
  19. package/dist/runtime/App.js +0 -45
  20. package/dist/runtime/components/Callout.js +0 -13
  21. package/dist/runtime/components/Center.js +0 -4
  22. package/dist/runtime/components/Columns.js +0 -4
  23. package/dist/runtime/components/Disclosure.js +0 -5
  24. package/dist/runtime/components/Frame.js +0 -4
  25. package/dist/runtime/components/index.js +0 -4
  26. package/dist/runtime/default-components.js +0 -38
  27. package/dist/runtime/hooks/slides.js +0 -45
  28. package/dist/runtime/layout/DeckSlide.js +0 -6
  29. package/dist/runtime/layout/SlideFrame.js +0 -6
  30. package/dist/runtime/mdx-components.d.ts +0 -2
  31. package/dist/runtime/mdx-components.js +0 -17
  32. package/dist/runtime/primitives/DeckChrome.js +0 -6
  33. package/dist/runtime/primitives/DeckNavigation.js +0 -4
  34. package/dist/runtime/primitives/DeckProgress.js +0 -5
  35. package/dist/runtime/primitives/DeckTitle.js +0 -4
  36. package/dist/runtime/public-components.d.ts +0 -22
  37. package/dist/runtime/public-components.js +0 -24
  38. package/dist/runtime/styles/base.css +0 -201
  39. package/dist/runtime/tailwind-hmr.js +0 -67
  40. package/dist/runtime/tailwind-sources.js +0 -42
  41. package/dist/runtime/theme-components.d.ts +0 -3
  42. package/dist/runtime/theme-components.js +0 -18
  43. package/dist/runtime/theme-resolution.js +0 -62
  44. package/dist/runtime/theme-types.js +0 -1
  45. package/dist/runtime/themes/base/DefaultDeck.js +0 -10
  46. package/dist/runtime/themes/default/DefaultDeck.d.ts +0 -2
  47. package/dist/runtime/themes/default/DefaultDeck.js +0 -11
  48. package/dist/runtime/themes/default/DefaultThemeDeck.js +0 -22
  49. package/dist/runtime/themes/default/components.js +0 -79
  50. package/dist/runtime/themes/default.css +0 -10
  51. package/dist/runtime/themes/sunset.css +0 -10
  52. package/dist/runtime/themes/supabase/SupabaseDeck.d.ts +0 -2
  53. package/dist/runtime/themes/supabase/SupabaseDeck.js +0 -23
  54. package/dist/runtime/themes/supabase/components.d.ts +0 -65
  55. package/dist/runtime/themes/supabase/components.js +0 -80
  56. package/dist/runtime/themes/supabase/index.d.ts +0 -4
  57. package/dist/runtime/themes/supabase/index.js +0 -17
  58. package/dist/runtime/themes/supabase/theme.css +0 -523
  59. package/dist/runtime/utils/use-current-slide.js +0 -19
@@ -1,4 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function DeckNavigation({ onPrevious, onNext }) {
3
- return (_jsxs("div", { className: "deck-nav", children: [_jsx("button", { className: "deck-button", type: "button", onClick: onPrevious, children: "Prev" }), _jsx("button", { className: "deck-button", type: "button", onClick: onNext, children: "Next" })] }));
4
- }
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export function DeckProgress({ currentIndex, total }) {
3
- const width = total > 0 ? `${((currentIndex + 1) / total) * 100}%` : '0%';
4
- return (_jsx("div", { className: "deck-progress", children: _jsx("div", { className: "deck-progress-bar", style: { width } }) }));
5
- }
@@ -1,4 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export function DeckTitle({ title }) {
3
- return _jsx("div", { className: "deck-title", children: title });
4
- }
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- type CalloutTone = 'default' | 'accent' | 'danger';
3
- interface CalloutProps {
4
- children: React.ReactNode;
5
- tone?: CalloutTone;
6
- }
7
- interface ColumnsProps {
8
- left: React.ReactNode;
9
- right: React.ReactNode;
10
- }
11
- interface DisclosureProps {
12
- title: React.ReactNode;
13
- children: React.ReactNode;
14
- }
15
- interface FrameProps {
16
- children: React.ReactNode;
17
- }
18
- export declare function Callout({ children, tone }: CalloutProps): import("react/jsx-runtime").JSX.Element;
19
- export declare function Columns({ left, right }: ColumnsProps): import("react/jsx-runtime").JSX.Element;
20
- export declare function Disclosure({ title, children }: DisclosureProps): import("react/jsx-runtime").JSX.Element;
21
- export declare function Frame({ children }: FrameProps): import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Accordion } from '@base-ui-components/react/accordion';
3
- function toneClasses(tone) {
4
- if (tone === 'accent') {
5
- return 'border-[color:var(--color-accent)] bg-[color:var(--color-accent)]/10';
6
- }
7
- if (tone === 'danger') {
8
- return 'border-red-500/50 bg-red-500/10';
9
- }
10
- return 'border-[color:var(--color-border)] bg-white/60 dark:bg-white/5';
11
- }
12
- export function Callout({ children, tone = 'default' }) {
13
- return (_jsx("div", { className: `rounded-[var(--radius-lg)] border px-6 py-5 text-xl shadow-lg shadow-black/5 backdrop-blur ${toneClasses(tone)}`, children: children }));
14
- }
15
- export function Columns({ left, right }) {
16
- return _jsxs("div", { className: "grid gap-6 md:grid-cols-2", children: [left, right] });
17
- }
18
- export function Disclosure({ title, children }) {
19
- return (_jsx(Accordion.Root, { className: "rounded-[var(--radius-lg)] border border-[color:var(--color-border)] bg-white/70 dark:bg-white/5", children: _jsxs(Accordion.Item, { value: "item-1", children: [_jsx(Accordion.Header, { children: _jsxs(Accordion.Trigger, { className: "flex w-full items-center justify-between px-5 py-4 text-left text-xl font-semibold", children: [_jsx("span", { children: title }), _jsx("span", { "aria-hidden": "true", children: "+" })] }) }), _jsx(Accordion.Panel, { className: "px-5 pb-5 text-lg text-[color:var(--color-foreground)]/80", children: children })] }) }));
20
- }
21
- export function Frame({ children }) {
22
- return (_jsx("div", { className: "rounded-[var(--radius-xl)] border border-[color:var(--color-border)] bg-white/70 p-8 shadow-xl shadow-black/10 dark:bg-white/5", children: children }));
23
- }
24
- //# sourceMappingURL=public-components.js.map
@@ -1,201 +0,0 @@
1
- @import "tailwindcss";
2
-
3
- :root {
4
- --color-background: #f3f0ea;
5
- --color-foreground: #1f1b16;
6
- --color-muted: #6b6257;
7
- --color-accent: #b85c38;
8
- --color-border: rgba(31, 27, 22, 0.12);
9
- --color-code-bg: rgba(31, 27, 22, 0.06);
10
- --radius-lg: 1.5rem;
11
- --radius-xl: 2.25rem;
12
- --font-sans: "Instrument Sans", "Inter", sans-serif;
13
- --font-display: "Fraunces", "Georgia", serif;
14
- --slide-aspect-ratio: 16 / 9;
15
- }
16
-
17
- * {
18
- box-sizing: border-box;
19
- }
20
-
21
- html,
22
- body,
23
- #root {
24
- min-height: 100%;
25
- margin: 0;
26
- }
27
-
28
- body {
29
- min-height: 100vh;
30
- font-family: var(--font-sans);
31
- color: var(--color-foreground);
32
- background:
33
- radial-gradient(circle at top left, color-mix(in srgb, var(--color-accent) 16%, transparent), transparent 28%),
34
- linear-gradient(145deg, color-mix(in srgb, var(--color-background) 92%, white), var(--color-background));
35
- }
36
-
37
- button {
38
- font: inherit;
39
- }
40
-
41
- .app-shell {
42
- display: grid;
43
- min-height: 100vh;
44
- grid-template-rows: auto 1fr auto;
45
- gap: 1.5rem;
46
- padding: 1.5rem;
47
- }
48
-
49
- .deck-chrome {
50
- display: grid;
51
- gap: 0.75rem;
52
- }
53
-
54
- .deck-title {
55
- font-family: var(--font-display);
56
- font-size: 1rem;
57
- font-weight: 700;
58
- letter-spacing: 0.18em;
59
- text-transform: uppercase;
60
- color: var(--color-muted);
61
- }
62
-
63
- .deck-progress {
64
- overflow: hidden;
65
- height: 0.4rem;
66
- border-radius: 999px;
67
- background: color-mix(in srgb, var(--color-foreground) 10%, transparent);
68
- }
69
-
70
- .deck-progress-bar {
71
- height: 100%;
72
- border-radius: inherit;
73
- background: linear-gradient(90deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 55%, white));
74
- transition: width 240ms ease;
75
- }
76
-
77
- .deck-stage {
78
- display: grid;
79
- place-items: center;
80
- }
81
-
82
- .slide-frame {
83
- width: min(100%, 1440px);
84
- aspect-ratio: var(--slide-aspect-ratio);
85
- transition: transform 220ms ease, opacity 220ms ease;
86
- }
87
-
88
- .slide-surface {
89
- display: grid;
90
- grid-template-rows: 1fr auto;
91
- height: 100%;
92
- overflow: hidden;
93
- border: 1px solid var(--color-border);
94
- border-radius: var(--radius-xl);
95
- background:
96
- linear-gradient(180deg, color-mix(in srgb, var(--color-background) 96%, white), color-mix(in srgb, var(--color-background) 86%, transparent)),
97
- radial-gradient(circle at top right, color-mix(in srgb, var(--color-accent) 10%, transparent), transparent 32%);
98
- box-shadow:
99
- 0 30px 80px rgba(15, 23, 42, 0.16),
100
- inset 0 1px 0 rgba(255, 255, 255, 0.45);
101
- }
102
-
103
- .slide-content {
104
- display: flex;
105
- flex-direction: column;
106
- justify-content: center;
107
- gap: 1.5rem;
108
- padding: clamp(1.5rem, 4vw, 4rem);
109
- }
110
-
111
- .slide-content > :first-child {
112
- margin-top: 0;
113
- }
114
-
115
- .slide-content > :last-child {
116
- margin-bottom: 0;
117
- }
118
-
119
- .slide-footer {
120
- display: flex;
121
- justify-content: flex-end;
122
- padding: 1.25rem 1.5rem;
123
- color: var(--color-muted);
124
- font-size: 0.95rem;
125
- letter-spacing: 0.12em;
126
- text-transform: uppercase;
127
- }
128
-
129
- .deck-nav {
130
- display: flex;
131
- justify-content: flex-end;
132
- gap: 0.75rem;
133
- }
134
-
135
- .deck-button {
136
- border: 1px solid var(--color-border);
137
- border-radius: 999px;
138
- background: color-mix(in srgb, var(--color-background) 88%, white);
139
- padding: 0.8rem 1.1rem;
140
- color: var(--color-foreground);
141
- transition: transform 160ms ease, background 160ms ease;
142
- }
143
-
144
- .deck-button:hover {
145
- transform: translateY(-1px);
146
- background: color-mix(in srgb, var(--color-background) 80%, white);
147
- }
148
-
149
- .print-deck {
150
- display: grid;
151
- gap: 0;
152
- }
153
-
154
- .slide-frame-print {
155
- width: 100vw;
156
- min-height: 100vh;
157
- page-break-after: always;
158
- break-after: page;
159
- padding: 0;
160
- }
161
-
162
- .slide-frame-print .slide-surface {
163
- border-radius: 0;
164
- box-shadow: none;
165
- min-height: 100vh;
166
- }
167
-
168
- @media (max-width: 900px) {
169
- .app-shell {
170
- padding: 1rem;
171
- }
172
-
173
- .slide-frame {
174
- width: 100%;
175
- }
176
-
177
- .slide-content {
178
- padding: 1.25rem;
179
- }
180
- }
181
-
182
- @media print {
183
- @page {
184
- size: landscape;
185
- margin: 0;
186
- }
187
-
188
- body {
189
- background: white;
190
- }
191
-
192
- .slide-frame-print {
193
- width: 100%;
194
- height: 100vh;
195
- min-height: 100vh;
196
- }
197
-
198
- .slide-frame-print .slide-surface {
199
- border: none;
200
- }
201
- }
@@ -1,67 +0,0 @@
1
- import path from 'node:path';
2
- function uniqueByUrl(modules) {
3
- const seen = new Set();
4
- const uniqueModules = [];
5
- for (const module of modules) {
6
- if (!module.url || seen.has(module.url)) {
7
- continue;
8
- }
9
- seen.add(module.url);
10
- uniqueModules.push(module);
11
- }
12
- return uniqueModules;
13
- }
14
- export function isCssModule(module) {
15
- const id = module.id ?? module.file ?? module.url;
16
- const [pathname] = id.split('?', 1);
17
- return pathname.endsWith('.css');
18
- }
19
- export function collectImportedCssModules(rootModule) {
20
- const queue = [...rootModule.importedModules];
21
- const visited = new Set();
22
- const cssModules = [];
23
- while (queue.length > 0) {
24
- const current = queue.shift();
25
- if (!current || visited.has(current)) {
26
- continue;
27
- }
28
- visited.add(current);
29
- if (isCssModule(current)) {
30
- cssModules.push(current);
31
- }
32
- for (const imported of current.importedModules) {
33
- queue.push(imported);
34
- }
35
- }
36
- return uniqueByUrl(cssModules);
37
- }
38
- export function createCssUpdatePayload(modules, timestamp) {
39
- const updates = uniqueByUrl(modules)
40
- .filter(isCssModule)
41
- .map((module) => ({
42
- type: 'css-update',
43
- path: module.url,
44
- acceptedPath: module.url,
45
- timestamp
46
- }));
47
- return {
48
- type: 'update',
49
- updates
50
- };
51
- }
52
- export function createFullReloadPayload(file) {
53
- return {
54
- type: 'full-reload',
55
- path: '*',
56
- triggeredBy: path.resolve(file)
57
- };
58
- }
59
- export function dispatchTailwindCssUpdates(options) {
60
- const payload = createCssUpdatePayload(options.modules, options.timestamp);
61
- if (payload.updates.length === 0) {
62
- options.hot.send(createFullReloadPayload(options.file));
63
- return { kind: 'full-reload', updateCount: 0 };
64
- }
65
- options.hot.send(payload);
66
- return { kind: 'css-update', updateCount: payload.updates.length };
67
- }
@@ -1,42 +0,0 @@
1
- import path from 'node:path';
2
- import { normalizePath } from 'vite';
3
- const TAILWIND_IMPORT_PATTERN = /@import\s+["']tailwindcss["'];/;
4
- const TAILWIND_SOURCE_EXTENSIONS = new Set([
5
- '.mdx',
6
- '.md',
7
- '.tsx',
8
- '.ts',
9
- '.jsx',
10
- '.js',
11
- '.html'
12
- ]);
13
- const TAILWIND_SOURCE_GLOB = '**/*.{mdx,md,tsx,ts,jsx,js,html}';
14
- function quoteCssString(value) {
15
- return JSON.stringify(value);
16
- }
17
- export function resolveTailwindWorkspaceRoot(deckPath) {
18
- return normalizePath(path.dirname(deckPath));
19
- }
20
- export function isTailwindSourceFile(deckPath, filePath) {
21
- const workspaceRoot = resolveTailwindWorkspaceRoot(deckPath);
22
- const normalizedFilePath = normalizePath(filePath);
23
- const relativePath = path.posix.relative(workspaceRoot, normalizedFilePath);
24
- if (relativePath === '' ||
25
- relativePath === '.' ||
26
- relativePath.startsWith('..') ||
27
- path.posix.isAbsolute(relativePath)) {
28
- return false;
29
- }
30
- return TAILWIND_SOURCE_EXTENSIONS.has(path.posix.extname(normalizedFilePath));
31
- }
32
- export function createTailwindSourceDirectives(deckPath) {
33
- const workspacePattern = `${resolveTailwindWorkspaceRoot(deckPath)}/${TAILWIND_SOURCE_GLOB}`;
34
- return `@source ${quoteCssString(workspacePattern)};\n`;
35
- }
36
- export function injectTailwindSources(css, deckPath) {
37
- if (!TAILWIND_IMPORT_PATTERN.test(css)) {
38
- return css;
39
- }
40
- const directives = createTailwindSourceDirectives(deckPath);
41
- return css.startsWith(directives) ? css : `${directives}${css}`;
42
- }
@@ -1,3 +0,0 @@
1
- import type { MdxComponentMap, ThemeModule } from './theme-types.js';
2
- export declare function createDefaultThemeComponents(): MdxComponentMap;
3
- export declare function mergeThemeComponents(theme?: ThemeModule): MdxComponentMap;
@@ -1,18 +0,0 @@
1
- import { Callout, Columns, Disclosure, Frame } from './components/index.js';
2
- import { createDefaultMdxComponents } from './mdx-components.js';
3
- export function createDefaultThemeComponents() {
4
- return {
5
- Callout,
6
- Columns,
7
- Disclosure,
8
- Frame
9
- };
10
- }
11
- export function mergeThemeComponents(theme) {
12
- return {
13
- ...createDefaultMdxComponents(),
14
- ...createDefaultThemeComponents(),
15
- ...(theme?.components ?? {})
16
- };
17
- }
18
- //# sourceMappingURL=theme-components.js.map
@@ -1,62 +0,0 @@
1
- import { existsSync, statSync } from 'node:fs';
2
- import { fileURLToPath } from 'node:url';
3
- import path from 'node:path';
4
- const MODULE_EXTENSIONS = ['.tsx', '.ts', '.jsx', '.js'];
5
- const BUILTIN_THEME_STEMS = {
6
- default: './themes/default/index',
7
- sunset: './themes/sunset/index'
8
- };
9
- export function resolveRuntimeModulePath(baseUrl, stem) {
10
- for (const extension of MODULE_EXTENSIONS) {
11
- const candidate = fileURLToPath(new URL(`${stem}${extension}`, baseUrl));
12
- if (existsSync(candidate)) {
13
- return candidate;
14
- }
15
- }
16
- return fileURLToPath(new URL(`${stem}.js`, baseUrl));
17
- }
18
- function resolveFileCandidate(stem) {
19
- if (existsSync(stem) && statSync(stem).isFile()) {
20
- return stem;
21
- }
22
- for (const extension of MODULE_EXTENSIONS) {
23
- const candidate = `${stem}${extension}`;
24
- if (existsSync(candidate) && statSync(candidate).isFile()) {
25
- return candidate;
26
- }
27
- }
28
- return null;
29
- }
30
- function resolveDirectoryIndex(directoryPath) {
31
- for (const extension of MODULE_EXTENSIONS) {
32
- const candidate = path.join(directoryPath, `index${extension}`);
33
- if (existsSync(candidate) && statSync(candidate).isFile()) {
34
- return candidate;
35
- }
36
- }
37
- throw new Error(`Theme directory "${directoryPath}" is missing an index theme module.`);
38
- }
39
- export function resolveThemeModulePath(deckPath, themeName, baseUrl = import.meta.url) {
40
- if (!themeName || BUILTIN_THEME_STEMS[themeName]) {
41
- return resolveRuntimeModulePath(baseUrl, BUILTIN_THEME_STEMS[themeName || 'default']);
42
- }
43
- const candidate = path.resolve(path.dirname(deckPath), themeName);
44
- if (path.extname(candidate)) {
45
- if (!existsSync(candidate)) {
46
- throw new Error(`Theme file "${themeName}" does not exist.`);
47
- }
48
- return candidate;
49
- }
50
- const fileCandidate = resolveFileCandidate(candidate);
51
- if (fileCandidate) {
52
- return fileCandidate;
53
- }
54
- if (existsSync(candidate) && statSync(candidate).isDirectory()) {
55
- return resolveDirectoryIndex(candidate);
56
- }
57
- const indexFile = resolveFileCandidate(path.join(candidate, 'index'));
58
- if (indexFile) {
59
- return indexFile;
60
- }
61
- throw new Error(`Unable to resolve theme "${themeName}". Use a built-in id, a theme directory, or a .tsx theme file.`);
62
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { DeckSlide } from '../../layout/DeckSlide.js';
3
- import { DeckChrome } from '../../primitives/DeckChrome.js';
4
- import { DeckNavigation } from '../../primitives/DeckNavigation.js';
5
- export function DefaultDeck({ config, slides, currentIndex, setCurrentIndex, printMode, components, helpers }) {
6
- if (printMode) {
7
- return (_jsx("main", { className: "print-deck", children: slides.map((slide, slideIndex) => (_jsx(DeckSlide, { slide: slide, config: config, total: slides.length, index: slideIndex, printMode: true, components: components }, slideIndex))) }));
8
- }
9
- return (_jsxs("main", { className: "app-shell", children: [_jsx(DeckChrome, { title: config.title, currentIndex: currentIndex, total: slides.length }), _jsx("div", { className: "deck-stage", children: _jsx(DeckSlide, { slide: slides[currentIndex], config: config, total: slides.length, index: currentIndex, components: components }) }), _jsx(DeckNavigation, { onPrevious: () => setCurrentIndex((value) => helpers.clamp(value - 1, 0, slides.length - 1)), onNext: () => setCurrentIndex((value) => helpers.clamp(value + 1, 0, slides.length - 1)) })] }));
10
- }
@@ -1,2 +0,0 @@
1
- import type { ThemeDeckProps } from '../../theme-types.js';
2
- export declare function DefaultDeck({ config, slides, currentIndex, setCurrentIndex, printMode, components, helpers }: ThemeDeckProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { DeckSlide } from '../../layout/DeckSlide.js';
3
- import { DeckChrome } from '../../primitives/DeckChrome.js';
4
- import { DeckNavigation } from '../../primitives/DeckNavigation.js';
5
- export function DefaultDeck({ config, slides, currentIndex, setCurrentIndex, printMode, components, helpers }) {
6
- if (printMode) {
7
- return (_jsx("main", { className: "print-deck", children: slides.map((slide, slideIndex) => (_jsx(DeckSlide, { slide: slide, config: config, total: slides.length, index: slideIndex, printMode: true, components: components }, slideIndex))) }));
8
- }
9
- return (_jsxs("main", { className: "app-shell", children: [_jsx(DeckChrome, { title: config.title, currentIndex: currentIndex, total: slides.length }), _jsx("div", { className: "deck-stage", children: _jsx(DeckSlide, { slide: slides[currentIndex], config: config, total: slides.length, index: currentIndex, components: components }) }), _jsx(DeckNavigation, { onPrevious: () => setCurrentIndex((value) => helpers.clamp(value - 1, 0, slides.length - 1)), onNext: () => setCurrentIndex((value) => helpers.clamp(value + 1, 0, slides.length - 1)) })] }));
10
- }
11
- //# sourceMappingURL=DefaultDeck.js.map
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { SupabaseMark } from "./components.js";
3
- function isSectionActive(section, currentIndex) {
4
- return currentIndex >= section.start && currentIndex <= section.end;
5
- }
6
- function Footer({ currentIndex, total, sections, showSlideNumbers, onJumpToSlide, }) {
7
- return (_jsxs("footer", { className: "supabase-footer", children: [_jsx(SupabaseMark, {}), _jsx("div", { className: "supabase-breadcrumb", "aria-label": "Slide sections", children: sections?.map((section) => (_jsx("button", { className: `supabase-breadcrumb-item ${isSectionActive(section, currentIndex) ? "active" : ""}`, type: "button", "aria-current": isSectionActive(section, currentIndex) ? "step" : undefined, onClick: () => onJumpToSlide(section.start), children: section.label }, `${section.label}-${section.start}-${section.end}`))) }), showSlideNumbers ? (_jsxs("div", { className: "supabase-counter", children: [currentIndex + 1, " / ", total] })) : null] }));
8
- }
9
- function SlideShell({ slide, components, transition, printMode, }) {
10
- const Slide = slide.Component;
11
- return (_jsx("section", { className: `supabase-slide ${printMode ? "supabase-slide-print" : ""}`, "data-transition": transition, children: _jsx("div", { className: "supabase-slide-inner", children: _jsx(Slide, { components: components }) }) }));
12
- }
13
- export function DefaultThemeDeck({ deck, config, slides, currentIndex, setCurrentIndex, printMode, components, helpers, }) {
14
- if (printMode) {
15
- return (_jsx("main", { className: "supabase-print-deck", "data-title": deck.config.title, children: slides.map((slide) => (_jsx(SlideShell, { slide: slide, components: components, transition: config.transition ?? "fade", printMode: true }, slide.index))) }));
16
- }
17
- const activeSlide = slides[currentIndex];
18
- if (!activeSlide) {
19
- return null;
20
- }
21
- return (_jsxs("main", { className: "supabase-deck-shell", "data-title": deck.config.title, children: [_jsx("div", { className: "supabase-stage", children: _jsx(SlideShell, { slide: activeSlide, components: components, transition: config.transition ?? "fade", printMode: false }, activeSlide.index) }), _jsx(Footer, { currentIndex: currentIndex, total: slides.length, sections: config.sections, showSlideNumbers: config.showSlideNumbers, onJumpToSlide: (nextIndex) => setCurrentIndex(helpers.clamp(nextIndex, 0, slides.length - 1)) })] }));
22
- }
@@ -1,79 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId } from 'react';
3
- function cx(...values) {
4
- return values.filter(Boolean).join(' ');
5
- }
6
- export function SupabaseMark({ size = 'footer', className, ...props }) {
7
- const id = useId();
8
- const primaryGradientId = `${id}-primary`;
9
- const shadowGradientId = `${id}-shadow`;
10
- const dimensions = size === 'hero'
11
- ? { width: 48, height: 50 }
12
- : { width: 22, height: 22 };
13
- return (_jsxs("svg", { viewBox: "0 0 109 113", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", className: cx('supabase-mark', className), ...dimensions, ...props, children: [_jsx("path", { d: "M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9372L63.7076 110.284Z", fill: `url(#${primaryGradientId})` }), _jsx("path", { d: "M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9372L63.7076 110.284Z", fill: `url(#${shadowGradientId})`, fillOpacity: "0.2" }), _jsx("path", { d: "M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4177L45.317 2.07103Z", fill: "#3ECF8E" }), _jsxs("defs", { children: [_jsxs("linearGradient", { id: primaryGradientId, x1: "53.9738", y1: "54.974", x2: "94.1635", y2: "71.8295", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#249361" }), _jsx("stop", { offset: "1", stopColor: "#3ECF8E" })] }), _jsxs("linearGradient", { id: shadowGradientId, x1: "36.1558", y1: "30.578", x2: "54.4844", y2: "65.0806", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", {}), _jsx("stop", { offset: "1", stopOpacity: "0" })] })] })] }));
14
- }
15
- export function SectionSlide({ children, className }) {
16
- return _jsx("div", { className: cx('supabase-section-slide', className), children: children });
17
- }
18
- export function Divider({ centered = false, className }) {
19
- return _jsx("div", { className: cx('divider', centered && 'center-divider', className), "aria-hidden": "true" });
20
- }
21
- export function Tag({ children, tone = 'default', className }) {
22
- return _jsx("span", { className: cx('tag', tone !== 'default' && tone, className), children: children });
23
- }
24
- export function Wide({ children, className }) {
25
- return _jsx("div", { className: cx('supabase-wide', className), children: children });
26
- }
27
- export function CardGrid({ children, columns = 3, className }) {
28
- return (_jsx("div", { className: cx('row', className), style: { '--supabase-columns': String(columns) }, children: children }));
29
- }
30
- export function Card({ title, children, tone = 'default', className }) {
31
- return (_jsxs("div", { className: cx('card', className), children: [_jsx("h3", { className: cx(tone !== 'default' && `tone-${tone}`), children: title }), _jsx("div", { children: children })] }));
32
- }
33
- export function StatGrid({ children, columns = 2, className }) {
34
- return (_jsx("div", { className: cx('stat-grid', className), style: { '--supabase-columns': String(columns) }, children: children }));
35
- }
36
- export function Stat({ value, label, className }) {
37
- return (_jsxs("div", { className: cx('stat', className), children: [_jsx("div", { className: "stat-value", children: value }), _jsx("div", { className: "stat-label", children: label })] }));
38
- }
39
- export function StatusList({ children, className }) {
40
- return _jsx("div", { className: cx('status-list', className), children: children });
41
- }
42
- const STATUS_LABELS = {
43
- live: 'live',
44
- partial: 'partial',
45
- planned: 'planned',
46
- unknown: '?'
47
- };
48
- export function StatusItem({ status, name, note, className }) {
49
- return (_jsxs("div", { className: cx('status-item', className), children: [_jsx("span", { className: cx('status-badge', status), children: STATUS_LABELS[status] }), _jsx("span", { className: "status-name", children: name }), note ? _jsx("span", { className: "status-note", children: note }) : null] }));
50
- }
51
- export function createSupabaseComponents() {
52
- return {
53
- h1: (props) => _jsx("h1", { ...props }),
54
- h2: (props) => _jsx("h2", { ...props }),
55
- h3: (props) => _jsx("h3", { ...props }),
56
- p: (props) => _jsx("p", { ...props }),
57
- a: ({ className, ...props }) => (_jsx("a", { className: cx('supabase-link', className), ...props })),
58
- ul: ({ className, ...props }) => (_jsx("ul", { className: cx('supabase-list', className), ...props })),
59
- ol: ({ className, ...props }) => (_jsx("ol", { className: cx('supabase-list', 'supabase-list-ordered', className), ...props })),
60
- li: (props) => _jsx("li", { ...props }),
61
- code: ({ className, ...props }) => (_jsx("code", { className: cx('supabase-inline-code', className), ...props })),
62
- pre: ({ className, ...props }) => (_jsx("pre", { className: cx('supabase-pre', className), ...props })),
63
- table: ({ className, ...props }) => (_jsx("table", { className: cx('supabase-table', className), ...props })),
64
- th: ({ className, ...props }) => (_jsx("th", { className: cx('supabase-th', className), ...props })),
65
- td: ({ className, ...props }) => (_jsx("td", { className: cx('supabase-td', className), ...props })),
66
- blockquote: ({ className, ...props }) => (_jsx("blockquote", { className: cx('supabase-quote', className), ...props })),
67
- SectionSlide,
68
- SupabaseMark,
69
- Divider,
70
- Tag,
71
- Wide,
72
- CardGrid,
73
- Card,
74
- StatGrid,
75
- Stat,
76
- StatusList,
77
- StatusItem
78
- };
79
- }
@@ -1,10 +0,0 @@
1
- :root {
2
- --color-background: #f3f0ea;
3
- --color-foreground: #1f1b16;
4
- --color-muted: #6b6257;
5
- --color-accent: #b85c38;
6
- --color-border: rgba(31, 27, 22, 0.12);
7
- --color-code-bg: rgba(31, 27, 22, 0.06);
8
- --font-sans: "Instrument Sans", "Inter", sans-serif;
9
- --font-display: "Fraunces", "Georgia", serif;
10
- }
@@ -1,10 +0,0 @@
1
- :root {
2
- --color-background: #120f1d;
3
- --color-foreground: #f9f4ec;
4
- --color-muted: #d9c7b2;
5
- --color-accent: #ff9f68;
6
- --color-border: rgba(249, 244, 236, 0.14);
7
- --color-code-bg: rgba(249, 244, 236, 0.08);
8
- --font-sans: "Sora", "Avenir Next", sans-serif;
9
- --font-display: "Clash Display", "Trebuchet MS", sans-serif;
10
- }
@@ -1,2 +0,0 @@
1
- import type { ThemeDeckProps } from '../../theme-types.js';
2
- export declare function SupabaseDeck({ deck, config, slides, currentIndex, setCurrentIndex, printMode, components, helpers }: ThemeDeckProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { SupabaseMark } from './components.js';
3
- function isSectionActive(section, currentIndex) {
4
- return currentIndex >= section.start && currentIndex <= section.end;
5
- }
6
- function Footer({ currentIndex, total, sections, showSlideNumbers, onJumpToSlide }) {
7
- return (_jsxs("footer", { className: "supabase-footer", children: [_jsx(SupabaseMark, {}), _jsx("div", { className: "supabase-breadcrumb", "aria-label": "Slide sections", children: sections?.map((section) => (_jsx("button", { className: `supabase-breadcrumb-item ${isSectionActive(section, currentIndex) ? 'active' : ''}`, type: "button", "aria-current": isSectionActive(section, currentIndex) ? 'step' : undefined, onClick: () => onJumpToSlide(section.start), children: section.label }, `${section.label}-${section.start}-${section.end}`))) }), showSlideNumbers ? (_jsxs("div", { className: "supabase-counter", children: [currentIndex + 1, " / ", total] })) : null] }));
8
- }
9
- function SlideShell({ slide, components, transition, printMode }) {
10
- const Slide = slide.Component;
11
- return (_jsx("section", { className: `supabase-slide ${printMode ? 'supabase-slide-print' : ''}`, "data-transition": transition, children: _jsx("div", { className: "supabase-slide-inner", children: _jsx(Slide, { components: components }) }) }));
12
- }
13
- export function SupabaseDeck({ deck, config, slides, currentIndex, setCurrentIndex, printMode, components, helpers }) {
14
- if (printMode) {
15
- return (_jsx("main", { className: "supabase-print-deck", "data-title": deck.config.title, children: slides.map((slide) => (_jsx(SlideShell, { slide: slide, components: components, transition: config.transition ?? 'fade', printMode: true }, slide.index))) }));
16
- }
17
- const activeSlide = slides[currentIndex];
18
- if (!activeSlide) {
19
- return null;
20
- }
21
- return (_jsxs("main", { className: "supabase-deck-shell", "data-title": deck.config.title, children: [_jsx("div", { className: "supabase-stage", children: _jsx(SlideShell, { slide: activeSlide, components: components, transition: config.transition ?? 'fade', printMode: false }, activeSlide.index) }), _jsx(Footer, { currentIndex: currentIndex, total: slides.length, sections: config.sections, showSlideNumbers: config.showSlideNumbers, onJumpToSlide: (nextIndex) => setCurrentIndex(helpers.clamp(nextIndex, 0, slides.length - 1)) })] }));
22
- }
23
- //# sourceMappingURL=SupabaseDeck.js.map