konpeki 0.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/.agents/skills/authoring-visuals/SKILL.md +82 -0
- package/AGENTS.md +33 -0
- package/AUTHORING.md +233 -0
- package/LICENSE +201 -0
- package/README.md +70 -0
- package/SETUP.md +86 -0
- package/composition/README.md +166 -0
- package/composition/compile.ts +227 -0
- package/composition/document.ts +709 -0
- package/composition/schema.json +2992 -0
- package/composition/schema.ts +435 -0
- package/composition/theme-tokens.ts +16 -0
- package/composition/types.ts +286 -0
- package/composition/validate.ts +684 -0
- package/composition/vector.ts +143 -0
- package/composition/visualizations.ts +335 -0
- package/design/README.md +17 -0
- package/design/palettes/README.md +14 -0
- package/design/palettes/base.ts +14 -0
- package/design/palettes/candidates.ts +19 -0
- package/design/palettes/index.ts +78 -0
- package/design/review/color-theme.md +44 -0
- package/design/review/layout.md +16 -0
- package/design/review/text.md +18 -0
- package/design/review/typography.md +15 -0
- package/design/review/visuals.md +31 -0
- package/design/semantic-patterns.md +43 -0
- package/design/themes/README.md +22 -0
- package/design/themes/index.ts +13 -0
- package/design/visual-languages/technical-product.md +17 -0
- package/design/visual-review.md +88 -0
- package/docs/development.md +140 -0
- package/docs/workflow.md +61 -0
- package/index.html +17 -0
- package/lib/assets.d.ts +8 -0
- package/lib/charts.ts +18 -0
- package/lib/contrast.ts +16 -0
- package/lib/layouts.ts +50 -0
- package/lib/slide.tsx +42 -0
- package/lib/taste.ts +17 -0
- package/lib/text.tsx +89 -0
- package/lib/typeface.ts +44 -0
- package/package.json +85 -0
- package/runtime/konpeki.mjs +1685 -0
- package/scripts/migrate-react-page.ts +120 -0
- package/slides/README.md +153 -0
- package/slides/architecture/PROMPT.md +31 -0
- package/slides/architecture/index.tsx +102 -0
- package/slides/article-brief/PROMPT.md +35 -0
- package/slides/article-brief/index.tsx +71 -0
- package/slides/bar-chart/PROMPT.md +39 -0
- package/slides/bar-chart/index.tsx +97 -0
- package/slides/comparison/PROMPT.md +29 -0
- package/slides/comparison/index.tsx +95 -0
- package/slides/decision-memo/PROMPT.md +34 -0
- package/slides/decision-memo/index.tsx +85 -0
- package/slides/delivery-plan/PROMPT.md +45 -0
- package/slides/delivery-plan/index.tsx +105 -0
- package/slides/experiment/PROMPT.md +44 -0
- package/slides/experiment/index.tsx +127 -0
- package/slides/incident-workflow/PROMPT.md +57 -0
- package/slides/incident-workflow/index.tsx +78 -0
- package/slides/introducing-konpeki/PROMPT.md +19 -0
- package/slides/introducing-konpeki/README.md +54 -0
- package/slides/introducing-konpeki/SOURCE.md +20 -0
- package/slides/introducing-konpeki/author.ts +163 -0
- package/slides/introducing-konpeki/composition.json +3265 -0
- package/slides/line-chart/PROMPT.md +40 -0
- package/slides/line-chart/index.tsx +72 -0
- package/slides/migration/PROMPT.md +38 -0
- package/slides/migration/index.tsx +89 -0
- package/slides/og-images/PROMPT.md +21 -0
- package/slides/og-images/index.tsx +76 -0
- package/slides/product-introduction/PROMPT.md +24 -0
- package/slides/product-introduction/index.tsx +105 -0
- package/slides/research-brief/PROMPT.md +40 -0
- package/slides/research-brief/index.tsx +104 -0
- package/slides/results-explanation/PROMPT.md +32 -0
- package/slides/results-explanation/index.tsx +96 -0
- package/slides/retrospective/PROMPT.md +43 -0
- package/slides/retrospective/index.tsx +105 -0
- package/slides/sankey/PROMPT.md +11 -0
- package/slides/sankey/index.tsx +93 -0
- package/slides/teaching/PROMPT.md +45 -0
- package/slides/teaching/index.tsx +124 -0
- package/slides/vertical-bar-charts/PROMPT.md +13 -0
- package/slides/vertical-bar-charts/index.tsx +97 -0
- package/src/app/App.tsx +694 -0
- package/src/assets/konpeki-mark.png +0 -0
- package/src/components/Canvas.tsx +1168 -0
- package/src/components/DiagramTypeIcon.tsx +78 -0
- package/src/components/InspectorPanel.tsx +687 -0
- package/src/components/LeftPanel.tsx +107 -0
- package/src/components/PageSizePicker.tsx +30 -0
- package/src/components/Presentation.tsx +105 -0
- package/src/components/RightPanel.tsx +201 -0
- package/src/components/VectorOverflowWarning.tsx +46 -0
- package/src/components/WorkspaceChrome.tsx +199 -0
- package/src/components/ui.tsx +53 -0
- package/src/lib/examples/react-page-migration.json +1295 -0
- package/src/lib/examples.ts +42 -0
- package/src/lib/export-png.ts +101 -0
- package/src/lib/file-session.ts +74 -0
- package/src/lib/history.ts +53 -0
- package/src/lib/model.ts +188 -0
- package/src/lib/page-size.ts +24 -0
- package/src/lib/presentation.ts +17 -0
- package/src/lib/storage.ts +43 -0
- package/src/lib/theme.ts +25 -0
- package/src/lib/use-file-session.ts +162 -0
- package/src/main.tsx +26 -0
- package/src/styles/base.css +105 -0
- package/src/styles/canvas.css +268 -0
- package/src/styles/chrome.css +214 -0
- package/src/styles/component-previews.css +386 -0
- package/src/styles/feedback.css +71 -0
- package/src/styles/left-panel.css +125 -0
- package/src/styles/presentation.css +72 -0
- package/src/styles/right-panel.css +1172 -0
- package/src/styles/shell.css +247 -0
- package/vite.config.ts +6 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { canonicalJSON } from "../../composition/compile.ts";
|
|
3
|
+
import { validateComposition } from "../../composition/validate.ts";
|
|
4
|
+
import type { Draft } from "./model.ts";
|
|
5
|
+
import {
|
|
6
|
+
FileSessionError,
|
|
7
|
+
fileSessionToken,
|
|
8
|
+
loadFileSession,
|
|
9
|
+
saveFileSession,
|
|
10
|
+
sendBuildRequest,
|
|
11
|
+
} from "./file-session.ts";
|
|
12
|
+
|
|
13
|
+
export type FileStatus = "loading" | "saved" | "saving" | "conflict" | "error";
|
|
14
|
+
|
|
15
|
+
type Callbacks = {
|
|
16
|
+
onOpen: (draft: Draft, name: string) => void;
|
|
17
|
+
onExternalChange: (draft: Draft) => void;
|
|
18
|
+
onNotice: (message: string) => void;
|
|
19
|
+
onError: (message: string) => void;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export function useFileSession(
|
|
23
|
+
enabled: boolean,
|
|
24
|
+
draft: Draft,
|
|
25
|
+
callbacks: Callbacks,
|
|
26
|
+
) {
|
|
27
|
+
const token = fileSessionToken();
|
|
28
|
+
const [status, setStatus] = useState<FileStatus>(enabled ? "loading" : "saved");
|
|
29
|
+
const callbacksRef = useRef(callbacks);
|
|
30
|
+
callbacksRef.current = callbacks;
|
|
31
|
+
const draftRef = useRef(draft);
|
|
32
|
+
draftRef.current = draft;
|
|
33
|
+
const state = useRef<{
|
|
34
|
+
ready: boolean;
|
|
35
|
+
revision: string;
|
|
36
|
+
savedJSON: string;
|
|
37
|
+
pending?: { draft: Draft; serialized: string };
|
|
38
|
+
drain?: Promise<void>;
|
|
39
|
+
}>({ ready: false, revision: "", savedJSON: "" });
|
|
40
|
+
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (!enabled || !token) return;
|
|
43
|
+
let cancelled = false;
|
|
44
|
+
void loadFileSession(token).then((session) => {
|
|
45
|
+
if (cancelled) return;
|
|
46
|
+
state.current = {
|
|
47
|
+
ready: true,
|
|
48
|
+
revision: session.revision,
|
|
49
|
+
savedJSON: canonicalJSON(session.document),
|
|
50
|
+
};
|
|
51
|
+
setStatus("saved");
|
|
52
|
+
callbacksRef.current.onOpen(session.document, session.name);
|
|
53
|
+
}).catch((error) => {
|
|
54
|
+
if (cancelled) return;
|
|
55
|
+
setStatus("error");
|
|
56
|
+
callbacksRef.current.onError(
|
|
57
|
+
error instanceof Error ? error.message : "Could not open the file-backed composition.",
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
return () => { cancelled = true; };
|
|
61
|
+
}, [enabled, token]);
|
|
62
|
+
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!enabled || !state.current.ready || ["conflict", "error"].includes(status))
|
|
65
|
+
return;
|
|
66
|
+
if (!validateComposition(draft).ok) return;
|
|
67
|
+
const timer = window.setTimeout(() => { void save(draft); }, 250);
|
|
68
|
+
return () => window.clearTimeout(timer);
|
|
69
|
+
}, [draft, enabled, status]);
|
|
70
|
+
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (!enabled || !token) return;
|
|
73
|
+
let cancelled = false;
|
|
74
|
+
const timer = window.setInterval(() => {
|
|
75
|
+
if (!state.current.ready || state.current.drain) return;
|
|
76
|
+
void loadFileSession(token).then((remote) => {
|
|
77
|
+
if (cancelled || remote.revision === state.current.revision) return;
|
|
78
|
+
if (canonicalJSON(draftRef.current) !== state.current.savedJSON) {
|
|
79
|
+
setStatus("conflict");
|
|
80
|
+
callbacksRef.current.onNotice(
|
|
81
|
+
"The file changed elsewhere. Neither version was overwritten.",
|
|
82
|
+
);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
state.current = {
|
|
86
|
+
ready: true,
|
|
87
|
+
revision: remote.revision,
|
|
88
|
+
savedJSON: canonicalJSON(remote.document),
|
|
89
|
+
};
|
|
90
|
+
setStatus("saved");
|
|
91
|
+
callbacksRef.current.onExternalChange(remote.document);
|
|
92
|
+
}).catch(() => {
|
|
93
|
+
if (!cancelled) setStatus("error");
|
|
94
|
+
});
|
|
95
|
+
}, 1000);
|
|
96
|
+
return () => {
|
|
97
|
+
cancelled = true;
|
|
98
|
+
window.clearInterval(timer);
|
|
99
|
+
};
|
|
100
|
+
}, [enabled, token]);
|
|
101
|
+
|
|
102
|
+
function save(next: Draft): Promise<string | undefined> {
|
|
103
|
+
if (!token || !state.current.ready) return Promise.resolve(undefined);
|
|
104
|
+
const serialized = canonicalJSON(next);
|
|
105
|
+
if (serialized === state.current.savedJSON && !state.current.drain)
|
|
106
|
+
return Promise.resolve(state.current.revision);
|
|
107
|
+
state.current.pending = { draft: next, serialized };
|
|
108
|
+
if (!state.current.drain) {
|
|
109
|
+
state.current.drain = drain(token).finally(() => {
|
|
110
|
+
state.current.drain = undefined;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return state.current.drain.then(() =>
|
|
114
|
+
state.current.savedJSON === serialized ? state.current.revision : undefined,
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
async function drain(activeToken: string) {
|
|
119
|
+
while (state.current.pending) {
|
|
120
|
+
const pending = state.current.pending;
|
|
121
|
+
state.current.pending = undefined;
|
|
122
|
+
setStatus("saving");
|
|
123
|
+
try {
|
|
124
|
+
const result = await saveFileSession(
|
|
125
|
+
activeToken,
|
|
126
|
+
state.current.revision,
|
|
127
|
+
pending.draft,
|
|
128
|
+
);
|
|
129
|
+
state.current.revision = result.revision;
|
|
130
|
+
state.current.savedJSON = pending.serialized;
|
|
131
|
+
setStatus("saved");
|
|
132
|
+
} catch (error) {
|
|
133
|
+
state.current.pending = undefined;
|
|
134
|
+
const conflict = error instanceof FileSessionError && error.status === 409;
|
|
135
|
+
setStatus(conflict ? "conflict" : "error");
|
|
136
|
+
callbacksRef.current.onNotice(conflict
|
|
137
|
+
? "The composition changed outside this browser. Your edits were not overwritten."
|
|
138
|
+
: error instanceof Error ? error.message : "Could not save the composition file.");
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
async function build(
|
|
145
|
+
instruction: string,
|
|
146
|
+
slideId: string,
|
|
147
|
+
componentId?: string,
|
|
148
|
+
) {
|
|
149
|
+
if (!token) return false;
|
|
150
|
+
const revision = await save(draftRef.current);
|
|
151
|
+
if (!revision) return false;
|
|
152
|
+
await sendBuildRequest(token, {
|
|
153
|
+
revision,
|
|
154
|
+
instruction,
|
|
155
|
+
slideId,
|
|
156
|
+
...(componentId ? { componentId } : {}),
|
|
157
|
+
});
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return { status, build };
|
|
162
|
+
}
|
package/src/main.tsx
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StrictMode } from "react";
|
|
2
|
+
import { createRoot } from "react-dom/client";
|
|
3
|
+
import "@fontsource/ibm-plex-sans/400.css";
|
|
4
|
+
import "@fontsource/ibm-plex-sans/500.css";
|
|
5
|
+
import "@fontsource/ibm-plex-sans/600.css";
|
|
6
|
+
import "@fontsource/ibm-plex-serif/latin-400.css";
|
|
7
|
+
import "@fontsource/ibm-plex-serif/latin-500.css";
|
|
8
|
+
import "@fontsource/ibm-plex-serif/latin-600.css";
|
|
9
|
+
import "@fontsource/noto-sans/latin-400.css";
|
|
10
|
+
import "@fontsource/noto-sans/latin-500.css";
|
|
11
|
+
import "@fontsource/noto-sans/latin-600.css";
|
|
12
|
+
import { App } from "./app/App.tsx";
|
|
13
|
+
import "./styles/base.css";
|
|
14
|
+
import "./styles/shell.css";
|
|
15
|
+
import "./styles/chrome.css";
|
|
16
|
+
import "./styles/left-panel.css";
|
|
17
|
+
import "./styles/right-panel.css";
|
|
18
|
+
import "./styles/canvas.css";
|
|
19
|
+
import "./styles/component-previews.css";
|
|
20
|
+
import "./styles/feedback.css";
|
|
21
|
+
import "./styles/presentation.css";
|
|
22
|
+
createRoot(document.getElementById("root")!).render(
|
|
23
|
+
<StrictMode>
|
|
24
|
+
<App />
|
|
25
|
+
</StrictMode>,
|
|
26
|
+
);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: "IBM Plex Sans", sans-serif;
|
|
3
|
+
color: #202020;
|
|
4
|
+
background: #f4f4f4;
|
|
5
|
+
font-synthesis: none;
|
|
6
|
+
--accent: #007bbb;
|
|
7
|
+
--muted: #626262;
|
|
8
|
+
--ui-bg: #f4f4f4;
|
|
9
|
+
--ui-surface: #fff;
|
|
10
|
+
--ui-subtle: #fafafa;
|
|
11
|
+
--ui-text: #202020;
|
|
12
|
+
--ui-muted: #626262;
|
|
13
|
+
--ui-border: #e5e5e5;
|
|
14
|
+
--ui-control: #d4d4d4;
|
|
15
|
+
--ui-hover: #f2f2f2;
|
|
16
|
+
--ui-selected: #edf6fa;
|
|
17
|
+
--ui-shadow: 0 8px 28px #00000014, 0 1px 3px #00000012;
|
|
18
|
+
}
|
|
19
|
+
* {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
}
|
|
22
|
+
body {
|
|
23
|
+
margin: 0;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
button,
|
|
27
|
+
input,
|
|
28
|
+
textarea,
|
|
29
|
+
select {
|
|
30
|
+
font: inherit;
|
|
31
|
+
}
|
|
32
|
+
button,
|
|
33
|
+
select {
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
button {
|
|
37
|
+
border: 1px solid var(--ui-control);
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
color: inherit;
|
|
40
|
+
background: #fff;
|
|
41
|
+
padding: 7px 10px;
|
|
42
|
+
}
|
|
43
|
+
button:hover:not(:disabled) {
|
|
44
|
+
background: #f1f1f1;
|
|
45
|
+
border-color: #aaa;
|
|
46
|
+
}
|
|
47
|
+
button:disabled {
|
|
48
|
+
cursor: default;
|
|
49
|
+
color: #767676;
|
|
50
|
+
}
|
|
51
|
+
:focus-visible {
|
|
52
|
+
outline: 2px solid var(--accent);
|
|
53
|
+
outline-offset: 3px;
|
|
54
|
+
}
|
|
55
|
+
input,
|
|
56
|
+
textarea,
|
|
57
|
+
select {
|
|
58
|
+
width: 100%;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
border: 1px solid #d4d4d4;
|
|
61
|
+
border-radius: 4px;
|
|
62
|
+
background: #fff;
|
|
63
|
+
color: var(--ui-text);
|
|
64
|
+
padding: 7px 9px;
|
|
65
|
+
}
|
|
66
|
+
input:hover,
|
|
67
|
+
textarea:hover,
|
|
68
|
+
select:hover {
|
|
69
|
+
border-color: #aaa;
|
|
70
|
+
}
|
|
71
|
+
textarea {
|
|
72
|
+
resize: vertical;
|
|
73
|
+
min-height: 100px;
|
|
74
|
+
line-height: 1.55;
|
|
75
|
+
}
|
|
76
|
+
h1,
|
|
77
|
+
h2,
|
|
78
|
+
p {
|
|
79
|
+
margin: 0;
|
|
80
|
+
}
|
|
81
|
+
h2 {
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
}
|
|
85
|
+
.primary {
|
|
86
|
+
background: #202020;
|
|
87
|
+
color: white;
|
|
88
|
+
border-color: #202020;
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
}
|
|
91
|
+
.primary:hover:not(:disabled) {
|
|
92
|
+
background: #383838;
|
|
93
|
+
border-color: #383838;
|
|
94
|
+
}
|
|
95
|
+
.sr-only {
|
|
96
|
+
position: absolute;
|
|
97
|
+
width: 1px;
|
|
98
|
+
height: 1px;
|
|
99
|
+
padding: 0;
|
|
100
|
+
margin: -1px;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
clip: rect(0, 0, 0, 0);
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
border: 0;
|
|
105
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
.canvas {
|
|
2
|
+
width: 100%;
|
|
3
|
+
aspect-ratio: var(--page-ratio);
|
|
4
|
+
background: var(--slide-bg);
|
|
5
|
+
position: relative;
|
|
6
|
+
outline: 1px solid #dedede;
|
|
7
|
+
box-shadow: 0 7px 26px #00000012;
|
|
8
|
+
container-type: inline-size;
|
|
9
|
+
}
|
|
10
|
+
.presentation-canvas .slide-component:hover {
|
|
11
|
+
outline: 0;
|
|
12
|
+
}
|
|
13
|
+
.presentation-canvas .component-surface {
|
|
14
|
+
cursor: default;
|
|
15
|
+
touch-action: auto;
|
|
16
|
+
}
|
|
17
|
+
.canvas .component-heading {
|
|
18
|
+
font-family: var(--vector-heading-font);
|
|
19
|
+
}
|
|
20
|
+
.canvas {
|
|
21
|
+
font-family: var(--vector-body-font);
|
|
22
|
+
}
|
|
23
|
+
.slide-component {
|
|
24
|
+
position: absolute;
|
|
25
|
+
background: var(--slide-bg);
|
|
26
|
+
color: var(--slide-ink);
|
|
27
|
+
border: 1px solid transparent;
|
|
28
|
+
--component-accent: var(--slide-accent);
|
|
29
|
+
--component-context: var(--slide-context);
|
|
30
|
+
}
|
|
31
|
+
.slide-component:hover {
|
|
32
|
+
outline: 1px solid #a9a9a9;
|
|
33
|
+
}
|
|
34
|
+
.slide-component.selected {
|
|
35
|
+
outline: 1px solid var(--accent);
|
|
36
|
+
}
|
|
37
|
+
.slide-component:has(.component-surface:focus-visible) {
|
|
38
|
+
outline: 2px solid var(--accent);
|
|
39
|
+
}
|
|
40
|
+
.component-surface {
|
|
41
|
+
border: 0;
|
|
42
|
+
border-radius: 0;
|
|
43
|
+
color: inherit;
|
|
44
|
+
background: transparent;
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
padding: 1.4cqw;
|
|
48
|
+
text-align: inherit;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
align-items: stretch;
|
|
53
|
+
cursor: move;
|
|
54
|
+
touch-action: none;
|
|
55
|
+
}
|
|
56
|
+
.component-surface:focus-visible {
|
|
57
|
+
outline: 0;
|
|
58
|
+
}
|
|
59
|
+
.component-surface:hover:not(:disabled) {
|
|
60
|
+
border-color: transparent;
|
|
61
|
+
background: transparent;
|
|
62
|
+
}
|
|
63
|
+
.custom-visual .component-surface {
|
|
64
|
+
padding: 0;
|
|
65
|
+
}
|
|
66
|
+
.custom-visual.border-none.rule-none {
|
|
67
|
+
border: 0;
|
|
68
|
+
}
|
|
69
|
+
.custom-visual-art {
|
|
70
|
+
display: block;
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
user-select: none;
|
|
75
|
+
}
|
|
76
|
+
.custom-visual-art.fit-contain {
|
|
77
|
+
object-fit: contain;
|
|
78
|
+
}
|
|
79
|
+
.custom-visual-art.fit-cover {
|
|
80
|
+
object-fit: cover;
|
|
81
|
+
}
|
|
82
|
+
.custom-visual-art.fit-stretch {
|
|
83
|
+
object-fit: fill;
|
|
84
|
+
}
|
|
85
|
+
.custom-vector-art {
|
|
86
|
+
display: block;
|
|
87
|
+
width: 100%;
|
|
88
|
+
height: 100%;
|
|
89
|
+
overflow: visible;
|
|
90
|
+
}
|
|
91
|
+
.custom-vector-art.editing .vector-element {
|
|
92
|
+
pointer-events: all;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
}
|
|
95
|
+
.custom-vector-art.editing .vector-element.selected {
|
|
96
|
+
outline: 2px solid #0974e9;
|
|
97
|
+
outline-offset: 3px;
|
|
98
|
+
filter: drop-shadow(0 0 5px #0974e980);
|
|
99
|
+
}
|
|
100
|
+
.vector-handles circle {
|
|
101
|
+
fill: #ffffff;
|
|
102
|
+
stroke: #0974e9;
|
|
103
|
+
stroke-width: 3;
|
|
104
|
+
vector-effect: non-scaling-stroke;
|
|
105
|
+
cursor: crosshair;
|
|
106
|
+
}
|
|
107
|
+
.component-heading {
|
|
108
|
+
font-size: max(1.7cqw, 11px);
|
|
109
|
+
font-weight: 500;
|
|
110
|
+
line-height: 1.3;
|
|
111
|
+
}
|
|
112
|
+
.title-prominent .component-heading {
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
font-size: 2.2cqw;
|
|
115
|
+
}
|
|
116
|
+
.component-intent {
|
|
117
|
+
display: block;
|
|
118
|
+
color: var(--slide-muted);
|
|
119
|
+
font-size: max(1.7cqw, 11px);
|
|
120
|
+
margin-top: 0.7cqw;
|
|
121
|
+
line-height: 1.5;
|
|
122
|
+
cursor: text;
|
|
123
|
+
}
|
|
124
|
+
.inline-intent-editor {
|
|
125
|
+
position: absolute;
|
|
126
|
+
inset: 0;
|
|
127
|
+
z-index: 3;
|
|
128
|
+
width: 100%;
|
|
129
|
+
height: max(100%, 8.5cqw);
|
|
130
|
+
min-height: calc(1.5em + 2.8cqw + 2px);
|
|
131
|
+
margin: 0;
|
|
132
|
+
padding: 1.4cqw;
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
border: 1px solid var(--slide-accent);
|
|
135
|
+
border-radius: 2px;
|
|
136
|
+
outline: 0;
|
|
137
|
+
background: var(--slide-bg);
|
|
138
|
+
color: var(--slide-ink);
|
|
139
|
+
font: inherit;
|
|
140
|
+
line-height: 1.5;
|
|
141
|
+
resize: none;
|
|
142
|
+
}
|
|
143
|
+
.kind-text-block.role-title:not(.custom-visual) .component-surface {
|
|
144
|
+
justify-content: flex-end;
|
|
145
|
+
padding: 0.5cqw 0;
|
|
146
|
+
}
|
|
147
|
+
.kind-text-block.role-title .component-heading {
|
|
148
|
+
font-size: max(2.6cqw, 20px);
|
|
149
|
+
font-weight: 600;
|
|
150
|
+
line-height: 1.18;
|
|
151
|
+
}
|
|
152
|
+
.kind-text-block.role-title .component-intent {
|
|
153
|
+
font-size: max(1.7cqw, 11px);
|
|
154
|
+
margin-top: 0.4cqw;
|
|
155
|
+
}
|
|
156
|
+
.kind-text-block.role-footnote:not(.custom-visual) .component-surface {
|
|
157
|
+
padding: 1cqw 0;
|
|
158
|
+
}
|
|
159
|
+
.kind-text-block.role-footnote .component-heading {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
.kind-text-block.role-footnote .component-intent {
|
|
163
|
+
font-size: max(1.7cqw, 11px);
|
|
164
|
+
margin: 0;
|
|
165
|
+
}
|
|
166
|
+
.slide-page-number {
|
|
167
|
+
position: absolute;
|
|
168
|
+
z-index: var(--component-layers);
|
|
169
|
+
right: 5.833333%;
|
|
170
|
+
bottom: 2.2%;
|
|
171
|
+
font-size: max(1.5cqw, 11px);
|
|
172
|
+
font-variant-numeric: tabular-nums;
|
|
173
|
+
line-height: 1;
|
|
174
|
+
}
|
|
175
|
+
.color-muted {
|
|
176
|
+
color: var(--slide-muted);
|
|
177
|
+
}
|
|
178
|
+
.color-accent {
|
|
179
|
+
color: var(--slide-accent);
|
|
180
|
+
}
|
|
181
|
+
.border-outline {
|
|
182
|
+
border: 1px solid var(--slide-context);
|
|
183
|
+
}
|
|
184
|
+
.border-filled {
|
|
185
|
+
background: color-mix(in srgb, var(--slide-context) 22%, var(--slide-bg));
|
|
186
|
+
}
|
|
187
|
+
.rule-top {
|
|
188
|
+
border-top: 1px solid var(--slide-context);
|
|
189
|
+
}
|
|
190
|
+
.rule-bottom {
|
|
191
|
+
border-bottom: 1px solid var(--slide-context);
|
|
192
|
+
}
|
|
193
|
+
.resize-handle {
|
|
194
|
+
position: absolute;
|
|
195
|
+
width: 24px;
|
|
196
|
+
height: 24px;
|
|
197
|
+
padding: 0;
|
|
198
|
+
border: 0;
|
|
199
|
+
background: transparent;
|
|
200
|
+
touch-action: none;
|
|
201
|
+
z-index: 2;
|
|
202
|
+
}
|
|
203
|
+
.resize-handle::after {
|
|
204
|
+
position: absolute;
|
|
205
|
+
top: 9px;
|
|
206
|
+
left: 9px;
|
|
207
|
+
width: 6px;
|
|
208
|
+
height: 6px;
|
|
209
|
+
border: 1px solid var(--accent);
|
|
210
|
+
background: white;
|
|
211
|
+
content: "";
|
|
212
|
+
}
|
|
213
|
+
.resize-handle:hover:not(:disabled) {
|
|
214
|
+
border-color: transparent;
|
|
215
|
+
background: transparent;
|
|
216
|
+
}
|
|
217
|
+
.resize-nw {
|
|
218
|
+
top: -12px;
|
|
219
|
+
left: -12px;
|
|
220
|
+
cursor: nwse-resize;
|
|
221
|
+
}
|
|
222
|
+
.resize-ne {
|
|
223
|
+
top: -12px;
|
|
224
|
+
right: -12px;
|
|
225
|
+
cursor: nesw-resize;
|
|
226
|
+
}
|
|
227
|
+
.resize-sw {
|
|
228
|
+
bottom: -12px;
|
|
229
|
+
left: -12px;
|
|
230
|
+
cursor: nesw-resize;
|
|
231
|
+
}
|
|
232
|
+
.resize-se {
|
|
233
|
+
right: -12px;
|
|
234
|
+
bottom: -12px;
|
|
235
|
+
cursor: nwse-resize;
|
|
236
|
+
}
|
|
237
|
+
.guide {
|
|
238
|
+
position: absolute;
|
|
239
|
+
pointer-events: none;
|
|
240
|
+
z-index: calc(var(--component-layers) + 1);
|
|
241
|
+
}
|
|
242
|
+
.guide-x {
|
|
243
|
+
top: 0;
|
|
244
|
+
bottom: 0;
|
|
245
|
+
border-left: 1px solid var(--accent);
|
|
246
|
+
}
|
|
247
|
+
.guide-y {
|
|
248
|
+
left: 0;
|
|
249
|
+
right: 0;
|
|
250
|
+
border-top: 1px solid var(--accent);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.kind-text-block:not(.custom-visual) .component-surface {
|
|
254
|
+
padding: 0;
|
|
255
|
+
justify-content: flex-start;
|
|
256
|
+
}
|
|
257
|
+
.text-block-content {
|
|
258
|
+
white-space: pre-wrap;
|
|
259
|
+
overflow-wrap: anywhere;
|
|
260
|
+
flex: none;
|
|
261
|
+
width: 100%;
|
|
262
|
+
}
|
|
263
|
+
.kind-text-block:not(.custom-visual) .inline-intent-editor {
|
|
264
|
+
padding: 0;
|
|
265
|
+
text-align: inherit;
|
|
266
|
+
min-height: 100%;
|
|
267
|
+
height: 100%;
|
|
268
|
+
}
|