anentrypoint-design 0.0.62 → 0.0.63

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anentrypoint-design",
3
- "version": "0.0.62",
3
+ "version": "0.0.63",
4
4
  "description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
5
5
  "type": "module",
6
6
  "main": "./dist/247420.js",
@@ -23,6 +23,7 @@
23
23
  "./desktop/icons.js": "./src/desktop/icons.js",
24
24
  "./desktop/shell.js": "./src/desktop/shell.js",
25
25
  "./desktop/freddie-dashboard.js": "./src/desktop/freddie-dashboard.js",
26
+ "./desktop/freddie-dashboard.css": "./src/desktop/freddie-dashboard.css",
26
27
  "./page-html": {
27
28
  "import": "./src/page-html.js",
28
29
  "default": "./src/page-html.js"
@@ -0,0 +1,32 @@
1
+ .fdash { display: flex; height: 100%; font-family: var(--ff-ui, Nunito, sans-serif); color: var(--ink, #1F1B16); }
2
+ .fdash-side { flex: 0 0 180px; background: var(--panel-1, #ECE6D5); border-right: 1px solid var(--panel-2, #DDD3BC); padding: 8px 0; overflow-y: auto; }
3
+ .fdash-nav { display: flex; flex-direction: column; gap: 2px; }
4
+ .fdash-nav button { text-align: left; padding: 6px 12px; background: transparent; color: inherit; border: 0; cursor: pointer; font-family: inherit; font-size: 12px; border-left: 4px solid transparent; }
5
+ .fdash-nav button:hover { background: var(--panel-hover, rgba(0,0,0,0.04)); }
6
+ .fdash-nav button.active { background: var(--panel-select, #C8E4CA); border-left-color: var(--panel-accent, #3F8A4A); font-weight: 600; }
7
+ .fdash-nav .glyph { display: inline-block; width: 16px; opacity: 0.7; font-family: var(--ff-mono, JetBrains Mono, monospace); }
8
+ .fdash-nav .group-head { padding: 10px 12px 4px; font-size: 9px; opacity: 0.5; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
9
+ .fdash-main { flex: 1; padding: 12px 16px; overflow: auto; min-width: 0; }
10
+ .fdash-h { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
11
+ .fdash-kpi { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
12
+ .fdash-kpi .k { background: var(--panel-2, #DDD3BC); padding: 6px 12px; border-radius: var(--r-1, 6px); min-width: 80px; }
13
+ .fdash-kpi .k .v { font-size: 18px; font-weight: 700; font-family: var(--ff-mono, JetBrains Mono, monospace); }
14
+ .fdash-kpi .k .l { font-size: 10px; opacity: 0.7; text-transform: uppercase; }
15
+ .fdash-panel { background: var(--panel-1, #ECE6D5); border-radius: var(--r-1, 6px); padding: 8px 12px; margin-bottom: 8px; }
16
+ .fdash-panel h3 { font-size: 12px; font-weight: 700; margin: 0 0 6px; opacity: 0.8; text-transform: uppercase; }
17
+ .fdash-panel pre { font-family: var(--ff-mono, JetBrains Mono, monospace); font-size: 11px; white-space: pre-wrap; word-break: break-all; margin: 0; max-height: 280px; overflow: auto; }
18
+ .fdash-panel table { width: 100%; border-collapse: collapse; font-size: 12px; }
19
+ .fdash-panel th, .fdash-panel td { padding: 4px 8px; text-align: left; border-bottom: 1px solid var(--panel-2, #DDD3BC); }
20
+ .fdash-panel th { font-weight: 600; opacity: 0.7; font-size: 10px; text-transform: uppercase; }
21
+ .fdash-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; }
22
+ .fdash-row .code { font-family: var(--ff-mono, JetBrains Mono, monospace); opacity: 0.6; }
23
+ .fdash-row .meta { margin-left: auto; opacity: 0.5; font-size: 11px; }
24
+ .fdash-form { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
25
+ .fdash-form input, .fdash-form textarea, .fdash-form select { font: inherit; padding: 4px 8px; border: 1px solid var(--panel-2, #DDD3BC); border-radius: var(--r-1, 6px); background: var(--panel-0, #F5F0E4); color: inherit; }
26
+ .fdash-form button { padding: 4px 12px; background: var(--panel-accent, #3F8A4A); color: #fff; border: 0; border-radius: var(--r-1, 6px); cursor: pointer; }
27
+ .fdash-form button.danger { background: #c44; }
28
+ .fdash-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; margin: 2px; }
29
+ .fdash-chip.ok { background: var(--panel-select, #C8E4CA); }
30
+ .fdash-chip.miss { background: var(--panel-2, #DDD3BC); opacity: 0.6; }
31
+ .fdash-empty { padding: 20px; text-align: center; opacity: 0.5; font-size: 12px; }
32
+ @media (max-width: 600px) { .fdash-side { flex: 0 0 56px; } .fdash-nav button .label { display: none; } }
@@ -28,46 +28,6 @@ function el(tag, cls, attrs) {
28
28
  return e;
29
29
  }
30
30
 
31
- function ensureStyles() {
32
- if (document.getElementById('freddie-dashboard-style')) return;
33
- const s = document.createElement('style');
34
- s.id = 'freddie-dashboard-style';
35
- s.textContent = `
36
- .fdash { display: flex; height: 100%; font-family: var(--ff-ui, Nunito, sans-serif); color: var(--ink, #1F1B16); }
37
- .fdash-side { flex: 0 0 180px; background: var(--panel-1, #ECE6D5); border-right: 1px solid var(--panel-2, #DDD3BC); padding: 8px 0; overflow-y: auto; }
38
- .fdash-nav { display: flex; flex-direction: column; gap: 2px; }
39
- .fdash-nav button { text-align: left; padding: 6px 12px; background: transparent; color: inherit; border: 0; cursor: pointer; font-family: inherit; font-size: 12px; border-left: 4px solid transparent; }
40
- .fdash-nav button:hover { background: var(--panel-hover, rgba(0,0,0,0.04)); }
41
- .fdash-nav button.active { background: var(--panel-select, #C8E4CA); border-left-color: var(--panel-accent, #3F8A4A); font-weight: 600; }
42
- .fdash-nav .glyph { display: inline-block; width: 16px; opacity: 0.7; font-family: var(--ff-mono, JetBrains Mono, monospace); }
43
- .fdash-main { flex: 1; padding: 12px 16px; overflow: auto; min-width: 0; }
44
- .fdash-h { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
45
- .fdash-kpi { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
46
- .fdash-kpi .k { background: var(--panel-2, #DDD3BC); padding: 6px 12px; border-radius: var(--r-1, 6px); min-width: 80px; }
47
- .fdash-kpi .k .v { font-size: 18px; font-weight: 700; font-family: var(--ff-mono, JetBrains Mono, monospace); }
48
- .fdash-kpi .k .l { font-size: 10px; opacity: 0.7; text-transform: uppercase; }
49
- .fdash-panel { background: var(--panel-1, #ECE6D5); border-radius: var(--r-1, 6px); padding: 8px 12px; margin-bottom: 8px; }
50
- .fdash-panel h3 { font-size: 12px; font-weight: 700; margin: 0 0 6px; opacity: 0.8; text-transform: uppercase; }
51
- .fdash-panel pre { font-family: var(--ff-mono, JetBrains Mono, monospace); font-size: 11px; white-space: pre-wrap; word-break: break-all; margin: 0; max-height: 280px; overflow: auto; }
52
- .fdash-panel table { width: 100%; border-collapse: collapse; font-size: 12px; }
53
- .fdash-panel th, .fdash-panel td { padding: 4px 8px; text-align: left; border-bottom: 1px solid var(--panel-2, #DDD3BC); }
54
- .fdash-panel th { font-weight: 600; opacity: 0.7; font-size: 10px; text-transform: uppercase; }
55
- .fdash-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; }
56
- .fdash-row .code { font-family: var(--ff-mono, JetBrains Mono, monospace); opacity: 0.6; }
57
- .fdash-row .meta { margin-left: auto; opacity: 0.5; font-size: 11px; }
58
- .fdash-form { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
59
- .fdash-form input, .fdash-form textarea, .fdash-form select { font: inherit; padding: 4px 8px; border: 1px solid var(--panel-2, #DDD3BC); border-radius: var(--r-1, 6px); background: var(--panel-0, #F5F0E4); color: inherit; }
60
- .fdash-form button { padding: 4px 12px; background: var(--panel-accent, #3F8A4A); color: #fff; border: 0; border-radius: var(--r-1, 6px); cursor: pointer; }
61
- .fdash-form button.danger { background: #c44; }
62
- .fdash-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; margin: 2px; }
63
- .fdash-chip.ok { background: var(--panel-select, #C8E4CA); }
64
- .fdash-chip.miss { background: var(--panel-2, #DDD3BC); opacity: 0.6; }
65
- .fdash-empty { padding: 20px; text-align: center; opacity: 0.5; font-size: 12px; }
66
- @media (max-width: 600px) { .fdash-side { flex: 0 0 56px; } .fdash-nav button .label { display: none; } }
67
- `;
68
- document.head.appendChild(s);
69
- }
70
-
71
31
  function kpi(items) {
72
32
  const c = el('div', 'fdash-kpi');
73
33
  for (const [v, l] of items) {
@@ -115,8 +75,7 @@ function table(headers, rows) {
115
75
 
116
76
  function pre(obj) { return el('pre', null, { text: typeof obj === 'string' ? obj : JSON.stringify(obj, null, 2) }); }
117
77
 
118
- export function createFreddieDashboard({ instance, bootHost }) {
119
- ensureStyles();
78
+ export function createFreddieDashboard({ instance, bootHost, osSurfaces }) {
120
79
  const root = el('div', 'fdash');
121
80
  const side = el('div', 'fdash-side');
122
81
  const nav = el('div', 'fdash-nav');
@@ -133,13 +92,30 @@ export function createFreddieDashboard({ instance, bootHost }) {
133
92
  render();
134
93
  }
135
94
 
136
- for (const r of ROUTES) {
95
+ const OS_ROUTES = osSurfaces ? [
96
+ { path: 'os-instances', label: 'instances', glyph: '◫' },
97
+ { path: 'os-windows', label: 'windows', glyph: '▭' },
98
+ { path: 'os-x', label: 'x-server', glyph: '✕' },
99
+ { path: 'os-fs', label: 'fs', glyph: '📁' },
100
+ ] : [];
101
+
102
+ function navHead(text) {
103
+ const h = el('div', 'group-head', { text });
104
+ nav.appendChild(h);
105
+ }
106
+ function navBtn(r) {
137
107
  const b = el('button', null, { 'data-path': r.path, on: { click: () => setActive(r.path) } });
138
108
  b.appendChild(el('span', 'glyph', { text: r.glyph }));
139
109
  b.appendChild(document.createTextNode(' '));
140
110
  b.appendChild(el('span', 'label', { text: r.label }));
141
111
  nav.appendChild(b);
142
112
  }
113
+ navHead('freddie');
114
+ for (const r of ROUTES) navBtn(r);
115
+ if (OS_ROUTES.length) {
116
+ navHead('os');
117
+ for (const r of OS_ROUTES) navBtn(r);
118
+ }
143
119
 
144
120
  async function ensureHost() {
145
121
  if (host) return host;
@@ -380,6 +356,40 @@ export function createFreddieDashboard({ instance, bootHost }) {
380
356
  panel('platforms', table(['name', 'enabled', 'note'], platforms.map(p => [p.name, p.enabled ? 'yes' : 'no', p.note])), platforms.length),
381
357
  ];
382
358
  },
359
+ async ['os-instances']() {
360
+ const list = (osSurfaces && osSurfaces.instances && osSurfaces.instances()) || [];
361
+ const activeId = osSurfaces && osSurfaces.activeInstanceId && osSurfaces.activeInstanceId();
362
+ return [
363
+ kpi([[list.length, 'instances'], [activeId || '—', 'active']]),
364
+ panel('instances', table(['id', 'active', 'shells', 'windows'],
365
+ list.map(i => [i.id, i.id === activeId ? '●' : '', String((i.shells || []).length), String((i.windows || []).length)])), list.length),
366
+ ];
367
+ },
368
+ async ['os-windows']() {
369
+ const wins = (osSurfaces && osSurfaces.wm && osSurfaces.wm.list && osSurfaces.wm.list()) || [];
370
+ const focused = osSurfaces && osSurfaces.wm && osSurfaces.wm.focused;
371
+ return [
372
+ kpi([[wins.length, 'windows'], [focused ? (focused.id || focused.title || '?') : '—', 'focused']]),
373
+ panel('windows', table(['id', 'title', 'min', 'max', 'pos'],
374
+ wins.map(w => [w.id || '?', w.title || '', w.min ? '●' : '', w.max ? '●' : '',
375
+ (w.el ? `${w.el.offsetLeft},${w.el.offsetTop} ${w.el.offsetWidth}×${w.el.offsetHeight}` : '')])), wins.length),
376
+ ];
377
+ },
378
+ async ['os-x']() {
379
+ const x = osSurfaces && osSurfaces.xServer && osSurfaces.xServer();
380
+ if (!x) return [el('div', 'fdash-empty', { text: 'x-server not running in this instance' })];
381
+ return [
382
+ kpi([[x.windows, 'windows'], [x.pixmaps, 'pixmaps'], [x.gcs, 'gcs'], [x.atoms, 'atoms'], [x.cursors, 'cursors']]),
383
+ panel('display', pre(x)),
384
+ ];
385
+ },
386
+ async ['os-fs']() {
387
+ const list = await instance.fs.list('/');
388
+ return [
389
+ kpi([[list.length, 'paths'], [instance.id, 'instance']]),
390
+ panel('paths', el('pre', null, { text: list.join('\n') }), list.length),
391
+ ];
392
+ },
383
393
  };
384
394
 
385
395
  setActive('home');
@@ -388,7 +398,7 @@ export function createFreddieDashboard({ instance, bootHost }) {
388
398
  window.__debug = window.__debug || {};
389
399
  window.__debug.instances = window.__debug.instances || {};
390
400
  window.__debug.instances[instance.id] = window.__debug.instances[instance.id] || {};
391
- window.__debug.instances[instance.id].dashboard = { root, routes: ROUTES.map(r => r.path), setActive, get active() { return active; } };
401
+ window.__debug.instances[instance.id].dashboard = { root, routes: [...ROUTES, ...OS_ROUTES].map(r => r.path), setActive, get active() { return active; } };
392
402
  }
393
403
 
394
404
  return { node: root, dispose() {} };