@bagelink/vue 1.15.668 → 1.17.2

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.
Files changed (58) hide show
  1. package/LICENSE +21 -0
  2. package/dist/assetTransport.d.ts +50 -0
  3. package/dist/assetTransport.d.ts.map +1 -0
  4. package/dist/assetTransport.test.d.ts +2 -0
  5. package/dist/assetTransport.test.d.ts.map +1 -0
  6. package/dist/assets.d.ts +46 -0
  7. package/dist/assets.d.ts.map +1 -0
  8. package/dist/assets.test.d.ts +2 -0
  9. package/dist/assets.test.d.ts.map +1 -0
  10. package/dist/components/Image.vue.d.ts +7 -1
  11. package/dist/components/Image.vue.d.ts.map +1 -1
  12. package/dist/components/form/inputs/Upload/AssetUploadInput.vue.d.ts +11 -0
  13. package/dist/components/form/inputs/Upload/AssetUploadInput.vue.d.ts.map +1 -0
  14. package/dist/components/form/inputs/Upload/UploadInput.vue.d.ts +2 -2
  15. package/dist/components/form/inputs/Upload/UploadInput.vue.d.ts.map +1 -1
  16. package/dist/components/lightbox/AssetPreview.vue.d.ts +9 -0
  17. package/dist/components/lightbox/AssetPreview.vue.d.ts.map +1 -0
  18. package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -1
  19. package/dist/components/lightbox/LightboxImage.vue.d.ts +2 -1
  20. package/dist/components/lightbox/LightboxImage.vue.d.ts.map +1 -1
  21. package/dist/components/lightbox/index.d.ts.map +1 -1
  22. package/dist/components/lightbox/lightbox.types.d.ts +7 -0
  23. package/dist/components/lightbox/lightbox.types.d.ts.map +1 -1
  24. package/dist/composables/useImageSrc.d.ts +8 -4
  25. package/dist/composables/useImageSrc.d.ts.map +1 -1
  26. package/dist/core.css +1 -1
  27. package/dist/form-flow/FormFlowPlayer.vue.d.ts +3 -3
  28. package/dist/form-flow/FormFlowPlayer.vue.d.ts.map +1 -1
  29. package/dist/form-flow/form-flow.d.ts +11 -6
  30. package/dist/form-flow/form-flow.d.ts.map +1 -1
  31. package/dist/form-flow/schema-fields.d.ts +3 -0
  32. package/dist/form-flow/schema-fields.d.ts.map +1 -1
  33. package/dist/index.cjs +62 -62
  34. package/dist/index.css +1 -1
  35. package/dist/index.d.ts +3 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.mjs +19554 -18982
  38. package/dist/style.css +1 -1
  39. package/dist/types/BagelForm.d.ts +3 -1
  40. package/dist/types/BagelForm.d.ts.map +1 -1
  41. package/package.json +104 -105
  42. package/src/assetTransport.test.ts +125 -0
  43. package/src/assetTransport.ts +164 -0
  44. package/src/assets.test.ts +123 -0
  45. package/src/assets.ts +245 -0
  46. package/src/components/Image.vue +19 -3
  47. package/src/components/form/inputs/Upload/AssetUploadInput.vue +67 -0
  48. package/src/components/form/inputs/Upload/UploadInput.vue +5 -1
  49. package/src/components/lightbox/AssetPreview.vue +16 -0
  50. package/src/components/lightbox/Lightbox.vue +8 -3
  51. package/src/components/lightbox/LightboxImage.vue +4 -3
  52. package/src/components/lightbox/index.ts +29 -4
  53. package/src/components/lightbox/lightbox.types.ts +5 -1
  54. package/src/composables/useImageSrc.ts +47 -37
  55. package/src/form-flow/form-flow.ts +26 -7
  56. package/src/form-flow/schema-fields.ts +23 -1
  57. package/src/index.ts +3 -0
  58. package/src/types/BagelForm.ts +3 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Bagel Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,50 @@
1
+ import { AssetDelivery, AssetTransport, AssetReference, AssetPurpose } from './assets';
2
+ import { ApiTransport } from '../../sdk/src/index.ts';
3
+ import { App, MaybeRefOrGetter } from 'vue';
4
+ export type AssetFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
5
+ export interface AssetHttpOptions {
6
+ /** Absolute API base, optionally with a path prefix. */
7
+ baseURL: string;
8
+ headers?: () => HeadersInit;
9
+ fetch?: AssetFetch;
10
+ credentials?: RequestCredentials;
11
+ /** Explicitly trusted delivery origins besides the API origin. */
12
+ deliveryOrigins?: string[];
13
+ /** Reuse the app's authenticated axios instance, including tenant interceptors. */
14
+ apiTransport?: ApiTransport;
15
+ }
16
+ /** Concrete REST adapter, separate from generated SDK namespaces. */
17
+ export declare function createAssetHttpTransport(options: AssetHttpOptions): AssetTransport & {
18
+ publish(reference: Required<AssetReference>, signal?: AbortSignal): Promise<AssetPublication>;
19
+ };
20
+ /** Public URLs are deliberately separate from expiring private deliveries. */
21
+ export interface AssetPublication {
22
+ asset_id: string;
23
+ name: string;
24
+ version_id: string;
25
+ published: boolean;
26
+ representations: {
27
+ representation: AssetPurpose;
28
+ url: string;
29
+ media_type: string;
30
+ size: number;
31
+ }[];
32
+ }
33
+ export interface ConfigureAssetClientOptions {
34
+ transport: ApiTransport;
35
+ /** Existing reactive identity/session + tenant key. Never inferred from auth globals. */
36
+ sessionKey: MaybeRefOrGetter<string | undefined>;
37
+ deliveryOrigins?: string[];
38
+ }
39
+ /** Vue plugin; owns its session watcher and clears on app teardown. */
40
+ export declare function configureAssetClient(options: ConfigureAssetClientOptions): {
41
+ client: {
42
+ revision: import('vue').Ref<number, number>;
43
+ resolve(reference: import('./assets').AssetDeliveryRequest, signal?: AbortSignal): Promise<AssetDelivery>;
44
+ upload(file: File, signal?: AbortSignal): Promise<AssetReference>;
45
+ clearSession(): void;
46
+ };
47
+ publish(reference: Required<AssetReference>): Promise<AssetPublication>;
48
+ install(app: App): void;
49
+ };
50
+ //# sourceMappingURL=assetTransport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assetTransport.d.ts","sourceRoot":"","sources":["../src/assetTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAC/I,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAkB,KAAK,GAAG,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAErE,MAAM,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAE5F,MAAM,WAAW,gBAAgB;IAChC,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,WAAW,CAAA;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,kEAAkE;IAClE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,mFAAmF;IACnF,YAAY,CAAC,EAAE,YAAY,CAAA;CAC3B;AAaD,qEAAqE;AACrE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,GAAG,cAAc,GAAG;IACrF,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;CAC7F,CAoFA;AAED,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,eAAe,EAAE;QAAE,cAAc,EAAE,YAAY,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAClG;AAED,MAAM,WAAW,2BAA2B;IAC3C,SAAS,EAAE,YAAY,CAAA;IACvB,yFAAyF;IACzF,UAAU,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAChD,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,uEAAuE;AACvE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B;;;;;;;uBAgB9C,QAAQ,CAAC,cAAc,CAAC;iBAMpC,GAAG;EAMjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=assetTransport.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assetTransport.test.d.ts","sourceRoot":"","sources":["../src/assetTransport.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,46 @@
1
+ import { InjectionKey, MaybeRefOrGetter } from 'vue';
2
+ /** Persist this reference, never an AssetDelivery. Version pins are immutable. */
3
+ export interface AssetReference {
4
+ asset_id: string;
5
+ version_id?: string;
6
+ }
7
+ export interface AssetDelivery {
8
+ url: string;
9
+ expires_at: string;
10
+ version_id: string;
11
+ }
12
+ export type AssetPurpose = 'original' | 'preview' | 'thumbnail' | 'website' | 'social';
13
+ export interface AssetDeliveryRequest extends AssetReference {
14
+ /** Backend-approved preset, e.g. an image preview; never arbitrary transforms. */
15
+ representation?: AssetPurpose;
16
+ }
17
+ /** A separate facade: generated SDK namespaces remain unchanged. */
18
+ export interface AssetTransport {
19
+ /** Return deliveries in request order; adapt the SDK's `{items}` envelope here. */
20
+ resolve(references: readonly AssetDeliveryRequest[], signal: AbortSignal): Promise<AssetDelivery[]>;
21
+ upload(file: File, signal: AbortSignal): Promise<AssetReference>;
22
+ }
23
+ /** App/session scoped, with no persistent storage or delivery cache. */
24
+ export declare function createAssetClient(transport: AssetTransport): {
25
+ revision: import('vue').Ref<number, number>;
26
+ resolve(reference: AssetDeliveryRequest, signal?: AbortSignal): Promise<AssetDelivery>;
27
+ upload(file: File, signal?: AbortSignal): Promise<AssetReference>;
28
+ /** Call synchronously before logout/tenant/account transitions. */
29
+ clearSession(): void;
30
+ };
31
+ export type AssetClient = ReturnType<typeof createAssetClient>;
32
+ export declare const ASSET_CLIENT_KEY: InjectionKey<AssetClient>;
33
+ /** Opt-in upload state; original bytes are handed unchanged to the transport. */
34
+ export declare function useAssetUpload(): {
35
+ upload: (file: File) => Promise<AssetReference>;
36
+ cancel: () => void;
37
+ uploading: import('vue').Ref<boolean, boolean>;
38
+ reference: import('vue').Ref<AssetReference | undefined, AssetReference | undefined>;
39
+ };
40
+ /** Private resolution stays inside display primitives, not persisted domain data. */
41
+ export declare function useAssetDelivery(source: MaybeRefOrGetter<AssetDeliveryRequest | undefined>): {
42
+ url: import('vue').Ref<string | undefined, string | undefined>;
43
+ error: import('vue').Ref<boolean, boolean>;
44
+ onError: () => void;
45
+ };
46
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAE3G,kFAAkF;AAClF,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,UA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
+ {"version":3,"file":"assets.test.d.ts","sourceRoot":"","sources":["../src/assets.test.ts"],"names":[],"mappings":""}
@@ -1,5 +1,11 @@
1
+ import { AssetDeliveryRequest, AssetPurpose } from '../assets';
1
2
  interface ImageProps {
2
- src?: string;
3
+ src?: string | AssetDeliveryRequest;
4
+ /** Stable asset UUID; requires an injected asset client. */
5
+ assetId?: string;
6
+ versionId?: string;
7
+ /** Server preset; width/height below control layout only. */
8
+ purpose?: AssetPurpose;
3
9
  pathKey?: string;
4
10
  alt?: string;
5
11
  width?: string | number;
@@ -1 +1 @@
1
- {"version":3,"file":"Image.vue.d.ts","sourceRoot":"","sources":["../../src/components/Image.vue"],"names":[],"mappings":"AAkLA,UAAU,UAAU;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gHAAgH;IAChH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yKAAyK;IACzK,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,iFAAiF;IACjF,GAAG,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAA;IAC1D,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CAC1B;AAyDD,iBAAS,cAAc;WAuJT,OAAO,IAA6B;;yBAXpB,GAAG;;;;EAgBhC;AAqBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAA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;yBAXpB,GAAG;;;;EAgBhC;AAsBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,gSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { AssetReference } from '../../../../assets';
2
+ import { UploadInputProps } from '../../../../types/BagelForm';
3
+ declare const _default: import('vue').DefineComponent<UploadInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ "update:modelValue": (value: AssetReference | AssetReference[] | undefined) => any;
5
+ addFileStart: () => any;
6
+ }, string, import('vue').PublicProps, Readonly<UploadInputProps> & Readonly<{
7
+ "onUpdate:modelValue"?: ((value: AssetReference | AssetReference[] | undefined) => any) | undefined;
8
+ onAddFileStart?: (() => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
11
+ //# sourceMappingURL=AssetUploadInput.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssetUploadInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/AssetUploadInput.vue"],"names":[],"mappings":"AAuEA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAGxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;;;;;;;;AAqOnE,wBAQG"}
@@ -75,7 +75,7 @@ declare function __VLS_template(): {
75
75
  }): any;
76
76
  };
77
77
  refs: {};
78
- rootEl: HTMLDivElement;
78
+ rootEl: any;
79
79
  };
80
80
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
81
81
  declare const __VLS_component: import('vue').DefineComponent<UploadInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -94,7 +94,7 @@ declare const __VLS_component: import('vue').DefineComponent<UploadInputProps, {
94
94
  accept: string;
95
95
  readonly: boolean;
96
96
  showIcon: boolean;
97
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
97
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
98
98
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
99
99
  export default _default;
100
100
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"UploadInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/UploadInput.vue"],"names":[],"mappings":"AAyTA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAsInE,iBAAS,cAAc;WA+jBT,OAAO,IAA6B;;;;;;;;;;;;;;;;;;;;;;;;YAZtB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;YACW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;YACV,GAAG;;;;EAerC;AA+BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;wFASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"UploadInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/UploadInput.vue"],"names":[],"mappings":"AA6TA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAuInE,iBAAS,cAAc;WAqmBT,OAAO,IAA6B;;;;;;;;;;;;;;;;;;;;;;;;YAZtB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;YACW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;YACV,GAAG;;;;EAerC;AAiCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { AssetReference } from '../../assets';
2
+ type __VLS_Props = {
3
+ asset: AssetReference;
4
+ type: string;
5
+ name?: string;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
8
+ export default _default;
9
+ //# sourceMappingURL=AssetPreview.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssetPreview.vue.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/AssetPreview.vue"],"names":[],"mappings":"AAkBA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAEpE,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AA6F1E,wBAOG"}
@@ -1 +1 @@
1
- {"version":3,"file":"Lightbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/Lightbox.vue"],"names":[],"mappings":"AA6cA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAsBpD,iBAAS,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,QAY5D;AAED,iBAAS,KAAK,SAEb;;;;;;;AAylBD,wBAQG"}
1
+ {"version":3,"file":"Lightbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/Lightbox.vue"],"names":[],"mappings":"AAkdA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAuBpD,iBAAS,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,YAAY,EAAE,QAe5D;AAED,iBAAS,KAAK,SAEb;;;;;;;AAymBD,wBAQG"}
@@ -1,5 +1,6 @@
1
+ import { AssetReference } from '../../assets';
1
2
  type __VLS_Props = {
2
- src?: string;
3
+ src?: string | AssetReference;
3
4
  };
4
5
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLImageElement>;
5
6
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"LightboxImage.vue.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/LightboxImage.vue"],"names":[],"mappings":"AAsBA,KAAK,WAAW,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AA6CpC,wBAOG"}
1
+ {"version":3,"file":"LightboxImage.vue.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/LightboxImage.vue"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,KAAK,WAAW,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,GAAG,cAAc,CAAA;CAAE,CAAC;;AA+CrD,wBAOG"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoC,MAAM,EAAE,MAAM,KAAK,CAAA;AAiGnE,QAAA,MAAM,cAAc,EAAE,MAIrB,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoC,MAAM,EAAE,MAAM,KAAK,CAAA;AA0HnE,QAAA,MAAM,cAAc,EAAE,MAIrB,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -1,9 +1,16 @@
1
+ import { AssetReference } from '../../assets';
1
2
  export type XORSrcPath = {
2
3
  src: string;
3
4
  pathKey?: never;
5
+ asset?: never;
4
6
  } | {
5
7
  src?: never;
6
8
  pathKey: string;
9
+ asset?: never;
10
+ } | {
11
+ src?: never;
12
+ pathKey?: never;
13
+ asset: AssetReference;
7
14
  };
8
15
  export type LightboxItem = XORSrcPath & {
9
16
  type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"lightbox.types.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/lightbox.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAE5F,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA"}
1
+ {"version":3,"file":"lightbox.types.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/lightbox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,MAAM,MAAM,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GACrE;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GAC/C;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,cAAc,CAAA;CAAE,CAAA;AAE1D,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA"}
@@ -1,20 +1,24 @@
1
1
  import { MaybeRefOrGetter } from 'vue';
2
+ import { AssetDeliveryRequest } from '../assets';
2
3
  declare global {
3
4
  interface Window {
4
5
  heic2any: any;
5
6
  }
6
7
  }
8
+ /** Remove only the retired sensitive image cache, once per browser session. */
9
+ export declare function clearLegacyImageCache(): Promise<boolean> | undefined;
7
10
  /**
8
11
  * Resolve an image source for display: turns a pathKey/URL into a usable URL via
9
12
  * `pathKeyToURL`, and transparently converts `.heic` files to a displayable blob
10
- * (with a cache) since browsers can't render HEIC in <img>. Shared by <Image>
13
+ * (in memory only) since browsers can't render HEIC in <img>. Shared by <Image>
11
14
  * and the lightbox so both get the same resolution + HEIC handling.
12
15
  *
13
16
  * @param source ref/getter of the raw src or pathKey
14
17
  * @returns `{ imageSrc, loadingError }` reactive refs
15
18
  */
16
- export declare function useImageSrc(source: MaybeRefOrGetter<string | undefined>): {
17
- imageSrc: import('vue').Ref<string | undefined, string | undefined>;
18
- loadingError: import('vue').Ref<boolean, boolean>;
19
+ export declare function useImageSrc(source: MaybeRefOrGetter<string | AssetDeliveryRequest | undefined>): {
20
+ imageSrc: import('vue').ComputedRef<string | undefined>;
21
+ loadingError: import('vue').ComputedRef<boolean>;
22
+ onError: () => void;
19
23
  };
20
24
  //# sourceMappingURL=useImageSrc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useImageSrc.d.ts","sourceRoot":"","sources":["../../src/composables/useImageSrc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAI3C,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,QAAQ,EAAE,GAAG,CAAA;KACb;CACD;AAoCD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC;;;EAkCvE"}
1
+ {"version":3,"file":"useImageSrc.d.ts","sourceRoot":"","sources":["../../src/composables/useImageSrc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAG3C,OAAO,EAAoB,KAAK,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAEvE,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,QAAQ,EAAE,GAAG,CAAA;KACb;CACD;AAGD,+EAA+E;AAC/E,wBAAgB,qBAAqB,iCAIpC;AAYD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAAC;;;;EA2D9F"}