anentrypoint-design 0.0.102 → 0.0.103
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/app-shell.css +464 -2005
- package/colors_and_type.css +140 -626
- package/dist/247420.css +578 -2749
- package/dist/247420.js +23 -62
- package/package.json +22 -23
- package/src/bootstrap.js +5 -18
- package/src/components/chat.js +15 -15
- package/src/components/community.js +9 -7
- package/src/components/content.js +71 -54
- package/src/components/files-modals.js +4 -2
- package/src/components/files.js +6 -14
- package/src/components/freddie/helpers.js +38 -77
- package/src/components/freddie.js +32 -16
- package/src/components/shell.js +22 -15
- package/src/components.js +7 -3
- package/src/debug.js +21 -30
- package/src/deck-stage.js +10 -6
- package/src/highlight.js +25 -11
- package/src/index.js +29 -5
- package/src/{desktop → kits/os}/freddie/helpers.js +1 -1
- package/src/{desktop → kits/os}/freddie/pages-chat.js +2 -2
- package/src/{desktop → kits/os}/freddie/pages-core.js +2 -2
- package/src/{desktop → kits/os}/freddie/pages-os.js +1 -1
- package/src/{desktop → kits/os}/freddie/pages-tools.js +2 -2
- package/src/{desktop → kits/os}/freddie-dashboard.js +2 -2
- package/src/markdown.js +27 -49
- package/src/motion.js +30 -17
- package/src/page-html.js +18 -116
- package/src/styles.js +14 -22
- package/src/web-components/ds-chat.js +24 -56
- package/dist/247420.app.js +0 -5
- package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTT0zRp8A.ttf +0 -0
- package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTT6jRp8A.ttf +0 -0
- package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTTBjNp8A.ttf +0 -0
- package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTTNDNp8A.ttf +0 -0
- package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTTnTRp8A.ttf +0 -0
- package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTTtDRp8A.ttf +0 -0
- package/dist/fonts/archivonarrow_v35_tss5ApVBdCYD5Q7hcxTE1ArZ0Zz8oY2KRmwvKhhv8laKpA.ttf +0 -0
- package/dist/fonts/archivonarrow_v35_tss5ApVBdCYD5Q7hcxTE1ArZ0Zz8oY2KRmwvKhhvHlGKpA.ttf +0 -0
- package/dist/fonts/archivonarrow_v35_tss5ApVBdCYD5Q7hcxTE1ArZ0Zz8oY2KRmwvKhhvLFGKpA.ttf +0 -0
- package/dist/fonts/archivonarrow_v35_tss5ApVBdCYD5Q7hcxTE1ArZ0Zz8oY2KRmwvKhhvy1aKpA.ttf +0 -0
- package/dist/fonts/jetbrainsmono_v24_tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8-qxjPQ.ttf +0 -0
- package/dist/fonts/jetbrainsmono_v24_tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8FqtjPQ.ttf +0 -0
- package/dist/fonts/jetbrainsmono_v24_tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8L6tjPQ.ttf +0 -0
- package/dist/fonts/jetbrainsmono_v24_tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxjPQ.ttf +0 -0
- package/dist/fonts/jetbrainsmono_v24_tDba2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO-LflOQ.ttf +0 -0
- package/dist/fonts/jetbrainsmono_v24_tDba2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO9seVOQ.ttf +0 -0
- package/dist/fonts/spacegrotesk_v22_V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj42Vksj.ttf +0 -0
- package/dist/fonts/spacegrotesk_v22_V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj4PVksj.ttf +0 -0
- package/dist/fonts/spacegrotesk_v22_V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUUsj.ttf +0 -0
- package/dist/fonts/spacegrotesk_v22_V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7oUUsj.ttf +0 -0
- package/src/app.js +0 -156
- package/src/components/freddie/pages-chains.js +0 -168
- package/src/components/freddie/pages-chat.js +0 -122
- package/src/components/freddie/pages-config-edit.js +0 -174
- package/src/components/freddie/pages-config.js +0 -193
- package/src/components/freddie/pages-core.js +0 -170
- package/src/components/freddie/pages-runtime.js +0 -69
- package/src/components/freddie/pages-voice.js +0 -109
- package/src/web-components/freddie-chat.js +0 -34
- /package/src/{desktop → kits/os}/about-app.js +0 -0
- /package/src/{desktop → kits/os}/app-panes.css +0 -0
- /package/src/{desktop → kits/os}/browser-app.js +0 -0
- /package/src/{desktop → kits/os}/files-app.js +0 -0
- /package/src/{desktop → kits/os}/freddie/routes.js +0 -0
- /package/src/{desktop → kits/os}/freddie-dashboard.css +0 -0
- /package/src/{desktop → kits/os}/icons.js +0 -0
- /package/src/{desktop → kits/os}/index.js +0 -0
- /package/src/{desktop → kits/os}/launcher.css +0 -0
- /package/src/{desktop → kits/os}/launcher.js +0 -0
- /package/src/{desktop → kits/os}/monitor-app.js +0 -0
- /package/src/{desktop → kits/os}/shell.js +0 -0
- /package/src/{desktop → kits/os}/terminal-app.js +0 -0
- /package/src/{desktop → kits/os}/theme.css +0 -0
- /package/src/{desktop → kits/os}/validate.css +0 -0
- /package/src/{desktop → kits/os}/validator-app.js +0 -0
- /package/src/{desktop → kits/os}/wm.css +0 -0
- /package/src/{desktop → kits/os}/wm.js +0 -0
|
@@ -1,75 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// <ds-chat> custom element — auto-registers when SDK loads in a browser.
|
|
2
|
+
// Properties: el.messages = [{role,text}, ...]; el.placeholder = string.
|
|
3
|
+
// Emits a bubbling, composed 'send' event with { detail: { text } }.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import * as webjsx from '../../vendor/webjsx/index.js';
|
|
6
|
+
import { Chat } from '../components/chat.js';
|
|
6
7
|
|
|
7
8
|
class DsChat extends HTMLElement {
|
|
8
|
-
static get observedAttributes() { return ['title', 'sub', 'placeholder']; }
|
|
9
|
-
|
|
10
9
|
constructor() {
|
|
11
10
|
super();
|
|
12
11
|
this._messages = [];
|
|
13
|
-
this.
|
|
14
|
-
this._title = 'chat';
|
|
15
|
-
this._sub = '';
|
|
16
|
-
this._placeholder = 'message…';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
set messages(v) { this._messages = Array.isArray(v) ? v : []; this._render(); }
|
|
20
|
-
get messages() { return this._messages; }
|
|
21
|
-
|
|
22
|
-
connectedCallback() {
|
|
23
|
-
if (this.hasAttribute('messages')) {
|
|
24
|
-
try { this._messages = JSON.parse(this.getAttribute('messages')); } catch {}
|
|
25
|
-
}
|
|
26
|
-
this._title = this.getAttribute('title') || this._title;
|
|
27
|
-
this._sub = this.getAttribute('sub') || '';
|
|
28
|
-
this._placeholder = this.getAttribute('placeholder') || this._placeholder;
|
|
29
|
-
_stats.mounts += 1;
|
|
30
|
-
this._render();
|
|
12
|
+
this._placeholder = 'type, then ⏎';
|
|
31
13
|
}
|
|
32
|
-
|
|
14
|
+
static get observedAttributes() { return ['messages', 'placeholder']; }
|
|
33
15
|
attributeChangedCallback(name, _old, val) {
|
|
34
|
-
if (name === '
|
|
35
|
-
|
|
36
|
-
if (name === 'placeholder')
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
pushMessage(msg) {
|
|
41
|
-
this._messages = [...this._messages, msg];
|
|
16
|
+
if (name === 'messages') {
|
|
17
|
+
try { this._messages = JSON.parse(val); } catch { this._messages = []; }
|
|
18
|
+
} else if (name === 'placeholder') {
|
|
19
|
+
this._placeholder = val || '';
|
|
20
|
+
}
|
|
42
21
|
this._render();
|
|
43
22
|
}
|
|
44
|
-
|
|
23
|
+
set messages(v) { this._messages = Array.isArray(v) ? v : []; this._render(); }
|
|
24
|
+
get messages() { return this._messages; }
|
|
25
|
+
set placeholder(v) { this._placeholder = v || ''; this._render(); }
|
|
26
|
+
get placeholder() { return this._placeholder; }
|
|
27
|
+
connectedCallback() { this.classList.add('ds-247420'); this._render(); }
|
|
28
|
+
_send(text) { this.dispatchEvent(new CustomEvent('send', { detail: { text }, bubbles: true, composed: true })); }
|
|
45
29
|
_render() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
const onInput = (v) => { this._draft = v; this._render(); };
|
|
51
|
-
const view = Chat({
|
|
52
|
-
title: this._title,
|
|
53
|
-
sub: this._sub,
|
|
54
|
-
messages: this._messages,
|
|
55
|
-
composer: ChatComposer({
|
|
56
|
-
value: this._draft,
|
|
57
|
-
placeholder: this._placeholder,
|
|
58
|
-
onInput,
|
|
59
|
-
onSend
|
|
60
|
-
})
|
|
61
|
-
});
|
|
62
|
-
webjsx.applyDiff(this, view);
|
|
30
|
+
if (!this.isConnected) return;
|
|
31
|
+
const node = Chat({ messages: this._messages, onSend: (t) => this._send(t) });
|
|
32
|
+
webjsx.applyDiff(this, node);
|
|
63
33
|
}
|
|
64
34
|
}
|
|
65
35
|
|
|
66
36
|
let _registered = false;
|
|
67
37
|
export function registerChatElement() {
|
|
68
38
|
if (_registered) return;
|
|
69
|
-
if (
|
|
39
|
+
if (typeof customElements === 'undefined') return;
|
|
40
|
+
if (customElements.get('ds-chat')) { _registered = true; return; }
|
|
41
|
+
customElements.define('ds-chat', DsChat);
|
|
70
42
|
_registered = true;
|
|
71
43
|
}
|
|
72
|
-
|
|
73
|
-
register('ds-chat', () => ({ registered: _registered, ..._stats, instances: document.querySelectorAll('ds-chat').length }));
|
|
74
|
-
|
|
75
|
-
export { DsChat };
|