anentrypoint-design 0.0.89 → 0.0.91

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.89",
3
+ "version": "0.0.91",
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",
@@ -29,6 +29,10 @@
29
29
  "./desktop/files-app.js": "./src/desktop/files-app.js",
30
30
  "./desktop/monitor-app.js": "./src/desktop/monitor-app.js",
31
31
  "./desktop/about-app.js": "./src/desktop/about-app.js",
32
+ "./desktop/terminal-app.js": "./src/desktop/terminal-app.js",
33
+ "./desktop/browser-app.js": "./src/desktop/browser-app.js",
34
+ "./desktop/validator-app.js": "./src/desktop/validator-app.js",
35
+ "./desktop/app-panes.css": "./src/desktop/app-panes.css",
32
36
  "./colors_and_type.css": "./colors_and_type.css",
33
37
  "./app-shell.css": "./app-shell.css",
34
38
  "./page-html": {
@@ -0,0 +1,152 @@
1
+ /* App-pane chrome for kit components rendered inside .wm-win bodies.
2
+ Bible tokens only — no hardcoded color, font, or radius. Focus = inset rail; no shadows, no gradients. */
3
+
4
+ /* ── terminal-app ───────────────────────────────────────────────────── */
5
+ .terminal-app {
6
+ display: flex;
7
+ flex-direction: column;
8
+ height: 100%;
9
+ background: var(--os-bg-1);
10
+ color: var(--os-fg);
11
+ font-family: var(--os-mono);
12
+ }
13
+ .terminal-app-head {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+ padding: 4px 10px;
18
+ background: var(--os-bg-2);
19
+ font-family: var(--os-mono);
20
+ font-size: 11px;
21
+ color: var(--os-fg-2);
22
+ text-transform: lowercase;
23
+ flex: 0 0 auto;
24
+ }
25
+ .terminal-app-title { font-family: var(--os-mono); }
26
+ .terminal-app-status { font-family: var(--os-mono); color: var(--os-fg-3); }
27
+ .terminal-app-slot {
28
+ flex: 1 1 auto;
29
+ min-height: 0;
30
+ overflow: hidden;
31
+ background: var(--os-bg-0);
32
+ }
33
+
34
+ /* ── browser-app ────────────────────────────────────────────────────── */
35
+ .browser-app {
36
+ display: flex;
37
+ flex-direction: column;
38
+ height: 100%;
39
+ background: var(--os-bg-1);
40
+ color: var(--os-fg);
41
+ font-family: var(--os-font);
42
+ }
43
+ .browser-app-bar {
44
+ display: flex;
45
+ align-items: center;
46
+ gap: 6px;
47
+ padding: 6px 8px;
48
+ background: var(--os-bg-2);
49
+ flex: 0 0 auto;
50
+ }
51
+ .browser-app-btn {
52
+ height: 28px;
53
+ min-width: 28px;
54
+ padding: 0 8px;
55
+ background: var(--os-bg-3);
56
+ color: var(--os-fg);
57
+ border: none;
58
+ border-radius: var(--os-radius-sm);
59
+ font: 12px var(--os-mono);
60
+ cursor: pointer;
61
+ outline: none;
62
+ }
63
+ .browser-app-btn:hover { background: var(--os-accent-soft); }
64
+ .browser-app-url {
65
+ flex: 1 1 auto;
66
+ height: 28px;
67
+ padding: 0 10px;
68
+ background: var(--os-bg-0);
69
+ color: var(--os-fg);
70
+ border: none;
71
+ border-radius: var(--os-radius-sm);
72
+ font: 12px var(--os-mono);
73
+ outline: none;
74
+ }
75
+ .browser-app-url:focus { box-shadow: inset 4px 0 0 var(--os-accent); }
76
+ .browser-app-slot {
77
+ flex: 1 1 auto;
78
+ min-height: 0;
79
+ overflow: hidden;
80
+ background: var(--os-bg-0);
81
+ display: flex;
82
+ }
83
+ .browser-app-slot > * { flex: 1 1 auto; min-width: 0; min-height: 0; }
84
+ .browser-app-status {
85
+ flex: 0 0 auto;
86
+ padding: 2px 10px;
87
+ background: var(--os-bg-2);
88
+ font: 11px var(--os-mono);
89
+ color: var(--os-fg-3);
90
+ text-transform: lowercase;
91
+ min-height: 18px;
92
+ }
93
+
94
+ /* ── validator-app ──────────────────────────────────────────────────── */
95
+ .validator-app {
96
+ display: flex;
97
+ flex-direction: column;
98
+ height: 100%;
99
+ background: var(--os-bg-1);
100
+ color: var(--os-fg);
101
+ font-family: var(--os-font);
102
+ }
103
+ .validator-app-head {
104
+ display: flex;
105
+ align-items: center;
106
+ gap: 10px;
107
+ padding: 6px 10px;
108
+ background: var(--os-bg-2);
109
+ flex: 0 0 auto;
110
+ }
111
+ .validator-app-banner {
112
+ padding: 2px 10px;
113
+ border-radius: 999px;
114
+ font: 11px var(--os-mono);
115
+ text-transform: lowercase;
116
+ background: var(--os-bg-3);
117
+ color: var(--os-fg-2);
118
+ }
119
+ .validator-app-banner[data-state="pass"] { background: var(--os-accent-soft); color: var(--os-fg); }
120
+ .validator-app-banner[data-state="fail"] { background: var(--os-red); color: var(--os-bg-0); }
121
+ .validator-app-counts {
122
+ font: 11px var(--os-mono);
123
+ color: var(--os-fg-2);
124
+ }
125
+ .validator-app-rerun {
126
+ margin-left: auto;
127
+ height: 24px;
128
+ padding: 0 10px;
129
+ background: var(--os-bg-3);
130
+ color: var(--os-fg);
131
+ border: none;
132
+ border-radius: var(--os-radius-sm);
133
+ font: 11px var(--os-mono);
134
+ text-transform: lowercase;
135
+ cursor: pointer;
136
+ outline: none;
137
+ }
138
+ .validator-app-rerun:hover { background: var(--os-accent-soft); }
139
+ .validator-app-slot {
140
+ flex: 1 1 auto;
141
+ min-height: 0;
142
+ overflow: hidden;
143
+ display: flex;
144
+ background: var(--os-bg-0);
145
+ }
146
+ .validator-app-slot > * { flex: 1 1 auto; min-width: 0; min-height: 0; }
147
+ .validator-app-frame {
148
+ width: 100%;
149
+ height: 100%;
150
+ border: none;
151
+ background: var(--os-bg-0);
152
+ }
@@ -0,0 +1,58 @@
1
+ // Browser-pane paint surface — URL bar + iframe slot + status row. Consumer owns iframe.
2
+ // renderBrowserPane({initialUrl, callbacks: {onNavigate, onReload, onBack, onForward}})
3
+ // -> {node, slot, setUrl, setStatus, dispose}.
4
+ // slot is the container the consumer should append its iframe to.
5
+
6
+ export function renderBrowserPane(opts = {}) {
7
+ const { initialUrl = 'about:blank', callbacks = {} } = opts;
8
+ const node = document.createElement('div');
9
+ node.className = 'app-pane browser-app';
10
+ node.dataset.component = 'browser-app';
11
+
12
+ const bar = document.createElement('div');
13
+ bar.className = 'browser-app-bar';
14
+
15
+ const mkBtn = (label, role) => {
16
+ const b = document.createElement('button');
17
+ b.type = 'button';
18
+ b.className = 'browser-app-btn';
19
+ b.dataset.role = role;
20
+ b.textContent = label;
21
+ return b;
22
+ };
23
+ const backBtn = mkBtn('<', 'back');
24
+ const fwdBtn = mkBtn('>', 'forward');
25
+ const reloadBtn = mkBtn('reload', 'reload');
26
+
27
+ const urlInput = document.createElement('input');
28
+ urlInput.type = 'text';
29
+ urlInput.className = 'browser-app-url';
30
+ urlInput.value = initialUrl;
31
+ urlInput.spellcheck = false;
32
+ urlInput.addEventListener('keydown', (e) => {
33
+ if (e.key === 'Enter' && callbacks.onNavigate) callbacks.onNavigate(urlInput.value);
34
+ });
35
+ backBtn.addEventListener('click', () => callbacks.onBack && callbacks.onBack());
36
+ fwdBtn.addEventListener('click', () => callbacks.onForward && callbacks.onForward());
37
+ reloadBtn.addEventListener('click', () => callbacks.onReload && callbacks.onReload());
38
+
39
+ bar.append(backBtn, fwdBtn, reloadBtn, urlInput);
40
+
41
+ const slot = document.createElement('div');
42
+ slot.className = 'browser-app-slot';
43
+ slot.dataset.role = 'iframe-mount';
44
+
45
+ const status = document.createElement('div');
46
+ status.className = 'browser-app-status';
47
+ status.textContent = '';
48
+
49
+ node.append(bar, slot, status);
50
+
51
+ return {
52
+ node,
53
+ get slot() { return slot; },
54
+ setUrl(u) { urlInput.value = u; },
55
+ setStatus(s) { status.textContent = s; },
56
+ dispose() {},
57
+ };
58
+ }
@@ -0,0 +1,45 @@
1
+ // Terminal-app paint surface — bible classes, pure DOM. Consumer attaches xterm to mount slot.
2
+ // renderTerminal({title, statusText, theme}) -> {node, mount, setTitle, setStatus, dispose}.
3
+ // mount(termInstance) calls termInstance.open(slot) and fit when available; consumer owns xterm lifecycle.
4
+
5
+ export function renderTerminal(opts = {}) {
6
+ const { title = 'terminal', statusText = '', theme = 'dark' } = opts;
7
+ const node = document.createElement('div');
8
+ node.className = 'app-pane terminal-app';
9
+ node.dataset.component = 'terminal-app';
10
+ node.dataset.theme = theme;
11
+
12
+ const head = document.createElement('div');
13
+ head.className = 'terminal-app-head';
14
+ const titleEl = document.createElement('span');
15
+ titleEl.className = 'terminal-app-title';
16
+ titleEl.textContent = title;
17
+ const statusEl = document.createElement('span');
18
+ statusEl.className = 'terminal-app-status';
19
+ statusEl.textContent = statusText;
20
+ head.append(titleEl, statusEl);
21
+
22
+ const slot = document.createElement('div');
23
+ slot.className = 'terminal-app-slot';
24
+ slot.dataset.role = 'xterm-mount';
25
+
26
+ node.append(head, slot);
27
+
28
+ function mount(term) {
29
+ if (!term || typeof term.open !== 'function') return;
30
+ term.open(slot);
31
+ if (term._addonManager) {
32
+ const addons = term._addonManager._addons || [];
33
+ for (const a of addons) { try { a.instance && a.instance.fit && a.instance.fit(); } catch (_) {} }
34
+ }
35
+ }
36
+
37
+ return {
38
+ node,
39
+ mount,
40
+ setTitle(t) { titleEl.textContent = t; },
41
+ setStatus(s) { statusEl.textContent = s; },
42
+ get slot() { return slot; },
43
+ dispose() {},
44
+ };
45
+ }
@@ -0,0 +1,55 @@
1
+ // Validator-app paint surface — status banner + counts + iframe slot. Consumer mounts iframe.
2
+ // renderValidator({src, results, callbacks: {onRerun}}) -> {node, slot, setResults, dispose}.
3
+ // results shape: {allGreen, passed, total, ms} — banner updates colors + counts.
4
+
5
+ export function renderValidator(opts = {}) {
6
+ const { src = '', results = null, callbacks = {} } = opts;
7
+ const node = document.createElement('div');
8
+ node.className = 'app-pane validator-app';
9
+ node.dataset.component = 'validator-app';
10
+
11
+ const head = document.createElement('div');
12
+ head.className = 'validator-app-head';
13
+ const banner = document.createElement('span');
14
+ banner.className = 'validator-app-banner';
15
+ banner.dataset.state = 'pending';
16
+ banner.textContent = 'pending';
17
+ const counts = document.createElement('span');
18
+ counts.className = 'validator-app-counts';
19
+ counts.textContent = '0 / 0';
20
+ const rerun = document.createElement('button');
21
+ rerun.type = 'button';
22
+ rerun.className = 'validator-app-rerun';
23
+ rerun.textContent = 'rerun';
24
+ rerun.addEventListener('click', () => callbacks.onRerun && callbacks.onRerun());
25
+ head.append(banner, counts, rerun);
26
+
27
+ const slot = document.createElement('div');
28
+ slot.className = 'validator-app-slot';
29
+ slot.dataset.role = 'validator-mount';
30
+
31
+ if (src) {
32
+ const f = document.createElement('iframe');
33
+ f.className = 'validator-app-frame';
34
+ f.src = src;
35
+ slot.appendChild(f);
36
+ }
37
+
38
+ node.append(head, slot);
39
+
40
+ function setResults(r) {
41
+ if (!r) { banner.dataset.state = 'pending'; banner.textContent = 'pending'; counts.textContent = '0 / 0'; return; }
42
+ const state = r.allGreen ? 'pass' : 'fail';
43
+ banner.dataset.state = state;
44
+ banner.textContent = state;
45
+ counts.textContent = (r.passed ?? 0) + ' / ' + (r.total ?? 0) + (r.ms != null ? ' · ' + r.ms + 'ms' : '');
46
+ }
47
+ if (results) setResults(results);
48
+
49
+ return {
50
+ node,
51
+ get slot() { return slot; },
52
+ setResults,
53
+ dispose() {},
54
+ };
55
+ }