foss-design 0.9.10 → 0.9.12
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/dist/cli.js +622 -382
- package/dist/runtime/index.js +27 -0
- package/dist/viewer/assets/index-BUDcnDgZ.css +2 -0
- package/dist/viewer/assets/index-Cm4CEv8V.js +159 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer-lib/index.js +7947 -7209
- package/dist/viewer-lib/styles.css +200 -17
- package/dist/viewer-lib/types/src/shared/types.d.ts +17 -0
- package/dist/viewer-lib/types/viewer/src/app.d.ts +8 -1
- package/dist/viewer-lib/types/viewer/src/components/corner-plate.d.ts +21 -0
- package/dist/viewer-lib/types/viewer/src/components/error-boundary.d.ts +5 -0
- package/dist/viewer-lib/types/viewer/src/components/markdown.d.ts +4 -1
- package/dist/viewer-lib/types/viewer/src/lib/frames.d.ts +10 -2
- package/dist/viewer-lib/types/viewer/src/lib/messages.d.ts +12 -0
- package/dist/viewer-lib/types/viewer/src/lib/viewer.d.ts +17 -0
- package/dist/viewer-lib/types/viewer/src/library.d.ts +5 -1
- package/dist/viewer-lib/types/viewer/src/pages/canvas/canvas-bar.d.ts +2 -2
- package/dist/viewer-lib/types/viewer/src/pages/canvas/full-page.d.ts +1 -1
- package/dist/viewer-lib/types/viewer/src/pages/canvas/layout.d.ts +2 -0
- package/dist/viewer-lib/types/viewer/src/ui/combobox.d.ts +25 -0
- package/dist/viewer-lib/types/viewer/src/ui/copy-button.d.ts +7 -0
- package/dist/viewer-lib/types/viewer/src/ui/dialog.d.ts +7 -2
- package/dist/viewer-lib/types/viewer/src/ui/icon-paths.d.ts +1 -0
- package/package.json +1 -1
- package/dist/viewer/assets/index-DKqmJSbn.js +0 -158
- package/dist/viewer/assets/index-DnxkAHbH.css +0 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface ComboboxOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** A muted line under the label. */
|
|
6
|
+
sub?: ReactNode;
|
|
7
|
+
/** A picture at the start of the row, and of the field while it is the one picked: a thumbnail, an avatar. */
|
|
8
|
+
media?: ReactNode;
|
|
9
|
+
/** More text that typing matches besides the label. */
|
|
10
|
+
keywords?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One option out of many, in a field: it shows the picked one, typing narrows the list, arrows and
|
|
14
|
+
* Enter pick without the mouse. The list keeps to a few rows and scrolls, however many there are.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Combobox({ options, value, onChange, placeholder, empty, className, 'aria-label': label, }: {
|
|
17
|
+
options: ComboboxOption[];
|
|
18
|
+
value: string | null;
|
|
19
|
+
onChange: (value: string) => void;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
/** In the list when typing matches nothing. */
|
|
22
|
+
empty?: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** A ghost "Copy" button that turns into "Copied" with a check for a moment after it copies. */
|
|
2
|
+
export declare function CopyButton({ text, label, done, className, }: {
|
|
3
|
+
text: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
done?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* A modal over a dimmed page: focus stays inside until it closes, Escape and a
|
|
4
4
|
* click outside close it. Head and foot are a panel's; `actions` go to the foot.
|
|
5
5
|
* On a phone it is a sheet from the bottom edge with a handle: swiping it down closes it too.
|
|
6
6
|
*/
|
|
7
|
-
export declare function Dialog({ open, onOpenChange, title, description, children, actions, footNote, below, width, }: {
|
|
7
|
+
export declare function Dialog({ open, onOpenChange, title, description, children, actions, footNote, below, width, step, }: {
|
|
8
8
|
open: boolean;
|
|
9
9
|
onOpenChange: (open: boolean) => void;
|
|
10
10
|
title: ReactNode;
|
|
@@ -18,4 +18,9 @@ export declare function Dialog({ open, onOpenChange, title, description, childre
|
|
|
18
18
|
/** Full-width content under the body, scrolling on its own: lists with row borders. */
|
|
19
19
|
below?: ReactNode;
|
|
20
20
|
width?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The dialog's current step, for a dialog that turns into another one in place (a confirmation
|
|
23
|
+
* that becomes its result): a new value cross-fades the content while the panel eases to its size.
|
|
24
|
+
*/
|
|
25
|
+
step?: string;
|
|
21
26
|
}): import("react").JSX.Element;
|
|
@@ -78,6 +78,7 @@ export declare const ICON_PATHS: {
|
|
|
78
78
|
readonly tablet: '<rect width="16" height="20" x="4" y="2" rx="2"/><path d="M12 18h.01"/>';
|
|
79
79
|
readonly note: '<path d="M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z"/><path d="M15 3v4a2 2 0 0 0 2 2h4"/>';
|
|
80
80
|
readonly globe: '<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>';
|
|
81
|
+
readonly share: '<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"/><path d="m16 6-4-4-4 4"/><path d="M12 2v13"/>';
|
|
81
82
|
readonly pointer: '<path d="M4.04 4.69a.5.5 0 0 1 .65-.65l16 6.5a.5.5 0 0 1-.06.95l-6.12 1.58a2 2 0 0 0-1.44 1.44l-1.58 6.12a.5.5 0 0 1-.95.06z"/>';
|
|
82
83
|
readonly component: '<path d="M5.5 8.5 9 12l-3.5 3.5L2 12l3.5-3.5Z"/><path d="m12 2 3.5 3.5L12 9 8.5 5.5 12 2Z"/><path d="M18.5 8.5 22 12l-3.5 3.5L15 12l3.5-3.5Z"/><path d="m12 15 3.5 3.5L12 22l-3.5-3.5L12 15Z"/>';
|
|
83
84
|
readonly keyboard: '<rect width="20" height="16" x="2" y="4" rx="2"/><path d="M6 8h.01"/><path d="M10 8h.01"/><path d="M14 8h.01"/><path d="M18 8h.01"/><path d="M8 12h.01"/><path d="M12 12h.01"/><path d="M16 12h.01"/><path d="M7 16h10"/>';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foss-design",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.12",
|
|
4
4
|
"description": "Design canvases and design systems for coding agents: live, animated, clickable screens on an infinite canvas, served locally from a .design folder.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|