@sdxc/ui 2026.11.11 → 2026.11.17
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 +114 -61
- package/dist/app/app-shell-toggle.d.ts +2 -0
- package/dist/app/app-shell-toggle.js +5 -2
- package/dist/app/app-shell.d.ts +25 -1
- package/dist/app/app-shell.js +73 -38
- package/dist/app/auto-refresh.d.ts +2 -0
- package/dist/app/auto-refresh.js +3 -3
- package/dist/app/behaviors/refresh-schedule.d.ts +8 -3
- package/dist/app/behaviors/refresh-schedule.js +4 -3
- package/dist/app/board.d.ts +123 -0
- package/dist/app/board.js +224 -0
- package/dist/app/chart.d.ts +2 -2
- package/dist/app/chart.js +7 -3
- package/dist/app/check-runs.d.ts +116 -0
- package/dist/app/check-runs.js +201 -0
- package/dist/app/code-view.d.ts +172 -0
- package/dist/app/code-view.js +414 -0
- package/dist/app/command-palette.d.ts +38 -3
- package/dist/app/command-palette.js +53 -5
- package/dist/app/contribution-graph.d.ts +106 -0
- package/dist/app/contribution-graph.js +289 -0
- package/dist/app/detail-sheet.d.ts +7 -0
- package/dist/app/detail-sheet.js +7 -7
- package/dist/app/diff.d.ts +200 -0
- package/dist/app/diff.js +702 -0
- package/dist/app/filter-bar.d.ts +20 -0
- package/dist/app/filter-bar.js +35 -15
- package/dist/app/filter-menu.d.ts +144 -0
- package/dist/app/filter-menu.js +480 -0
- package/dist/app/gantt.d.ts +108 -0
- package/dist/app/gantt.js +420 -0
- package/dist/app/index.d.ts +20 -0
- package/dist/app/index.js +20 -0
- package/dist/app/log-viewer.d.ts +120 -0
- package/dist/app/log-viewer.js +384 -0
- package/dist/app/merge-box.d.ts +97 -0
- package/dist/app/merge-box.js +227 -0
- package/dist/app/mixins/app-shell-controls.d.ts +4 -1
- package/dist/app/mixins/app-shell-controls.js +64 -4
- package/dist/app/mixins/auto-refresh.d.ts +5 -2
- package/dist/app/mixins/auto-refresh.js +9 -3
- package/dist/app/mixins/close-popover-on-submit.d.ts +16 -0
- package/dist/app/mixins/close-popover-on-submit.js +32 -0
- package/dist/app/mixins/code-view-selection.d.ts +60 -0
- package/dist/app/mixins/code-view-selection.js +276 -0
- package/dist/app/mixins/command-palette.d.ts +15 -4
- package/dist/app/mixins/command-palette.js +94 -6
- package/dist/app/mixins/contribution-graph-keys.d.ts +19 -0
- package/dist/app/mixins/contribution-graph-keys.js +155 -0
- package/dist/app/mixins/diff-interactions.d.ts +72 -0
- package/dist/app/mixins/diff-interactions.js +269 -0
- package/dist/app/mixins/filter-menu-keys.d.ts +41 -0
- package/dist/app/mixins/filter-menu-keys.js +91 -0
- package/dist/app/mixins/gantt-today.d.ts +17 -0
- package/dist/app/mixins/gantt-today.js +50 -0
- package/dist/app/mixins/log-viewer.d.ts +29 -0
- package/dist/app/mixins/log-viewer.js +347 -0
- package/dist/app/mixins/optimistic-toggle-sync.d.ts +5 -0
- package/dist/app/mixins/optimistic-toggle-sync.js +25 -1
- package/dist/app/mixins/save-bar-sync.d.ts +7 -1
- package/dist/app/mixins/save-bar-sync.js +23 -4
- package/dist/app/mixins/save-status-sync.js +23 -1
- package/dist/app/mixins/split-view.js +1 -1
- package/dist/app/mixins/submit-on-close.d.ts +17 -0
- package/dist/app/mixins/submit-on-close.js +52 -0
- package/dist/app/mixins/tree-filter.d.ts +44 -0
- package/dist/app/mixins/tree-filter.js +111 -0
- package/dist/app/mixins/tree-navigation.d.ts +50 -0
- package/dist/app/mixins/tree-navigation.js +216 -0
- package/dist/app/optimistic-toggle.d.ts +8 -0
- package/dist/app/optimistic-toggle.js +3 -2
- package/dist/app/page-header.d.ts +18 -3
- package/dist/app/page-header.js +105 -50
- package/dist/app/profile-picker.d.ts +47 -0
- package/dist/app/profile-picker.js +104 -0
- package/dist/app/review-thread.d.ts +115 -0
- package/dist/app/review-thread.js +116 -0
- package/dist/app/save-bar.d.ts +5 -0
- package/dist/app/save-bar.js +1 -1
- package/dist/app/save-status.js +1 -1
- package/dist/app/settings-layout.d.ts +5 -0
- package/dist/app/settings-layout.js +5 -5
- package/dist/app/skeleton.d.ts +9 -0
- package/dist/app/skeleton.js +28 -0
- package/dist/app/split-view.d.ts +4 -0
- package/dist/app/split-view.js +3 -3
- package/dist/app/styles/code-tokens.d.ts +24 -0
- package/dist/app/styles/code-tokens.js +47 -0
- package/dist/app/tab-bar.d.ts +59 -0
- package/dist/app/tab-bar.js +111 -0
- package/dist/app/tree.d.ts +111 -14
- package/dist/app/tree.js +202 -15
- package/dist/app/utils/ansi.d.ts +55 -0
- package/dist/app/utils/ansi.js +157 -0
- package/dist/app/utils/diff-rows.d.ts +82 -0
- package/dist/app/utils/diff-rows.js +209 -0
- package/dist/app/utils/fuzzy-path.d.ts +58 -0
- package/dist/app/utils/fuzzy-path.js +202 -0
- package/dist/app/utils/line-range.d.ts +48 -0
- package/dist/app/utils/line-range.js +61 -0
- package/dist/app/utils/log-lines.d.ts +107 -0
- package/dist/app/utils/log-lines.js +170 -0
- package/dist/app/utils/tree-filter.d.ts +19 -0
- package/dist/app/utils/tree-filter.js +26 -0
- package/dist/app/view-options.d.ts +2 -0
- package/dist/app/view-options.js +2 -2
- package/dist/chat/activity.d.ts +72 -0
- package/dist/chat/activity.js +184 -0
- package/dist/chat/composer-submit.d.ts +38 -0
- package/dist/chat/composer-submit.js +44 -0
- package/dist/chat/composer.d.ts +47 -0
- package/dist/chat/composer.js +100 -0
- package/dist/chat/index.d.ts +6 -0
- package/dist/chat/index.js +6 -0
- package/dist/chat/mixins/composer-send.d.ts +32 -0
- package/dist/chat/mixins/composer-send.js +121 -0
- package/dist/chat/mixins/reveal-stream.d.ts +68 -0
- package/dist/chat/mixins/reveal-stream.js +184 -0
- package/dist/chat/mixins/stream-target.d.ts +18 -0
- package/dist/chat/mixins/stream-target.js +38 -0
- package/dist/components/button.js +7 -1
- package/dist/components/character-count.d.ts +44 -0
- package/dist/components/character-count.js +68 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/label-chip.d.ts +42 -0
- package/dist/components/label-chip.js +86 -0
- package/dist/components/property-list.d.ts +9 -2
- package/dist/components/property-list.js +37 -10
- package/dist/components/textarea.js +6 -1
- package/dist/components/timeline.d.ts +62 -5
- package/dist/components/timeline.js +124 -5
- package/dist/docs/code-block.js +8 -31
- package/dist/docs/file-tree.js +3 -48
- package/dist/landing/case-study.d.ts +79 -0
- package/dist/landing/case-study.js +162 -0
- package/dist/landing/contributor-wall.d.ts +72 -0
- package/dist/landing/contributor-wall.js +129 -0
- package/dist/landing/countdown.d.ts +88 -0
- package/dist/landing/countdown.js +91 -0
- package/dist/landing/episode-player.d.ts +87 -0
- package/dist/landing/episode-player.js +113 -0
- package/dist/landing/faq-band.d.ts +3 -2
- package/dist/landing/faq-band.js +4 -3
- package/dist/landing/index.d.ts +7 -0
- package/dist/landing/index.js +7 -0
- package/dist/landing/landing-header.js +15 -4
- package/dist/landing/mixins/countdown-tick.d.ts +29 -0
- package/dist/landing/mixins/countdown-tick.js +65 -0
- package/dist/landing/mixins/usage-estimate-live.d.ts +32 -0
- package/dist/landing/mixins/usage-estimate-live.js +120 -0
- package/dist/landing/phone-frame.d.ts +2 -1
- package/dist/landing/price-list.d.ts +68 -0
- package/dist/landing/price-list.js +125 -0
- package/dist/landing/scroll-scene.d.ts +59 -0
- package/dist/landing/scroll-scene.js +70 -0
- package/dist/landing/sponsor-wall.d.ts +30 -6
- package/dist/landing/sponsor-wall.js +70 -14
- package/dist/landing/typed-terminal.d.ts +24 -6
- package/dist/landing/typed-terminal.js +22 -14
- package/dist/landing/usage-estimate.d.ts +127 -0
- package/dist/landing/usage-estimate.js +164 -0
- package/dist/landing/utils/countdown.d.ts +33 -0
- package/dist/landing/utils/countdown.js +42 -0
- package/dist/landing/utils/pause-toggle.d.ts +2 -1
- package/dist/mixins/character-count.d.ts +62 -0
- package/dist/mixins/character-count.js +139 -0
- package/dist/mixins/index.d.ts +6 -2
- package/dist/mixins/index.js +6 -2
- package/dist/mixins/invoker-fields.d.ts +18 -0
- package/dist/mixins/invoker-fields.js +60 -0
- package/dist/mixins/media-sync.d.ts +58 -0
- package/dist/mixins/media-sync.js +102 -0
- package/dist/mixins/menu-keys.d.ts +11 -0
- package/dist/mixins/menu-keys.js +79 -70
- package/dist/mixins/sortable.d.ts +96 -0
- package/dist/mixins/sortable.js +433 -0
- package/dist/utils/code-lines.d.ts +26 -0
- package/dist/utils/code-lines.js +29 -0
- package/dist/utils/file-icon.d.ts +31 -0
- package/dist/utils/file-icon.js +60 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/write-cookie.d.ts +15 -15
- package/dist/utils/write-cookie.js +10 -16
- package/dist/video/episode-list.d.ts +48 -0
- package/dist/video/episode-list.js +161 -0
- package/dist/video/index.d.ts +15 -0
- package/dist/video/index.js +15 -0
- package/dist/video/mixins/video-player-sync.d.ts +27 -0
- package/dist/video/mixins/video-player-sync.js +413 -0
- package/dist/video/mixins/video-shelf-steps.d.ts +20 -0
- package/dist/video/mixins/video-shelf-steps.js +79 -0
- package/dist/video/title-hero.d.ts +51 -0
- package/dist/video/title-hero.js +170 -0
- package/dist/video/utils/timeline.d.ts +55 -0
- package/dist/video/utils/timeline.js +90 -0
- package/dist/video/video-card.d.ts +51 -0
- package/dist/video/video-card.js +135 -0
- package/dist/video/video-player.d.ts +261 -0
- package/dist/video/video-player.js +927 -0
- package/dist/video/video-shelf.d.ts +58 -0
- package/dist/video/video-shelf.js +155 -0
- package/package.json +6 -3
package/dist/app/save-bar.js
CHANGED
|
@@ -28,7 +28,7 @@ export const SaveBar = clientEntry("@sdxc/ui/app/save-bar#SaveBar", function Sav
|
|
|
28
28
|
return () => {
|
|
29
29
|
let { form, labels } = handle.props;
|
|
30
30
|
return (_jsxs("div", { "data-slot": "save-bar", hidden: true, mix: [
|
|
31
|
-
saveBarSync({ form, message: labels.message }),
|
|
31
|
+
saveBarSync({ form, message: labels.message, leave: labels.leave }),
|
|
32
32
|
sticky(),
|
|
33
33
|
hstack({ gap: 3, align: "center" }),
|
|
34
34
|
raw({ insetBlockEnd: "1rem", flexWrap: "wrap", zIndex: 10 }),
|
package/dist/app/save-status.js
CHANGED
|
@@ -41,7 +41,7 @@ export const SaveStatus = clientEntry("@sdxc/ui/app/save-status#SaveStatus", fun
|
|
|
41
41
|
savedMs: handle.props.savedMs ?? DEFAULT_SAVED_MS,
|
|
42
42
|
decayMs,
|
|
43
43
|
}),
|
|
44
|
-
hstack({ gap: 2, align: "
|
|
44
|
+
hstack({ gap: 2, align: "baseline" }),
|
|
45
45
|
text("sm"),
|
|
46
46
|
nowrap(),
|
|
47
47
|
tabularNums(),
|
|
@@ -46,6 +46,11 @@ export declare namespace SettingsLayout {
|
|
|
46
46
|
page?: "index" | "section";
|
|
47
47
|
/** Where the narrow back link returns to: the settings index route. */
|
|
48
48
|
backHref?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The named frame the section links and the back link load into (`data-rmx-target`), for
|
|
51
|
+
* a layout drawn inside that frame, so switching sections reloads it alone.
|
|
52
|
+
*/
|
|
53
|
+
frame?: string;
|
|
49
54
|
labels: Labels;
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -35,7 +35,7 @@ const NARROW = `@container ${LAYOUT_CONTAINER} (max-width: 47.999rem)`;
|
|
|
35
35
|
*/
|
|
36
36
|
export function SettingsLayout(handle) {
|
|
37
37
|
return () => {
|
|
38
|
-
let { sections, page: pageProp, backHref, labels, children, mix, ...rest } = handle.props;
|
|
38
|
+
let { sections, page: pageProp, backHref, frame, labels, children, mix, ...rest } = handle.props;
|
|
39
39
|
let page = pageProp ?? DEFAULT_PAGE;
|
|
40
40
|
let hasNav = sections !== undefined;
|
|
41
41
|
let isIndex = page === "index";
|
|
@@ -64,11 +64,11 @@ export function SettingsLayout(handle) {
|
|
|
64
64
|
alignSelf: "start",
|
|
65
65
|
},
|
|
66
66
|
}),
|
|
67
|
-
], children: sections.map((group) => (_jsx(SettingsNavGroup, { group: group }))) })) : null, _jsxs("div", { "data-slot": "settings-content", mix: [
|
|
67
|
+
], children: sections.map((group) => (_jsx(SettingsNavGroup, { group: group, frame: frame }))) })) : null, _jsxs("div", { "data-slot": "settings-content", mix: [
|
|
68
68
|
vstack({ gap: 8, align: "stretch" }),
|
|
69
69
|
minIs(0),
|
|
70
70
|
raw({ [NARROW]: { display: hideNarrowContent ? "none" : "flex" } }),
|
|
71
|
-
], children: [!isIndex && backHref ? (_jsxs("a", { href: backHref, "data-slot": "settings-back", mix: [
|
|
71
|
+
], children: [!isIndex && backHref ? (_jsxs("a", { href: backHref, "data-rmx-target": frame, "data-slot": "settings-back", mix: [
|
|
72
72
|
hstack({ gap: 1, align: "center" }),
|
|
73
73
|
raw({ alignSelf: "start", [WIDE]: { display: "none" } }),
|
|
74
74
|
text("sm"),
|
|
@@ -86,9 +86,9 @@ export function SettingsLayout(handle) {
|
|
|
86
86
|
*/
|
|
87
87
|
function SettingsNavGroup(handle) {
|
|
88
88
|
return () => {
|
|
89
|
-
let { group } = handle.props;
|
|
89
|
+
let { group, frame } = handle.props;
|
|
90
90
|
let headingId = group.label ? `${handle.id}-label` : undefined;
|
|
91
|
-
return (_jsxs("div", { mix: [vstack({ gap: 1, align: "stretch" })], children: [group.label ? (_jsx("p", { id: headingId, mix: [pi(2.5), text("xs"), weight("medium"), fg("neutral.muted")], children: group.label })) : null, _jsx("ul", { "aria-labelledby": headingId, mix: [vstack({ gap: 0.5, align: "stretch" }), listStyle(), m(0), p(0)], children: group.items.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, "aria-current": item.current ? "page" : undefined, "data-slot": "settings-nav-item", mix: [
|
|
91
|
+
return (_jsxs("div", { mix: [vstack({ gap: 1, align: "stretch" })], children: [group.label ? (_jsx("p", { id: headingId, mix: [pi(2.5), text("xs"), weight("medium"), fg("neutral.muted")], children: group.label })) : null, _jsx("ul", { "aria-labelledby": headingId, mix: [vstack({ gap: 0.5, align: "stretch" }), listStyle(), m(0), p(0)], children: group.items.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, "data-rmx-target": frame, "aria-current": item.current ? "page" : undefined, "data-slot": "settings-nav-item", mix: [
|
|
92
92
|
hstack({ gap: 2, align: "center" }),
|
|
93
93
|
pi(2.5),
|
|
94
94
|
rounded("md"),
|
package/dist/app/skeleton.d.ts
CHANGED
|
@@ -46,6 +46,14 @@ export declare namespace Skeleton {
|
|
|
46
46
|
/** Draws the chart band under the value, as a card with a sparkline has. */
|
|
47
47
|
chart?: boolean;
|
|
48
48
|
}
|
|
49
|
+
/** Props accepted by {@link Skeleton.Text}. */
|
|
50
|
+
interface TextProps extends TagProps<"span"> {
|
|
51
|
+
/**
|
|
52
|
+
* Draws one bar over the whole box instead of one per wrapped line, for an inline-flex
|
|
53
|
+
* box such as a badge or a button. @default false
|
|
54
|
+
*/
|
|
55
|
+
block?: boolean;
|
|
56
|
+
}
|
|
49
57
|
/** Props accepted by {@link Skeleton.List}. */
|
|
50
58
|
interface ListProps extends TagProps<"div">, Labelled {
|
|
51
59
|
/** Placeholder rows. Default: `5`. */
|
|
@@ -76,4 +84,5 @@ export declare namespace Skeleton {
|
|
|
76
84
|
var Table: (handle: Handle<Skeleton.TableProps>) => () => import("remix/component").RemixElement;
|
|
77
85
|
var Stat: (handle: Handle<Skeleton.StatProps>) => () => import("remix/component").RemixElement;
|
|
78
86
|
var List: (handle: Handle<Skeleton.ListProps>) => () => import("remix/component").RemixElement;
|
|
87
|
+
var Text: (handle: Handle<Skeleton.TextProps>) => () => import("remix/component").RemixElement;
|
|
79
88
|
}
|
package/dist/app/skeleton.js
CHANGED
|
@@ -183,3 +183,31 @@ Skeleton.List = function SkeletonList(handle) {
|
|
|
183
183
|
], children: [avatar ? (_jsx("span", { mix: [shrink(0), raw({ display: "inline-flex" })], children: _jsx(SkeletonBar, { width: "2rem", height: "2rem", round: true }) })) : null, _jsxs("span", { mix: [flex(), flexCol(), gap(2), grow()], children: [_jsx(SkeletonBar, { width: BAR_WIDTHS[row % BAR_WIDTHS.length] }), lines === 2 ? (_jsx(SkeletonBar, { width: BAR_WIDTHS[(row + 2) % BAR_WIDTHS.length], height: "0.625rem" })) : null] })] }, row))) }));
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
|
+
/**
|
|
187
|
+
* Lays out real content unseen and paints a bar over each line it wraps to, so a placeholder
|
|
188
|
+
* takes exactly the content's size at every width: a name that wraps on a phone wraps in its
|
|
189
|
+
* placeholder too. Hidden from assistive technology.
|
|
190
|
+
*
|
|
191
|
+
* @param handle Runtime handle carrying the host `<span>`'s props.
|
|
192
|
+
* @returns The render function producing the placeholder's markup.
|
|
193
|
+
* @example
|
|
194
|
+
* <p><Skeleton.Text>{person.name}</Skeleton.Text></p>
|
|
195
|
+
* @example
|
|
196
|
+
* <Skeleton.Text block><Badge>Follows you</Badge></Skeleton.Text>
|
|
197
|
+
*/
|
|
198
|
+
Skeleton.Text = function SkeletonText(handle) {
|
|
199
|
+
return () => {
|
|
200
|
+
let { block = false, children, mix, ...rest } = handle.props;
|
|
201
|
+
return (_jsx("span", { ...rest, "data-slot": "skeleton-text", mix: mergeMix([
|
|
202
|
+
attrs({ "aria-hidden": DEFAULT_ARIA_HIDDEN }),
|
|
203
|
+
raw({
|
|
204
|
+
borderRadius: block ? "9999px" : "var(--ui-radius-sm, 0.25rem)",
|
|
205
|
+
boxDecorationBreak: "clone",
|
|
206
|
+
WebkitBoxDecorationBreak: "clone",
|
|
207
|
+
userSelect: "none",
|
|
208
|
+
}),
|
|
209
|
+
block ? raw({ display: "inline-flex" }) : raw({}),
|
|
210
|
+
bg("neutral.border"),
|
|
211
|
+
], mix), children: _jsx("span", { mix: [raw({ visibility: "hidden", display: block ? "contents" : "inline" })], children: children }) }));
|
|
212
|
+
};
|
|
213
|
+
};
|
package/dist/app/split-view.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ export declare namespace SplitView {
|
|
|
50
50
|
active?: Pane;
|
|
51
51
|
/** The list's URL; below 48rem the detail links back to it. */
|
|
52
52
|
backHref?: string;
|
|
53
|
+
/** The named frame the back link loads into (`data-rmx-target`), for a view inside one. */
|
|
54
|
+
frame?: string;
|
|
53
55
|
/** The remembered split, from {@link readSplitViewLayout}. */
|
|
54
56
|
layout?: Layout;
|
|
55
57
|
/**
|
|
@@ -58,6 +60,8 @@ export declare namespace SplitView {
|
|
|
58
60
|
* @default "ui-split-view"
|
|
59
61
|
*/
|
|
60
62
|
cookie?: string;
|
|
63
|
+
/** The path the layout cookie is sent under, such as one app's own prefix. @default "/" */
|
|
64
|
+
cookiePath?: string;
|
|
61
65
|
/**
|
|
62
66
|
* Where j/k answer: `"page"` anywhere, `"view"` only while focus is inside the view.
|
|
63
67
|
*
|
package/dist/app/split-view.js
CHANGED
|
@@ -142,10 +142,10 @@ export const SplitViewKeys = clientEntry("@sdxc/ui/app/split-view#SplitViewKeys"
|
|
|
142
142
|
*/
|
|
143
143
|
export function SplitView(handle) {
|
|
144
144
|
return () => {
|
|
145
|
-
let { id, sidebar, rail, list, detail, empty, active, backHref, layout, cookie, keys, labels, mix, ...rest } = handle.props;
|
|
145
|
+
let { id, sidebar, rail, list, detail, empty, active, backHref, frame, layout, cookie, cookiePath, keys, labels, mix, ...rest } = handle.props;
|
|
146
146
|
let hasDetail = detail !== null && detail !== undefined && detail !== false;
|
|
147
147
|
let ids = { sidebar: `${id}-sidebar`, list: `${id}-list`, detail: `${id}-detail` };
|
|
148
|
-
return (_jsxs("div", { id: id, "data-split-view": true, "data-slot": "split-view", "data-cookie": cookie ?? SPLIT_VIEW_COOKIE, "data-collapsed": (layout?.collapsed ?? []).join(" "), "data-active": active ?? (hasDetail ? "detail" : "list"), ...rest, mix: mergeMix([container(CONTAINER), is("full"), bs("full"), raw({ minBlockSize: 0 })], mix), children: [_jsxs(Resizable, { "data-resizable-group": true, mix: [
|
|
148
|
+
return (_jsxs("div", { id: id, "data-split-view": true, "data-slot": "split-view", "data-cookie": cookie ?? SPLIT_VIEW_COOKIE, "data-cookie-path": cookiePath, "data-collapsed": (layout?.collapsed ?? []).join(" "), "data-active": active ?? (hasDetail ? "detail" : "list"), ...rest, mix: mergeMix([container(CONTAINER), is("full"), bs("full"), raw({ minBlockSize: 0 })], mix), children: [_jsxs(Resizable, { "data-resizable-group": true, mix: [
|
|
149
149
|
bs("full"),
|
|
150
150
|
rounded("none"),
|
|
151
151
|
border({ color: "transparent", width: 0 }),
|
|
@@ -177,7 +177,7 @@ export function SplitView(handle) {
|
|
|
177
177
|
[whileRoot('[data-active="detail"]')]: { display: "flex" },
|
|
178
178
|
},
|
|
179
179
|
}),
|
|
180
|
-
], children: [backHref ? (_jsxs("a", { href: backHref, "data-slot": "split-view-back", mix: [
|
|
180
|
+
], children: [backHref ? (_jsxs("a", { href: backHref, "data-rmx-target": frame, "data-slot": "split-view-back", mix: [
|
|
181
181
|
inlineFlex(),
|
|
182
182
|
items("center"),
|
|
183
183
|
gap(1.5),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one set of token colours every code surface paints highlighted runs with, so a file,
|
|
3
|
+
* a diff and a thread excerpt read the same `keyword` in the same ink, in light and dark,
|
|
4
|
+
* and a page's own `--highlight-*` properties restyle all of them at once.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Token colours as `[light, dark]` pairs, used when the page declares no `--highlight-*`
|
|
11
|
+
* property of its own. A run whose type is missing here draws as plain text.
|
|
12
|
+
*/
|
|
13
|
+
export declare const CODE_TOKEN_PALETTE: Readonly<Record<string, readonly [string, string]>>;
|
|
14
|
+
/**
|
|
15
|
+
* One rule per token type for `span.token.<type>` under the host, each reading the page's
|
|
16
|
+
* `--highlight-<type>` first. Spread into the host's `raw()` rules once, so rows carry no
|
|
17
|
+
* class of their own beyond the run's.
|
|
18
|
+
*
|
|
19
|
+
* @returns Nested rules keyed by selector.
|
|
20
|
+
* @example raw({ ...codeTokenRules(), fontFamily: "monospace" })
|
|
21
|
+
*/
|
|
22
|
+
export declare function codeTokenRules(): Record<string, {
|
|
23
|
+
color: string;
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one set of token colours every code surface paints highlighted runs with, so a file,
|
|
3
|
+
* a diff and a thread excerpt read the same `keyword` in the same ink, in light and dark,
|
|
4
|
+
* and a page's own `--highlight-*` properties restyle all of them at once.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Token colours as `[light, dark]` pairs, used when the page declares no `--highlight-*`
|
|
11
|
+
* property of its own. A run whose type is missing here draws as plain text.
|
|
12
|
+
*/
|
|
13
|
+
export const CODE_TOKEN_PALETTE = {
|
|
14
|
+
comment: ["#6a737d", "#8b949e"],
|
|
15
|
+
keyword: ["#d73a49", "#ff7b72"],
|
|
16
|
+
operator: ["#d73a49", "#ff7b72"],
|
|
17
|
+
string: ["#032f62", "#a5d6ff"],
|
|
18
|
+
builtin: ["#032f62", "#a5d6ff"],
|
|
19
|
+
"attr-name": ["#032f62", "#a5d6ff"],
|
|
20
|
+
"attr-value": ["#032f62", "#a5d6ff"],
|
|
21
|
+
number: ["#005cc5", "#79c0ff"],
|
|
22
|
+
boolean: ["#005cc5", "#79c0ff"],
|
|
23
|
+
constant: ["#005cc5", "#79c0ff"],
|
|
24
|
+
property: ["#005cc5", "#79c0ff"],
|
|
25
|
+
tag: ["#005cc5", "#79c0ff"],
|
|
26
|
+
function: ["#6f42c1", "#d2a8ff"],
|
|
27
|
+
"class-name": ["#6f42c1", "#d2a8ff"],
|
|
28
|
+
regex: ["#e36209", "#ffa657"],
|
|
29
|
+
variable: ["#e36209", "#ffa657"],
|
|
30
|
+
punctuation: ["#24292f", "#e6edf3"],
|
|
31
|
+
inserted: ["#22863a", "#7ee787"],
|
|
32
|
+
deleted: ["#b31d28", "#ffa198"],
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* One rule per token type for `span.token.<type>` under the host, each reading the page's
|
|
36
|
+
* `--highlight-<type>` first. Spread into the host's `raw()` rules once, so rows carry no
|
|
37
|
+
* class of their own beyond the run's.
|
|
38
|
+
*
|
|
39
|
+
* @returns Nested rules keyed by selector.
|
|
40
|
+
* @example raw({ ...codeTokenRules(), fontFamily: "monospace" })
|
|
41
|
+
*/
|
|
42
|
+
export function codeTokenRules() {
|
|
43
|
+
return Object.fromEntries(Object.entries(CODE_TOKEN_PALETTE).map(([type, [light, dark]]) => [
|
|
44
|
+
`& .token.${type}`,
|
|
45
|
+
{ color: `var(--highlight-${type}, light-dark(${light}, ${dark}))` },
|
|
46
|
+
]));
|
|
47
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A phone's bottom tab bar: four or five destinations under the thumb, each an icon over its
|
|
3
|
+
* name, fixed above the home indicator, gone from the width where the sidebar takes over.
|
|
4
|
+
* It reserves its own height in the flow, so the page's last row never hides behind it.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/** The bar's height above the safe area, which a floating button above it offsets by. */
|
|
11
|
+
export declare const TAB_BAR_BLOCK_SIZE = "3.5rem";
|
|
12
|
+
/** Prop types for {@link TabBar} and {@link TabBar.Item}. */
|
|
13
|
+
export declare namespace TabBar {
|
|
14
|
+
/**
|
|
15
|
+
* The width from which the bar is gone, matching where the app's sidebar appears;
|
|
16
|
+
* `never` keeps it at every width, for an app made for phones alone.
|
|
17
|
+
*/
|
|
18
|
+
type HideFrom = "30rem" | "40rem" | "48rem" | "64rem" | "never";
|
|
19
|
+
/** Props accepted by {@link TabBar}. */
|
|
20
|
+
interface Props extends TagProps<"nav"> {
|
|
21
|
+
/** The landmark's name, such as "Primary". */
|
|
22
|
+
label: string;
|
|
23
|
+
/** @default "40rem" */
|
|
24
|
+
hideFrom?: HideFrom;
|
|
25
|
+
/** Shows each item's name under its icon; `false` keeps names for assistive tech alone. @default true */
|
|
26
|
+
showLabels?: boolean;
|
|
27
|
+
/** Four or five {@link TabBar.Item}s. */
|
|
28
|
+
children: RemixNode;
|
|
29
|
+
}
|
|
30
|
+
/** Props accepted by {@link TabBar.Item}; a type, since anchor props are a union. */
|
|
31
|
+
type ItemProps = TagProps<"a"> & {
|
|
32
|
+
href: string;
|
|
33
|
+
/** A 24px icon. */
|
|
34
|
+
icon: RemixNode;
|
|
35
|
+
/** The destination's name, read out and shown under the icon. */
|
|
36
|
+
label: string;
|
|
37
|
+
/** This item is the page shown; sets `aria-current="page"`. */
|
|
38
|
+
current?: boolean;
|
|
39
|
+
/** A badge on the icon; zero or unset draws none. Counts over 99 read "99+". */
|
|
40
|
+
count?: number;
|
|
41
|
+
/** What the count means for a screen reader, such as "3 unread notifications". */
|
|
42
|
+
countLabel?: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Renders the bar. The outer box keeps the bar's height in the flow while the bar itself is
|
|
47
|
+
* fixed to the viewport's foot, so it reads as one more block at the end of the page; a
|
|
48
|
+
* screen at or above `hideFrom` draws neither.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* <TabBar label="Primary">
|
|
52
|
+
* <TabBar.Item href="/" icon={<HomeIcon />} label="Home" current />
|
|
53
|
+
* <TabBar.Item href="/alerts" icon={<BellIcon />} label="Alerts" count={3} countLabel="3 new" />
|
|
54
|
+
* </TabBar>
|
|
55
|
+
*/
|
|
56
|
+
export declare function TabBar(handle: Handle<TabBar.Props>): () => import("remix/component").RemixElement;
|
|
57
|
+
export declare namespace TabBar {
|
|
58
|
+
var Item: (handle: Handle<TabBar.ItemProps>) => () => import("remix/component").RemixElement;
|
|
59
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
3
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
4
|
+
import { media, motionReduce } from "@sdxc/u/responsive";
|
|
5
|
+
import { when } from "@sdxc/u/state";
|
|
6
|
+
/** The bar's height above the safe area, which a floating button above it offsets by. */
|
|
7
|
+
export const TAB_BAR_BLOCK_SIZE = "3.5rem";
|
|
8
|
+
/** The width from which a bar hides when `hideFrom` is omitted: a tablet's, where the sidebar shows. */
|
|
9
|
+
const DEFAULT_HIDE_FROM = "40rem";
|
|
10
|
+
/**
|
|
11
|
+
* Renders the bar. The outer box keeps the bar's height in the flow while the bar itself is
|
|
12
|
+
* fixed to the viewport's foot, so it reads as one more block at the end of the page; a
|
|
13
|
+
* screen at or above `hideFrom` draws neither.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <TabBar label="Primary">
|
|
17
|
+
* <TabBar.Item href="/" icon={<HomeIcon />} label="Home" current />
|
|
18
|
+
* <TabBar.Item href="/alerts" icon={<BellIcon />} label="Alerts" count={3} countLabel="3 new" />
|
|
19
|
+
* </TabBar>
|
|
20
|
+
*/
|
|
21
|
+
export function TabBar(handle) {
|
|
22
|
+
return () => {
|
|
23
|
+
let { label, hideFrom = DEFAULT_HIDE_FROM, showLabels = true, children, mix, ...rest } = handle.props;
|
|
24
|
+
return (_jsx("div", { "data-slot": "tab-bar", mix: [
|
|
25
|
+
raw({
|
|
26
|
+
"--ui-tab-bar-block-size": TAB_BAR_BLOCK_SIZE,
|
|
27
|
+
blockSize: `calc(${TAB_BAR_BLOCK_SIZE} + env(safe-area-inset-bottom, 0px))`,
|
|
28
|
+
flexShrink: "0",
|
|
29
|
+
}),
|
|
30
|
+
hideFrom === "never"
|
|
31
|
+
? raw({})
|
|
32
|
+
: media(`(min-width: ${hideFrom})`, raw({ display: "none" })),
|
|
33
|
+
], children: _jsx("nav", { ...rest, "aria-label": label, "data-labels": showLabels ? "" : undefined, mix: mergeMix([
|
|
34
|
+
raw({
|
|
35
|
+
position: "fixed",
|
|
36
|
+
insetInline: "0",
|
|
37
|
+
insetBlockEnd: "0",
|
|
38
|
+
zIndex: "40",
|
|
39
|
+
display: "grid",
|
|
40
|
+
gridAutoFlow: "column",
|
|
41
|
+
gridAutoColumns: "minmax(0, 1fr)",
|
|
42
|
+
paddingBlockEnd: "env(safe-area-inset-bottom, 0px)",
|
|
43
|
+
backgroundColor: "color-mix(in oklch, var(--ui-bg, Canvas) 88%, transparent)",
|
|
44
|
+
backdropFilter: "blur(16px) saturate(1.4)",
|
|
45
|
+
WebkitBackdropFilter: "blur(16px) saturate(1.4)",
|
|
46
|
+
borderBlockStart: "1px solid var(--ui-neutral-border)",
|
|
47
|
+
}),
|
|
48
|
+
], mix), children: children }) }));
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* One destination: the whole column is the link, at least 44px square. The current item
|
|
53
|
+
* takes the brand colour and a heavier name, and a press dims it briefly.
|
|
54
|
+
*/
|
|
55
|
+
TabBar.Item = function TabBarItem(handle) {
|
|
56
|
+
return () => {
|
|
57
|
+
let { href, icon, label, current = false, count, countLabel, mix, ...rest } = handle.props;
|
|
58
|
+
let hasCount = count !== undefined && count > 0;
|
|
59
|
+
return (_jsxs("a", { ...rest, href: href, "aria-current": current ? "page" : undefined, "data-slot": "tab-bar-item", mix: mergeMix([
|
|
60
|
+
raw({
|
|
61
|
+
display: "flex",
|
|
62
|
+
flexDirection: "column",
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
justifyContent: "center",
|
|
65
|
+
gap: "0.125rem",
|
|
66
|
+
minBlockSize: TAB_BAR_BLOCK_SIZE,
|
|
67
|
+
minInlineSize: "2.75rem",
|
|
68
|
+
color: "var(--ui-neutral-fg-muted)",
|
|
69
|
+
textDecoration: "none",
|
|
70
|
+
WebkitTapHighlightColor: "transparent",
|
|
71
|
+
transition: "opacity 120ms",
|
|
72
|
+
outline: "none",
|
|
73
|
+
}),
|
|
74
|
+
when("&[aria-current='page']", raw({ color: "var(--ui-brand-fg)" })),
|
|
75
|
+
when("&:active", raw({ opacity: "0.6" })),
|
|
76
|
+
when("&:focus-visible", raw({ boxShadow: "inset 0 0 0 2px var(--ui-brand-ring)", borderRadius: "0.75rem" })),
|
|
77
|
+
motionReduce(raw({ transition: "none" })),
|
|
78
|
+
], mix), children: [_jsxs("span", { "aria-hidden": "true", "data-slot": "tab-bar-icon", mix: [
|
|
79
|
+
raw({
|
|
80
|
+
position: "relative",
|
|
81
|
+
display: "inline-flex",
|
|
82
|
+
inlineSize: "1.5rem",
|
|
83
|
+
blockSize: "1.5rem",
|
|
84
|
+
"& > svg": { inlineSize: "100%", blockSize: "100%" },
|
|
85
|
+
}),
|
|
86
|
+
], children: [icon, hasCount ? (_jsx("span", { "data-slot": "tab-bar-count", mix: [
|
|
87
|
+
raw({
|
|
88
|
+
position: "absolute",
|
|
89
|
+
insetBlockStart: "-0.375rem",
|
|
90
|
+
insetInlineStart: "0.875rem",
|
|
91
|
+
minInlineSize: "1.125rem",
|
|
92
|
+
blockSize: "1.125rem",
|
|
93
|
+
paddingInline: "0.3125rem",
|
|
94
|
+
boxSizing: "border-box",
|
|
95
|
+
borderRadius: "999px",
|
|
96
|
+
fontSize: "0.6875rem",
|
|
97
|
+
fontWeight: "700",
|
|
98
|
+
lineHeight: "1.125rem",
|
|
99
|
+
textAlign: "center",
|
|
100
|
+
fontVariantNumeric: "tabular-nums",
|
|
101
|
+
color: "var(--ui-brand-fg-on-solid, white)",
|
|
102
|
+
backgroundColor: "var(--ui-brand-bg-solid)",
|
|
103
|
+
boxShadow: "0 0 0 2px var(--ui-bg, Canvas)",
|
|
104
|
+
}),
|
|
105
|
+
], children: (count ?? 0) > 99 ? "99+" : count })) : null] }), _jsxs("span", { "data-slot": "tab-bar-label", mix: [
|
|
106
|
+
raw({ fontSize: "0.6875rem", lineHeight: "1rem", fontWeight: "500" }),
|
|
107
|
+
when("[aria-current='page'] > &", raw({ fontWeight: "700" })),
|
|
108
|
+
when(":is(nav:not([data-labels])) &", visuallyHidden()),
|
|
109
|
+
], children: [label, hasCount && countLabel ? _jsxs("span", { mix: [visuallyHidden()], children: [", ", countLabel] }) : null] })] }));
|
|
110
|
+
};
|
|
111
|
+
};
|
package/dist/app/tree.d.ts
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
* A hierarchical list of nodes built from nested `<details>` and `<summary>`
|
|
3
3
|
* elements, so a branch's expand/collapse state, keyboard toggling, and
|
|
4
4
|
* content hiding all come from the platform rather than tracked state.
|
|
5
|
-
* {@link Tree.Item} nests further {@link Tree.Item} nodes
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* placeholder exactly like a row list's own.
|
|
5
|
+
* {@link Tree.Item} nests further {@link Tree.Item} nodes and {@link Tree.Leaf}
|
|
6
|
+
* file rows inside itself, {@link Tree.ItemContent} renders a folder's row,
|
|
7
|
+
* {@link Tree.Filter} narrows the files, and {@link Tree.Navigation} adds arrow keys.
|
|
9
8
|
*
|
|
10
9
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
11
10
|
* @copyright Sergio Xalambrí 2026
|
|
12
11
|
*/
|
|
13
|
-
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
12
|
+
import type { EntryComponent, Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
14
13
|
import { SentinelRow } from "../components/sentinel-row.js";
|
|
14
|
+
import type { TreeNavigation as TreeNavigationMixin } from "./mixins/tree-navigation.js";
|
|
15
|
+
export { treeFilterMatches } from "./utils/tree-filter.js";
|
|
15
16
|
/**
|
|
16
17
|
* Prop and context types for {@link Tree} and its compound parts.
|
|
17
18
|
*/
|
|
@@ -21,12 +22,84 @@ export declare namespace Tree {
|
|
|
21
22
|
/** Nesting depth this item occupies, `0` for a node rendered directly inside {@link Tree}. */
|
|
22
23
|
depth: number;
|
|
23
24
|
}
|
|
25
|
+
/** Value {@link Tree} provides to every row inside it. */
|
|
26
|
+
interface RootContext {
|
|
27
|
+
/** The frame every {@link Tree.Leaf} link swaps, unless the leaf names its own. */
|
|
28
|
+
frame: string | undefined;
|
|
29
|
+
}
|
|
24
30
|
/**
|
|
25
31
|
* Props accepted by {@link Tree}.
|
|
26
32
|
*/
|
|
27
33
|
interface Props extends TagProps<"div"> {
|
|
28
|
-
/** {@link Tree.Item} and {@link Tree.LoadMoreItem} nodes to render. */
|
|
34
|
+
/** {@link Tree.Item}, {@link Tree.Leaf} and {@link Tree.LoadMoreItem} nodes to render. */
|
|
29
35
|
children: RemixNode;
|
|
36
|
+
/**
|
|
37
|
+
* The frame every file link swaps (`data-rmx-target`), such as `"main"`, so picking a
|
|
38
|
+
* file redraws only the code while the tree, its open folders and scroll stay put.
|
|
39
|
+
*/
|
|
40
|
+
frame?: string;
|
|
41
|
+
}
|
|
42
|
+
/** How a file changed, drawn as a toned letter: A, M, D or R. */
|
|
43
|
+
type LeafStatus = "added" | "modified" | "deleted" | "renamed";
|
|
44
|
+
/**
|
|
45
|
+
* Props accepted by {@link Tree.Leaf}: every native `<a>` attribute.
|
|
46
|
+
*/
|
|
47
|
+
interface LeafProps extends Omit<TagProps<"a">, "children" | "role" | "href"> {
|
|
48
|
+
href: string;
|
|
49
|
+
/** The file's name; picks its icon and is what type-ahead matches. */
|
|
50
|
+
name: string;
|
|
51
|
+
/** The file's full path, which {@link Tree.Filter} matches. @default name */
|
|
52
|
+
path?: string;
|
|
53
|
+
/** What the row shows in place of `name`, such as a name with a matched part marked. */
|
|
54
|
+
children?: RemixNode;
|
|
55
|
+
/** Marks the file being read, with `aria-current="page"`; render its folders `open`. */
|
|
56
|
+
current?: boolean;
|
|
57
|
+
/** The frame this link swaps, over the tree's own `frame`. */
|
|
58
|
+
frame?: string;
|
|
59
|
+
status?: LeafStatus;
|
|
60
|
+
/** What assistive technology reads for `status`, such as "Modified"; the letter is decoration. */
|
|
61
|
+
statusLabel?: string;
|
|
62
|
+
/** Lines added, drawn end-aligned as `+n`. */
|
|
63
|
+
additions?: number;
|
|
64
|
+
/** Lines removed, drawn end-aligned as `−n`. */
|
|
65
|
+
deletions?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Props accepted by {@link Tree.Filter}: every native `<form>` attribute. The form submits
|
|
69
|
+
* with GET to `action`, so a reader without script gets the narrowed tree from the server.
|
|
70
|
+
*/
|
|
71
|
+
interface FilterProps extends Omit<TagProps<"form">, "children" | "method"> {
|
|
72
|
+
/** The `id` of the {@link Tree} the field narrows as the reader types. */
|
|
73
|
+
tree: string;
|
|
74
|
+
/** The field's accessible name, such as "Filter files". */
|
|
75
|
+
label: string;
|
|
76
|
+
placeholder?: string;
|
|
77
|
+
/** The query the page was rendered with, so the field shows what narrowed the tree. */
|
|
78
|
+
value?: string;
|
|
79
|
+
/** Search parameter the query submits under. @default "filter" */
|
|
80
|
+
name?: string;
|
|
81
|
+
/** Other search parameters the submission keeps, as hidden fields. */
|
|
82
|
+
params?: Record<string, string>;
|
|
83
|
+
}
|
|
84
|
+
/** Props {@link TreeFilterField} receives from {@link Tree.Filter}. */
|
|
85
|
+
interface FilterFieldProps {
|
|
86
|
+
tree: string;
|
|
87
|
+
label: string;
|
|
88
|
+
name: string;
|
|
89
|
+
value?: string;
|
|
90
|
+
placeholder?: string;
|
|
91
|
+
}
|
|
92
|
+
/** Props accepted by {@link Tree.NoMatches}: every native `<p>` attribute, plus its tree. */
|
|
93
|
+
interface NoMatchesProps extends TagProps<"p"> {
|
|
94
|
+
/**
|
|
95
|
+
* The id of the tree it answers for, when it sits beside the tree rather than inside it,
|
|
96
|
+
* which keeps the tree's children to its items.
|
|
97
|
+
*/
|
|
98
|
+
tree?: string;
|
|
99
|
+
}
|
|
100
|
+
/** Props accepted by {@link Tree.Navigation}: the key copy the help sheet lists. */
|
|
101
|
+
interface NavigationProps {
|
|
102
|
+
labels?: TreeNavigationMixin.Labels;
|
|
30
103
|
}
|
|
31
104
|
/**
|
|
32
105
|
* Props accepted by {@link Tree.Item}. Every native `<details>` attribute
|
|
@@ -64,9 +137,10 @@ export declare namespace Tree {
|
|
|
64
137
|
}
|
|
65
138
|
}
|
|
66
139
|
/**
|
|
67
|
-
* Renders the tree
|
|
68
|
-
*
|
|
69
|
-
*
|
|
140
|
+
* Renders the bordered `role="tree"` panel; folders open and file links work with no script.
|
|
141
|
+
* Rows indent `--ui-tree-indent` per level, `frame` aims every {@link Tree.Leaf} at one frame,
|
|
142
|
+
* `data-empty` centers a fallback, {@link Tree.NoMatches} answers a filter that matches
|
|
143
|
+
* nothing, and {@link Tree.Filter} and {@link Tree.Navigation} add islands.
|
|
70
144
|
*
|
|
71
145
|
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
72
146
|
* @returns The render function producing the tree's markup.
|
|
@@ -74,7 +148,7 @@ export declare namespace Tree {
|
|
|
74
148
|
* <Tree aria-label={t("files.title")}>
|
|
75
149
|
* <Tree.Item id="src">
|
|
76
150
|
* <Tree.ItemContent>
|
|
77
|
-
* <Tree.ExpandButton
|
|
151
|
+
* <Tree.ExpandButton />
|
|
78
152
|
* {t("files.folder", { name: "src" })}
|
|
79
153
|
* </Tree.ItemContent>
|
|
80
154
|
* <Tree.Item id="src-index">
|
|
@@ -86,13 +160,25 @@ export declare namespace Tree {
|
|
|
86
160
|
* <Tree aria-label={t("files.title")} data-empty>
|
|
87
161
|
* {t("files.empty")}
|
|
88
162
|
* </Tree>
|
|
163
|
+
* @example
|
|
164
|
+
* <Tree id="files" aria-label={t("files.title")} frame="main">
|
|
165
|
+
* <Tree.Navigation labels={{ group: t("keys.files"), next: t("keys.next") }} />
|
|
166
|
+
* <Tree.Item id="app" open>
|
|
167
|
+
* <Tree.ItemContent><Tree.ExpandButton />app</Tree.ItemContent>
|
|
168
|
+
* <Tree.Leaf href="/blob/main/app/routes.ts" name="routes.ts" path="app/routes.ts" current />
|
|
169
|
+
* </Tree.Item>
|
|
170
|
+
* </Tree>
|
|
89
171
|
*/
|
|
90
|
-
export declare function Tree(handle: Handle<Tree.Props>): () => import("remix/component").RemixElement;
|
|
172
|
+
export declare function Tree(handle: Handle<Tree.Props, Tree.RootContext>): () => import("remix/component").RemixElement;
|
|
91
173
|
export declare namespace Tree {
|
|
92
174
|
var Item: typeof TreeItem;
|
|
93
175
|
var ItemContent: (handle: Handle<Tree.ItemContentProps>) => () => import("remix/component").RemixElement;
|
|
94
176
|
var LoadMoreItem: typeof SentinelRow;
|
|
95
177
|
var ExpandButton: (handle: Handle<Tree.ExpandButtonProps>) => () => import("remix/component").RemixElement;
|
|
178
|
+
var Leaf: (handle: Handle<Tree.LeafProps>) => () => import("remix/component").RemixElement;
|
|
179
|
+
var Filter: (handle: Handle<Tree.FilterProps>) => () => import("remix/component").RemixElement;
|
|
180
|
+
var NoMatches: (handle: Handle<Tree.NoMatchesProps>) => () => import("remix/component").RemixElement;
|
|
181
|
+
var Navigation: (handle: Handle<Tree.NavigationProps>) => () => import("remix/component").RemixElement;
|
|
96
182
|
}
|
|
97
183
|
/**
|
|
98
184
|
* Renders a node as a native `<details>`, so a subtree's reveal and `[open]`
|
|
@@ -104,7 +190,7 @@ export declare namespace Tree {
|
|
|
104
190
|
* @example
|
|
105
191
|
* <Tree.Item id="src">
|
|
106
192
|
* <Tree.ItemContent>
|
|
107
|
-
* <Tree.ExpandButton
|
|
193
|
+
* <Tree.ExpandButton />
|
|
108
194
|
* {t("files.folder", { name: "src" })}
|
|
109
195
|
* </Tree.ItemContent>
|
|
110
196
|
* <Tree.Item id="src-index">
|
|
@@ -114,10 +200,21 @@ export declare namespace Tree {
|
|
|
114
200
|
* @example
|
|
115
201
|
* <Tree.Item id="src" open>
|
|
116
202
|
* <Tree.ItemContent>
|
|
117
|
-
* <Tree.ExpandButton
|
|
203
|
+
* <Tree.ExpandButton />
|
|
118
204
|
* {t("files.folder", { name: "src" })}
|
|
119
205
|
* </Tree.ItemContent>
|
|
120
206
|
* </Tree.Item>
|
|
121
207
|
*/
|
|
122
208
|
declare function TreeItem(handle: Handle<Tree.ItemProps, Tree.ItemContext>): () => import("remix/component").RemixElement;
|
|
123
|
-
|
|
209
|
+
/**
|
|
210
|
+
* Client island behind {@link Tree.Filter}: the search field, whose `treeFilter()` narrows
|
|
211
|
+
* the tree as the reader types. Loads from `@sdxc/ui/app/tree#TreeFilterField` once the
|
|
212
|
+
* app's browser entry maps it; until then the field submits its form.
|
|
213
|
+
*/
|
|
214
|
+
export declare const TreeFilterField: EntryComponent<Tree.FilterFieldProps>;
|
|
215
|
+
/**
|
|
216
|
+
* Client island behind {@link Tree.Navigation}: a hidden marker whose `treeNavigation()`
|
|
217
|
+
* walks the rows of the tree it sits in. Loads from `@sdxc/ui/app/tree#TreeNavigation` once
|
|
218
|
+
* the app's browser entry maps it; until then every row stays reachable by Tab.
|
|
219
|
+
*/
|
|
220
|
+
export declare const TreeNavigation: EntryComponent<Tree.NavigationProps>;
|