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.
Files changed (78) hide show
  1. package/app-shell.css +464 -2005
  2. package/colors_and_type.css +140 -626
  3. package/dist/247420.css +578 -2749
  4. package/dist/247420.js +23 -62
  5. package/package.json +22 -23
  6. package/src/bootstrap.js +5 -18
  7. package/src/components/chat.js +15 -15
  8. package/src/components/community.js +9 -7
  9. package/src/components/content.js +71 -54
  10. package/src/components/files-modals.js +4 -2
  11. package/src/components/files.js +6 -14
  12. package/src/components/freddie/helpers.js +38 -77
  13. package/src/components/freddie.js +32 -16
  14. package/src/components/shell.js +22 -15
  15. package/src/components.js +7 -3
  16. package/src/debug.js +21 -30
  17. package/src/deck-stage.js +10 -6
  18. package/src/highlight.js +25 -11
  19. package/src/index.js +29 -5
  20. package/src/{desktop → kits/os}/freddie/helpers.js +1 -1
  21. package/src/{desktop → kits/os}/freddie/pages-chat.js +2 -2
  22. package/src/{desktop → kits/os}/freddie/pages-core.js +2 -2
  23. package/src/{desktop → kits/os}/freddie/pages-os.js +1 -1
  24. package/src/{desktop → kits/os}/freddie/pages-tools.js +2 -2
  25. package/src/{desktop → kits/os}/freddie-dashboard.js +2 -2
  26. package/src/markdown.js +27 -49
  27. package/src/motion.js +30 -17
  28. package/src/page-html.js +18 -116
  29. package/src/styles.js +14 -22
  30. package/src/web-components/ds-chat.js +24 -56
  31. package/dist/247420.app.js +0 -5
  32. package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTT0zRp8A.ttf +0 -0
  33. package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTT6jRp8A.ttf +0 -0
  34. package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTTBjNp8A.ttf +0 -0
  35. package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTTNDNp8A.ttf +0 -0
  36. package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTTnTRp8A.ttf +0 -0
  37. package/dist/fonts/archivo_v25_k3k6o8UDI-1M0wlSV9XAw6lQkqWY8Q82sJaRE-NWIDdgffTTtDRp8A.ttf +0 -0
  38. package/dist/fonts/archivonarrow_v35_tss5ApVBdCYD5Q7hcxTE1ArZ0Zz8oY2KRmwvKhhv8laKpA.ttf +0 -0
  39. package/dist/fonts/archivonarrow_v35_tss5ApVBdCYD5Q7hcxTE1ArZ0Zz8oY2KRmwvKhhvHlGKpA.ttf +0 -0
  40. package/dist/fonts/archivonarrow_v35_tss5ApVBdCYD5Q7hcxTE1ArZ0Zz8oY2KRmwvKhhvLFGKpA.ttf +0 -0
  41. package/dist/fonts/archivonarrow_v35_tss5ApVBdCYD5Q7hcxTE1ArZ0Zz8oY2KRmwvKhhvy1aKpA.ttf +0 -0
  42. package/dist/fonts/jetbrainsmono_v24_tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8-qxjPQ.ttf +0 -0
  43. package/dist/fonts/jetbrainsmono_v24_tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8FqtjPQ.ttf +0 -0
  44. package/dist/fonts/jetbrainsmono_v24_tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8L6tjPQ.ttf +0 -0
  45. package/dist/fonts/jetbrainsmono_v24_tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxjPQ.ttf +0 -0
  46. package/dist/fonts/jetbrainsmono_v24_tDba2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO-LflOQ.ttf +0 -0
  47. package/dist/fonts/jetbrainsmono_v24_tDba2o-flEEny0FZhsfKu5WU4xD-IQ-PuZJJXxfpAO9seVOQ.ttf +0 -0
  48. package/dist/fonts/spacegrotesk_v22_V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj42Vksj.ttf +0 -0
  49. package/dist/fonts/spacegrotesk_v22_V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj4PVksj.ttf +0 -0
  50. package/dist/fonts/spacegrotesk_v22_V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7aUUsj.ttf +0 -0
  51. package/dist/fonts/spacegrotesk_v22_V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj7oUUsj.ttf +0 -0
  52. package/src/app.js +0 -156
  53. package/src/components/freddie/pages-chains.js +0 -168
  54. package/src/components/freddie/pages-chat.js +0 -122
  55. package/src/components/freddie/pages-config-edit.js +0 -174
  56. package/src/components/freddie/pages-config.js +0 -193
  57. package/src/components/freddie/pages-core.js +0 -170
  58. package/src/components/freddie/pages-runtime.js +0 -69
  59. package/src/components/freddie/pages-voice.js +0 -109
  60. package/src/web-components/freddie-chat.js +0 -34
  61. /package/src/{desktop → kits/os}/about-app.js +0 -0
  62. /package/src/{desktop → kits/os}/app-panes.css +0 -0
  63. /package/src/{desktop → kits/os}/browser-app.js +0 -0
  64. /package/src/{desktop → kits/os}/files-app.js +0 -0
  65. /package/src/{desktop → kits/os}/freddie/routes.js +0 -0
  66. /package/src/{desktop → kits/os}/freddie-dashboard.css +0 -0
  67. /package/src/{desktop → kits/os}/icons.js +0 -0
  68. /package/src/{desktop → kits/os}/index.js +0 -0
  69. /package/src/{desktop → kits/os}/launcher.css +0 -0
  70. /package/src/{desktop → kits/os}/launcher.js +0 -0
  71. /package/src/{desktop → kits/os}/monitor-app.js +0 -0
  72. /package/src/{desktop → kits/os}/shell.js +0 -0
  73. /package/src/{desktop → kits/os}/terminal-app.js +0 -0
  74. /package/src/{desktop → kits/os}/theme.css +0 -0
  75. /package/src/{desktop → kits/os}/validate.css +0 -0
  76. /package/src/{desktop → kits/os}/validator-app.js +0 -0
  77. /package/src/{desktop → kits/os}/wm.css +0 -0
  78. /package/src/{desktop → kits/os}/wm.js +0 -0
@@ -1,75 +1,43 @@
1
- import * as webjsx from '../../vendor/webjsx/index.js';
2
- import { Chat, ChatComposer } from '../components/chat.js';
3
- import { register } from '../debug.js';
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
- let _stats = { mounts: 0, sends: 0 };
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._draft = '';
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 === 'title') this._title = val || 'chat';
35
- if (name === 'sub') this._sub = val || '';
36
- if (name === 'placeholder') this._placeholder = val || 'message…';
37
- this._render();
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
- const onSend = (text) => {
47
- _stats.sends += 1;
48
- this.dispatchEvent(new CustomEvent('send', { detail: { text }, bubbles: true, composed: true }));
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 (!customElements.get('ds-chat')) customElements.define('ds-chat', DsChat);
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 };