anentrypoint-design 0.0.437 → 0.0.439
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/247420.css +78 -23
- package/dist/247420.js +23 -23
- package/dist/colors_and_type.css +86 -42
- package/dist/preview/buttons.html +5 -2
- package/dist/preview/colors-core.html +4 -1
- package/dist/preview/colors-lore.html +4 -1
- package/dist/preview/colors-semantic.html +4 -1
- package/dist/preview/dateline.html +4 -1
- package/dist/preview/dropzone.html +4 -1
- package/dist/preview/file-grid.html +4 -1
- package/dist/preview/file-row.html +4 -1
- package/dist/preview/file-toolbar.html +4 -1
- package/dist/preview/file-viewer.html +7 -1
- package/dist/preview/header.html +5 -2
- package/dist/preview/icons-unicode.html +26 -20
- package/dist/preview/index-row.html +4 -1
- package/dist/preview/inputs.html +4 -1
- package/dist/preview/manifesto.html +4 -1
- package/dist/preview/rules.html +4 -1
- package/dist/preview/spacing.html +17 -12
- package/dist/preview/stamps-lore.html +4 -1
- package/dist/preview/stamps.html +4 -1
- package/dist/preview/theme-ink.html +4 -1
- package/dist/preview/type-display.html +4 -1
- package/dist/preview/type-mono.html +4 -1
- package/dist/preview/type-prose.html +5 -2
- package/dist/preview/type-scale.html +40 -15
- package/dist/preview/wordmarks.html +18 -22
- package/dist/src/components/content.js +2 -1
- package/dist/src/components.js +21 -5
- package/dist/src/kits/os/theme.css +38 -5
- package/dist/ui_kits/aicat/app.js +1 -1
- package/dist/ui_kits/gallery/app.js +27 -7
- package/dist/ui_kits/signin/app.js +51 -10
- package/dist/ui_kits/system_primer/app.js +189 -3
- package/dist/ui_kits/terminal/app.js +56 -10
- package/package.json +1 -1
- package/src/components/content/cli.js +7 -1
- package/src/components/content/panel.js +7 -2
- package/src/components/shell/app-shell.js +7 -2
- package/src/components/shell/icons.js +4 -1
- package/src/css/app-shell/kits-appended.css +58 -21
- package/src/css/app-shell/panel-row.css +14 -0
- package/src/css/app-shell/responsive2-workspace.css +5 -1
- package/src/css/app-shell/topbar.css +1 -1
- package/src/kits/os/files-app.js +9 -2
- package/src/kits/os/icons.js +5 -0
- package/src/kits/os/launcher.css +7 -2
- package/src/kits/os/launcher.js +27 -3
- package/src/kits/os/monitor-app.js +8 -2
- package/src/kits/os/shell.js +55 -12
- package/src/kits/os/theme.css +20 -2
- package/src/kits/os/wm.js +41 -11
- package/types/components.d.ts +2 -0
- 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/src/kits/os/freddie/helpers.js +0 -59
- package/dist/src/kits/os/validator-app.js +0 -55
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { STYLESHEET } from './deck-stage-style.js';
|
|
2
|
-
import { buildOverlay, buildTapzones, handleDeckKey } from './deck-stage-overlay.js';
|
|
3
|
-
import { loadNotes, restoreIndex, persistIndex, collectSlides, applyIndex, STORAGE_PREFIX } from './deck-stage-state.js';
|
|
4
|
-
|
|
5
|
-
const DESIGN_W_DEFAULT = 1920;
|
|
6
|
-
const DESIGN_H_DEFAULT = 1080;
|
|
7
|
-
const OVERLAY_HIDE_MS = 1800;
|
|
8
|
-
|
|
9
|
-
class DeckStage extends HTMLElement {
|
|
10
|
-
static get observedAttributes() { return ['width', 'height', 'noscale']; }
|
|
11
|
-
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this._root = this.attachShadow({ mode: 'open' });
|
|
15
|
-
this._index = 0;
|
|
16
|
-
this._slides = [];
|
|
17
|
-
this._notes = [];
|
|
18
|
-
this._hideTimer = null;
|
|
19
|
-
this._mouseIdleTimer = null;
|
|
20
|
-
this._storageKey = STORAGE_PREFIX + (location.pathname || '/');
|
|
21
|
-
this._onKey = this._onKey.bind(this);
|
|
22
|
-
this._onResize = this._onResize.bind(this);
|
|
23
|
-
this._onSlotChange = this._onSlotChange.bind(this);
|
|
24
|
-
this._onMouseMove = this._onMouseMove.bind(this);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
get designWidth() { return parseInt(this.getAttribute('width'), 10) || DESIGN_W_DEFAULT; }
|
|
28
|
-
get designHeight() { return parseInt(this.getAttribute('height'), 10) || DESIGN_H_DEFAULT; }
|
|
29
|
-
|
|
30
|
-
connectedCallback() {
|
|
31
|
-
this._render();
|
|
32
|
-
this._notes = loadNotes(this);
|
|
33
|
-
this._syncPrintPageRule();
|
|
34
|
-
window.addEventListener('keydown', this._onKey);
|
|
35
|
-
window.addEventListener('resize', this._onResize);
|
|
36
|
-
window.addEventListener('mousemove', this._onMouseMove, { passive: true });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
disconnectedCallback() {
|
|
40
|
-
window.removeEventListener('keydown', this._onKey);
|
|
41
|
-
window.removeEventListener('resize', this._onResize);
|
|
42
|
-
window.removeEventListener('mousemove', this._onMouseMove);
|
|
43
|
-
if (this._hideTimer) clearTimeout(this._hideTimer);
|
|
44
|
-
if (this._mouseIdleTimer) clearTimeout(this._mouseIdleTimer);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
attributeChangedCallback() {
|
|
48
|
-
if (!this._canvas) return;
|
|
49
|
-
this._canvas.style.width = this.designWidth + 'px';
|
|
50
|
-
this._canvas.style.height = this.designHeight + 'px';
|
|
51
|
-
this._canvas.style.setProperty('--deck-design-w', this.designWidth + 'px');
|
|
52
|
-
this._canvas.style.setProperty('--deck-design-h', this.designHeight + 'px');
|
|
53
|
-
this._fit();
|
|
54
|
-
this._syncPrintPageRule();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
_render() {
|
|
58
|
-
const style = document.createElement('style');
|
|
59
|
-
style.textContent = STYLESHEET;
|
|
60
|
-
const stage = document.createElement('div');
|
|
61
|
-
stage.className = 'stage';
|
|
62
|
-
const canvas = document.createElement('div');
|
|
63
|
-
canvas.className = 'canvas';
|
|
64
|
-
canvas.style.width = this.designWidth + 'px';
|
|
65
|
-
canvas.style.height = this.designHeight + 'px';
|
|
66
|
-
canvas.style.setProperty('--deck-design-w', this.designWidth + 'px');
|
|
67
|
-
canvas.style.setProperty('--deck-design-h', this.designHeight + 'px');
|
|
68
|
-
const slot = document.createElement('slot');
|
|
69
|
-
slot.addEventListener('slotchange', this._onSlotChange);
|
|
70
|
-
canvas.appendChild(slot);
|
|
71
|
-
stage.appendChild(canvas);
|
|
72
|
-
|
|
73
|
-
const tapzones = buildTapzones({
|
|
74
|
-
onBack: (e) => { e.preventDefault(); this._go(this._index - 1, 'tap'); },
|
|
75
|
-
onForward: (e) => { e.preventDefault(); this._go(this._index + 1, 'tap'); }
|
|
76
|
-
});
|
|
77
|
-
const overlay = buildOverlay({
|
|
78
|
-
onPrev: () => this._go(this._index - 1, 'click'),
|
|
79
|
-
onNext: () => this._go(this._index + 1, 'click'),
|
|
80
|
-
onReset: () => this._go(0, 'click')
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
this._root.append(style, stage, tapzones, overlay);
|
|
84
|
-
this._canvas = canvas;
|
|
85
|
-
this._slot = slot;
|
|
86
|
-
this._overlay = overlay;
|
|
87
|
-
this._countEl = overlay.querySelector('.current');
|
|
88
|
-
this._totalEl = overlay.querySelector('.total');
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
_syncPrintPageRule() {
|
|
92
|
-
const id = 'deck-stage-print-page';
|
|
93
|
-
let tag = document.getElementById(id);
|
|
94
|
-
if (!tag) {
|
|
95
|
-
tag = document.createElement('style');
|
|
96
|
-
tag.id = id;
|
|
97
|
-
document.head.appendChild(tag);
|
|
98
|
-
}
|
|
99
|
-
tag.textContent =
|
|
100
|
-
'@page { size: ' + this.designWidth + 'px ' + this.designHeight + 'px; margin: 0; } ' +
|
|
101
|
-
'@media print { html, body { margin: 0 !important; padding: 0 !important; background: none !important; overflow: visible !important; height: auto !important; } ' +
|
|
102
|
-
'* { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }';
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
_onSlotChange() {
|
|
106
|
-
this._slides = collectSlides(this, this._slot);
|
|
107
|
-
this._index = restoreIndex(this, this._slides);
|
|
108
|
-
applyIndex(this, {
|
|
109
|
-
index: this._index, prevIndex: this._prevIndex, slides: this._slides,
|
|
110
|
-
countEl: this._countEl, showOverlay: false, broadcast: true, reason: 'init',
|
|
111
|
-
flashFn: () => this._flashOverlay()
|
|
112
|
-
});
|
|
113
|
-
this._fit();
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
_flashOverlay() {
|
|
118
|
-
if (!this._overlay) return;
|
|
119
|
-
this._overlay.setAttribute('data-visible', '');
|
|
120
|
-
if (this._hideTimer) clearTimeout(this._hideTimer);
|
|
121
|
-
this._hideTimer = setTimeout(() => this._overlay.removeAttribute('data-visible'), OVERLAY_HIDE_MS);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
_fit() {
|
|
125
|
-
if (!this._canvas) return;
|
|
126
|
-
if (this.hasAttribute('noscale')) { this._canvas.style.transform = 'none'; return; }
|
|
127
|
-
const s = Math.min(window.innerWidth / this.designWidth, window.innerHeight / this.designHeight);
|
|
128
|
-
this._canvas.style.transform = `scale(${s})`;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
_onResize() { this._fit(); }
|
|
132
|
-
_onMouseMove() { this._flashOverlay(); }
|
|
133
|
-
_onKey(e) { if (handleDeckKey(this, e)) { e.preventDefault(); this._flashOverlay(); } }
|
|
134
|
-
|
|
135
|
-
_go(i, reason = 'api') {
|
|
136
|
-
if (!this._slides.length) return;
|
|
137
|
-
const clamped = Math.max(0, Math.min(this._slides.length - 1, i));
|
|
138
|
-
if (clamped === this._index) { this._flashOverlay(); return; }
|
|
139
|
-
this._index = clamped;
|
|
140
|
-
applyIndex(this, {
|
|
141
|
-
index: this._index, prevIndex: this._prevIndex, slides: this._slides,
|
|
142
|
-
countEl: this._countEl, showOverlay: true, broadcast: true, reason,
|
|
143
|
-
flashFn: () => this._flashOverlay()
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
get index() { return this._index; }
|
|
148
|
-
get length() { return this._slides.length; }
|
|
149
|
-
goTo(i) { this._go(i, 'api'); }
|
|
150
|
-
next() { this._go(this._index + 1, 'api'); }
|
|
151
|
-
prev() { this._go(this._index - 1, 'api'); }
|
|
152
|
-
reset() { this._go(0, 'api'); }
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (typeof customElements !== 'undefined' && !customElements.get('deck-stage')) {
|
|
156
|
-
customElements.define('deck-stage', DeckStage);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export { DeckStage };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import * as webjsx from '../../../../vendor/webjsx/index.js';
|
|
2
|
-
const h = webjsx.createElement;
|
|
3
|
-
|
|
4
|
-
export function pre(obj) {
|
|
5
|
-
return h('pre', { class: 'fd-pre' }, typeof obj === 'string' ? obj : JSON.stringify(obj, null, 2));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function form(opts) {
|
|
9
|
-
const { fields = [], submit = 'submit', onSubmit } = opts;
|
|
10
|
-
return h('form', { class: 'row-form', onsubmit: (ev) => { ev.preventDefault(); onSubmit && onSubmit(ev); } },
|
|
11
|
-
...fields.map(f => f.kind === 'textarea'
|
|
12
|
-
? h('textarea', { name: f.name, placeholder: f.placeholder || '', rows: f.rows || 4 })
|
|
13
|
-
: h('input', { name: f.name, type: f.type || 'text', placeholder: f.placeholder || '', value: f.value || '', required: f.required ? 'true' : null })),
|
|
14
|
-
h('button', { type: 'submit', class: 'btn-primary' }, submit));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function getRecentPaths() {
|
|
18
|
-
try { return JSON.parse(localStorage.getItem('fd_recent_cwds') || '[]'); } catch { return []; }
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function saveRecentPath(p) {
|
|
22
|
-
if (!p) return;
|
|
23
|
-
try {
|
|
24
|
-
const prev = getRecentPaths().filter(x => x !== p);
|
|
25
|
-
localStorage.setItem('fd_recent_cwds', JSON.stringify([p, ...prev].slice(0, 5)));
|
|
26
|
-
} catch {}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function skillLabel(s) {
|
|
30
|
-
if (s.shortName) return s.shortName;
|
|
31
|
-
const n = s.name || '';
|
|
32
|
-
return n.replace(/^gm:/, '').replace(/^software-development$/, 'software dev').replace(/-/g, ' ');
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function renderChatMessages(container, messages) {
|
|
36
|
-
if (!container) return;
|
|
37
|
-
container.innerHTML = '';
|
|
38
|
-
for (const m of messages) {
|
|
39
|
-
if (m.role === 'tool') {
|
|
40
|
-
const det = document.createElement('details');
|
|
41
|
-
det.className = 'fd-chatlog-tool';
|
|
42
|
-
const sum = document.createElement('summary');
|
|
43
|
-
sum.className = 'fd-chatlog-tool-sum';
|
|
44
|
-
sum.textContent = '⚒ ' + m.name + (m.argsSummary ? ' ' + m.argsSummary : '');
|
|
45
|
-
det.appendChild(sum);
|
|
46
|
-
const body = document.createElement('pre');
|
|
47
|
-
body.className = 'fd-chatlog-tool-body';
|
|
48
|
-
body.textContent = m.content || '';
|
|
49
|
-
det.appendChild(body);
|
|
50
|
-
container.appendChild(det);
|
|
51
|
-
} else {
|
|
52
|
-
const el = document.createElement('div');
|
|
53
|
-
el.className = 'fd-chatlog-msg fd-chatlog-' + (m.role === 'assistant' ? 'assistant' : 'user');
|
|
54
|
-
el.textContent = (m.role === 'assistant' ? '◈ ' : '▷ ') + (m.content || '');
|
|
55
|
-
container.appendChild(el);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
container.scrollTop = container.scrollHeight;
|
|
59
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
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
|
-
}
|