create-obsidian-arrow 0.5.0 → 0.5.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/README.md +7 -7
- package/cli/create.mjs +65 -0
- package/cli/detect-pm.mjs +20 -0
- package/cli/lib.mjs +117 -0
- package/cli/refresh.mjs +65 -0
- package/index.mjs +47 -204
- package/package.json +11 -2
- package/template/.husky/pre-commit +3 -2
- package/template/AGENTS.md +58 -12
- package/template/README.md +67 -31
- package/template/_gitignore +4 -1
- package/template/biome.json +7 -1
- package/template/docs/prompts/agent-setup.md +24 -20
- package/template/docs/prompts/update-existing.md +3 -3
- package/template/docs/workflow.md +11 -7
- package/template/package.json +15 -14
- package/template/src/components/DiffViewer/DiffViewer.css +41 -0
- package/template/src/components/DiffViewer/DiffViewer.ts +55 -0
- package/template/src/components/EmptyState/EmptyState.css +5 -5
- package/template/src/components/EmptyState/EmptyState.ts +5 -9
- package/template/src/utilities.css +259 -1
- package/template/src/views/DiffViewer/DiffViewerView.css +42 -0
- package/template/src/views/DiffViewer/DiffViewerView.ts +53 -0
- package/template/src/views/ExampleView/ExampleView.ts +92 -0
- package/template/stories/components/ComponentShell.stories.ts +28 -0
- package/template/stories/components/EmptyState.stories.ts +1 -0
- package/template/stories/components/LoadingState.stories.ts +1 -0
- package/template/stories/components/Toggle.stories.ts +50 -0
- package/template/stories/views/DiffViewer/DiffViewer.stories.ts +94 -0
- package/template/stories/views/EditorView.stories.ts +55 -0
- package/template/stories/views/ExampleView/ExampleView.stories.ts +15 -0
- package/template/stories/views/PanelView.stories.ts +61 -0
- package/template/stories/views/SettingsPanel/SettingsPanel.stories.ts +14 -0
- package/template/test/css-structure.test.mjs +112 -0
- package/template/test/template-footguns.test.mjs +85 -6
- package/template/test/viewer-stories.test.mjs +12 -0
- package/template/tools/router/client.ts +26 -4
- package/template/tools/router/routeToPage.ts +29 -13
- package/template/tools/sandbox/frame.ts +7 -27
- package/template/tools/sandbox/home.ts +6 -11
- package/template/tools/sandbox/layout.ts +24 -2
- package/template/tools/sandbox/sandbox.css +188 -226
- package/template/tools/sandbox/shell.ts +2 -2
- package/template/tools/sandbox/toolbar.ts +20 -9
- package/template/tools/viewer/ClassesPage.ts +7 -7
- package/template/tools/viewer/ComponentsIndex.ts +3 -3
- package/template/tools/viewer/StoryPage.ts +53 -40
- package/template/tools/viewer/TokensPage.ts +10 -10
- package/template/tools/viewer/ViewsIndex.ts +66 -0
- package/template/tools/viewer/discovery.ts +2 -0
- package/template/tools/viewer/obsidian-classes.ts +1 -1
- package/template/tools/viewer/sidebar.ts +27 -38
- package/template/tools/viewer/stories.ts +16 -2
- package/template/.github/workflows/ci.yml +0 -36
- package/template/pnpm-lock.yaml +0 -1608
- package/template/scripts/create-component.mjs +0 -101
- package/template/scripts/create-view.mjs +0 -75
- package/template/src/components/DiffViewer.ts +0 -42
- package/template/stories/DiffViewer.stories.ts +0 -75
- package/template/stories/SettingsPanel.stories.ts +0 -11
- package/template/stories/Toggle.stories.ts +0 -28
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Sandbox-only chrome. NOT
|
|
2
|
+
* Sandbox-only chrome. Uses the `oasbox-` prefix — NOT portable into plugins.
|
|
3
|
+
* For portable utilities (oas-*) see src/utilities.css.
|
|
3
4
|
*
|
|
4
5
|
* Per the arrow-js-obsidian CSS-specificity lesson, every custom rule is scoped
|
|
5
6
|
* under a container class + element type so it can't lose to Obsidian's global
|
|
@@ -21,13 +22,13 @@ body {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
/* Shell: width-control toolbar on top, pane stage below. */
|
|
24
|
-
.
|
|
25
|
+
.oasbox-shell {
|
|
25
26
|
display: flex;
|
|
26
27
|
flex-direction: column;
|
|
27
28
|
height: 100vh;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
.
|
|
31
|
+
.oasbox-toolbar {
|
|
31
32
|
display: flex;
|
|
32
33
|
align-items: center;
|
|
33
34
|
gap: var(--size-4-2);
|
|
@@ -38,28 +39,60 @@ body {
|
|
|
38
39
|
font-size: var(--font-ui-small);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
.
|
|
42
|
+
.oasbox-toolbar a.oasbox-home {
|
|
43
|
+
text-decoration: none;
|
|
44
|
+
font-size: var(--font-ui-medium);
|
|
45
|
+
line-height: 1;
|
|
46
|
+
color: var(--text-faint);
|
|
47
|
+
}
|
|
48
|
+
.oasbox-toolbar a.oasbox-home:hover {
|
|
49
|
+
color: var(--text-normal);
|
|
50
|
+
}
|
|
51
|
+
.oasbox-toolbar .oasbox-breadcrumb {
|
|
52
|
+
font-size: var(--font-ui-small);
|
|
53
|
+
font-weight: var(--font-medium);
|
|
54
|
+
color: var(--text-normal);
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
text-overflow: ellipsis;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
max-width: 240px;
|
|
59
|
+
}
|
|
60
|
+
.oasbox-toolbar .oasbox-toolbar-divider {
|
|
61
|
+
flex: 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.oasbox-toolbar .oasbox-toolbar-label {
|
|
42
65
|
font-weight: var(--font-medium);
|
|
43
66
|
}
|
|
44
67
|
|
|
45
|
-
.
|
|
68
|
+
.oasbox-toolbar .oasbox-width-range {
|
|
46
69
|
flex: 0 1 220px;
|
|
47
70
|
}
|
|
48
71
|
|
|
49
|
-
.
|
|
72
|
+
.oasbox-toolbar .oasbox-width-readout {
|
|
50
73
|
min-width: 52px;
|
|
51
74
|
font-family: var(--font-monospace);
|
|
52
75
|
color: var(--text-normal);
|
|
53
76
|
}
|
|
54
77
|
|
|
55
|
-
.
|
|
78
|
+
.oasbox-toolbar button.oasbox-preset {
|
|
56
79
|
height: var(--size-4-5);
|
|
57
80
|
padding: 0 var(--size-4-2);
|
|
58
81
|
font-size: var(--font-ui-smaller);
|
|
59
82
|
}
|
|
60
83
|
|
|
84
|
+
.oasbox-toolbar button.oasbox-theme-toggle {
|
|
85
|
+
margin-left: var(--size-4-1);
|
|
86
|
+
font-size: var(--font-ui-medium);
|
|
87
|
+
line-height: 1;
|
|
88
|
+
color: var(--text-faint);
|
|
89
|
+
}
|
|
90
|
+
.oasbox-toolbar button.oasbox-theme-toggle:hover {
|
|
91
|
+
color: var(--text-normal);
|
|
92
|
+
}
|
|
93
|
+
|
|
61
94
|
/* Stage: left-aligned so the edge drag handle resizes width 1:1. */
|
|
62
|
-
.
|
|
95
|
+
.oasbox-stage {
|
|
63
96
|
flex: 1;
|
|
64
97
|
display: flex;
|
|
65
98
|
justify-content: flex-start;
|
|
@@ -67,56 +100,40 @@ body {
|
|
|
67
100
|
background: var(--background-secondary);
|
|
68
101
|
}
|
|
69
102
|
|
|
70
|
-
|
|
103
|
+
/* Frame: fixed-width story details panel. Panel width slider controls the canvas, not this. */
|
|
104
|
+
/* Story details frame — fixed-width metadata panel, no view-header chrome. */
|
|
105
|
+
.oasbox-frame {
|
|
71
106
|
position: relative;
|
|
72
|
-
flex: 0 0
|
|
107
|
+
flex: 0 0 280px;
|
|
73
108
|
height: 100%;
|
|
74
|
-
min-width: 240px;
|
|
75
109
|
display: flex;
|
|
76
110
|
flex-direction: column;
|
|
77
111
|
background: var(--background-primary);
|
|
78
112
|
border-right: 1px solid var(--background-modifier-border);
|
|
113
|
+
overflow: hidden;
|
|
79
114
|
}
|
|
80
115
|
|
|
81
|
-
.
|
|
116
|
+
.oasbox-frame .oasbox-view-content {
|
|
82
117
|
flex: 1;
|
|
83
118
|
min-height: 0;
|
|
84
119
|
overflow-y: auto;
|
|
85
|
-
padding: var(--size-4-3);
|
|
86
120
|
}
|
|
87
121
|
|
|
88
|
-
.
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: space-between;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.oas-frame .oas-view-header-left {
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
gap: var(--size-4-2);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.oas-frame .view-header .oas-theme-toggle,
|
|
101
|
-
.oas-frame .view-header .oas-home {
|
|
102
|
-
font-size: var(--font-ui-medium);
|
|
103
|
-
line-height: 1;
|
|
104
|
-
text-decoration: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.oas-frame a.oas-open-link {
|
|
122
|
+
.oasbox-frame a.oasbox-open-link {
|
|
108
123
|
text-decoration: none;
|
|
109
124
|
display: inline-flex;
|
|
110
125
|
align-items: center;
|
|
111
126
|
}
|
|
112
127
|
|
|
113
|
-
.
|
|
128
|
+
.oasbox-frame .setting-item-control button.oasbox-recheck {
|
|
114
129
|
margin-left: var(--size-4-2);
|
|
115
130
|
font-size: var(--font-ui-smaller);
|
|
116
131
|
}
|
|
117
132
|
|
|
118
133
|
/* Drag-to-resize handle on the pane's right edge (Obsidian-like). */
|
|
119
|
-
|
|
134
|
+
/* Resize handle on the right edge of the component/view canvas. */
|
|
135
|
+
.oasbox-component-canvas .oasbox-resize-handle,
|
|
136
|
+
.oasbox-view-canvas .oasbox-resize-handle {
|
|
120
137
|
position: absolute;
|
|
121
138
|
top: 0;
|
|
122
139
|
right: 0;
|
|
@@ -125,15 +142,16 @@ body {
|
|
|
125
142
|
cursor: ew-resize;
|
|
126
143
|
}
|
|
127
144
|
|
|
128
|
-
.
|
|
145
|
+
.oasbox-component-canvas .oasbox-resize-handle:hover,
|
|
146
|
+
.oasbox-view-canvas .oasbox-resize-handle:hover {
|
|
129
147
|
background: var(--interactive-accent);
|
|
130
148
|
opacity: 0.5;
|
|
131
149
|
}
|
|
132
150
|
|
|
133
|
-
/* Component canvas —
|
|
134
|
-
.
|
|
135
|
-
|
|
136
|
-
|
|
151
|
+
/* Component canvas — width controlled by panel slider (story details frame is fixed). */
|
|
152
|
+
.oasbox-component-canvas {
|
|
153
|
+
position: relative;
|
|
154
|
+
flex: 0 0 auto;
|
|
137
155
|
min-height: 0;
|
|
138
156
|
display: flex;
|
|
139
157
|
align-items: center;
|
|
@@ -143,231 +161,217 @@ body {
|
|
|
143
161
|
background: var(--background-secondary);
|
|
144
162
|
}
|
|
145
163
|
|
|
146
|
-
/*
|
|
147
|
-
.
|
|
148
|
-
border-
|
|
149
|
-
border-left: 3px solid var(--background-modifier-border-hover);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.oas-card.is-expanded {
|
|
153
|
-
border-left-color: var(--interactive-accent);
|
|
164
|
+
/* Gallery: vertical stack of cards below the heading */
|
|
165
|
+
.oasbox-gallery {
|
|
166
|
+
border-top: 1px solid var(--background-modifier-border);
|
|
154
167
|
}
|
|
155
168
|
|
|
156
|
-
.
|
|
169
|
+
/* Component viewer: sidebar (first child of the stage) + story page chrome. */
|
|
170
|
+
.oasbox-shell nav.oasbox-sidebar {
|
|
171
|
+
flex: 0 0 220px;
|
|
157
172
|
display: flex;
|
|
158
|
-
|
|
159
|
-
justify-content: space-between;
|
|
160
|
-
gap: var(--size-4-2);
|
|
161
|
-
padding: var(--size-4-3) var(--size-4-3);
|
|
162
|
-
cursor: pointer;
|
|
163
|
-
font-size: var(--font-ui-small);
|
|
164
|
-
font-weight: var(--font-semibold);
|
|
165
|
-
color: var(--text-normal);
|
|
166
|
-
user-select: none;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.oas-card-header:hover {
|
|
170
|
-
background: var(--background-modifier-hover);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.oas-card-title {
|
|
174
|
-
flex: 1;
|
|
175
|
-
min-width: 0;
|
|
173
|
+
flex-direction: column;
|
|
176
174
|
overflow: hidden;
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
background: var(--background-secondary);
|
|
176
|
+
border-right: 1px solid var(--background-modifier-border);
|
|
177
|
+
transition: flex-basis 180ms ease;
|
|
178
|
+
position: relative;
|
|
179
179
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
180
|
+
.oasbox-shell nav.oasbox-sidebar.is-collapsed {
|
|
181
|
+
flex-basis: 28px;
|
|
182
|
+
}
|
|
183
|
+
.oasbox-sidebar-toggle {
|
|
184
|
+
position: absolute;
|
|
185
|
+
top: var(--size-4-1);
|
|
186
|
+
right: var(--size-4-1);
|
|
187
|
+
z-index: 1;
|
|
185
188
|
font-size: var(--font-ui-medium);
|
|
186
|
-
|
|
189
|
+
color: var(--text-faint);
|
|
190
|
+
padding: var(--size-2-1);
|
|
187
191
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
transform: rotate(90deg);
|
|
192
|
+
.oasbox-sidebar-toggle:hover {
|
|
193
|
+
color: var(--text-normal);
|
|
191
194
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
195
|
+
.oasbox-sidebar-content {
|
|
196
|
+
flex: 1;
|
|
197
|
+
overflow-y: auto;
|
|
198
|
+
padding: var(--size-4-3) 0;
|
|
199
|
+
opacity: 1;
|
|
200
|
+
transition: opacity 120ms ease;
|
|
201
|
+
}
|
|
202
|
+
.oasbox-sidebar.is-collapsed .oasbox-sidebar-content {
|
|
203
|
+
opacity: 0;
|
|
204
|
+
pointer-events: none;
|
|
196
205
|
}
|
|
197
206
|
|
|
198
|
-
.
|
|
207
|
+
.oasbox-shell nav.oasbox-sidebar a.oasbox-nav-item {
|
|
199
208
|
display: block;
|
|
209
|
+
text-decoration: none;
|
|
200
210
|
}
|
|
201
211
|
|
|
202
|
-
.
|
|
203
|
-
|
|
204
|
-
padding: var(--size-4-2) var(--size-4-3);
|
|
205
|
-
color: var(--text-muted);
|
|
212
|
+
.oasbox-shell nav.oasbox-sidebar .oasbox-nav-invalid {
|
|
213
|
+
color: var(--text-error);
|
|
206
214
|
font-size: var(--font-ui-smaller);
|
|
207
215
|
}
|
|
208
216
|
|
|
209
|
-
|
|
210
|
-
margin: 0;
|
|
211
|
-
padding: 0 var(--size-4-3) var(--size-4-2);
|
|
212
|
-
color: var(--text-muted);
|
|
213
|
-
font-size: var(--font-ui-smaller);
|
|
214
|
-
}
|
|
217
|
+
/* ── Story details panel ─────────────────────────────────────── */
|
|
215
218
|
|
|
216
|
-
.
|
|
219
|
+
.oasbox-frame .oasbox-story {
|
|
217
220
|
display: flex;
|
|
218
|
-
|
|
219
|
-
flex-wrap: wrap;
|
|
220
|
-
gap: var(--size-4-1);
|
|
221
|
-
padding: var(--size-4-1) var(--size-4-3);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.oas-card-children-label {
|
|
225
|
-
color: var(--text-faint);
|
|
226
|
-
font-size: var(--font-ui-smaller);
|
|
221
|
+
flex-direction: column;
|
|
227
222
|
}
|
|
228
223
|
|
|
229
|
-
|
|
230
|
-
|
|
224
|
+
/* Story header: title + description */
|
|
225
|
+
.oasbox-frame .oasbox-story-header {
|
|
226
|
+
padding: var(--size-4-3) var(--size-4-3) var(--size-4-2);
|
|
227
|
+
border-bottom: 1px solid var(--background-modifier-border);
|
|
231
228
|
}
|
|
232
229
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
230
|
+
.oasbox-frame .oasbox-story-title {
|
|
231
|
+
font-size: var(--font-ui-small);
|
|
232
|
+
font-weight: var(--font-semibold);
|
|
233
|
+
color: var(--text-normal);
|
|
234
|
+
overflow-wrap: break-word;
|
|
235
|
+
word-break: break-word;
|
|
236
|
+
line-height: 1.4;
|
|
236
237
|
}
|
|
237
238
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
display: inline-flex;
|
|
241
|
-
align-items: center;
|
|
242
|
-
padding: 1px var(--size-4-1);
|
|
243
|
-
border-radius: var(--radius-s);
|
|
239
|
+
.oasbox-frame .oasbox-story-desc {
|
|
240
|
+
margin-top: var(--size-4-1);
|
|
244
241
|
font-size: var(--font-ui-smaller);
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.oas-badge.is-live {
|
|
251
|
-
background: var(--background-modifier-success);
|
|
252
|
-
color: var(--text-success);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.oas-badge.is-draft {
|
|
256
|
-
background: var(--background-modifier-hover);
|
|
257
|
-
color: var(--text-faint);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/* Component viewer: sidebar (first child of the stage) + story page chrome. */
|
|
261
|
-
.oas-shell nav.oas-sidebar {
|
|
262
|
-
flex: 0 0 220px;
|
|
263
|
-
overflow-y: auto;
|
|
264
|
-
padding: var(--size-4-3) 0;
|
|
265
|
-
background: var(--background-secondary);
|
|
266
|
-
border-right: 1px solid var(--background-modifier-border);
|
|
242
|
+
color: var(--text-muted);
|
|
243
|
+
overflow-wrap: break-word;
|
|
244
|
+
line-height: 1.5;
|
|
267
245
|
}
|
|
268
246
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
247
|
+
/* Labeled section: references, variants, etc. */
|
|
248
|
+
.oasbox-frame .oasbox-story-section {
|
|
249
|
+
padding: var(--size-4-2) var(--size-4-3);
|
|
250
|
+
border-bottom: 1px solid var(--background-modifier-border);
|
|
251
|
+
display: flex;
|
|
252
|
+
flex-direction: column;
|
|
253
|
+
gap: var(--size-4-1);
|
|
272
254
|
}
|
|
273
255
|
|
|
274
|
-
.
|
|
275
|
-
color: var(--text-error);
|
|
256
|
+
.oasbox-frame .oasbox-section-label {
|
|
276
257
|
font-size: var(--font-ui-smaller);
|
|
258
|
+
font-weight: var(--font-semibold);
|
|
259
|
+
color: var(--text-faint);
|
|
260
|
+
text-transform: uppercase;
|
|
261
|
+
letter-spacing: 0.04em;
|
|
262
|
+
margin-bottom: var(--size-2-1);
|
|
277
263
|
}
|
|
278
264
|
|
|
279
|
-
|
|
265
|
+
/* Path rows — label | truncated path | Copy button */
|
|
266
|
+
.oasbox-frame .oasbox-story-path {
|
|
280
267
|
display: flex;
|
|
281
|
-
|
|
268
|
+
align-items: center;
|
|
282
269
|
gap: var(--size-4-1);
|
|
283
|
-
|
|
270
|
+
min-width: 0;
|
|
284
271
|
}
|
|
285
272
|
|
|
286
|
-
.
|
|
287
|
-
|
|
288
|
-
align-items: center;
|
|
289
|
-
gap: var(--size-4-2);
|
|
273
|
+
.oasbox-frame .oasbox-path-label {
|
|
274
|
+
flex-shrink: 0;
|
|
290
275
|
font-size: var(--font-ui-smaller);
|
|
291
|
-
color: var(--text-
|
|
276
|
+
color: var(--text-faint);
|
|
277
|
+
min-width: 52px;
|
|
292
278
|
}
|
|
293
279
|
|
|
294
|
-
|
|
280
|
+
/* Path code truncates with ellipsis; full path shown in title tooltip. */
|
|
281
|
+
.oasbox-frame .oasbox-path-code {
|
|
282
|
+
flex: 1;
|
|
283
|
+
min-width: 0;
|
|
284
|
+
overflow: hidden;
|
|
285
|
+
text-overflow: ellipsis;
|
|
286
|
+
white-space: nowrap;
|
|
295
287
|
font-family: var(--font-monospace);
|
|
288
|
+
font-size: var(--font-ui-smaller);
|
|
296
289
|
color: var(--text-normal);
|
|
297
290
|
}
|
|
298
291
|
|
|
299
|
-
.
|
|
300
|
-
|
|
301
|
-
|
|
292
|
+
.oasbox-frame button.oasbox-copy {
|
|
293
|
+
flex-shrink: 0;
|
|
294
|
+
height: var(--size-4-4);
|
|
295
|
+
padding: 0 var(--size-4-1);
|
|
302
296
|
font-size: var(--font-ui-smaller);
|
|
303
297
|
}
|
|
304
298
|
|
|
305
|
-
|
|
299
|
+
/* Variant tabs */
|
|
300
|
+
.oasbox-frame .oasbox-variants {
|
|
306
301
|
display: flex;
|
|
307
302
|
flex-wrap: wrap;
|
|
308
303
|
gap: var(--size-4-1);
|
|
309
|
-
margin: var(--size-4-2) 0;
|
|
310
304
|
}
|
|
311
305
|
|
|
312
|
-
.
|
|
313
|
-
padding: var(--size-
|
|
306
|
+
.oasbox-frame a.oasbox-variant {
|
|
307
|
+
padding: var(--size-2-1) var(--size-4-2);
|
|
314
308
|
border-radius: var(--radius-s);
|
|
315
309
|
background: var(--background-modifier-hover);
|
|
316
310
|
color: var(--text-normal);
|
|
317
311
|
font-size: var(--font-ui-smaller);
|
|
318
312
|
text-decoration: none;
|
|
313
|
+
overflow-wrap: anywhere;
|
|
319
314
|
}
|
|
320
315
|
|
|
321
|
-
.
|
|
316
|
+
.oasbox-frame a.oasbox-variant.is-active {
|
|
322
317
|
background: var(--interactive-accent);
|
|
323
318
|
color: var(--text-on-accent);
|
|
324
319
|
}
|
|
325
320
|
|
|
326
|
-
|
|
327
|
-
|
|
321
|
+
/* Notes and children */
|
|
322
|
+
.oasbox-frame .oasbox-story-notes {
|
|
323
|
+
padding: var(--size-4-2) var(--size-4-3);
|
|
328
324
|
color: var(--text-muted);
|
|
329
325
|
font-size: var(--font-ui-small);
|
|
326
|
+
overflow-wrap: break-word;
|
|
327
|
+
border-bottom: 1px solid var(--background-modifier-border);
|
|
330
328
|
}
|
|
331
329
|
|
|
332
|
-
.
|
|
330
|
+
.oasbox-frame .oasbox-story-children {
|
|
333
331
|
display: flex;
|
|
334
332
|
flex-wrap: wrap;
|
|
335
333
|
gap: var(--size-4-2);
|
|
336
|
-
|
|
334
|
+
padding: var(--size-4-2) var(--size-4-3);
|
|
337
335
|
}
|
|
338
336
|
|
|
339
|
-
.
|
|
337
|
+
.oasbox-frame a.oasbox-child {
|
|
340
338
|
color: var(--text-accent);
|
|
341
339
|
font-size: var(--font-ui-small);
|
|
342
340
|
text-decoration: none;
|
|
343
341
|
}
|
|
344
342
|
|
|
345
|
-
.
|
|
343
|
+
.oasbox-frame .oasbox-child-missing {
|
|
346
344
|
color: var(--text-error);
|
|
347
345
|
font-size: var(--font-ui-small);
|
|
348
346
|
}
|
|
349
347
|
|
|
350
|
-
.
|
|
351
|
-
|
|
352
|
-
padding-top: var(--size-4-3);
|
|
353
|
-
border-top: 1px solid var(--background-modifier-border);
|
|
348
|
+
.oasbox-frame .oasbox-story-missing {
|
|
349
|
+
color: var(--text-error);
|
|
354
350
|
}
|
|
355
351
|
|
|
356
|
-
|
|
357
|
-
|
|
352
|
+
/* kind: "view" canvas — fills remaining stage width at full height. */
|
|
353
|
+
/* View canvas — width controlled by panel slider, full height. */
|
|
354
|
+
.oasbox-view-canvas {
|
|
355
|
+
position: relative;
|
|
356
|
+
flex: 0 0 auto;
|
|
357
|
+
display: flex;
|
|
358
|
+
flex-direction: column;
|
|
359
|
+
min-height: 0;
|
|
360
|
+
overflow: hidden;
|
|
361
|
+
background: var(--background-primary);
|
|
358
362
|
}
|
|
359
363
|
|
|
360
364
|
/* Reference index: token rows and class previews. */
|
|
361
|
-
.
|
|
365
|
+
.oasbox-frame input.oasbox-token-filter {
|
|
362
366
|
width: 100%;
|
|
363
367
|
margin: var(--size-4-2) 0 var(--size-4-3) 0;
|
|
364
368
|
}
|
|
365
369
|
|
|
366
|
-
.
|
|
370
|
+
.oasbox-frame .oasbox-token-group {
|
|
367
371
|
margin-bottom: var(--size-4-3);
|
|
368
372
|
}
|
|
369
373
|
|
|
370
|
-
.
|
|
374
|
+
.oasbox-frame .oasbox-token-row {
|
|
371
375
|
display: grid;
|
|
372
376
|
grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 48px auto;
|
|
373
377
|
align-items: center;
|
|
@@ -377,17 +381,17 @@ body {
|
|
|
377
381
|
font-size: var(--font-ui-smaller);
|
|
378
382
|
}
|
|
379
383
|
|
|
380
|
-
.
|
|
384
|
+
.oasbox-frame .oasbox-token-name {
|
|
381
385
|
font-family: var(--font-monospace);
|
|
382
386
|
overflow-wrap: anywhere;
|
|
383
387
|
}
|
|
384
388
|
|
|
385
|
-
.
|
|
389
|
+
.oasbox-frame .oasbox-token-value {
|
|
386
390
|
color: var(--text-muted);
|
|
387
391
|
overflow-wrap: anywhere;
|
|
388
392
|
}
|
|
389
393
|
|
|
390
|
-
.
|
|
394
|
+
.oasbox-frame .oasbox-swatch {
|
|
391
395
|
width: var(--size-4-4);
|
|
392
396
|
height: var(--size-4-4);
|
|
393
397
|
border-radius: var(--radius-s);
|
|
@@ -395,7 +399,7 @@ body {
|
|
|
395
399
|
justify-self: start;
|
|
396
400
|
}
|
|
397
401
|
|
|
398
|
-
.
|
|
402
|
+
.oasbox-frame .oasbox-sizebar {
|
|
399
403
|
height: var(--size-4-2);
|
|
400
404
|
max-width: 48px;
|
|
401
405
|
background: var(--text-accent);
|
|
@@ -403,19 +407,19 @@ body {
|
|
|
403
407
|
justify-self: start;
|
|
404
408
|
}
|
|
405
409
|
|
|
406
|
-
.
|
|
410
|
+
.oasbox-frame .oasbox-swatch-none {
|
|
407
411
|
width: var(--size-4-4);
|
|
408
412
|
}
|
|
409
413
|
|
|
410
|
-
.
|
|
414
|
+
.oasbox-frame .oasbox-class-group {
|
|
411
415
|
margin-bottom: var(--size-4-4);
|
|
412
416
|
}
|
|
413
417
|
|
|
414
|
-
.
|
|
418
|
+
.oasbox-frame .oasbox-class-entry {
|
|
415
419
|
margin: var(--size-4-3) 0;
|
|
416
420
|
}
|
|
417
421
|
|
|
418
|
-
.
|
|
422
|
+
.oasbox-frame .oasbox-class-head {
|
|
419
423
|
display: flex;
|
|
420
424
|
align-items: center;
|
|
421
425
|
gap: var(--size-4-2);
|
|
@@ -423,7 +427,7 @@ body {
|
|
|
423
427
|
font-size: var(--font-ui-small);
|
|
424
428
|
}
|
|
425
429
|
|
|
426
|
-
.
|
|
430
|
+
.oasbox-frame .oasbox-class-when {
|
|
427
431
|
margin: var(--size-4-1) 0;
|
|
428
432
|
color: var(--text-muted);
|
|
429
433
|
font-size: var(--font-ui-smaller);
|
|
@@ -431,57 +435,15 @@ body {
|
|
|
431
435
|
|
|
432
436
|
/* transform creates a containing block, so position:fixed descendants (e.g.
|
|
433
437
|
.modal) stay inside the preview box instead of covering the viewport. */
|
|
434
|
-
.
|
|
438
|
+
.oasbox-frame .oasbox-class-preview {
|
|
435
439
|
padding: var(--size-4-3);
|
|
436
440
|
border: 1px dashed var(--background-modifier-border);
|
|
437
441
|
border-radius: var(--radius-m);
|
|
438
442
|
transform: translate(0);
|
|
439
443
|
}
|
|
440
444
|
|
|
441
|
-
.
|
|
445
|
+
.oasbox-frame .modal.oasbox-modal-preview {
|
|
442
446
|
position: static;
|
|
443
447
|
width: auto;
|
|
444
448
|
max-width: 100%;
|
|
445
449
|
}
|
|
446
|
-
|
|
447
|
-
/* DiffViewer — CodeMirror 6 MergeView container */
|
|
448
|
-
.oas-diff-viewer {
|
|
449
|
-
height: 480px;
|
|
450
|
-
overflow: hidden;
|
|
451
|
-
border: 1px solid var(--background-modifier-border);
|
|
452
|
-
border-radius: var(--radius-m);
|
|
453
|
-
font-family: var(--font-monospace);
|
|
454
|
-
font-size: var(--font-ui-small);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.oas-diff-viewer .cm-mergeView {
|
|
458
|
-
height: 100%;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.oas-diff-viewer .cm-editor {
|
|
462
|
-
height: 100%;
|
|
463
|
-
background: var(--background-primary);
|
|
464
|
-
color: var(--text-normal);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.oas-diff-viewer .cm-scroller {
|
|
468
|
-
overflow: auto;
|
|
469
|
-
font-family: var(--font-monospace);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.oas-diff-viewer .cm-mergeViewEditor {
|
|
473
|
-
border-right: 1px solid var(--background-modifier-border);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.oas-diff-viewer .cm-mergeViewEditor:last-child {
|
|
477
|
-
border-right: none;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
.oas-diff-viewer .cm-deletedChunk {
|
|
481
|
-
background: color-mix(in srgb, var(--color-red) 15%, transparent);
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.oas-diff-viewer .cm-insertedChunk,
|
|
485
|
-
.oas-diff-viewer .cm-changedLine {
|
|
486
|
-
background: color-mix(in srgb, var(--color-green) 12%, transparent);
|
|
487
|
-
}
|
|
@@ -8,8 +8,8 @@ import { Toolbar } from "./toolbar";
|
|
|
8
8
|
* chrome — only the pane contents port into a plugin.
|
|
9
9
|
*/
|
|
10
10
|
export const Shell = (content: ArrowExpression): ArrowTemplate => html`
|
|
11
|
-
<div class="
|
|
11
|
+
<div class="oasbox-shell">
|
|
12
12
|
${Toolbar()}
|
|
13
|
-
<div class="
|
|
13
|
+
<div class="oasbox-stage">${content}</div>
|
|
14
14
|
</div>
|
|
15
15
|
`;
|