oasis-editor 0.0.9 → 0.0.11
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-kUhRrsHZ.js → OasisEditorApp-BgOoWqpC.js} +644 -96
- package/dist/app/controllers/EditorCommandsController.d.ts +3 -0
- package/dist/core/commands/builtinCommands.d.ts +1 -1
- package/dist/core/commands/publicCommandTypes.d.ts +5 -0
- package/dist/core/commands/shape.d.ts +9 -0
- package/dist/core/commands/text.d.ts +15 -0
- package/dist/core/editorCommands.d.ts +1 -0
- package/dist/export/pdf/OasisPdfWriter.d.ts +30 -0
- package/dist/export/pdf/draw/drawBlockList.d.ts +2 -2
- package/dist/export/pdf/draw/drawTextBoxShape.d.ts +34 -0
- package/dist/i18n/locales/en.d.ts +16 -0
- package/dist/i18n/locales/pt-BR.d.ts +16 -0
- package/dist/{index-D1GDOw-0.js → index-L71R0x7D.js} +536 -153
- package/dist/layoutProjection/presetGeometry.d.ts +31 -0
- package/dist/oasis-editor.js +54 -54
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/plugins/internal/createEssentialsPlugin.d.ts +10 -0
- package/dist/plugins/internal/essentialsCommandGroups.d.ts +4 -2
- package/dist/ui/canvas/presetGeometry.d.ts +7 -0
- package/dist/ui/fontSizeUnits.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1422,6 +1422,13 @@ const en = {
|
|
|
1422
1422
|
"toolbar.redo": "Redo last undone change",
|
|
1423
1423
|
"toolbar.insert": "Insert",
|
|
1424
1424
|
"toolbar.image": "Image",
|
|
1425
|
+
"toolbar.shapes": "Shapes",
|
|
1426
|
+
"toolbar.shape.rect": "Rectangle",
|
|
1427
|
+
"toolbar.shape.roundRect": "Rounded rectangle",
|
|
1428
|
+
"toolbar.shape.ellipse": "Ellipse",
|
|
1429
|
+
"toolbar.shape.triangle": "Triangle",
|
|
1430
|
+
"toolbar.shape.rtTriangle": "Right triangle",
|
|
1431
|
+
"toolbar.shape.diamond": "Diamond",
|
|
1425
1432
|
"toolbar.table": "Table",
|
|
1426
1433
|
"toolbar.pageNumber": "Page #",
|
|
1427
1434
|
"toolbar.totalPages": "Total Pages",
|
|
@@ -1463,6 +1470,15 @@ const en = {
|
|
|
1463
1470
|
"toolbar.font": "Font",
|
|
1464
1471
|
"toolbar.fontSize": "Font Size",
|
|
1465
1472
|
"toolbar.size": "Size",
|
|
1473
|
+
"toolbar.increaseFontSize": "Increase font size",
|
|
1474
|
+
"toolbar.decreaseFontSize": "Decrease font size",
|
|
1475
|
+
"toolbar.changeCase": "Change case",
|
|
1476
|
+
"toolbar.clearFormatting": "Clear all formatting",
|
|
1477
|
+
"toolbar.caseSentence": "Sentence case.",
|
|
1478
|
+
"toolbar.caseLower": "lowercase",
|
|
1479
|
+
"toolbar.caseUpper": "UPPERCASE",
|
|
1480
|
+
"toolbar.caseCapitalize": "Capitalize Each Word",
|
|
1481
|
+
"toolbar.caseToggle": "tOGGLE cASE",
|
|
1466
1482
|
"toolbar.color": "Text Color",
|
|
1467
1483
|
"toolbar.highlight": "Highlight Color",
|
|
1468
1484
|
"toolbar.textShading": "Text Shading",
|
|
@@ -1794,6 +1810,13 @@ const ptBR = {
|
|
|
1794
1810
|
"toolbar.redo": "Refazer última alteração",
|
|
1795
1811
|
"toolbar.insert": "Inserir",
|
|
1796
1812
|
"toolbar.image": "Imagem",
|
|
1813
|
+
"toolbar.shapes": "Formas",
|
|
1814
|
+
"toolbar.shape.rect": "Retângulo",
|
|
1815
|
+
"toolbar.shape.roundRect": "Retângulo arredondado",
|
|
1816
|
+
"toolbar.shape.ellipse": "Elipse",
|
|
1817
|
+
"toolbar.shape.triangle": "Triângulo",
|
|
1818
|
+
"toolbar.shape.rtTriangle": "Triângulo retângulo",
|
|
1819
|
+
"toolbar.shape.diamond": "Losango",
|
|
1797
1820
|
"toolbar.table": "Tabela",
|
|
1798
1821
|
"toolbar.pageNumber": "Nº de Página",
|
|
1799
1822
|
"toolbar.totalPages": "Total de Páginas",
|
|
@@ -1835,6 +1858,15 @@ const ptBR = {
|
|
|
1835
1858
|
"toolbar.font": "Fonte",
|
|
1836
1859
|
"toolbar.fontSize": "Tamanho da Fonte",
|
|
1837
1860
|
"toolbar.size": "Tamanho",
|
|
1861
|
+
"toolbar.increaseFontSize": "Aumentar fonte",
|
|
1862
|
+
"toolbar.decreaseFontSize": "Diminuir fonte",
|
|
1863
|
+
"toolbar.changeCase": "Maiúsculas e minúsculas",
|
|
1864
|
+
"toolbar.clearFormatting": "Limpar toda a formatação",
|
|
1865
|
+
"toolbar.caseSentence": "Primeira letra da frase maiúscula.",
|
|
1866
|
+
"toolbar.caseLower": "minúsculas",
|
|
1867
|
+
"toolbar.caseUpper": "MAIÚSCULAS",
|
|
1868
|
+
"toolbar.caseCapitalize": "Colocar Cada Palavra Em Maiúscula",
|
|
1869
|
+
"toolbar.caseToggle": "iNVERTER mAIÚSC/minúsc",
|
|
1838
1870
|
"toolbar.color": "Cor do Texto",
|
|
1839
1871
|
"toolbar.highlight": "Cor de Realce",
|
|
1840
1872
|
"toolbar.textShading": "Sombreamento do texto",
|
|
@@ -2270,7 +2302,7 @@ function OasisEditorAppLazy(props = {}) {
|
|
|
2270
2302
|
onCleanup(() => {
|
|
2271
2303
|
cancelled = true;
|
|
2272
2304
|
});
|
|
2273
|
-
import("./OasisEditorApp-
|
|
2305
|
+
import("./OasisEditorApp-BgOoWqpC.js").then((m) => {
|
|
2274
2306
|
cancelled = true;
|
|
2275
2307
|
setProgress(1);
|
|
2276
2308
|
setTimeout(() => setApp(() => m.OasisEditorApp), 180);
|
|
@@ -4186,6 +4218,10 @@ const OASIS_BUILTIN_COMMANDS = [
|
|
|
4186
4218
|
"splitBlock",
|
|
4187
4219
|
"setFontFamily",
|
|
4188
4220
|
"setFontSize",
|
|
4221
|
+
"increaseFontSize",
|
|
4222
|
+
"decreaseFontSize",
|
|
4223
|
+
"changeTextCase",
|
|
4224
|
+
"clearFormatting",
|
|
4189
4225
|
"setColor",
|
|
4190
4226
|
"setHighlight",
|
|
4191
4227
|
"setTextShading",
|
|
@@ -11107,11 +11143,11 @@ function mergeIntervals(intervals) {
|
|
|
11107
11143
|
}
|
|
11108
11144
|
return merged;
|
|
11109
11145
|
}
|
|
11110
|
-
function coveredIntervalsAtScanline(
|
|
11146
|
+
function coveredIntervalsAtScanline(polygon2, y) {
|
|
11111
11147
|
const xs = [];
|
|
11112
|
-
for (let i = 0; i <
|
|
11113
|
-
const a =
|
|
11114
|
-
const b =
|
|
11148
|
+
for (let i = 0; i < polygon2.length; i += 1) {
|
|
11149
|
+
const a = polygon2[i];
|
|
11150
|
+
const b = polygon2[(i + 1) % polygon2.length];
|
|
11115
11151
|
const crosses = a.y <= y && b.y > y || b.y <= y && a.y > y;
|
|
11116
11152
|
if (!crosses) continue;
|
|
11117
11153
|
const t2 = (y - a.y) / (b.y - a.y);
|
|
@@ -11124,12 +11160,12 @@ function coveredIntervalsAtScanline(polygon, y) {
|
|
|
11124
11160
|
}
|
|
11125
11161
|
return intervals;
|
|
11126
11162
|
}
|
|
11127
|
-
function polygonCoveredIntervals(
|
|
11163
|
+
function polygonCoveredIntervals(polygon2, top, bottom) {
|
|
11128
11164
|
const samples = 5;
|
|
11129
11165
|
const collected = [];
|
|
11130
11166
|
for (let s = 0; s < samples; s += 1) {
|
|
11131
11167
|
const y = bottom === top ? top : top + (bottom - top) * s / (samples - 1);
|
|
11132
|
-
collected.push(...coveredIntervalsAtScanline(
|
|
11168
|
+
collected.push(...coveredIntervalsAtScanline(polygon2, y));
|
|
11133
11169
|
}
|
|
11134
11170
|
return mergeIntervals(collected);
|
|
11135
11171
|
}
|
|
@@ -11794,7 +11830,7 @@ function collectParagraphFloatingExclusions(options) {
|
|
|
11794
11830
|
});
|
|
11795
11831
|
const expanded = expandForWrap(rawRect, floating);
|
|
11796
11832
|
const wrap = floating.wrap ?? "square";
|
|
11797
|
-
const
|
|
11833
|
+
const polygon2 = image && image.wrapPolygon && image.wrapPolygon.length >= 3 && (wrap === "tight" || wrap === "through") && !image.rotation ? image.wrapPolygon.map((point) => ({
|
|
11798
11834
|
x: rawRect.x + point.x * rawRect.width,
|
|
11799
11835
|
y: rawRect.y + point.y * rawRect.height
|
|
11800
11836
|
})) : void 0;
|
|
@@ -11802,7 +11838,7 @@ function collectParagraphFloatingExclusions(options) {
|
|
|
11802
11838
|
...expanded,
|
|
11803
11839
|
wrap,
|
|
11804
11840
|
sourceRunId: fragment.runId,
|
|
11805
|
-
...
|
|
11841
|
+
...polygon2 ? { polygon: polygon2 } : {}
|
|
11806
11842
|
});
|
|
11807
11843
|
}
|
|
11808
11844
|
return exclusions;
|
|
@@ -14459,6 +14495,175 @@ function drawTable(ctx, table, tableSegment, state, originX, originY, contentWid
|
|
|
14459
14495
|
});
|
|
14460
14496
|
}
|
|
14461
14497
|
}
|
|
14498
|
+
const KAPPA = 0.5522847498307936;
|
|
14499
|
+
function getPresetPathSegments(preset, x, y, width, height) {
|
|
14500
|
+
const right = x + width;
|
|
14501
|
+
const bottom = y + height;
|
|
14502
|
+
const cx = x + width / 2;
|
|
14503
|
+
const cy = y + height / 2;
|
|
14504
|
+
switch (preset) {
|
|
14505
|
+
case "roundRect":
|
|
14506
|
+
return roundRectSegments(
|
|
14507
|
+
x,
|
|
14508
|
+
y,
|
|
14509
|
+
width,
|
|
14510
|
+
height,
|
|
14511
|
+
Math.min(width, height) * 0.1
|
|
14512
|
+
);
|
|
14513
|
+
case "ellipse":
|
|
14514
|
+
return ellipseSegments(cx, cy, width / 2, height / 2);
|
|
14515
|
+
case "triangle":
|
|
14516
|
+
return polygon([
|
|
14517
|
+
[cx, y],
|
|
14518
|
+
[right, bottom],
|
|
14519
|
+
[x, bottom]
|
|
14520
|
+
]);
|
|
14521
|
+
case "rtTriangle":
|
|
14522
|
+
return polygon([
|
|
14523
|
+
[x, y],
|
|
14524
|
+
[x, bottom],
|
|
14525
|
+
[right, bottom]
|
|
14526
|
+
]);
|
|
14527
|
+
case "diamond":
|
|
14528
|
+
return polygon([
|
|
14529
|
+
[cx, y],
|
|
14530
|
+
[right, cy],
|
|
14531
|
+
[cx, bottom],
|
|
14532
|
+
[x, cy]
|
|
14533
|
+
]);
|
|
14534
|
+
case "rect":
|
|
14535
|
+
default:
|
|
14536
|
+
return polygon([
|
|
14537
|
+
[x, y],
|
|
14538
|
+
[right, y],
|
|
14539
|
+
[right, bottom],
|
|
14540
|
+
[x, bottom]
|
|
14541
|
+
]);
|
|
14542
|
+
}
|
|
14543
|
+
}
|
|
14544
|
+
function polygon(points) {
|
|
14545
|
+
const segments = [];
|
|
14546
|
+
points.forEach(([px, py], index) => {
|
|
14547
|
+
segments.push(
|
|
14548
|
+
index === 0 ? { type: "move", x: px, y: py } : { type: "line", x: px, y: py }
|
|
14549
|
+
);
|
|
14550
|
+
});
|
|
14551
|
+
segments.push({ type: "close" });
|
|
14552
|
+
return segments;
|
|
14553
|
+
}
|
|
14554
|
+
function ellipseSegments(cx, cy, rx, ry) {
|
|
14555
|
+
const ox = rx * KAPPA;
|
|
14556
|
+
const oy = ry * KAPPA;
|
|
14557
|
+
return [
|
|
14558
|
+
{ type: "move", x: cx - rx, y: cy },
|
|
14559
|
+
{
|
|
14560
|
+
type: "cubic",
|
|
14561
|
+
x1: cx - rx,
|
|
14562
|
+
y1: cy - oy,
|
|
14563
|
+
x2: cx - ox,
|
|
14564
|
+
y2: cy - ry,
|
|
14565
|
+
x: cx,
|
|
14566
|
+
y: cy - ry
|
|
14567
|
+
},
|
|
14568
|
+
{
|
|
14569
|
+
type: "cubic",
|
|
14570
|
+
x1: cx + ox,
|
|
14571
|
+
y1: cy - ry,
|
|
14572
|
+
x2: cx + rx,
|
|
14573
|
+
y2: cy - oy,
|
|
14574
|
+
x: cx + rx,
|
|
14575
|
+
y: cy
|
|
14576
|
+
},
|
|
14577
|
+
{
|
|
14578
|
+
type: "cubic",
|
|
14579
|
+
x1: cx + rx,
|
|
14580
|
+
y1: cy + oy,
|
|
14581
|
+
x2: cx + ox,
|
|
14582
|
+
y2: cy + ry,
|
|
14583
|
+
x: cx,
|
|
14584
|
+
y: cy + ry
|
|
14585
|
+
},
|
|
14586
|
+
{
|
|
14587
|
+
type: "cubic",
|
|
14588
|
+
x1: cx - ox,
|
|
14589
|
+
y1: cy + ry,
|
|
14590
|
+
x2: cx - rx,
|
|
14591
|
+
y2: cy + oy,
|
|
14592
|
+
x: cx - rx,
|
|
14593
|
+
y: cy
|
|
14594
|
+
},
|
|
14595
|
+
{ type: "close" }
|
|
14596
|
+
];
|
|
14597
|
+
}
|
|
14598
|
+
function roundRectSegments(x, y, width, height, radius) {
|
|
14599
|
+
const r = Math.min(radius, width / 2, height / 2);
|
|
14600
|
+
const right = x + width;
|
|
14601
|
+
const bottom = y + height;
|
|
14602
|
+
const o = r * (1 - KAPPA);
|
|
14603
|
+
return [
|
|
14604
|
+
{ type: "move", x: x + r, y },
|
|
14605
|
+
{ type: "line", x: right - r, y },
|
|
14606
|
+
{
|
|
14607
|
+
type: "cubic",
|
|
14608
|
+
x1: right - o,
|
|
14609
|
+
y1: y,
|
|
14610
|
+
x2: right,
|
|
14611
|
+
y2: y + o,
|
|
14612
|
+
x: right,
|
|
14613
|
+
y: y + r
|
|
14614
|
+
},
|
|
14615
|
+
{ type: "line", x: right, y: bottom - r },
|
|
14616
|
+
{
|
|
14617
|
+
type: "cubic",
|
|
14618
|
+
x1: right,
|
|
14619
|
+
y1: bottom - o,
|
|
14620
|
+
x2: right - o,
|
|
14621
|
+
y2: bottom,
|
|
14622
|
+
x: right - r,
|
|
14623
|
+
y: bottom
|
|
14624
|
+
},
|
|
14625
|
+
{ type: "line", x: x + r, y: bottom },
|
|
14626
|
+
{
|
|
14627
|
+
type: "cubic",
|
|
14628
|
+
x1: x + o,
|
|
14629
|
+
y1: bottom,
|
|
14630
|
+
x2: x,
|
|
14631
|
+
y2: bottom - o,
|
|
14632
|
+
x,
|
|
14633
|
+
y: bottom - r
|
|
14634
|
+
},
|
|
14635
|
+
{ type: "line", x, y: y + r },
|
|
14636
|
+
{ type: "cubic", x1: x, y1: y + o, x2: x + o, y2: y, x: x + r, y },
|
|
14637
|
+
{ type: "close" }
|
|
14638
|
+
];
|
|
14639
|
+
}
|
|
14640
|
+
function buildPresetPath(preset, x, y, width, height) {
|
|
14641
|
+
const path = new Path2D();
|
|
14642
|
+
for (const segment of getPresetPathSegments(preset, x, y, width, height)) {
|
|
14643
|
+
switch (segment.type) {
|
|
14644
|
+
case "move":
|
|
14645
|
+
path.moveTo(segment.x, segment.y);
|
|
14646
|
+
break;
|
|
14647
|
+
case "line":
|
|
14648
|
+
path.lineTo(segment.x, segment.y);
|
|
14649
|
+
break;
|
|
14650
|
+
case "cubic":
|
|
14651
|
+
path.bezierCurveTo(
|
|
14652
|
+
segment.x1,
|
|
14653
|
+
segment.y1,
|
|
14654
|
+
segment.x2,
|
|
14655
|
+
segment.y2,
|
|
14656
|
+
segment.x,
|
|
14657
|
+
segment.y
|
|
14658
|
+
);
|
|
14659
|
+
break;
|
|
14660
|
+
case "close":
|
|
14661
|
+
path.closePath();
|
|
14662
|
+
break;
|
|
14663
|
+
}
|
|
14664
|
+
}
|
|
14665
|
+
return path;
|
|
14666
|
+
}
|
|
14462
14667
|
const TEXT_BOX_AUTOFIT_MEASURE_HEIGHT = 1e5;
|
|
14463
14668
|
const TEXT_BOX_AUTOFIT_SAFETY_PX = 2;
|
|
14464
14669
|
function getTextBoxPadding(textBox) {
|
|
@@ -14516,19 +14721,20 @@ function resolveTextBoxRenderHeight(textBox, state, pageIndex) {
|
|
|
14516
14721
|
return measureTextBoxNaturalHeight(textBox, state, pageIndex);
|
|
14517
14722
|
}
|
|
14518
14723
|
function drawTextBoxShape(ctx, textBox, x, y, width, height) {
|
|
14519
|
-
var _a, _b, _c;
|
|
14724
|
+
var _a, _b, _c, _d;
|
|
14520
14725
|
const fill = (_a = textBox.shape) == null ? void 0 : _a.fill;
|
|
14521
14726
|
const borderColor = (_b = textBox.shape) == null ? void 0 : _b.borderColor;
|
|
14522
14727
|
const borderWidth = ((_c = textBox.shape) == null ? void 0 : _c.borderWidthPt) ?? (borderColor ? 0.75 : 0);
|
|
14728
|
+
const path = buildPresetPath((_d = textBox.shape) == null ? void 0 : _d.preset, x, y, width, height);
|
|
14523
14729
|
ctx.save();
|
|
14524
14730
|
if (fill) {
|
|
14525
14731
|
ctx.fillStyle = fill;
|
|
14526
|
-
ctx.
|
|
14732
|
+
ctx.fill(path);
|
|
14527
14733
|
}
|
|
14528
14734
|
if (borderColor && borderWidth > 0) {
|
|
14529
14735
|
ctx.strokeStyle = borderColor;
|
|
14530
14736
|
ctx.lineWidth = Math.max(1, borderWidth * (96 / 72));
|
|
14531
|
-
ctx.
|
|
14737
|
+
ctx.stroke(path);
|
|
14532
14738
|
}
|
|
14533
14739
|
ctx.restore();
|
|
14534
14740
|
}
|
|
@@ -30904,13 +31110,13 @@ function parseAnchorWrap$1(anchor) {
|
|
|
30904
31110
|
}
|
|
30905
31111
|
const WRAP_POLYGON_DENOMINATOR = 21600;
|
|
30906
31112
|
function parseWrapPolygon(anchor) {
|
|
30907
|
-
const
|
|
30908
|
-
if (!
|
|
31113
|
+
const polygon2 = findElementDeep(anchor, "wrapPolygon");
|
|
31114
|
+
if (!polygon2) {
|
|
30909
31115
|
return void 0;
|
|
30910
31116
|
}
|
|
30911
31117
|
const points = [];
|
|
30912
|
-
for (let index = 0; index <
|
|
30913
|
-
const node =
|
|
31118
|
+
for (let index = 0; index < polygon2.childNodes.length; index += 1) {
|
|
31119
|
+
const node = polygon2.childNodes[index];
|
|
30914
31120
|
if ((node == null ? void 0 : node.nodeType) !== 1) continue;
|
|
30915
31121
|
const el = node;
|
|
30916
31122
|
if (el.localName !== "start" && el.localName !== "lineTo") continue;
|
|
@@ -35778,6 +35984,23 @@ const STANDARD_FONT_SIZES_PT = [
|
|
|
35778
35984
|
48,
|
|
35779
35985
|
72
|
|
35780
35986
|
];
|
|
35987
|
+
function nextFontSizePt(currentPt) {
|
|
35988
|
+
for (const size of STANDARD_FONT_SIZES_PT) {
|
|
35989
|
+
if (size > currentPt + 1e-6) {
|
|
35990
|
+
return size;
|
|
35991
|
+
}
|
|
35992
|
+
}
|
|
35993
|
+
return Math.round(currentPt) + 10;
|
|
35994
|
+
}
|
|
35995
|
+
function previousFontSizePt(currentPt) {
|
|
35996
|
+
for (let index = STANDARD_FONT_SIZES_PT.length - 1; index >= 0; index -= 1) {
|
|
35997
|
+
const size = STANDARD_FONT_SIZES_PT[index];
|
|
35998
|
+
if (size < currentPt - 1e-6) {
|
|
35999
|
+
return size;
|
|
36000
|
+
}
|
|
36001
|
+
}
|
|
36002
|
+
return Math.max(1, Math.round(currentPt) - 1);
|
|
36003
|
+
}
|
|
35781
36004
|
function fontSizePxToPt(px) {
|
|
35782
36005
|
return Math.round(pxToPt(px) * 100) / 100;
|
|
35783
36006
|
}
|
|
@@ -36709,6 +36932,10 @@ const RIBBON_PLACEMENTS = {
|
|
|
36709
36932
|
"editor-toolbar-style": { tab: "home", group: "styles", row: 1 },
|
|
36710
36933
|
"editor-toolbar-font-family": { tab: "home", group: "font", row: 1 },
|
|
36711
36934
|
"editor-toolbar-font-size": { tab: "home", group: "font", row: 1 },
|
|
36935
|
+
"editor-toolbar-font-increase": { tab: "home", group: "font", row: 1 },
|
|
36936
|
+
"editor-toolbar-font-decrease": { tab: "home", group: "font", row: 1 },
|
|
36937
|
+
"editor-toolbar-change-case": { tab: "home", group: "font", row: 1 },
|
|
36938
|
+
"editor-toolbar-clear-formatting": { tab: "home", group: "font", row: 1 },
|
|
36712
36939
|
"editor-toolbar-color": { tab: "home", group: "font", row: 2 },
|
|
36713
36940
|
"editor-toolbar-highlight": { tab: "home", group: "font", row: 2 },
|
|
36714
36941
|
"editor-toolbar-text-shading": { tab: "home", group: "font", row: 2 },
|
|
@@ -36721,6 +36948,7 @@ const RIBBON_PLACEMENTS = {
|
|
|
36721
36948
|
"editor-toolbar-subscript": { tab: "home", group: "font", row: 2 },
|
|
36722
36949
|
"sep-format": { tab: "home", group: "font", row: 2 },
|
|
36723
36950
|
"editor-toolbar-insert-image": { tab: "insert", group: "illustrations", row: 1 },
|
|
36951
|
+
"editor-toolbar-insert-shape": { tab: "insert", group: "illustrations", row: 2 },
|
|
36724
36952
|
"editor-toolbar-insert-table": { tab: "insert", group: "tables", row: 1 },
|
|
36725
36953
|
"editor-toolbar-link": { tab: "insert", group: "links", row: 1 },
|
|
36726
36954
|
"editor-toolbar-unlink": { tab: "insert", group: "links", row: 2 },
|
|
@@ -36849,6 +37077,88 @@ function createDefaultToolbarPreset() {
|
|
|
36849
37077
|
command: "setFontSize",
|
|
36850
37078
|
options: fontSizeOptions
|
|
36851
37079
|
});
|
|
37080
|
+
items.push({
|
|
37081
|
+
type: "button",
|
|
37082
|
+
id: "editor-toolbar-font-increase",
|
|
37083
|
+
testId: "editor-toolbar-font-increase",
|
|
37084
|
+
iconName: "a-arrow-up",
|
|
37085
|
+
command: "increaseFontSize",
|
|
37086
|
+
tooltipKey: "toolbar.increaseFontSize"
|
|
37087
|
+
});
|
|
37088
|
+
items.push({
|
|
37089
|
+
type: "button",
|
|
37090
|
+
id: "editor-toolbar-font-decrease",
|
|
37091
|
+
testId: "editor-toolbar-font-decrease",
|
|
37092
|
+
iconName: "a-arrow-down",
|
|
37093
|
+
command: "decreaseFontSize",
|
|
37094
|
+
tooltipKey: "toolbar.decreaseFontSize"
|
|
37095
|
+
});
|
|
37096
|
+
items.push({
|
|
37097
|
+
type: "menu",
|
|
37098
|
+
id: "editor-toolbar-change-case",
|
|
37099
|
+
testId: "editor-toolbar-change-case",
|
|
37100
|
+
iconName: "case-sensitive",
|
|
37101
|
+
tooltipKey: "toolbar.changeCase",
|
|
37102
|
+
isDisabled: (api) => !api.commands.state({ name: "changeTextCase" }).isEnabled,
|
|
37103
|
+
content: {
|
|
37104
|
+
kind: "items",
|
|
37105
|
+
items: [
|
|
37106
|
+
{
|
|
37107
|
+
type: "button",
|
|
37108
|
+
id: "editor-toolbar-case-sentence",
|
|
37109
|
+
testId: "editor-toolbar-case-sentence",
|
|
37110
|
+
labelKey: "toolbar.caseSentence",
|
|
37111
|
+
wide: true,
|
|
37112
|
+
tooltipKey: "toolbar.caseSentence",
|
|
37113
|
+
command: { name: "changeTextCase", payload: "sentence" }
|
|
37114
|
+
},
|
|
37115
|
+
{
|
|
37116
|
+
type: "button",
|
|
37117
|
+
id: "editor-toolbar-case-lower",
|
|
37118
|
+
testId: "editor-toolbar-case-lower",
|
|
37119
|
+
labelKey: "toolbar.caseLower",
|
|
37120
|
+
wide: true,
|
|
37121
|
+
tooltipKey: "toolbar.caseLower",
|
|
37122
|
+
command: { name: "changeTextCase", payload: "lower" }
|
|
37123
|
+
},
|
|
37124
|
+
{
|
|
37125
|
+
type: "button",
|
|
37126
|
+
id: "editor-toolbar-case-upper",
|
|
37127
|
+
testId: "editor-toolbar-case-upper",
|
|
37128
|
+
labelKey: "toolbar.caseUpper",
|
|
37129
|
+
wide: true,
|
|
37130
|
+
tooltipKey: "toolbar.caseUpper",
|
|
37131
|
+
command: { name: "changeTextCase", payload: "upper" }
|
|
37132
|
+
},
|
|
37133
|
+
{
|
|
37134
|
+
type: "button",
|
|
37135
|
+
id: "editor-toolbar-case-capitalize",
|
|
37136
|
+
testId: "editor-toolbar-case-capitalize",
|
|
37137
|
+
labelKey: "toolbar.caseCapitalize",
|
|
37138
|
+
wide: true,
|
|
37139
|
+
tooltipKey: "toolbar.caseCapitalize",
|
|
37140
|
+
command: { name: "changeTextCase", payload: "capitalize" }
|
|
37141
|
+
},
|
|
37142
|
+
{
|
|
37143
|
+
type: "button",
|
|
37144
|
+
id: "editor-toolbar-case-toggle",
|
|
37145
|
+
testId: "editor-toolbar-case-toggle",
|
|
37146
|
+
labelKey: "toolbar.caseToggle",
|
|
37147
|
+
wide: true,
|
|
37148
|
+
tooltipKey: "toolbar.caseToggle",
|
|
37149
|
+
command: { name: "changeTextCase", payload: "toggle" }
|
|
37150
|
+
}
|
|
37151
|
+
]
|
|
37152
|
+
}
|
|
37153
|
+
});
|
|
37154
|
+
items.push({
|
|
37155
|
+
type: "button",
|
|
37156
|
+
id: "editor-toolbar-clear-formatting",
|
|
37157
|
+
testId: "editor-toolbar-clear-formatting",
|
|
37158
|
+
iconName: "remove-formatting",
|
|
37159
|
+
command: "clearFormatting",
|
|
37160
|
+
tooltipKey: "toolbar.clearFormatting"
|
|
37161
|
+
});
|
|
36852
37162
|
items.push({
|
|
36853
37163
|
type: "toggle",
|
|
36854
37164
|
id: "editor-toolbar-bold",
|
|
@@ -36934,6 +37244,72 @@ function createDefaultToolbarPreset() {
|
|
|
36934
37244
|
tooltipKey: "toolbar.image",
|
|
36935
37245
|
command: "insertImage"
|
|
36936
37246
|
});
|
|
37247
|
+
items.push({
|
|
37248
|
+
type: "menu",
|
|
37249
|
+
id: "editor-toolbar-insert-shape",
|
|
37250
|
+
testId: "editor-toolbar-insert-shape",
|
|
37251
|
+
iconName: "shapes",
|
|
37252
|
+
tooltipKey: "toolbar.shapes",
|
|
37253
|
+
content: {
|
|
37254
|
+
kind: "items",
|
|
37255
|
+
items: [
|
|
37256
|
+
{
|
|
37257
|
+
type: "button",
|
|
37258
|
+
id: "editor-toolbar-shape-rect",
|
|
37259
|
+
testId: "editor-toolbar-shape-rect",
|
|
37260
|
+
labelKey: "toolbar.shape.rect",
|
|
37261
|
+
wide: true,
|
|
37262
|
+
tooltipKey: "toolbar.shape.rect",
|
|
37263
|
+
command: { name: "insertShape", payload: "rect" }
|
|
37264
|
+
},
|
|
37265
|
+
{
|
|
37266
|
+
type: "button",
|
|
37267
|
+
id: "editor-toolbar-shape-roundRect",
|
|
37268
|
+
testId: "editor-toolbar-shape-roundRect",
|
|
37269
|
+
labelKey: "toolbar.shape.roundRect",
|
|
37270
|
+
wide: true,
|
|
37271
|
+
tooltipKey: "toolbar.shape.roundRect",
|
|
37272
|
+
command: { name: "insertShape", payload: "roundRect" }
|
|
37273
|
+
},
|
|
37274
|
+
{
|
|
37275
|
+
type: "button",
|
|
37276
|
+
id: "editor-toolbar-shape-ellipse",
|
|
37277
|
+
testId: "editor-toolbar-shape-ellipse",
|
|
37278
|
+
labelKey: "toolbar.shape.ellipse",
|
|
37279
|
+
wide: true,
|
|
37280
|
+
tooltipKey: "toolbar.shape.ellipse",
|
|
37281
|
+
command: { name: "insertShape", payload: "ellipse" }
|
|
37282
|
+
},
|
|
37283
|
+
{
|
|
37284
|
+
type: "button",
|
|
37285
|
+
id: "editor-toolbar-shape-triangle",
|
|
37286
|
+
testId: "editor-toolbar-shape-triangle",
|
|
37287
|
+
labelKey: "toolbar.shape.triangle",
|
|
37288
|
+
wide: true,
|
|
37289
|
+
tooltipKey: "toolbar.shape.triangle",
|
|
37290
|
+
command: { name: "insertShape", payload: "triangle" }
|
|
37291
|
+
},
|
|
37292
|
+
{
|
|
37293
|
+
type: "button",
|
|
37294
|
+
id: "editor-toolbar-shape-rtTriangle",
|
|
37295
|
+
testId: "editor-toolbar-shape-rtTriangle",
|
|
37296
|
+
labelKey: "toolbar.shape.rtTriangle",
|
|
37297
|
+
wide: true,
|
|
37298
|
+
tooltipKey: "toolbar.shape.rtTriangle",
|
|
37299
|
+
command: { name: "insertShape", payload: "rtTriangle" }
|
|
37300
|
+
},
|
|
37301
|
+
{
|
|
37302
|
+
type: "button",
|
|
37303
|
+
id: "editor-toolbar-shape-diamond",
|
|
37304
|
+
testId: "editor-toolbar-shape-diamond",
|
|
37305
|
+
labelKey: "toolbar.shape.diamond",
|
|
37306
|
+
wide: true,
|
|
37307
|
+
tooltipKey: "toolbar.shape.diamond",
|
|
37308
|
+
command: { name: "insertShape", payload: "diamond" }
|
|
37309
|
+
}
|
|
37310
|
+
]
|
|
37311
|
+
}
|
|
37312
|
+
});
|
|
36937
37313
|
items.push({
|
|
36938
37314
|
type: "gridPicker",
|
|
36939
37315
|
id: "editor-toolbar-insert-table",
|
|
@@ -37121,7 +37497,7 @@ const OASIS_MENU_ITEMS = {
|
|
|
37121
37497
|
formatListsNumbered: "format_lists_numbered"
|
|
37122
37498
|
};
|
|
37123
37499
|
export {
|
|
37124
|
-
|
|
37500
|
+
buildCanvasTableLayout as $,
|
|
37125
37501
|
renumberFootnotes as A,
|
|
37126
37502
|
iterateFootnoteReferenceRuns as B,
|
|
37127
37503
|
getFootnoteDisplayMarker as C,
|
|
@@ -37148,145 +37524,152 @@ export {
|
|
|
37148
37524
|
imageContentTypeDefaults as X,
|
|
37149
37525
|
imageExtensionFromMime as Y,
|
|
37150
37526
|
pxToPt as Z,
|
|
37151
|
-
|
|
37527
|
+
buildSegmentTable as _,
|
|
37152
37528
|
createEditorStyledRun as a,
|
|
37153
|
-
|
|
37154
|
-
|
|
37155
|
-
|
|
37156
|
-
|
|
37157
|
-
|
|
37158
|
-
|
|
37159
|
-
|
|
37160
|
-
|
|
37161
|
-
|
|
37162
|
-
|
|
37163
|
-
|
|
37164
|
-
|
|
37165
|
-
|
|
37166
|
-
|
|
37167
|
-
|
|
37168
|
-
|
|
37169
|
-
|
|
37170
|
-
|
|
37171
|
-
|
|
37172
|
-
|
|
37173
|
-
|
|
37174
|
-
|
|
37175
|
-
|
|
37176
|
-
|
|
37177
|
-
|
|
37178
|
-
|
|
37179
|
-
|
|
37180
|
-
|
|
37181
|
-
|
|
37182
|
-
|
|
37183
|
-
|
|
37184
|
-
|
|
37185
|
-
|
|
37186
|
-
|
|
37187
|
-
|
|
37188
|
-
|
|
37189
|
-
|
|
37190
|
-
|
|
37191
|
-
|
|
37192
|
-
|
|
37193
|
-
|
|
37194
|
-
|
|
37195
|
-
|
|
37196
|
-
|
|
37197
|
-
|
|
37198
|
-
|
|
37199
|
-
|
|
37200
|
-
|
|
37201
|
-
|
|
37202
|
-
|
|
37203
|
-
|
|
37204
|
-
|
|
37205
|
-
|
|
37206
|
-
|
|
37207
|
-
|
|
37208
|
-
|
|
37209
|
-
|
|
37210
|
-
|
|
37211
|
-
|
|
37212
|
-
|
|
37213
|
-
|
|
37214
|
-
|
|
37215
|
-
|
|
37216
|
-
|
|
37529
|
+
createRenderEffect as a$,
|
|
37530
|
+
resolveFloatingObjectRect as a0,
|
|
37531
|
+
getTextBoxFloatingGeometry as a1,
|
|
37532
|
+
getPresetPathSegments as a2,
|
|
37533
|
+
projectBlocksLayout as a3,
|
|
37534
|
+
textStyleToFontSizePt as a4,
|
|
37535
|
+
PX_PER_POINT$2 as a5,
|
|
37536
|
+
DEFAULT_FONT_SIZE_PX as a6,
|
|
37537
|
+
isDoubleUnderlineStyle as a7,
|
|
37538
|
+
isWavyUnderlineStyle as a8,
|
|
37539
|
+
underlineStyleLineWidthPx as a9,
|
|
37540
|
+
listKindForTag as aA,
|
|
37541
|
+
isParagraphTag as aB,
|
|
37542
|
+
collectInlineRuns as aC,
|
|
37543
|
+
parseParagraphStyle as aD,
|
|
37544
|
+
t as aE,
|
|
37545
|
+
preciseFontModeVersion as aF,
|
|
37546
|
+
isPreciseFontModeEnabled as aG,
|
|
37547
|
+
togglePreciseFontMode as aH,
|
|
37548
|
+
nextFontSizePt as aI,
|
|
37549
|
+
previousFontSizePt as aJ,
|
|
37550
|
+
fontSizePtToPx as aK,
|
|
37551
|
+
createDefaultToolbarPreset as aL,
|
|
37552
|
+
defaultMenuItems as aM,
|
|
37553
|
+
MenuRegistry as aN,
|
|
37554
|
+
createToolbarRegistry as aO,
|
|
37555
|
+
Editor as aP,
|
|
37556
|
+
resolveCommandRef as aQ,
|
|
37557
|
+
commandRefName as aR,
|
|
37558
|
+
InlineShell as aS,
|
|
37559
|
+
BalloonShell as aT,
|
|
37560
|
+
DocumentShell as aU,
|
|
37561
|
+
createMemo as aV,
|
|
37562
|
+
getCaretRectFromSnapshot as aW,
|
|
37563
|
+
getParagraphRectFromSnapshot as aX,
|
|
37564
|
+
createComponent as aY,
|
|
37565
|
+
CaretOverlay as aZ,
|
|
37566
|
+
Show as a_,
|
|
37567
|
+
underlineStyleDashArray as aa,
|
|
37568
|
+
getListLabelInset as ab,
|
|
37569
|
+
getParagraphBorderInsets as ac,
|
|
37570
|
+
normalizeFamily as ad,
|
|
37571
|
+
ROBOTO_FONT_FILES as ae,
|
|
37572
|
+
loadFontAsset as af,
|
|
37573
|
+
OFFICE_COMPAT_FONT_FAMILIES as ag,
|
|
37574
|
+
buildSfnt as ah,
|
|
37575
|
+
defaultFontDecoderRegistry as ai,
|
|
37576
|
+
SfntFontProgram as aj,
|
|
37577
|
+
collectPdfFontFamilies as ak,
|
|
37578
|
+
projectDocumentLayout as al,
|
|
37579
|
+
getPageHeaderZoneTop as am,
|
|
37580
|
+
getPageBodyTop as an,
|
|
37581
|
+
findFootnoteReference as ao,
|
|
37582
|
+
FOOTNOTE_MARKER_GUTTER_PX as ap,
|
|
37583
|
+
resolveImporterForFile as aq,
|
|
37584
|
+
createEditorStateFromDocument as ar,
|
|
37585
|
+
getDocumentParagraphsCanonical as as,
|
|
37586
|
+
getToolbarStyleState as at,
|
|
37587
|
+
STANDARD_FONT_SIZES_PT as au,
|
|
37588
|
+
fontSizePxToPt as av,
|
|
37589
|
+
probeLocalFontFamilies as aw,
|
|
37590
|
+
createInitialEditorState as ax,
|
|
37591
|
+
parseFontSizePtToPx as ay,
|
|
37592
|
+
formatFontSizePt as az,
|
|
37217
37593
|
getParagraphLength as b,
|
|
37218
|
-
|
|
37219
|
-
|
|
37220
|
-
|
|
37221
|
-
|
|
37222
|
-
|
|
37223
|
-
|
|
37224
|
-
|
|
37225
|
-
|
|
37226
|
-
|
|
37227
|
-
|
|
37228
|
-
|
|
37229
|
-
|
|
37230
|
-
|
|
37231
|
-
|
|
37232
|
-
|
|
37233
|
-
|
|
37234
|
-
|
|
37235
|
-
|
|
37236
|
-
|
|
37237
|
-
|
|
37238
|
-
|
|
37239
|
-
|
|
37240
|
-
|
|
37241
|
-
|
|
37242
|
-
|
|
37243
|
-
|
|
37244
|
-
|
|
37245
|
-
|
|
37246
|
-
|
|
37247
|
-
|
|
37248
|
-
|
|
37249
|
-
|
|
37250
|
-
|
|
37251
|
-
|
|
37252
|
-
|
|
37253
|
-
|
|
37254
|
-
|
|
37255
|
-
|
|
37256
|
-
|
|
37257
|
-
|
|
37258
|
-
|
|
37259
|
-
|
|
37260
|
-
|
|
37261
|
-
|
|
37262
|
-
|
|
37263
|
-
|
|
37264
|
-
|
|
37265
|
-
|
|
37266
|
-
|
|
37267
|
-
|
|
37268
|
-
|
|
37269
|
-
|
|
37270
|
-
|
|
37271
|
-
|
|
37272
|
-
|
|
37273
|
-
|
|
37274
|
-
|
|
37275
|
-
|
|
37276
|
-
|
|
37277
|
-
|
|
37278
|
-
|
|
37279
|
-
|
|
37280
|
-
|
|
37281
|
-
|
|
37594
|
+
Select as b$,
|
|
37595
|
+
style as b0,
|
|
37596
|
+
setAttribute as b1,
|
|
37597
|
+
setStyleProperty as b2,
|
|
37598
|
+
memo as b3,
|
|
37599
|
+
template as b4,
|
|
37600
|
+
insert as b5,
|
|
37601
|
+
use as b6,
|
|
37602
|
+
addEventListener as b7,
|
|
37603
|
+
Dialog as b8,
|
|
37604
|
+
delegateEvents as b9,
|
|
37605
|
+
getWelcomeSeen as bA,
|
|
37606
|
+
isLocalFontAccessSupported as bB,
|
|
37607
|
+
EDITOR_SCROLL_PADDING_PX as bC,
|
|
37608
|
+
Toolbar as bD,
|
|
37609
|
+
OasisEditorLoading as bE,
|
|
37610
|
+
createEditorLogger as bF,
|
|
37611
|
+
getCachedCanvasImage as bG,
|
|
37612
|
+
registerDomStatsSurface as bH,
|
|
37613
|
+
Button as bI,
|
|
37614
|
+
Checkbox as bJ,
|
|
37615
|
+
ColorPicker as bK,
|
|
37616
|
+
CommandRegistry as bL,
|
|
37617
|
+
DEFAULT_PALETTE as bM,
|
|
37618
|
+
DialogFooter as bN,
|
|
37619
|
+
FloatingActionButton as bO,
|
|
37620
|
+
GridPicker as bP,
|
|
37621
|
+
IconButton as bQ,
|
|
37622
|
+
Menu as bR,
|
|
37623
|
+
OASIS_BUILTIN_COMMANDS as bS,
|
|
37624
|
+
OASIS_MENU_ITEMS as bT,
|
|
37625
|
+
OASIS_TOOLBAR_ITEMS as bU,
|
|
37626
|
+
OasisEditorAppLazy as bV,
|
|
37627
|
+
OasisEditorContainer as bW,
|
|
37628
|
+
PluginCollection as bX,
|
|
37629
|
+
Popover as bY,
|
|
37630
|
+
RIBBON_TABS as bZ,
|
|
37631
|
+
RIBBON_TAB_DEFINITIONS as b_,
|
|
37632
|
+
className as ba,
|
|
37633
|
+
For as bb,
|
|
37634
|
+
UNDERLINE_STYLE_OPTIONS as bc,
|
|
37635
|
+
Tabs as bd,
|
|
37636
|
+
measureParagraphMinContentWidthPx as be,
|
|
37637
|
+
getEditableBlocksForZone as bf,
|
|
37638
|
+
findParagraphLocation as bg,
|
|
37639
|
+
createSectionBoundaryParagraph as bh,
|
|
37640
|
+
normalizePageSettings as bi,
|
|
37641
|
+
DEFAULT_EDITOR_PAGE_SETTINGS as bj,
|
|
37642
|
+
markStart as bk,
|
|
37643
|
+
markEnd as bl,
|
|
37644
|
+
getParagraphEntries as bm,
|
|
37645
|
+
getParagraphById as bn,
|
|
37646
|
+
PluginUiHost as bo,
|
|
37647
|
+
OasisEditorEditor as bp,
|
|
37648
|
+
perfTimer as bq,
|
|
37649
|
+
OasisBrandMark as br,
|
|
37650
|
+
setPreciseFontPreference as bs,
|
|
37651
|
+
setWelcomeSeen as bt,
|
|
37652
|
+
enablePreciseFontMode as bu,
|
|
37653
|
+
createOasisEditorClient as bv,
|
|
37654
|
+
setLocale as bw,
|
|
37655
|
+
startLongTaskObserver as bx,
|
|
37656
|
+
installGlobalReport as by,
|
|
37657
|
+
applyStoredPreciseFontPreference as bz,
|
|
37282
37658
|
createEditorParagraphFromRuns as c,
|
|
37283
|
-
|
|
37284
|
-
|
|
37285
|
-
|
|
37286
|
-
|
|
37287
|
-
|
|
37288
|
-
|
|
37289
|
-
|
|
37659
|
+
SelectField as c0,
|
|
37660
|
+
Separator as c1,
|
|
37661
|
+
SidePanel as c2,
|
|
37662
|
+
SidePanelBody as c3,
|
|
37663
|
+
SidePanelFooter as c4,
|
|
37664
|
+
SidePanelHeader as c5,
|
|
37665
|
+
SplitButton as c6,
|
|
37666
|
+
TextField as c7,
|
|
37667
|
+
Button$1 as c8,
|
|
37668
|
+
createEditorCommandBus as c9,
|
|
37669
|
+
createOasisEditor as ca,
|
|
37670
|
+
createOasisEditorContainer as cb,
|
|
37671
|
+
mount as cc,
|
|
37672
|
+
registerToolbarRenderer as cd,
|
|
37290
37673
|
getParagraphText as d,
|
|
37291
37674
|
getActiveZone as e,
|
|
37292
37675
|
getDocumentSections as f,
|