@wippy-fe/webcomponent-vue 0.0.51 → 0.0.52

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 CHANGED
@@ -172,3 +172,30 @@ class MyElement extends WippyVueElement {
172
172
  ```
173
173
 
174
174
  All the boilerplate (shadow DOM, CSS, prop parsing, Vue lifecycle, Pinia, providers) is handled by the base classes.
175
+
176
+ ## Host-owned logical visibility
177
+
178
+ Use `useHostVisibility()` inside a `WippyVueElement` to read the host's logical activity without coupling to CSS or viewport visibility:
179
+
180
+ ```ts
181
+ const hostVisible = useHostVisibility() // Ref<boolean | null>
182
+ watch(hostVisible, (next, previous) => {
183
+ if (previous === false && next === true)
184
+ refreshRetainedData()
185
+ })
186
+ ```
187
+
188
+ `null` means the element is unmanaged. The ref is seeded before the Vue app mounts, then updates without reparenting or remounting the custom element. The initial value is not a transition; components own cancellation and stale-response handling for any retained-data refresh.
189
+
190
+ Use `useHostVisibilityRefresh(task)` when a direct WC already has one ordinary
191
+ initial load and should repeat that task only after `false -> true`. It runs
192
+ `task` once from Vue's `onMounted`, returns the same visibility ref, and leaves
193
+ sync or async failures in Vue error handling. It serializes an in-flight load
194
+ and coalesces any number of intervening reveals into one trailing refresh. It
195
+ never reloads the browser.
196
+
197
+ The callback still owns cancellation when the component unmounts and stale
198
+ response handling when the same data can be loaded through another path. Put
199
+ every remote dataset loaded by the ordinary mounted task in this callback, but
200
+ keep local UI state, subscriptions, and non-idempotent realtime setup outside
201
+ it.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { LayoutBusBound, WippyElement } from '@wippy-fe/webcomponent-core';
2
- export { BroadcastEnvelope, ContentListener, ContentSubscription, EventEmitterHandle, HostCssKey, LayoutBusBound, ParseResult, PropsListener, PropsSubscription, ReactiveAdapter, SubscribeOptions, WippyElement, WippyElementConfig, WippyPropDefinition, WippyPropsSchema, define } from '@wippy-fe/webcomponent-core';
2
+ export { BroadcastEnvelope, ContentListener, ContentSubscription, EventEmitterHandle, HostCssKey, HostVisibilityListener, HostVisibilitySubscription, LayoutBusBound, ParseResult, PropsListener, PropsSubscription, ReactiveAdapter, SubscribeOptions, WippyElement, WippyElementConfig, WippyPropDefinition, WippyPropsSchema, define } from '@wippy-fe/webcomponent-core';
3
3
  import { InjectionKey, Ref, Component, App } from 'vue';
4
4
  import { PiniaPlugin } from 'pinia';
5
5
 
@@ -31,6 +31,11 @@ declare const LAYOUT_BUS_PROVIDER: InjectionKey<LayoutBusBound | null>;
31
31
  * host (callers fall back to importing `host` from `@wippy-fe/proxy`).
32
32
  */
33
33
  declare const HOST_PROVIDER: InjectionKey<unknown>;
34
+ /**
35
+ * Reactive logical activity owned by the embedding host. `null` means this
36
+ * component is unmanaged (for example, mounted directly by an application).
37
+ */
38
+ declare const HOST_VISIBILITY_PROVIDER: InjectionKey<Ref<boolean | null>>;
34
39
  /**
35
40
  * Inject the reactive props ref, typed to your component's props interface.
36
41
  *
@@ -129,6 +134,20 @@ declare function useLayoutBus(): LayoutBusBound | null;
129
134
  * ```
130
135
  */
131
136
  declare function useHost<H = unknown>(): H | null;
137
+ /**
138
+ * Read host-owned logical activity without coupling it to CSS or viewport
139
+ * visibility. Hosts update this ref without remounting the web component.
140
+ */
141
+ declare function useHostVisibility(): Ref<boolean | null>;
142
+ /**
143
+ * Preserve a component's ordinary initial load, then refresh retained data
144
+ * only when the host reveals a previously inactive element. The callback is
145
+ * serialized so a reveal cannot race an in-flight load. Multiple reveals
146
+ * during one load coalesce into one trailing refresh. The resulting promise
147
+ * is returned to Vue lifecycle/watch handlers so failures continue through
148
+ * Vue's normal error handling.
149
+ */
150
+ declare function useHostVisibilityRefresh(task: () => void | Promise<void>): Ref<boolean | null>;
132
151
  /**
133
152
  * Typed provider keys for a specific component.
134
153
  */
@@ -213,6 +232,7 @@ declare abstract class WippyVueElement<Props = Record<string, unknown>, Events =
213
232
  private _propsRef;
214
233
  private _errorsRef;
215
234
  private _contentRef;
235
+ private _hostVisibilityRef;
216
236
  /** Cleanup handle for the core-adapter → Vue-ref bridge subscription. */
217
237
  private _bridgeAbort;
218
238
  /**
@@ -223,4 +243,4 @@ declare abstract class WippyVueElement<Props = Record<string, unknown>, Events =
223
243
  protected onUnmount(): void;
224
244
  }
225
245
 
226
- export { CONTENT_PROVIDER, EVENT_PROVIDER, HOST_PROVIDER, LAYOUT_BUS_PROVIDER, PANEL_ID_PROVIDER, PROPS_ERROR_PROVIDER, PROPS_PROVIDER, type TypedProviders, WippyVueElement, type WippyVueElementConfig, type WippyVueMountConfig, createProviders, useContent, useEvents, useHost, useLayoutBus, usePanelId, useProps, usePropsErrors };
246
+ export { CONTENT_PROVIDER, EVENT_PROVIDER, HOST_PROVIDER, HOST_VISIBILITY_PROVIDER, LAYOUT_BUS_PROVIDER, PANEL_ID_PROVIDER, PROPS_ERROR_PROVIDER, PROPS_PROVIDER, type TypedProviders, WippyVueElement, type WippyVueElementConfig, type WippyVueMountConfig, createProviders, useContent, useEvents, useHost, useHostVisibility, useHostVisibilityRefresh, useLayoutBus, usePanelId, useProps, usePropsErrors };
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
 
5
5
  // src/providers.ts
6
- import { inject } from "vue";
6
+ import { inject, onMounted, onUnmounted, watch } from "vue";
7
7
  var EVENT_PROVIDER = /* @__PURE__ */ Symbol("wippy:emit");
8
8
  var PROPS_PROVIDER = /* @__PURE__ */ Symbol("wippy:props");
9
9
  var PROPS_ERROR_PROVIDER = /* @__PURE__ */ Symbol("wippy:props_error");
@@ -11,6 +11,7 @@ var CONTENT_PROVIDER = /* @__PURE__ */ Symbol("wippy:content");
11
11
  var PANEL_ID_PROVIDER = /* @__PURE__ */ Symbol("wippy:panel-id");
12
12
  var LAYOUT_BUS_PROVIDER = /* @__PURE__ */ Symbol("wippy:layout-bus");
13
13
  var HOST_PROVIDER = /* @__PURE__ */ Symbol("wippy:host");
14
+ var HOST_VISIBILITY_PROVIDER = /* @__PURE__ */ Symbol("wippy:host-visibility");
14
15
  function useProps() {
15
16
  const props = inject(PROPS_PROVIDER);
16
17
  if (!props)
@@ -44,6 +45,54 @@ function useLayoutBus() {
44
45
  function useHost() {
45
46
  return inject(HOST_PROVIDER, null);
46
47
  }
48
+ function useHostVisibility() {
49
+ const visible = inject(HOST_VISIBILITY_PROVIDER);
50
+ if (!visible)
51
+ throw new Error("useHostVisibility() must be called inside a WippyVueElement");
52
+ return visible;
53
+ }
54
+ function useHostVisibilityRefresh(task) {
55
+ const visible = useHostVisibility();
56
+ let mounted = false;
57
+ let running = null;
58
+ let refreshQueued = false;
59
+ function runTask() {
60
+ if (running) {
61
+ refreshQueued = true;
62
+ return running;
63
+ }
64
+ let current;
65
+ try {
66
+ current = Promise.resolve(task());
67
+ } catch (error) {
68
+ current = Promise.reject(error);
69
+ }
70
+ const scheduled = current.finally(() => {
71
+ if (running !== scheduled)
72
+ return;
73
+ running = null;
74
+ if (mounted && refreshQueued) {
75
+ refreshQueued = false;
76
+ return runTask();
77
+ }
78
+ });
79
+ running = scheduled;
80
+ return scheduled;
81
+ }
82
+ onMounted(() => {
83
+ mounted = true;
84
+ return runTask();
85
+ });
86
+ onUnmounted(() => {
87
+ mounted = false;
88
+ refreshQueued = false;
89
+ });
90
+ watch(visible, (next, previous) => {
91
+ if (mounted && previous === false && next === true)
92
+ return runTask();
93
+ });
94
+ return visible;
95
+ }
47
96
  function createProviders() {
48
97
  return {
49
98
  EVENT_PROVIDER,
@@ -63,6 +112,7 @@ var WippyVueElement = class extends WippyElement {
63
112
  __publicField(this, "_propsRef", ref({}));
64
113
  __publicField(this, "_errorsRef", ref([]));
65
114
  __publicField(this, "_contentRef", ref(null));
115
+ __publicField(this, "_hostVisibilityRef", ref(null));
66
116
  /** Cleanup handle for the core-adapter → Vue-ref bridge subscription. */
67
117
  __publicField(this, "_bridgeAbort", null);
68
118
  }
@@ -77,6 +127,7 @@ var WippyVueElement = class extends WippyElement {
77
127
  this._propsRef.value = initialProps;
78
128
  this._errorsRef.value = initialErrors;
79
129
  this._contentRef.value = initialContent ?? null;
130
+ this._hostVisibilityRef.value = this.hostVisible;
80
131
  for (const error of initialErrors) {
81
132
  this.emitEvent("invalid", { message: error });
82
133
  }
@@ -94,6 +145,9 @@ var WippyVueElement = class extends WippyElement {
94
145
  this._contentRef.value = content;
95
146
  }, { signal: bridgeAbort.signal });
96
147
  }
148
+ this.reactive.hostVisibility.subscribe((visible) => {
149
+ this._hostVisibilityRef.value = visible;
150
+ }, { signal: bridgeAbort.signal });
97
151
  const mountApp = (mountConfig) => {
98
152
  if (bridgeAbort.signal.aborted)
99
153
  return;
@@ -114,6 +168,7 @@ var WippyVueElement = class extends WippyElement {
114
168
  app.provide(PROPS_ERROR_PROVIDER, this._errorsRef);
115
169
  app.provide(EVENT_PROVIDER, this.emitEvent.bind(this));
116
170
  app.provide(CONTENT_PROVIDER, this._contentRef);
171
+ app.provide(HOST_VISIBILITY_PROVIDER, this._hostVisibilityRef);
117
172
  app.provide(PANEL_ID_PROVIDER, getWippyPanelId(this));
118
173
  app.provide(LAYOUT_BUS_PROVIDER, getWippyHostBus(this));
119
174
  app.provide(HOST_PROVIDER, getWippyHost(this));
@@ -164,6 +219,7 @@ export {
164
219
  CONTENT_PROVIDER,
165
220
  EVENT_PROVIDER,
166
221
  HOST_PROVIDER,
222
+ HOST_VISIBILITY_PROVIDER,
167
223
  LAYOUT_BUS_PROVIDER,
168
224
  PANEL_ID_PROVIDER,
169
225
  PROPS_ERROR_PROVIDER,
@@ -175,6 +231,8 @@ export {
175
231
  useContent,
176
232
  useEvents,
177
233
  useHost,
234
+ useHostVisibility,
235
+ useHostVisibilityRefresh,
178
236
  useLayoutBus,
179
237
  usePanelId,
180
238
  useProps,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/providers.ts","../src/vue-element.ts","../src/index.ts"],"sourcesContent":["import type { LayoutBusBound } from '@wippy-fe/webcomponent-core'\r\nimport type { InjectionKey, Ref } from 'vue'\r\nimport { inject } from 'vue'\r\n\r\n// ── Base injection keys (untyped) ────────────────────────────\r\n\r\n/** Injection key for the event emitter function. */\r\nexport const EVENT_PROVIDER = Symbol('wippy:emit') as InjectionKey<\r\n (event: string, detail?: unknown) => void\r\n>\r\n\r\n/** Injection key for the reactive props ref. */\r\nexport const PROPS_PROVIDER = Symbol('wippy:props') as InjectionKey<Ref<Record<string, unknown>>>\r\n\r\n/** Injection key for the reactive props error ref. */\r\nexport const PROPS_ERROR_PROVIDER = Symbol('wippy:props_error') as InjectionKey<Ref<string[]>>\r\n\r\n/** Injection key for reactive content from child <template data-type=\"...\"> elements. */\r\nexport const CONTENT_PROVIDER = Symbol('wippy:content') as InjectionKey<Ref<string | null>>\r\n\r\n/**\r\n * Injection key for the panelId this web component lives in (when\r\n * mounted inside a managed-layout `kind: 'component'` panel). `null`\r\n * outside a managed-layout host.\r\n */\r\nexport const PANEL_ID_PROVIDER = Symbol('wippy:panel-id') as InjectionKey<string | null>\r\n\r\n/**\r\n * Injection key for the panel-bound layout bus. Use to publish or\r\n * subscribe to in-tab broadcasts. `null` outside a managed-layout\r\n * host.\r\n */\r\nexport const LAYOUT_BUS_PROVIDER = Symbol('wippy:layout-bus') as InjectionKey<LayoutBusBound | null>\r\n\r\n/**\r\n * Injection key for the panel-scoped `host` wrapper attached by the\r\n * managed-layout shell. Same shape as the iframe-side `host`; layout\r\n * broadcast / send / on are routed through the panel-bound bus so\r\n * sourcePanelId attribution is correct. `null` outside a managed-layout\r\n * host (callers fall back to importing `host` from `@wippy-fe/proxy`).\r\n */\r\nexport const HOST_PROVIDER = Symbol('wippy:host') as InjectionKey<unknown>\r\n\r\n// ── Composables (typed) ──────────────────────────────────────\r\n\r\n/**\r\n * Inject the reactive props ref, typed to your component's props interface.\r\n *\r\n * Must be called inside a Vue component's `setup()` that lives within a `WippyVueElement`.\r\n *\r\n * ```ts\r\n * const props = useProps<ComponentProps>()\r\n * // props is Ref<ComponentProps>\r\n * console.log(props.value.maxFileSize)\r\n * ```\r\n */\r\nexport function useProps<Props>(): Ref<Props> {\r\n const props = inject(PROPS_PROVIDER)\r\n if (!props)\r\n throw new Error('useProps() must be called inside a WippyVueElement')\r\n return props as unknown as Ref<Props>\r\n}\r\n\r\n/**\r\n * Inject the typed event emitter, constrained to your component's event map.\r\n *\r\n * Must be called inside a Vue component's `setup()` that lives within a `WippyVueElement`.\r\n *\r\n * ```ts\r\n * const emit = useEvents<Events>()\r\n * emit('upload-complete', { fileId: '123', status: 'done' }) // fully typed\r\n * ```\r\n */\r\nexport function useEvents<Events>(): <K extends keyof Events>(event: K, detail: Events[K]) => void {\r\n const emit = inject(EVENT_PROVIDER)\r\n if (!emit)\r\n throw new Error('useEvents() must be called inside a WippyVueElement')\r\n return emit as unknown as <K extends keyof Events>(event: K, detail: Events[K]) => void\r\n}\r\n\r\n/**\r\n * Inject the reactive prop validation errors ref.\r\n *\r\n * Must be called inside a Vue component's `setup()` that lives within a `WippyVueElement`.\r\n *\r\n * ```ts\r\n * const errors = usePropsErrors()\r\n * // errors is Ref<string[]>\r\n * ```\r\n */\r\nexport function usePropsErrors(): Ref<string[]> {\r\n const errors = inject(PROPS_ERROR_PROVIDER)\r\n if (!errors)\r\n throw new Error('usePropsErrors() must be called inside a WippyVueElement')\r\n return errors\r\n}\r\n\r\n/**\r\n * Inject the reactive content ref (from child `<template data-type=\"...\">` elements).\r\n *\r\n * Must be called inside a Vue component's `setup()` within a `WippyVueElement`\r\n * that has `contentTemplate` configured.\r\n *\r\n * ```ts\r\n * const content = useContent()\r\n * // content is Ref<string | null>\r\n * ```\r\n */\r\nexport function useContent(): Ref<string | null> {\r\n const content = inject(CONTENT_PROVIDER)\r\n if (!content)\r\n throw new Error('useContent() must be called inside a WippyVueElement with contentTemplate configured')\r\n return content\r\n}\r\n\r\n/**\r\n * Inject the current panelId (from `data-wippy-panel-id` set by the\r\n * managed-layout `ComponentResolver`). Returns `null` outside a\r\n * managed-layout host or when not inside a `kind: 'component'` panel.\r\n *\r\n * **Status: Draft 1 (preview).** Part of the managed-layout API; see\r\n * `managed-layout.md` in the gen-2-chat repo. Field names may change\r\n * between minor releases until a production consumer drives the\r\n * corner cases out.\r\n *\r\n * ```ts\r\n * const panelId = usePanelId()\r\n * if (panelId) console.log('I am the', panelId, 'panel')\r\n * ```\r\n */\r\nexport function usePanelId(): string | null {\r\n return inject(PANEL_ID_PROVIDER, null)\r\n}\r\n\r\n/**\r\n * Inject the panel-bound layout bus. `null` outside a managed-layout\r\n * host. Use to publish on the in-tab bus or subscribe to broadcasts\r\n * targeted at this panel.\r\n *\r\n * **Status: Draft 1 (preview).** Part of the managed-layout API; see\r\n * `managed-layout.md` in the gen-2-chat repo.\r\n *\r\n * ```ts\r\n * const bus = useLayoutBus()\r\n * bus?.subscribe(({ channel, payload, sourcePanelId }) => { ... })\r\n * bus?.broadcast('open-chat', { token: '...' })\r\n * ```\r\n */\r\nexport function useLayoutBus(): LayoutBusBound | null {\r\n return inject(LAYOUT_BUS_PROVIDER, null)\r\n}\r\n\r\n/**\r\n * Inject the panel-scoped `host` wrapper. `null` outside a\r\n * managed-layout host. Subclass code that needs a host in non-layout\r\n * contexts can fall back to `import { host } from '@wippy-fe/proxy'`.\r\n *\r\n * Pass the host shape as the type parameter to access fields like\r\n * `layout.broadcast`. The default `H = unknown` keeps callers honest\r\n * about narrowing before use.\r\n *\r\n * **Status: Draft 1 (preview).** Part of the managed-layout API; see\r\n * `managed-layout.md` in the gen-2-chat repo.\r\n *\r\n * ```ts\r\n * import type { ProxyApiInstance } from '@wippy-fe/proxy'\r\n *\r\n * const host = useHost<ProxyApiInstance['host']>()\r\n * host?.layout.broadcast('open-chat', { token })\r\n * host?.layout.updatePanel('right', { route: '/foo' })\r\n * ```\r\n */\r\nexport function useHost<H = unknown>(): H | null {\r\n return inject(HOST_PROVIDER, null) as H | null\r\n}\r\n\r\n// ── createProviders (typed injection keys) ───────────────────\r\n\r\n/**\r\n * Typed provider keys for a specific component.\r\n */\r\nexport interface TypedProviders<Props, Events> {\r\n EVENT_PROVIDER: InjectionKey<<K extends keyof Events>(event: K, detail: Events[K]) => void>\r\n PROPS_PROVIDER: InjectionKey<Ref<Props>>\r\n PROPS_ERROR_PROVIDER: InjectionKey<Ref<string[]>>\r\n}\r\n\r\n/**\r\n * Creates typed provider injection keys for a specific component.\r\n *\r\n * Use this if you prefer raw `inject(KEY)` over the composable helpers.\r\n * Returns the same Symbol instances with narrowed types.\r\n *\r\n * ```ts\r\n * export const { EVENT_PROVIDER, PROPS_PROVIDER, PROPS_ERROR_PROVIDER } =\r\n * createProviders<ComponentProps, Events>()\r\n * ```\r\n */\r\nexport function createProviders<Props, Events = Record<string, unknown>>(): TypedProviders<Props, Events> {\r\n return {\r\n EVENT_PROVIDER: EVENT_PROVIDER as unknown as TypedProviders<Props, Events>['EVENT_PROVIDER'],\r\n PROPS_PROVIDER: PROPS_PROVIDER as unknown as TypedProviders<Props, Events>['PROPS_PROVIDER'],\r\n PROPS_ERROR_PROVIDER,\r\n }\r\n}\r\n","import type { PiniaPlugin } from 'pinia'\r\nimport type { App, Component, Ref } from 'vue'\r\nimport { getWippyHost, getWippyHostBus, getWippyPanelId, WippyElement } from '@wippy-fe/webcomponent-core'\r\nimport { createPinia, getActivePinia, setActivePinia } from 'pinia'\r\nimport { createApp, ref } from 'vue'\r\nimport { CONTENT_PROVIDER, EVENT_PROVIDER, HOST_PROVIDER, LAYOUT_BUS_PROVIDER, PANEL_ID_PROVIDER, PROPS_ERROR_PROVIDER, PROPS_PROVIDER } from './providers.ts'\r\n\r\n/**\r\n * The heavy half of a Vue element's config — the root component, its plugins,\r\n * and providers. Either supplied eagerly on `WippyVueElementConfig` or returned\r\n * by `lazyConfig()` from a dynamically-imported chunk (so the element shell can\r\n * stay tiny and load the framework + component tree on first connect).\r\n */\r\nexport interface WippyVueMountConfig {\r\n /** The root Vue component to mount. */\r\n rootComponent: Component\r\n /** Additional Vue plugins to install (beyond Pinia which is always installed). */\r\n plugins?: Array<{ install: (app: App) => void }>\r\n /** Pinia plugins to install (e.g., createWippyPersist()). */\r\n piniaPlugins?: PiniaPlugin[]\r\n /** Extra providers to inject into the Vue app. */\r\n providers?: (app: App, element: WippyVueElement<any, any>) => void\r\n}\r\n\r\n/**\r\n * Vue-specific configuration returned by `static get vueConfig()`.\r\n *\r\n * Provide EITHER an eager `rootComponent` (+ optional plugins/providers) for a\r\n * normal element, OR `lazyConfig` for a thin shell that defers the heavy parts:\r\n * when `lazyConfig` is set and `rootComponent` is omitted, `onMount` shows a\r\n * `<wippy-loading>` placeholder, awaits `lazyConfig()` (typically `() =>\r\n * import('./internals').then(m => ({ rootComponent: m.Root, providers: m.boot }))`),\r\n * then mounts. The props/events bridge + lifecycle stay here, so the lazily\r\n * imported chunk only carries the framework + component tree.\r\n */\r\nexport interface WippyVueElementConfig extends Partial<WippyVueMountConfig> {\r\n /** Lazily resolve the mount config (root + plugins + providers) on first connect. */\r\n lazyConfig?: () => Promise<WippyVueMountConfig>\r\n}\r\n\r\n/**\r\n * Vue 3 integration for Wippy web components.\r\n *\r\n * Generic over `Props` (parsed prop object type) and `Events` (event map).\r\n * These flow through to typed hooks, reactive refs, and composable helpers.\r\n *\r\n * Usage:\r\n * ```ts\r\n * class MyElement extends WippyVueElement<MyProps, MyEvents> {\r\n * static get wippyConfig(): WippyElementConfig<MyProps> {\r\n * return { propsSchema: pkg.wippy.props, inlineCss: stylesText }\r\n * }\r\n * static get vueConfig() {\r\n * return { rootComponent: MyApp }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * In Vue components, use the typed composable helpers:\r\n * ```ts\r\n * const props = useProps<MyProps>()\r\n * const emit = useEvents<MyEvents>()\r\n * const errors = usePropsErrors()\r\n * ```\r\n */\r\nexport abstract class WippyVueElement<\r\n Props = Record<string, unknown>,\r\n Events = Record<string, unknown>,\r\n> extends WippyElement<Props, Events> {\r\n private _vueApp: App<Element> | null = null\r\n private _propsRef: Ref<Props> = ref({}) as Ref<Props>\r\n private _errorsRef: Ref<string[]> = ref([])\r\n private _contentRef: Ref<string | null> = ref(null)\r\n /** Cleanup handle for the core-adapter → Vue-ref bridge subscription. */\r\n private _bridgeAbort: AbortController | null = null\r\n\r\n /**\r\n * Override to provide Vue-specific configuration.\r\n */\r\n static get vueConfig(): WippyVueElementConfig {\r\n throw new Error('WippyVueElement subclass must override static get vueConfig()')\r\n }\r\n\r\n protected onMount(\r\n _shadow: ShadowRoot,\r\n container: HTMLElement,\r\n initialProps: Props,\r\n initialErrors: string[],\r\n initialContent?: string | null,\r\n _isRemount?: boolean,\r\n ): void {\r\n // On reconnect (`_isRemount === true`) the previous Vue app was\r\n // already torn down by `onUnmount`, which calls `_vueApp.unmount()`\r\n // and detaches Vue's rendered DOM from the reused container. So we\r\n // can construct a fresh Vue app here — no special-case branch needed.\r\n // If the container ever holds residual children, Vue's mount will\r\n // replace them.\r\n const vueConfig = (this.constructor as typeof WippyVueElement).vueConfig\r\n\r\n // 1. Seed reactive refs from initial state, then bridge to the core\r\n // reactive adapter so subsequent attribute / content changes\r\n // propagate without manual ref writes in `onPropsChanged` /\r\n // `onContentChanged`. The core adapter is the single source of\r\n // truth; the Vue refs are a read-only mirror that consumers reach\r\n // via `useProps()` / `useContent()` / `usePropsErrors()`.\r\n this._propsRef.value = initialProps\r\n this._errorsRef.value = initialErrors\r\n this._contentRef.value = initialContent ?? null\r\n\r\n // Emit initial errors as invalid events\r\n for (const error of initialErrors) {\r\n this.emitEvent('invalid', { message: error })\r\n }\r\n\r\n const bridgeAbort = new AbortController()\r\n this._bridgeAbort = bridgeAbort\r\n this.reactive.props.subscribe((props, errors) => {\r\n this._propsRef.value = props\r\n this._errorsRef.value = [...errors]\r\n for (const error of errors) {\r\n this.emitEvent('invalid', { message: error })\r\n }\r\n }, { signal: bridgeAbort.signal })\r\n\r\n if (this.reactive.content) {\r\n this.reactive.content.subscribe((content) => {\r\n this._contentRef.value = content\r\n }, { signal: bridgeAbort.signal })\r\n }\r\n\r\n // 2. Create + mount the Vue app from the resolved mount config. Factored\r\n // out so it runs either synchronously (eager `rootComponent`) or after\r\n // `lazyConfig()` resolves (thin-shell path).\r\n const mountApp = (mountConfig: WippyVueMountConfig): void => {\r\n // Bail if the element was disconnected while `lazyConfig()` was in flight.\r\n if (bridgeAbort.signal.aborted)\r\n return\r\n\r\n // Save and restore the host's activePinia so this web component's\r\n // isolated Pinia instance doesn't contaminate the global scope.\r\n // See: https://pinia.vuejs.org/core-concepts/outside-component-usage\r\n const hostPinia = getActivePinia()\r\n\r\n const app = createApp(mountConfig.rootComponent)\r\n this._vueApp = app\r\n const pinia = createPinia()\r\n if (mountConfig.piniaPlugins) {\r\n for (const plugin of mountConfig.piniaPlugins)\r\n pinia.use(plugin)\r\n }\r\n app.use(pinia)\r\n\r\n // Install extra plugins\r\n if (mountConfig.plugins) {\r\n for (const plugin of mountConfig.plugins)\r\n app.use(plugin)\r\n }\r\n\r\n // Provide standard injection keys\r\n app.provide(PROPS_PROVIDER, this._propsRef as Ref<Record<string, unknown>>)\r\n app.provide(PROPS_ERROR_PROVIDER, this._errorsRef)\r\n app.provide(EVENT_PROVIDER, this.emitEvent.bind(this))\r\n app.provide(CONTENT_PROVIDER, this._contentRef)\r\n\r\n // Managed-layout integration. The `ComponentResolver` (host side) sets\r\n // `dataset.wippyPanelId` and `__wippyHostBus` on this element BEFORE\r\n // insertion, so they're available now. Outside a managed-layout host\r\n // both are null — composables tolerate the null path.\r\n app.provide(PANEL_ID_PROVIDER, getWippyPanelId(this))\r\n app.provide(LAYOUT_BUS_PROVIDER, getWippyHostBus(this))\r\n app.provide(HOST_PROVIDER, getWippyHost(this))\r\n\r\n // Custom providers\r\n if (mountConfig.providers)\r\n mountConfig.providers(app, this)\r\n\r\n app.mount(container)\r\n\r\n // Restore the host's activePinia — prevents this web component's Pinia\r\n // from being used by unrelated code that calls useStore() outside of a\r\n // component setup context (e.g. axios interceptors).\r\n if (hostPinia)\r\n setActivePinia(hostPinia)\r\n }\r\n\r\n // 3. Eager `rootComponent` → mount now. Otherwise `lazyConfig` → show a\r\n // `<wippy-loading>` placeholder and mount once the heavy chunk resolves.\r\n if (vueConfig.rootComponent) {\r\n mountApp(vueConfig as WippyVueMountConfig)\r\n }\r\n else if (vueConfig.lazyConfig) {\r\n const loader = document.createElement('wippy-loading')\r\n loader.setAttribute('no-bg', '')\r\n container.appendChild(loader)\r\n vueConfig.lazyConfig()\r\n .then((mountConfig) => {\r\n if (bridgeAbort.signal.aborted)\r\n return\r\n loader.remove()\r\n mountApp(mountConfig)\r\n })\r\n .catch((err) => {\r\n if (bridgeAbort.signal.aborted)\r\n return\r\n // The lazy chunk failed to load (offline / 404 / bad bundle). Swap the\r\n // spinner for a visible <wippy-error> so the element doesn't sit on a\r\n // perpetual loading placeholder; also emit `error` for programmatic\r\n // consumers. (Both wippy-loading/wippy-error are registered together\r\n // by loading.js, which is injected alongside this shell.)\r\n const message = err instanceof Error ? err.message : String(err)\r\n const errorEl = document.createElement('wippy-error')\r\n errorEl.setAttribute('title', 'Failed to load')\r\n errorEl.setAttribute('message', message)\r\n loader.replaceWith(errorEl)\r\n this.emitEvent('error', { message })\r\n })\r\n }\r\n else {\r\n throw new Error('WippyVueElement vueConfig must provide rootComponent or lazyConfig')\r\n }\r\n }\r\n\r\n protected onUnmount(): void {\r\n // Tear down the core-adapter bridge BEFORE unmounting Vue, so the\r\n // Vue refs can't be mutated mid-teardown by a stray late notify.\r\n this._bridgeAbort?.abort()\r\n this._bridgeAbort = null\r\n if (this._vueApp) {\r\n this._vueApp.unmount()\r\n this._vueApp = null\r\n }\r\n }\r\n}\r\n","// Providers: base symbols, composables, and createProviders utility\r\nexport {\r\n CONTENT_PROVIDER,\r\n createProviders,\r\n EVENT_PROVIDER,\r\n HOST_PROVIDER,\r\n LAYOUT_BUS_PROVIDER,\r\n PANEL_ID_PROVIDER,\r\n PROPS_ERROR_PROVIDER,\r\n PROPS_PROVIDER,\r\n useContent,\r\n useEvents,\r\n useHost,\r\n useLayoutBus,\r\n usePanelId,\r\n useProps,\r\n usePropsErrors,\r\n} from './providers.ts'\r\nexport type { TypedProviders } from './providers.ts'\r\n\r\n// Vue layer\r\nexport { WippyVueElement } from './vue-element.ts'\r\nexport type { WippyVueElementConfig, WippyVueMountConfig } from './vue-element.ts'\r\n\r\n// Re-export core for convenience\r\nexport { define, WippyElement } from '@wippy-fe/webcomponent-core'\r\nexport type {\r\n BroadcastEnvelope,\r\n ContentListener,\r\n ContentSubscription,\r\n EventEmitterHandle,\r\n HostCssKey,\r\n LayoutBusBound,\r\n ParseResult,\r\n PropsListener,\r\n PropsSubscription,\r\n ReactiveAdapter,\r\n SubscribeOptions,\r\n WippyElementConfig,\r\n WippyPropDefinition,\r\n WippyPropsSchema,\r\n} from '@wippy-fe/webcomponent-core'\r\n"],"mappings":";;;;;AAEA,SAAS,cAAc;AAKhB,IAAM,iBAAiB,uBAAO,YAAY;AAK1C,IAAM,iBAAiB,uBAAO,aAAa;AAG3C,IAAM,uBAAuB,uBAAO,mBAAmB;AAGvD,IAAM,mBAAmB,uBAAO,eAAe;AAO/C,IAAM,oBAAoB,uBAAO,gBAAgB;AAOjD,IAAM,sBAAsB,uBAAO,kBAAkB;AASrD,IAAM,gBAAgB,uBAAO,YAAY;AAezC,SAAS,WAA8B;AAC5C,QAAM,QAAQ,OAAO,cAAc;AACnC,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,oDAAoD;AACtE,SAAO;AACT;AAYO,SAAS,YAAmF;AACjG,QAAM,OAAO,OAAO,cAAc;AAClC,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,qDAAqD;AACvE,SAAO;AACT;AAYO,SAAS,iBAAgC;AAC9C,QAAM,SAAS,OAAO,oBAAoB;AAC1C,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,0DAA0D;AAC5E,SAAO;AACT;AAaO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;AAC/B,gBAAU,YAAY,MAAM;AAC5B,gBAAU,WAAW,EAClB,KAAK,CAAC,gBAAgB;AACrB,YAAI,YAAY,OAAO;AACrB;AACF,eAAO,OAAO;AACd,iBAAS,WAAW;AAAA,MACtB,CAAC,EACA,MAAM,CAAC,QAAQ;AACd,YAAI,YAAY,OAAO;AACrB;AAMF,cAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC/D,cAAM,UAAU,SAAS,cAAc,aAAa;AACpD,gBAAQ,aAAa,SAAS,gBAAgB;AAC9C,gBAAQ,aAAa,WAAW,OAAO;AACvC,eAAO,YAAY,OAAO;AAC1B,aAAK,UAAU,SAAS,EAAE,QAAQ,CAAC;AAAA,MACrC,CAAC;AAAA,IACL,OACK;AACH,YAAM,IAAI,MAAM,oEAAoE;AAAA,IACtF;AAAA,EACF;AAAA,EAEU,YAAkB;AAG1B,SAAK,cAAc,MAAM;AACzB,SAAK,eAAe;AACpB,QAAI,KAAK,SAAS;AAChB,WAAK,QAAQ,QAAQ;AACrB,WAAK,UAAU;AAAA,IACjB;AAAA,EACF;AACF;;;AC/MA,SAAS,QAAQ,gBAAAA,qBAAoB;","names":["WippyElement"]}
1
+ {"version":3,"sources":["../src/providers.ts","../src/vue-element.ts","../src/index.ts"],"sourcesContent":["import type { LayoutBusBound } from '@wippy-fe/webcomponent-core'\r\nimport type { InjectionKey, Ref } from 'vue'\r\nimport { inject, onMounted, onUnmounted, watch } from 'vue'\n\r\n// ── Base injection keys (untyped) ────────────────────────────\r\n\r\n/** Injection key for the event emitter function. */\r\nexport const EVENT_PROVIDER = Symbol('wippy:emit') as InjectionKey<\r\n (event: string, detail?: unknown) => void\r\n>\r\n\r\n/** Injection key for the reactive props ref. */\r\nexport const PROPS_PROVIDER = Symbol('wippy:props') as InjectionKey<Ref<Record<string, unknown>>>\r\n\r\n/** Injection key for the reactive props error ref. */\r\nexport const PROPS_ERROR_PROVIDER = Symbol('wippy:props_error') as InjectionKey<Ref<string[]>>\r\n\r\n/** Injection key for reactive content from child <template data-type=\"...\"> elements. */\r\nexport const CONTENT_PROVIDER = Symbol('wippy:content') as InjectionKey<Ref<string | null>>\r\n\r\n/**\r\n * Injection key for the panelId this web component lives in (when\r\n * mounted inside a managed-layout `kind: 'component'` panel). `null`\r\n * outside a managed-layout host.\r\n */\r\nexport const PANEL_ID_PROVIDER = Symbol('wippy:panel-id') as InjectionKey<string | null>\r\n\r\n/**\r\n * Injection key for the panel-bound layout bus. Use to publish or\r\n * subscribe to in-tab broadcasts. `null` outside a managed-layout\r\n * host.\r\n */\r\nexport const LAYOUT_BUS_PROVIDER = Symbol('wippy:layout-bus') as InjectionKey<LayoutBusBound | null>\r\n\r\n/**\r\n * Injection key for the panel-scoped `host` wrapper attached by the\r\n * managed-layout shell. Same shape as the iframe-side `host`; layout\r\n * broadcast / send / on are routed through the panel-bound bus so\r\n * sourcePanelId attribution is correct. `null` outside a managed-layout\r\n * host (callers fall back to importing `host` from `@wippy-fe/proxy`).\r\n */\r\nexport const HOST_PROVIDER = Symbol('wippy:host') as InjectionKey<unknown>\n\n/**\n * Reactive logical activity owned by the embedding host. `null` means this\n * component is unmanaged (for example, mounted directly by an application).\n */\nexport const HOST_VISIBILITY_PROVIDER = Symbol('wippy:host-visibility') as InjectionKey<Ref<boolean | null>>\n\r\n// ── Composables (typed) ──────────────────────────────────────\r\n\r\n/**\r\n * Inject the reactive props ref, typed to your component's props interface.\r\n *\r\n * Must be called inside a Vue component's `setup()` that lives within a `WippyVueElement`.\r\n *\r\n * ```ts\r\n * const props = useProps<ComponentProps>()\r\n * // props is Ref<ComponentProps>\r\n * console.log(props.value.maxFileSize)\r\n * ```\r\n */\r\nexport function useProps<Props>(): Ref<Props> {\r\n const props = inject(PROPS_PROVIDER)\r\n if (!props)\r\n throw new Error('useProps() must be called inside a WippyVueElement')\r\n return props as unknown as Ref<Props>\r\n}\r\n\r\n/**\r\n * Inject the typed event emitter, constrained to your component's event map.\r\n *\r\n * Must be called inside a Vue component's `setup()` that lives within a `WippyVueElement`.\r\n *\r\n * ```ts\r\n * const emit = useEvents<Events>()\r\n * emit('upload-complete', { fileId: '123', status: 'done' }) // fully typed\r\n * ```\r\n */\r\nexport function useEvents<Events>(): <K extends keyof Events>(event: K, detail: Events[K]) => void {\r\n const emit = inject(EVENT_PROVIDER)\r\n if (!emit)\r\n throw new Error('useEvents() must be called inside a WippyVueElement')\r\n return emit as unknown as <K extends keyof Events>(event: K, detail: Events[K]) => void\r\n}\r\n\r\n/**\r\n * Inject the reactive prop validation errors ref.\r\n *\r\n * Must be called inside a Vue component's `setup()` that lives within a `WippyVueElement`.\r\n *\r\n * ```ts\r\n * const errors = usePropsErrors()\r\n * // errors is Ref<string[]>\r\n * ```\r\n */\r\nexport function usePropsErrors(): Ref<string[]> {\r\n const errors = inject(PROPS_ERROR_PROVIDER)\r\n if (!errors)\r\n throw new Error('usePropsErrors() must be called inside a WippyVueElement')\r\n return errors\r\n}\r\n\r\n/**\r\n * Inject the reactive content ref (from child `<template data-type=\"...\">` elements).\r\n *\r\n * Must be called inside a Vue component's `setup()` within a `WippyVueElement`\r\n * that has `contentTemplate` configured.\r\n *\r\n * ```ts\r\n * const content = useContent()\r\n * // content is Ref<string | null>\r\n * ```\r\n */\r\nexport function useContent(): Ref<string | null> {\r\n const content = inject(CONTENT_PROVIDER)\r\n if (!content)\r\n throw new Error('useContent() must be called inside a WippyVueElement with contentTemplate configured')\r\n return content\r\n}\r\n\r\n/**\r\n * Inject the current panelId (from `data-wippy-panel-id` set by the\r\n * managed-layout `ComponentResolver`). Returns `null` outside a\r\n * managed-layout host or when not inside a `kind: 'component'` panel.\r\n *\r\n * **Status: Draft 1 (preview).** Part of the managed-layout API; see\r\n * `managed-layout.md` in the gen-2-chat repo. Field names may change\r\n * between minor releases until a production consumer drives the\r\n * corner cases out.\r\n *\r\n * ```ts\r\n * const panelId = usePanelId()\r\n * if (panelId) console.log('I am the', panelId, 'panel')\r\n * ```\r\n */\r\nexport function usePanelId(): string | null {\r\n return inject(PANEL_ID_PROVIDER, null)\r\n}\r\n\r\n/**\r\n * Inject the panel-bound layout bus. `null` outside a managed-layout\r\n * host. Use to publish on the in-tab bus or subscribe to broadcasts\r\n * targeted at this panel.\r\n *\r\n * **Status: Draft 1 (preview).** Part of the managed-layout API; see\r\n * `managed-layout.md` in the gen-2-chat repo.\r\n *\r\n * ```ts\r\n * const bus = useLayoutBus()\r\n * bus?.subscribe(({ channel, payload, sourcePanelId }) => { ... })\r\n * bus?.broadcast('open-chat', { token: '...' })\r\n * ```\r\n */\r\nexport function useLayoutBus(): LayoutBusBound | null {\r\n return inject(LAYOUT_BUS_PROVIDER, null)\r\n}\r\n\r\n/**\r\n * Inject the panel-scoped `host` wrapper. `null` outside a\r\n * managed-layout host. Subclass code that needs a host in non-layout\r\n * contexts can fall back to `import { host } from '@wippy-fe/proxy'`.\r\n *\r\n * Pass the host shape as the type parameter to access fields like\r\n * `layout.broadcast`. The default `H = unknown` keeps callers honest\r\n * about narrowing before use.\r\n *\r\n * **Status: Draft 1 (preview).** Part of the managed-layout API; see\r\n * `managed-layout.md` in the gen-2-chat repo.\r\n *\r\n * ```ts\r\n * import type { ProxyApiInstance } from '@wippy-fe/proxy'\r\n *\r\n * const host = useHost<ProxyApiInstance['host']>()\r\n * host?.layout.broadcast('open-chat', { token })\r\n * host?.layout.updatePanel('right', { route: '/foo' })\r\n * ```\r\n */\r\nexport function useHost<H = unknown>(): H | null {\n return inject(HOST_PROVIDER, null) as H | null\n}\n\n/**\n * Read host-owned logical activity without coupling it to CSS or viewport\n * visibility. Hosts update this ref without remounting the web component.\n */\nexport function useHostVisibility(): Ref<boolean | null> {\n const visible = inject(HOST_VISIBILITY_PROVIDER)\n if (!visible)\n throw new Error('useHostVisibility() must be called inside a WippyVueElement')\n return visible\n}\n\n/**\n * Preserve a component's ordinary initial load, then refresh retained data\n * only when the host reveals a previously inactive element. The callback is\n * serialized so a reveal cannot race an in-flight load. Multiple reveals\n * during one load coalesce into one trailing refresh. The resulting promise\n * is returned to Vue lifecycle/watch handlers so failures continue through\n * Vue's normal error handling.\n */\nexport function useHostVisibilityRefresh(task: () => void | Promise<void>): Ref<boolean | null> {\n const visible = useHostVisibility()\n let mounted = false\n let running: Promise<void> | null = null\n let refreshQueued = false\n\n function runTask(): Promise<void> {\n if (running) {\n refreshQueued = true\n return running\n }\n\n let current: Promise<void>\n try {\n current = Promise.resolve(task())\n }\n catch (error) {\n current = Promise.reject(error)\n }\n\n const scheduled = current.finally(() => {\n if (running !== scheduled)\n return\n running = null\n\n if (mounted && refreshQueued) {\n refreshQueued = false\n return runTask()\n }\n })\n running = scheduled\n return scheduled\n }\n\n onMounted(() => {\n mounted = true\n return runTask()\n })\n\n onUnmounted(() => {\n mounted = false\n refreshQueued = false\n })\n\n watch(visible, (next, previous) => {\n if (mounted && previous === false && next === true)\n return runTask()\n })\n\n return visible\n}\n\r\n// ── createProviders (typed injection keys) ───────────────────\r\n\r\n/**\r\n * Typed provider keys for a specific component.\r\n */\r\nexport interface TypedProviders<Props, Events> {\r\n EVENT_PROVIDER: InjectionKey<<K extends keyof Events>(event: K, detail: Events[K]) => void>\r\n PROPS_PROVIDER: InjectionKey<Ref<Props>>\r\n PROPS_ERROR_PROVIDER: InjectionKey<Ref<string[]>>\r\n}\r\n\r\n/**\r\n * Creates typed provider injection keys for a specific component.\r\n *\r\n * Use this if you prefer raw `inject(KEY)` over the composable helpers.\r\n * Returns the same Symbol instances with narrowed types.\r\n *\r\n * ```ts\r\n * export const { EVENT_PROVIDER, PROPS_PROVIDER, PROPS_ERROR_PROVIDER } =\r\n * createProviders<ComponentProps, Events>()\r\n * ```\r\n */\r\nexport function createProviders<Props, Events = Record<string, unknown>>(): TypedProviders<Props, Events> {\r\n return {\r\n EVENT_PROVIDER: EVENT_PROVIDER as unknown as TypedProviders<Props, Events>['EVENT_PROVIDER'],\r\n PROPS_PROVIDER: PROPS_PROVIDER as unknown as TypedProviders<Props, Events>['PROPS_PROVIDER'],\r\n PROPS_ERROR_PROVIDER,\r\n }\r\n}\r\n","import type { PiniaPlugin } from 'pinia'\r\nimport type { App, Component, Ref } from 'vue'\r\nimport { getWippyHost, getWippyHostBus, getWippyPanelId, WippyElement } from '@wippy-fe/webcomponent-core'\r\nimport { createPinia, getActivePinia, setActivePinia } from 'pinia'\r\nimport { createApp, ref } from 'vue'\r\nimport { CONTENT_PROVIDER, EVENT_PROVIDER, HOST_PROVIDER, HOST_VISIBILITY_PROVIDER, LAYOUT_BUS_PROVIDER, PANEL_ID_PROVIDER, PROPS_ERROR_PROVIDER, PROPS_PROVIDER } from './providers.ts'\n\r\n/**\r\n * The heavy half of a Vue element's config — the root component, its plugins,\r\n * and providers. Either supplied eagerly on `WippyVueElementConfig` or returned\r\n * by `lazyConfig()` from a dynamically-imported chunk (so the element shell can\r\n * stay tiny and load the framework + component tree on first connect).\r\n */\r\nexport interface WippyVueMountConfig {\r\n /** The root Vue component to mount. */\r\n rootComponent: Component\r\n /** Additional Vue plugins to install (beyond Pinia which is always installed). */\r\n plugins?: Array<{ install: (app: App) => void }>\r\n /** Pinia plugins to install (e.g., createWippyPersist()). */\r\n piniaPlugins?: PiniaPlugin[]\r\n /** Extra providers to inject into the Vue app. */\r\n providers?: (app: App, element: WippyVueElement<any, any>) => void\r\n}\r\n\r\n/**\r\n * Vue-specific configuration returned by `static get vueConfig()`.\r\n *\r\n * Provide EITHER an eager `rootComponent` (+ optional plugins/providers) for a\r\n * normal element, OR `lazyConfig` for a thin shell that defers the heavy parts:\r\n * when `lazyConfig` is set and `rootComponent` is omitted, `onMount` shows a\r\n * `<wippy-loading>` placeholder, awaits `lazyConfig()` (typically `() =>\r\n * import('./internals').then(m => ({ rootComponent: m.Root, providers: m.boot }))`),\r\n * then mounts. The props/events bridge + lifecycle stay here, so the lazily\r\n * imported chunk only carries the framework + component tree.\r\n */\r\nexport interface WippyVueElementConfig extends Partial<WippyVueMountConfig> {\r\n /** Lazily resolve the mount config (root + plugins + providers) on first connect. */\r\n lazyConfig?: () => Promise<WippyVueMountConfig>\r\n}\r\n\r\n/**\r\n * Vue 3 integration for Wippy web components.\r\n *\r\n * Generic over `Props` (parsed prop object type) and `Events` (event map).\r\n * These flow through to typed hooks, reactive refs, and composable helpers.\r\n *\r\n * Usage:\r\n * ```ts\r\n * class MyElement extends WippyVueElement<MyProps, MyEvents> {\r\n * static get wippyConfig(): WippyElementConfig<MyProps> {\r\n * return { propsSchema: pkg.wippy.props, inlineCss: stylesText }\r\n * }\r\n * static get vueConfig() {\r\n * return { rootComponent: MyApp }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * In Vue components, use the typed composable helpers:\r\n * ```ts\r\n * const props = useProps<MyProps>()\r\n * const emit = useEvents<MyEvents>()\r\n * const errors = usePropsErrors()\r\n * ```\r\n */\r\nexport abstract class WippyVueElement<\r\n Props = Record<string, unknown>,\r\n Events = Record<string, unknown>,\r\n> extends WippyElement<Props, Events> {\r\n private _vueApp: App<Element> | null = null\r\n private _propsRef: Ref<Props> = ref({}) as Ref<Props>\r\n private _errorsRef: Ref<string[]> = ref([])\r\n private _contentRef: Ref<string | null> = ref(null)\n private _hostVisibilityRef: Ref<boolean | null> = ref(null)\n /** Cleanup handle for the core-adapter → Vue-ref bridge subscription. */\r\n private _bridgeAbort: AbortController | null = null\r\n\r\n /**\r\n * Override to provide Vue-specific configuration.\r\n */\r\n static get vueConfig(): WippyVueElementConfig {\r\n throw new Error('WippyVueElement subclass must override static get vueConfig()')\r\n }\r\n\r\n protected onMount(\r\n _shadow: ShadowRoot,\r\n container: HTMLElement,\r\n initialProps: Props,\r\n initialErrors: string[],\r\n initialContent?: string | null,\r\n _isRemount?: boolean,\r\n ): void {\r\n // On reconnect (`_isRemount === true`) the previous Vue app was\r\n // already torn down by `onUnmount`, which calls `_vueApp.unmount()`\r\n // and detaches Vue's rendered DOM from the reused container. So we\r\n // can construct a fresh Vue app here — no special-case branch needed.\r\n // If the container ever holds residual children, Vue's mount will\r\n // replace them.\r\n const vueConfig = (this.constructor as typeof WippyVueElement).vueConfig\r\n\r\n // 1. Seed reactive refs from initial state, then bridge to the core\r\n // reactive adapter so subsequent attribute / content changes\r\n // propagate without manual ref writes in `onPropsChanged` /\r\n // `onContentChanged`. The core adapter is the single source of\r\n // truth; the Vue refs are a read-only mirror that consumers reach\r\n // via `useProps()` / `useContent()` / `usePropsErrors()`.\r\n this._propsRef.value = initialProps\r\n this._errorsRef.value = initialErrors\r\n this._contentRef.value = initialContent ?? null\n this._hostVisibilityRef.value = this.hostVisible\n\r\n // Emit initial errors as invalid events\r\n for (const error of initialErrors) {\r\n this.emitEvent('invalid', { message: error })\r\n }\r\n\r\n const bridgeAbort = new AbortController()\r\n this._bridgeAbort = bridgeAbort\r\n this.reactive.props.subscribe((props, errors) => {\r\n this._propsRef.value = props\r\n this._errorsRef.value = [...errors]\r\n for (const error of errors) {\r\n this.emitEvent('invalid', { message: error })\r\n }\r\n }, { signal: bridgeAbort.signal })\r\n\r\n if (this.reactive.content) {\n this.reactive.content.subscribe((content) => {\r\n this._contentRef.value = content\r\n }, { signal: bridgeAbort.signal })\r\n }\n this.reactive.hostVisibility.subscribe((visible) => {\n this._hostVisibilityRef.value = visible\n }, { signal: bridgeAbort.signal })\n\r\n // 2. Create + mount the Vue app from the resolved mount config. Factored\r\n // out so it runs either synchronously (eager `rootComponent`) or after\r\n // `lazyConfig()` resolves (thin-shell path).\r\n const mountApp = (mountConfig: WippyVueMountConfig): void => {\r\n // Bail if the element was disconnected while `lazyConfig()` was in flight.\r\n if (bridgeAbort.signal.aborted)\r\n return\r\n\r\n // Save and restore the host's activePinia so this web component's\r\n // isolated Pinia instance doesn't contaminate the global scope.\r\n // See: https://pinia.vuejs.org/core-concepts/outside-component-usage\r\n const hostPinia = getActivePinia()\r\n\r\n const app = createApp(mountConfig.rootComponent)\r\n this._vueApp = app\r\n const pinia = createPinia()\r\n if (mountConfig.piniaPlugins) {\r\n for (const plugin of mountConfig.piniaPlugins)\r\n pinia.use(plugin)\r\n }\r\n app.use(pinia)\r\n\r\n // Install extra plugins\r\n if (mountConfig.plugins) {\r\n for (const plugin of mountConfig.plugins)\r\n app.use(plugin)\r\n }\r\n\r\n // Provide standard injection keys\r\n app.provide(PROPS_PROVIDER, this._propsRef as Ref<Record<string, unknown>>)\r\n app.provide(PROPS_ERROR_PROVIDER, this._errorsRef)\r\n app.provide(EVENT_PROVIDER, this.emitEvent.bind(this))\r\n app.provide(CONTENT_PROVIDER, this._contentRef)\n app.provide(HOST_VISIBILITY_PROVIDER, this._hostVisibilityRef)\n\r\n // Managed-layout integration. The `ComponentResolver` (host side) sets\r\n // `dataset.wippyPanelId` and `__wippyHostBus` on this element BEFORE\r\n // insertion, so they're available now. Outside a managed-layout host\r\n // both are null — composables tolerate the null path.\r\n app.provide(PANEL_ID_PROVIDER, getWippyPanelId(this))\r\n app.provide(LAYOUT_BUS_PROVIDER, getWippyHostBus(this))\r\n app.provide(HOST_PROVIDER, getWippyHost(this))\r\n\r\n // Custom providers\r\n if (mountConfig.providers)\r\n mountConfig.providers(app, this)\r\n\r\n app.mount(container)\r\n\r\n // Restore the host's activePinia — prevents this web component's Pinia\r\n // from being used by unrelated code that calls useStore() outside of a\r\n // component setup context (e.g. axios interceptors).\r\n if (hostPinia)\r\n setActivePinia(hostPinia)\r\n }\r\n\r\n // 3. Eager `rootComponent` → mount now. Otherwise `lazyConfig` → show a\r\n // `<wippy-loading>` placeholder and mount once the heavy chunk resolves.\r\n if (vueConfig.rootComponent) {\r\n mountApp(vueConfig as WippyVueMountConfig)\r\n }\r\n else if (vueConfig.lazyConfig) {\r\n const loader = document.createElement('wippy-loading')\r\n loader.setAttribute('no-bg', '')\r\n container.appendChild(loader)\r\n vueConfig.lazyConfig()\r\n .then((mountConfig) => {\r\n if (bridgeAbort.signal.aborted)\r\n return\r\n loader.remove()\r\n mountApp(mountConfig)\r\n })\r\n .catch((err) => {\r\n if (bridgeAbort.signal.aborted)\r\n return\r\n // The lazy chunk failed to load (offline / 404 / bad bundle). Swap the\r\n // spinner for a visible <wippy-error> so the element doesn't sit on a\r\n // perpetual loading placeholder; also emit `error` for programmatic\r\n // consumers. (Both wippy-loading/wippy-error are registered together\r\n // by loading.js, which is injected alongside this shell.)\r\n const message = err instanceof Error ? err.message : String(err)\r\n const errorEl = document.createElement('wippy-error')\r\n errorEl.setAttribute('title', 'Failed to load')\r\n errorEl.setAttribute('message', message)\r\n loader.replaceWith(errorEl)\r\n this.emitEvent('error', { message })\r\n })\r\n }\r\n else {\r\n throw new Error('WippyVueElement vueConfig must provide rootComponent or lazyConfig')\r\n }\r\n }\r\n\r\n protected onUnmount(): void {\r\n // Tear down the core-adapter bridge BEFORE unmounting Vue, so the\r\n // Vue refs can't be mutated mid-teardown by a stray late notify.\r\n this._bridgeAbort?.abort()\r\n this._bridgeAbort = null\r\n if (this._vueApp) {\r\n this._vueApp.unmount()\r\n this._vueApp = null\r\n }\r\n }\r\n}\r\n","// Providers: base symbols, composables, and createProviders utility\r\nexport {\r\n CONTENT_PROVIDER,\r\n createProviders,\r\n EVENT_PROVIDER,\r\n HOST_PROVIDER,\n HOST_VISIBILITY_PROVIDER,\n LAYOUT_BUS_PROVIDER,\r\n PANEL_ID_PROVIDER,\r\n PROPS_ERROR_PROVIDER,\r\n PROPS_PROVIDER,\r\n useContent,\r\n useEvents,\r\n useHost,\n useHostVisibility,\n useHostVisibilityRefresh,\n useLayoutBus,\r\n usePanelId,\r\n useProps,\r\n usePropsErrors,\r\n} from './providers.ts'\r\nexport type { TypedProviders } from './providers.ts'\r\n\r\n// Vue layer\r\nexport { WippyVueElement } from './vue-element.ts'\r\nexport type { WippyVueElementConfig, WippyVueMountConfig } from './vue-element.ts'\r\n\r\n// Re-export core for convenience\r\nexport { define, WippyElement } from '@wippy-fe/webcomponent-core'\r\nexport type {\r\n BroadcastEnvelope,\r\n ContentListener,\r\n ContentSubscription,\r\n EventEmitterHandle,\r\n HostCssKey,\n HostVisibilityListener,\n HostVisibilitySubscription,\n LayoutBusBound,\r\n ParseResult,\r\n PropsListener,\r\n PropsSubscription,\r\n ReactiveAdapter,\r\n SubscribeOptions,\r\n WippyElementConfig,\r\n WippyPropDefinition,\r\n WippyPropsSchema,\r\n} from '@wippy-fe/webcomponent-core'\r\n"],"mappings":";;;;;AAEA,SAAS,QAAQ,WAAW,aAAa,aAAa;AAK/C,IAAM,iBAAiB,uBAAO,YAAY;AAK1C,IAAM,iBAAiB,uBAAO,aAAa;AAG3C,IAAM,uBAAuB,uBAAO,mBAAmB;AAGvD,IAAM,mBAAmB,uBAAO,eAAe;AAO/C,IAAM,oBAAoB,uBAAO,gBAAgB;AAOjD,IAAM,sBAAsB,uBAAO,kBAAkB;AASrD,IAAM,gBAAgB,uBAAO,YAAY;AAMzC,IAAM,2BAA2B,uBAAO,uBAAuB;AAe/D,SAAS,WAA8B;AAC5C,QAAM,QAAQ,OAAO,cAAc;AACnC,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,oDAAoD;AACtE,SAAO;AACT;AAYO,SAAS,YAAmF;AACjG,QAAM,OAAO,OAAO,cAAc;AAClC,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,qDAAqD;AACvE,SAAO;AACT;AAYO,SAAS,iBAAgC;AAC9C,QAAM,SAAS,OAAO,oBAAoB;AAC1C,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,0DAA0D;AAC5E,SAAO;AACT;AAaO,SAAS,aAAiC;AAC/C,QAAM,UAAU,OAAO,gBAAgB;AACvC,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,sFAAsF;AACxG,SAAO;AACT;AAiBO,SAAS,aAA4B;AAC1C,SAAO,OAAO,mBAAmB,IAAI;AACvC;AAgBO,SAAS,eAAsC;AACpD,SAAO,OAAO,qBAAqB,IAAI;AACzC;AAsBO,SAAS,UAAiC;AAC/C,SAAO,OAAO,eAAe,IAAI;AACnC;AAMO,SAAS,oBAAyC;AACvD,QAAM,UAAU,OAAO,wBAAwB;AAC/C,MAAI,CAAC;AACH,UAAM,I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AAM,oEAAoE;AAAA,IACtF;AAAA,EACF;AAAA,EAEU,YAAkB;AAG1B,SAAK,cAAc,MAAM;AACzB,SAAK,eAAe;AACpB,QAAI,KAAK,SAAS;AAChB,WAAK,QAAQ,QAAQ;AACrB,WAAK,UAAU;AAAA,IACjB;AAAA,EACF;AACF;;;AClNA,SAAS,QAAQ,gBAAAA,qBAAoB;","names":["WippyElement"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wippy-fe/webcomponent-vue",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "description": "Vue 3 integration layer for Wippy web components - extends @wippy-fe/webcomponent-core with reactive props, Pinia, and provider injection.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -17,17 +17,18 @@
17
17
  },
18
18
  "files": [
19
19
  "package.json",
20
+ "README.md",
20
21
  "dist/"
21
22
  ],
22
23
  "dependencies": {
23
- "@wippy-fe/webcomponent-core": "^0.0.51"
24
+ "@wippy-fe/webcomponent-core": "^0.0.52"
24
25
  },
25
26
  "peerDependencies": {
27
+ "@wippy-fe/proxy": ">=0.0.49 <0.0.53",
26
28
  "@iconify/vue": "^5.0.0",
27
29
  "pinia": "^2.1.0 || ^3.0.0 || ^4.0.0",
28
30
  "vue": "^3.5.0",
29
- "@wippy-fe/proxy": "^0.0.51",
30
- "@wippy-fe/shared": "^0.0.51"
31
+ "@wippy-fe/shared": "^0.0.52"
31
32
  },
32
33
  "scripts": {
33
34
  "build": "tsup",