@ai-ecoverse/slicc-spectrum 1.17.0 → 1.19.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.
- package/README.md +11 -0
- package/dist/slicc-dummy.js +4 -4
- package/dist/slicc-dummy.js.map +1 -1
- package/dist/slicc-ui.js +2361 -1902
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/confirm.d.ts +32 -0
- package/dist/types/app/sprinkle-tokens.d.ts +5 -0
- package/dist/types/app/sprinkle.d.ts +5 -4
- package/dist/types/ui.d.ts +4 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -149,6 +149,7 @@ Text is Adobe Clean Spectrum VF, falling back to Adobe Clean, and code is Spectr
|
|
|
149
149
|
| `<slicc-freezer>` | Frozen cones, archived with their scoops: thaw to bring one back, delete, or freeze the active cone (also `/freeze`). |
|
|
150
150
|
| `<slicc-sprinkle>` | A SLICC sprinkle (`.shtml`), as a panel or, with `inline`, as a dip in the chat that grows to fit. A dip has a tab-like handle: drag it into the dock (or onto a rail, or use its open-as-panel button) and it lives on as a sprinkle panel, with a note in the chat where it was; which dips are out is saved in `slicc-ui.dips`. It runs in a sandboxed frame (`allow-scripts` only) with SLICC's sprinkle theme (the `--s2-*` tokens and `.sprinkle-*` classes), the app's fonts, and Lucide icons (`<i data-lucide>`, `LucideIcons.render()`). Its only way back is `slicc.lick({ action, data })`, which reaches the owning cone as a `sprinkle` lick. Panel sprinkles sit at the top of the right rail with their Lucide icon. |
|
|
151
151
|
| `<slicc-tray>` | The tray indicator in the header: connection, the float's name, followers and budget; its panel adds role, runtime, spend, the follower list, the join link, and disconnect or reconnect. |
|
|
152
|
+
| `<slicc-confirm>` | The confirmation dialog `confirm()` opens. Not for direct use. |
|
|
152
153
|
| `<slicc-file-tree>` | Generic. [`@pierre/trees`](https://www.npmjs.com/package/@pierre/trees) through its `web-components` entry: `paths` (folders end in `/`), `gitStatus`, `expanded`, `reveal(path, focus)`. Fires `file-open` on click and on <kbd>Enter</kbd>. |
|
|
153
154
|
| `<slicc-code-view>` | Generic. A highlighted file through [`@pierre/diffs`](https://www.npmjs.com/package/@pierre/diffs): `path`, `contents`, `color`. |
|
|
154
155
|
| `<slicc-diff-view>` | Generic. A diff through `@pierre/diffs`: `path`, `oldText`, `newText` (`null` for an added or deleted file), `color`, `diff-style` (`unified` or `split`). |
|
|
@@ -157,6 +158,16 @@ Files and diffs open in one editor group next to the chat. Panels ask for them w
|
|
|
157
158
|
|
|
158
159
|
Keys: <kbd>Alt</kbd>+<kbd>1</kbd>… opens and focuses a panel, <kbd>F6</kbd> and <kbd>Shift</kbd>+<kbd>F6</kbd> move between groups, <kbd>Ctrl</kbd>+<kbd>]</kbd> and <kbd>Ctrl</kbd>+<kbd>[</kbd> between tabs, <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> switches the theme. In terminal and browser tab strips, <kbd>←</kbd> and <kbd>→</kbd> switch tabs. In the agents and changes lists, arrows, <kbd>Home</kbd>, <kbd>End</kbd> and <kbd>Enter</kbd>; in the file tree, its own arrow keys and <kbd>Enter</kbd> to open. In the composer, <kbd>Enter</kbd> sends, <kbd>Shift</kbd>+<kbd>Enter</kbd> adds a line and <kbd>Esc</kbd> stops a reply.
|
|
159
160
|
|
|
161
|
+
### Confirmations
|
|
162
|
+
|
|
163
|
+
Destructive actions ask first: reverting one change or all, deleting a frozen cone, forgetting a memory, disconnecting an account or the tray, and closing a terminal. `confirm({ title, body, action, variant, trigger })`, exported from `dist/slicc-ui.js`, opens a modal alert dialog (1.12 `sp-alert-dialog`, as Gen2 has no dialog yet) inside `<slicc-app>`'s themed shadow root and resolves `true` on the action and `false` on Cancel or <kbd>Esc</kbd>. Focus starts on Cancel and goes back to `trigger` (default: the focused element) when it closes. `variant` is `destructive` (default, a negative action button) for actions that lose data for good, or `confirmation` (accent) for ones you can take back, like disconnecting. Title the dialog with a question, say what can’t be undone in `body`, and name the action with a verb.
|
|
164
|
+
|
|
165
|
+
```js
|
|
166
|
+
import { confirm } from './dist/slicc-ui.js';
|
|
167
|
+
|
|
168
|
+
if (await confirm({ title: 'Delete harbor?', body: 'Its scoops and messages are deleted. You can’t undo this.', action: 'Delete' })) remove();
|
|
169
|
+
```
|
|
170
|
+
|
|
160
171
|
### Model
|
|
161
172
|
|
|
162
173
|
`SliccModel` (`src/model/types.ts`) has one port per future backend, so adapters can replace the dummy without UI changes. Every port is subscribable with `on(type, listener)`, which returns an unsubscribe function.
|
package/dist/slicc-dummy.js
CHANGED
|
@@ -918,8 +918,8 @@ var suggestions_default = `<!DOCTYPE html>
|
|
|
918
918
|
var USE_CASE_CACHE_MS = 12 * 60 * 60 * 1000;
|
|
919
919
|
var EMPTY_HEADLINE = 'Nothing here yet';
|
|
920
920
|
var EMPTY_BODY =
|
|
921
|
-
'The gelatiere reads how you actually work
|
|
922
|
-
'ends
|
|
921
|
+
'The gelatiere reads how you actually work, nightly and after each chat ' +
|
|
922
|
+
'ends, and leaves what it finds here: a skill worth installing, a use ' +
|
|
923
923
|
'case worth trying, a habit worth changing. Check back after your next session.';
|
|
924
924
|
|
|
925
925
|
function el(tag, className, text) {
|
|
@@ -989,13 +989,13 @@ var suggestions_default = `<!DOCTYPE html>
|
|
|
989
989
|
actions.appendChild(gelatierePrimaryButton(meta.action, function () {
|
|
990
990
|
if (window.slicc) slicc.lick({ action: 'gelatiere-install',
|
|
991
991
|
data: { id: s.id, skill: s.skill || null, install: s.install || null, title: s.title } });
|
|
992
|
-
markTaken('Installing
|
|
992
|
+
markTaken('Installing. The cone is on it.');
|
|
993
993
|
}));
|
|
994
994
|
} else if (meta.action && s.prompt) {
|
|
995
995
|
actions.appendChild(gelatierePrimaryButton(meta.action, function () {
|
|
996
996
|
if (window.slicc) slicc.lick({ action: 'gelatiere-try',
|
|
997
997
|
data: { id: s.id, prompt: s.prompt, title: s.title } });
|
|
998
|
-
markTaken('Sent to the cone
|
|
998
|
+
markTaken('Sent to the cone. Watch the chat.');
|
|
999
999
|
}));
|
|
1000
1000
|
} else if (s.url && /^https?:\\/\\//i.test(s.url)) {
|
|
1001
1001
|
|