@ai-ecoverse/slicc-spectrum 1.73.2 → 1.74.0

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.
@@ -9,6 +9,8 @@ import { ModelElement } from './base.js';
9
9
  export declare function ordered(agents: readonly Agent[]): Agent[];
10
10
  export declare function creatable(model: SliccModel | null | undefined): boolean;
11
11
  export declare function createCone(model: SliccModel, trigger: HTMLElement): Promise<Agent | undefined>;
12
+ export declare function scoopSummary(scoops: readonly Agent[]): string;
13
+ export declare function unreadCount(unread: number): string;
12
14
  export declare function fillShown(fill: number): boolean;
13
15
  export declare class SliccAgents extends ModelElement {
14
16
  #private;
@@ -2,7 +2,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
2
2
  import type { SliccModel } from '../model/types.js';
3
3
  import { type Color, ThemedElement } from './base.js';
4
4
  import { type FontFile } from './fonts.js';
5
- export declare const bridge = "(() => {\n const post = (message) => parent.postMessage(message, '*');\n window.slicc = {\n name: document.currentScript.dataset.name,\n lick(event) {\n const value = typeof event === 'string' ? { action: event } : event || {};\n post({ type: 'slicc-lick', action: String(value.action || ''), data: value.data ?? null, target: value.target ?? null });\n },\n };\n const wanted = new Set();\n let timer = 0;\n window.LucideIcons = {\n render() {\n for (const node of document.querySelectorAll('i[data-lucide]')) wanted.add(node.dataset.lucide);\n clearTimeout(timer);\n timer = setTimeout(() => post({ type: 'slicc-icons', names: [...wanted] }));\n },\n };\n const swap = (found) => {\n for (const node of document.querySelectorAll('i[data-lucide]')) {\n const markup = found[node.dataset.lucide];\n if (!markup) continue;\n const template = document.createElement('template');\n template.innerHTML = markup;\n const svg = template.content.firstElementChild;\n for (const { name, value } of node.attributes) {\n if (name === 'class') svg.setAttribute('class', svg.getAttribute('class') + ' ' + value);\n else if (name !== 'data-lucide') svg.setAttribute(name, value);\n }\n node.replaceWith(svg);\n }\n };\n const fonts = (list) => {\n for (const font of list) {\n const face = new FontFace(font.family, font.data, { weight: String(font.weight) });\n document.fonts.add(face);\n face.load().catch(() => {});\n }\n };\n addEventListener('message', (event) => {\n if (event.source !== parent) return;\n const message = event.data || {};\n if (message.type === 'slicc-icons') swap(message.icons);\n if (message.type === 'slicc-fonts') fonts(message.fonts);\n if (message.type === 'slicc-theme') document.documentElement.classList.toggle('theme-light', message.color === 'light');\n });\n const size = () => {\n const style = getComputedStyle(document.body);\n post({ type: 'slicc-size', height: Math.ceil(document.body.offsetHeight + parseFloat(style.marginTop) + parseFloat(style.marginBottom)) });\n };\n document.addEventListener('DOMContentLoaded', () => {\n window.LucideIcons.render();\n new ResizeObserver(size).observe(document.body);\n });\n post({ type: 'slicc-ready' });\n})();";
5
+ export declare const bridge = "(() => {\n const post = (message) => parent.postMessage(message, '*');\n window.slicc = {\n name: document.currentScript.dataset.name,\n lick(event) {\n const value = typeof event === 'string' ? { action: event } : event || {};\n post({ type: 'slicc-lick', action: String(value.action || ''), data: value.data ?? null, target: value.target ?? null });\n },\n };\n const wanted = new Set();\n let timer = 0;\n window.LucideIcons = {\n render() {\n for (const node of document.querySelectorAll('i[data-lucide]')) wanted.add(node.dataset.lucide);\n clearTimeout(timer);\n timer = setTimeout(() => post({ type: 'slicc-icons', names: [...wanted] }));\n },\n };\n const swap = (found) => {\n for (const node of document.querySelectorAll('i[data-lucide]')) {\n const markup = found[node.dataset.lucide];\n if (!markup) continue;\n const template = document.createElement('template');\n template.innerHTML = markup;\n const svg = template.content.firstElementChild;\n for (const { name, value } of node.attributes) {\n if (name === 'class') svg.setAttribute('class', svg.getAttribute('class') + ' ' + value);\n else if (name !== 'data-lucide') svg.setAttribute(name, value);\n }\n node.replaceWith(svg);\n }\n size();\n };\n const fonts = (list) => {\n for (const font of list) {\n const face = new FontFace(font.family, font.data, { weight: String(font.weight) });\n document.fonts.add(face);\n face.load().then(size, () => {});\n }\n };\n addEventListener('message', (event) => {\n if (event.source !== parent) return;\n const message = event.data || {};\n if (message.type === 'slicc-icons') swap(message.icons);\n if (message.type === 'slicc-fonts') fonts(message.fonts);\n if (message.type === 'slicc-theme') document.documentElement.classList.toggle('theme-light', message.color === 'light');\n });\n const size = () => {\n const style = getComputedStyle(document.body);\n post({ type: 'slicc-size', height: Math.ceil(document.body.offsetHeight + parseFloat(style.marginTop) + parseFloat(style.marginBottom)) });\n };\n document.addEventListener('DOMContentLoaded', () => {\n window.LucideIcons.render();\n size();\n new ResizeObserver(size).observe(document.body);\n });\n post({ type: 'slicc-ready' });\n})();";
6
6
  export declare function literal(value: unknown): string;
7
7
  export declare function store(state: unknown): string;
8
8
  export declare function frameDocument(source: string, color: Color, name: string, state?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-spectrum",
3
- "version": "1.73.2",
3
+ "version": "1.74.0",
4
4
  "description": "Web components for SLICC on Spectrum Web Components: the terminal, the app shell and its surfaces",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -73,10 +73,10 @@
73
73
  "@adobe/spectrum-wc": "2.0.0-beta.5",
74
74
  "@adobe/spectrum-wc-icons": "2.0.0-beta.5",
75
75
  "@ai-ecoverse/slicc-kernel": "1.94.1",
76
- "@ai-ecoverse/slicc-shared-web": "1.16.0",
76
+ "@ai-ecoverse/slicc-shared-web": "1.18.1",
77
77
  "@ai-ecoverse/slicc-vault": "1.9.1",
78
78
  "@ai-ecoverse/wasm-bash": "5.3.0-18",
79
- "@ai-ecoverse/wasm-coreutils": "9.7.0-3",
79
+ "@ai-ecoverse/wasm-coreutils": "9.12.0-6",
80
80
  "@biomejs/biome": "2.5.15",
81
81
  "@fontsource/source-code-pro": "5.3.0",
82
82
  "@happy-dom/global-registrator": "20.14.5",