@forgeax/app-shell 0.34.0 → 0.35.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/dist/dock.d.ts CHANGED
@@ -243,6 +243,8 @@ interface DockLayoutControlSnapshot<Anchor> {
243
243
  interface DockLayoutControlState<Anchor> {
244
244
  getSnapshot(): DockLayoutControlSnapshot<Anchor>;
245
245
  subscribe(listener: () => void): () => void;
246
+ /** Publish a fresh snapshot after the live Dock projection changes. */
247
+ refresh(): void;
246
248
  /** Toggle visibility and preserve the previous anchor when none is supplied. */
247
249
  toggle(anchor?: Anchor): void;
248
250
  /** Close without publishing a duplicate snapshot when already closed. */
package/dist/dock.js CHANGED
@@ -551,8 +551,8 @@ function installDockPanelCommandSubscriptions(source, commands) {
551
551
  function createDockLayoutControlState(initialAnchor = null) {
552
552
  let snapshot = { open: false, anchor: initialAnchor };
553
553
  const listeners = /* @__PURE__ */ new Set();
554
- const commit = (open, anchor) => {
555
- if (snapshot.open === open && snapshot.anchor === anchor) return;
554
+ const commit = (open, anchor, force = false) => {
555
+ if (!force && snapshot.open === open && snapshot.anchor === anchor) return;
556
556
  snapshot = { open, anchor };
557
557
  for (const listener of [...listeners]) {
558
558
  try {
@@ -572,6 +572,7 @@ function createDockLayoutControlState(initialAnchor = null) {
572
572
  listeners.delete(listener);
573
573
  };
574
574
  },
575
+ refresh: () => commit(snapshot.open, snapshot.anchor, true),
575
576
  toggle: (anchor) => commit(
576
577
  !snapshot.open,
577
578
  anchor === void 0 ? snapshot.anchor : anchor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeax/app-shell",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "Generic Dock, Panel, Window, and Slot composition primitives",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",