symbiote-ui 0.3.0-alpha.65 → 0.3.0-alpha.67
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/CHANGELOG.md +15 -0
- package/canvas/NodeCanvas/NodeCanvas.js +56 -0
- package/canvas/node-canvas.js +6 -0
- package/custom-elements.json +612 -7
- package/display/CodeBlock/CodeBlock.css.js +52 -0
- package/display/CodeBlock/CodeBlock.js +164 -0
- package/display/CodeBlock/CodeBlock.tpl.js +4 -0
- package/docs/cascade-theme.md +75 -0
- package/docs/entry-points.md +2 -2
- package/docs/integration-contracts.md +24 -0
- package/index.js +11 -0
- package/locale/index.js +9 -0
- package/manifest/component-registry.js +72 -3
- package/package.json +6 -1
- package/themes/CascadeThemeEditor/CascadeThemeEditor.js +48 -2
- package/themes/CascadeThemeEditor/CascadeThemeEditor.tpl.js +9 -0
- package/themes/CascadeThemeImportDialog/CascadeThemeImportDialog.css.js +62 -0
- package/themes/CascadeThemeImportDialog/CascadeThemeImportDialog.js +1046 -0
- package/themes/CascadeThemeImportDialog/CascadeThemeImportDialog.tpl.js +59 -0
- package/themes/CascadeThemeWidget/CascadeThemeWidget.js +53 -3
- package/themes/CascadeThemeWidget/CascadeThemeWidget.tpl.js +8 -0
- package/themes/cascade-theme-presets.js +723 -0
- package/themes/cascade-theme-preview.js +312 -0
- package/themes/cascade-theme-share.js +418 -0
- package/ui/index.js +16 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@ All notable changes to `symbiote-ui` will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## [0.3.0-alpha.67] - 2026-07-19
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- The narrow `symbiote-ui/canvas/node-canvas` entrypoint now self-registers its internal `graph-node` dependency and re-exports `configureMaterialSymbols`, so composition-only hosts get fully upgraded graph nodes without importing the full UI bundle.
|
|
12
|
+
- A connected `node-canvas` now installs the system token cascade (`ensureSystemCascade`), so node card visuals (surface, border, radius, shadow) resolve on pages that never call `applyTheme`; the cascade stays visually inert on already-themed surfaces.
|
|
13
|
+
|
|
14
|
+
## [0.3.0-alpha.66] - 2026-07-18
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Added Node-safe sharing codec (`encodeCascadeThemeShare`, `decodeCascadeThemeShare`) and insert-only user preset store helpers (`insertCascadeThemeUserPreset`, `getCascadeThemeUserPreset`, `listCascadeThemeUserPresets`) to `symbiote-ui` root entrypoint.
|
|
19
|
+
- Added `<sn-theme-import-dialog>` (`CascadeThemeImportDialog`) component for browser hosts to preview, cancel, and apply shared theme tokens with zero-storage previews and rollback support.
|
|
20
|
+
- Added theme share actions and `share-label`/`shareLabel` properties to `cascade-theme-widget` and `cascade-theme-editor`, which dispatch a composed, bubbling `cascade-theme-share-request` event containing the detached theme state snapshot.
|
|
21
|
+
|
|
7
22
|
## [0.3.0-alpha.65] - 2026-07-18
|
|
8
23
|
|
|
9
24
|
### Fixed
|
|
@@ -23,6 +23,7 @@ import { Selector } from '../../interactions/Selector.js';
|
|
|
23
23
|
import { SnapGrid } from '../../interactions/SnapGrid.js';
|
|
24
24
|
import { isNodeInMarquee, isEdgeIntersectingRect } from '../../interactions/SelectionGeometry.js';
|
|
25
25
|
import { applyTheme } from '../../themes/Theme.js';
|
|
26
|
+
import { ensureSystemCascade } from '../../themes/system-cascade.js';
|
|
26
27
|
import { applyPalette } from '../../themes/Palette.js';
|
|
27
28
|
import { applySkin } from '../../themes/Skin.js';
|
|
28
29
|
import { NodeViewManager } from '../NodeViewManager.js';
|
|
@@ -120,6 +121,8 @@ function baseFlowMenuActions({ running = false, flowing = false, hasConnections
|
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
export class NodeCanvas extends Symbiote {
|
|
124
|
+
static observedAttributes = ['presentation'];
|
|
125
|
+
|
|
123
126
|
init$ = {
|
|
124
127
|
zoom: 1,
|
|
125
128
|
panX: 0,
|
|
@@ -128,6 +131,7 @@ export class NodeCanvas extends Symbiote {
|
|
|
128
131
|
minimapToggleTitle: translate('nodeCanvas.toggleMinimap'),
|
|
129
132
|
'+contentTransform': () =>
|
|
130
133
|
`translate(${this.$.panX}px, ${this.$.panY}px) scale(${this.$.zoom})`,
|
|
134
|
+
presentation: false,
|
|
131
135
|
};
|
|
132
136
|
|
|
133
137
|
/** @type {import('../../core/Editor.js').NodeEditor|null} */
|
|
@@ -679,6 +683,35 @@ export class NodeCanvas extends Symbiote {
|
|
|
679
683
|
this._viewManager?.setSnapEnabled(enabled);
|
|
680
684
|
}
|
|
681
685
|
|
|
686
|
+
get presentation() {
|
|
687
|
+
return this.connectedOnce ? this.$.presentation : this.init$.presentation;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
set presentation(val) {
|
|
691
|
+
const boolVal = !!val;
|
|
692
|
+
if (this.connectedOnce) {
|
|
693
|
+
this.$.presentation = boolVal;
|
|
694
|
+
} else {
|
|
695
|
+
this.init$.presentation = boolVal;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
700
|
+
if (oldValue === newValue) return;
|
|
701
|
+
if (name === 'presentation') {
|
|
702
|
+
this.presentation = newValue !== null;
|
|
703
|
+
} else {
|
|
704
|
+
super.attributeChangedCallback?.(name, oldValue, newValue);
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
setPresentationMode(enabled) {
|
|
709
|
+
this.setReadonly(enabled);
|
|
710
|
+
this.setChrome(!enabled);
|
|
711
|
+
this.setPanels(!enabled);
|
|
712
|
+
this.setViewportLocked(enabled);
|
|
713
|
+
}
|
|
714
|
+
|
|
682
715
|
/**
|
|
683
716
|
* Enable/disable readonly mode
|
|
684
717
|
* @param {boolean} enabled
|
|
@@ -2440,6 +2473,20 @@ export class NodeCanvas extends Symbiote {
|
|
|
2440
2473
|
}
|
|
2441
2474
|
|
|
2442
2475
|
renderCallback() {
|
|
2476
|
+
ensureSystemCascade(this.ownerDocument ?? globalThis.document);
|
|
2477
|
+
|
|
2478
|
+
let initialPresentationRun = true;
|
|
2479
|
+
this.sub('presentation', (value) => {
|
|
2480
|
+
this.toggleAttribute('presentation', !!value);
|
|
2481
|
+
if (initialPresentationRun) {
|
|
2482
|
+
initialPresentationRun = false;
|
|
2483
|
+
if (!value) {
|
|
2484
|
+
return;
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
this.setPresentationMode(!!value);
|
|
2488
|
+
});
|
|
2489
|
+
|
|
2443
2490
|
ensureMaterialSymbols(['map', 'play_arrow', 'stop', 'timeline']);
|
|
2444
2491
|
this.addEventListener('panel-menu-action', this._onPanelMenuAction);
|
|
2445
2492
|
|
|
@@ -2728,6 +2775,15 @@ export class NodeCanvas extends Symbiote {
|
|
|
2728
2775
|
this._clearConnectionSettleRefresh();
|
|
2729
2776
|
this._disconnectNodeResizeObserver();
|
|
2730
2777
|
this._hideFocusTransitionMarker();
|
|
2778
|
+
this._clearScheduledConnectionUpdates();
|
|
2779
|
+
if (this._suppressedResizeFlushTimer) {
|
|
2780
|
+
clearTimeout(this._suppressedResizeFlushTimer);
|
|
2781
|
+
this._suppressedResizeFlushTimer = 0;
|
|
2782
|
+
}
|
|
2783
|
+
if (this._panAnimFrame) {
|
|
2784
|
+
cancelAnimationFrame(this._panAnimFrame);
|
|
2785
|
+
this._panAnimFrame = null;
|
|
2786
|
+
}
|
|
2731
2787
|
if (this._viewport) this._viewport.clear();
|
|
2732
2788
|
if (this._drag) this._drag.destroy();
|
|
2733
2789
|
if (this._zoom) this._zoom.destroy();
|