foss-design 0.3.6 → 0.4.0
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/viewer/assets/index-BYP2IITn.css +2 -0
- package/dist/viewer/assets/index-J92cmw_g.js +158 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer-lib/index.js +734 -58
- package/dist/viewer-lib/styles.css +101 -0
- package/dist/viewer-lib/types/viewer/src/lib/phone.d.ts +1 -0
- package/dist/viewer-lib/types/viewer/src/library.d.ts +2 -0
- package/dist/viewer-lib/types/viewer/src/pages/canvas/phone-view.d.ts +10 -0
- package/dist/viewer-lib/types/viewer/src/pages/canvas/play-page.d.ts +10 -0
- package/dist/viewer-lib/types/viewer/src/ui/sheet.d.ts +11 -0
- package/package.json +1 -1
- package/dist/viewer/assets/index-DmtHtusH.js +0 -157
- package/dist/viewer/assets/index-YT1s8WdL.css +0 -2
|
@@ -542,6 +542,10 @@
|
|
|
542
542
|
z-index: 50;
|
|
543
543
|
}
|
|
544
544
|
|
|
545
|
+
.z-\[1\] {
|
|
546
|
+
z-index: 1;
|
|
547
|
+
}
|
|
548
|
+
|
|
545
549
|
.z-\[60\] {
|
|
546
550
|
z-index: 60;
|
|
547
551
|
}
|
|
@@ -665,6 +669,11 @@
|
|
|
665
669
|
height: calc(var(--spacing) * 3.5);
|
|
666
670
|
}
|
|
667
671
|
|
|
672
|
+
.size-8 {
|
|
673
|
+
width: calc(var(--spacing) * 8);
|
|
674
|
+
height: calc(var(--spacing) * 8);
|
|
675
|
+
}
|
|
676
|
+
|
|
668
677
|
.size-9 {
|
|
669
678
|
width: calc(var(--spacing) * 9);
|
|
670
679
|
height: calc(var(--spacing) * 9);
|
|
@@ -705,6 +714,10 @@
|
|
|
705
714
|
}
|
|
706
715
|
}
|
|
707
716
|
|
|
717
|
+
.h-1 {
|
|
718
|
+
height: var(--spacing);
|
|
719
|
+
}
|
|
720
|
+
|
|
708
721
|
.h-1\.5 {
|
|
709
722
|
height: calc(var(--spacing) * 1.5);
|
|
710
723
|
}
|
|
@@ -749,6 +762,10 @@
|
|
|
749
762
|
height: calc(var(--spacing) * 10);
|
|
750
763
|
}
|
|
751
764
|
|
|
765
|
+
.h-11 {
|
|
766
|
+
height: calc(var(--spacing) * 11);
|
|
767
|
+
}
|
|
768
|
+
|
|
752
769
|
.h-12 {
|
|
753
770
|
height: calc(var(--spacing) * 12);
|
|
754
771
|
}
|
|
@@ -821,6 +838,10 @@
|
|
|
821
838
|
max-height: 50vh;
|
|
822
839
|
}
|
|
823
840
|
|
|
841
|
+
.max-h-\[82dvh\] {
|
|
842
|
+
max-height: 82dvh;
|
|
843
|
+
}
|
|
844
|
+
|
|
824
845
|
.max-h-\[96px\] {
|
|
825
846
|
max-height: 96px;
|
|
826
847
|
}
|
|
@@ -861,6 +882,10 @@
|
|
|
861
882
|
min-height: 46px;
|
|
862
883
|
}
|
|
863
884
|
|
|
885
|
+
.min-h-\[48px\] {
|
|
886
|
+
min-height: 48px;
|
|
887
|
+
}
|
|
888
|
+
|
|
864
889
|
.min-h-\[50vh\] {
|
|
865
890
|
min-height: 50vh;
|
|
866
891
|
}
|
|
@@ -955,6 +980,10 @@
|
|
|
955
980
|
width: 100%;
|
|
956
981
|
}
|
|
957
982
|
|
|
983
|
+
.w-max {
|
|
984
|
+
width: max-content;
|
|
985
|
+
}
|
|
986
|
+
|
|
958
987
|
.w-px {
|
|
959
988
|
width: 1px;
|
|
960
989
|
}
|
|
@@ -1247,10 +1276,18 @@
|
|
|
1247
1276
|
overflow-x: auto;
|
|
1248
1277
|
}
|
|
1249
1278
|
|
|
1279
|
+
.overflow-x-hidden {
|
|
1280
|
+
overflow-x: hidden;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1250
1283
|
.overflow-y-auto {
|
|
1251
1284
|
overflow-y: auto;
|
|
1252
1285
|
}
|
|
1253
1286
|
|
|
1287
|
+
.overscroll-contain {
|
|
1288
|
+
overscroll-behavior: contain;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1254
1291
|
.rounded-\[1px\] {
|
|
1255
1292
|
border-radius: 1px;
|
|
1256
1293
|
}
|
|
@@ -1287,6 +1324,11 @@
|
|
|
1287
1324
|
border-radius: 3.40282e38px;
|
|
1288
1325
|
}
|
|
1289
1326
|
|
|
1327
|
+
.rounded-t-\[14px\] {
|
|
1328
|
+
border-top-left-radius: 14px;
|
|
1329
|
+
border-top-right-radius: 14px;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1290
1332
|
.border {
|
|
1291
1333
|
border-style: var(--tw-border-style);
|
|
1292
1334
|
border-width: 1px;
|
|
@@ -1649,6 +1691,10 @@
|
|
|
1649
1691
|
padding-top: calc(var(--spacing) * 1.5);
|
|
1650
1692
|
}
|
|
1651
1693
|
|
|
1694
|
+
.pt-2 {
|
|
1695
|
+
padding-top: calc(var(--spacing) * 2);
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1652
1698
|
.pt-2\.5 {
|
|
1653
1699
|
padding-top: calc(var(--spacing) * 2.5);
|
|
1654
1700
|
}
|
|
@@ -1669,6 +1715,10 @@
|
|
|
1669
1715
|
padding-top: 12vh;
|
|
1670
1716
|
}
|
|
1671
1717
|
|
|
1718
|
+
.pt-\[env\(safe-area-inset-top\)\] {
|
|
1719
|
+
padding-top: env(safe-area-inset-top);
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1672
1722
|
.pr-1\.5 {
|
|
1673
1723
|
padding-right: calc(var(--spacing) * 1.5);
|
|
1674
1724
|
}
|
|
@@ -1709,6 +1759,18 @@
|
|
|
1709
1759
|
padding-bottom: calc(var(--spacing) * 7);
|
|
1710
1760
|
}
|
|
1711
1761
|
|
|
1762
|
+
.pb-\[env\(safe-area-inset-bottom\)\] {
|
|
1763
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
.pb-\[max\(6px\,env\(safe-area-inset-bottom\)\)\] {
|
|
1767
|
+
padding-bottom: max(6px, env(safe-area-inset-bottom));
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
.pl-2 {
|
|
1771
|
+
padding-left: calc(var(--spacing) * 2);
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1712
1774
|
.pl-3 {
|
|
1713
1775
|
padding-left: calc(var(--spacing) * 3);
|
|
1714
1776
|
}
|
|
@@ -1775,6 +1837,10 @@
|
|
|
1775
1837
|
font-size: 13px;
|
|
1776
1838
|
}
|
|
1777
1839
|
|
|
1840
|
+
.text-\[14\.5px\] {
|
|
1841
|
+
font-size: 14.5px;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1778
1844
|
.text-\[14px\] {
|
|
1779
1845
|
font-size: 14px;
|
|
1780
1846
|
}
|
|
@@ -2183,6 +2249,10 @@
|
|
|
2183
2249
|
outline-offset: -2px;
|
|
2184
2250
|
}
|
|
2185
2251
|
|
|
2252
|
+
.active\:bg-soft2:active {
|
|
2253
|
+
background-color: var(--soft2);
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2186
2256
|
.disabled\:cursor-not-allowed:disabled {
|
|
2187
2257
|
cursor: not-allowed;
|
|
2188
2258
|
}
|
|
@@ -2268,10 +2338,24 @@
|
|
|
2268
2338
|
}
|
|
2269
2339
|
|
|
2270
2340
|
@media not all and (min-width: 48rem) {
|
|
2341
|
+
.max-md\:flex {
|
|
2342
|
+
display: flex;
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2271
2345
|
.max-md\:hidden {
|
|
2272
2346
|
display: none;
|
|
2273
2347
|
}
|
|
2274
2348
|
|
|
2349
|
+
.max-md\:w-ctrl\! {
|
|
2350
|
+
width: 32px !important;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
@media (max-width: 767px) {
|
|
2354
|
+
.max-md\:w-ctrl\! {
|
|
2355
|
+
width: 40px !important;
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2275
2359
|
.max-md\:flex-col {
|
|
2276
2360
|
flex-direction: column;
|
|
2277
2361
|
}
|
|
@@ -2280,10 +2364,27 @@
|
|
|
2280
2364
|
align-items: stretch;
|
|
2281
2365
|
}
|
|
2282
2366
|
|
|
2367
|
+
.max-md\:justify-center {
|
|
2368
|
+
justify-content: center;
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2283
2371
|
.max-md\:gap-3 {
|
|
2284
2372
|
gap: calc(var(--spacing) * 3);
|
|
2285
2373
|
}
|
|
2286
2374
|
|
|
2375
|
+
.max-md\:border-0 {
|
|
2376
|
+
border-style: var(--tw-border-style);
|
|
2377
|
+
border-width: 0;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
.max-md\:bg-transparent {
|
|
2381
|
+
background-color: #0000;
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
.max-md\:p-0 {
|
|
2385
|
+
padding: 0;
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2287
2388
|
.max-md\:px-4 {
|
|
2288
2389
|
padding-inline: calc(var(--spacing) * 4);
|
|
2289
2390
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIsPhone(): boolean;
|
|
@@ -6,6 +6,7 @@ export { Bar } 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';
|
|
9
|
+
export { useIsPhone } from './lib/phone';
|
|
9
10
|
export { ApiError, localSource, resolveUrl, staticSource, type ViewerSource } from './lib/source';
|
|
10
11
|
export { setThemePref, type ThemePref, useTheme, useThemePref } from './lib/theme';
|
|
11
12
|
export type { ViewerScope, ViewerSlots } from './lib/viewer';
|
|
@@ -19,6 +20,7 @@ export { floatingSurface, Menu, MenuItem, MenuLabel, MenuSeparator, menuItemClas
|
|
|
19
20
|
export { Meter } from './ui/meter';
|
|
20
21
|
export { Content, type NavItem, NavLabel, Notice, NoticeCard, PageHead, SubNav } from './ui/page';
|
|
21
22
|
export { GroupRow, KV, Panel, PanelBody, PanelFoot, PanelHead, PanelTabs, Row, RowLink, type RowProps, Strip, THead, } from './ui/panel';
|
|
23
|
+
export { Sheet } from './ui/sheet';
|
|
22
24
|
export { Skeleton, SkeletonRows } from './ui/skeleton';
|
|
23
25
|
export { Kbd, Mono, Muted, Two } from './ui/text';
|
|
24
26
|
export { TextArea, type TextAreaProps, TextField, type TextFieldProps } from './ui/text-field';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A canvas on a phone: no board to pan, one screen at a time as in play mode. The screen fills
|
|
3
|
+
* the width and scrolls; the bottom bar steps through every screen of the canvas and opens the
|
|
4
|
+
* list of them. Serves `/c/:canvas`, its pages and `/c/:canvas/play/:item` under 768px.
|
|
5
|
+
*/
|
|
6
|
+
export declare function PhoneCanvas({ canvasId, pageId, itemId }: {
|
|
7
|
+
canvasId: string;
|
|
8
|
+
pageId?: string;
|
|
9
|
+
itemId?: string;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
import type { CanvasDoc, ScreenItem, UrlItem } from '../../../../src/shared/types';
|
|
2
|
+
type Frame = ScreenItem | UrlItem;
|
|
3
|
+
export interface Entry {
|
|
4
|
+
item: Frame;
|
|
5
|
+
pageId: string;
|
|
6
|
+
where: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function framesOf(canvas: CanvasDoc, pageId: string | null): Entry[];
|
|
9
|
+
export declare const playHref: (canvas: string, item: string, page: string) => string;
|
|
1
10
|
export declare function PlayPage({ canvasId, itemId }: {
|
|
2
11
|
canvasId: string;
|
|
3
12
|
itemId: string;
|
|
4
13
|
}): import("react").JSX.Element | null;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A panel sliding up from the bottom edge, for phones: lists to pick from and actions. Like
|
|
4
|
+
* Dialog, focus stays inside, and Escape, a tap on the dimmed page or the close button close it.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Sheet({ open, onOpenChange, title, children, }: {
|
|
7
|
+
open: boolean;
|
|
8
|
+
onOpenChange: (open: boolean) => void;
|
|
9
|
+
title: ReactNode;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): import("react").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foss-design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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",
|