@widgetic/ui-sdk 0.1.3 → 0.1.6
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 +161 -10
- package/dist/{index.js → index.cjs} +17 -24
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +52 -0
- package/dist/index.esm.js +16 -23
- package/dist/index.esm.js.map +1 -1
- package/dist/sdk/core/component.d.cts +46 -0
- package/dist/sdk/core/component.d.ts +1 -1
- package/dist/sdk/core/component.d.ts.map +1 -1
- package/dist/sdk/core/events.d.cts +25 -0
- package/dist/sdk/core/events.d.ts +1 -1
- package/dist/sdk/core/events.d.ts.map +1 -1
- package/dist/sdk/core/index.d.cts +32 -0
- package/dist/sdk/core/index.d.ts +6 -6
- package/dist/sdk/core/index.d.ts.map +1 -1
- package/dist/sdk/core/lifecycle.d.cts +96 -0
- package/dist/sdk/core/lifecycle.d.ts +3 -3
- package/dist/sdk/core/lifecycle.d.ts.map +1 -1
- package/dist/sdk/core/local-events.d.cts +24 -0
- package/dist/sdk/core/local-events.d.ts +1 -1
- package/dist/sdk/core/local-events.d.ts.map +1 -1
- package/dist/sdk/core/messaging.d.cts +57 -0
- package/dist/sdk/core/messaging.d.ts +2 -2
- package/dist/sdk/core/messaging.d.ts.map +1 -1
- package/dist/sdk/core/state.d.cts +64 -0
- package/dist/sdk/core/state.d.ts +10 -3
- package/dist/sdk/core/state.d.ts.map +1 -1
- package/dist/sdk/core/theme-mode.d.cts +43 -0
- package/dist/sdk/core/theme-mode.d.ts +1 -1
- package/dist/sdk/core/theme-mode.d.ts.map +1 -1
- package/dist/sdk/core/theme.d.cts +57 -0
- package/dist/sdk/core/theme.d.ts +2 -2
- package/dist/sdk/core/theme.d.ts.map +1 -1
- package/dist/sdk/index.d.cts +3 -0
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/integration/host.d.cts +53 -0
- package/dist/sdk/integration/host.d.ts +2 -2
- package/dist/sdk/integration/host.d.ts.map +1 -1
- package/dist/sdk/integration/index.d.cts +18 -0
- package/dist/sdk/integration/index.d.ts +1 -1
- package/dist/sdk/integration/index.d.ts.map +1 -1
- package/dist/sdk/layers/index.d.cts +35 -0
- package/dist/sdk/loader/ui.d.cts +207 -0
- package/dist/sdk/loader/ui.d.ts +49 -6
- package/dist/sdk/loader/ui.d.ts.map +1 -1
- package/dist/sdk/modules/index.d.cts +8 -0
- package/dist/sdk/modules/index.d.ts +1 -1
- package/dist/sdk/modules/index.d.ts.map +1 -1
- package/dist/sdk/modules/loader.d.cts +83 -0
- package/dist/sdk/modules/loader.d.ts +1 -1
- package/dist/sdk/modules/loader.d.ts.map +1 -1
- package/dist/sdk/types/component.d.cts +214 -0
- package/dist/sdk/types/component.d.ts +49 -11
- package/dist/sdk/types/component.d.ts.map +1 -1
- package/dist/sdk/types/events.d.cts +111 -0
- package/dist/sdk/types/events.d.ts.map +1 -1
- package/dist/sdk/types/index.d.cts +43 -0
- package/dist/sdk/types/index.d.ts +8 -6
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/messaging.d.cts +40 -0
- package/dist/sdk/types/module-events.d.cts +212 -0
- package/dist/sdk/types/module-events.d.ts +213 -0
- package/dist/sdk/types/module-events.d.ts.map +1 -0
- package/dist/sdk/types/module-language.d.cts +46 -0
- package/dist/sdk/types/module-media-library.d.cts +143 -0
- package/dist/sdk/types/module-media-library.d.ts +144 -0
- package/dist/sdk/types/module-media-library.d.ts.map +1 -0
- package/dist/sdk/types/module-theme.d.cts +96 -0
- package/dist/sdk/types/module-theme.d.ts +1 -1
- package/dist/sdk/types/module-theme.d.ts.map +1 -1
- package/dist/sdk/types/state.d.cts +37 -0
- package/dist/sdk/types/state.d.ts.map +1 -1
- package/dist/sdk/types/theme.d.cts +75 -0
- package/dist/sdk/utils/config.d.cts +69 -0
- package/dist/sdk/utils/config.d.ts.map +1 -1
- package/dist/sdk/utils/errors.d.cts +55 -0
- package/dist/sdk/utils/errors.d.ts +1 -1
- package/dist/sdk/utils/errors.d.ts.map +1 -1
- package/dist/sdk/utils/http.d.cts +20 -0
- package/dist/sdk/utils/security.d.cts +94 -0
- package/dist/sdk/utils/validation.d.cts +63 -0
- package/dist/sdk/utils/validation.d.ts +1 -1
- package/dist/sdk/utils/validation.d.ts.map +1 -1
- package/dist/sdk/version.d.cts +10 -0
- package/dist/sdk/version.d.ts +5 -2
- package/dist/sdk/version.d.ts.map +1 -1
- package/dist/services/dataService.d.cts +9 -0
- package/dist/services/dataService.d.ts +4 -4
- package/dist/services/dataService.d.ts.map +1 -1
- package/dist/umd/ui-sdk.js +1 -1
- package/dist/umd/ui-sdk.js.map +1 -1
- package/dist/utils/caseConversion.d.cts +2 -0
- package/dist/utils/caseConversion.d.ts +2 -2
- package/dist/utils/caseConversion.d.ts.map +1 -1
- package/modules/README.md +79 -43
- package/package.json +24 -10
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -85,8 +85,10 @@ With a script tag (pin the version; do not use `@latest`):
|
|
|
85
85
|
</script>
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
The package ships ES modules (`dist/index.esm.js`), CommonJS (`dist/index.
|
|
89
|
-
`WidgeticUISDK`.
|
|
88
|
+
The package ships ES modules (`dist/index.esm.js`), CommonJS (`dist/index.cjs`) and a UMD file that adds one global,
|
|
89
|
+
`WidgeticUISDK`. The types come with it and resolve under `moduleResolution` `bundler`, `node16`, `nodenext` and `node10`,
|
|
90
|
+
for a project that compiles to ES modules and for one that compiles to CommonJS: CI compiles a sample project for each of
|
|
91
|
+
them before a release goes out.
|
|
90
92
|
|
|
91
93
|
## `mountModule(name, options)`
|
|
92
94
|
|
|
@@ -101,12 +103,12 @@ Mounts one module and resolves with a handle once it is on screen.
|
|
|
101
103
|
| `locale` | `string` | A BCP 47 tag such as `en` or `de`. Every module uses it for plural rules and for how numbers, dates and sizes are written; their words come from `messages`. See [Speaking your visitors' language](#speaking-your-visitors-language). |
|
|
102
104
|
| `apiUrl` | `string` | The Widgetic API. Default `https://api.widgetic.com`. |
|
|
103
105
|
| `moduleBaseUrl` | `string` | Where modules are served from. Default `https://cdn.widgetic.com/modules`. |
|
|
104
|
-
| `on` | `{ [event]: handler }` | Event handlers, connected before the module starts so you see `ready`. |
|
|
106
|
+
| `on` | `{ [event]: handler }` | Event handlers, connected before the module starts so you see `ready`. For the File Browser, the composition editor and the widget creator the event names and what each one carries are typed: see [Events](#events). |
|
|
105
107
|
| `callbacks` | `{ onReady, onError }` | The same two events as plain callbacks. |
|
|
106
108
|
| `signal` | `AbortSignal` | Cancels the mount. See [Cancelling](#cancelling-a-mount). |
|
|
107
109
|
| `placeholder` | `boolean` | `false` skips the loading spinner shown while the module downloads. |
|
|
108
110
|
| `loadingLabel` | `string` | What a screen reader says for that spinner. Default `Loading`: give it in your visitors' language. |
|
|
109
|
-
| *anything else* | | Handed to the module. File Browser: `maxSelections`, `initialFilter`, `selectLabel`, `messages`, `mediaLibrary`. Composition editor: `compositionId`, `mediaLibrary`, `googleFontsApiKey`, `autosaveDelayMs`, `messages`. Widget creator: `canvasId`, `widgetId`, `startWithNewWidget`, `presets`, `startFromPreset`, `presetLabels`, `messages`, `mediaLibrary`, `widgetBuilderUrl`. |
|
|
111
|
+
| *anything else* | | Handed to the module. Every module: `themeFromHost` (see [Looking like your product](#looking-like-your-product)). File Browser: `maxSelections`, `initialFilter`, `selectLabel`, `messages`, `mediaLibrary`. Composition editor: `compositionId`, `mediaLibrary`, `pickFile`, `lockPreviewSize`, `googleFontsApiKey`, `autosaveDelayMs`, `messages`. Widget creator: `canvasId`, `widgetId`, `startWithNewWidget`, `presets`, `startFromPreset`, `presetLabels`, `messages`, `mediaLibrary`, `pickFile`, `widgetBuilderUrl`. The types of your library, your picker and the files they handle are exported (see [Your own files, typed](#your-own-files-typed)). |
|
|
110
112
|
|
|
111
113
|
The handle:
|
|
112
114
|
|
|
@@ -115,7 +117,7 @@ The handle:
|
|
|
115
117
|
id: string; type: string; version: string; // version is the one that was actually loaded
|
|
116
118
|
container: HTMLElement;
|
|
117
119
|
module: UIModule; // the module instance, for module-specific methods
|
|
118
|
-
on(event, handler): () => void; // returns a function that unsubscribes
|
|
120
|
+
on(event, handler): () => void; // returns a function that unsubscribes; typed per module, see "Events"
|
|
119
121
|
off(event, handler): void;
|
|
120
122
|
setTheme(theme): void; // this module's look alone: see "Looking like your product"
|
|
121
123
|
setLanguage({ locale?, messages? }): void; // this module's words alone: see "Speaking your visitors' language"
|
|
@@ -149,6 +151,8 @@ const fileBrowser = await mountModule('file-browser', {
|
|
|
149
151
|
upload: async ({ file, onProgress, signal }) => uploadToAcme(file, onProgress, signal), // return the stored file
|
|
150
152
|
rename: async ({ id, name, signal }) => renameInAcme(id, name, signal),
|
|
151
153
|
delete: async ({ id, signal }) => deleteInAcme(id, signal),
|
|
154
|
+
// Optional. The address to save for a file that was picked: see "urlResolver" below.
|
|
155
|
+
urlResolver: async (file) => `https://cdn.acme.com/assets/${file.id}`,
|
|
152
156
|
},
|
|
153
157
|
on: {
|
|
154
158
|
select: ({ files }) => useFiles(files), // your files, as your library described them
|
|
@@ -172,6 +176,74 @@ loads that address, not only the person who picked it: give one that stays valid
|
|
|
172
176
|
expires after a few minutes, or one that checks a cookie, breaks the published widget). Widgetic keeps the `id` with the
|
|
173
177
|
file only so that the picker shows it as selected when it is opened again.
|
|
174
178
|
|
|
179
|
+
### A stable address for a picked file: `urlResolver`
|
|
180
|
+
|
|
181
|
+
`urlResolver(file)` is optional and sits on the same object. When a file of your library is picked (the File Browser's
|
|
182
|
+
`select` event, or a file field of the composition editor or the widget creator storing it), the module calls it with
|
|
183
|
+
that file and saves the address it returns, instead of the file's own `url`. Use it when `list` hands out short-lived
|
|
184
|
+
signed addresses but a published widget needs one that stays valid, or one that redirects to a fresh copy.
|
|
185
|
+
|
|
186
|
+
- It returns a string or a promise and has 10 seconds. When it throws, takes longer, or returns something that is not an
|
|
187
|
+
`http:` or `https:` address, the file's own `url` is kept and one warning is written to the console.
|
|
188
|
+
- It also applies to the files your [`pickFile`](#your-own-file-picker-for-file-fields-pickfile) returns, and to what
|
|
189
|
+
`upload` returns for a file field.
|
|
190
|
+
- **An address that redirects works for pictures, audio and video** loaded the plain way (`<img>`, `<video>`,
|
|
191
|
+
`<audio>`): the browser follows the redirect, sends no cookies and needs no CORS headers. **Anything the browser
|
|
192
|
+
loads in CORS mode needs `Access-Control-Allow-Origin` on the redirect answer and on the final file**: fonts (always),
|
|
193
|
+
pictures, video or audio that a widget reads through a canvas, WebGL or Web Audio (`crossorigin="anonymous"`), and
|
|
194
|
+
`fetch`. After a redirect to another site the browser sends `Origin: null` to the final host, so a rule that names your
|
|
195
|
+
page's origin fails there: answer `*`, or echo the `Origin` you receive. Measured in Chromium 153; Firefox and Safari
|
|
196
|
+
were not run (the Fetch standard says the same), and a Content-Security-Policy on the widget's page applies on top.
|
|
197
|
+
|
|
198
|
+
### Your own file picker for file fields: `pickFile`
|
|
199
|
+
|
|
200
|
+
When a visitor chooses a file for a field (a picture, a sound, a font), the composition editor and the widget creator
|
|
201
|
+
open the File Browser. Give them `pickFile` to open **your** picker instead; it needs no `mediaLibrary`:
|
|
202
|
+
|
|
203
|
+
```js
|
|
204
|
+
const editor = await mountModule('composition-editor', {
|
|
205
|
+
container: '#editor',
|
|
206
|
+
compositionId: 'cmp_123',
|
|
207
|
+
getToken,
|
|
208
|
+
pickFile: async ({ accept, multiple, signal }) => {
|
|
209
|
+
const chosen = await myPicker.open({ types: accept, many: multiple, cancel: signal });
|
|
210
|
+
// [] when the visitor closes it without choosing
|
|
211
|
+
return chosen.map((file) => ({ id: file.id, name: file.name, url: file.publicUrl, mimeType: file.type }));
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
- **`accept`** is the list of types the field allows, as the field gives it (for example `['image/*']`), and `['*/*']`
|
|
217
|
+
when the field names none. **`multiple`** is `false` for file fields. **`signal`** aborts when the visitor closes the
|
|
218
|
+
editor or starts another pick.
|
|
219
|
+
- **Return a list of files.** Each needs an `id` and a `url`, both non-empty strings, and the `url` should be an `http:`
|
|
220
|
+
or `https:` address: it is what the widget stores and shows. A file without them is skipped with a console warning,
|
|
221
|
+
and so is an answer that is not a list. A field takes the first file of the list.
|
|
222
|
+
- **To cancel**, resolve `[]` or reject with an `AbortError`. Any other error is written to the console once and counts
|
|
223
|
+
as nothing picked: the field stays as it was, and the visitor sees nothing, so say it in your own picker.
|
|
224
|
+
- **It serves file fields only**: in the composition editor, and in the widget creator's settings panel. Chat attachments
|
|
225
|
+
and pictures dropped on the canvas or into the prompt do not use it: they go to `mediaLibrary.upload({ file, purpose })`
|
|
226
|
+
(`purpose` is `'chat'` or `'canvas'`) when you give one. A `mediaLibrary` still needs its `list`, with or without a
|
|
227
|
+
`pickFile`.
|
|
228
|
+
- `mediaLibrary.urlResolver` (above) is applied to the files your picker returns.
|
|
229
|
+
|
|
230
|
+
### Your own files, typed
|
|
231
|
+
|
|
232
|
+
The types of the files, the library and the picker are exported, so your functions are checked when you write them:
|
|
233
|
+
|
|
234
|
+
```ts
|
|
235
|
+
import type { MediaLibraryFile, PartnerMediaLibrary, PickFileFn, PickFileRequest } from '@widgetic/ui-sdk';
|
|
236
|
+
|
|
237
|
+
const pickFile: PickFileFn = async ({ accept, multiple, signal }: PickFileRequest): Promise<MediaLibraryFile[]> => [];
|
|
238
|
+
const mediaLibrary: PartnerMediaLibrary = { id: 'acme-assets', list: async () => ({ items: [], nextCursor: null }) };
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
`@widgetic/ui-sdk` also exports `MediaLibraryListRequest`, `MediaLibraryPage`, `MediaLibraryUploadRequest`,
|
|
242
|
+
`MediaLibraryRenameRequest`, `MediaLibraryDeleteRequest`, `MediaLibraryUrlResolver` and `MediaUploadPurpose`. On the
|
|
243
|
+
options of `mountModule` and `ui.mount`, `mediaLibrary`, `pickFile`, `lockPreviewSize` and `themeFromHost` are typed too:
|
|
244
|
+
a `mediaLibrary` without `list`, or a `lockPreviewSize` that is not `true` or `false`, is refused when you compile. So
|
|
245
|
+
is `on`, from the name of the module: see [Events](#events).
|
|
246
|
+
|
|
175
247
|
### The composition editor
|
|
176
248
|
|
|
177
249
|
Let a user change the texts, pictures, colours and fonts of a widget they own, beside a live preview, and save it. It is
|
|
@@ -207,9 +279,14 @@ await editor.unmount();
|
|
|
207
279
|
`fatal: true` means the editor cannot go on by itself: the composition cannot be opened, or the session is over
|
|
208
280
|
(`sessionEnded: true`), so mint a new session or take the editor away. Quote `correlationId` to Widgetic's support.
|
|
209
281
|
- **Your own files.** Pass `mediaLibrary` (above) and the editor's file pickers show your files instead of the user's
|
|
210
|
-
Widgetic uploads.
|
|
282
|
+
Widgetic uploads, or pass [`pickFile`](#your-own-file-picker-for-file-fields-pickfile) to open your own picker.
|
|
211
283
|
- **Fonts.** `googleFontsApiKey` is a Google Fonts Web Fonts API key for the font picker's list; without one the picker
|
|
212
284
|
lists a short set of popular families.
|
|
285
|
+
- **Preview size.** `lockPreviewSize: true` lets the user resize the preview, to see the widget at another size, without
|
|
286
|
+
changing the size that is saved: the composition's `embedSettings.width` and `embedSettings.height` stay as they were,
|
|
287
|
+
and resizing does not count as an unsaved change. Use it when your page decides how big the widget is. By default
|
|
288
|
+
(`false`) resizing the preview changes the saved size. A value that is not `true` or `false` is ignored, with one
|
|
289
|
+
warning in the console.
|
|
213
290
|
- **One composition editor per page** for now; a second is refused with a clear message.
|
|
214
291
|
|
|
215
292
|
### The widget creator
|
|
@@ -268,7 +345,8 @@ await creator.unmount();
|
|
|
268
345
|
be retried, or the starting points not working: `during: 'presets'`). `reloadRequested` means the creator would have reloaded the page to
|
|
269
346
|
recover: unmount it and mount a new one.
|
|
270
347
|
- **Your own files.** Pass `mediaLibrary` (above) and the settings panel's file pickers show your files instead of the
|
|
271
|
-
user's Widgetic uploads
|
|
348
|
+
user's Widgetic uploads, or pass [`pickFile`](#your-own-file-picker-for-file-fields-pickfile) to open your own picker
|
|
349
|
+
for those file fields. When `upload` is given, chat attachments and canvas/prompt images call it with
|
|
272
350
|
`purpose: 'chat'` or `'canvas'` once per file (`{ file, purpose, onProgress?, signal? }`; pickers use `'field'`).
|
|
273
351
|
A file that is attached and then sent with the message is uploaded once, not again when the message is sent. The
|
|
274
352
|
transfer has no time limit of ours. When `upload` is given, a failure does not store the file in Widgetic: the visitor
|
|
@@ -325,10 +403,25 @@ editor.setTheme({ radius: 'none' }); // one module alone
|
|
|
325
403
|
| --- | --- |
|
|
326
404
|
| `preset` | `'widgetic'` (the default look), `'graphite'`, `'ocean'`, `'violet'` or `'sunset'`. Colours only. |
|
|
327
405
|
| `mode` | `'light'`, `'dark'`, or (page-wide, for a visitor's own setting) `'system'`. |
|
|
328
|
-
| `colors` | Any of `primary`, `primaryForeground`, `background`, `foreground`, `muted`, `mutedForeground`, `border`, `accent`, `destructive`, written out (`#0b69c7`, `rgb(11 105 199)`, `hsl(210 90% 41%)`). Name only what you want to decide: the rest follows. |
|
|
406
|
+
| `colors` | Any of `primary`, `primaryForeground`, `background`, `foreground`, `muted`, `mutedForeground`, `border`, `accent`, `destructive`, `surface` (panel and card backgrounds), `secondary` (quiet fills and rows, unless you also name `muted`), written out (`#0b69c7`, `rgb(11 105 199)`, `hsl(210 90% 41%)`). Name only what you want to decide: the rest follows. |
|
|
329
407
|
| `radius` | `'none'`, `'small'`, `'medium'`, `'large'`, or pixels from 0 to 32. |
|
|
330
408
|
| `font` | `{ family, stylesheetUrl? }`. A font your page does not load yet needs the `https` address of its stylesheet; the module adds one `<link>` to your `<head>`. |
|
|
331
409
|
|
|
410
|
+
- **`themeFromHost: true`** (a mount option, for every module) takes the look from your page instead of making you write
|
|
411
|
+
it out. As the module starts it reads the colours and the corner radius from the CSS custom properties that apply to
|
|
412
|
+
the container it is mounted in, including ones set on a parent: `--primary`, `--primary-foreground`, `--background`,
|
|
413
|
+
`--foreground`, `--muted`, `--muted-foreground`, `--border`, `--accent`, `--destructive`, `--secondary`, `--surface`
|
|
414
|
+
and `--radius`. Only the ones that are set and that the module can read are used; the rest is left out, and a page's
|
|
415
|
+
own value never makes the mount fail.
|
|
416
|
+
- Colours are read when written as `#rgb`, `#rrggbb` (with or without a transparency), `rgb()` or `hsl()`. A bare
|
|
417
|
+
triplet such as `222.2 47.4% 11.2%`, `oklch()`, a colour name and `var()` are not read: give those in `theme.colors`.
|
|
418
|
+
- `--radius` is read in pixels (`8px`), in rem (`0.5rem`, at your page's root font size), as a bare number of pixels,
|
|
419
|
+
or as one of the words `none`, `small`, `medium`, `large`. A corner larger than 32 pixels is drawn as 32.
|
|
420
|
+
- It reads again when the container's own `style` or `class` attribute changes (at most once per animation frame). A
|
|
421
|
+
change made higher up, such as a `dark` class on `<html>`, is not noticed: put the class on the container, or call
|
|
422
|
+
`setTheme`.
|
|
423
|
+
- What you give in `theme`, and in `setTheme` later, wins over the page's. Default `false`; a value that is not `true`
|
|
424
|
+
or `false` is ignored, with one warning in the console.
|
|
332
425
|
- A bare mode (`'dark'`, `{ mode: 'dark' }`) changes the mode and keeps the rest; settings replace the whole look.
|
|
333
426
|
- Settings in a mount call, or in `mounted.setTheme(...)`, are that module's own: `ui.updateTheme(settings)` does not
|
|
334
427
|
take them away, and a page that changes a preset does not turn a dark module light. A call that names a mode reaches every module.
|
|
@@ -351,7 +444,7 @@ Browser's; the differences of the composition editor and the widget creator are
|
|
|
351
444
|
|
|
352
445
|
- **`locale`**, a [BCP 47](https://www.rfc-editor.org/info/bcp47) tag such as `de` or `pt-BR`. It sets the plural rules
|
|
353
446
|
("1 file", "2 files"; Polish and Arabic have more forms) and how numbers, dates and file sizes are written (`1,5 KB` in
|
|
354
|
-
German). When the module has a **translation pack** for that tag (
|
|
447
|
+
German). When the module has a **translation pack** for that tag (twelve languages ship today; see the modules' README),
|
|
355
448
|
it loads the pack from the CDN and applies those words under your `messages`. Tags with no pack keep English for words.
|
|
356
449
|
A tag the browser has no plural data for (`xx`) is reported in the console and English formatting is used.
|
|
357
450
|
- **`messages`**, the words: an object of message keys and texts. A key you leave out stays English, so a language can be
|
|
@@ -429,6 +522,54 @@ files.setLanguage({ locale: '', messages: {} }); // back to Englis
|
|
|
429
522
|
| `limitReached` | `{ message, code? }` | Widget creator: the user ran into a limit (credits, plan, storage, allowance). The creator has told them already. |
|
|
430
523
|
| `reloadRequested` | | Widget creator: it would have reloaded the page to recover. Unmount it and mount a new one. |
|
|
431
524
|
|
|
525
|
+
The event names, and what each one carries, are typed for the File Browser, the composition editor and the widget
|
|
526
|
+
creator. The compiler knows which module you mount from its name, so `on` (and `on` and `off` of the handle) take only
|
|
527
|
+
that module's events, and each handler is given the payload of its event:
|
|
528
|
+
|
|
529
|
+
```ts
|
|
530
|
+
import { mountModule, type CompositionEditorEvents } from '@widgetic/ui-sdk';
|
|
531
|
+
|
|
532
|
+
const editor = await mountModule('composition-editor', {
|
|
533
|
+
container: '#editor',
|
|
534
|
+
compositionId: 'cmp_123',
|
|
535
|
+
getToken,
|
|
536
|
+
on: {
|
|
537
|
+
saved: ({ savedAt }) => markSaved(savedAt), // `savedAt` is a number
|
|
538
|
+
savd: () => {}, // does not compile: the composition editor has no such event
|
|
539
|
+
},
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
editor.on('dirty', ({ dirty }) => markUnsaved(dirty)); // `dirty` is a boolean
|
|
543
|
+
|
|
544
|
+
// A handler written on its own takes the type of the event it handles:
|
|
545
|
+
const reportError = (error: CompositionEditorEvents['error']) => report(error.code, error.message, error.sessionEnded);
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
The types are exported: `FileBrowserEvents`, `CompositionEditorEvents` and `WidgetCreatorEvents` (one property per event);
|
|
549
|
+
`PickedFile` and `LibraryAction` (what `select` and the File Browser's `error` carry); `ModuleErrorEvent` (what every
|
|
550
|
+
`error` carries), with `FileBrowserErrorEvent`, `CompositionEditorErrorEvent` and `WidgetCreatorErrorEvent` for what each
|
|
551
|
+
module adds, and `CompositionEditorErrorDuring` and `WidgetCreatorErrorDuring` for the values of `during`; and, for code
|
|
552
|
+
that handles any module, `ModuleEventMap`, `KnownModuleName`, `ModuleEvents`, `ModuleEventHandlers`, `ModuleEventName`
|
|
553
|
+
and `ModuleEventPayload`.
|
|
554
|
+
|
|
555
|
+
A module with any other name still works and its events are not checked: every name is accepted and every payload is
|
|
556
|
+
`any`, as it was before these types. The same holds when the name is not a literal (a `string` variable: the compiler
|
|
557
|
+
cannot tell which module it is).
|
|
558
|
+
|
|
559
|
+
To type `mounted.module`, give the type of the module instance as the one type argument. The events stay checked:
|
|
560
|
+
|
|
561
|
+
```ts
|
|
562
|
+
const fileBrowser = await mountModule<MyFileBrowserModule>('file-browser', {
|
|
563
|
+
container: '#files',
|
|
564
|
+
on: { select: ({ files }) => useFiles(files) }, // still checked
|
|
565
|
+
});
|
|
566
|
+
fileBrowser.module; // MyFileBrowserModule
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
For a module with any other name (`embed-editor`, or one published after this release), or a name that is not a
|
|
570
|
+
literal, give both type arguments: `mountModule<MyModule, 'acme-chart'>('acme-chart', …)`. With the one type argument
|
|
571
|
+
only, such a call does not compile.
|
|
572
|
+
|
|
432
573
|
## Tokens
|
|
433
574
|
|
|
434
575
|
`getToken` is the only credential the SDK takes. It is called with `{ reason }`:
|
|
@@ -691,7 +832,9 @@ them directly; they are deprecated and no longer used by the SDK itself.
|
|
|
691
832
|
```bash
|
|
692
833
|
npm install
|
|
693
834
|
npm test # unit tests (vitest, jsdom)
|
|
694
|
-
npm run build # dist/index.esm.js, dist/index.
|
|
835
|
+
npm run build # dist/index.esm.js, dist/index.cjs, dist/umd/ui-sdk.js and the declarations (.d.ts and .d.cts)
|
|
836
|
+
npm run build:publish # a clean build of what npm ships, then a sample project compiled against it under each moduleResolution
|
|
837
|
+
# (bundler, node16, nodenext, node10), as an ES module project and as a CommonJS project
|
|
695
838
|
npm run build:sdk # each part as its own IIFE and ES file in dist/browser and dist/esm, with no .env values
|
|
696
839
|
# (REPLICABLE=1). Not part of the npm package, and it empties dist/ first: run `npm run build` after it
|
|
697
840
|
```
|
|
@@ -717,6 +860,14 @@ npm run i # install, then link the api-sdk checkout
|
|
|
717
860
|
npm run lapisdk # re-link only, after a fresh node_modules
|
|
718
861
|
```
|
|
719
862
|
|
|
863
|
+
## Publishing
|
|
864
|
+
|
|
865
|
+
The loader (`@widgetic/ui-sdk`) is published by GitLab CI on `main`. Bump `version` in `package.json` and push `main`. The job is an npm Trusted Publisher (`NPM_ID_TOKEN`) and skips a version that is already on npm. Before it publishes, the build job runs `npm run build:publish`, which fails when the types of the package would not resolve for a project on `node16`, `nodenext`, `bundler` or `node10`, or when `require()` and `import()` do not load the same exports. Write every relative import in `src/` with its extension (`./x.js`, `./folder/index.js`): `node16` and `nodenext` do not guess it.
|
|
866
|
+
|
|
867
|
+
The modules (file browser, composition editor, widget creator) are released with the loader. Bump `version` in `package.json` and push `main`: the job raises the modules patch, writes one changelog sentence, uploads `https://cdn.widgetic.com/modules`, and pushes that commit back to `main`. A push that does not change the package version does not release the modules. The same upload still runs when a tag named `modules-v<version>` is pushed, for example `modules-v1.2.3`. The steps, the changelog rule, and the rollback are in [`modules/README.md`](modules/README.md), under "Publishing".
|
|
868
|
+
|
|
869
|
+
A laptop publish is the fallback when CI minutes are gone. The token stays in `~/.npmrc` and is never committed.
|
|
870
|
+
|
|
720
871
|
## Contributing
|
|
721
872
|
|
|
722
873
|
We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) and [modules/README.md](modules/README.md) for build, test, and changelog rules.
|
|
@@ -661,7 +661,8 @@ const DEFAULT_CONFIG = {
|
|
|
661
661
|
CLIENT_URL: 'https://widgetic.com',
|
|
662
662
|
PRODUCTION_URL: DEFAULT_API_URL,
|
|
663
663
|
CDN_URL: 'https://cdn.widgetic.com',
|
|
664
|
-
|
|
664
|
+
/** The embed SDK, as a path on `CDN_URL`: https://cdn.widgetic.com/sdks/browser/embed-sdk.js */
|
|
665
|
+
EMBED_SDK_URL: '/sdks/browser/embed-sdk.js'
|
|
665
666
|
};
|
|
666
667
|
/**
|
|
667
668
|
* Configuration Manager
|
|
@@ -992,15 +993,11 @@ class WidgeticUI {
|
|
|
992
993
|
});
|
|
993
994
|
this.followSystemThemeWhenAsked();
|
|
994
995
|
}
|
|
995
|
-
/**
|
|
996
|
-
* Mount a module into a container.
|
|
997
|
-
* @param type - Which module, like `file-browser`
|
|
998
|
-
* @param config - The container, SDK options (`version`, `theme`, `on` ...) and the module's own options
|
|
999
|
-
* @returns The mounted module: subscribe with `.on`, take it down with `.unmount()`
|
|
1000
|
-
*/
|
|
1001
996
|
async mount(type, config) {
|
|
1002
997
|
try {
|
|
1003
|
-
|
|
998
|
+
// The lifecycle manager connects whatever handlers it is given and does not need the module's name in its types.
|
|
999
|
+
// What it returns is the same object, seen through the events of the module that was mounted.
|
|
1000
|
+
return await this.lifecycleManager.mount(type, config);
|
|
1004
1001
|
}
|
|
1005
1002
|
catch (error) {
|
|
1006
1003
|
// A mount the partner cancelled is not a failure to report: it is how a component that went away early ends.
|
|
@@ -1140,16 +1137,6 @@ class WidgeticUI {
|
|
|
1140
1137
|
}
|
|
1141
1138
|
}
|
|
1142
1139
|
}
|
|
1143
|
-
/**
|
|
1144
|
-
* Mount one module with a single call: the SDK is created, the module is mounted, and `unmount()` on the result
|
|
1145
|
-
* takes both down. Use `new WidgeticUI(...)` when a page mounts several modules.
|
|
1146
|
-
*
|
|
1147
|
-
* const fileBrowser = await mountModule('file-browser', {
|
|
1148
|
-
* container: document.getElementById('files'),
|
|
1149
|
-
* getToken: async () => (await fetch('/my-server/widgetic-session')).json(),
|
|
1150
|
-
* on: { select: ({ files }) => useFiles(files) },
|
|
1151
|
-
* });
|
|
1152
|
-
*/
|
|
1153
1140
|
async function mountModule(type, options) {
|
|
1154
1141
|
// Before the options are split: an apiKey left in the mount options would otherwise reach the module.
|
|
1155
1142
|
ValidationUtils.rejectApiKey(options);
|
|
@@ -1454,12 +1441,14 @@ class StateManager {
|
|
|
1454
1441
|
/**
|
|
1455
1442
|
* Retrieve specific state value for a component
|
|
1456
1443
|
*/
|
|
1444
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- a published return type: `unknown` would stop callers that use the value as it is
|
|
1457
1445
|
getState(componentId, key) {
|
|
1458
1446
|
return this.state.get(componentId)?.get(key);
|
|
1459
1447
|
}
|
|
1460
1448
|
/**
|
|
1461
1449
|
* Get entire state map for a component
|
|
1462
1450
|
*/
|
|
1451
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- a published return type: `unknown` would stop callers that use the values as they are
|
|
1463
1452
|
getComponentState(componentId) {
|
|
1464
1453
|
return this.state.get(componentId);
|
|
1465
1454
|
}
|
|
@@ -1613,7 +1602,7 @@ class ThemeManager {
|
|
|
1613
1602
|
}
|
|
1614
1603
|
catch (error) {
|
|
1615
1604
|
console.error('Error updating theme:', error);
|
|
1616
|
-
throw new Error(`Theme update failed: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
1605
|
+
throw new Error(`Theme update failed: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
1617
1606
|
}
|
|
1618
1607
|
}
|
|
1619
1608
|
/**
|
|
@@ -1736,6 +1725,7 @@ class WidgeticComponent {
|
|
|
1736
1725
|
// Listen for theme updates
|
|
1737
1726
|
if (this.events) {
|
|
1738
1727
|
this.events.on('theme:update', (data) => {
|
|
1728
|
+
// The payload is either `{ theme }` or the theme itself.
|
|
1739
1729
|
const theme = data?.theme || data;
|
|
1740
1730
|
if (theme && typeof theme === 'object') {
|
|
1741
1731
|
this.applyTheme(theme);
|
|
@@ -1753,7 +1743,7 @@ class WidgeticComponent {
|
|
|
1753
1743
|
}
|
|
1754
1744
|
catch (error) {
|
|
1755
1745
|
console.error('Error initializing shadow DOM:', error);
|
|
1756
|
-
throw new Error('Failed to initialize component shadow DOM');
|
|
1746
|
+
throw new Error('Failed to initialize component shadow DOM', { cause: error });
|
|
1757
1747
|
}
|
|
1758
1748
|
}
|
|
1759
1749
|
/**
|
|
@@ -2414,7 +2404,7 @@ class SecurityManager {
|
|
|
2414
2404
|
* Placeholder for CSRF token validation
|
|
2415
2405
|
* @private
|
|
2416
2406
|
*/
|
|
2417
|
-
validateCSRFToken(
|
|
2407
|
+
validateCSRFToken(_token) {
|
|
2418
2408
|
// TODO: Implement CSRF token validation
|
|
2419
2409
|
return true;
|
|
2420
2410
|
}
|
|
@@ -2486,9 +2476,12 @@ function createSecureContext(allowedOrigins = []) {
|
|
|
2486
2476
|
/**
|
|
2487
2477
|
* Version and name of the SDK.
|
|
2488
2478
|
*
|
|
2489
|
-
* Keep `SDK_VERSION` equal to "version" in package.json
|
|
2479
|
+
* Keep `SDK_VERSION` equal to "version" in package.json: it is the version the bundles
|
|
2480
|
+
* report at runtime, while package.json is the version the package is published as.
|
|
2481
|
+
* `scripts-sdk/check-version.js` fails `npm run build` when the two disagree, and
|
|
2482
|
+
* `tests/unit/version.test.ts` fails the same way in the suite.
|
|
2490
2483
|
*/
|
|
2491
|
-
const SDK_VERSION = '0.1.
|
|
2484
|
+
const SDK_VERSION = '0.1.6';
|
|
2492
2485
|
const SDK_NAME = '@widgetic/ui-sdk';
|
|
2493
2486
|
|
|
2494
2487
|
/**
|
|
@@ -2556,4 +2549,4 @@ exports.mountModule = mountModule;
|
|
|
2556
2549
|
exports.sanitizeInput = sanitizeInput;
|
|
2557
2550
|
exports.validateOrigin = validateOrigin;
|
|
2558
2551
|
exports.validateResponse = validateResponse;
|
|
2559
|
-
//# sourceMappingURL=index.
|
|
2552
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/sdk/utils/errors.ts","../src/sdk/utils/validation.ts","../src/sdk/core/theme-mode.ts","../src/sdk/core/lifecycle.ts","../src/sdk/core/local-events.ts","../src/sdk/utils/config.ts","../src/sdk/modules/loader.ts","../src/sdk/loader/ui.ts","../src/sdk/layers/index.ts","../src/sdk/core/events.ts","../src/sdk/core/state.ts","../src/sdk/core/theme.ts","../src/sdk/core/component.ts","../src/sdk/core/messaging.ts","../src/sdk/core/index.ts","../src/sdk/integration/host.ts","../src/sdk/utils/http.ts","../src/sdk/utils/security.ts","../src/sdk/version.ts","../src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;MAUa,eAAe,CAAA;AACxB;;;;;;AAMG;AACH,IAAA,OAAO,WAAW,CAAC,OAAe,EAAE,IAAY,EAAA;AAC5C,QAAA,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC;AAC/B,QAAA,KAAuB,CAAC,IAAI,GAAG,IAAI;AACpC,QAAA,OAAO,KAAK;IAChB;AAEA;;;;;;AAMG;AACH,IAAA,OAAO,WAAW,CAAC,KAAc,EAAE,OAAe,EAAA;;AAE9C,QAAA,IAAI,KAAK,YAAY,KAAK,EAAE;AACxB,YAAA,IAAK,KAAuB,CAAC,IAAI,EAAE;AAC/B,gBAAA,OAAO,KAAK;YAChB;YACA,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC;QAC3D;;AAGA,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC;QAClD;;QAGA,OAAO,IAAI,CAAC,WAAW,CACnB,CAAA,iBAAA,EAAoB,OAAO,CAAA,CAAE,EAC7B,eAAe,CAClB;IACL;AAEA;;;;;AAKG;IACH,OAAO,UAAU,CAAC,KAAY,EAAA;QAC1B,OAAO;YACH,OAAO,EAAE,KAAK,CAAC,OAAO;AACtB,YAAA,IAAI,EAAG,KAAuB,CAAC,IAAI,IAAI,eAAe;YACtD,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,KAAK,EAAE,KAAK,CAAC,KAAK;AAClB,YAAA,OAAO,EAAE;SACZ;IACL;AACH;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AAA,MAAM,QAAQ,GAAG,IAAI,eAAe,CAAC,cAAc,CAAC;IAEpD,OAAO;QACH,eAAe,EAAE,CAAC,KAAmB,KAAK,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC;QACzE,cAAc,EAAE,CAAC,MAAc,KAAK,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC;QACnE,aAAa;KAChB;AACL;;AC/UA;;;;;;;AAOG;AACI,MAAM,WAAW,GAAG;AACpB,MAAM,QAAQ,GAAG;;ACTxB;;;;;;;;;;;;;;;;;;;;;AAqBG;AAEH;AAoEA;;AAEG;AACH,YAAe;IACb,WAAW;IACX,QAAQ;IACR,UAAU;IACV,WAAW;IACX,cAAc;CACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Widgetic UI SDK
|
|
3
|
+
* Framework-agnostic loader for Widgetic's UI modules.
|
|
4
|
+
*
|
|
5
|
+
* This SDK puts Widgetic's UI on a partner's page:
|
|
6
|
+
* - File browsing and uploads
|
|
7
|
+
* - Widget creation and editing
|
|
8
|
+
* - Composition editing
|
|
9
|
+
*
|
|
10
|
+
* Compatible with any framework or vanilla JavaScript.
|
|
11
|
+
*
|
|
12
|
+
* import { mountModule } from '@widgetic/ui-sdk';
|
|
13
|
+
*
|
|
14
|
+
* const fileBrowser = await mountModule('file-browser', {
|
|
15
|
+
* container: document.getElementById('files'),
|
|
16
|
+
* getToken: async () => (await fetch('/my-server/widgetic-session')).json(),
|
|
17
|
+
* on: { select: ({ files }) => useFiles(files) },
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* The SDK holds no credentials: the partner's server mints a short-lived editor session token and `getToken`
|
|
21
|
+
* returns it. An API key never belongs in a browser.
|
|
22
|
+
*/
|
|
23
|
+
export { WidgeticUI, mountModule, type WidgeticUIOptions } from './sdk/loader/ui.cjs';
|
|
24
|
+
export { default as UILoader } from './sdk/loader/ui.cjs';
|
|
25
|
+
export { HighLevelUIAPI, type HighLevelUIAPIType } from './sdk/layers/index.cjs';
|
|
26
|
+
export { ModuleLoader, ModuleLoadError, type LoadedModule, type ModuleConstructor, type ModuleLoaderOptions, type ModuleLoadErrorCode } from './sdk/modules/index.cjs';
|
|
27
|
+
export { ModuleMountError } from './sdk/core/lifecycle.cjs';
|
|
28
|
+
export { EventSystem, StateManager, ThemeManager, WidgeticComponent, LifecycleManager, MessagingSystem, Core } from './sdk/core/index.cjs';
|
|
29
|
+
export { HostCommunication } from './sdk/integration/index.cjs';
|
|
30
|
+
export { ConfigManager, config, DEFAULT_CONFIG, DEFAULT_API_URL, DEFAULT_MODULE_BASE_URL } from './sdk/utils/config.cjs';
|
|
31
|
+
export { ValidationError, SecurityError, ComponentError } from './sdk/utils/errors.cjs';
|
|
32
|
+
export { createSecureRequest, validateResponse } from './sdk/utils/http.cjs';
|
|
33
|
+
export { validateOrigin, sanitizeInput, createSecureContext } from './sdk/utils/security.cjs';
|
|
34
|
+
export type * from './sdk/types/index.cjs';
|
|
35
|
+
export { SDK_VERSION, SDK_NAME } from './sdk/version.cjs';
|
|
36
|
+
import { WidgeticUI, mountModule } from './sdk/loader/ui.cjs';
|
|
37
|
+
/**
|
|
38
|
+
* Default export for convenience
|
|
39
|
+
*/
|
|
40
|
+
declare const _default: {
|
|
41
|
+
SDK_VERSION: string;
|
|
42
|
+
SDK_NAME: string;
|
|
43
|
+
WidgeticUI: typeof WidgeticUI;
|
|
44
|
+
mountModule: typeof mountModule;
|
|
45
|
+
HighLevelUIAPI: {
|
|
46
|
+
readonly WidgeticUI: typeof WidgeticUI;
|
|
47
|
+
readonly initialize: (options: import("./sdk/loader/ui.cjs").WidgeticUIOptions) => Promise<WidgeticUI>;
|
|
48
|
+
readonly mountComponent: (type: import("./sdk/types/component.cjs").ModuleName, container: HTMLElement | string, options?: Omit<import("./sdk/types/component.cjs").MountConfig, "container">) => Promise<string>;
|
|
49
|
+
readonly unmountComponent: (instanceId: string) => Promise<void>;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export default _default;
|