@ones-editor/editor 0.0.9-beta.2 → 0.0.9-beta.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/dist/index.js CHANGED
@@ -3367,7 +3367,7 @@ div.editor-root.readonly div.editor-content div[data-type=editor-block] > [data-
3367
3367
  position: absolute;
3368
3368
  background-color: var(--primary-color);
3369
3369
  pointer-events: none;
3370
- transition: top 0.2s linear, left 0.2s linear, width 0.2s linear;
3370
+ transition: top 0.2s linear, left 0.2s linear;
3371
3371
  }
3372
3372
  .editor-root .editor-content div[data-type=editor-block].text-block.highlighted {
3373
3373
  outline: 2px solid var(--background-selection);
@@ -71422,12 +71422,13 @@ ${data.flowchartText}
71422
71422
  FileBox
71423
71423
  ];
71424
71424
  function createHistoryEditor(root2, doc2, options) {
71425
- var _a, _b, _c;
71425
+ var _a, _b, _c, _d;
71426
+ Logger$2.level = (_a = options.logLevel) != null ? _a : LogLevel.DEBUG;
71426
71427
  const editor = createEditor(root2, doc2, {
71427
71428
  components: {
71428
- blocks: [...StandardBlocks, ...((_a = options == null ? void 0 : options.components) == null ? void 0 : _a.blocks) || []],
71429
- embeds: [...StandardEmbeds, ...((_b = options.components) == null ? void 0 : _b.embeds) || []],
71430
- boxes: [...StandardBoxes, ...((_c = options.components) == null ? void 0 : _c.boxes) || []],
71429
+ blocks: [...StandardBlocks, ...((_b = options == null ? void 0 : options.components) == null ? void 0 : _b.blocks) || []],
71430
+ embeds: [...StandardEmbeds, ...((_c = options.components) == null ? void 0 : _c.embeds) || []],
71431
+ boxes: [...StandardBoxes, ...((_d = options.components) == null ? void 0 : _d.boxes) || []],
71431
71432
  textRenders: [new BlockPaddingRender()],
71432
71433
  options: { ...options.componentsOptions }
71433
71434
  }
@@ -73123,7 +73124,7 @@ ${data.flowchartText}
73123
73124
  return doc2.toJSON !== void 0;
73124
73125
  }
73125
73126
  async function createLocalEditor(root2, docData, options) {
73126
- var _a, _b, _c, _d, _e;
73127
+ var _a, _b, _c, _d, _e, _f;
73127
73128
  assert(logger, root2, "app does not exists");
73128
73129
  const doc2 = isDoc(docData) ? docData : new LocalDoc(docData, {
73129
73130
  serverUrl: options.serverUrl || ""
@@ -73131,6 +73132,7 @@ ${data.flowchartText}
73131
73132
  if (options.lang) {
73132
73133
  i18n$1.setLang(options.lang);
73133
73134
  }
73135
+ Logger$2.level = (_a = options.logLevel) != null ? _a : LogLevel.DEBUG;
73134
73136
  const editor = createEditor(root2, doc2, {
73135
73137
  id: options.id,
73136
73138
  scrollContainer: options == null ? void 0 : options.scrollContainer,
@@ -73138,11 +73140,11 @@ ${data.flowchartText}
73138
73140
  blocks: [TableBlock, CodeBlock, CodeLineBlock, ListBlock],
73139
73141
  commandProviders: [new TableBlockCommandProvider()],
73140
73142
  decorators: [new CodeTextDecorator(), new RemoteCaretsDecorator()],
73141
- embeds: [...StandardEmbeds, ...((_a = options.components) == null ? void 0 : _a.embeds) || []],
73142
- boxes: [MathjaxBox, MentionBox, FileBox, ...((_b = options.components) == null ? void 0 : _b.boxes) || []],
73143
+ embeds: [...StandardEmbeds, ...((_b = options.components) == null ? void 0 : _b.embeds) || []],
73144
+ boxes: [MathjaxBox, MentionBox, FileBox, ...((_c = options.components) == null ? void 0 : _c.boxes) || []],
73143
73145
  insertions: [RemoteCaretsInsertion],
73144
- blockHooks: [new BlockLockerHook(), ...((_c = options.components) == null ? void 0 : _c.blockHooks) || []],
73145
- textRenders: [new OnesEditorCommentsRender(), new BlockPaddingRender(), ...((_d = options.components) == null ? void 0 : _d.textRenders) || []],
73146
+ blockHooks: [new BlockLockerHook(), ...((_d = options.components) == null ? void 0 : _d.blockHooks) || []],
73147
+ textRenders: [new OnesEditorCommentsRender(), new BlockPaddingRender(), ...((_e = options.components) == null ? void 0 : _e.textRenders) || []],
73146
73148
  options: { ...options.componentsOptions }
73147
73149
  },
73148
73150
  shortcuts: [TableShortcuts, FindReplaceShortcuts, TextStyleShortcuts, DefaultShortcuts]
@@ -73157,7 +73159,7 @@ ${data.flowchartText}
73157
73159
  readonlyTitlePlaceholder: i18n$1.t("placeholder.local.readonlyTitle"),
73158
73160
  addPlaceholderToAllCurrentEmptyBlock: true
73159
73161
  }));
73160
- editor.input.addHandler(new OnesEditorQuickMenu(editor, (_e = options.componentsOptions) == null ? void 0 : _e.quickMenu));
73162
+ editor.input.addHandler(new OnesEditorQuickMenu(editor, (_f = options.componentsOptions) == null ? void 0 : _f.quickMenu));
73161
73163
  editor.input.addHandler(new PasteSpecialHandler(editor));
73162
73164
  editor.input.addHandler(new OnesEditorPasteHandler(editor));
73163
73165
  editor.input.addHandler(new BlockLockerPasteHandler());
package/dist/types.d.ts CHANGED
@@ -74,6 +74,7 @@ export interface CreateOnesEditorOptions {
74
74
  export interface CreateLocalEditorOptions {
75
75
  id?: string;
76
76
  lang?: i18n.LANGS;
77
+ logLevel?: LogLevel;
77
78
  scrollContainer?: HTMLElement;
78
79
  components?: {
79
80
  embeds?: Embed[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "0.0.9-beta.2",
3
+ "version": "0.0.9-beta.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",