@widgetic/editor 4.1.3 → 4.1.4

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
@@ -379,6 +379,8 @@ Note that you need to add the right deploy script that copies the dist folder to
379
379
 
380
380
  ## Deploy the component to the npm package registry
381
381
 
382
+ GitLab CI on `main` publishes this package. 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. `npm publish` below is the laptop fallback when CI minutes are gone. The token stays in `~/.npmrc` and is never committed.
383
+
382
384
  ```bash
383
385
  npm publish
384
386
  ```
@@ -1,4 +1,3 @@
1
- import { SHAD_EDITOR_MESSAGES } from '@widgetic/design-system/shad-editor';
2
1
  export type { EditorCatalogs, EditorLanguage, EditorLanguageHandle } from './languageKit.js';
3
2
  /**
4
3
  * The language of an editor on a page. The editor has two packages inside it (the File Browser that picks a file, and
@@ -207,7 +206,93 @@ export declare const EDITOR_CATALOGS: {
207
206
  readonly 'editor.schema.subtitleFont': "Subtitle Font";
208
207
  };
209
208
  readonly fileBrowser: any;
210
- readonly shadEditor: any;
209
+ readonly shadEditor: {
210
+ readonly 'shadEditor.toolbar.undo': "Undo (\u2318Z)";
211
+ readonly 'shadEditor.toolbar.redo': "Redo (\u2318\u21E7Z)";
212
+ readonly 'shadEditor.toolbar.bold': "Bold (\u2318B)";
213
+ readonly 'shadEditor.toolbar.italic': "Italic (\u2318I)";
214
+ readonly 'shadEditor.toolbar.underline': "Underline (\u2318U)";
215
+ readonly 'shadEditor.toolbar.strikethrough': "Strike (\u2318\u21E7S)";
216
+ readonly 'shadEditor.toolbar.subscript': "Subscript (\u2318,)";
217
+ readonly 'shadEditor.toolbar.superscript': "Superscript (\u2318.)";
218
+ readonly 'shadEditor.toolbar.code': "Code (\u2318E)";
219
+ readonly 'shadEditor.toolbar.blockQuote': "Block Quote (\u2318\u21E7B)";
220
+ readonly 'shadEditor.toolbar.bulletList': "Bullet List (\u2318\u21E78)";
221
+ readonly 'shadEditor.toolbar.orderedList': "Ordered List";
222
+ readonly 'shadEditor.toolbar.taskList': "Tasks List (\u2318\u21E79)";
223
+ readonly 'shadEditor.text.tooltip': "Text Formatting";
224
+ readonly 'shadEditor.text.heading1': "Heading 1";
225
+ readonly 'shadEditor.text.heading2': "Heading 2";
226
+ readonly 'shadEditor.text.heading3': "Heading 3";
227
+ readonly 'shadEditor.text.paragraph': "Paragraph";
228
+ readonly 'shadEditor.text.codeBlock': "Code Block";
229
+ readonly 'shadEditor.align.tooltip': "Text Alignment";
230
+ readonly 'shadEditor.align.left': "Align Left";
231
+ readonly 'shadEditor.align.center': "Align Center";
232
+ readonly 'shadEditor.align.right': "Align Right";
233
+ readonly 'shadEditor.align.justify': "Align Justify";
234
+ readonly 'shadEditor.link.tooltip': "Add Or Remove Link";
235
+ readonly 'shadEditor.link.title': "Link";
236
+ readonly 'shadEditor.link.hint': "Insert or remove link from selected text.";
237
+ readonly 'shadEditor.link.placeholder': "Enter link to attach..";
238
+ readonly 'shadEditor.link.insert': "Insert";
239
+ readonly 'shadEditor.link.remove': "Remove";
240
+ readonly 'shadEditor.image.tooltip': "Add Image";
241
+ readonly 'shadEditor.image.title': "Image";
242
+ readonly 'shadEditor.image.urlHint': "Insert image url";
243
+ readonly 'shadEditor.image.urlPlaceholder': "Enter image url...";
244
+ readonly 'shadEditor.image.orPick': "OR Pick an Image";
245
+ readonly 'shadEditor.table.tooltip': "Table";
246
+ readonly 'shadEditor.table.insert': "Insert Table";
247
+ readonly 'shadEditor.table.header': "Header";
248
+ readonly 'shadEditor.table.toggleColumn': "Toggle Column";
249
+ readonly 'shadEditor.table.toggleRow': "Toggle Row";
250
+ readonly 'shadEditor.table.toggleCell': "Toggle Cell";
251
+ readonly 'shadEditor.table.cells': "Cells";
252
+ readonly 'shadEditor.table.merge': "Merge";
253
+ readonly 'shadEditor.table.split': "Split";
254
+ readonly 'shadEditor.table.mergeOrSplit': "Merge or Split";
255
+ readonly 'shadEditor.table.row': "Row";
256
+ readonly 'shadEditor.table.insertAbove': "Insert Above";
257
+ readonly 'shadEditor.table.insertBelow': "Insert Below";
258
+ readonly 'shadEditor.table.deleteRow': "Delete Row";
259
+ readonly 'shadEditor.table.column': "Column";
260
+ readonly 'shadEditor.table.insertBefore': "Insert Before";
261
+ readonly 'shadEditor.table.insertAfter': "Insert After";
262
+ readonly 'shadEditor.table.deleteColumn': "Delete";
263
+ readonly 'shadEditor.table.deleteTable': "Delete";
264
+ readonly 'shadEditor.textColor.tooltip': "Text Color";
265
+ readonly 'shadEditor.textColor.pick': "Pick a text color";
266
+ readonly 'shadEditor.textColor.remove': "Remove Color";
267
+ readonly 'shadEditor.highlight.tooltip': "Highlighter (\u2318\u21E7H)";
268
+ readonly 'shadEditor.highlight.pick': "Pick a highlight color";
269
+ readonly 'shadEditor.highlight.remove': "Remove Highlight";
270
+ readonly 'shadEditor.quickColor.tooltip': "Quick Colors";
271
+ readonly 'shadEditor.quickColor.textColor': "Text Color";
272
+ readonly 'shadEditor.quickColor.backgroundColors': "Background Colors";
273
+ readonly 'shadEditor.colorName.default': "Default";
274
+ readonly 'shadEditor.colorName.blue': "Blue";
275
+ readonly 'shadEditor.colorName.brown': "Brown";
276
+ readonly 'shadEditor.colorName.green': "Green";
277
+ readonly 'shadEditor.colorName.grey': "Grey";
278
+ readonly 'shadEditor.colorName.orange': "Orange";
279
+ readonly 'shadEditor.colorName.pink': "Pink";
280
+ readonly 'shadEditor.colorName.purple': "Purple";
281
+ readonly 'shadEditor.colorName.red': "Red";
282
+ readonly 'shadEditor.colorName.yellow': "Yellow";
283
+ readonly 'shadEditor.colorPicker.label': "Pick a color";
284
+ readonly 'shadEditor.search.tooltip': "Search And Replace Text";
285
+ readonly 'shadEditor.search.searchPlaceholder': "Enter Text to search..";
286
+ readonly 'shadEditor.search.replacePlaceholder': "Enter Text to Replace..";
287
+ readonly 'shadEditor.search.caseSensitive': "Case Sensitive";
288
+ readonly 'shadEditor.search.position': "{index} / {count}";
289
+ readonly 'shadEditor.imageBlock.back': "Back";
290
+ readonly 'shadEditor.imageBlock.caption': "Caption";
291
+ readonly 'shadEditor.imageBlock.duplicate': "Duplicate";
292
+ readonly 'shadEditor.imageBlock.fullScreen': "Full Screen";
293
+ readonly 'shadEditor.imageBlock.delete': "Delete";
294
+ readonly 'shadEditor.imageBlock.defaultCaption': "Image Caption";
295
+ };
211
296
  };
212
297
  /** Every message of the editor and of the packages inside it, as one catalog: what a page's `messages` may have a key of. */
213
298
  export declare const ALL_EDITOR_MESSAGES: Readonly<Record<string, string>>;
@@ -216,12 +301,12 @@ export declare const ALL_EDITOR_MESSAGES: Readonly<Record<string, string>>;
216
301
  * the nearest real one), a value that is not text, a template that does not parse, or one that asks for a value the message
217
302
  * is never given. An empty list means every message will be used. For a test or a build step of the page.
218
303
  */
219
- export declare const checkEditorMessages: (messages: SHAD_EDITOR_MESSAGES) => SHAD_EDITOR_MESSAGES[];
304
+ export declare const checkEditorMessages: (messages: import("@widgetic/design-system/i18n").MessageOverrides) => import("@widgetic/design-system/i18n").MessageProblem[];
220
305
  /**
221
306
  * Called by the root component of an editor while it is created, so everything inside it speaks the page's language.
222
307
  * The context belongs to one root component, so two editors on a page can speak two languages.
223
308
  */
224
- export declare const provideEditorLanguage: (initial: SHAD_EDITOR_MESSAGES) => import("./languageKit.js").EditorLanguageHandle;
309
+ export declare const provideEditorLanguage: (initial: import("@widgetic/design-system/i18n").I18nSettings) => import("./languageKit.js").EditorLanguageHandle;
225
310
  /**
226
311
  * Called by a part of the editor while it is created. Gives its words as stores, so a part that is already on the screen
227
312
  * changes when the page sets the language again. Outside an editor (a control used on its own) it speaks English.
@@ -3,4 +3,4 @@
3
3
  * its sentences with it until the page gives another translator). The editor's screens get their words, in the page's
4
4
  * language, from `useEditorLanguage` (see `language.ts`).
5
5
  */
6
- export declare const translateEnglish: any;
6
+ export declare const translateEnglish: import("@widgetic/design-system/i18n").Translate<"editor.app.loading" | "editor.app.tryAgain" | "editor.app.retry" | "editor.failure.widgetNotPublished" | "editor.failure.sessionEndedWhileSaving" | "editor.failure.sessionEnded" | "editor.failure.compositionNotFound" | "editor.failure.noAccess" | "editor.failure.noWidget" | "editor.failure.widgetNotFound" | "editor.failure.saveNeedsConnection" | "editor.failure.loadNeedsConnection" | "editor.failure.saveFailed" | "editor.failure.loadFailed" | "editor.failure.settingsLoadFailed" | "editor.failure.noSettings" | "editor.failure.errorCode" | "editor.props.title" | "editor.props.designTab" | "editor.props.contentTab" | "editor.props.contentCard" | "editor.props.save" | "editor.props.saving" | "editor.props.noConfiguration" | "editor.props.noDesignSchema" | "editor.props.noSchemaData" | "editor.props.noComponents" | "editor.props.noProperties" | "editor.props.addItem" | "editor.props.deleteItem" | "editor.embed.title" | "editor.embed.loading" | "editor.embed.noCode" | "editor.embed.codeHeader" | "editor.embed.headerArea" | "editor.embed.readMore" | "editor.embed.copy" | "editor.embed.copied" | "editor.embed.copiedHint" | "editor.embed.copiedDone" | "editor.embed.copyFailed" | "editor.embed.copyFailedHint" | "editor.preview.title" | "editor.preview.dragHandle" | "editor.preview.desktop" | "editor.preview.mobile" | "editor.preview.widthShort" | "editor.preview.heightShort" | "editor.preview.noUrl" | "editor.preview.copyUrl" | "editor.preview.refresh" | "editor.preview.fitToPanel" | "editor.preview.mobileViewport" | "editor.preview.desktopViewport" | "editor.preview.openInNewTab" | "editor.preview.newTab" | "editor.preview.selectWidget" | "editor.preview.widgetName" | "editor.preview.notPublished" | "editor.preview.publishToPreview" | "editor.preview.frameTitle" | "editor.preview.frameTitleNamed" | "editor.preview.unavailable" | "editor.preview.loadFailedPreview" | "editor.preview.retry" | "editor.preview.retryBuild" | "editor.preview.retryPreview" | "editor.preview.fixErrors" | "editor.preview.viewErrors" | "editor.preview.runtimeError" | "editor.preview.compilationErrors" | "editor.preview.compilationErrorsDetail" | "editor.preview.noCodeYet" | "editor.preview.noPreview" | "editor.preview.building" | "editor.preview.loadingWidget" | "editor.preview.loadingPreview" | "editor.preview.checkingWidget" | "editor.preview.applyingSettings" | "editor.preview.connecting" | "editor.preview.generatingCode" | "editor.list.recentlyUsed" | "editor.list.more" | "editor.list.searchResults" | "editor.list.loadingMore" | "editor.list.deleteItem" | "editor.category.all" | "editor.category.mine" | "editor.category.sansSerif" | "editor.category.serif" | "editor.category.script" | "editor.category.other" | "editor.category.icons" | "editor.category.emojis" | "editor.category.clipart" | "editor.font.select" | "editor.font.title" | "editor.font.search" | "editor.font.list" | "editor.font.loading" | "editor.font.noneFound" | "editor.font.noneAvailable" | "editor.font.remove" | "editor.font.weight" | "editor.font.weightList" | "editor.fontWeight.withItalic" | "editor.fontWeight.italic" | "editor.fontWeight.thin" | "editor.fontWeight.extraLight" | "editor.fontWeight.light" | "editor.fontWeight.regular" | "editor.fontWeight.medium" | "editor.fontWeight.semiBold" | "editor.fontWeight.bold" | "editor.fontWeight.extraBold" | "editor.fontWeight.black" | "editor.vector.select" | "editor.vector.title" | "editor.vector.search" | "editor.vector.list" | "editor.vector.noneFound" | "editor.vector.noneAvailable" | "editor.file.useFile" | "editor.file.useImage" | "editor.file.useVideo" | "editor.file.useAudio" | "editor.file.useDocument" | "editor.file.addFile" | "editor.file.addImage" | "editor.file.addVideo" | "editor.file.addAudio" | "editor.file.addDocument" | "editor.file.play" | "editor.file.pause" | "editor.file.notFound" | "editor.file.emptyFolder" | "editor.file.clear" | "editor.file.pickFailed" | "editor.file.dialogTitle" | "editor.file.closeDialog" | "editor.color.noRecent" | "editor.color.picker" | "editor.date.pick" | "editor.date.pickRange" | "editor.date.invalid" | "editor.date.selectMonth" | "editor.date.selectYear" | "editor.date.calendarLabel" | "editor.date.rangeCalendarLabel" | "editor.date.previousMonth" | "editor.date.nextMonth" | "editor.dateField.dayHint" | "editor.dateField.monthHint" | "editor.dateField.yearHint" | "editor.dateField.dayLabel" | "editor.dateField.monthLabel" | "editor.dateField.yearLabel" | "editor.dropdown.select" | "editor.switch.off" | "editor.switch.on" | "editor.tags.add" | "editor.position.x" | "editor.position.y" | "editor.fixedPosition.set" | "editor.fixedPosition.topLeft" | "editor.fixedPosition.topCenter" | "editor.fixedPosition.topRight" | "editor.fixedPosition.centerLeft" | "editor.fixedPosition.centerCenter" | "editor.fixedPosition.centerRight" | "editor.fixedPosition.bottomLeft" | "editor.fixedPosition.bottomCenter" | "editor.fixedPosition.bottomRight" | "editor.corners.group" | "editor.corners.topLeft" | "editor.corners.topRight" | "editor.corners.bottomLeft" | "editor.corners.bottomRight" | "editor.corners.lock" | "editor.corners.unlock" | "editor.textArea.toolbar" | "editor.textArea.toggleBold" | "editor.textArea.toggleItalic" | "editor.textArea.toggleUnderline" | "editor.textArea.toggleLink" | "editor.textArea.text" | "editor.textArea.paragraph" | "editor.textArea.heading1" | "editor.textArea.heading2" | "editor.textArea.heading3" | "editor.textArea.bulletList" | "editor.textArea.numberedList" | "editor.textArea.checkList" | "editor.textArea.textStyles" | "editor.textArea.listStyles" | "editor.textArea.enterUrl" | "editor.schema.subtitleFont">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/editor",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -38,6 +38,7 @@
38
38
  "render-build": "bash render-build.sh",
39
39
  "build": "npm run sync-embed-schema && NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 vite build",
40
40
  "package": "svelte-package",
41
+ "publish-to-npm": "npm version patch --no-git-tag-version && npm run package && npm publish --ignore-scripts --access public",
41
42
  "package:watch": "svelte-package --watch",
42
43
  "preview": "vite preview",
43
44
  "deploy": "vite build && vite preview --host --port 80",