oasis-editor 0.0.34 → 0.0.36
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/{OasisEditorApp-D6NxTc6l.js → OasisEditorApp-gZEDGfQL.js} +31 -13
- package/dist/export/docx/text/runXml.d.ts +3 -2
- package/dist/export/docx/text/textBoxRunXml.d.ts +9 -2
- package/dist/{index-CDi9hs5T.js → index-BrL9FzT-.js} +45 -46
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +3 -3
- package/dist/ui/components/Toolbar/renderers/ToolbarItemRenderer.d.ts +1 -13
- package/dist/ui/components/Toolbar/renderers/renderers.d.ts +16 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { n as normalizeSelection, g as getParagraphs, c as createEditorParagraphFromRuns, a as getParagraphLength, b as createEditorRun, d as getDocumentSections, e as createEditorStyledRun, f as getParagraphText, h as getActiveZone, i as getActiveSectionIndex, p as positionToParagraphOffset, j as paragraphOffsetToPosition, k as clampPosition, l as findParagraphIndex, m as createCollapsedSelection, o as isSelectionCollapsed, q as createEditorParagraph, r as getBlockParagraphs, s as findParagraphTableLocation, t as buildTableCellLayout, u as createEditorTableCell, v as createEditorTableRow, w as createEditorTable, x as underlineStyleToCssDecorationStyle, y as resolveImageSrc, z as createEditorFootnote, A as createFootnoteReferenceRun, B as renumberFootnotes, C as iterateFootnoteReferenceRuns, D as getFootnoteDisplayMarker, E as createSignal, F as createEffect, G as onCleanup, H as buildCanvasLayoutSnapshot, I as on, J as onMount, K as debounce, L as unwrap, M as getDocumentParagraphs, N as getDocumentSectionsCanonical, O as createEditorDocument, P as getPageContentWidth, Q as getDocumentPageSettings, R as getTableCellContentWidthForParagraph, S as resolveResizedDimensions, T as resolveTextBoxRenderHeight, U as resolveEffectiveParagraphStyle, V as resolveEffectiveTextStyleForParagraph, W as iterateEndnoteReferenceRuns, X as JSZip, Y as imageContentTypeDefaults, Z as imageExtensionFromMime, _ as pxToPt$1, $ as buildSegmentTable, a0 as buildCanvasTableLayout, a1 as resolveFloatingObjectRect, a2 as getTextBoxFloatingGeometry, a3 as getPresetPathSegments, a4 as projectBlocksLayout, a5 as buildListLabels, a6 as textStyleToFontSizePt, a7 as PX_PER_POINT, a8 as DEFAULT_FONT_SIZE_PX, a9 as isDoubleUnderlineStyle, aa as isWavyUnderlineStyle, ab as underlineStyleLineWidthPx, ac as underlineStyleDashArray, ad as resolveListLabel, ae as getListLabelInset, af as getAlignedListLabelInset, ag as getParagraphBorderInsets, ah as normalizeFamily, ai as ROBOTO_FONT_FILES, aj as loadFontAsset, ak as OFFICE_COMPAT_FONT_FAMILIES, al as buildSfnt, am as defaultFontDecoderRegistry, an as SfntFontProgram, ao as collectPdfFontFamilies, ap as projectDocumentLayout, aq as getPageHeaderZoneTop, ar as getPageBodyTop, as as getPageColumnRects, at as findFootnoteReference, au as FOOTNOTE_MARKER_GUTTER_PX, av as resolveImporterForFile, aw as createEditorStateFromDocument, ax as getDocumentParagraphsCanonical, ay as getToolbarStyleState, az as STANDARD_FONT_SIZES_PT, aA as fontSizePxToPt, aB as probeLocalFontFamilies, aC as createInitialEditorState, aD as parseFontSizePtToPx, aE as formatFontSizePt, aF as listKindForTag, aG as isParagraphTag, aH as collectInlineRuns, aI as parseParagraphStyle, aJ as getHeadingLevel, aK as preciseFontModeVersion, aL as isPreciseFontModeEnabled, aM as togglePreciseFontMode, aN as nextFontSizePt, aO as previousFontSizePt, aP as fontSizePtToPx, aQ as createDefaultToolbarPreset, aR as MenuRegistry, aS as createToolbarRegistry, aT as Editor, aU as resolveCommandRef, aV as commandRefName, aW as InlineShell, aX as BalloonShell, aY as DocumentShell, aZ as createMemo, a_ as getCaretRectFromSnapshot, a$ as getParagraphRectFromSnapshot, b0 as createComponent, b1 as CaretOverlay, b2 as Show, b3 as createRenderEffect, b4 as style, b5 as setAttribute, b6 as setStyleProperty, b7 as memo, b8 as template, b9 as useI18n, ba as insert, bb as use, bc as addEventListener, bd as Dialog, be as delegateEvents, bf as className, bg as For, bh as UNDERLINE_STYLE_OPTIONS, bi as Tabs, bj as measureParagraphMinContentWidthPx, bk as getEditableBlocksForZone, bl as findParagraphLocation, bm as createSectionBoundaryParagraph, bn as normalizePageSettings, bo as DEFAULT_EDITOR_PAGE_SETTINGS, bp as markStart, bq as markEnd, br as getParagraphEntries, bs as getParagraphById, bt as PluginUiHost, bu as OasisEditorEditor, bv as perfTimer, bw as OasisBrandMark, bx as setPreciseFontPreference, by as setWelcomeSeen, bz as enablePreciseFontMode, bA as createOasisEditorClient, bB as createEditorZoom, bC as startLongTaskObserver, bD as installGlobalReport, bE as applyStoredPreciseFontPreference, bF as getWelcomeSeen, bG as isLocalFontAccessSupported, bH as EDITOR_SCROLL_PADDING_PX, bI as Toolbar, bJ as OasisEditorLoading, bK as I18nProvider, bL as createEditorLogger, bM as createTranslator, bN as getCachedCanvasImage, bO as registerDomStatsSurface } from "./index-
|
|
4
|
+
import { n as normalizeSelection, g as getParagraphs, c as createEditorParagraphFromRuns, a as getParagraphLength, b as createEditorRun, d as getDocumentSections, e as createEditorStyledRun, f as getParagraphText, h as getActiveZone, i as getActiveSectionIndex, p as positionToParagraphOffset, j as paragraphOffsetToPosition, k as clampPosition, l as findParagraphIndex, m as createCollapsedSelection, o as isSelectionCollapsed, q as createEditorParagraph, r as getBlockParagraphs, s as findParagraphTableLocation, t as buildTableCellLayout, u as createEditorTableCell, v as createEditorTableRow, w as createEditorTable, x as underlineStyleToCssDecorationStyle, y as resolveImageSrc, z as createEditorFootnote, A as createFootnoteReferenceRun, B as renumberFootnotes, C as iterateFootnoteReferenceRuns, D as getFootnoteDisplayMarker, E as createSignal, F as createEffect, G as onCleanup, H as buildCanvasLayoutSnapshot, I as on, J as onMount, K as debounce, L as unwrap, M as getDocumentParagraphs, N as getDocumentSectionsCanonical, O as createEditorDocument, P as getPageContentWidth, Q as getDocumentPageSettings, R as getTableCellContentWidthForParagraph, S as resolveResizedDimensions, T as resolveTextBoxRenderHeight, U as resolveEffectiveParagraphStyle, V as resolveEffectiveTextStyleForParagraph, W as iterateEndnoteReferenceRuns, X as JSZip, Y as imageContentTypeDefaults, Z as imageExtensionFromMime, _ as pxToPt$1, $ as buildSegmentTable, a0 as buildCanvasTableLayout, a1 as resolveFloatingObjectRect, a2 as getTextBoxFloatingGeometry, a3 as getPresetPathSegments, a4 as projectBlocksLayout, a5 as buildListLabels, a6 as textStyleToFontSizePt, a7 as PX_PER_POINT, a8 as DEFAULT_FONT_SIZE_PX, a9 as isDoubleUnderlineStyle, aa as isWavyUnderlineStyle, ab as underlineStyleLineWidthPx, ac as underlineStyleDashArray, ad as resolveListLabel, ae as getListLabelInset, af as getAlignedListLabelInset, ag as getParagraphBorderInsets, ah as normalizeFamily, ai as ROBOTO_FONT_FILES, aj as loadFontAsset, ak as OFFICE_COMPAT_FONT_FAMILIES, al as buildSfnt, am as defaultFontDecoderRegistry, an as SfntFontProgram, ao as collectPdfFontFamilies, ap as projectDocumentLayout, aq as getPageHeaderZoneTop, ar as getPageBodyTop, as as getPageColumnRects, at as findFootnoteReference, au as FOOTNOTE_MARKER_GUTTER_PX, av as resolveImporterForFile, aw as createEditorStateFromDocument, ax as getDocumentParagraphsCanonical, ay as getToolbarStyleState, az as STANDARD_FONT_SIZES_PT, aA as fontSizePxToPt, aB as probeLocalFontFamilies, aC as createInitialEditorState, aD as parseFontSizePtToPx, aE as formatFontSizePt, aF as listKindForTag, aG as isParagraphTag, aH as collectInlineRuns, aI as parseParagraphStyle, aJ as getHeadingLevel, aK as preciseFontModeVersion, aL as isPreciseFontModeEnabled, aM as togglePreciseFontMode, aN as nextFontSizePt, aO as previousFontSizePt, aP as fontSizePtToPx, aQ as createDefaultToolbarPreset, aR as MenuRegistry, aS as createToolbarRegistry, aT as Editor, aU as resolveCommandRef, aV as commandRefName, aW as InlineShell, aX as BalloonShell, aY as DocumentShell, aZ as createMemo, a_ as getCaretRectFromSnapshot, a$ as getParagraphRectFromSnapshot, b0 as createComponent, b1 as CaretOverlay, b2 as Show, b3 as createRenderEffect, b4 as style, b5 as setAttribute, b6 as setStyleProperty, b7 as memo, b8 as template, b9 as useI18n, ba as insert, bb as use, bc as addEventListener, bd as Dialog, be as delegateEvents, bf as className, bg as For, bh as UNDERLINE_STYLE_OPTIONS, bi as Tabs, bj as measureParagraphMinContentWidthPx, bk as getEditableBlocksForZone, bl as findParagraphLocation, bm as createSectionBoundaryParagraph, bn as normalizePageSettings, bo as DEFAULT_EDITOR_PAGE_SETTINGS, bp as markStart, bq as markEnd, br as getParagraphEntries, bs as getParagraphById, bt as PluginUiHost, bu as OasisEditorEditor, bv as perfTimer, bw as OasisBrandMark, bx as setPreciseFontPreference, by as setWelcomeSeen, bz as enablePreciseFontMode, bA as createOasisEditorClient, bB as createEditorZoom, bC as startLongTaskObserver, bD as installGlobalReport, bE as applyStoredPreciseFontPreference, bF as getWelcomeSeen, bG as isLocalFontAccessSupported, bH as EDITOR_SCROLL_PADDING_PX, bI as Toolbar, bJ as OasisEditorLoading, bK as I18nProvider, bL as createEditorLogger, bM as createTranslator, bN as getCachedCanvasImage, bO as registerDomStatsSurface } from "./index-BrL9FzT-.js";
|
|
5
5
|
function getSelectedObjectRun(state, predicate) {
|
|
6
6
|
const normalized = normalizeSelection(state);
|
|
7
7
|
if (normalized.isCollapsed || normalized.startIndex !== normalized.endIndex || normalized.endParagraphOffset - normalized.startParagraphOffset !== 1) {
|
|
@@ -8913,7 +8913,7 @@ function serializeImageRun(runId, rId, context, rPrXml) {
|
|
|
8913
8913
|
const drawing = buildDrawingXml(img, docPrId, altAttr, picXml);
|
|
8914
8914
|
return `<w:r>${rPrXml}${drawing}</w:r>`;
|
|
8915
8915
|
}
|
|
8916
|
-
function buildTextBoxGraphicXml(textBox, cx, cy, context, styles) {
|
|
8916
|
+
function buildTextBoxGraphicXml(textBox, cx, cy, context, styles, serializeBlocksXml2) {
|
|
8917
8917
|
const shape = textBox.shape;
|
|
8918
8918
|
const preset = escapeXml((shape == null ? void 0 : shape.preset) ?? "rect");
|
|
8919
8919
|
const rotValue = textBox.rotation ? Math.round(textBox.rotation * OOXML_ROTATION_UNITS) : 0;
|
|
@@ -8947,18 +8947,25 @@ function buildTextBoxGraphicXml(textBox, cx, cy, context, styles) {
|
|
|
8947
8947
|
bodyAttrs.push('anchorCtr="0"');
|
|
8948
8948
|
const autoFitXml = (body == null ? void 0 : body.autoFit) ? "<a:spAutoFit/>" : "";
|
|
8949
8949
|
const hasTextBoxContent = textBox.blocks.length > 0;
|
|
8950
|
-
const innerXml = hasTextBoxContent ?
|
|
8950
|
+
const innerXml = hasTextBoxContent ? serializeBlocksXml2(textBox.blocks, context, styles) : "";
|
|
8951
8951
|
const cNvSpPrXml = hasTextBoxContent ? '<wps:cNvSpPr txBox="1"><a:spLocks noChangeArrowheads="1"/></wps:cNvSpPr>' : "<wps:cNvSpPr/>";
|
|
8952
8952
|
const txbxXml = hasTextBoxContent ? `<wps:txbx><w:txbxContent>${innerXml}</w:txbxContent></wps:txbx>` : "";
|
|
8953
8953
|
return '<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"><wps:wsp>' + cNvSpPrXml + `<wps:spPr bwMode="auto"><a:xfrm${xfrmRotAttr}><a:off x="0" y="0"/><a:ext cx="${cx}" cy="${cy}"/></a:xfrm><a:prstGeom prst="${preset}"><a:avLst/></a:prstGeom>` + fillXml + lnXml + "</wps:spPr>" + txbxXml + `<wps:bodyPr ${bodyAttrs.join(" ")}>${autoFitXml}</wps:bodyPr></wps:wsp></a:graphicData></a:graphic>`;
|
|
8954
8954
|
}
|
|
8955
|
-
function serializeTextBoxRun(run, textBox, context, styles, rPrXml) {
|
|
8955
|
+
function serializeTextBoxRun(run, textBox, context, styles, rPrXml, serializeBlocksXml2) {
|
|
8956
8956
|
const cx = Math.round(textBox.width * EMU_PER_PX);
|
|
8957
8957
|
const cy = Math.round(textBox.height * EMU_PER_PX);
|
|
8958
8958
|
const docPrId = context.textBoxDocPrIds.get(run.id) ?? 1;
|
|
8959
8959
|
const docPrName = textBox.name ?? "Text Box";
|
|
8960
8960
|
const altAttr = textBox.alt !== void 0 ? ` descr="${escapeXml(textBox.alt)}" title="${escapeXml(textBox.alt)}"` : "";
|
|
8961
|
-
const graphicXml = buildTextBoxGraphicXml(
|
|
8961
|
+
const graphicXml = buildTextBoxGraphicXml(
|
|
8962
|
+
textBox,
|
|
8963
|
+
cx,
|
|
8964
|
+
cy,
|
|
8965
|
+
context,
|
|
8966
|
+
styles,
|
|
8967
|
+
serializeBlocksXml2
|
|
8968
|
+
);
|
|
8962
8969
|
const drawing = buildDrawingContainerXml({
|
|
8963
8970
|
cx,
|
|
8964
8971
|
cy,
|
|
@@ -9027,7 +9034,7 @@ function wrapRunWithHyperlink(runXml, link, context) {
|
|
|
9027
9034
|
}
|
|
9028
9035
|
return `<w:hyperlink r:id="${rId}">${runXml}</w:hyperlink>`;
|
|
9029
9036
|
}
|
|
9030
|
-
function serializeRun(run, context, paragraphStyleId, styles) {
|
|
9037
|
+
function serializeRun(run, context, paragraphStyleId, styles, serializeBlocksXml2) {
|
|
9031
9038
|
if (run.__isFootnoteRefMarker) {
|
|
9032
9039
|
return serializeFootnoteRefMarker();
|
|
9033
9040
|
}
|
|
@@ -9083,7 +9090,8 @@ function serializeRun(run, context, paragraphStyleId, styles) {
|
|
|
9083
9090
|
run.textBox,
|
|
9084
9091
|
context,
|
|
9085
9092
|
styles,
|
|
9086
|
-
serializeRunProperties(materializedRunStyle)
|
|
9093
|
+
serializeRunProperties(materializedRunStyle),
|
|
9094
|
+
serializeBlocksXml2
|
|
9087
9095
|
);
|
|
9088
9096
|
}
|
|
9089
9097
|
if (run.image) {
|
|
@@ -9106,9 +9114,15 @@ function serializeRun(run, context, paragraphStyleId, styles) {
|
|
|
9106
9114
|
}
|
|
9107
9115
|
return `<w:r>${serializeRunProperties(materializedRunStyle)}${serializeRunText(run.text)}</w:r>`;
|
|
9108
9116
|
}
|
|
9109
|
-
function serializeRunWithRelationships(run, context, paragraphStyleId, styles) {
|
|
9117
|
+
function serializeRunWithRelationships(run, context, paragraphStyleId, styles, serializeBlocksXml2) {
|
|
9110
9118
|
var _a;
|
|
9111
|
-
const runXml = serializeRun(
|
|
9119
|
+
const runXml = serializeRun(
|
|
9120
|
+
run,
|
|
9121
|
+
context,
|
|
9122
|
+
paragraphStyleId,
|
|
9123
|
+
styles,
|
|
9124
|
+
serializeBlocksXml2
|
|
9125
|
+
);
|
|
9112
9126
|
const href = (_a = run.styles) == null ? void 0 : _a.link;
|
|
9113
9127
|
if (!href) {
|
|
9114
9128
|
return runXml;
|
|
@@ -9156,7 +9170,8 @@ function serializeRunsWithBoundaries(runs, tokens, context, paragraphStyleId, st
|
|
|
9156
9170
|
},
|
|
9157
9171
|
context,
|
|
9158
9172
|
paragraphStyleId,
|
|
9159
|
-
styles
|
|
9173
|
+
styles,
|
|
9174
|
+
serializeBlocksXml
|
|
9160
9175
|
);
|
|
9161
9176
|
}
|
|
9162
9177
|
out += token.xml;
|
|
@@ -9168,7 +9183,8 @@ function serializeRunsWithBoundaries(runs, tokens, context, paragraphStyleId, st
|
|
|
9168
9183
|
{ ...run, text: run.text.slice(cursor - runStart) },
|
|
9169
9184
|
context,
|
|
9170
9185
|
paragraphStyleId,
|
|
9171
|
-
styles
|
|
9186
|
+
styles,
|
|
9187
|
+
serializeBlocksXml
|
|
9172
9188
|
);
|
|
9173
9189
|
}
|
|
9174
9190
|
} else {
|
|
@@ -9176,7 +9192,8 @@ function serializeRunsWithBoundaries(runs, tokens, context, paragraphStyleId, st
|
|
|
9176
9192
|
run,
|
|
9177
9193
|
context,
|
|
9178
9194
|
paragraphStyleId,
|
|
9179
|
-
styles
|
|
9195
|
+
styles,
|
|
9196
|
+
serializeBlocksXml
|
|
9180
9197
|
);
|
|
9181
9198
|
}
|
|
9182
9199
|
pos = runEnd;
|
|
@@ -9233,7 +9250,8 @@ function serializeParagraphXml(paragraph, context, styles, overrides) {
|
|
|
9233
9250
|
run,
|
|
9234
9251
|
context,
|
|
9235
9252
|
(_a2 = paragraph.style) == null ? void 0 : _a2.styleId,
|
|
9236
|
-
styles
|
|
9253
|
+
styles,
|
|
9254
|
+
serializeBlocksXml
|
|
9237
9255
|
);
|
|
9238
9256
|
}
|
|
9239
9257
|
).join("");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EditorNamedStyle, EditorTextRun } from '../../../core/model.js';
|
|
2
2
|
import { DocContext } from '../docxTypes.js';
|
|
3
|
+
import { SerializeBlocksXml } from './textBoxRunXml.js';
|
|
3
4
|
|
|
4
|
-
export declare function serializeRun(run: EditorTextRun, context: DocContext, paragraphStyleId: string | undefined, styles: Record<string, EditorNamedStyle> | undefined): string;
|
|
5
|
-
export declare function serializeRunWithRelationships(run: EditorTextRun, context: DocContext, paragraphStyleId: string | undefined, styles: Record<string, EditorNamedStyle> | undefined): string;
|
|
5
|
+
export declare function serializeRun(run: EditorTextRun, context: DocContext, paragraphStyleId: string | undefined, styles: Record<string, EditorNamedStyle> | undefined, serializeBlocksXml: SerializeBlocksXml): string;
|
|
6
|
+
export declare function serializeRunWithRelationships(run: EditorTextRun, context: DocContext, paragraphStyleId: string | undefined, styles: Record<string, EditorNamedStyle> | undefined, serializeBlocksXml: SerializeBlocksXml): string;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import { EditorNamedStyle, EditorTextBoxData, EditorTextRun } from '../../../core/model.js';
|
|
1
|
+
import { EditorBlockNode, EditorNamedStyle, EditorTextBoxData, EditorTextRun } from '../../../core/model.js';
|
|
2
2
|
import { DocContext } from '../docxTypes.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Serializes a list of blocks (paragraphs/tables) to `w:p`/`w:tbl` XML. A text
|
|
6
|
+
* box's body recurses into this. Injected as a callback by the orchestrator
|
|
7
|
+
* (`blocksXml`) rather than imported, so this module does not import back into
|
|
8
|
+
* `blocksXml` (which serializes runs through `runXml` -> here).
|
|
9
|
+
*/
|
|
10
|
+
export type SerializeBlocksXml = (blocks: EditorBlockNode[], context: DocContext, styles: Record<string, EditorNamedStyle> | undefined) => string;
|
|
11
|
+
export declare function serializeTextBoxRun(run: EditorTextRun, textBox: EditorTextBoxData, context: DocContext, styles: Record<string, EditorNamedStyle> | undefined, rPrXml: string, serializeBlocksXml: SerializeBlocksXml): string;
|
|
@@ -2384,14 +2384,14 @@ function I18nProvider(props) {
|
|
|
2384
2384
|
});
|
|
2385
2385
|
}
|
|
2386
2386
|
const oasisMarkBase64 = "UklGRmQXAABXRUJQVlA4IFgXAACwWwCdASrAAAABPjEWiUMiISESyL50IAMEswHYDxjW/947Oi5/a/7H+1P90/ar5n65/UvwH+Q/QZm27Sf5n9r/I/5m/2n/p+wv9E/9j3AP07/0X92/HLuKeYL+mf4r/zf3f3tf9x+rnvH/z/qAfzf/J/9/sM/QX/bv02P28+Fb9s/2s+B39h//51gH//6yfrV/QO1z/CdMx6vl0OAGqD8Z+4X6H+9/up8b/6vvP+IeoL+Lfyr/CflxwuoAPz7+0/7T1iPk/9p6R/zXqAflpxyVAX8y+hD/5/6f0W/UX7UfAl/Ov75/zOxr6SR2HAT+kJLsdULBbdVn3b+sl8uZdjuThjIe3NwBwjfGz5SniiBN2m7i7b0hA/wxE1PuC+4EcbOyjUkU3CDDghPY1Va4tpUped9TFa05Qb1z7O+Ye73ccvEl10Sgdj6Hhy71hb/XpA23GjXBN/obAlaswz9gKwvW9d9npbC69rQeTm6DEr/cjrNngjQaHgFGjh4uVY1bY9Q+/iG037f80w0bLlYIe7smzz4tG1kC8r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MqaNfIyBue31jEIGX1TddpAj4QyCopCfwrKjKoRX5n4UwcfwADHiInAdeqVgyLiABR8P6u+q5XYOLFlS5rZ1Kpe7uqoHg6rIvAN/gVp/JR0jDVURc9CTdVvWQNne/upBb3VgGGhdLlbcfVEjHw5HwHeOjIx3HP/lXoWaUdTbiLB7DDLQD+VOaVqCh9An7btAcCd6RzgEW165Hqx2ZXLlq8OLCczkDlN8rCAtz8O+4AzSyPK8grVM8ObUU+qc6ZGcCgxaVvvbiTPP2kb765qIU5/Dj+q60L9YPOU6t+1FP6od8x4iXUpAtBsclYfJhOrwv66P13ocoB3LV1x09Eb5wq33vepBq3qYQJQyOHbj/jl4eLRUxXLQgLorpnB4HNs4v40tGGosw2Ka6eDt5K6P8DQK5ozy56BizczJenDjZ5DYx1Xu3YLmI/quRSR8ORIJqwhWFwM+Q8/gNfUL/YgQHlHmfhYi5vjU0TzsgnLyhP/kOFSnR9zjJkIMcYAFB/Ft1tfks1aQiBMtgP4sabdMsauWXINaIyR9ClOZLdIZQVGHUgLjxKW6YiFUs72zTJmKtf/RovsidqZlmEXrWGZ3UuGplChFUtjEkvwi2XxICgc0grD+9/tRt47usAAADGbVjPUInsKZHILQ8Tdvbj09q/9k2Mg7uynD2e+HudOmr+jOK+SyWmKsSZ4pH89FUSffyxPKUMVNp8o1m1apG/WDvwhmHllHVfELy0BgfyAIevaAuIOzl4NX3ayQnv+tsCnIGxjvF1IwPLyoflKFrL2OBFh3pJ57ChDdzSC9IDKqpaycKVMm2mWUPGBLK2cpD+b4VPleMoNCtKZz4AileaHHtk77gduJB8sihmMPR1lV1Vba4pOywdJgGueqt4IcTd2RJFxeSRNjuzHcR4tYGdli66ijJZC20ODhr8miT+cauMIflgiAAAAA=";
|
|
2387
|
-
var _tmpl$$
|
|
2387
|
+
var _tmpl$$R = /* @__PURE__ */ template(`<img alt aria-hidden=true>`);
|
|
2388
2388
|
const OASIS_MARK_DATA_URI = `data:image/webp;base64,${oasisMarkBase64}`;
|
|
2389
2389
|
const MARK_ASPECT = 3 / 4;
|
|
2390
2390
|
function OasisBrandMark(props) {
|
|
2391
2391
|
const height = () => props.height ?? 64;
|
|
2392
2392
|
const width = () => Math.round(height() * MARK_ASPECT);
|
|
2393
2393
|
return (() => {
|
|
2394
|
-
var _el$ = _tmpl$$
|
|
2394
|
+
var _el$ = _tmpl$$R();
|
|
2395
2395
|
setAttribute(_el$, "src", OASIS_MARK_DATA_URI);
|
|
2396
2396
|
setAttribute(_el$, "draggable", false);
|
|
2397
2397
|
createRenderEffect((_p$) => {
|
|
@@ -2408,7 +2408,7 @@ function OasisBrandMark(props) {
|
|
|
2408
2408
|
return _el$;
|
|
2409
2409
|
})();
|
|
2410
2410
|
}
|
|
2411
|
-
var _tmpl$$
|
|
2411
|
+
var _tmpl$$Q = /* @__PURE__ */ template(`<div class=oasis-editor-import-progress-label>`), _tmpl$2$z = /* @__PURE__ */ template(`<div role=status aria-live=polite><div class=oasis-editor-import-card><div class=oasis-editor-import-title></div><div class=oasis-editor-import-progress-track><div>`), _tmpl$3$n = /* @__PURE__ */ template(`<span class=oasis-editor-import-done-icon>Done`);
|
|
2412
2412
|
function OasisEditorLoading(props) {
|
|
2413
2413
|
const t = useI18n();
|
|
2414
2414
|
const variant = () => props.variant ?? "overlay";
|
|
@@ -2429,10 +2429,10 @@ function OasisEditorLoading(props) {
|
|
|
2429
2429
|
return pct() != null;
|
|
2430
2430
|
},
|
|
2431
2431
|
get children() {
|
|
2432
|
-
var _el$6 = _tmpl$$
|
|
2432
|
+
var _el$6 = _tmpl$$Q();
|
|
2433
2433
|
insert(_el$6, (() => {
|
|
2434
2434
|
var _c$ = memo(() => !!isDone());
|
|
2435
|
-
return () => _c$() ? _tmpl$3$
|
|
2435
|
+
return () => _c$() ? _tmpl$3$n() : `${pct()}%`;
|
|
2436
2436
|
})());
|
|
2437
2437
|
return _el$6;
|
|
2438
2438
|
}
|
|
@@ -2483,7 +2483,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2483
2483
|
onCleanup(() => {
|
|
2484
2484
|
cancelled = true;
|
|
2485
2485
|
});
|
|
2486
|
-
import("./OasisEditorApp-
|
|
2486
|
+
import("./OasisEditorApp-gZEDGfQL.js").then((m) => {
|
|
2487
2487
|
cancelled = true;
|
|
2488
2488
|
setProgress(1);
|
|
2489
2489
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -4663,8 +4663,8 @@ function mount(target, props = {}) {
|
|
|
4663
4663
|
unmount: () => client.dispose()
|
|
4664
4664
|
});
|
|
4665
4665
|
}
|
|
4666
|
-
var _tmpl$$
|
|
4667
|
-
const FootnoteIcon = () => _tmpl$$
|
|
4666
|
+
var _tmpl$$P = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"fill=none aria-hidden=true><text x=2 y=18 font-family="'Segoe UI', Arial, sans-serif"font-size=14 font-weight=700 fill=currentColor>ab</text><text x=15.5 y=11 font-family="'Segoe UI', Arial, sans-serif"font-size=10 font-weight=700 fill=#c00000>1`), _tmpl$2$y = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=24 viewBox="0 0 24 24"aria-hidden=true><g fill=currentColor><path d="M3.375 4.875 L7.125 8.625 L3.375 12.375 L2.25 11.25 L4.875 8.625 L2.25 6 Z"></path><rect x=10.125 y=6 width=9 height=1.6875 rx=0.25></rect><rect x=5.625 y=10.875 width=13.5 height=1.6875 rx=0.25></rect><rect x=5.625 y=15.75 width=13.5 height=1.6875 rx=0.25>`), _tmpl$3$m = /* @__PURE__ */ template(`<i>`);
|
|
4667
|
+
const FootnoteIcon = () => _tmpl$$P();
|
|
4668
4668
|
const SpecialIndentFirstLineIcon = () => _tmpl$2$y();
|
|
4669
4669
|
const CUSTOM_ICONS = {
|
|
4670
4670
|
footnote: FootnoteIcon,
|
|
@@ -4680,7 +4680,7 @@ function ToolIcon(props) {
|
|
|
4680
4680
|
},
|
|
4681
4681
|
get fallback() {
|
|
4682
4682
|
return (() => {
|
|
4683
|
-
var _el$3 = _tmpl$3$
|
|
4683
|
+
var _el$3 = _tmpl$3$m();
|
|
4684
4684
|
createRenderEffect(() => setAttribute(_el$3, "data-lucide", props.name));
|
|
4685
4685
|
return _el$3;
|
|
4686
4686
|
})();
|
|
@@ -4688,7 +4688,7 @@ function ToolIcon(props) {
|
|
|
4688
4688
|
children: (render2) => render2()()
|
|
4689
4689
|
});
|
|
4690
4690
|
}
|
|
4691
|
-
var _tmpl$$
|
|
4691
|
+
var _tmpl$$O = /* @__PURE__ */ template(`<div class=oasis-menubar role=menubar>`), _tmpl$2$x = /* @__PURE__ */ template(`<div class=oasis-menubar-dropdown role=menu>`), _tmpl$3$l = /* @__PURE__ */ template(`<div class=oasis-menubar-menu><div class=oasis-menubar-button role=menuitem aria-haspopup=true>`), _tmpl$4$f = /* @__PURE__ */ template(`<div class=oasis-menubar-separator role=separator>`), _tmpl$5$e = /* @__PURE__ */ template(`<span class=oasis-menubar-item-icon aria-hidden=true>`), _tmpl$6$7 = /* @__PURE__ */ template(`<span class=oasis-menubar-shortcut>`), _tmpl$7$3 = /* @__PURE__ */ template(`<i class=oasis-menubar-submenu-icon data-lucide=chevron-right>`), _tmpl$8$2 = /* @__PURE__ */ template(`<div class=oasis-menubar-submenu role=menu>`), _tmpl$9$1 = /* @__PURE__ */ template(`<div class=oasis-menubar-item role=menuitem><span class=oasis-menubar-item-main><span>`);
|
|
4692
4692
|
function Menubar(props) {
|
|
4693
4693
|
const t = useI18n();
|
|
4694
4694
|
const [activeMenu, setActiveMenu] = createSignal(null);
|
|
@@ -4756,13 +4756,13 @@ function Menubar(props) {
|
|
|
4756
4756
|
});
|
|
4757
4757
|
const topLevelItems = () => pruneTree(menuTree());
|
|
4758
4758
|
return (() => {
|
|
4759
|
-
var _el$ = _tmpl$$
|
|
4759
|
+
var _el$ = _tmpl$$O();
|
|
4760
4760
|
insert(_el$, createComponent(For, {
|
|
4761
4761
|
get each() {
|
|
4762
4762
|
return topLevelItems();
|
|
4763
4763
|
},
|
|
4764
4764
|
children: (topLevel) => (() => {
|
|
4765
|
-
var _el$2 = _tmpl$3$
|
|
4765
|
+
var _el$2 = _tmpl$3$l(), _el$3 = _el$2.firstChild;
|
|
4766
4766
|
_el$2.addEventListener("mouseenter", () => {
|
|
4767
4767
|
if (activeMenu() && activeMenu() !== topLevel.id) {
|
|
4768
4768
|
setActiveMenu(topLevel.id);
|
|
@@ -4910,10 +4910,10 @@ function MenuNode(props) {
|
|
|
4910
4910
|
})();
|
|
4911
4911
|
}
|
|
4912
4912
|
delegateEvents(["click"]);
|
|
4913
|
-
var _tmpl$$
|
|
4913
|
+
var _tmpl$$N = /* @__PURE__ */ template(`<div class=oasis-titlebar><div class=oasis-titlebar-left><div class=oasis-titlebar-menubar-slot>`);
|
|
4914
4914
|
function TitleBar(props) {
|
|
4915
4915
|
return (() => {
|
|
4916
|
-
var _el$ = _tmpl$$
|
|
4916
|
+
var _el$ = _tmpl$$N(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
4917
4917
|
insert(_el$3, () => props.children);
|
|
4918
4918
|
return _el$;
|
|
4919
4919
|
})();
|
|
@@ -18244,7 +18244,7 @@ function getCaretRectFromSnapshot(snapshot, position2, paragraphOffset) {
|
|
|
18244
18244
|
);
|
|
18245
18245
|
return rectFromBox(slot.left, slot.top, 1, slot.height || line.height);
|
|
18246
18246
|
}
|
|
18247
|
-
var _tmpl$$
|
|
18247
|
+
var _tmpl$$M = /* @__PURE__ */ template(`<span class=oasis-outline-title>`), _tmpl$2$w = /* @__PURE__ */ template(`<div class=oasis-outline-list>`), _tmpl$3$k = /* @__PURE__ */ template(`<div class=oasis-outline-panel><div class=oasis-outline-header><button class=oasis-outline-toggle><i>`), _tmpl$4$e = /* @__PURE__ */ template(`<div class=oasis-outline-empty>`), _tmpl$5$d = /* @__PURE__ */ template(`<div class=oasis-outline-item>`);
|
|
18248
18248
|
function OutlinePanel(props) {
|
|
18249
18249
|
const t = useI18n();
|
|
18250
18250
|
const [collapsed, setCollapsed] = createSignal(props.defaultCollapsed ?? false);
|
|
@@ -18313,13 +18313,13 @@ function OutlinePanel(props) {
|
|
|
18313
18313
|
}
|
|
18314
18314
|
});
|
|
18315
18315
|
return (() => {
|
|
18316
|
-
var _el$ = _tmpl$3$
|
|
18316
|
+
var _el$ = _tmpl$3$k(), _el$2 = _el$.firstChild, _el$4 = _el$2.firstChild, _el$5 = _el$4.firstChild;
|
|
18317
18317
|
insert(_el$2, createComponent(Show, {
|
|
18318
18318
|
get when() {
|
|
18319
18319
|
return !collapsed();
|
|
18320
18320
|
},
|
|
18321
18321
|
get children() {
|
|
18322
|
-
var _el$3 = _tmpl$$
|
|
18322
|
+
var _el$3 = _tmpl$$M();
|
|
18323
18323
|
insert(_el$3, () => t("menu.view.outline") || "Outline");
|
|
18324
18324
|
return _el$3;
|
|
18325
18325
|
}
|
|
@@ -18387,7 +18387,7 @@ function OutlinePanel(props) {
|
|
|
18387
18387
|
})();
|
|
18388
18388
|
}
|
|
18389
18389
|
delegateEvents(["click"]);
|
|
18390
|
-
var _tmpl$$
|
|
18390
|
+
var _tmpl$$L = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-overflow-manager style="display:flex;align-items:center;flex:1 1 0%;min-width:0;position:relative;margin-right:8px"><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown oasis-editor-toolbar-more-measure"aria-hidden=true tabindex=-1 style=position:absolute;visibility:hidden;pointer-events:none;right:0><i data-lucide=ellipsis></i></button><div style="display:flex;align-items:center;gap:8px;flex:1 1 0;min-width:0;overflow:hidden"></div><div style=flex-shrink:0;padding-left:8px;padding-right:16px;align-items:center><button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"data-testid=editor-toolbar-overflow-dropdown><i data-lucide=ellipsis></i></button></div><div class="oasis-editor-toolbar-overflow-dropdown-menu oasis-editor-toolbar-overflow-menu"style="flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px;padding:8px;background:var(--oasis-paper);border:1px solid var(--oasis-toolbar-border);border-radius:var(--oasis-radius);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);max-width:calc(100vw - 16px);overflow-x:hidden;overflow-y:auto">`), _tmpl$2$v = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item-wrapper style=display:flex;align-items:center;flex-shrink:0>`);
|
|
18391
18391
|
function ToolbarOverflowManager(props) {
|
|
18392
18392
|
const t = useI18n();
|
|
18393
18393
|
const [overflowCount, setOverflowCount] = createSignal(0);
|
|
@@ -18531,7 +18531,7 @@ function ToolbarOverflowManager(props) {
|
|
|
18531
18531
|
};
|
|
18532
18532
|
};
|
|
18533
18533
|
return (() => {
|
|
18534
|
-
var _el$ = _tmpl$$
|
|
18534
|
+
var _el$ = _tmpl$$L(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling;
|
|
18535
18535
|
var _ref$ = containerRef;
|
|
18536
18536
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
18537
18537
|
var _ref$2 = moreMeasureRef;
|
|
@@ -18619,7 +18619,7 @@ function resolveLabel(item, api) {
|
|
|
18619
18619
|
if (item.labelKey) return api.t(item.labelKey);
|
|
18620
18620
|
return void 0;
|
|
18621
18621
|
}
|
|
18622
|
-
var _tmpl$$
|
|
18622
|
+
var _tmpl$$K = /* @__PURE__ */ template(`<span>`), _tmpl$2$u = /* @__PURE__ */ template(`<button type=button>`);
|
|
18623
18623
|
function Button$1(props) {
|
|
18624
18624
|
const [local, others] = splitProps(props, ["icon", "label", "active", "tooltip", "wide", "ribbonSize", "aria-label", "class", "classList"]);
|
|
18625
18625
|
const ariaLabel = () => local["aria-label"] || local.tooltip || local.label || "";
|
|
@@ -18661,7 +18661,7 @@ function Button$1(props) {
|
|
|
18661
18661
|
return local.label;
|
|
18662
18662
|
},
|
|
18663
18663
|
get children() {
|
|
18664
|
-
var _el$2 = _tmpl$$
|
|
18664
|
+
var _el$2 = _tmpl$$K();
|
|
18665
18665
|
insert(_el$2, () => local.label);
|
|
18666
18666
|
return _el$2;
|
|
18667
18667
|
}
|
|
@@ -18743,7 +18743,7 @@ function useDismiss(options) {
|
|
|
18743
18743
|
});
|
|
18744
18744
|
});
|
|
18745
18745
|
}
|
|
18746
|
-
var _tmpl$$
|
|
18746
|
+
var _tmpl$$J = /* @__PURE__ */ template(`<div>`);
|
|
18747
18747
|
function Popover(props) {
|
|
18748
18748
|
let anchorRef;
|
|
18749
18749
|
let panelRef;
|
|
@@ -18760,7 +18760,7 @@ function Popover(props) {
|
|
|
18760
18760
|
closeOnEscape: props.closeOnEscape
|
|
18761
18761
|
});
|
|
18762
18762
|
const panel = (portalled) => (() => {
|
|
18763
|
-
var _el$ = _tmpl$$
|
|
18763
|
+
var _el$ = _tmpl$$J();
|
|
18764
18764
|
addEventListener(_el$, "mouseleave", props.onPanelMouseLeave);
|
|
18765
18765
|
var _ref$ = panelRef;
|
|
18766
18766
|
typeof _ref$ === "function" ? use(_ref$, _el$) : panelRef = _el$;
|
|
@@ -18812,7 +18812,7 @@ function Popover(props) {
|
|
|
18812
18812
|
}
|
|
18813
18813
|
})];
|
|
18814
18814
|
}
|
|
18815
|
-
var _tmpl$$
|
|
18815
|
+
var _tmpl$$I = /* @__PURE__ */ template(`<div>`), _tmpl$2$t = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$3$j = /* @__PURE__ */ template(`<i>`), _tmpl$4$d = /* @__PURE__ */ template(`<span class=oasis-editor-tool-button-label>`), _tmpl$5$c = /* @__PURE__ */ template(`<i data-lucide=chevron-down class=oasis-editor-dropdown-chevron>`), _tmpl$6$6 = /* @__PURE__ */ template(`<button type=button class="oasis-editor-tool-button oasis-editor-tool-button-dropdown"aria-haspopup=menu>`);
|
|
18816
18816
|
function Menu(props) {
|
|
18817
18817
|
const [open, setOpen] = createSignal(false);
|
|
18818
18818
|
const ariaLabel = () => props.tooltip || props.label || "";
|
|
@@ -18840,7 +18840,7 @@ function Menu(props) {
|
|
|
18840
18840
|
return props.icon;
|
|
18841
18841
|
},
|
|
18842
18842
|
get children() {
|
|
18843
|
-
var _el$4 = _tmpl$3$
|
|
18843
|
+
var _el$4 = _tmpl$3$j();
|
|
18844
18844
|
createRenderEffect(() => setAttribute(_el$4, "data-lucide", props.icon));
|
|
18845
18845
|
return _el$4;
|
|
18846
18846
|
}
|
|
@@ -18885,7 +18885,7 @@ function Menu(props) {
|
|
|
18885
18885
|
return _el$3;
|
|
18886
18886
|
})(),
|
|
18887
18887
|
get children() {
|
|
18888
|
-
var _el$2 = _tmpl$$
|
|
18888
|
+
var _el$2 = _tmpl$$I();
|
|
18889
18889
|
_el$2.$$click = (event) => {
|
|
18890
18890
|
const el = event.target;
|
|
18891
18891
|
if (el.closest("button") && !el.closest(".oasis-editor-tool-button-dropdown") && !el.closest(".oasis-editor-toolbar-list-options")) {
|
|
@@ -18900,7 +18900,7 @@ function Menu(props) {
|
|
|
18900
18900
|
})();
|
|
18901
18901
|
}
|
|
18902
18902
|
delegateEvents(["click"]);
|
|
18903
|
-
var _tmpl$$
|
|
18903
|
+
var _tmpl$$H = /* @__PURE__ */ template(`<select>`);
|
|
18904
18904
|
function Select(props) {
|
|
18905
18905
|
let selectRef;
|
|
18906
18906
|
const [local, others] = splitProps(props, ["wide", "small", "class", "tooltip", "aria-label", "value"]);
|
|
@@ -18916,7 +18916,7 @@ function Select(props) {
|
|
|
18916
18916
|
}
|
|
18917
18917
|
});
|
|
18918
18918
|
return (() => {
|
|
18919
|
-
var _el$ = _tmpl$$
|
|
18919
|
+
var _el$ = _tmpl$$H();
|
|
18920
18920
|
var _ref$ = selectRef;
|
|
18921
18921
|
typeof _ref$ === "function" ? use(_ref$, _el$) : selectRef = _el$;
|
|
18922
18922
|
spread(_el$, mergeProps({
|
|
@@ -18943,15 +18943,15 @@ function Select(props) {
|
|
|
18943
18943
|
return _el$;
|
|
18944
18944
|
})();
|
|
18945
18945
|
}
|
|
18946
|
-
var _tmpl$$
|
|
18946
|
+
var _tmpl$$G = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-separator>`);
|
|
18947
18947
|
function Separator(props) {
|
|
18948
18948
|
return (() => {
|
|
18949
|
-
var _el$ = _tmpl$$
|
|
18949
|
+
var _el$ = _tmpl$$G();
|
|
18950
18950
|
createRenderEffect((_$p) => setStyleProperty(_el$, "display", props.hidden ? "none" : void 0));
|
|
18951
18951
|
return _el$;
|
|
18952
18952
|
})();
|
|
18953
18953
|
}
|
|
18954
|
-
var _tmpl$$
|
|
18954
|
+
var _tmpl$$F = /* @__PURE__ */ template(`<div><button type=button class=oasis-editor-color-split-main></button><button type=button class=oasis-editor-color-split-menu-button aria-haspopup=menu><i data-lucide=chevron-down>`);
|
|
18955
18955
|
function SplitButton(props) {
|
|
18956
18956
|
return createComponent(Popover, {
|
|
18957
18957
|
get open() {
|
|
@@ -18970,7 +18970,7 @@ function SplitButton(props) {
|
|
|
18970
18970
|
return props.onPanelMouseLeave;
|
|
18971
18971
|
},
|
|
18972
18972
|
trigger: (api) => (() => {
|
|
18973
|
-
var _el$ = _tmpl$$
|
|
18973
|
+
var _el$ = _tmpl$$F(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
18974
18974
|
use((el) => api.ref(el), _el$);
|
|
18975
18975
|
_el$2.$$click = () => props.onMain();
|
|
18976
18976
|
insert(_el$2, () => props.mainContent);
|
|
@@ -19008,7 +19008,7 @@ function SplitButton(props) {
|
|
|
19008
19008
|
});
|
|
19009
19009
|
}
|
|
19010
19010
|
delegateEvents(["click"]);
|
|
19011
|
-
var _tmpl$$
|
|
19011
|
+
var _tmpl$$E = /* @__PURE__ */ template(`<i data-lucide=type>`), _tmpl$2$s = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class=oasis-editor-color-menu-action-swatch></span><span>`), _tmpl$3$i = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-theme-grid>`), _tmpl$4$c = /* @__PURE__ */ template(`<div class=oasis-editor-color-menu-section><div class=oasis-editor-color-menu-heading></div><div class=oasis-editor-color-standard-grid>`), _tmpl$5$b = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-menu-action role=menuitem><span class="oasis-editor-color-menu-action-swatch oasis-editor-color-menu-more-swatch"></span><span>`), _tmpl$6$5 = /* @__PURE__ */ template(`<input type=color class=oasis-editor-color-custom-input>`), _tmpl$7$2 = /* @__PURE__ */ template(`<span class=oasis-editor-color-split-icon><i></i><span class=oasis-editor-color-split-indicator>`), _tmpl$8$1 = /* @__PURE__ */ template(`<i data-lucide=slash>`), _tmpl$9 = /* @__PURE__ */ template(`<div class=oasis-editor-color-theme-column>`), _tmpl$0 = /* @__PURE__ */ template(`<button type=button class=oasis-editor-color-swatch>`);
|
|
19012
19012
|
const normalizeColor = (value) => (value == null ? void 0 : value.trim().toLowerCase()) ?? "";
|
|
19013
19013
|
function ColorPicker(props) {
|
|
19014
19014
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
@@ -19083,7 +19083,7 @@ function ColorPicker(props) {
|
|
|
19083
19083
|
return _tmpl$8$1();
|
|
19084
19084
|
},
|
|
19085
19085
|
get children() {
|
|
19086
|
-
return _tmpl$$
|
|
19086
|
+
return _tmpl$$E();
|
|
19087
19087
|
}
|
|
19088
19088
|
}));
|
|
19089
19089
|
insert(_el$4, clearLabel);
|
|
@@ -19091,7 +19091,7 @@ function ColorPicker(props) {
|
|
|
19091
19091
|
return _el$;
|
|
19092
19092
|
}
|
|
19093
19093
|
}), (() => {
|
|
19094
|
-
var _el$5 = _tmpl$3$
|
|
19094
|
+
var _el$5 = _tmpl$3$i(), _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
19095
19095
|
insert(_el$6, () => props.themeColorsLabel);
|
|
19096
19096
|
insert(_el$7, createComponent(For, {
|
|
19097
19097
|
get each() {
|
|
@@ -19196,7 +19196,7 @@ function ColorPicker(props) {
|
|
|
19196
19196
|
});
|
|
19197
19197
|
}
|
|
19198
19198
|
delegateEvents(["click", "input"]);
|
|
19199
|
-
var _tmpl$$
|
|
19199
|
+
var _tmpl$$D = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-status>`), _tmpl$2$r = /* @__PURE__ */ template(`<div class=oasis-editor-table-grid-picker-grid>`), _tmpl$3$h = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-dropdown>`), _tmpl$4$b = /* @__PURE__ */ template(`<button type=button class=oasis-editor-tool-button><i>`), _tmpl$5$a = /* @__PURE__ */ template(`<button type=button class=oasis-editor-table-grid-picker-cell>`);
|
|
19200
19200
|
function GridPicker(props) {
|
|
19201
19201
|
const t = useI18n();
|
|
19202
19202
|
const [isOpen, setIsOpen] = createSignal(false);
|
|
@@ -19271,7 +19271,7 @@ function GridPicker(props) {
|
|
|
19271
19271
|
return h.row === 0 || h.col === 0 ? t("toolbar.table") : `${h.row} × ${h.col}`;
|
|
19272
19272
|
};
|
|
19273
19273
|
return (() => {
|
|
19274
|
-
var _el$ = _tmpl$3$
|
|
19274
|
+
var _el$ = _tmpl$3$h();
|
|
19275
19275
|
insert(_el$, createComponent(Popover, {
|
|
19276
19276
|
get open() {
|
|
19277
19277
|
return isOpen();
|
|
@@ -19305,7 +19305,7 @@ function GridPicker(props) {
|
|
|
19305
19305
|
})(),
|
|
19306
19306
|
get children() {
|
|
19307
19307
|
return [(() => {
|
|
19308
|
-
var _el$2 = _tmpl$$
|
|
19308
|
+
var _el$2 = _tmpl$$D();
|
|
19309
19309
|
insert(_el$2, statusLabel);
|
|
19310
19310
|
return _el$2;
|
|
19311
19311
|
})(), (() => {
|
|
@@ -19409,7 +19409,7 @@ const DEFAULT_PALETTE = {
|
|
|
19409
19409
|
standardColors: STANDARD_COLORS,
|
|
19410
19410
|
allowCustom: true
|
|
19411
19411
|
};
|
|
19412
|
-
var _tmpl$$
|
|
19412
|
+
var _tmpl$$C = /* @__PURE__ */ template(`<option value>`), _tmpl$2$q = /* @__PURE__ */ template(`<option>`), _tmpl$3$g = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
|
|
19413
19413
|
function renderMenuContent(content, api) {
|
|
19414
19414
|
if (content.kind === "custom") {
|
|
19415
19415
|
return content.render(api);
|
|
@@ -19591,7 +19591,7 @@ function RenderSelect(props) {
|
|
|
19591
19591
|
return props.item.placeholder !== void 0;
|
|
19592
19592
|
},
|
|
19593
19593
|
get children() {
|
|
19594
|
-
var _el$ = _tmpl$$
|
|
19594
|
+
var _el$ = _tmpl$$C();
|
|
19595
19595
|
insert(_el$, () => props.item.placeholder);
|
|
19596
19596
|
return _el$;
|
|
19597
19597
|
}
|
|
@@ -19723,13 +19723,12 @@ function registerToolbarRenderer(type, component) {
|
|
|
19723
19723
|
function resolveRenderer(type) {
|
|
19724
19724
|
return TOOLBAR_RENDERERS[type] ?? customRenderers.get(type);
|
|
19725
19725
|
}
|
|
19726
|
-
var _tmpl$$C = /* @__PURE__ */ template(`<div class=oasis-editor-toolbar-item style=align-items:center>`);
|
|
19727
19726
|
function ToolbarItemRenderer(props) {
|
|
19728
19727
|
const binding = bindItem(props.item, props.api);
|
|
19729
19728
|
const component = () => resolveRenderer(props.item.type);
|
|
19730
19729
|
return (() => {
|
|
19731
|
-
var _el$ = _tmpl
|
|
19732
|
-
insert(_el
|
|
19730
|
+
var _el$3 = _tmpl$3$g();
|
|
19731
|
+
insert(_el$3, createComponent(Show, {
|
|
19733
19732
|
get when() {
|
|
19734
19733
|
return component();
|
|
19735
19734
|
},
|
|
@@ -19747,14 +19746,14 @@ function ToolbarItemRenderer(props) {
|
|
|
19747
19746
|
}));
|
|
19748
19747
|
createRenderEffect((_p$) => {
|
|
19749
19748
|
var _v$ = !!("ribbonSize" in props.item && props.item.ribbonSize === "large"), _v$2 = binding.visible() ? "flex" : "none";
|
|
19750
|
-
_v$ !== _p$.e && _el
|
|
19751
|
-
_v$2 !== _p$.t && setStyleProperty(_el
|
|
19749
|
+
_v$ !== _p$.e && _el$3.classList.toggle("oasis-editor-toolbar-item-ribbon-large", _p$.e = _v$);
|
|
19750
|
+
_v$2 !== _p$.t && setStyleProperty(_el$3, "display", _p$.t = _v$2);
|
|
19752
19751
|
return _p$;
|
|
19753
19752
|
}, {
|
|
19754
19753
|
e: void 0,
|
|
19755
19754
|
t: void 0
|
|
19756
19755
|
});
|
|
19757
|
-
return _el
|
|
19756
|
+
return _el$3;
|
|
19758
19757
|
})();
|
|
19759
19758
|
}
|
|
19760
19759
|
function createToolbarApi(host, t) {
|
package/dist/oasis-editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aX, bP, bQ, bR, bS, bT, bd, bU, aY, aT, bV, bW, bX, aW, bY, aR, bZ, b_, b$, c0, c1, bJ, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, bi, cd, bI, ce, bR as bR2, bW as bW2, bY as bY2, c5 as c52, c7 as c72, cc as cc2, cf, aV, aQ, cg, ch, ci, aS, cj, ck, aU } from "./index-
|
|
1
|
+
import { aX, bP, bQ, bR, bS, bT, bd, bU, aY, aT, bV, bW, bX, aW, bY, aR, bZ, b_, b$, c0, c1, bJ, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, bi, cd, bI, ce, bR as bR2, bW as bW2, bY as bY2, c5 as c52, c7 as c72, cc as cc2, cf, aV, aQ, cg, ch, ci, aS, cj, ck, aU } from "./index-BrL9FzT-.js";
|
|
2
2
|
export {
|
|
3
3
|
aX as BalloonShell,
|
|
4
4
|
bP as Button,
|