@poodle64/ui 2026.10.26 → 2026.10.28
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 +138 -169
- package/dist/components/ui/app-dialog/app-dialog.svelte +2 -1
- package/dist/components/ui/app-shell/app-nav.svelte +15 -2
- package/dist/components/ui/app-shell/app-shell.svelte +251 -97
- package/dist/components/ui/app-shell/app-shell.svelte.d.ts +15 -27
- package/dist/components/ui/app-shell/column-scope.svelte +15 -0
- package/dist/components/ui/app-shell/column-scope.svelte.d.ts +12 -0
- package/dist/components/ui/app-shell/index.d.ts +4 -2
- package/dist/components/ui/app-shell/index.js +3 -1
- package/dist/components/ui/app-shell/page-aside.svelte +58 -0
- package/dist/components/ui/app-shell/page-aside.svelte.d.ts +30 -0
- package/dist/components/ui/app-shell/page-pane.svelte +73 -0
- package/dist/components/ui/app-shell/page-pane.svelte.d.ts +37 -0
- package/dist/components/ui/app-shell/page.d.ts +77 -0
- package/dist/components/ui/app-shell/page.js +45 -0
- package/dist/components/ui/app-shell/types.d.ts +18 -2
- package/dist/components/ui/collection-detail/collection-detail.svelte +1 -1
- package/dist/components/ui/content-skeleton/content-skeleton.svelte +1 -1
- package/dist/components/ui/context-column/context-column.svelte +47 -146
- package/dist/components/ui/context-column/context-column.svelte.d.ts +3 -5
- package/dist/components/ui/document-reader/document-reader.svelte +56 -24
- package/dist/components/ui/document-reader/document-reader.svelte.d.ts +5 -4
- package/dist/components/ui/page-section/page-section.svelte +1 -1
- package/dist/components/ui/panel/panel.svelte +1 -0
- package/dist/components/ui/settings-shell/settings-shell.svelte +67 -81
- package/dist/components/ui/settings-shell/settings-shell.svelte.d.ts +21 -60
- package/dist/styles.css +267 -119
- package/package.json +1 -1
- package/registry/component-map.json +22 -15
- package/registry/component-map.md +8 -7
- package/dist/components/ui/app-shell/measure.d.ts +0 -28
- package/dist/components/ui/app-shell/measure.js +0 -21
- package/dist/components/ui/app-shell/padding.d.ts +0 -27
- package/dist/components/ui/app-shell/padding.js +0 -27
- package/dist/components/ui/list-shell/index.d.ts +0 -2
- package/dist/components/ui/list-shell/index.js +0 -2
- package/dist/components/ui/list-shell/list-shell.svelte +0 -85
- package/dist/components/ui/list-shell/list-shell.svelte.d.ts +0 -39
package/dist/styles.css
CHANGED
|
@@ -352,21 +352,24 @@
|
|
|
352
352
|
--ds-shell-rail-width: 15.5rem;
|
|
353
353
|
--ds-shell-rail-width-collapsed: 3.5rem;
|
|
354
354
|
|
|
355
|
-
/* ──
|
|
356
|
-
The
|
|
357
|
-
for the
|
|
358
|
-
declaration
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
wants a different count retunes the property.
|
|
355
|
+
/* ── Page types ───────────────────────────────────────────────────────────
|
|
356
|
+
The widths a route's page type (AppShell `pageType`) lays its page out
|
|
357
|
+
with, as custom properties for the reason the rail's width is one: an app
|
|
358
|
+
retunes one in one declaration, and never writes a width of its own.
|
|
359
|
+
|
|
360
|
+
The reading column is in `rem`, not `ch`: `ch` resolves against each
|
|
361
|
+
element's own font size, so blocks of 20, 16 and 14px in one column ended
|
|
362
|
+
at three right edges. 44rem is about 75 characters of body text in the
|
|
363
|
+
household face. The pane is the rail's own width, open and folded, so the
|
|
364
|
+
two columns at the left edge read as one system.
|
|
366
365
|
──────────────────────────────────────────────────────────────────────── */
|
|
367
|
-
--ds-
|
|
368
|
-
--ds-
|
|
369
|
-
--ds-
|
|
366
|
+
--ds-page-reading: 44rem;
|
|
367
|
+
--ds-page-aside: 20rem;
|
|
368
|
+
--ds-page-aside-tool: clamp(20rem, 24cqi, 28rem);
|
|
369
|
+
--ds-page-aside-gap: 3rem;
|
|
370
|
+
--ds-page-pane: var(--ds-shell-rail-width);
|
|
371
|
+
--ds-page-pane-folded: var(--ds-shell-rail-width-collapsed);
|
|
372
|
+
--ds-page-panel: 52rem;
|
|
370
373
|
}
|
|
371
374
|
|
|
372
375
|
/* ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -673,8 +676,8 @@
|
|
|
673
676
|
`auto` too (CSSOM's "if one axis is visible and the other is not, the
|
|
674
677
|
visible one becomes auto" rule), so a row wider than the nav — a long
|
|
675
678
|
label, a wide badge — got its own sideways scrollbar inside the drawer.
|
|
676
|
-
The drawer scrolls vertically only; a row that doesn't fit
|
|
677
|
-
(`.ds-nav-
|
|
679
|
+
The drawer scrolls vertically only; a row that doesn't fit wraps its label
|
|
680
|
+
(`.ds-nav-label`) rather than
|
|
678
681
|
growing a second scroll axis on top of the menu's own (design-system#111). */
|
|
679
682
|
overflow-x: hidden;
|
|
680
683
|
}
|
|
@@ -787,12 +790,31 @@
|
|
|
787
790
|
color: var(--ds-nav-ink-muted);
|
|
788
791
|
}
|
|
789
792
|
|
|
793
|
+
/* The label is the content: it wraps, never truncates, and the badge and the
|
|
794
|
+
chevron keep their own size (a chip that does not fit costs the label a
|
|
795
|
+
line, not its letters). `anywhere` also breaks a single word wider than the
|
|
796
|
+
rail. */
|
|
797
|
+
.ds-nav-label {
|
|
798
|
+
min-width: 0;
|
|
799
|
+
white-space: normal;
|
|
800
|
+
overflow-wrap: anywhere;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/* The icon form: a pill the size of its glyph, no text to collide. */
|
|
804
|
+
.ds-nav-badge[data-icon] {
|
|
805
|
+
display: inline-grid;
|
|
806
|
+
place-items: center;
|
|
807
|
+
padding: 0.1875rem 0.375rem;
|
|
808
|
+
color: var(--ds-nav-ink-muted);
|
|
809
|
+
}
|
|
810
|
+
|
|
790
811
|
/* A count badge is small text on a tint, so it carries the 4.5:1 text floor
|
|
791
812
|
with the least margin of anything in the nav — and it was the worst of the
|
|
792
813
|
three (#11): 1.73:1 under a warm amber, and 3.72:1 even on the package
|
|
793
814
|
default, because it sits on the active row's tint AND its own. Same fix,
|
|
794
815
|
same reason: the ink is the chrome's, the brand stays in the chip. */
|
|
795
816
|
.ds-nav-badge {
|
|
817
|
+
flex: none;
|
|
796
818
|
margin-left: auto;
|
|
797
819
|
border-radius: 9999px;
|
|
798
820
|
padding: 0 0.375rem;
|
|
@@ -931,64 +953,6 @@
|
|
|
931
953
|
padding-inline: calc((var(--ds-shell-rail-width-collapsed) - 1.5rem - 1.125rem) / 2) 0.625rem;
|
|
932
954
|
}
|
|
933
955
|
|
|
934
|
-
/* The settings destination's two panes (SettingsShell).
|
|
935
|
-
|
|
936
|
-
Only the SHAPE is here; the list's width, tint and rule are utilities on the
|
|
937
|
-
AppNav element itself, because AppNav declares `flex-1` there and a
|
|
938
|
-
base-layer `flex: none` would lose to it by layer order rather than by
|
|
939
|
-
position — the cascade trap recorded against `.ds-nav`'s ink. What is left is
|
|
940
|
-
the axis swap and the scroll bounding, which nothing else declares.
|
|
941
|
-
|
|
942
|
-
48rem is Tailwind's own --breakpoint-md, written literally for the reason
|
|
943
|
-
`.ds-shell-rail` writes it literally: a media query cannot read a custom
|
|
944
|
-
property, so an app that retunes md retunes this with it. */
|
|
945
|
-
.ds-settings {
|
|
946
|
-
display: flex;
|
|
947
|
-
flex-direction: column;
|
|
948
|
-
flex: 1 1 auto;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
/* `min-height: 0` is what buys the two independent scrollers, and it is
|
|
952
|
-
deliberately NOT set below md. A flex item is floored at its content height
|
|
953
|
-
unless it is allowed to shrink past it, so without this neither pane ever
|
|
954
|
-
scrolls and the whole content area does instead. Below md that floor is
|
|
955
|
-
exactly what is wanted: the list stacks above the content and the page
|
|
956
|
-
scrolls as one, which is the only sane arrangement on a phone — two nested
|
|
957
|
-
scrollers at 375px is the sideways-scroll hazard this package already carries
|
|
958
|
-
a gate for. */
|
|
959
|
-
@media (min-width: 48rem) {
|
|
960
|
-
.ds-settings {
|
|
961
|
-
flex-direction: row;
|
|
962
|
-
min-height: 0;
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
.ds-settings-pane {
|
|
967
|
-
flex: 1 1 auto;
|
|
968
|
-
min-width: 0;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
/* The pane stacks its sections itself, so a settings page writes a run of
|
|
972
|
-
Panels and no wrapper — the framing markup this surface exists to stop a
|
|
973
|
-
consumer writing. 1.25rem is the package's existing section rhythm, the same
|
|
974
|
-
gap `.ds-dialog-section` puts between adjacent sections.
|
|
975
|
-
|
|
976
|
-
A margin rule rather than `display: flex; gap`, because at md and up this box
|
|
977
|
-
is a height-bounded scroller: as a flex column its children carry
|
|
978
|
-
`flex-shrink: 1` and get squashed toward min-content before the scrollbar is
|
|
979
|
-
ever reached, so a tall section would compress instead of scrolling. Block
|
|
980
|
-
flow overflows, which is what a scroller wants. */
|
|
981
|
-
.ds-settings-pane > * + * {
|
|
982
|
-
margin-top: 1.25rem;
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
@media (min-width: 48rem) {
|
|
986
|
-
.ds-settings-pane {
|
|
987
|
-
min-height: 0;
|
|
988
|
-
overflow-y: auto;
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
|
|
992
956
|
/* A hard ceiling on the whole shell, in the one unit that names the actual
|
|
993
957
|
drawn surface rather than a percentage of an ancestor. `.ds-shell` is
|
|
994
958
|
already `flex` with `overflow-hidden` in the component markup, which
|
|
@@ -1126,58 +1090,245 @@
|
|
|
1126
1090
|
outline: none;
|
|
1127
1091
|
}
|
|
1128
1092
|
|
|
1129
|
-
/* The
|
|
1130
|
-
|
|
1093
|
+
/* ── The page frame (AppShell `pageType`, page.ts) ─────────────────────────
|
|
1094
|
+
One element, `.ds-page`, inside the scrolling content region, laid out by
|
|
1095
|
+
the type its route declared; nothing on a page sets a width, a gutter or
|
|
1096
|
+
a scroller of its own. The content region is the container every rule
|
|
1097
|
+
here queries, so a folded rail or a narrow window is read as the room the
|
|
1098
|
+
page actually has, never the window's.
|
|
1099
|
+
|
|
1100
|
+
Gutters: one scale for every type, so a page's first column starts on the
|
|
1101
|
+
same line whatever it is. A reading page breathes more above and below
|
|
1102
|
+
than a tool, which spends its height on the thing it shows. */
|
|
1103
|
+
.ds-shell-main {
|
|
1104
|
+
container: ds-page / inline-size;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
.ds-page {
|
|
1108
|
+
--ds-page-gutter: 1rem;
|
|
1109
|
+
--ds-page-block: 1.5rem;
|
|
1110
|
+
--ds-page-tool-block: 1rem;
|
|
1111
|
+
min-width: 0;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
@container ds-page (min-width: 40rem) {
|
|
1115
|
+
.ds-page {
|
|
1116
|
+
--ds-page-gutter: 2rem;
|
|
1117
|
+
--ds-page-block: 2.5rem;
|
|
1118
|
+
--ds-page-tool-block: 1.5rem;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1131
1121
|
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1122
|
+
@container ds-page (min-width: 64rem) {
|
|
1123
|
+
.ds-page {
|
|
1124
|
+
--ds-page-gutter: 3rem;
|
|
1125
|
+
--ds-page-block: 3.5rem;
|
|
1126
|
+
--ds-page-tool-block: 1.75rem;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1138
1129
|
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1130
|
+
@container ds-page (min-width: 100rem) {
|
|
1131
|
+
.ds-page {
|
|
1132
|
+
--ds-page-block: 4.5rem;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1143
1135
|
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1136
|
+
/* Reading: one centred column, and the aside beside it with the PAIR
|
|
1137
|
+
centred, so neither is pinned to an edge. Every block in the column ends
|
|
1138
|
+
at the column's one right edge. Below 66rem of region the aside follows
|
|
1139
|
+
the column; from there it stands beside it, and stays in view as the page
|
|
1140
|
+
scrolls. */
|
|
1141
|
+
.ds-page[data-page='reading'] {
|
|
1142
|
+
display: grid;
|
|
1143
|
+
grid-template-columns: minmax(0, var(--ds-page-reading));
|
|
1144
|
+
justify-content: center;
|
|
1145
|
+
align-content: start;
|
|
1146
|
+
row-gap: 2.5rem;
|
|
1147
|
+
column-gap: var(--ds-page-aside-gap);
|
|
1148
|
+
padding: var(--ds-page-block) var(--ds-page-gutter)
|
|
1149
|
+
calc(var(--ds-page-block) + env(safe-area-inset-bottom));
|
|
1150
|
+
}
|
|
1150
1151
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
which is right for the content box and wrong for a block within a page:
|
|
1156
|
-
applied to a set of left-anchored paragraphs it indented them ~207px away
|
|
1157
|
-
from their own label, measured in a consumer and reverted.
|
|
1152
|
+
@container ds-page (min-width: 66rem) {
|
|
1153
|
+
.ds-page[data-page='reading'][data-aside] {
|
|
1154
|
+
grid-template-columns: minmax(0, var(--ds-page-reading)) var(--ds-page-aside);
|
|
1155
|
+
}
|
|
1158
1156
|
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
max-width: var(--ds-shell-measure-prose);
|
|
1157
|
+
.ds-page[data-page='reading'] > .ds-page-aside {
|
|
1158
|
+
position: sticky;
|
|
1159
|
+
top: var(--ds-page-block);
|
|
1160
|
+
align-self: start;
|
|
1161
|
+
max-height: calc(100dvh - 3.5rem - 2 * var(--ds-page-block));
|
|
1162
|
+
overflow-y: auto;
|
|
1163
|
+
}
|
|
1167
1164
|
}
|
|
1168
1165
|
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1166
|
+
/* A page's own top-level blocks stack at the page rhythm, by margin rather
|
|
1167
|
+
than flex gap: where this box is a height-bounded scroller (a panel's
|
|
1168
|
+
content), flex children carry `flex-shrink: 1` and a tall one would
|
|
1169
|
+
compress instead of scrolling. */
|
|
1170
|
+
.ds-page:is([data-page='reading'], [data-page='panel']:not([data-fill])) > .ds-page-main {
|
|
1171
|
+
display: flow-root;
|
|
1172
|
+
min-width: 0;
|
|
1172
1173
|
}
|
|
1173
1174
|
|
|
1174
|
-
.ds-
|
|
1175
|
-
|
|
1176
|
-
max-width: var(--ds-shell-measure-wide);
|
|
1175
|
+
.ds-page:is([data-page='reading'], [data-page='panel']:not([data-fill])) > .ds-page-main > * + * {
|
|
1176
|
+
margin-top: 1.5rem;
|
|
1177
1177
|
}
|
|
1178
1178
|
|
|
1179
|
-
.ds-
|
|
1180
|
-
|
|
1179
|
+
.ds-page > .ds-page-aside {
|
|
1180
|
+
display: flex;
|
|
1181
|
+
flex-direction: column;
|
|
1182
|
+
gap: 1.25rem;
|
|
1183
|
+
min-width: 0;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
/* Tool and panel: the frame is exactly the content region, so the page
|
|
1187
|
+
itself never scrolls. What scrolls is the content (and the pane, and the
|
|
1188
|
+
aside, each on its own), padded inside its own scroller so the scrollbar
|
|
1189
|
+
sits at the frame's edge. */
|
|
1190
|
+
.ds-page:is([data-page='tool'], [data-page='panel']) {
|
|
1191
|
+
display: flex;
|
|
1192
|
+
flex: 1 1 0%;
|
|
1193
|
+
min-height: 0;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
.ds-page:is([data-page='tool'], [data-page='panel']) > .ds-page-main {
|
|
1197
|
+
flex: 1 1 0%;
|
|
1198
|
+
min-width: 0;
|
|
1199
|
+
min-height: 0;
|
|
1200
|
+
overflow-y: auto;
|
|
1201
|
+
padding: var(--ds-page-tool-block) var(--ds-page-gutter)
|
|
1202
|
+
calc(var(--ds-page-tool-block) + env(safe-area-inset-bottom));
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
/* A tool's blocks keep their own height, so a page taller than the frame
|
|
1206
|
+
(a dashboard) scrolls in its own box with nothing squeezed. Its fill — a
|
|
1207
|
+
block that says so (`data-fill`: a Panel that scrolls, a graph, a table,
|
|
1208
|
+
an embedded library), or the PageContainer holding one — takes the rest of
|
|
1209
|
+
the frame's height and scrolls inside itself, never shorter than 24rem.
|
|
1210
|
+
A panel page's `fill` content is its one block, filling the frame. */
|
|
1211
|
+
.ds-page[data-page='tool'] > .ds-page-main,
|
|
1212
|
+
.ds-page[data-page='panel'][data-fill] > .ds-page-main {
|
|
1213
|
+
display: flex;
|
|
1214
|
+
flex-direction: column;
|
|
1215
|
+
gap: 1.5rem;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
.ds-page[data-page='tool'] :is(.ds-page-main, [data-slot='page-container']) > * {
|
|
1219
|
+
flex-shrink: 0;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
.ds-page[data-page='tool'] :is(.ds-page-main, [data-slot='page-container']) > :is([data-fill], [data-slot='page-container']:has([data-fill])) {
|
|
1223
|
+
flex: 1 1 0%;
|
|
1224
|
+
min-height: min(100%, 24rem);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.ds-page[data-page='panel'][data-fill] > .ds-page-main > :last-child {
|
|
1228
|
+
flex: 1 1 0%;
|
|
1229
|
+
min-height: 0;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
/* Panel: the content beside the pane is left-aligned to it, each block at
|
|
1233
|
+
the panel measure; `fill` content (a transcript) takes the whole frame and
|
|
1234
|
+
keeps its own gutters. */
|
|
1235
|
+
.ds-page[data-page='panel']:not([data-fill]) > .ds-page-main > * {
|
|
1236
|
+
max-width: var(--ds-page-panel);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
.ds-page[data-page='panel'][data-fill] > .ds-page-main {
|
|
1240
|
+
padding: 0;
|
|
1241
|
+
overflow: hidden;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/* A tool's aside is a column of the frame, the pane's mirror: flush against
|
|
1245
|
+
the frame's right edge behind its own rule, so a short card in it reads as
|
|
1246
|
+
the column's head rather than a card stranded at the edge. */
|
|
1247
|
+
.ds-page:is([data-page='tool'], [data-page='panel']) > .ds-page-aside {
|
|
1248
|
+
flex: none;
|
|
1249
|
+
width: var(--ds-page-aside-tool);
|
|
1250
|
+
min-height: 0;
|
|
1251
|
+
overflow-y: auto;
|
|
1252
|
+
border-inline-start: 1px solid var(--border);
|
|
1253
|
+
padding: var(--ds-page-tool-block) 1rem
|
|
1254
|
+
calc(var(--ds-page-tool-block) + env(safe-area-inset-bottom));
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
/* The pane: flush against the rail, as wide as the rail and folded as
|
|
1258
|
+
narrow as it, its body scrolling above a pinned foot. The same body and
|
|
1259
|
+
foot fill the sheet below 64rem of window. */
|
|
1260
|
+
.ds-page-pane {
|
|
1261
|
+
display: flex;
|
|
1262
|
+
flex: none;
|
|
1263
|
+
flex-direction: column;
|
|
1264
|
+
width: var(--ds-page-pane);
|
|
1265
|
+
min-height: 0;
|
|
1266
|
+
border-inline-end: 1px solid var(--border);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
.ds-page-pane[data-folded='true'] {
|
|
1270
|
+
width: var(--ds-page-pane-folded);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
.ds-page-pane-body {
|
|
1274
|
+
flex: 1 1 auto;
|
|
1275
|
+
min-height: 0;
|
|
1276
|
+
overflow-y: auto;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
.ds-page-pane-foot {
|
|
1280
|
+
flex: none;
|
|
1281
|
+
border-top: 1px solid var(--border);
|
|
1282
|
+
padding: 0.5rem;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
.ds-page-pane-foot:empty {
|
|
1286
|
+
display: none;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
.ds-page-aside-sheet {
|
|
1290
|
+
display: flex;
|
|
1291
|
+
flex: 1 1 auto;
|
|
1292
|
+
flex-direction: column;
|
|
1293
|
+
gap: 1.25rem;
|
|
1294
|
+
min-height: 0;
|
|
1295
|
+
overflow-y: auto;
|
|
1296
|
+
padding: 1rem;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
/* DocumentReader in a shell: its contents list is the page's aside, and the
|
|
1300
|
+
disclosure above the body stands in for it wherever that aside is not
|
|
1301
|
+
beside the column. */
|
|
1302
|
+
.ds-page [data-slot='document-reader-contents'] {
|
|
1303
|
+
display: flex;
|
|
1304
|
+
flex-direction: column;
|
|
1305
|
+
gap: 0.5rem;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
.ds-page[data-aside='column'] [data-slot='document-reader-disclosure'] {
|
|
1309
|
+
display: none;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
@container ds-page (min-width: 66rem) {
|
|
1313
|
+
.ds-page[data-page='reading'][data-aside] [data-slot='document-reader-disclosure'] {
|
|
1314
|
+
display: none;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
@container ds-page not (min-width: 66rem) {
|
|
1319
|
+
.ds-page[data-page='reading'] > .ds-page-aside [data-slot='document-reader-contents'] {
|
|
1320
|
+
display: none;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
.ds-page[data-page='reading'] > .ds-page-aside:has(> [data-only-contents]) {
|
|
1324
|
+
display: none;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
/* A line of explanation a component sets (a section's description) keeps a
|
|
1329
|
+
reading length where its frame is wider than the reading column. */
|
|
1330
|
+
.ds-page:is([data-page='tool'], [data-page='panel'][data-fill]) [data-prose] {
|
|
1331
|
+
max-width: var(--ds-page-reading);
|
|
1181
1332
|
}
|
|
1182
1333
|
|
|
1183
1334
|
/* ── The prose face (design-system#32) ────────────────────────────────────
|
|
@@ -1195,10 +1346,7 @@
|
|
|
1195
1346
|
a security boundary, and a package cannot see the inputs the boundary is
|
|
1196
1347
|
protecting. The app owns the markdown-to-HTML seam and hands the result in.
|
|
1197
1348
|
|
|
1198
|
-
It carries no measure
|
|
1199
|
-
decisions, and an app composes them:
|
|
1200
|
-
|
|
1201
|
-
<div class="ds-prose ds-measure" data-measure="prose">…</div>
|
|
1349
|
+
It carries no measure: a `reading` page's column is the measure.
|
|
1202
1350
|
|
|
1203
1351
|
Nothing here reaches for a colour or a length that is not a --ds-* token,
|
|
1204
1352
|
so a palette or a retune moves the whole face with it. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poodle64/ui",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.28",
|
|
4
4
|
"description": "Household shared component layer: shadcn-svelte primitives (bits-ui) plus the composed page chrome every app builds its routes from, restyled by each app's @poodle64/design-tokens alias layer. One fix reaches every app.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"package": "@poodle64/ui",
|
|
4
|
-
"version": "2026.10.
|
|
4
|
+
"version": "2026.10.28",
|
|
5
5
|
"generatedBy": "scripts/generate-registry.mjs",
|
|
6
6
|
"source": "scripts/situations.json + package source (DO NOT EDIT the outputs by hand)",
|
|
7
|
-
"componentCount":
|
|
7
|
+
"componentCount": 75,
|
|
8
8
|
"situationCount": 20
|
|
9
9
|
},
|
|
10
10
|
"situations": [
|
|
@@ -368,14 +368,14 @@
|
|
|
368
368
|
{
|
|
369
369
|
"key": "page-frame",
|
|
370
370
|
"title": "The frame every route shares",
|
|
371
|
-
"description": "The standing chrome — the app shell and its nav, the one page-title treatment and its trail, the page's own container and sections
|
|
371
|
+
"description": "The standing chrome — the app shell and its nav, the one page-title treatment and its trail, the page's own container and sections — and the page type a route declares (`pageType`: reading, panel or tool), which decides every width, gutter and second column so a page writes none.",
|
|
372
372
|
"components": [
|
|
373
373
|
{
|
|
374
374
|
"name": "AppShell",
|
|
375
375
|
"dir": "app-shell",
|
|
376
376
|
"import": "@poodle64/ui/app-shell",
|
|
377
|
-
"props": "nav, currentPath, brandTitle?, actions?, context?, children",
|
|
378
|
-
"insteadOf": "a bespoke nav rail + header layout per app"
|
|
377
|
+
"props": "nav, currentPath, pageType?, title?, brandTitle?, actions?, context?, children",
|
|
378
|
+
"insteadOf": "a bespoke nav rail + header layout per app, and any width, padding or measure a page sets for itself"
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
"name": "ShellControls",
|
|
@@ -426,19 +426,26 @@
|
|
|
426
426
|
"props": "name, groups, current?, noun?, placeholder?, icon?, all?, pages?, separator?",
|
|
427
427
|
"insteadOf": "a bare record name beside a small chevrons button in the top bar, and a dropdown of names with no search, groups or thumbnails; the record's own page tabs come with it"
|
|
428
428
|
},
|
|
429
|
+
{
|
|
430
|
+
"name": "PagePane",
|
|
431
|
+
"dir": "app-shell",
|
|
432
|
+
"import": "@poodle64/ui/app-shell",
|
|
433
|
+
"props": "label, body, icon?, location?, remember?, fill?, foot?, folded?",
|
|
434
|
+
"insteadOf": "a module hand-rolling a second column flush against the rail (past questions, a queue, a working list), its width, fold and phone sheet"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "PageAside",
|
|
438
|
+
"dir": "app-shell",
|
|
439
|
+
"import": "@poodle64/ui/app-shell",
|
|
440
|
+
"props": "label, children?, body?, icon?",
|
|
441
|
+
"insteadOf": "a hand-placed right-hand column or a sticky sidebar beside a page's content, with its own width and breakpoint"
|
|
442
|
+
},
|
|
429
443
|
{
|
|
430
444
|
"name": "ContextColumn",
|
|
431
445
|
"dir": "context-column",
|
|
432
446
|
"import": "@poodle64/ui/context-column",
|
|
433
447
|
"props": "stats?, statsTitle?, statsInfo?, detail?, title?, subtitle?, onClose?, children?, documentPane?, ariaLabel?",
|
|
434
|
-
"insteadOf": "a hand-built right-hand <aside> with a stat card and a detail pane; on a record page, the one opened item (title, close, an inner scroll) and its DocumentPane
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
"name": "ListShell",
|
|
438
|
-
"dir": "list-shell",
|
|
439
|
-
"import": "@poodle64/ui/list-shell",
|
|
440
|
-
"props": "title, children, label?, open?, actions?",
|
|
441
|
-
"insteadOf": "a module hand-rolling its own foldable second column beside the rail — a queue, an inbox, a working list"
|
|
448
|
+
"insteadOf": "a hand-built right-hand <aside> with a stat card and a detail pane; on a record page, the one opened item (title, close, an inner scroll) and its DocumentPane; the page aside places it"
|
|
442
449
|
},
|
|
443
450
|
{
|
|
444
451
|
"name": "AppIdentity",
|
|
@@ -452,13 +459,13 @@
|
|
|
452
459
|
{
|
|
453
460
|
"key": "settings-destination",
|
|
454
461
|
"title": "The settings destination",
|
|
455
|
-
"description": "The one settings surface: a grouped section list beside the section you are reading
|
|
462
|
+
"description": "The one settings surface: a grouped section list as a panel page's pane beside the section you are reading (the route declares pageType 'panel'). Sections are grouped by whose setting it is — the person's, then the workspace's. The sections themselves are Panels.",
|
|
456
463
|
"components": [
|
|
457
464
|
{
|
|
458
465
|
"name": "SettingsShell",
|
|
459
466
|
"dir": "settings-shell",
|
|
460
467
|
"import": "@poodle64/ui/settings-shell",
|
|
461
|
-
"props": "sections, children, currentPath?, selected?, onSelect?, listLabel?",
|
|
468
|
+
"props": "sections, children, currentPath?, selected?, onSelect?, listLabel?, title?",
|
|
462
469
|
"insteadOf": "a hand-built two-pane settings layout, or a card of tab links in a grid, per app"
|
|
463
470
|
},
|
|
464
471
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @poodle64/ui — situation → component map
|
|
2
2
|
|
|
3
3
|
<!-- GENERATED by scripts/generate-registry.mjs from scripts/situations.json + package source. DO NOT EDIT. -->
|
|
4
|
-
Generated from `@poodle64/ui@2026.10.
|
|
4
|
+
Generated from `@poodle64/ui@2026.10.28`. 75 components, 20 situations.
|
|
5
5
|
|
|
6
6
|
**Read this before writing a `<div>`.** Find the SITUATION you are in below, then compose the component named for it — do not hand-build it from raw `Card` or utility classes. Import is `import { Name } from '<import path>'`. Props marked `?` are optional. This map is the retrieval step the [`frontend-design` skill] makes mandatory; the [CHI 2026 study] measured composing-from-a-registry at 95% design-system compliance against 71% for writing the CSS from a prose style guide.
|
|
7
7
|
|
|
@@ -157,11 +157,11 @@ _People, organisations, sources or any entities as nodes and their relations as
|
|
|
157
157
|
|
|
158
158
|
## The frame every route shares
|
|
159
159
|
|
|
160
|
-
_The standing chrome — the app shell and its nav, the one page-title treatment and its trail, the page's own container and sections
|
|
160
|
+
_The standing chrome — the app shell and its nav, the one page-title treatment and its trail, the page's own container and sections — and the page type a route declares (`pageType`: reading, panel or tool), which decides every width, gutter and second column so a page writes none._
|
|
161
161
|
|
|
162
162
|
| Component | Import | Key props | Reach for it instead of |
|
|
163
163
|
| --- | --- | --- | --- |
|
|
164
|
-
| `AppShell` | `@poodle64/ui/app-shell` | `nav, currentPath, brandTitle?, actions?, context?, children` | a bespoke nav rail + header layout per app |
|
|
164
|
+
| `AppShell` | `@poodle64/ui/app-shell` | `nav, currentPath, pageType?, title?, brandTitle?, actions?, context?, children` | a bespoke nav rail + header layout per app, and any width, padding or measure a page sets for itself |
|
|
165
165
|
| `ShellControls` | `@poodle64/ui/app-shell` | `children` | a scope row (entity, financial year, chart/table) hand-placed above the page body; the shell's top bar carries it |
|
|
166
166
|
| `Segmented` | `@poodle64/ui/segmented` | `value, options, label, size?` | a hand-built row of aria-pressed buttons for a small fixed choice |
|
|
167
167
|
| `PageHeader` | `@poodle64/ui/page-header` | `title?, eyebrow?, breadcrumbs?, icon?, subtitle?, info?, meta?, actions?` | a hand-written <h1> and title bar (the drift gate fails this) |
|
|
@@ -169,17 +169,18 @@ _The standing chrome — the app shell and its nav, the one page-title treatment
|
|
|
169
169
|
| `PageContainer` | `@poodle64/ui/page-container` | `children` | a per-page wrapper picking its own vertical rhythm (space-y-6, gap-10, …) |
|
|
170
170
|
| `PageSection` | `@poodle64/ui/page-section` | `title, level?, description?, count?, actions?, children?, id?` | a hand-styled section heading (an uppercase kicker, text-lg font-semibold, a display h2) and its own gap to the content under it |
|
|
171
171
|
| `RecordSwitcher` | `@poodle64/ui/record-switcher` | `name, groups, current?, noun?, placeholder?, icon?, all?, pages?, separator?` | a bare record name beside a small chevrons button in the top bar, and a dropdown of names with no search, groups or thumbnails; the record's own page tabs come with it |
|
|
172
|
-
| `
|
|
173
|
-
| `
|
|
172
|
+
| `PagePane` | `@poodle64/ui/app-shell` | `label, body, icon?, location?, remember?, fill?, foot?, folded?` | a module hand-rolling a second column flush against the rail (past questions, a queue, a working list), its width, fold and phone sheet |
|
|
173
|
+
| `PageAside` | `@poodle64/ui/app-shell` | `label, children?, body?, icon?` | a hand-placed right-hand column or a sticky sidebar beside a page's content, with its own width and breakpoint |
|
|
174
|
+
| `ContextColumn` | `@poodle64/ui/context-column` | `stats?, statsTitle?, statsInfo?, detail?, title?, subtitle?, onClose?, children?, documentPane?, ariaLabel?` | a hand-built right-hand <aside> with a stat card and a detail pane; on a record page, the one opened item (title, close, an inner scroll) and its DocumentPane; the page aside places it |
|
|
174
175
|
| `AppIdentity` | `@poodle64/ui/app-identity` | `user, workspace?, role?, entitlements?, onSignOut, onAccountSettings?, onSwitchTheme?` | a hand-rolled account/avatar dropdown wired to raw DropdownMenu.* + Avatar.* |
|
|
175
176
|
|
|
176
177
|
## The settings destination
|
|
177
178
|
|
|
178
|
-
_The one settings surface: a grouped section list beside the section you are reading
|
|
179
|
+
_The one settings surface: a grouped section list as a panel page's pane beside the section you are reading (the route declares pageType 'panel'). Sections are grouped by whose setting it is — the person's, then the workspace's. The sections themselves are Panels._
|
|
179
180
|
|
|
180
181
|
| Component | Import | Key props | Reach for it instead of |
|
|
181
182
|
| --- | --- | --- | --- |
|
|
182
|
-
| `SettingsShell` | `@poodle64/ui/settings-shell` | `sections, children, currentPath?, selected?, onSelect?, listLabel?` | a hand-built two-pane settings layout, or a card of tab links in a grid, per app |
|
|
183
|
+
| `SettingsShell` | `@poodle64/ui/settings-shell` | `sections, children, currentPath?, selected?, onSelect?, listLabel?, title?` | a hand-built two-pane settings layout, or a card of tab links in a grid, per app |
|
|
183
184
|
| `SettingsRow` | `@poodle64/ui/settings-row` | `label, description?, controlId?, children` | a hand-built label + description + control row inside a settings Panel (use Panel pad={false}) |
|
|
184
185
|
| `About` | `@poodle64/ui/about` | `name, version, description?, brand?, links?, diagnostics?, writeClipboard?` | a per-app About page or dialogue with duplicated version, links and diagnostic copying |
|
|
185
186
|
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The content measure: how wide the page body is allowed to get.
|
|
3
|
-
*
|
|
4
|
-
* A named scale rather than a width, because a width at the call site is the
|
|
5
|
-
* problem this exists to solve. Surveyed at 2560px, one consumer had six
|
|
6
|
-
* distinct caps across nine routes — `max-w-4xl` here, `max-w-[1600px]` there,
|
|
7
|
-
* a `max-w-md` form somewhere else — each written by whoever built that page,
|
|
8
|
-
* none of them wrong on its own, and no two agreeing. Between them they used
|
|
9
|
-
* 15% to 79% of the width available. A scale with four names cannot drift like
|
|
10
|
-
* that: it is one decision, taken once, in the layout.
|
|
11
|
-
*
|
|
12
|
-
* The tiers resolve through `--ds-shell-measure-*` custom properties (see
|
|
13
|
-
* `styles.css`), so an app retunes any of them in one declaration.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* - `prose` — a genuine reading measure (`40rem`, about 70 characters) for long-form running text.
|
|
17
|
-
* - `page` — everyday pages: forms, detail views, settings (`80rem`).
|
|
18
|
-
* - `wide` — indexes, card grids, tables, dashboards (`120rem`).
|
|
19
|
-
* - `full` — no cap. The default, so omitting `measure` changes nothing.
|
|
20
|
-
*
|
|
21
|
-
* The 80rem tier is `page` rather than `default` on purpose. The prop's default
|
|
22
|
-
* is `full`, and a value literally named `default` that you do NOT get by
|
|
23
|
-
* default is a trap a reader falls into once each. It is also not `standard`,
|
|
24
|
-
* which this package already retired for being a name that says nothing.
|
|
25
|
-
*/
|
|
26
|
-
export type ShellMeasure = 'prose' | 'page' | 'wide' | 'full';
|
|
27
|
-
/** Every measure, narrowest first — the order the scale is documented in. */
|
|
28
|
-
export declare const SHELL_MEASURES: readonly ["prose", "page", "wide", "full"];
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The content measure: how wide the page body is allowed to get.
|
|
3
|
-
*
|
|
4
|
-
* A named scale rather than a width, because a width at the call site is the
|
|
5
|
-
* problem this exists to solve. Surveyed at 2560px, one consumer had six
|
|
6
|
-
* distinct caps across nine routes — `max-w-4xl` here, `max-w-[1600px]` there,
|
|
7
|
-
* a `max-w-md` form somewhere else — each written by whoever built that page,
|
|
8
|
-
* none of them wrong on its own, and no two agreeing. Between them they used
|
|
9
|
-
* 15% to 79% of the width available. A scale with four names cannot drift like
|
|
10
|
-
* that: it is one decision, taken once, in the layout.
|
|
11
|
-
*
|
|
12
|
-
* The tiers resolve through `--ds-shell-measure-*` custom properties (see
|
|
13
|
-
* `styles.css`), so an app retunes any of them in one declaration.
|
|
14
|
-
*/
|
|
15
|
-
/** Every measure, narrowest first — the order the scale is documented in. */
|
|
16
|
-
export const SHELL_MEASURES = [
|
|
17
|
-
'prose',
|
|
18
|
-
'page',
|
|
19
|
-
'wide',
|
|
20
|
-
'full'
|
|
21
|
-
];
|