anentrypoint-design 0.0.122 → 0.0.124
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 +253 -253
- package/app-shell.css +931 -594
- package/colors_and_type.css +226 -226
- package/community.css +933 -2255
- package/dist/247420.css +2276 -3075
- package/dist/247420.js +14 -14
- package/package.json +80 -80
- package/src/bootstrap.js +25 -25
- package/src/components/chat.js +199 -199
- package/src/components/community.js +190 -208
- package/src/components/content.js +269 -269
- package/src/components/editor-primitives.js +100 -0
- package/src/components/files-modals.js +107 -107
- package/src/components/files.js +118 -118
- package/src/components/freddie/helpers.js +50 -50
- package/src/components/freddie.js +33 -33
- package/src/components/shell.js +117 -117
- package/src/components/theme-toggle.js +70 -70
- package/src/components.js +59 -67
- package/src/debug.js +30 -30
- package/src/deck-stage.js +21 -21
- package/src/highlight.js +65 -32
- package/src/index.js +86 -86
- package/src/kits/os/about-app.js +52 -52
- package/src/kits/os/app-panes.css +152 -152
- package/src/kits/os/browser-app.js +58 -58
- package/src/kits/os/files-app.js +44 -44
- package/src/kits/os/freddie/helpers.js +59 -59
- package/src/kits/os/freddie/pages-chat.js +143 -143
- package/src/kits/os/freddie/pages-core.js +101 -101
- package/src/kits/os/freddie/pages-os.js +51 -51
- package/src/kits/os/freddie/pages-tools.js +183 -183
- package/src/kits/os/freddie/routes.js +24 -24
- package/src/kits/os/freddie-dashboard.css +51 -51
- package/src/kits/os/freddie-dashboard.js +101 -101
- package/src/kits/os/icons.js +17 -17
- package/src/kits/os/index.js +17 -17
- package/src/kits/os/launcher.css +61 -61
- package/src/kits/os/launcher.js +79 -79
- package/src/kits/os/monitor-app.js +34 -34
- package/src/kits/os/shell.js +214 -214
- package/src/kits/os/terminal-app.js +45 -45
- package/src/kits/os/theme.css +450 -450
- package/src/kits/os/validate.css +19 -19
- package/src/kits/os/validator-app.js +55 -55
- package/src/kits/os/wm.css +115 -115
- package/src/kits/os/wm.js +111 -111
- package/src/markdown.js +39 -39
- package/src/motion.js +35 -35
- package/src/page-html.js +196 -196
- package/src/styles.js +25 -25
- package/src/theme.js +99 -99
- package/src/web-components/ds-chat.js +116 -116
- package/dist/.nojekyll +0 -0
- package/dist/app-shell.css +0 -594
- package/dist/colors_and_type.css +0 -197
- package/dist/favicon.svg +0 -1
- package/dist/index.html +0 -308
- package/dist/preview/buttons.html +0 -28
- package/dist/preview/colors-core.html +0 -45
- package/dist/preview/colors-lore.html +0 -28
- package/dist/preview/colors-semantic.html +0 -34
- package/dist/preview/dateline.html +0 -19
- package/dist/preview/dropzone.html +0 -30
- package/dist/preview/file-grid.html +0 -19
- package/dist/preview/file-row.html +0 -20
- package/dist/preview/file-toolbar.html +0 -40
- package/dist/preview/file-viewer.html +0 -31
- package/dist/preview/header.html +0 -24
- package/dist/preview/icons-unicode.html +0 -26
- package/dist/preview/index-row.html +0 -25
- package/dist/preview/inputs.html +0 -22
- package/dist/preview/manifesto.html +0 -52
- package/dist/preview/motion-default.js +0 -106
- package/dist/preview/rules.html +0 -16
- package/dist/preview/spacing.html +0 -18
- package/dist/preview/stamps-lore.html +0 -20
- package/dist/preview/stamps.html +0 -14
- package/dist/preview/theme-ink.html +0 -15
- package/dist/preview/type-display.html +0 -16
- package/dist/preview/type-mono.html +0 -15
- package/dist/preview/type-prose.html +0 -11
- package/dist/preview/type-scale.html +0 -20
- package/dist/preview/wordmarks.html +0 -28
- package/dist/robots.txt +0 -8
- package/dist/site/content/globals/navigation.yaml +0 -5
- package/dist/site/content/globals/site.yaml +0 -16
- package/dist/site/content/pages/freddie.yaml +0 -88
- package/dist/site/content/pages/home.yaml +0 -190
- package/dist/site/theme.mjs +0 -368
- package/dist/sitemap.xml +0 -31
- package/dist/slides/deck-stage-overlay.js +0 -63
- package/dist/slides/deck-stage-state.js +0 -81
- package/dist/slides/deck-stage-style.js +0 -117
- package/dist/slides/deck-stage.js +0 -159
- package/dist/slides/index.html +0 -276
- package/dist/src/bootstrap.js +0 -25
- package/dist/src/components/chat.js +0 -199
- package/dist/src/components/community.js +0 -167
- package/dist/src/components/content.js +0 -213
- package/dist/src/components/files-modals.js +0 -107
- package/dist/src/components/files.js +0 -118
- package/dist/src/components/freddie/helpers.js +0 -50
- package/dist/src/components/freddie.js +0 -33
- package/dist/src/components/shell.js +0 -117
- package/dist/src/components/theme-toggle.js +0 -70
- package/dist/src/components.js +0 -52
- package/dist/src/debug.js +0 -30
- package/dist/src/deck-stage.js +0 -21
- package/dist/src/highlight.js +0 -32
- package/dist/src/index.js +0 -86
- package/dist/src/kits/os/about-app.js +0 -52
- package/dist/src/kits/os/app-panes.css +0 -152
- package/dist/src/kits/os/browser-app.js +0 -58
- package/dist/src/kits/os/files-app.js +0 -44
- package/dist/src/kits/os/freddie/helpers.js +0 -59
- package/dist/src/kits/os/freddie/pages-chat.js +0 -143
- package/dist/src/kits/os/freddie/pages-core.js +0 -101
- package/dist/src/kits/os/freddie/pages-os.js +0 -51
- package/dist/src/kits/os/freddie/pages-tools.js +0 -183
- package/dist/src/kits/os/freddie/routes.js +0 -24
- package/dist/src/kits/os/freddie-dashboard.css +0 -51
- package/dist/src/kits/os/freddie-dashboard.js +0 -101
- package/dist/src/kits/os/icons.js +0 -17
- package/dist/src/kits/os/index.js +0 -5
- package/dist/src/kits/os/launcher.css +0 -61
- package/dist/src/kits/os/launcher.js +0 -79
- package/dist/src/kits/os/monitor-app.js +0 -34
- package/dist/src/kits/os/shell.js +0 -214
- package/dist/src/kits/os/terminal-app.js +0 -45
- package/dist/src/kits/os/theme.css +0 -412
- package/dist/src/kits/os/validate.css +0 -19
- package/dist/src/kits/os/validator-app.js +0 -55
- package/dist/src/kits/os/wm.css +0 -115
- package/dist/src/kits/os/wm.js +0 -111
- package/dist/src/markdown.js +0 -39
- package/dist/src/motion.js +0 -35
- package/dist/src/page-html.js +0 -196
- package/dist/src/styles.js +0 -25
- package/dist/src/theme.js +0 -99
- package/dist/src/web-components/ds-chat.js +0 -45
- package/dist/ui_kits/aicat/README.md +0 -7
- package/dist/ui_kits/aicat/app.js +0 -156
- package/dist/ui_kits/aicat/index.html +0 -26
- package/dist/ui_kits/aicat/sample-square.png +0 -0
- package/dist/ui_kits/aicat/sample-svg.svg +0 -1
- package/dist/ui_kits/aicat/sample.pdf +0 -32
- package/dist/ui_kits/blog/README.md +0 -3
- package/dist/ui_kits/blog/index.html +0 -90
- package/dist/ui_kits/chat/README.md +0 -5
- package/dist/ui_kits/chat/app.js +0 -110
- package/dist/ui_kits/chat/index.html +0 -26
- package/dist/ui_kits/chat/sample-square.png +0 -0
- package/dist/ui_kits/chat/sample-svg.svg +0 -1
- package/dist/ui_kits/chat/sample.pdf +0 -32
- package/dist/ui_kits/community/app.js +0 -134
- package/dist/ui_kits/community/index.html +0 -24
- package/dist/ui_kits/dashboard/app.js +0 -92
- package/dist/ui_kits/dashboard/index.html +0 -26
- package/dist/ui_kits/docs/README.md +0 -3
- package/dist/ui_kits/docs/index.html +0 -123
- package/dist/ui_kits/error_404/app.js +0 -56
- package/dist/ui_kits/error_404/index.html +0 -26
- package/dist/ui_kits/file_browser/README.md +0 -48
- package/dist/ui_kits/file_browser/app.js +0 -231
- package/dist/ui_kits/file_browser/index.html +0 -33
- package/dist/ui_kits/gallery/app.js +0 -121
- package/dist/ui_kits/gallery/index.html +0 -26
- package/dist/ui_kits/homepage/README.md +0 -7
- package/dist/ui_kits/homepage/app.js +0 -167
- package/dist/ui_kits/homepage/index.html +0 -46
- package/dist/ui_kits/project_page/README.md +0 -3
- package/dist/ui_kits/project_page/app.js +0 -154
- package/dist/ui_kits/project_page/index.html +0 -45
- package/dist/ui_kits/search/app.js +0 -107
- package/dist/ui_kits/search/index.html +0 -26
- package/dist/ui_kits/settings/app.js +0 -133
- package/dist/ui_kits/settings/index.html +0 -26
- package/dist/ui_kits/signin/app.js +0 -115
- package/dist/ui_kits/signin/index.html +0 -26
- package/dist/ui_kits/slide_deck/app.js +0 -174
- package/dist/ui_kits/slide_deck/index.html +0 -26
- package/dist/ui_kits/system_primer/app.js +0 -152
- package/dist/ui_kits/system_primer/index.html +0 -26
- package/dist/ui_kits/terminal/app.js +0 -150
- package/dist/ui_kits/terminal/index.html +0 -26
- package/dist/vendor/webjsx/applyDiff.js +0 -182
- package/dist/vendor/webjsx/attributes.js +0 -154
- package/dist/vendor/webjsx/constants.js +0 -4
- package/dist/vendor/webjsx/createDOMElement.js +0 -52
- package/dist/vendor/webjsx/createElement.js +0 -75
- package/dist/vendor/webjsx/elementTags.js +0 -115
- package/dist/vendor/webjsx/factory.js +0 -6
- package/dist/vendor/webjsx/index.js +0 -6
- package/dist/vendor/webjsx/jsx-dev-runtime.js +0 -2
- package/dist/vendor/webjsx/jsx-runtime.js +0 -30
- package/dist/vendor/webjsx/jsx.js +0 -2
- package/dist/vendor/webjsx/package.json +0 -39
- package/dist/vendor/webjsx/renderSuspension.js +0 -25
- package/dist/vendor/webjsx/types.js +0 -5
- package/dist/vendor/webjsx/utils.js +0 -84
- package/src/components/overlays.js +0 -151
- package/src/components/surfaces.js +0 -399
- package/src/components/voice.js +0 -132
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en" class="ds-247420"><head>
|
|
3
|
-
<meta charset="utf-8">
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
-
<meta name="color-scheme" content="light dark">
|
|
6
|
-
<title>community / 247420</title>
|
|
7
|
-
<meta name="description" content="community shell — server rail, channel sidebar, member list, voice strip.">
|
|
8
|
-
<link rel="canonical" href="https://anentrypoint.github.io/design/ui_kits/community/">
|
|
9
|
-
<link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
|
10
|
-
<link rel="stylesheet" href="../../colors_and_type.css">
|
|
11
|
-
<link rel="stylesheet" href="../../app-shell.css">
|
|
12
|
-
<script type="importmap">
|
|
13
|
-
{ "imports": {
|
|
14
|
-
"webjsx": "../../vendor/webjsx/index.js",
|
|
15
|
-
"webjsx/": "../../vendor/webjsx/",
|
|
16
|
-
"webjsx/jsx-runtime": "../../vendor/webjsx/jsx-runtime.js",
|
|
17
|
-
"ds/": "../../src/"
|
|
18
|
-
} }
|
|
19
|
-
</script>
|
|
20
|
-
</head>
|
|
21
|
-
<body data-screen-label="07 Community">
|
|
22
|
-
<div id="root"></div>
|
|
23
|
-
<script type="module" src="./app.js"></script>
|
|
24
|
-
</body></html>
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import * as webjsx from 'webjsx';
|
|
2
|
-
import { Topbar, Crumb, Status, Side, AppShell, Panel, Heading, Lede, Chip, Kpi, Table, Receipt, Changelog, Row, RowLink } from 'ds/components.js';
|
|
3
|
-
import { mountKit } from 'ds/bootstrap.js';
|
|
4
|
-
const h = webjsx.createElement;
|
|
5
|
-
|
|
6
|
-
const root = document.getElementById('root');
|
|
7
|
-
|
|
8
|
-
const kpis = [
|
|
9
|
-
['24,891', 'requests · 24h'],
|
|
10
|
-
['184ms', 'avg latency · p50'],
|
|
11
|
-
['0.42%', 'error rate · 5xx+4xx'],
|
|
12
|
-
['94.7%', 'cache hit · edge']
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
const tableHeaders = ['endpoint', 'rps', 'p95', 'errors', 'status'];
|
|
16
|
-
const tableRows = [
|
|
17
|
-
['GET /api/users', '412', '92ms', '0', 'ok'],
|
|
18
|
-
['POST /api/sessions', '187', '218ms', '2', 'ok'],
|
|
19
|
-
['GET /api/feed', '1.2k','144ms', '0', 'ok'],
|
|
20
|
-
['POST /api/upload', '24', '1.4s', '11', 'warn'],
|
|
21
|
-
['DELETE /api/cache', '3', '38ms', '0', 'ok']
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
const receipt = [
|
|
25
|
-
['environment', 'production'],
|
|
26
|
-
['region', 'eu-west-1'],
|
|
27
|
-
['build', 'v0.4.12-7a3f9'],
|
|
28
|
-
['deployed', '2026-05-10 14:22'],
|
|
29
|
-
['commit', '8799035'],
|
|
30
|
-
['by', 'lanmower']
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const changelog = [
|
|
34
|
-
{ date: '2026-05-10', ver: 'v0.4.12', msg: 'fix homepage kit motion ref · add dashboard kit · tune panel shadows' },
|
|
35
|
-
{ date: '2026-05-09', ver: 'v0.4.11', msg: 'cache warmup on cold start · lower retry interval' },
|
|
36
|
-
{ date: '2026-05-07', ver: 'v0.4.10', msg: 'migrate session store · add p99 to /metrics' }
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
const events = [
|
|
40
|
-
{ code: '01', title: 'deploy succeeded', sub: 'v0.4.12 · all regions', meta: '2m' },
|
|
41
|
-
{ code: '02', title: 'cache flushed', sub: 'edge-cache · eu-west-1', meta: '14m' },
|
|
42
|
-
{ code: '03', title: 'p95 spike', sub: '/api/upload · 1.4s', meta: '38m' },
|
|
43
|
-
{ code: '04', title: 'cron ran', sub: 'reindex-search · ok', meta: '1h' },
|
|
44
|
-
{ code: '05', title: 'config reloaded', sub: 'feature flags', meta: '3h' }
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
function App() {
|
|
48
|
-
return AppShell({
|
|
49
|
-
topbar: Topbar({ brand: '247420', leaf: 'dashboard', items: [['index', '../../'], ['docs', '../docs/'], ['source ↗', 'https://github.com/AnEntrypoint/design']] }),
|
|
50
|
-
crumb: Crumb({ trail: ['247420', 'kits'], leaf: 'dashboard' }),
|
|
51
|
-
side: Side({
|
|
52
|
-
sections: [
|
|
53
|
-
{ group: 'views', items: [
|
|
54
|
-
{ glyph: '◆', label: 'overview', count: '·', key: 'o' },
|
|
55
|
-
{ glyph: '◇', label: 'requests', count: 5, key: 'r' },
|
|
56
|
-
{ glyph: '◇', label: 'errors', count: 2, key: 'e' },
|
|
57
|
-
{ glyph: '◇', label: 'cron', count: 7, key: 'c' }
|
|
58
|
-
] },
|
|
59
|
-
{ group: 'env', items: [
|
|
60
|
-
{ glyph: '●', label: 'production', count: 'eu', key: 'p', color: 'var(--panel-accent)' },
|
|
61
|
-
{ glyph: '●', label: 'staging', count: 'us', key: 's', color: 'var(--mascot,#e0a200)' }
|
|
62
|
-
] }
|
|
63
|
-
]
|
|
64
|
-
}),
|
|
65
|
-
main: [
|
|
66
|
-
h('div', { class: 'ds-section', style: 'padding:8px' },
|
|
67
|
-
Heading({ level: 1, children: 'dashboard' }),
|
|
68
|
-
Lede({ children: 'kpis, tables, receipts, changelog — every content primitive in one operations surface.' }),
|
|
69
|
-
Panel({ title: 'live metrics', count: kpis.length, style: 'margin:8px 0', children: Kpi({ items: kpis }) }),
|
|
70
|
-
Panel({ title: 'top endpoints', count: tableRows.length, style: 'margin:8px 0', children: Table({ headers: tableHeaders, rows: tableRows }) }),
|
|
71
|
-
h('div', { style: 'display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0' },
|
|
72
|
-
Panel({ title: 'environment', children: Receipt({ rows: receipt }) }),
|
|
73
|
-
Panel({ title: 'recent events', count: events.length, children: events.map((e, i) =>
|
|
74
|
-
Row({ key: 'ev' + i, code: e.code, title: e.title, sub: e.sub, meta: e.meta })
|
|
75
|
-
) })
|
|
76
|
-
),
|
|
77
|
-
Panel({ title: 'changelog', count: changelog.length, style: 'margin:8px 0', children: Changelog({ entries: changelog }) }),
|
|
78
|
-
Panel({ title: 'about this kit', style: 'margin:8px 0', children: h('div', { class: 'ds-pattern-notes' },
|
|
79
|
-
h('p', {}, '· ', Chip({ tone: 'accent', children: 'Kpi' }), ' for headline counters with delta + meta.'),
|
|
80
|
-
h('p', {}, '· ', Chip({ tone: 'accent', children: 'Table' }), ' for tabular metrics, ', Chip({ tone: 'accent', children: 'Row' }), ' for event lists.'),
|
|
81
|
-
h('p', {}, '· ', Chip({ tone: 'accent', children: 'Receipt' }), ' for kv environment manifest, ', Chip({ tone: 'accent', children: 'Changelog' }), ' for release log.')
|
|
82
|
-
) })
|
|
83
|
-
)
|
|
84
|
-
],
|
|
85
|
-
status: Status({
|
|
86
|
-
left: ['dashboard', '• ' + kpis.length + ' kpis', '• ' + tableRows.length + ' endpoints'],
|
|
87
|
-
right: ['247420 / mmxxvi', '• live']
|
|
88
|
-
})
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
mountKit({ root, view: App, screen: '08 Dashboard' });
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en" data-theme="auto" class="ds-247420"><head>
|
|
3
|
-
<meta charset="utf-8">
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
-
<meta name="theme-color" content="#247420" media="(prefers-color-scheme: light)">
|
|
6
|
-
<meta name="theme-color" content="#3A9A34" media="(prefers-color-scheme: dark)">
|
|
7
|
-
<meta name="color-scheme" content="light dark">
|
|
8
|
-
<title>dashboard / 247420</title>
|
|
9
|
-
<meta name="description" content="dashboard ui kit — kpis, tables, receipts, changelog, panels.">
|
|
10
|
-
<link rel="canonical" href="https://anentrypoint.github.io/design/ui_kits/dashboard/">
|
|
11
|
-
<link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
|
12
|
-
<link rel="stylesheet" href="../../colors_and_type.css">
|
|
13
|
-
<link rel="stylesheet" href="../../app-shell.css">
|
|
14
|
-
<script type="importmap">
|
|
15
|
-
{ "imports": {
|
|
16
|
-
"webjsx": "../../vendor/webjsx/index.js",
|
|
17
|
-
"webjsx/": "../../vendor/webjsx/",
|
|
18
|
-
"webjsx/jsx-runtime": "../../vendor/webjsx/jsx-runtime.js",
|
|
19
|
-
"ds/": "../../src/"
|
|
20
|
-
} }
|
|
21
|
-
</script>
|
|
22
|
-
</head>
|
|
23
|
-
<body data-screen-label="08 Dashboard">
|
|
24
|
-
<div id="root"></div>
|
|
25
|
-
<script type="module" src="./app.js"></script>
|
|
26
|
-
</body></html>
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en" data-theme="auto" class="ds-247420"><head>
|
|
3
|
-
<meta charset="utf-8">
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
-
<meta name="theme-color" content="#247420" media="(prefers-color-scheme: light)">
|
|
6
|
-
<meta name="theme-color" content="#3A9A34" media="(prefers-color-scheme: dark)">
|
|
7
|
-
<meta name="color-scheme" content="light dark">
|
|
8
|
-
<title>docs / 247420</title>
|
|
9
|
-
<meta name="description" content="technical documentation template — sidebar tree, markdown body, code blocks.">
|
|
10
|
-
<meta name="author" content="247420 / AnEntrypoint">
|
|
11
|
-
<meta name="keywords" content="247420, anentrypoint, design system, webjsx, rippleui, creative collective">
|
|
12
|
-
<link rel="canonical" href="https://anentrypoint.github.io/design/ui_kits/docs/">
|
|
13
|
-
<link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
|
14
|
-
<meta property="og:type" content="website">
|
|
15
|
-
<meta property="og:title" content="docs / 247420">
|
|
16
|
-
<meta property="og:description" content="technical documentation template — sidebar tree, markdown body, code blocks.">
|
|
17
|
-
<meta property="og:url" content="https://anentrypoint.github.io/design/ui_kits/docs/">
|
|
18
|
-
<meta property="og:site_name" content="247420 / design">
|
|
19
|
-
<meta property="og:image" content="https://anentrypoint.github.io/design/og-card.png">
|
|
20
|
-
<meta property="og:image:width" content="1200">
|
|
21
|
-
<meta property="og:image:height" content="630">
|
|
22
|
-
<meta property="og:image:alt" content="247420 design system">
|
|
23
|
-
<meta property="og:locale" content="en_US">
|
|
24
|
-
<meta name="twitter:card" content="summary_large_image">
|
|
25
|
-
<meta name="twitter:title" content="docs / 247420">
|
|
26
|
-
<meta name="twitter:description" content="technical documentation template — sidebar tree, markdown body, code blocks.">
|
|
27
|
-
<meta name="twitter:image" content="https://anentrypoint.github.io/design/og-card.png">
|
|
28
|
-
<meta name="twitter:site" content="@AnEntrypoint">
|
|
29
|
-
<meta name="robots" content="index, follow">
|
|
30
|
-
<link rel="stylesheet" href="../../colors_and_type.css">
|
|
31
|
-
<link rel="stylesheet" href="../../app-shell.css">
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</head>
|
|
35
|
-
<body data-screen-label="03 Docs">
|
|
36
|
-
<div class="app">
|
|
37
|
-
<header class="app-topbar">
|
|
38
|
-
<span class="brand">247420<span class="slash"> / </span>gm<span class="slash"> / </span>docs</span>
|
|
39
|
-
<nav>
|
|
40
|
-
<a href="../homepage/">← all projects</a>
|
|
41
|
-
<a href="#">readme</a>
|
|
42
|
-
<a href="#" class="active">docs</a>
|
|
43
|
-
<a href="#">source ↗</a>
|
|
44
|
-
</nav>
|
|
45
|
-
</header>
|
|
46
|
-
<div class="app-crumb">
|
|
47
|
-
<span>247420</span><span class="sep">›</span>
|
|
48
|
-
<span>gm</span><span class="sep">›</span>
|
|
49
|
-
<span>docs</span><span class="sep">›</span>
|
|
50
|
-
<span class="leaf">introduction</span>
|
|
51
|
-
<span class="crumb-right"><span class="chip dim">v0.4.1</span></span>
|
|
52
|
-
</div>
|
|
53
|
-
<div class="app-body">
|
|
54
|
-
<aside class="app-side">
|
|
55
|
-
<div class="group">start</div>
|
|
56
|
-
<a href="#" class="active"><span class="glyph">§</span><span>introduction</span></a>
|
|
57
|
-
<a href="#"><span class="glyph">§</span><span>install</span></a>
|
|
58
|
-
<a href="#"><span class="glyph">§</span><span>quickstart</span></a>
|
|
59
|
-
<div class="group">concepts</div>
|
|
60
|
-
<a href="#"><span class="glyph">›</span><span>states & transitions</span></a>
|
|
61
|
-
<a href="#"><span class="glyph">›</span><span>the loop</span></a>
|
|
62
|
-
<a href="#"><span class="glyph">›</span><span>tools</span></a>
|
|
63
|
-
<div class="group">reference</div>
|
|
64
|
-
<a href="#"><span class="glyph">›</span><span>executenodejs</span></a>
|
|
65
|
-
<a href="#"><span class="glyph">›</span><span>executedeno</span></a>
|
|
66
|
-
<a href="#"><span class="glyph">›</span><span>astgrep_*</span></a>
|
|
67
|
-
<a href="#"><span class="glyph">›</span><span>batch_execute</span></a>
|
|
68
|
-
<div class="group">misc</div>
|
|
69
|
-
<a href="#"><span class="glyph">§</span><span>philosophy</span></a>
|
|
70
|
-
<a href="#"><span class="glyph">↗</span><span>changelog</span></a>
|
|
71
|
-
<a href="#"><span class="glyph">↗</span><span>source</span></a>
|
|
72
|
-
</aside>
|
|
73
|
-
<main class="app-main narrow">
|
|
74
|
-
<div class="ds-prose">
|
|
75
|
-
<h1>introduction</h1>
|
|
76
|
-
<p class="lede">a state machine for coding agents. it thinks, so you don't have to (as much).</p>
|
|
77
|
-
|
|
78
|
-
<p>gm is what happens when you stop trying to make an llm "smart" and start giving it a scaffolding to be useful inside of. it's a small, deterministic runtime that says: <em>here is where you are, here are the transitions available, pick one.</em> that's the whole idea.</p>
|
|
79
|
-
|
|
80
|
-
<p>the rest of this document explains how to install it, how to wire it up, and how to stay out of its way.</p>
|
|
81
|
-
|
|
82
|
-
<h2>install</h2>
|
|
83
|
-
<p>one command. you've probably seen this kind of thing before.</p>
|
|
84
|
-
<pre><span class="c"># via claude code plugin marketplace</span>
|
|
85
|
-
<span class="k">claude</span> plugin marketplace add AnEntrypoint/gm-cc
|
|
86
|
-
<span class="k">claude</span> plugin install -s user gm@gm-cc</pre>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
<div class="panel panel-inline-wide">
|
|
90
|
-
<div class="panel-head"><span>※ note</span></div>
|
|
91
|
-
<div class="ds-pattern-notes">
|
|
92
|
-
if you're running <code>gm</code> without claude code, see <a href="#">reference / executenodejs</a>. you'll want bun 1.1+.
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<div class="ds-prose">
|
|
97
|
-
<h2>quickstart</h2>
|
|
98
|
-
<h3>the 30-second version</h3>
|
|
99
|
-
<p>start the repl, ask it to do something, watch it work. press <code>Ctrl</code>+<code>C</code> if it goes somewhere you didn't mean.</p>
|
|
100
|
-
<pre><span class="k">gm</span> start
|
|
101
|
-
<span class="c">→ state: idle</span>
|
|
102
|
-
<span class="c">→ tools available: 19</span>
|
|
103
|
-
> fix the failing test in src/router.ts
|
|
104
|
-
<span class="c">→ state: reading</span>
|
|
105
|
-
<span class="c">→ state: editing</span>
|
|
106
|
-
<span class="c">→ state: verifying</span>
|
|
107
|
-
<span class="c">→ state: done</span></pre>
|
|
108
|
-
|
|
109
|
-
<h2>philosophy</h2>
|
|
110
|
-
<p>there is no philosophy. read the source.</p>
|
|
111
|
-
</div>
|
|
112
|
-
</main>
|
|
113
|
-
</div>
|
|
114
|
-
<footer class="app-status">
|
|
115
|
-
<span class="item">main</span>
|
|
116
|
-
<span class="item">• markdown</span>
|
|
117
|
-
<span class="item">• ln 1</span>
|
|
118
|
-
<span class="spread"></span>
|
|
119
|
-
<span class="item">gm · v0.4.1</span>
|
|
120
|
-
<span class="item">• docs</span>
|
|
121
|
-
</footer>
|
|
122
|
-
</div>
|
|
123
|
-
</body></html>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as webjsx from 'webjsx';
|
|
2
|
-
import { Topbar, Crumb, Status, AppShell, Panel, Heading, Lede, Chip, RowLink } from 'ds/components.js';
|
|
3
|
-
import { mountKit } from 'ds/bootstrap.js';
|
|
4
|
-
const h = webjsx.createElement;
|
|
5
|
-
|
|
6
|
-
const root = document.getElementById('root');
|
|
7
|
-
|
|
8
|
-
const suggestions = [
|
|
9
|
-
{ code: '◆', title: 'index', sub: 'design system home', href: '../../', meta: 'open ↗' },
|
|
10
|
-
{ code: '◇', title: 'kits', sub: 'every ui kit in the portfolio', href: '../../#kits', meta: 'jump ↗' },
|
|
11
|
-
{ code: '§', title: 'previews', sub: 'every primitive isolated', href: '../../preview/buttons.html', meta: 'browse ↗' },
|
|
12
|
-
{ code: 'md',title: 'readme', sub: 'overview, manifesto, conventions', href: 'https://github.com/AnEntrypoint/design/blob/main/README.md', meta: 'readme ↗' },
|
|
13
|
-
{ code: '↗', title: 'github', sub: 'source repo · 247420/anentrypoint', href: 'https://github.com/AnEntrypoint/design', meta: 'source ↗' }
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
const path = (typeof location !== 'undefined' && location.search) ? new URLSearchParams(location.search).get('p') : null;
|
|
17
|
-
|
|
18
|
-
function App() {
|
|
19
|
-
return AppShell({
|
|
20
|
-
narrow: true,
|
|
21
|
-
topbar: Topbar({ brand: '247420', leaf: '404', items: [['index', '../../']] }),
|
|
22
|
-
crumb: Crumb({ trail: ['247420', 'kits'], leaf: '404', right: path ? 'requested: ' + path : '' }),
|
|
23
|
-
main: [
|
|
24
|
-
h('div', { class: 'ds-section', style: 'padding:8px' },
|
|
25
|
-
Panel({ style: 'margin:8px 0', children: h('div', { style: 'padding:36px 22px;text-align:center;display:flex;flex-direction:column;gap:14px;align-items:center' },
|
|
26
|
-
h('div', { style: 'font-family:var(--ff-mono);font-size:120px;line-height:1;color:var(--panel-text-3);letter-spacing:-0.03em' }, '404'),
|
|
27
|
-
Heading({ level: 1, style: 'margin:0', children: 'route not found' }),
|
|
28
|
-
Lede({ children: 'we looked. we asked the cat. there is nothing at this url. probably emerging.' }),
|
|
29
|
-
path ? h('div', { style: 'display:inline-flex;gap:6px;align-items:center;font-family:var(--ff-mono);font-size:13px;color:var(--panel-text-2);background:var(--panel-1);padding:6px 12px;border-radius:8px' },
|
|
30
|
-
h('span', { style: 'color:var(--panel-text-3)' }, 'requested'),
|
|
31
|
-
h('span', {}, path)
|
|
32
|
-
) : null,
|
|
33
|
-
h('div', { style: 'display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:6px' },
|
|
34
|
-
h('a', { href: '../../', class: 'btn btn-primary' }, '← back to index'),
|
|
35
|
-
h('a', { href: '../search/', class: 'btn' }, 'search instead'),
|
|
36
|
-
h('button', { class: 'btn', onclick: () => history.back() }, 'go back')
|
|
37
|
-
),
|
|
38
|
-
h('div', { style: 'display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin-top:4px' },
|
|
39
|
-
Chip({ tone: 'dim', children: '◌ empty' }),
|
|
40
|
-
Chip({ tone: 'dim', children: '· status 404' }),
|
|
41
|
-
Chip({ tone: 'dim', children: '· no body' })
|
|
42
|
-
)
|
|
43
|
-
) }),
|
|
44
|
-
Panel({ title: 'try one of these', count: suggestions.length, style: 'margin:8px 0',
|
|
45
|
-
children: suggestions.map((s, i) => RowLink({ key: 's' + i, code: s.code, title: s.title, sub: s.sub, meta: s.meta, href: s.href }))
|
|
46
|
-
})
|
|
47
|
-
)
|
|
48
|
-
],
|
|
49
|
-
status: Status({
|
|
50
|
-
left: ['error', '• 404', '• ' + (path || 'unknown')],
|
|
51
|
-
right: ['247420 / mmxxvi']
|
|
52
|
-
})
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
mountKit({ root, view: App, screen: '13 404' });
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en" data-theme="auto" class="ds-247420"><head>
|
|
3
|
-
<meta charset="utf-8">
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
-
<meta name="theme-color" content="#247420" media="(prefers-color-scheme: light)">
|
|
6
|
-
<meta name="theme-color" content="#3A9A34" media="(prefers-color-scheme: dark)">
|
|
7
|
-
<meta name="color-scheme" content="light dark">
|
|
8
|
-
<title>404 / 247420</title>
|
|
9
|
-
<meta name="description" content="404 ui kit — empty-state hero with suggested routes.">
|
|
10
|
-
<link rel="canonical" href="https://anentrypoint.github.io/design/ui_kits/error_404/">
|
|
11
|
-
<link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
|
12
|
-
<link rel="stylesheet" href="../../colors_and_type.css">
|
|
13
|
-
<link rel="stylesheet" href="../../app-shell.css">
|
|
14
|
-
<script type="importmap">
|
|
15
|
-
{ "imports": {
|
|
16
|
-
"webjsx": "../../vendor/webjsx/index.js",
|
|
17
|
-
"webjsx/": "../../vendor/webjsx/",
|
|
18
|
-
"webjsx/jsx-runtime": "../../vendor/webjsx/jsx-runtime.js",
|
|
19
|
-
"ds/": "../../src/"
|
|
20
|
-
} }
|
|
21
|
-
</script>
|
|
22
|
-
</head>
|
|
23
|
-
<body data-screen-label="13 404">
|
|
24
|
-
<div id="root"></div>
|
|
25
|
-
<script type="module" src="./app.js"></script>
|
|
26
|
-
</body></html>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# file browser ui_kit
|
|
2
|
-
|
|
3
|
-
static demo of the 247420 file-browser surface.
|
|
4
|
-
|
|
5
|
-
## what's in here
|
|
6
|
-
|
|
7
|
-
- `index.html` — buildless shell, importmap to `../../vendor/webjsx`, raw `colors_and_type.css` + `app-shell.css` from the repo root.
|
|
8
|
-
- `app.js` — mounts `AppShell + FileToolbar + DropZone + FileGrid + FileViewer + ConfirmDialog + PromptDialog`. mock data only, no backend.
|
|
9
|
-
|
|
10
|
-
## consuming the components
|
|
11
|
-
|
|
12
|
-
```js
|
|
13
|
-
import {
|
|
14
|
-
FileGrid, FileRow, FileToolbar, DropZone, UploadProgress,
|
|
15
|
-
BreadcrumbPath, EmptyState,
|
|
16
|
-
FileViewer, FilePreviewMedia, FilePreviewCode, FilePreviewText,
|
|
17
|
-
ConfirmDialog, PromptDialog
|
|
18
|
-
} from 'anentrypoint-design';
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
each FileRow takes `{ name, type, size, modified, onOpen, onAction }`. `type` is one of:
|
|
22
|
-
|
|
23
|
-
| type | rail color | glyph |
|
|
24
|
-
| --------- | ---------- | ----- |
|
|
25
|
-
| dir | green | ▣ |
|
|
26
|
-
| image | sky | ◰ |
|
|
27
|
-
| video | purple | ▰ |
|
|
28
|
-
| audio | mascot | ◎ |
|
|
29
|
-
| code | green | ⌘ |
|
|
30
|
-
| text | mascot | § |
|
|
31
|
-
| archive | flame | ◐ |
|
|
32
|
-
| document | sun | ▢ |
|
|
33
|
-
| symlink | sky | ↗ |
|
|
34
|
-
| other | neutral | ◌ |
|
|
35
|
-
|
|
36
|
-
the rail color comes from `data-file-type` on the row — never apply `.rail-*` classes manually to file rows. css owns the mapping.
|
|
37
|
-
|
|
38
|
-
## from a real backend
|
|
39
|
-
|
|
40
|
-
swap `SAMPLE` for an api response and route `onAction('delete' | 'rename' | 'download', file)` to your endpoints. the canonical wiring is in [`fsbrowse`](https://github.com/AnEntrypoint/fsbrowse) — Express + busboy backend, this exact frontend.
|
|
41
|
-
|
|
42
|
-
## run locally
|
|
43
|
-
|
|
44
|
-
```sh
|
|
45
|
-
npx --yes serve -l 4173 .
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
then open http://localhost:4173/index.html.
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
import * as webjsx from 'webjsx';
|
|
2
|
-
import {
|
|
3
|
-
Topbar, Crumb, AppShell, Status, Btn,
|
|
4
|
-
FileGrid, FileToolbar, DropZone, UploadProgress, BreadcrumbPath,
|
|
5
|
-
ConfirmDialog, PromptDialog, FileViewer,
|
|
6
|
-
FilePreviewMedia, FilePreviewCode, FilePreviewText
|
|
7
|
-
} from '../../src/components.js';
|
|
8
|
-
const h = webjsx.createElement;
|
|
9
|
-
|
|
10
|
-
const SAMPLE = [
|
|
11
|
-
{ name: 'src', type: 'dir', size: null, modified: '2026.04.21' },
|
|
12
|
-
{ name: 'design', type: 'dir', size: null, modified: '2026.04.20' },
|
|
13
|
-
{ name: 'cover.png', type: 'image', size: 184320, modified: '2026.04.18' },
|
|
14
|
-
{ name: 'reel.mp4', type: 'video', size: 2411724, modified: '2026.04.17' },
|
|
15
|
-
{ name: 'theme.mp3', type: 'audio', size: 4823100, modified: '2026.04.16' },
|
|
16
|
-
{ name: 'main.js', type: 'code', size: 4321, modified: '2026.04.21' },
|
|
17
|
-
{ name: 'README.md', type: 'text', size: 2410, modified: '2026.04.21' },
|
|
18
|
-
{ name: 'archive.zip', type: 'archive', size: 18234100,modified: '2026.04.10' },
|
|
19
|
-
{ name: 'spec.pdf', type: 'document', size: 412300, modified: '2026.04.04' },
|
|
20
|
-
{ name: 'link-out', type: 'symlink', size: null, modified: '2026.04.02' },
|
|
21
|
-
{ name: '.config', type: 'other', size: 220, modified: '2026.04.01' }
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
const PREVIEW_TEXT = `# 247420 file browser
|
|
25
|
-
this is a static demo wired to the design system.
|
|
26
|
-
no backend, no real files — just primitives in arrangement.`;
|
|
27
|
-
|
|
28
|
-
const PREVIEW_CODE = `export function FileRow({ name, type, size, modified, onOpen }) {
|
|
29
|
-
return h('div', { class: 'ds-file-row', 'data-file-type': type, onclick: onOpen },
|
|
30
|
-
FileIcon({ type }),
|
|
31
|
-
h('span', { class: 'title' }, name),
|
|
32
|
-
h('span', { class: 'meta' }, fmtFileSize(size))
|
|
33
|
-
);
|
|
34
|
-
}`;
|
|
35
|
-
|
|
36
|
-
const state = {
|
|
37
|
-
files: SAMPLE,
|
|
38
|
-
crumbs: ['demo', 'tigers'],
|
|
39
|
-
dragover: false,
|
|
40
|
-
uploads: [],
|
|
41
|
-
viewer: null,
|
|
42
|
-
confirm: null,
|
|
43
|
-
prompt: null,
|
|
44
|
-
promptValue: ''
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const root = document.getElementById('root');
|
|
48
|
-
|
|
49
|
-
function previewBody(file) {
|
|
50
|
-
if (file.type === 'image' || file.type === 'video' || file.type === 'audio') {
|
|
51
|
-
return FilePreviewMedia({
|
|
52
|
-
type: file.type,
|
|
53
|
-
name: file.name,
|
|
54
|
-
src: file.type === 'image'
|
|
55
|
-
? 'data:image/svg+xml;utf8,' + encodeURIComponent(
|
|
56
|
-
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 360"><rect width="600" height="360" fill="#3F8A4A"/><text x="300" y="200" text-anchor="middle" font-family="JetBrains Mono" font-size="48" fill="#F5F0E4">${file.name}</text></svg>`
|
|
57
|
-
)
|
|
58
|
-
: ''
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
if (file.type === 'code') return FilePreviewCode({ content: PREVIEW_CODE, lang: 'js' });
|
|
62
|
-
if (file.type === 'text' || file.type === 'document') return FilePreviewText({ content: PREVIEW_TEXT });
|
|
63
|
-
return FilePreviewMedia({ type: file.type, name: file.name });
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function openViewer(file) {
|
|
67
|
-
if (file.type === 'dir') {
|
|
68
|
-
state.crumbs = [...state.crumbs, file.name];
|
|
69
|
-
render(); return;
|
|
70
|
-
}
|
|
71
|
-
state.viewer = file;
|
|
72
|
-
render();
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function rowAction(act, file) {
|
|
76
|
-
if (act === 'download') {
|
|
77
|
-
state.uploads = [{ name: 'downloading ' + file.name, pct: 100, done: true }];
|
|
78
|
-
setTimeout(() => { state.uploads = []; render(); }, 1500);
|
|
79
|
-
render(); return;
|
|
80
|
-
}
|
|
81
|
-
if (act === 'delete') {
|
|
82
|
-
state.confirm = {
|
|
83
|
-
title: 'delete ' + file.name + '?',
|
|
84
|
-
message: 'this is a demo — nothing actually deletes.',
|
|
85
|
-
destructive: true,
|
|
86
|
-
onConfirm: () => {
|
|
87
|
-
state.files = state.files.filter(f => f !== file);
|
|
88
|
-
state.confirm = null; render();
|
|
89
|
-
},
|
|
90
|
-
onCancel: () => { state.confirm = null; render(); }
|
|
91
|
-
};
|
|
92
|
-
render(); return;
|
|
93
|
-
}
|
|
94
|
-
if (act === 'rename') {
|
|
95
|
-
state.prompt = {
|
|
96
|
-
title: 'rename ' + file.name,
|
|
97
|
-
value: file.name,
|
|
98
|
-
onConfirm: (v) => {
|
|
99
|
-
if (v && v.trim()) file.name = v.trim();
|
|
100
|
-
state.prompt = null; state.promptValue = ''; render();
|
|
101
|
-
},
|
|
102
|
-
onCancel: () => { state.prompt = null; state.promptValue = ''; render(); }
|
|
103
|
-
};
|
|
104
|
-
state.promptValue = file.name;
|
|
105
|
-
render();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function simulateUpload(files) {
|
|
110
|
-
const items = Array.from(files).slice(0, 3).map(f => ({
|
|
111
|
-
name: f.name || 'untitled',
|
|
112
|
-
pct: 0, done: false
|
|
113
|
-
}));
|
|
114
|
-
state.uploads = items;
|
|
115
|
-
render();
|
|
116
|
-
items.forEach((it, i) => {
|
|
117
|
-
let p = 0;
|
|
118
|
-
const tick = () => {
|
|
119
|
-
p += 20 + Math.random() * 30;
|
|
120
|
-
it.pct = Math.min(100, Math.round(p));
|
|
121
|
-
if (it.pct >= 100) { it.done = true; render(); return; }
|
|
122
|
-
render();
|
|
123
|
-
setTimeout(tick, 280 + i * 60);
|
|
124
|
-
};
|
|
125
|
-
setTimeout(tick, 200 + i * 200);
|
|
126
|
-
});
|
|
127
|
-
setTimeout(() => { state.uploads = []; render(); }, 4000);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function pickFiles() {
|
|
131
|
-
const input = document.createElement('input');
|
|
132
|
-
input.type = 'file'; input.multiple = true;
|
|
133
|
-
input.onchange = () => simulateUpload(input.files);
|
|
134
|
-
input.click();
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function App() {
|
|
138
|
-
const main = h('div', { class: 'ds-file-stage' },
|
|
139
|
-
h('h1', {}, 'file browser'),
|
|
140
|
-
h('p', { class: 'lede' },
|
|
141
|
-
'static demo of the 247420 file-browser primitives. drop files to fake-upload, click rows to preview, ',
|
|
142
|
-
'try delete or rename — nothing leaves this page.'
|
|
143
|
-
),
|
|
144
|
-
BreadcrumbPath({
|
|
145
|
-
segments: state.crumbs,
|
|
146
|
-
root: 'tigers',
|
|
147
|
-
onNav: (i) => { state.crumbs = state.crumbs.slice(0, i); render(); }
|
|
148
|
-
}),
|
|
149
|
-
FileToolbar({
|
|
150
|
-
left: [
|
|
151
|
-
Btn({ onClick: pickFiles, children: '⇪ upload' }),
|
|
152
|
-
Btn({ onClick: () => {
|
|
153
|
-
state.prompt = {
|
|
154
|
-
title: 'new folder',
|
|
155
|
-
value: '',
|
|
156
|
-
onConfirm: (v) => {
|
|
157
|
-
if (v && v.trim()) state.files = [
|
|
158
|
-
{ name: v.trim(), type: 'dir', size: null, modified: 'just now' },
|
|
159
|
-
...state.files
|
|
160
|
-
];
|
|
161
|
-
state.prompt = null; state.promptValue = ''; render();
|
|
162
|
-
},
|
|
163
|
-
onCancel: () => { state.prompt = null; state.promptValue = ''; render(); }
|
|
164
|
-
};
|
|
165
|
-
state.promptValue = '';
|
|
166
|
-
render();
|
|
167
|
-
}, children: '+ folder' })
|
|
168
|
-
],
|
|
169
|
-
right: [
|
|
170
|
-
h('span', { class: 'meta ds-meta-mono' },
|
|
171
|
-
String(state.files.length).padStart(2, '0') + ' items'
|
|
172
|
-
)
|
|
173
|
-
]
|
|
174
|
-
}),
|
|
175
|
-
DropZone({
|
|
176
|
-
label: 'drop files here to upload',
|
|
177
|
-
dragover: state.dragover,
|
|
178
|
-
onDragOver: () => { if (!state.dragover) { state.dragover = true; render(); } },
|
|
179
|
-
onDragLeave: () => { state.dragover = false; render(); },
|
|
180
|
-
onDrop: (files) => { state.dragover = false; simulateUpload(files); },
|
|
181
|
-
onPick: pickFiles
|
|
182
|
-
}),
|
|
183
|
-
UploadProgress({ items: state.uploads }),
|
|
184
|
-
FileGrid({
|
|
185
|
-
files: state.files,
|
|
186
|
-
onOpen: openViewer,
|
|
187
|
-
onAction: rowAction,
|
|
188
|
-
emptyText: 'nothing to show — upload something or pick a folder.'
|
|
189
|
-
})
|
|
190
|
-
);
|
|
191
|
-
|
|
192
|
-
return h('div', {},
|
|
193
|
-
AppShell({
|
|
194
|
-
topbar: Topbar({
|
|
195
|
-
brand: '247420',
|
|
196
|
-
leaf: 'file browser',
|
|
197
|
-
items: [
|
|
198
|
-
['design', '../../'],
|
|
199
|
-
['home', '../homepage/'],
|
|
200
|
-
['docs', '../docs/'],
|
|
201
|
-
['source ↗', 'https://github.com/AnEntrypoint/Design']
|
|
202
|
-
]
|
|
203
|
-
}),
|
|
204
|
-
crumb: Crumb({ trail: ['247420', 'ui kits'], leaf: 'file browser' }),
|
|
205
|
-
main,
|
|
206
|
-
status: Status({ left: ['main', '• ' + state.files.length + ' items'], right: ['live', 'demo only'] })
|
|
207
|
-
}),
|
|
208
|
-
state.viewer ? FileViewer({
|
|
209
|
-
file: state.viewer,
|
|
210
|
-
body: previewBody(state.viewer),
|
|
211
|
-
onClose: () => { state.viewer = null; render(); },
|
|
212
|
-
onAction: (act) => { if (act === 'download') { state.viewer = null; render(); } }
|
|
213
|
-
}) : null,
|
|
214
|
-
state.confirm ? ConfirmDialog(state.confirm) : null,
|
|
215
|
-
state.prompt ? PromptDialog({
|
|
216
|
-
...state.prompt,
|
|
217
|
-
value: state.promptValue,
|
|
218
|
-
onInput: (v) => { state.promptValue = v; }
|
|
219
|
-
}) : null
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
function render() { webjsx.applyDiff(root, App()); }
|
|
224
|
-
render();
|
|
225
|
-
|
|
226
|
-
document.addEventListener('keydown', (e) => {
|
|
227
|
-
if (e.key !== 'Escape') return;
|
|
228
|
-
if (state.viewer) { state.viewer = null; render(); return; }
|
|
229
|
-
if (state.prompt) { state.prompt.onCancel && state.prompt.onCancel(); return; }
|
|
230
|
-
if (state.confirm) { state.confirm.onCancel && state.confirm.onCancel(); }
|
|
231
|
-
});
|