foss-design 0.9.1 → 0.9.3
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 +16 -14
- package/dist/viewer/assets/index-DCfxIE2h.css +2 -0
- package/dist/viewer/assets/index-Db7Nvmb0.js +158 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer-lib/index.js +3799 -3623
- package/dist/viewer-lib/styles.css +8 -0
- package/dist/viewer-lib/types/viewer/src/components/search-button.d.ts +7 -2
- package/dist/viewer-lib/types/viewer/src/components/topbar.d.ts +14 -1
- package/dist/viewer-lib/types/viewer/src/library.d.ts +1 -1
- package/dist/viewer-lib/types/viewer/src/pages/canvas/canvas-bar.d.ts +3 -1
- package/dist/viewer-lib/types/viewer/src/ui/dialog.d.ts +1 -0
- package/package.json +1 -1
- package/dist/viewer/assets/index-Bcfi2Cps.js +0 -158
- package/dist/viewer/assets/index-CH7RhGQ5.css +0 -2
|
@@ -851,6 +851,10 @@
|
|
|
851
851
|
max-height: 82dvh;
|
|
852
852
|
}
|
|
853
853
|
|
|
854
|
+
.max-h-\[90dvh\] {
|
|
855
|
+
max-height: 90dvh;
|
|
856
|
+
}
|
|
857
|
+
|
|
854
858
|
.max-h-\[96px\] {
|
|
855
859
|
max-height: 96px;
|
|
856
860
|
}
|
|
@@ -1596,6 +1600,10 @@
|
|
|
1596
1600
|
}
|
|
1597
1601
|
}
|
|
1598
1602
|
|
|
1603
|
+
.px-0 {
|
|
1604
|
+
padding-inline: 0;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1599
1607
|
.px-0\.5 {
|
|
1600
1608
|
padding-inline: calc(var(--spacing) * .5);
|
|
1601
1609
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export declare function openPalette(): void;
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Opens ⌘K. As tall as the buttons next to it. Without `compact` it drops the label on narrow
|
|
4
|
+
* screens; a bar that measures its own room passes `compact` instead, and gets a square icon
|
|
5
|
+
* with a tooltip when short of it.
|
|
6
|
+
*/
|
|
7
|
+
export declare function SearchButton({ width, label, compact, }: {
|
|
4
8
|
width?: number;
|
|
5
9
|
label?: string;
|
|
10
|
+
compact?: boolean;
|
|
6
11
|
}): import("react").JSX.Element;
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ReactNode, type RefObject } from 'react';
|
|
2
2
|
/** A 52px bar across the top; pages that fill the screen compose their own content into it. */
|
|
3
3
|
export declare function Bar({ children, className }: {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
6
|
}): import("react").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the bar is short of room: its buttons show as square icons with tooltips then. Slots
|
|
9
|
+
* (Share and the like) read it to follow along.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useBarCompact(): boolean;
|
|
12
|
+
export declare const BarCompactProvider: import("react").Provider<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Measures a bar: `title` holds text that truncates (`data-fit` on each truncating element),
|
|
15
|
+
* `end` the buttons. Compact once the title has to truncate; full again once the buttons at full
|
|
16
|
+
* width fit in the room the title leaves. The full width is remembered from the last time the
|
|
17
|
+
* buttons had it, so the bar does not flip back and forth.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useFitBar(title: RefObject<HTMLElement | null>, end: RefObject<HTMLElement | null>, deps: unknown[]): boolean;
|
|
7
20
|
/** The app's top bar: project, sections, search and appearance. */
|
|
8
21
|
export declare function AppTopBar(): import("react").JSX.Element;
|
|
@@ -2,7 +2,7 @@ export type { AssetDoc, CanvasDoc, CanvasItem, CanvasPage, CanvasSection, Canvas
|
|
|
2
2
|
export { DesignViewer, type DesignViewerProps } from './app';
|
|
3
3
|
export { SlidePanel } from './components/slide-panel';
|
|
4
4
|
export { ThemeMenu } from './components/theme-menu';
|
|
5
|
-
export { Bar } from './components/topbar';
|
|
5
|
+
export { Bar, useBarCompact } from './components/topbar';
|
|
6
6
|
export { Mark, Wordmark } from './components/wordmark';
|
|
7
7
|
export { cn } from './lib/cn';
|
|
8
8
|
export { copyText } from './lib/copy';
|
|
@@ -23,7 +23,9 @@ export declare function SelectionBar({ canvas, store, layoutItems, theme, onPlay
|
|
|
23
23
|
inspect: boolean;
|
|
24
24
|
}): import("react").JSX.Element | null;
|
|
25
25
|
/** The inspect mode switch: a button that stays pressed while on. */
|
|
26
|
-
export declare function InspectToggle({ on, onChange }: {
|
|
26
|
+
export declare function InspectToggle({ on, onChange, compact, }: {
|
|
27
27
|
on: boolean;
|
|
28
28
|
onChange(value: boolean): void;
|
|
29
|
+
/** A square icon; the tooltip names it. */
|
|
30
|
+
compact?: boolean;
|
|
29
31
|
}): import("react").JSX.Element;
|
|
@@ -2,6 +2,7 @@ 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
|
+
* On a phone it is a sheet from the bottom edge with a handle: swiping it down closes it too.
|
|
5
6
|
*/
|
|
6
7
|
export declare function Dialog({ open, onOpenChange, title, description, children, actions, footNote, below, width, }: {
|
|
7
8
|
open: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foss-design",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
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",
|