@bygga.dev/editor 1.7.4 → 1.8.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.
package/element.d.ts CHANGED
@@ -69,6 +69,25 @@ type AiAssistant = {
69
69
  actions: readonly AiAction[];
70
70
  run(request: AiRequest): Promise<string>;
71
71
  };
72
+ type ImageSearchQuery = {
73
+ query: string;
74
+ page: number;
75
+ perPage: number;
76
+ };
77
+ type LibraryImage = {
78
+ id: string;
79
+ insertUrl: string;
80
+ thumbnailUrl?: string;
81
+ alt?: string;
82
+ width?: number;
83
+ height?: number;
84
+ photographer?: string;
85
+ };
86
+ type LibraryPage = {
87
+ images: LibraryImage[];
88
+ hasMore: boolean;
89
+ attribution?: string;
90
+ };
72
91
  type EditorConfig = {
73
92
  uploadImage(image: Blob): Promise<string>;
74
93
  saveDocument?(document: Document, compiled: string | null): Promise<void>;
@@ -77,6 +96,7 @@ type EditorConfig = {
77
96
  deleteSavedBlock?(id: string): Promise<void>;
78
97
  plugins?: readonly BlockPlugin[];
79
98
  ai?: AiAssistant;
99
+ searchImages?(query: ImageSearchQuery, signal?: AbortSignal): Promise<LibraryPage>;
80
100
  };
81
101
 
82
102
  declare const SUPPORTED_LOCALES: readonly ["en", "sv"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bygga.dev/editor",
3
- "version": "1.7.4",
3
+ "version": "1.8.2",
4
4
  "description": "Visual content builder shipped as the <bygga-editor> custom element",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -4772,6 +4772,6 @@ var su = !1, cu = () => {
4772
4772
  withMemo: () => qs,
4773
4773
  withModifiers: () => ql,
4774
4774
  withScopeId: () => cr
4775
- }), uu = () => {}, du = Symbol("editorData"), fu = Symbol("documentActions"), pu = Symbol("stackAcceptsDrop"), mu = Symbol("anchorIds"), hu = Symbol("documentFont"), gu = Symbol("documentKind"), _u = Symbol("pluginGlobals"), vu = Symbol("flyoutHost"), yu = Symbol("underCondition"), bu = Symbol("columnsAcross");
4775
+ }), uu = () => {}, du = Symbol("editorData"), fu = Symbol("documentActions"), pu = Symbol("stackAcceptsDrop"), mu = Symbol("anchorIds"), hu = Symbol("documentFont"), gu = Symbol("documentKind"), _u = Symbol("pluginGlobals"), vu = Symbol("flyoutHost"), yu = Symbol("containingColumns"), bu = Symbol("underCondition"), xu = Symbol("columnsAcross");
4776
4776
  //#endregion
4777
- export { mn as $, Oi as A, Ki as B, Ws as C, as as D, vs as E, Da as F, ta as G, fr as H, xs as I, ei as J, Qr as K, Kn as L, Q as M, Gs as N, gs as O, pr as P, ur as Q, Gi as R, Zo as S, os as T, aa as U, es as V, sa as W, _r as X, br as Y, lr as Z, Mc as _, gu as a, Kt as at, G as b, _u as c, an as ct, lu as d, _e as dt, je as et, fl as f, ve as ft, Nl as g, Ll as h, t as ht, hu as i, Ne as it, Zr as j, J as k, pu as l, un as lt, Pl as m, Ee as mt, bu as n, L as nt, du as o, Jt as ot, tu as p, j as pt, Ja as q, fu as r, en as rt, vu as s, rn as st, mu as t, Me as tt, yu as u, ln as ut, Yl as v, fs as w, Fr as x, ql as y, Hi as z };
4777
+ export { ur as $, J as A, Hi as B, Zo as C, vs as D, os as E, pr as F, sa as G, es as H, Da as I, Ja as J, ta as K, xs as L, Zr as M, Q as N, as as O, Gs as P, lr as Q, Kn as R, Fr as S, fs as T, fr as U, Ki as V, aa as W, br as X, ei as Y, _r as Z, Nl as _, hu as a, Ne as at, ql as b, vu as c, rn as ct, bu as d, ln as dt, mn as et, lu as f, _e as ft, Ll as g, t as gt, Pl as h, Ee as ht, fu as i, en as it, Oi as j, gs as k, _u as l, an as lt, tu as m, j as mt, xu as n, Me as nt, gu as o, Kt as ot, fl as p, ve as pt, Qr as q, yu as r, L as rt, du as s, Jt as st, mu as t, je as tt, pu as u, un as ut, Mc as v, Ws as w, G as x, Yl as y, Gi as z };