ooxml-ui 1.36.0 → 1.38.0
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/chart/format-pane-analysis.d.ts +1 -0
- package/dist/chart/format-pane-effects.d.ts +1 -0
- package/dist/chart/format-pane-fill-kinds.d.ts +1 -0
- package/dist/chart/format-pane-fill-line.d.ts +1 -0
- package/dist/chart/format-pane-locales/zh-CN.d.ts +0 -1
- package/dist/chart/format-pane-targets.d.ts +1 -0
- package/dist/chart/format-pane-text.d.ts +1 -0
- package/dist/{chunk-Z4DML5NW.js → chunk-PMXLEYK6.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/smartart/smartart-text-pane-tools.d.ts +1 -0
- package/dist/teams.js +1 -1
- package/dist/theme.d.ts +1 -0
- package/dist/touch-targets.d.ts +1 -0
- package/dist/visio/canvas-editing.d.ts +2 -0
- package/dist/visio/locales/de-backstage.d.ts +2 -0
- package/dist/visio/locales/en-backstage.d.ts +2 -0
- package/dist/visio/locales/es-backstage.d.ts +2 -0
- package/dist/visio/locales/fr-backstage.d.ts +2 -0
- package/dist/visio/locales/zh-CN-backstage.d.ts +2 -0
- package/dist/visio/paragraph-layout.d.ts +6 -1
- package/dist/visio/pdf-path.d.ts +2 -24
- package/dist/visio/render-bevel.d.ts +26 -0
- package/dist/visio/render-solid.d.ts +28 -0
- package/dist/visio/ribbon-action.d.ts +2 -2
- package/dist/visio/ribbon-localize.d.ts +6 -0
- package/dist/visio/ribbon-org-chart.d.ts +3 -2
- package/dist/visio/ribbon-shape-styles.d.ts +2 -0
- package/dist/visio/tab-layout.d.ts +15 -0
- package/dist/visio/viewer-backstage.d.ts +4 -0
- package/dist/visio/viewer-control-handles.d.ts +19 -0
- package/dist/visio/viewer-data-advanced.d.ts +25 -0
- package/dist/visio/viewer-data-fields.d.ts +16 -0
- package/dist/visio/viewer-data-labels.d.ts +8 -0
- package/dist/visio/viewer-data-visualizer.d.ts +25 -0
- package/dist/visio/viewer-data.d.ts +6 -0
- package/dist/visio/viewer-org-chart.d.ts +11 -0
- package/dist/visio/viewer-shape-actions.d.ts +12 -0
- package/dist/visio/viewer-shape-styles.d.ts +1 -1
- package/dist/visio.js +2370 -762
- package/dist/xlsx.js +3 -3
- package/package.json +2 -2
- /package/dist/{chunk-7ST5QRD5.js → chunk-FKLH7ZVV.js} +0 -0
package/dist/visio.js
CHANGED
|
@@ -11,9 +11,9 @@ import { definePresence } from './chunk-YZH2QS7J.js';
|
|
|
11
11
|
import { parseSvgPreview } from './chunk-FN7IF6M6.js';
|
|
12
12
|
import './chunk-QLHCGV4C.js';
|
|
13
13
|
import './chunk-XL77FR4B.js';
|
|
14
|
-
import { VISIO_CAPABILITY_COMMANDS, VISIO_TEXT_LANGUAGES, VISIO_BULLET_STYLES, FOREIGN_VECTOR_SCENE_LIMITS, EMPTY_TEXT_SEARCH, EMPTY_SELECTION, EMPTY_EDIT_STATE, assertViewableDocument, snapshotSelection, selectionKey, indexDocumentText, searchDocumentText, sameSelection, validateSearchQuery, MAX_INPUT_BYTES, createTemplateVsdx, DocumentHistory, snapshotEdits, visioWithContainerMembers, snapshotVisioGeometryExpectation, visioSelectionIsOnPage, visioContainerUpkeep, assertVisioGeometryExpectation, visioDuplicateCommand, visioGroupCommand, visioUngroupCommand, visioContainerCommand, visioCalloutCommand, visioPasteCommand, visioTextOccurrenceSelection, ForeignVectorBudget, VISIO_IDENTITY_TRANSFORM, hasVisibleShapeContent, composeVisioTransform, compatibilityNotes, compatibilityText, visioGradientInstances, visioRenderedGradientStopCount, inspectForeignVectorResource, VISIO_CAPABILITY_BACKSTAGE_PAGES, copySnapshotScene, editErrorMessage, eventKeys, isEditCancellation, propertyKeys, VISIO_TEXT_REPLACE_LIMITS, visioTextReplaceOccurrences, visioTextReplacePlan, visioTextReplaceCommands, visioClipboardShape, TEXT_SEARCH_LIMITS, VISIO_TEMPLATES, visioSizePositionCommand, visioSizePositionState, visioPageInsertCommand, visioQuarterTurnCommand, visioRotationShape, VISIO_INITIAL_PRESENCE, sanitizeVisioPresence, isVisioTemplateId, textSearchStatus, visioSvgStrokeStyle, visioLineDashLengths, visioStencilDropCommand, visioMovementShape, visioMoveCommands, visioMoveTargets, visioMarqueeBox, visioPageDragDelta, visioSnapResizeDrag, visioResizeSelectionFrame, visioResizeSelectionDrag, visioTextShape, visioTextDraftEdit, isVisioPathTool, visioPathDrawPlan, visioDrawPlan, visioDrawBounds, visioDrawIsLargeEnough, visioConnectorCreationCommand, visioConnectorRouteOf, visioPageEditToDrawing, visioNudgeCommands, VISIO_DIAGRAM_RULE_SETS, visioArrangeCommands, visioChangeMasterTargets, visioChangeMasterCommand, visioChangeShapeRefusal, visioChangeShapeCommand, visioChangeCaseShape, visioChangeCaseCommand, visioTextBlockShape, visioTextBlockFrame, visioTextBlockEdit, visioOrderingShape, visioFormatTargetShape, visioFormattingShape, visioTextFormattingState, visioTextIndentCommand, visioTextFontStepCommand, visioFontFamilies, visioChartObjectInsertCommand, visioPictureInsertCommand, normalizeVisioHyperlinkAddress, visioFitToDrawingEdits, VISIO_PAPER_SIZES, visioPageSizePresetEdits, visioOrientationEdits, visioPageDecorationState, visioNewPageId, visioMatchingPaperSize, visioPageBreaks, visioSwimlaneOptions, visioInsertSeparator, visioDeleteSwimlane, visioInsertSwimlane, visioOrgHierarchy,
|
|
14
|
+
import { VISIO_CAPABILITY_COMMANDS, VISIO_TEXT_LANGUAGES, VISIO_BULLET_STYLES, FOREIGN_VECTOR_SCENE_LIMITS, EMPTY_TEXT_SEARCH, EMPTY_SELECTION, EMPTY_EDIT_STATE, assertViewableDocument, snapshotSelection, selectionKey, indexDocumentText, searchDocumentText, sameSelection, validateSearchQuery, MAX_INPUT_BYTES, createTemplateVsdx, DocumentHistory, snapshotEdits, visioWithContainerMembers, snapshotVisioGeometryExpectation, visioSelectionIsOnPage, visioContainerUpkeep, assertVisioGeometryExpectation, visioDuplicateCommand, visioGroupCommand, visioUngroupCommand, visioContainerCommand, visioCalloutCommand, visioPasteCommand, visioTextOccurrenceSelection, ForeignVectorBudget, VISIO_IDENTITY_TRANSFORM, hasVisibleShapeContent, composeVisioTransform, compatibilityNotes, compatibilityText, visioGradientInstances, visioRenderedGradientStopCount, inspectForeignVectorResource, VISIO_CAPABILITY_BACKSTAGE_PAGES, copySnapshotScene, editErrorMessage, eventKeys, isEditCancellation, propertyKeys, VISIO_TEXT_REPLACE_LIMITS, visioTextReplaceOccurrences, visioTextReplacePlan, visioTextReplaceCommands, visioClipboardShape, TEXT_SEARCH_LIMITS, VISIO_TEMPLATES, visioSizePositionCommand, visioSizePositionState, visioPageInsertCommand, visioQuarterTurnCommand, visioRotationShape, VISIO_INITIAL_PRESENCE, sanitizeVisioPresence, isVisioTemplateId, textSearchStatus, visioSvgStrokeStyle, visioLineDashLengths, visioStencilDropCommand, visioMovementShape, visioMoveCommands, visioMoveTargets, visioMarqueeBox, visioPageDragDelta, visioSnapResizeDrag, visioResizeSelectionFrame, visioResizeSelectionDrag, visioTextShape, visioTextDraftEdit, isVisioPathTool, visioPathDrawPlan, visioDrawPlan, visioDrawBounds, visioDrawIsLargeEnough, visioConnectorCreationCommand, visioConnectorRouteOf, visioPageEditToDrawing, visioNudgeCommands, VISIO_DIAGRAM_RULE_SETS, visioArrangeCommands, visioChangeMasterTargets, visioChangeMasterCommand, visioChangeShapeRefusal, visioChangeShapeCommand, visioChangeCaseShape, visioChangeCaseCommand, visioTextBlockShape, visioTextBlockFrame, visioTextBlockEdit, visioOrderingShape, visioFormatTargetShape, visioFormattingShape, visioTextFormattingState, visioTextIndentCommand, visioTextFontStepCommand, visioFontFamilies, visioChartObjectInsertCommand, visioPictureInsertCommand, normalizeVisioHyperlinkAddress, visioFitToDrawingEdits, VISIO_PAPER_SIZES, visioPageSizePresetEdits, visioOrientationEdits, visioPageDecorationState, visioNewPageId, visioMatchingPaperSize, visioPageBreaks, visioSwimlaneOptions, visioInsertSeparator, visioDeleteSwimlane, visioInsertSwimlane, visioOrgHierarchy, visioOrgPeople, visioOrgImportEdits, visioOrgReLayout, visioOrgAddPosition, VISIO_DATA_GRAPHIC_POSITIONS, visioDataGraphicFields, visioRemoveDataGraphicEdits, visioDataGraphicConfigs, visioAutoSpaceDataGraphicEdits, visioPositionDataGraphicEdits, visioDataGraphicEdits, visioSetDataGraphicItemEdits, visioShapeDataRow, VISIO_DATA_GRAPHIC_FILL_ROW, visioColorRules, visioLegendEdits, visioDataGraphicParts, visioTextDialogValues, visioTextDialogPatch, visioFormatPainterSnapshot, visioFormatPainterEdits, VISIO_FORMAT_PAINTER_LIMITS, visioConnectableShape, visioAddConnectionPointCommand, visioSwimlaneInfo, visioWithCalloutLeaders, visioWithDataGraphics, visioOrgPosition, visioFillPatternTransform, visioRenderedGradientStops, visioStrokeGradient, visioMasterDropRefusal, visioMasterDropSize, visioFileMasterDropCommand, visioMasterDropCommand, visioDrawingPoint, visioMovePreviewTransform, visioMarqueeSelection, VISIO_RESIZE_HANDLES, visioResizeSwimlane, visioPathPreview, visioNearestConnectionPoint, visioRotationPreviewTransform, visioStraightLineHandles, visioConnectorEndHandles, VISIO_LAYOUT_STYLES, visioShapeFormattingState, visioGlowKey, visioShapeEffectValues, visioReflectionKey, visioFollowTarget, visioPaperSize, visioKeepAutoSize, VISIO_RULER_DENSITY_CHOICES, VISIO_GRID_DENSITY_CHOICES, visioGridSteps, visioRulerGridValues, visioRulerDensityFactor, visioRulerGridEdits, checkVisioDiagram, visioShapeReport, visioShapeReportTable, visioShapeReportCsv, visioShapeReportText, visioSubprocessCommand, visioParseRange, visioDataTable, visioWorkbookGrid, visioOrgDeletePosition, visioShapeDataText, visioOrgFollowData, visioDeleteDataGraphicItemEdits, visioDataGraphicItems, visioVisualizerShapes, visioParseVisualizerTable, visioDataVisualizerEdits, VISIO_VISUALIZER_COLUMNS, VISIO_LAYOUT_LABELS, visioAutoAlignCommands, visioReLayoutCommands, visioLayerAssignState, visioNewLayerNames, visioLayerAssignCommands, VISIO_SELECT_TYPES, VISIO_SELECT_TYPE_LABELS, visioPageMasters, visioSelectByType, visioPasteTextCommand, visioSnapMoveDelta, visioPageGuides, visioAutoConnectShape, visioAutoConnectArrows, visioAutoConnectNeighbor, visioAutoConnectPlan, visioShapePageBox, VISIO_FIELD_CATEGORIES, visioTextAppendEdit, visioTextSource, visioTextBlockMatrix, VISIO_TEXT_BLOCK_HANDLES, visioShapeLocalPoint, visioTextBlockDrag, visioShapeFrame, visioMasterPreviewBox, visioConnectorMovePreviews, visioConnectorPreviewPath, visioGlueableShape, visioDataGraphicMarker, visioGuideCreateCommand, visioGuideMoveCommand } from 'ooxml-core/visio/ui';
|
|
15
15
|
export { TEXT_SEARCH_LIMITS, VISIO_CAPABILITY_IDS, compatibilityNotes, compatibilityText, demoDocument, eventKeys, propertyKeys } from 'ooxml-core/visio/ui';
|
|
16
|
-
import { VISIO_VISIBILITY_LIMITS, VISIO_BASIC_STENCIL, VISIO_STENCILS, visioOutlineShape, VISIO_SNAP, VISIO_GLUE, VISIO_SHADOW_PRESETS, loadVisio, createVsdx, deserializeVisioClipboard, mergeVisioPages, getVisioPageLayers, resolveVisioPageVisibility, visioLineJumpPaths, VISIO_CLIPBOARD_MAX_CHARS, visioSnapGlue, VISIO_SWIMLANE_STYLES, VISIO_GLOW_TRANSPARENCY, VISIO_METADATA_TEXT_LIMIT, VISIO_PICTURE_MAX_BYTES, inspectVisioRasterImage, visioPageLayout, VISIO_BUILT_IN_THEMES, VISIO_CONNECTOR_ROUTES, visioFilledArrow, layoutVisioFilledArrowLine, visioOpenArrowPath, visioBuiltInStencil, visioBuiltInMaster, isVisioChangeShapeTarget, VISIO_CONTAINER_STYLES, VISIO_CALLOUT_STYLES, visioFallbackQuickStyle, VISIO_GLOW_SIZES, VISIO_SOFT_EDGE_SIZES, VISIO_REFLECTION_PRESETS, encodeBitmapEmf, VISIO_BACKGROUND_STYLES, visioBackgroundShapes, VISIO_BORDER_STYLES, visioBorderShapes, checkVisioAlternativeText, visioRefreshReport, VISIO_SHAPE_DATA_TYPES, visioShapeDataRowName, VISIO_CLIPBOARD_MAGIC, visioThemeVariantColors, visioPageThemeColors, parseVsdx, readVisioStencil, isVisioBuiltInThemeId, VISIO_QUICK_STYLE_COLORS, VISIO_SCALE_UNITS } from 'ooxml-core/visio';
|
|
16
|
+
import { VISIO_VISIBILITY_LIMITS, VISIO_BASIC_STENCIL, VISIO_STENCILS, visioOutlineShape, VISIO_SNAP, VISIO_GLUE, VISIO_SHADOW_PRESETS, loadVisio, createVsdx, deserializeVisioClipboard, mergeVisioPages, getVisioPageLayers, resolveVisioPageVisibility, visioLineJumpPaths, VISIO_CLIPBOARD_MAX_CHARS, projectPathData, visioSnapGlue, VISIO_SWIMLANE_STYLES, VISIO_GLOW_TRANSPARENCY, VISIO_METADATA_TEXT_LIMIT, VISIO_PICTURE_MAX_BYTES, inspectVisioRasterImage, visioPageLayout, VISIO_BUILT_IN_THEMES, VISIO_CONNECTOR_ROUTES, createProjection, visioRotation3dMatrix, visioFilledArrow, layoutVisioFilledArrowLine, visioOpenArrowPath, VISIO_BEVEL_TYPES_SHARP, VISIO_BEVEL_TYPES_INSET, extrudePaths, extrusionPathData, visioBuiltInStencil, visioBuiltInMaster, isVisioChangeShapeTarget, VISIO_CONTAINER_STYLES, VISIO_CALLOUT_STYLES, visioFallbackQuickStyle, VISIO_GLOW_SIZES, VISIO_BEVEL_PRESETS, VISIO_ROTATION_PRESETS, VISIO_SOFT_EDGE_SIZES, VISIO_REFLECTION_PRESETS, encodeBitmapEmf, VISIO_BACKGROUND_STYLES, visioBackgroundShapes, VISIO_BORDER_STYLES, visioBorderShapes, checkVisioAlternativeText, visioRefreshReport, VISIO_SHAPE_DATA_TYPES, visioShapeDataRowName, VISIO_CLIPBOARD_MAGIC, visioThemeVariantColors, visioPageThemeColors, parseVsdx, parsePath, visioTabStarts, readVisioStencil, isVisioBuiltInThemeId, VISIO_QUICK_STYLE_COLORS, VISIO_SCALE_UNITS } from 'ooxml-core/visio';
|
|
17
17
|
import { renderChartSvg, readEmbeddedChartSpace, readEmbeddedChartExSpace, writeEmbeddedChartSpace, writeEmbeddedChartExSpace } from 'ooxml-core/xlsx';
|
|
18
18
|
import { resolveRotateHandlePlacement, createRotationDrag, snapAngle } from 'ooxml-core/geometry';
|
|
19
19
|
import { normalizeLocale, interpolate } from 'ooxml-core/i18n';
|
|
@@ -23,6 +23,7 @@ import { INSERT_CHART_TYPES, GROUPED_CHART_TYPES, gridChartSvg, gridChart, parse
|
|
|
23
23
|
import { applyChartSpaceDataSheetEdits, applyChartExSpaceDataSheetEdits, applyChartEditIntent, applyChartExEditIntent, chartSpaceDataSheet, renderChartSpaceSvg, chartExSpaceDataSheet, chartExSummaryFromModel, renderChartSummarySvg } from 'ooxml-core/chart';
|
|
24
24
|
import { pushRecentColor, normalizePaletteHex } from 'ooxml-core/color';
|
|
25
25
|
import { parseTrueType, subsetTrueType } from 'ooxml-core/text';
|
|
26
|
+
import { zlibCompress } from 'ooxml-core/opc';
|
|
26
27
|
|
|
27
28
|
function createWorkerEditor(factory, timeoutMs = 2e4) {
|
|
28
29
|
const create = (() => {
|
|
@@ -349,7 +350,7 @@ function layerOverrideMaps(model, overrides) {
|
|
|
349
350
|
const page3 = pages.get(entry.pageId);
|
|
350
351
|
if (!page3) throw new Error("The layer override page does not belong to this document.");
|
|
351
352
|
let ids = known.get(page3.id);
|
|
352
|
-
if (!ids) known.set(page3.id, ids = new Set(page3.layers?.map((
|
|
353
|
+
if (!ids) known.set(page3.id, ids = new Set(page3.layers?.map((layer2) => layer2.id)));
|
|
353
354
|
if (!ids.has(entry.layerId)) throw new Error("The layer does not belong to this page.");
|
|
354
355
|
let values = result.get(page3.id);
|
|
355
356
|
if (!values) result.set(page3.id, values = /* @__PURE__ */ new Map());
|
|
@@ -746,7 +747,7 @@ var ViewerController = class {
|
|
|
746
747
|
this.#assertAlive();
|
|
747
748
|
const page3 = this.#state.document?.pages.find((candidate) => candidate.id === pageId);
|
|
748
749
|
if (!page3) throw new Error("The layer override page does not belong to this document.");
|
|
749
|
-
if (!page3.layers?.some((
|
|
750
|
+
if (!page3.layers?.some((layer2) => layer2.id === layerId))
|
|
750
751
|
throw new Error("The layer does not belong to this page.");
|
|
751
752
|
if (visible !== null && typeof visible !== "boolean")
|
|
752
753
|
throw new Error("Layer visibility must be boolean or null.");
|
|
@@ -2451,6 +2452,7 @@ function layoutParagraphs(text2, measure = measureBrowserText, budget = createTe
|
|
|
2451
2452
|
align: paragraph.horizontalAlign,
|
|
2452
2453
|
direction: paragraph.direction,
|
|
2453
2454
|
last: index === wrapped.length - 1,
|
|
2455
|
+
tabs: { stops: paragraph.tabs ?? [], origin: text2.margins.left },
|
|
2454
2456
|
...index === 0 && paragraph.bullet ? { bullet: { ...paragraph.bullet, x: left - paragraph.bullet.offset } } : {}
|
|
2455
2457
|
});
|
|
2456
2458
|
y += height;
|
|
@@ -2475,8 +2477,61 @@ function sliceRuns(runs, offsets, start, end) {
|
|
|
2475
2477
|
}
|
|
2476
2478
|
return result;
|
|
2477
2479
|
}
|
|
2480
|
+
var lineHasTab = (line) => line.runs.some((run) => run.text.includes(" "));
|
|
2481
|
+
var widthOf = (runs, measure, stop) => {
|
|
2482
|
+
let width = 0;
|
|
2483
|
+
for (const run of runs) {
|
|
2484
|
+
const at = stop === void 0 ? -1 : run.text.indexOf(stop);
|
|
2485
|
+
const text2 = at < 0 ? run.text : run.text.slice(0, at);
|
|
2486
|
+
if (text2) width += measure(text2, run);
|
|
2487
|
+
if (at >= 0) break;
|
|
2488
|
+
}
|
|
2489
|
+
return width;
|
|
2490
|
+
};
|
|
2491
|
+
function layoutTabbedLine(line, measure = measureBrowserText) {
|
|
2492
|
+
if (line.align !== "left" || line.direction !== "ltr" || !lineHasTab(line)) return void 0;
|
|
2493
|
+
const parts = [[]];
|
|
2494
|
+
for (const run of line.runs) {
|
|
2495
|
+
const pieces = run.text.split(" ");
|
|
2496
|
+
pieces.forEach((piece, index) => {
|
|
2497
|
+
if (index > 0) parts.push([]);
|
|
2498
|
+
if (piece) parts[parts.length - 1].push({ ...run, text: piece });
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
const segments = parts.map((runs) => {
|
|
2502
|
+
const width = widthOf(runs, measure);
|
|
2503
|
+
const decimal = runs.some((run) => run.text.includes(".")) ? widthOf(runs, measure, ".") : width;
|
|
2504
|
+
return { width, decimal };
|
|
2505
|
+
});
|
|
2506
|
+
const starts = visioTabStarts(segments, line.tabs?.stops ?? [], line.tabs?.origin ?? 0, line.x);
|
|
2507
|
+
return parts.map((runs, index) => ({ runs, x: starts[index] }));
|
|
2508
|
+
}
|
|
2478
2509
|
|
|
2479
2510
|
// src/visio/render-text.ts
|
|
2511
|
+
function appendRuns(row, runs, text2) {
|
|
2512
|
+
let shift = 0;
|
|
2513
|
+
for (const run of runs) {
|
|
2514
|
+
const span = svgElement("tspan");
|
|
2515
|
+
span.textContent = runDisplayText(run.text, run);
|
|
2516
|
+
span.setAttribute("font-family", run.fontFamily);
|
|
2517
|
+
span.setAttribute("font-size", String(runDisplaySize(run)));
|
|
2518
|
+
if (run.textCase === "small-caps") span.setAttribute("font-variant", "small-caps");
|
|
2519
|
+
if (run.letterSpacing) span.setAttribute("letter-spacing", String(run.letterSpacing));
|
|
2520
|
+
const target = runBaselineShift(run);
|
|
2521
|
+
if (target !== shift) span.setAttribute("dy", String(target - shift));
|
|
2522
|
+
shift = target;
|
|
2523
|
+
span.setAttribute("fill", safeColor(run.color));
|
|
2524
|
+
span.setAttribute("fill-opacity", String(run.opacity ?? text2.opacity ?? 1));
|
|
2525
|
+
if (run.bold) span.setAttribute("font-weight", "bold");
|
|
2526
|
+
if (run.italic) span.setAttribute("font-style", "italic");
|
|
2527
|
+
const decorations = [
|
|
2528
|
+
run.underline ? "underline" : "",
|
|
2529
|
+
run.strikethrough ? "line-through" : ""
|
|
2530
|
+
].filter(Boolean);
|
|
2531
|
+
if (decorations.length) span.setAttribute("text-decoration", decorations.join(" "));
|
|
2532
|
+
row.append(span);
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2480
2535
|
function renderText(text2, warnings, budget) {
|
|
2481
2536
|
const group2 = svgElement("g");
|
|
2482
2537
|
group2.setAttribute(
|
|
@@ -2537,29 +2592,19 @@ function renderText(text2, warnings, budget) {
|
|
|
2537
2592
|
row.setAttribute("textLength", String(line.availableWidth));
|
|
2538
2593
|
row.setAttribute("lengthAdjust", "spacing");
|
|
2539
2594
|
}
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
if (run.bold) span.setAttribute("font-weight", "bold");
|
|
2554
|
-
if (run.italic) span.setAttribute("font-style", "italic");
|
|
2555
|
-
const decorations = [
|
|
2556
|
-
run.underline ? "underline" : "",
|
|
2557
|
-
run.strikethrough ? "line-through" : ""
|
|
2558
|
-
].filter(Boolean);
|
|
2559
|
-
if (decorations.length) span.setAttribute("text-decoration", decorations.join(" "));
|
|
2560
|
-
row.append(span);
|
|
2561
|
-
}
|
|
2562
|
-
node.append(row);
|
|
2595
|
+
const tabbed = layoutTabbedLine(line);
|
|
2596
|
+
if (tabbed) row.remove();
|
|
2597
|
+
else appendRuns(row, line.runs, text2);
|
|
2598
|
+
for (const part of tabbed ?? []) {
|
|
2599
|
+
const segment = svgElement("tspan");
|
|
2600
|
+
segment.setAttribute("x", String(part.x));
|
|
2601
|
+
segment.setAttribute("y", String(y + line.y));
|
|
2602
|
+
segment.setAttribute("direction", "ltr");
|
|
2603
|
+
segment.setAttribute("text-anchor", "start");
|
|
2604
|
+
appendRuns(segment, part.runs, text2);
|
|
2605
|
+
node.append(segment);
|
|
2606
|
+
}
|
|
2607
|
+
if (!tabbed) node.append(row);
|
|
2563
2608
|
if (line.bullet) {
|
|
2564
2609
|
const bullet = svgElement("text");
|
|
2565
2610
|
bullet.textContent = line.bullet.text;
|
|
@@ -2772,6 +2817,192 @@ function renderShapeEffects(shape, paths, defs, world) {
|
|
|
2772
2817
|
defs.append(filter);
|
|
2773
2818
|
return { below, geometryFilter: `url(#${filter.id})` };
|
|
2774
2819
|
}
|
|
2820
|
+
var bevelId = 0;
|
|
2821
|
+
var ELEVATION = 45;
|
|
2822
|
+
var FLAT = Math.sin(ELEVATION * Math.PI / 180);
|
|
2823
|
+
var scale2 = (world) => Math.sqrt(Math.abs(world[0] * world[3] - world[1] * world[2])) || 1;
|
|
2824
|
+
function renderBevel(shape, paths, defs, world, box2) {
|
|
2825
|
+
const bevel = shape.style.bevel;
|
|
2826
|
+
const filled = paths.filter((path) => path.getAttribute("fill") !== "none");
|
|
2827
|
+
if (!bevel || !filled.length || bevel.width <= 0 && bevel.height <= 0) return void 0;
|
|
2828
|
+
const unit2 = scale2(world);
|
|
2829
|
+
const width = Math.max(bevel.width, bevel.height) / unit2;
|
|
2830
|
+
const sharp = VISIO_BEVEL_TYPES_SHARP.includes(bevel.type);
|
|
2831
|
+
const inset = VISIO_BEVEL_TYPES_INSET.includes(bevel.type);
|
|
2832
|
+
const radius = (sharp ? width / 4 : width / 2) || 1e-6;
|
|
2833
|
+
const filter = svgElement("filter");
|
|
2834
|
+
filter.id = `visio-bevel-${++bevelId}`;
|
|
2835
|
+
filter.setAttribute("filterUnits", "userSpaceOnUse");
|
|
2836
|
+
const region = box2 ?? {
|
|
2837
|
+
x: Math.min(0, shape.width),
|
|
2838
|
+
y: Math.min(0, shape.height),
|
|
2839
|
+
width: Math.abs(shape.width),
|
|
2840
|
+
height: Math.abs(shape.height)
|
|
2841
|
+
};
|
|
2842
|
+
filter.setAttribute("x", String(region.x - width));
|
|
2843
|
+
filter.setAttribute("y", String(region.y - width));
|
|
2844
|
+
filter.setAttribute("width", String(region.width + width * 2));
|
|
2845
|
+
filter.setAttribute("height", String(region.height + width * 2));
|
|
2846
|
+
const add = (name, attributes) => {
|
|
2847
|
+
const node = svgElement(name);
|
|
2848
|
+
for (const [key, value] of Object.entries(attributes)) node.setAttribute(key, String(value));
|
|
2849
|
+
filter.append(node);
|
|
2850
|
+
return node;
|
|
2851
|
+
};
|
|
2852
|
+
add("feGaussianBlur", { in: "SourceAlpha", stdDeviation: radius, result: "height" });
|
|
2853
|
+
const light = add("feDiffuseLighting", {
|
|
2854
|
+
in: "height",
|
|
2855
|
+
surfaceScale: Math.min(10, 2 + bevel.height * 72 / 2) * (sharp ? 1.5 : 1),
|
|
2856
|
+
diffuseConstant: 1,
|
|
2857
|
+
"lighting-color": "#ffffff",
|
|
2858
|
+
result: "lit"
|
|
2859
|
+
});
|
|
2860
|
+
const distant = svgElement("feDistantLight");
|
|
2861
|
+
light.append(distant);
|
|
2862
|
+
distant.setAttribute("azimuth", String(inset ? 45 : 225));
|
|
2863
|
+
distant.setAttribute("elevation", String(ELEVATION));
|
|
2864
|
+
const gain = sharp ? 5 : 3;
|
|
2865
|
+
add("feColorMatrix", {
|
|
2866
|
+
in: "lit",
|
|
2867
|
+
type: "matrix",
|
|
2868
|
+
values: `0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ${gain} 0 0 0 ${-gain * FLAT}`,
|
|
2869
|
+
result: "high"
|
|
2870
|
+
});
|
|
2871
|
+
add("feColorMatrix", {
|
|
2872
|
+
in: "lit",
|
|
2873
|
+
type: "matrix",
|
|
2874
|
+
values: `0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ${-gain} 0 0 0 ${gain * FLAT}`,
|
|
2875
|
+
result: "low"
|
|
2876
|
+
});
|
|
2877
|
+
add("feMerge", { result: "both" }).append(
|
|
2878
|
+
...["low", "high"].map((name) => {
|
|
2879
|
+
const node = svgElement("feMergeNode");
|
|
2880
|
+
node.setAttribute("in", name);
|
|
2881
|
+
return node;
|
|
2882
|
+
})
|
|
2883
|
+
);
|
|
2884
|
+
add("feComposite", { in: "both", in2: "SourceAlpha", operator: "in" });
|
|
2885
|
+
defs.append(filter);
|
|
2886
|
+
const group2 = svgElement("g");
|
|
2887
|
+
group2.dataset.bevel = "";
|
|
2888
|
+
group2.setAttribute("pointer-events", "none");
|
|
2889
|
+
group2.setAttribute("aria-hidden", "true");
|
|
2890
|
+
group2.setAttribute("filter", `url(#${filter.id})`);
|
|
2891
|
+
group2.setAttribute("opacity", "0.6");
|
|
2892
|
+
for (const source of filled) {
|
|
2893
|
+
const copy = svgElement("path");
|
|
2894
|
+
copy.setAttribute("d", source.getAttribute("d") ?? "");
|
|
2895
|
+
copy.setAttribute("fill", "#000000");
|
|
2896
|
+
copy.setAttribute("stroke", "none");
|
|
2897
|
+
group2.append(copy);
|
|
2898
|
+
}
|
|
2899
|
+
return group2;
|
|
2900
|
+
}
|
|
2901
|
+
function rotation3dWrapper(shape, projected = false) {
|
|
2902
|
+
const rotation = shape.style.rotation3d;
|
|
2903
|
+
if (!rotation) return void 0;
|
|
2904
|
+
const [a, b, c, d] = visioRotation3dMatrix(rotation);
|
|
2905
|
+
const cx = shape.width / 2, cy = shape.height / 2;
|
|
2906
|
+
const wrapper = svgElement("g");
|
|
2907
|
+
wrapper.dataset.rotation3d = "";
|
|
2908
|
+
if (rotation.perspective > 0) wrapper.dataset.perspective = "";
|
|
2909
|
+
if (projected) wrapper.dataset.solid3d = "";
|
|
2910
|
+
if (!projected)
|
|
2911
|
+
wrapper.setAttribute(
|
|
2912
|
+
"transform",
|
|
2913
|
+
`matrix(${a} ${b} ${c} ${d} ${cx - a * cx - c * cy} ${cy - b * cx - d * cy})`
|
|
2914
|
+
);
|
|
2915
|
+
return wrapper;
|
|
2916
|
+
}
|
|
2917
|
+
function flatContent(shape) {
|
|
2918
|
+
const wrapper = rotation3dWrapper(shape);
|
|
2919
|
+
delete wrapper.dataset.rotation3d;
|
|
2920
|
+
delete wrapper.dataset.perspective;
|
|
2921
|
+
wrapper.dataset.solidFlat = "";
|
|
2922
|
+
return wrapper;
|
|
2923
|
+
}
|
|
2924
|
+
var inchesPerUnit = (world) => Math.sqrt(Math.abs(world[0] * world[3] - world[1] * world[2])) || 1;
|
|
2925
|
+
function solidRender(shape, world) {
|
|
2926
|
+
const rotation = shape.style.rotation3d;
|
|
2927
|
+
if (!rotation || rotation.perspective <= 0 && !shape.style.extrusion) return void 0;
|
|
2928
|
+
const unit2 = inchesPerUnit(world);
|
|
2929
|
+
const projection = createProjection(rotation, { x: shape.width / 2, y: shape.height / 2 }, unit2);
|
|
2930
|
+
const depth = (shape.style.extrusion?.depth ?? 0) / unit2;
|
|
2931
|
+
const margin = ((shape.style.contour?.size ?? 0) + (shape.style.bevel?.width ?? 0)) / unit2;
|
|
2932
|
+
const corners = [];
|
|
2933
|
+
for (const z of depth > 0 ? [0, -depth] : [0])
|
|
2934
|
+
for (const x2 of [0, shape.width])
|
|
2935
|
+
for (const y2 of [0, shape.height]) corners.push(projection.point(x2, y2, z));
|
|
2936
|
+
const xs = corners.map((p) => p.x);
|
|
2937
|
+
const ys = corners.map((p) => p.y);
|
|
2938
|
+
const [x, y] = [Math.min(...xs) - margin, Math.min(...ys) - margin];
|
|
2939
|
+
return {
|
|
2940
|
+
projection,
|
|
2941
|
+
unit: unit2,
|
|
2942
|
+
bounds: { x, y, width: Math.max(...xs) + margin - x, height: Math.max(...ys) + margin - y }
|
|
2943
|
+
};
|
|
2944
|
+
}
|
|
2945
|
+
var clampByte = (value) => Math.max(0, Math.min(255, Math.round(value)));
|
|
2946
|
+
function shadeColor(hex, factor) {
|
|
2947
|
+
const channels = [1, 3, 5].map((index) => parseInt(hex.slice(index, index + 2), 16) || 0);
|
|
2948
|
+
return `#${channels.map((value) => clampByte(factor <= 1 ? value * factor : value + (255 - value) * (factor - 1))).map((value) => value.toString(16).padStart(2, "0")).join("")}`;
|
|
2949
|
+
}
|
|
2950
|
+
var layer = (name) => {
|
|
2951
|
+
const group2 = svgElement("g");
|
|
2952
|
+
group2.dataset[name] = "";
|
|
2953
|
+
group2.setAttribute("pointer-events", "none");
|
|
2954
|
+
group2.setAttribute("aria-hidden", "true");
|
|
2955
|
+
return group2;
|
|
2956
|
+
};
|
|
2957
|
+
var polygon = (d, fill, stroke) => {
|
|
2958
|
+
const path = svgElement("path");
|
|
2959
|
+
path.setAttribute("d", d);
|
|
2960
|
+
path.setAttribute("fill", fill);
|
|
2961
|
+
if (stroke) {
|
|
2962
|
+
path.setAttribute("stroke", stroke.color);
|
|
2963
|
+
path.setAttribute("stroke-width", String(stroke.width));
|
|
2964
|
+
path.setAttribute("stroke-linejoin", "round");
|
|
2965
|
+
} else path.setAttribute("stroke", "none");
|
|
2966
|
+
return path;
|
|
2967
|
+
};
|
|
2968
|
+
function renderSolid(shape, solid, projectedPaths) {
|
|
2969
|
+
const { extrusion, contour } = shape.style;
|
|
2970
|
+
if (!extrusion && !contour) return void 0;
|
|
2971
|
+
const filled = shape.geometry.filter((geometry) => geometry.fill).map((geometry) => geometry.path);
|
|
2972
|
+
const faces = extrusion ? extrudePaths(filled, solid.projection, extrusion.depth / solid.unit) : void 0;
|
|
2973
|
+
const group2 = svgElement("g");
|
|
2974
|
+
group2.dataset.solid = "";
|
|
2975
|
+
group2.setAttribute("pointer-events", "none");
|
|
2976
|
+
group2.setAttribute("aria-hidden", "true");
|
|
2977
|
+
if (contour) {
|
|
2978
|
+
const outline = layer("contour");
|
|
2979
|
+
const stroke = { color: contour.color, width: 2 * contour.size / solid.unit };
|
|
2980
|
+
for (const d of projectedPaths) outline.append(polygon(d, contour.color, stroke));
|
|
2981
|
+
if (faces) {
|
|
2982
|
+
if (faces.back.length)
|
|
2983
|
+
outline.append(polygon(extrusionPathData(faces.back), contour.color, stroke));
|
|
2984
|
+
for (const face of faces.sides)
|
|
2985
|
+
outline.append(polygon(extrusionPathData([face.points]), contour.color, stroke));
|
|
2986
|
+
}
|
|
2987
|
+
group2.append(outline);
|
|
2988
|
+
}
|
|
2989
|
+
if (extrusion && faces) {
|
|
2990
|
+
const solidGroup = layer("extrusion");
|
|
2991
|
+
if (faces.back.length)
|
|
2992
|
+
solidGroup.append(polygon(extrusionPathData(faces.back), shadeColor(extrusion.color, 0.7)));
|
|
2993
|
+
for (const face of faces.sides)
|
|
2994
|
+
solidGroup.append(
|
|
2995
|
+
polygon(
|
|
2996
|
+
extrusionPathData([face.points]),
|
|
2997
|
+
shadeColor(extrusion.color, face.shade),
|
|
2998
|
+
// A hairline in the face colour closes the seams between adjacent faces.
|
|
2999
|
+
{ color: shadeColor(extrusion.color, face.shade), width: 0.5 / (solid.unit * 96) }
|
|
3000
|
+
)
|
|
3001
|
+
);
|
|
3002
|
+
group2.append(solidGroup);
|
|
3003
|
+
}
|
|
3004
|
+
return group2.childElementCount ? group2 : void 0;
|
|
3005
|
+
}
|
|
2775
3006
|
|
|
2776
3007
|
// src/visio/render-svg.ts
|
|
2777
3008
|
var NS2 = "http://www.w3.org/2000/svg";
|
|
@@ -2843,9 +3074,9 @@ function renderPage(model, page3, options2 = {}) {
|
|
|
2843
3074
|
jumps: /* @__PURE__ */ new Map()
|
|
2844
3075
|
};
|
|
2845
3076
|
try {
|
|
2846
|
-
for (const
|
|
2847
|
-
context.jumps = visioLineJumpPaths(
|
|
2848
|
-
for (const shape of
|
|
3077
|
+
for (const layer2 of pages) {
|
|
3078
|
+
context.jumps = visioLineJumpPaths(layer2);
|
|
3079
|
+
for (const shape of layer2.shapes) drawShape(shape, root, context, layer2.id);
|
|
2849
3080
|
}
|
|
2850
3081
|
} catch (error) {
|
|
2851
3082
|
context.resources.dispose();
|
|
@@ -2905,8 +3136,13 @@ function drawShape(shape, parent, context, pageId, parentTransform = VISIO_IDENT
|
|
|
2905
3136
|
own();
|
|
2906
3137
|
children();
|
|
2907
3138
|
}
|
|
2908
|
-
function drawOwn(shape,
|
|
3139
|
+
function drawOwn(shape, outer, context, world) {
|
|
2909
3140
|
const { warnings, defs, resources } = context;
|
|
3141
|
+
const solid = solidRender(shape, world);
|
|
3142
|
+
const turned = rotation3dWrapper(shape, !!solid);
|
|
3143
|
+
if (turned) outer.append(turned);
|
|
3144
|
+
const group2 = turned ?? outer;
|
|
3145
|
+
const flat = solid && !shape.style.rotation3d?.keepTextFlat ? flatContent(shape) : group2;
|
|
2910
3146
|
const lineStyle = context.static ? visioSvgStrokeStyle(shape.style) : shape.style;
|
|
2911
3147
|
if (context.interactive && shape.text.plainText && !shape.geometry.some(
|
|
2912
3148
|
(geometry) => geometry.fill && shape.style.fill !== "none" || geometry.stroke && shape.style.linePattern !== 0
|
|
@@ -2919,7 +3155,7 @@ function drawOwn(shape, group2, context, world) {
|
|
|
2919
3155
|
hit.setAttribute("fill", "transparent");
|
|
2920
3156
|
hit.setAttribute("pointer-events", "all");
|
|
2921
3157
|
hit.setAttribute("vector-effect", "non-scaling-stroke");
|
|
2922
|
-
|
|
3158
|
+
flat.append(hit);
|
|
2923
3159
|
}
|
|
2924
3160
|
const fill = shape.geometry.some((geometry) => geometry.fill) ? fillPaint(shape.style, defs, resources, world, context.pageHeight) : "none";
|
|
2925
3161
|
const stroke = shape.geometry.some((geometry) => geometry.stroke) && shape.style.linePattern !== 0 ? linePaint(lineStyle, defs, resources, world, context.pageHeight, [
|
|
@@ -2938,7 +3174,10 @@ function drawOwn(shape, group2, context, world) {
|
|
|
2938
3174
|
const path = svgElement("path");
|
|
2939
3175
|
if (shape.style.fillPattern) path.setAttribute("shape-rendering", "crispEdges");
|
|
2940
3176
|
if (context.interactive) path.dataset.geometry = "";
|
|
2941
|
-
path.setAttribute(
|
|
3177
|
+
path.setAttribute(
|
|
3178
|
+
"d",
|
|
3179
|
+
solid && projectPathData(geometry.path, solid.projection) || (jumps?.[index] ?? geometry.path)
|
|
3180
|
+
);
|
|
2942
3181
|
if (jumps && context.interactive) path.dataset.lineJumps = "";
|
|
2943
3182
|
path.setAttribute("fill", geometry.fill ? fill : "none");
|
|
2944
3183
|
path.setAttribute("fill-opacity", String(shape.style.fillOpacity));
|
|
@@ -2961,20 +3200,34 @@ function drawOwn(shape, group2, context, world) {
|
|
|
2961
3200
|
paths.push(path);
|
|
2962
3201
|
}
|
|
2963
3202
|
const effects = renderShapeEffects(shape, paths, defs, world);
|
|
2964
|
-
for (const
|
|
3203
|
+
for (const layer2 of effects.below) group2.insertBefore(layer2, paths[0]);
|
|
2965
3204
|
if (effects.geometryFilter)
|
|
2966
3205
|
for (const path of paths) path.setAttribute("filter", effects.geometryFilter);
|
|
2967
3206
|
const shadow = renderShadow(shape, paths, defs, world);
|
|
2968
3207
|
if (shadow) group2.insertBefore(shadow, effects.below[0] ?? paths[0]);
|
|
3208
|
+
const bevel = renderBevel(shape, paths, defs, world, solid?.bounds);
|
|
3209
|
+
if (bevel) group2.append(bevel);
|
|
3210
|
+
if (solid) {
|
|
3211
|
+
const behind = renderSolid(
|
|
3212
|
+
shape,
|
|
3213
|
+
solid,
|
|
3214
|
+
paths.filter((path) => path.getAttribute("fill") !== "none").map((path) => path.getAttribute("d") ?? "")
|
|
3215
|
+
);
|
|
3216
|
+
if (behind) group2.insertBefore(behind, paths[0] ?? null);
|
|
3217
|
+
}
|
|
2969
3218
|
const raster = renderImage(shape, resources);
|
|
2970
|
-
if (raster)
|
|
3219
|
+
if (raster) flat.append(raster);
|
|
2971
3220
|
const chart = renderEmbeddedChart(shape);
|
|
2972
|
-
if (chart)
|
|
3221
|
+
if (chart) flat.append(chart);
|
|
2973
3222
|
const vector = renderForeignVectorShape(shape, context.vectorBudget);
|
|
2974
|
-
if (vector)
|
|
2975
|
-
if (shape.text.plainText)
|
|
3223
|
+
if (vector) flat.append(vector);
|
|
3224
|
+
if (shape.text.plainText)
|
|
3225
|
+
(shape.style.rotation3d?.keepTextFlat ? outer : flat).append(
|
|
3226
|
+
renderText(shape.text, warnings, context.textBudget)
|
|
3227
|
+
);
|
|
2976
3228
|
if (shape.kind === "foreign" && !shape.image && !shape.foreignVector && !shape.embeddedObject)
|
|
2977
3229
|
warnings.add("Embedded or foreign objects are not rendered in this build.");
|
|
3230
|
+
if (flat !== group2) group2.append(flat);
|
|
2978
3231
|
}
|
|
2979
3232
|
|
|
2980
3233
|
// src/visio/shape-inspector.ts
|
|
@@ -3657,7 +3910,7 @@ summary::marker { color:var(--_vv-muted); font-size:10px; }
|
|
|
3657
3910
|
var backstage_default = "/* Visio's File tab and backstage. */\n:host {\n position: relative;\n}\n/* The shared office-ui-backstage draws the File column; these style Visio's page content. */\n.backstage-page h1 {\n margin: 0 0 24px;\n font-size: 34px;\n font-weight: 300;\n}\n.backstage-page h2 {\n margin: 20px 0 8px;\n font-size: 16px;\n font-weight: 600;\n}\n.backstage-file {\n margin-top: 0 !important;\n font-size: 20px !important;\n font-weight: 400 !important;\n overflow-wrap: anywhere;\n}\n.backstage-facts {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: 8px 24px;\n max-width: 520px;\n margin: 0;\n font-size: 13px;\n}\n.backstage-facts dt {\n color: var(--_vv-muted);\n}\n.backstage-facts dd {\n margin: 0;\n overflow-wrap: anywhere;\n}\n.backstage-action {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n width: min(420px, 100%);\n min-height: 64px;\n margin: 0 0 10px;\n padding: 10px 16px;\n text-align: left;\n background: var(--_vv-surface);\n}\n.backstage-action strong {\n font-size: 14px;\n font-weight: 600;\n}\n.backstage-action span,\n.backstage-muted,\n.backstage-note-count {\n color: var(--_vv-muted);\n font-size: 12px;\n}\n.backstage-templates {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n.backstage-templates .backstage-action,\n.backstage-templates ::slotted(*) {\n width: 200px;\n min-height: 120px;\n}\n.backstage-thumb {\n align-self: stretch;\n width: 100%;\n height: 72px;\n margin-bottom: 6px;\n object-fit: contain;\n background: #fff;\n border: 1px solid var(--_vv-border, currentColor);\n}\n/* Account: the shared profile editor, then Visio's product information. */\n.backstage-page office-ui-account {\n max-width: 560px;\n}\n.backstage-product {\n margin-top: 24px;\n}\n/* Share with people: a live session between windows of this browser. */\n.share-panel {\n max-width: 560px;\n margin-bottom: 16px;\n}\n.share-panel h2 {\n margin-top: 0 !important;\n}\n.share-field {\n display: grid;\n gap: 4px;\n max-width: 320px;\n margin: 12px 0;\n font-size: 13px;\n}\n.share-room {\n min-height: 30px;\n padding: 2px 8px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n background: var(--_vv-surface);\n color: inherit;\n font: inherit;\n}\n.share-buttons button {\n min-height: 32px;\n padding: 0 16px;\n}\n.share-buttons button[hidden] {\n display: none;\n}\n.share-status {\n min-height: 20px;\n font-size: 13px;\n}\n/* File > Export > PDF options: the page range and the report of the last export. */\n.pdf-options {\n max-width: 560px;\n margin: 8px 0 16px;\n}\n.pdf-field {\n display: grid;\n gap: 4px;\n max-width: 240px;\n margin: 8px 0;\n font-size: 13px;\n}\n.pdf-field select,\n.pdf-field input {\n min-height: 30px;\n padding: 2px 8px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n background: var(--_vv-surface);\n color: inherit;\n font: inherit;\n}\n.pdf-range {\n display: flex;\n gap: 12px;\n}\n.pdf-range[hidden],\n.pdf-report[hidden] {\n display: none;\n}\n.pdf-report {\n margin-top: 8px;\n font-size: 13px;\n}\n.pdf-report ul {\n margin: 4px 0 0;\n padding-left: 20px;\n}\n";
|
|
3658
3911
|
|
|
3659
3912
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/canvas.css?raw
|
|
3660
|
-
var canvas_default = "/*\n * Drawing canvas focus. SVG outlines are drawn in drawing units (inches here), so a browser\n * focus ring on a shape becomes a page-sized blob. Shapes show focus with a dashed accent\n * stroke instead, only for keyboard focus; selection keeps its solid accent stroke.\n */\n.paper [data-shape-id]:focus,\n.paper [data-shape-id]:focus-visible {\n outline: none;\n}\n.paper [data-shape-id]:focus-visible > [data-geometry] {\n stroke: var(--_vv-focus) !important;\n stroke-width: 0.04 !important;\n stroke-dasharray: 0.08 0.05;\n}\n\n/* Visio's selection: white handles with a grey outline on a thin grey frame. */\n.paper [data-line-endpoint],\n.paper [data-resize-handle],\n.rotation-overlay [data-rotation-handle] {\n fill: #fff;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1.25px;\n cursor: crosshair;\n touch-action: none;\n pointer-events: all;\n}\n.paper [data-resize-handle]:hover,\n.paper [data-line-endpoint]:hover,\n.rotation-overlay [data-rotation-handle]:hover {\n fill: var(--_vv-accent-soft, #dfe5f6);\n}\n.paper [data-resize-handle='n'],\n.paper [data-resize-handle='s'] {\n cursor: ns-resize;\n}\n.paper [data-resize-handle='e'],\n.paper [data-resize-handle='w'] {\n cursor: ew-resize;\n}\n.paper [data-resize-handle='ne'],\n.paper [data-resize-handle='sw'] {\n cursor: nesw-resize;\n}\n.paper [data-resize-handle='nw'],\n.paper [data-resize-handle='se'] {\n cursor: nwse-resize;\n}\n.rotation-overlay [data-rotation-handle] {\n stroke: transparent;\n cursor: grab;\n}\n.rotation-overlay .rotation-glyph {\n fill: none;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1.5px;\n stroke-linecap: round;\n stroke-linejoin: round;\n pointer-events: none;\n}\n.rotation-overlay [data-rotation-handle]:hover + .rotation-glyph {\n stroke: var(--_vv-accent);\n}\n.paper [data-resize-frame] {\n fill: none;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1px;\n pointer-events: none;\n}\n/*\n * A selection with no frame or endpoint handles (several shapes, a group, a glued connector) is\n * marked on the shapes themselves; a framed shape keeps its own outline, as in Visio.\n */\n.viewport:not([data-selection-frame]) .paper [data-selected='true'] > [data-geometry] {\n stroke: var(--_vv-accent) !important;\n stroke-width: 0.025 !important;\n}\n.viewport:not([data-selection-frame]) .paper [role='group'][data-selected='true'] [data-geometry] {\n stroke: var(--_vv-accent) !important;\n stroke-dasharray: 0.06 0.04;\n}\n/* Handles step aside while a shape's text is edited in place. */\n.viewport[data-text-editing] [data-resize-overlay],\n.viewport[data-text-editing] .rotation-overlay,\n.viewport[data-text-editing] [data-line-endpoint] {\n display: none;\n}\n.paper [data-resize-frame-preview] {\n stroke-dasharray: 5 3;\n}\n.paper .endpoint-preview,\n.paper .rotation-preview {\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 5 3;\n pointer-events: none;\n}\n/* Visio shows no line from the pin to the rotation handle. */\n.rotation-overlay .rotation-stem {\n display: none;\n}\n\n.rotation-overlay {\n position: absolute;\n z-index: 1;\n pointer-events: none;\n}\n/* View > Visual Aids > Connection Points: blue x markers (presentation only, never exported). */\n.paper [data-connection-points] path {\n fill: none;\n stroke: #1f6fd1;\n stroke-width: 1.25px;\n pointer-events: none;\n}\n.paper [data-connection-points] path[data-inherited='true'] {\n stroke-opacity: 0.55;\n}\n.paper [data-connection-points] path[data-selected='true'] {\n stroke: var(--_vv-accent);\n stroke-width: 2.5px;\n}\n/* A connector end over a connection point glues to that point. */\n.paper .connect-point-target {\n fill: none;\n stroke: #2e9d43;\n stroke-width: 2px;\n pointer-events: none;\n}\n/* Connectors glued to dragged shapes, re-routed live until the move is committed. */\n.paper .connector-preview {\n fill: none;\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 4 3;\n pointer-events: none;\n}\n\n/* View > Visual Aids > AutoConnect: arrows outside a hovered shape and their Quick Shapes bar. */\n.auto-connect {\n position: absolute;\n z-index: 2;\n width: 0;\n height: 0;\n pointer-events: none;\n}\n.viewport[data-text-editing] .auto-connect {\n display: none;\n}\n.auto-connect-arrow {\n position: absolute;\n width: 20px;\n height: 20px;\n margin: -10px 0 0 -10px;\n padding: 2px;\n border: 0;\n background: none;\n cursor: pointer;\n pointer-events: auto;\n}\n.auto-connect-arrow svg {\n display: block;\n width: 16px;\n height: 16px;\n fill: var(--_vv-accent-soft);\n stroke: var(--_vv-accent);\n stroke-width: 1;\n stroke-linejoin: round;\n}\n.auto-connect-arrow:hover svg {\n fill: var(--_vv-accent);\n}\n.auto-connect-bar {\n position: absolute;\n display: flex;\n gap: 2px;\n padding: 3px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n background: var(--_vv-surface);\n box-shadow: 0 2px 8px rgb(0 0 0 / 18%);\n pointer-events: auto;\n}\n.auto-connect-bar[data-side='right'] {\n transform: translate(9px, -50%);\n}\n.auto-connect-bar[data-side='left'] {\n transform: translate(calc(-100% - 9px), -50%);\n}\n.auto-connect-bar[data-side='up'] {\n transform: translate(-50%, calc(-100% - 9px));\n}\n.auto-connect-bar[data-side='down'] {\n transform: translate(-50%, 9px);\n}\n.auto-connect-bar button {\n width: 30px;\n height: 30px;\n padding: 3px;\n border: 1px solid transparent;\n border-radius: 2px;\n background: none;\n cursor: pointer;\n}\n.auto-connect-bar button:hover {\n border-color: var(--_vv-accent);\n background: var(--_vv-accent-soft);\n}\n.auto-connect-bar svg {\n display: block;\n width: 22px;\n height: 22px;\n fill: var(--_vv-surface);\n stroke: var(--_vv-ink);\n stroke-width: 1;\n stroke-linejoin: round;\n}\n\n/*\n * Touch: the drawing window owns its gestures (pinch zoom, one-finger pan, drag), so the browser\n * must not scroll or zoom it. Only this surface is affected; the page around it still scrolls.\n */\n.viewport,\n.viewport .paper {\n touch-action: none;\n}\n/* Fingers need larger handles: the scale grows both the drawing and the hit area. */\n@media (pointer: coarse) {\n .paper [data-resize-handle],\n .paper [data-line-endpoint] {\n transform-box: fill-box;\n transform-origin: center;\n transform: scale(2);\n }\n}\n";
|
|
3913
|
+
var canvas_default = "/*\n * Drawing canvas focus. SVG outlines are drawn in drawing units (inches here), so a browser\n * focus ring on a shape becomes a page-sized blob. Shapes show focus with a dashed accent\n * stroke instead, only for keyboard focus; selection keeps its solid accent stroke.\n */\n.paper [data-shape-id]:focus,\n.paper [data-shape-id]:focus-visible {\n outline: none;\n}\n.paper [data-shape-id]:focus-visible > [data-geometry] {\n stroke: var(--_vv-focus) !important;\n stroke-width: 0.04 !important;\n stroke-dasharray: 0.08 0.05;\n}\n\n/* Visio's selection: white handles with a grey outline on a thin grey frame. */\n.paper [data-line-endpoint],\n.paper [data-resize-handle],\n.rotation-overlay [data-rotation-handle] {\n fill: #fff;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1.25px;\n cursor: crosshair;\n touch-action: none;\n pointer-events: all;\n}\n.paper [data-resize-handle]:hover,\n.paper [data-line-endpoint]:hover,\n.rotation-overlay [data-rotation-handle]:hover {\n fill: var(--_vv-accent-soft, #dfe5f6);\n}\n.paper [data-resize-handle='n'],\n.paper [data-resize-handle='s'] {\n cursor: ns-resize;\n}\n.paper [data-resize-handle='e'],\n.paper [data-resize-handle='w'] {\n cursor: ew-resize;\n}\n.paper [data-resize-handle='ne'],\n.paper [data-resize-handle='sw'] {\n cursor: nesw-resize;\n}\n.paper [data-resize-handle='nw'],\n.paper [data-resize-handle='se'] {\n cursor: nwse-resize;\n}\n.rotation-overlay [data-rotation-handle] {\n stroke: transparent;\n cursor: grab;\n}\n.rotation-overlay .rotation-glyph {\n fill: none;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1.5px;\n stroke-linecap: round;\n stroke-linejoin: round;\n pointer-events: none;\n}\n.rotation-overlay [data-rotation-handle]:hover + .rotation-glyph {\n stroke: var(--_vv-accent);\n}\n.paper [data-resize-frame] {\n fill: none;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1px;\n pointer-events: none;\n}\n/*\n * A selection with no frame or endpoint handles (several shapes, a group, a glued connector) is\n * marked on the shapes themselves; a framed shape keeps its own outline, as in Visio.\n */\n.viewport:not([data-selection-frame]) .paper [data-selected='true'] > [data-geometry] {\n stroke: var(--_vv-accent) !important;\n stroke-width: 0.025 !important;\n}\n.viewport:not([data-selection-frame]) .paper [role='group'][data-selected='true'] [data-geometry] {\n stroke: var(--_vv-accent) !important;\n stroke-dasharray: 0.06 0.04;\n}\n/* Handles step aside while a shape's text is edited in place. */\n.viewport[data-text-editing] [data-resize-overlay],\n.viewport[data-text-editing] .rotation-overlay,\n.viewport[data-text-editing] [data-line-endpoint] {\n display: none;\n}\n.paper [data-resize-frame-preview] {\n stroke-dasharray: 5 3;\n}\n.paper .endpoint-preview,\n.paper .rotation-preview {\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 5 3;\n pointer-events: none;\n}\n/* Visio shows no line from the pin to the rotation handle. */\n.rotation-overlay .rotation-stem {\n display: none;\n}\n\n.rotation-overlay {\n position: absolute;\n z-index: 1;\n pointer-events: none;\n}\n/* View > Visual Aids > Connection Points: blue x markers (presentation only, never exported). */\n.paper [data-connection-points] path {\n fill: none;\n stroke: #1f6fd1;\n stroke-width: 1.25px;\n pointer-events: none;\n}\n.paper [data-connection-points] path[data-inherited='true'] {\n stroke-opacity: 0.55;\n}\n.paper [data-connection-points] path[data-selected='true'] {\n stroke: var(--_vv-accent);\n stroke-width: 2.5px;\n}\n/* A connector end over a connection point glues to that point. */\n.paper .connect-point-target {\n fill: none;\n stroke: #2e9d43;\n stroke-width: 2px;\n pointer-events: none;\n}\n/* Connectors glued to dragged shapes, re-routed live until the move is committed. */\n.paper .connector-preview {\n fill: none;\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 4 3;\n pointer-events: none;\n}\n\n/* View > Visual Aids > AutoConnect: arrows outside a hovered shape and their Quick Shapes bar. */\n.auto-connect {\n position: absolute;\n z-index: 2;\n width: 0;\n height: 0;\n pointer-events: none;\n}\n.viewport[data-text-editing] .auto-connect {\n display: none;\n}\n.auto-connect-arrow {\n position: absolute;\n width: 20px;\n height: 20px;\n margin: -10px 0 0 -10px;\n padding: 2px;\n border: 0;\n background: none;\n cursor: pointer;\n pointer-events: auto;\n}\n.auto-connect-arrow svg {\n display: block;\n width: 16px;\n height: 16px;\n fill: var(--_vv-accent-soft);\n stroke: var(--_vv-accent);\n stroke-width: 1;\n stroke-linejoin: round;\n}\n.auto-connect-arrow:hover svg {\n fill: var(--_vv-accent);\n}\n.auto-connect-bar {\n position: absolute;\n display: flex;\n gap: 2px;\n padding: 3px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n background: var(--_vv-surface);\n box-shadow: 0 2px 8px rgb(0 0 0 / 18%);\n pointer-events: auto;\n}\n.auto-connect-bar[data-side='right'] {\n transform: translate(9px, -50%);\n}\n.auto-connect-bar[data-side='left'] {\n transform: translate(calc(-100% - 9px), -50%);\n}\n.auto-connect-bar[data-side='up'] {\n transform: translate(-50%, calc(-100% - 9px));\n}\n.auto-connect-bar[data-side='down'] {\n transform: translate(-50%, 9px);\n}\n.auto-connect-bar button {\n width: 30px;\n height: 30px;\n padding: 3px;\n border: 1px solid transparent;\n border-radius: 2px;\n background: none;\n cursor: pointer;\n}\n.auto-connect-bar button:hover {\n border-color: var(--_vv-accent);\n background: var(--_vv-accent-soft);\n}\n.auto-connect-bar svg {\n display: block;\n width: 22px;\n height: 22px;\n fill: var(--_vv-surface);\n stroke: var(--_vv-ink);\n stroke-width: 1;\n stroke-linejoin: round;\n}\n\n/*\n * Touch: the drawing window owns its gestures (pinch zoom, one-finger pan, drag), so the browser\n * must not scroll or zoom it. Only this surface is affected; the page around it still scrolls.\n */\n.viewport,\n.viewport .paper {\n touch-action: none;\n}\n/* Visio's yellow control handles; a handle that cannot be moved is grey. */\n.paper [data-control-handle] {\n fill: #ffe14d;\n stroke: #7a6a00;\n stroke-width: 1px;\n cursor: move;\n touch-action: none;\n pointer-events: all;\n}\n.paper [data-control-handle]:hover {\n fill: #fff08a;\n}\n.paper [data-control-handle][data-control-locked] {\n fill: #d4d4d4;\n stroke: #8a8a8a;\n cursor: not-allowed;\n}\n.viewport[data-text-editing] [data-control-handle] {\n display: none;\n}\n/* Fingers need larger handles: the scale grows both the drawing and the hit area. */\n@media (pointer: coarse) {\n .paper [data-resize-handle],\n .paper [data-control-handle],\n .paper [data-line-endpoint] {\n transform-box: fill-box;\n transform-origin: center;\n transform: scale(2);\n }\n}\n";
|
|
3661
3914
|
|
|
3662
3915
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/ribbon.css?raw
|
|
3663
3916
|
var ribbon_default = "/*\n * Microsoft Visio ribbon layout on the shared ooxml-ui controls. The shared --office-* tokens come\n * from the bridge in styles/theme.ts. Loaded after the legacy styles.ts.\n */\n\n/* Tab row: Quick Access Toolbar, then Visio's tabs. */\n.ribbon-head {\n display: flex;\n align-items: stretch;\n min-width: 0;\n border-bottom: 1px solid var(--_vv-border);\n}\n.ribbon-head .ribbon-tabs {\n flex: 0 1 auto;\n min-width: 0;\n height: 36px;\n border-bottom: 0;\n overflow-x: auto;\n scrollbar-width: none;\n}\n.ribbon-head .ribbon-tabs button {\n flex: none;\n min-height: 35px;\n padding: 6px 12px;\n font-size: 13px;\n}\n\n/* Panels: groups of large commands and three-row stacks, as dense as Visio's. */\n.ribbon-content {\n min-height: 96px;\n padding: 2px 2px 0;\n /* Groups collapse into buttons when the window narrows (ribbon-overflow.ts), so the panel\n only scrolls when even those do not fit, and never shows a scrollbar. */\n scrollbar-width: none;\n}\n.ribbon-content::-webkit-scrollbar {\n display: none;\n}\n.ribbon-row {\n display: flex;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: 0;\n padding: 0;\n border: 0;\n background: transparent;\n}\n.ribbon-row office-ui-ribbon-group {\n min-width: 0;\n}\noffice-ui-ribbon-group office-ui-button,\noffice-ui-ribbon-group office-ui-menu-button {\n --office-target-size: 24px;\n}\noffice-ui-ribbon-group [data-size='large'] {\n --office-target-size: 30px;\n}\noffice-ui-button[variant='stacked']::part(button) {\n min-width: 48px;\n min-height: 66px;\n padding: 2px 6px;\n font-size: 12px;\n}\noffice-ui-menu-button[variant='stacked']::part(button) {\n min-width: 48px;\n min-height: 50px;\n font-size: 12px;\n}\noffice-ui-ribbon-group [data-size='small']::part(button) {\n justify-content: flex-start;\n font-size: 12px;\n}\noffice-ui-ribbon-stack:not([orientation]) {\n justify-content: flex-start;\n padding-top: 2px;\n}\noffice-ui-ribbon-stack:not([orientation]) > * {\n min-height: 24px;\n}\noffice-ui-ribbon-group > office-ui-ribbon-stack > office-ui-ribbon-stack[orientation] {\n min-height: 32px;\n}\noffice-ui-select[data-combo] {\n --office-target-size: 24px;\n}\noffice-ui-menu-button[data-active]::part(button) {\n background: var(--_vv-accent-soft);\n box-shadow: inset 0 0 0 1px var(--_vv-accent);\n}\n[data-unsupported] {\n cursor: not-allowed;\n}\n.ribbon-check {\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 24px;\n padding: 0 6px;\n font-size: 12px;\n white-space: nowrap;\n cursor: pointer;\n}\n.ribbon-check[data-unsupported] {\n color: var(--_vv-muted);\n opacity: 0.6;\n}\n.ribbon-hint {\n display: none;\n}\n\n/* Drawing window with optional rulers. */\n.canvas-area {\n display: grid;\n flex: 1;\n min-width: 0;\n min-height: 0;\n grid-template-columns: 0 1fr;\n grid-template-rows: 0 1fr;\n}\n.canvas-area[data-ruler='true'] {\n grid-template-columns: 18px 1fr;\n grid-template-rows: 18px 1fr;\n}\n.canvas-area > .viewport {\n grid-column: 2;\n grid-row: 2;\n}\n.ruler,\n.ruler-corner {\n display: none;\n background: var(--_vv-surface);\n}\n.canvas-area[data-ruler='true'] > .ruler,\n.canvas-area[data-ruler='true'] > .ruler-corner {\n display: block;\n}\n.ruler-corner {\n grid-column: 1;\n grid-row: 1;\n border-right: 1px solid var(--_vv-border);\n border-bottom: 1px solid var(--_vv-border);\n}\n/* The shared office-ui-ruler draws ticks, labels and its own edge. */\n.ruler-h {\n grid-column: 2;\n grid-row: 1;\n}\n.ruler-v {\n grid-column: 1;\n grid-row: 2;\n}\n\n.page-bar {\n display: flex;\n flex: none;\n align-items: stretch;\n min-width: 0;\n border-top: 1px solid var(--_vv-border);\n background: var(--_vv-secondary);\n}\n.page-bar office-ui-menu-button {\n --office-target-size: 28px;\n flex: none;\n padding: 0 2px;\n}\n.page-tabs {\n flex: 1;\n min-width: 0;\n border-top: 0;\n}\noffice-ui-status-bar.status {\n gap: 16px;\n min-height: 29px;\n padding: 0 8px 0 12px;\n font-size: 11px;\n background: var(--_vv-surface);\n color: var(--_vv-ink);\n}\noffice-ui-status-item[value=''] {\n display: none;\n}\n.viewport[data-tool='ellipse'],\n.viewport[data-tool='ellipse'] .paper [data-shape-id],\n.viewport[data-tool='rectangle'],\n.viewport[data-tool='rectangle'] .paper [data-shape-id],\n.viewport[data-tool='line'],\n.viewport[data-tool='line'] .paper [data-shape-id],\n.viewport[data-tool='freeform'],\n.viewport[data-tool='freeform'] .paper [data-shape-id],\n.viewport[data-tool='arc'],\n.viewport[data-tool='arc'] .paper [data-shape-id],\n.viewport[data-tool='pencil'],\n.viewport[data-tool='pencil'] .paper [data-shape-id],\n.viewport[data-tool='connector'],\n.viewport[data-tool='connector'] .paper [data-shape-id],\n.viewport[data-tool='connection-point'],\n.viewport[data-tool='connection-point'] .paper [data-shape-id] {\n cursor: crosshair;\n}\n.viewport[data-tool='ellipse'],\n.viewport[data-tool='rectangle'],\n.viewport[data-tool='line'],\n.viewport[data-tool='freeform'],\n.viewport[data-tool='arc'],\n.viewport[data-tool='pencil'],\n.viewport[data-tool='connector'] {\n touch-action: none;\n}\n\n/* Selection owns canvas drags. Surrounding chrome retains native scrolling. */\n.viewport[data-tool='pointer'] {\n touch-action: none;\n}\n/* Connector tool: the shape under the pointer is the glue target (Visio's green glue box). */\n.viewport .paper [data-connect-target='true'] > path[data-geometry] {\n /* Drawing units (inches), like the canvas focus stroke; wins over a focused shape's dashes. */\n stroke: var(--_vv-accent) !important;\n stroke-width: 0.05 !important;\n stroke-opacity: 1 !important;\n stroke-dasharray: none !important;\n}\npath.draw-preview {\n fill: none;\n}\n.draw-preview {\n fill: var(--_vv-accent-soft);\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 4 3;\n pointer-events: none;\n}\n.viewport[data-grid='true'] .paper {\n --_vv-grid-minor: rgb(0 0 0 / 7%);\n --_vv-grid-major: rgb(0 0 0 / 16%);\n background-image:\n linear-gradient(to right, var(--_vv-grid-major) 1px, transparent 1px),\n linear-gradient(to top, var(--_vv-grid-major) 1px, transparent 1px),\n linear-gradient(to right, var(--_vv-grid-minor) 1px, transparent 1px),\n linear-gradient(to top, var(--_vv-grid-minor) 1px, transparent 1px);\n /* The page's grid (Ruler & Grid): a line every step, a stronger one every fourth step. */\n --_vv-grid-step-x: var(--_vv-grid-x, calc(var(--vv-inch, 96px) / 4));\n --_vv-grid-step-y: var(--_vv-grid-y, calc(var(--vv-inch, 96px) / 4));\n background-size:\n calc(var(--_vv-grid-step-x) * 4) calc(var(--_vv-grid-step-y) * 4),\n calc(var(--_vv-grid-step-x) * 4) calc(var(--_vv-grid-step-y) * 4),\n var(--_vv-grid-step-x) var(--_vv-grid-step-y),\n var(--_vv-grid-step-x) var(--_vv-grid-step-y);\n background-position: left var(--_vv-grid-origin-x, 0px) bottom var(--_vv-grid-origin-y, 0px);\n}\n:host(:fullscreen) {\n width: 100vw;\n height: 100vh;\n}\n\n@media (max-width: 760px) {\n .ribbon-row {\n flex: 1;\n min-width: 0;\n }\n office-ui-status-bar.status {\n gap: 4px;\n min-height: 48px;\n }\n office-ui-status-item:not([data-page-status]) {\n display: none;\n }\n .zoom-controls {\n flex: 1;\n min-width: 0;\n --office-zoom-slider-width: 0;\n }\n}\n\n/* Visio's Tell me box sits right after the tabs. */\n.tell-me {\n flex: 0 1 280px;\n min-width: 140px;\n margin: 0 8px;\n --office-target-size: 28px;\n}\n.presentation-mode {\n --office-target-size: 24px;\n}\n@media (max-width: 760px) {\n .tell-me {\n display: none;\n }\n}\n\n/*\n * Quick Styles, Themes and Variants: Visio's row of tiles with a More button. The viewer's width\n * sets data-inline-tiles (ribbon-inline-galleries.ts); the tiles beyond it stay in the gallery.\n */\n[data-inline-gallery][mode='inline'] {\n align-self: center;\n}\n[data-inline-tiles='1'] .strip .tile:nth-child(n + 2),\n[data-inline-tiles='2'] .strip .tile:nth-child(n + 3),\n[data-inline-tiles='3'] .strip .tile:nth-child(n + 4),\n[data-inline-tiles='4'] .strip .tile:nth-child(n + 5),\n[data-inline-tiles='5'] .strip .tile:nth-child(n + 6),\n[data-inline-tiles='6'] .strip .tile:nth-child(n + 7) {\n display: none;\n}\n";
|
|
@@ -3693,7 +3946,7 @@ var page_setup_default = ".page-setup-dialog .page-setup-tabs {\n display: flex;
|
|
|
3693
3946
|
var review_default = "/* Review and Process: the Comments pane, the Issues window, Shape Reports and canvas markers. */\n.review-pane {\n display: flex;\n flex: 0 0 300px;\n flex-direction: column;\n width: 300px;\n min-width: 0;\n overflow: auto;\n border-left: 1px solid var(--_vv-border);\n background: var(--_vv-secondary);\n}\n.review-pane[hidden] {\n display: none;\n}\n.comments-pane-host office-ui-comments-pane {\n flex: 1;\n min-height: 0;\n}\n.issues-pane .pane-close {\n min-height: 24px;\n padding: 0 6px;\n background: transparent;\n border: 0;\n}\n.issues-summary,\n.issues-note {\n margin: 8px 10px;\n}\n.issues-note {\n color: var(--_vv-muted);\n font-size: 11px;\n}\n.issues-list {\n display: grid;\n gap: 4px;\n margin: 0;\n padding: 0 10px;\n list-style: none;\n}\n.issues-list button {\n display: grid;\n width: 100%;\n gap: 2px;\n text-align: start;\n}\n.issue-where {\n color: var(--_vv-muted);\n font-size: 11px;\n}\n.issues-ignored {\n display: flex;\n align-items: center;\n gap: 6px;\n margin: 8px 10px 0;\n}\n.issues-ignored input {\n min-height: 0;\n}\n.paper [data-comment-marker] {\n cursor: pointer;\n}\n.paper [data-comment-marker] path {\n fill: var(--_vv-accent);\n stroke: white;\n stroke-width: 1;\n}\n.paper [data-comment-marker][data-resolved] path {\n fill: var(--_vv-muted);\n}\n.paper [data-comment-marker] text {\n fill: white;\n font:\n 600 10px 'Segoe UI',\n Arial,\n sans-serif;\n text-anchor: middle;\n dominant-baseline: middle;\n}\n.shape-report-dialog label,\n.link-existing-dialog label {\n display: grid;\n gap: 4px;\n min-width: min(360px, 80vw);\n margin: 0 0 12px;\n}\n.shape-report-dialog select,\n.link-existing-dialog select {\n padding: 6px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.shape-report-table {\n max-width: min(860px, 86vw);\n max-height: min(420px, 60vh);\n overflow: auto;\n border: 1px solid var(--_vv-border);\n}\n.shape-report-table table {\n border-collapse: collapse;\n font-size: 11px;\n}\n.shape-report-table th,\n.shape-report-table td {\n max-width: 240px;\n padding: 3px 6px;\n overflow: hidden;\n text-align: start;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-bottom: 1px solid var(--_vv-border);\n}\n.shape-report-table th {\n position: sticky;\n top: 0;\n background: var(--_vv-surface);\n}\n.link-existing-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n@media (max-width: 760px) {\n .review-pane {\n position: absolute;\n inset: 0 0 0 auto;\n z-index: 4;\n width: min(320px, 100%);\n box-shadow: -8px 0 24px #0002;\n }\n}\n";
|
|
3694
3947
|
|
|
3695
3948
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/data.css?raw
|
|
3696
|
-
var data_default = "/* Visio's External Data window (docked under the drawing) and the Data tab dialogs. */\n.external-data {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n display: flex;\n flex-direction: column;\n max-height: min(40%, 320px);\n min-height: 140px;\n background: var(--_vv-surface);\n color: var(--_vv-ink);\n border-top: 1px solid var(--_vv-border);\n box-shadow: 0 -2px 8px #0002;\n --office-background: var(--_vv-surface);\n --office-surface: var(--_vv-secondary);\n --office-foreground: var(--_vv-ink);\n}\n.external-data[hidden] {\n display: none;\n}\n/* A wide, short window: a compact title row, and only the grid scrolls. */\n.external-data::part(header) {\n padding: 4px 8px 4px 12px;\n border-bottom: 1px solid var(--_vv-border);\n}\n.external-data::part(body) {\n display: flex;\n flex-direction: column;\n padding: 0;\n overflow: hidden;\n}\n.external-data-bar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n border-bottom: 1px solid var(--_vv-border);\n}\n.external-data-bar select,\n.external-data-tools button {\n font: inherit;\n font-weight: 400;\n font-size: 12px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n padding: 3px 8px;\n}\n.external-data-tools {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n.external-data-tools button:disabled {\n opacity: 0.5;\n}\n.external-data-hint {\n margin: 4px 12px;\n font-size: 12px;\n color: var(--_vv-muted);\n}\n.external-data-grid {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n.external-data table {\n border-collapse: collapse;\n font-size: 12px;\n}\n.external-data th,\n.external-data td {\n padding: 3px 8px;\n border: 1px solid var(--_vv-border);\n text-align: left;\n white-space: nowrap;\n max-width: 240px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.external-data th {\n position: sticky;\n top: 0;\n background: var(--_vv-secondary);\n}\n.external-data tbody tr {\n cursor: grab;\n}\n.external-data tbody tr[aria-selected='true'] {\n background: var(--_vv-selection, #cfe3fa);\n}\n.external-data tbody tr[data-current] td:first-child {\n box-shadow: inset 3px 0 0 var(--_vv-accent);\n}\n.shape-data-dialog label,\n.data-import-dialog label,\n.data-graphics-dialog label,\n.data-link-dialog label {\n display: grid;\n gap: 4px;\n min-width: min(360px, 80vw);\n margin: 0 0 10px;\n}\n.shape-data-dialog label:has(input[type='checkbox']),\n.data-import-dialog label:has(input[type='checkbox']) {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.shape-data-dialog input:not([type='checkbox']),\n.shape-data-dialog select,\n.data-import-dialog input:not([type='checkbox']),\n.data-import-dialog select,\n.data-graphics-dialog input,\n.data-graphics-dialog select,\n.data-link-dialog select {\n box-sizing: border-box;\n width: 100%;\n padding: 6px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.shape-data-dialog [role='alert'],\n.data-import-dialog [role='alert'],\n.data-graphics-dialog [role='alert'],\n.data-link-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n.shape-inspector [data-define-shape-data] {\n margin-top: 8px;\n}\n";
|
|
3949
|
+
var data_default = "/* Visio's External Data window (docked under the drawing) and the Data tab dialogs. */\n.external-data {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n display: flex;\n flex-direction: column;\n max-height: min(40%, 320px);\n min-height: 140px;\n background: var(--_vv-surface);\n color: var(--_vv-ink);\n border-top: 1px solid var(--_vv-border);\n box-shadow: 0 -2px 8px #0002;\n --office-background: var(--_vv-surface);\n --office-surface: var(--_vv-secondary);\n --office-foreground: var(--_vv-ink);\n}\n.external-data[hidden] {\n display: none;\n}\n/* A wide, short window: a compact title row, and only the grid scrolls. */\n.external-data::part(header) {\n padding: 4px 8px 4px 12px;\n border-bottom: 1px solid var(--_vv-border);\n}\n.external-data::part(body) {\n display: flex;\n flex-direction: column;\n padding: 0;\n overflow: hidden;\n}\n.external-data-bar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n border-bottom: 1px solid var(--_vv-border);\n}\n.external-data-bar select,\n.external-data-tools button {\n font: inherit;\n font-weight: 400;\n font-size: 12px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n padding: 3px 8px;\n}\n.external-data-tools {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n.external-data-tools button:disabled {\n opacity: 0.5;\n}\n.external-data-hint {\n margin: 4px 12px;\n font-size: 12px;\n color: var(--_vv-muted);\n}\n.external-data-grid {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n.external-data table {\n border-collapse: collapse;\n font-size: 12px;\n}\n.external-data th,\n.external-data td {\n padding: 3px 8px;\n border: 1px solid var(--_vv-border);\n text-align: left;\n white-space: nowrap;\n max-width: 240px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.external-data th {\n position: sticky;\n top: 0;\n background: var(--_vv-secondary);\n}\n.external-data tbody tr {\n cursor: grab;\n}\n.external-data tbody tr[aria-selected='true'] {\n background: var(--_vv-selection, #cfe3fa);\n}\n.external-data tbody tr[data-current] td:first-child {\n box-shadow: inset 3px 0 0 var(--_vv-accent);\n}\n.shape-data-dialog label,\n.data-import-dialog label,\n.data-graphics-dialog label,\n.data-graphic-items-dialog label,\n.data-link-dialog label {\n display: grid;\n gap: 4px;\n min-width: min(360px, 80vw);\n margin: 0 0 10px;\n}\n.shape-data-dialog label:has(input[type='checkbox']),\n.data-import-dialog label:has(input[type='checkbox']) {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.shape-data-dialog input:not([type='checkbox']),\n.shape-data-dialog select,\n.data-import-dialog input:not([type='checkbox']),\n.data-import-dialog select,\n.data-graphics-dialog input,\n.data-graphics-dialog select,\n.data-graphic-items-dialog select,\n.data-link-dialog select {\n box-sizing: border-box;\n width: 100%;\n padding: 6px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.shape-data-dialog [role='alert'],\n.data-import-dialog [role='alert'],\n.data-graphics-dialog [role='alert'],\n.data-graphic-items-dialog [role='alert'],\n.data-link-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n.shape-inspector [data-define-shape-data] {\n margin-top: 8px;\n}\n/* Data Graphic Fields pane: docked at the right edge of the drawing area. */\n.graphic-fields {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n display: flex;\n flex-direction: column;\n width: min(280px, 80%);\n background: var(--_vv-surface);\n color: var(--_vv-ink);\n border-left: 1px solid var(--_vv-border);\n box-shadow: -2px 0 8px #0002;\n --office-background: var(--_vv-surface);\n --office-surface: var(--_vv-secondary);\n --office-foreground: var(--_vv-ink);\n}\n.graphic-fields[hidden] {\n display: none;\n}\n.graphic-fields-hint {\n margin: 8px 12px;\n font-size: 12px;\n color: var(--_vv-muted);\n}\n.graphic-fields-list {\n display: grid;\n gap: 2px;\n padding: 0 12px 12px;\n overflow: auto;\n}\n.graphic-fields-list label {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: center;\n column-gap: 8px;\n padding: 4px 0;\n}\n.graphic-fields-list small {\n grid-column: 2;\n color: var(--_vv-muted);\n}\n";
|
|
3697
3950
|
|
|
3698
3951
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/layout.css?raw
|
|
3699
3952
|
var layout_default = "/* Layout, Assign to Layer, Select by Type, Paste Special and Drawing Explorer dialogs. */\n.viewer-dialog-body {\n display: grid;\n gap: 12px;\n min-width: min(360px, 80vw);\n max-height: min(60vh, 520px);\n overflow: auto;\n}\n.viewer-dialog-body > label {\n display: grid;\n gap: 4px;\n}\n.viewer-dialog-body input[type='text'],\n.viewer-dialog-body input[type='number'],\n.viewer-dialog-body select {\n box-sizing: border-box;\n width: 100%;\n padding: 6px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.viewer-dialog-body fieldset {\n display: grid;\n gap: 4px;\n margin: 0;\n padding: 8px 10px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.viewer-dialog-body fieldset[hidden] {\n display: none;\n}\n.viewer-dialog-choice {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n/* Ruler & Grid and Snap & Glue: a label column, then one column per axis or option list. */\n.ruler-grid-rows {\n display: grid;\n grid-template-columns: minmax(120px, auto) 1fr 1fr;\n gap: 6px 10px;\n align-items: center;\n}\n.ruler-grid-axis {\n font-weight: 600;\n}\n.snap-glue-columns {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 12px;\n align-items: start;\n}\n.viewer-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n.viewer-dialog [role='alert']:empty {\n display: none;\n}\n.explorer-tree ul {\n margin: 2px 0 6px;\n padding-left: 18px;\n list-style: none;\n}\n.explorer-tree summary {\n cursor: pointer;\n font-weight: 600;\n}\n.explorer-tree button {\n padding: 2px 4px;\n color: inherit;\n text-align: left;\n background: none;\n border: 1px solid transparent;\n border-radius: 2px;\n cursor: pointer;\n}\n.explorer-tree button:hover,\n.explorer-tree button:focus-visible {\n border-color: var(--_vv-accent);\n}\n.explorer-tree button[aria-current='true'] {\n font-weight: 600;\n}\n\n/* View > Guides: dashed page guides with a wide transparent hit line for dragging. */\n.guide .guide-line {\n stroke: var(--_vv-accent);\n stroke-width: 1px;\n stroke-dasharray: 4 3;\n pointer-events: none;\n}\n.guide .guide-hit {\n stroke: transparent;\n stroke-width: 9px;\n pointer-events: stroke;\n}\n.guide[data-orientation='vertical'] .guide-hit {\n cursor: ew-resize;\n}\n.guide[data-orientation='horizontal'] .guide-hit {\n cursor: ns-resize;\n}\n.guide[aria-pressed='true'] .guide-line,\n.guide.dragging .guide-line {\n stroke-width: 2px;\n stroke-dasharray: none;\n}\n.canvas-area[data-ruler='true'] > .ruler {\n touch-action: none;\n}\n.backstage-subheading {\n margin: 20px 0 8px;\n font-size: 1rem;\n font-weight: 600;\n}\n";
|
|
@@ -4218,12 +4471,6 @@ var ViewerInlineText = class {
|
|
|
4218
4471
|
style2.top = `${(rect ? rect.top - box2.top : 16) + this.viewport.scrollTop - shift}px`;
|
|
4219
4472
|
}
|
|
4220
4473
|
};
|
|
4221
|
-
function pagePoint(svg2, page3, event, options2 = {}) {
|
|
4222
|
-
const matrix2 = svg2.getScreenCTM?.();
|
|
4223
|
-
if (!matrix2) return void 0;
|
|
4224
|
-
const point = new DOMPoint(event.clientX, event.clientY).matrixTransform(matrix2.inverse());
|
|
4225
|
-
return visioDrawingPoint(page3, point, options2);
|
|
4226
|
-
}
|
|
4227
4474
|
function handleGestureIsCurrent(drag, state, active) {
|
|
4228
4475
|
return state.document === drag.document && state.document?.pages[state.pageIndex] === drag.page && state.selectedShape?.id === drag.shapeId && visioSelectionIsOnPage(state.selectedShape, drag.page.id) && state.selectedShapes.length === 1 && drag.svg.isConnected && !state.loading && !state.edit.busy && active;
|
|
4229
4476
|
}
|
|
@@ -4289,6 +4536,204 @@ function wireHandleEvents(viewport, callbacks) {
|
|
|
4289
4536
|
};
|
|
4290
4537
|
}
|
|
4291
4538
|
|
|
4539
|
+
// src/visio/viewer-control-handles.ts
|
|
4540
|
+
var SVG = "http://www.w3.org/2000/svg";
|
|
4541
|
+
function localPoint(overlay, clientX, clientY) {
|
|
4542
|
+
const matrix2 = overlay.getScreenCTM?.();
|
|
4543
|
+
if (!matrix2 || !Number.isFinite(matrix2.a + matrix2.d)) return void 0;
|
|
4544
|
+
const point = new DOMPoint(clientX, clientY).matrixTransform(matrix2.inverse());
|
|
4545
|
+
return { x: point.x, y: point.y };
|
|
4546
|
+
}
|
|
4547
|
+
var ViewerControlHandles = class {
|
|
4548
|
+
constructor(viewport, controller, options2) {
|
|
4549
|
+
this.viewport = viewport;
|
|
4550
|
+
this.controller = controller;
|
|
4551
|
+
this.options = options2;
|
|
4552
|
+
}
|
|
4553
|
+
viewport;
|
|
4554
|
+
controller;
|
|
4555
|
+
options;
|
|
4556
|
+
#drag;
|
|
4557
|
+
#request = 0;
|
|
4558
|
+
#overlay;
|
|
4559
|
+
render(state) {
|
|
4560
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
4561
|
+
if (this.#drag) {
|
|
4562
|
+
if (handleGestureIsCurrent(this.#drag, state, this.options.active())) return;
|
|
4563
|
+
this.#cancel();
|
|
4564
|
+
}
|
|
4565
|
+
this.#overlay?.remove();
|
|
4566
|
+
this.#overlay = void 0;
|
|
4567
|
+
if (!page3 || !state.selectedShape || !visioSelectionIsOnPage(state.selectedShape, page3.id) || state.selectedShapes.length !== 1 || !canEditDiagram(state) || state.edit.busy || state.loading || !this.options.active())
|
|
4568
|
+
return;
|
|
4569
|
+
const shape = page3.shapes.find(
|
|
4570
|
+
(item) => item.id === state.selectedShape.id
|
|
4571
|
+
);
|
|
4572
|
+
if (!shape?.controls?.length) return;
|
|
4573
|
+
const group2 = Array.from(this.viewport.querySelectorAll("[data-shape-id]")).find(
|
|
4574
|
+
(item) => item.dataset.shapeId === shape.id && (item.dataset.pageId ?? page3.id) === page3.id && item.dataset.selected === "true"
|
|
4575
|
+
);
|
|
4576
|
+
const svg2 = group2?.ownerSVGElement;
|
|
4577
|
+
if (!group2 || !svg2) return;
|
|
4578
|
+
const overlay = this.viewport.ownerDocument.createElementNS(SVG, "g");
|
|
4579
|
+
overlay.dataset.controlOverlay = "";
|
|
4580
|
+
const rootMatrix = svg2.getCTM?.(), groupMatrix = group2.getCTM?.();
|
|
4581
|
+
if (rootMatrix && groupMatrix) {
|
|
4582
|
+
const matrix2 = rootMatrix.inverse().multiply(groupMatrix);
|
|
4583
|
+
overlay.setAttribute(
|
|
4584
|
+
"transform",
|
|
4585
|
+
`matrix(${matrix2.a} ${matrix2.b} ${matrix2.c} ${matrix2.d} ${matrix2.e} ${matrix2.f})`
|
|
4586
|
+
);
|
|
4587
|
+
}
|
|
4588
|
+
const screen = group2.getScreenCTM?.();
|
|
4589
|
+
const scale3 = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
|
|
4590
|
+
const half = 4 / scale3;
|
|
4591
|
+
for (const control of shape.controls) {
|
|
4592
|
+
const handle = this.viewport.ownerDocument.createElementNS(SVG, "rect");
|
|
4593
|
+
handle.dataset.controlHandle = control.row;
|
|
4594
|
+
handle.dataset.controlShapeId = shape.id;
|
|
4595
|
+
if (control.locked) handle.dataset.controlLocked = "";
|
|
4596
|
+
handle.setAttribute("x", String(control.x - half));
|
|
4597
|
+
handle.setAttribute("y", String(control.y - half));
|
|
4598
|
+
handle.setAttribute("width", String(2 * half));
|
|
4599
|
+
handle.setAttribute("height", String(2 * half));
|
|
4600
|
+
handle.setAttribute("vector-effect", "non-scaling-stroke");
|
|
4601
|
+
handle.setAttribute(
|
|
4602
|
+
"aria-label",
|
|
4603
|
+
control.locked ? `Control handle (cannot be moved): ${control.locked}` : `Control handle${control.prompt ? `: ${control.prompt}` : ""}`
|
|
4604
|
+
);
|
|
4605
|
+
const title2 = this.viewport.ownerDocument.createElementNS(SVG, "title");
|
|
4606
|
+
title2.textContent = control.locked ?? control.prompt ?? "Drag to change the shape";
|
|
4607
|
+
handle.append(title2);
|
|
4608
|
+
overlay.append(handle);
|
|
4609
|
+
}
|
|
4610
|
+
svg2.append(overlay);
|
|
4611
|
+
this.#overlay = overlay;
|
|
4612
|
+
}
|
|
4613
|
+
wire() {
|
|
4614
|
+
const dispose = wireHandleEvents(this.viewport, {
|
|
4615
|
+
pointer: () => this.#drag?.pointer,
|
|
4616
|
+
start: (event) => this.#start(event),
|
|
4617
|
+
move: (event) => this.#move(event),
|
|
4618
|
+
finish: (event) => this.#finish(event),
|
|
4619
|
+
cancel: () => this.#cancel()
|
|
4620
|
+
});
|
|
4621
|
+
return () => {
|
|
4622
|
+
++this.#request;
|
|
4623
|
+
dispose();
|
|
4624
|
+
this.#overlay?.remove();
|
|
4625
|
+
this.#overlay = void 0;
|
|
4626
|
+
};
|
|
4627
|
+
}
|
|
4628
|
+
#start(event) {
|
|
4629
|
+
const handle = event.target?.closest?.("[data-control-handle]");
|
|
4630
|
+
const state = this.controller.state, page3 = state.document?.pages[state.pageIndex];
|
|
4631
|
+
const svg2 = this.viewport.querySelector("svg.paper");
|
|
4632
|
+
const overlay = handle?.parentElement;
|
|
4633
|
+
const shape = page3?.shapes.find((item) => item.id === handle?.dataset.controlShapeId);
|
|
4634
|
+
const control = shape?.controls?.find((item) => item.row === handle?.dataset.controlHandle);
|
|
4635
|
+
if (!handle || !svg2 || !overlay || !page3 || !state.document || !control || !state.selectedShape || !visioSelectionIsOnPage(state.selectedShape, page3.id) || handle.dataset.controlShapeId !== state.selectedShape.id || state.selectedShapes.length !== 1 || this.#drag || event.button !== 0 || state.edit.busy || state.loading || !canEditDiagram(state) || !this.options.active())
|
|
4636
|
+
return;
|
|
4637
|
+
event.preventDefault();
|
|
4638
|
+
event.stopImmediatePropagation();
|
|
4639
|
+
if (control.locked) {
|
|
4640
|
+
this.options.announce(`This control handle cannot be moved. ${control.locked}`);
|
|
4641
|
+
return;
|
|
4642
|
+
}
|
|
4643
|
+
this.#drag = {
|
|
4644
|
+
pointer: event.pointerId,
|
|
4645
|
+
svg: svg2,
|
|
4646
|
+
page: page3,
|
|
4647
|
+
document: state.document,
|
|
4648
|
+
shapeId: state.selectedShape.id,
|
|
4649
|
+
control,
|
|
4650
|
+
handle,
|
|
4651
|
+
overlay,
|
|
4652
|
+
startX: event.clientX,
|
|
4653
|
+
startY: event.clientY,
|
|
4654
|
+
x: control.x,
|
|
4655
|
+
y: control.y
|
|
4656
|
+
};
|
|
4657
|
+
this.viewport.setPointerCapture?.(event.pointerId);
|
|
4658
|
+
if (control.prompt) this.options.announce(control.prompt);
|
|
4659
|
+
}
|
|
4660
|
+
#move(event) {
|
|
4661
|
+
const drag = this.#drag;
|
|
4662
|
+
if (!drag || event.pointerId !== drag.pointer) return;
|
|
4663
|
+
if (!handleGestureIsCurrent(drag, this.controller.state, this.options.active())) {
|
|
4664
|
+
this.#cancel();
|
|
4665
|
+
return;
|
|
4666
|
+
}
|
|
4667
|
+
const point = localPoint(drag.overlay, event.clientX, event.clientY);
|
|
4668
|
+
if (point) {
|
|
4669
|
+
if (drag.control.drag.x) drag.x = point.x;
|
|
4670
|
+
if (drag.control.drag.y) drag.y = point.y;
|
|
4671
|
+
const half = drag.handle.width.baseVal.value / 2;
|
|
4672
|
+
drag.handle.setAttribute("x", String(drag.x - half));
|
|
4673
|
+
drag.handle.setAttribute("y", String(drag.y - half));
|
|
4674
|
+
}
|
|
4675
|
+
event.preventDefault();
|
|
4676
|
+
event.stopImmediatePropagation();
|
|
4677
|
+
}
|
|
4678
|
+
#cancel() {
|
|
4679
|
+
this.#release()();
|
|
4680
|
+
}
|
|
4681
|
+
/** Ends the gesture and returns the reset of the handle, which a finished drag keeps until its edit settles. */
|
|
4682
|
+
#release() {
|
|
4683
|
+
const drag = this.#drag;
|
|
4684
|
+
this.#drag = void 0;
|
|
4685
|
+
if (drag && this.viewport.hasPointerCapture?.(drag.pointer))
|
|
4686
|
+
this.viewport.releasePointerCapture(drag.pointer);
|
|
4687
|
+
return () => {
|
|
4688
|
+
if (!drag) return;
|
|
4689
|
+
const half = drag.handle.width.baseVal.value / 2;
|
|
4690
|
+
drag.handle.setAttribute("x", String(drag.control.x - half));
|
|
4691
|
+
drag.handle.setAttribute("y", String(drag.control.y - half));
|
|
4692
|
+
};
|
|
4693
|
+
}
|
|
4694
|
+
async #finish(event) {
|
|
4695
|
+
const drag = this.#drag;
|
|
4696
|
+
if (!drag || event.pointerId !== drag.pointer) return;
|
|
4697
|
+
if (!handleGestureIsCurrent(drag, this.controller.state, this.options.active())) {
|
|
4698
|
+
this.#cancel();
|
|
4699
|
+
return;
|
|
4700
|
+
}
|
|
4701
|
+
event.preventDefault();
|
|
4702
|
+
event.stopImmediatePropagation();
|
|
4703
|
+
const point = localPoint(drag.overlay, event.clientX, event.clientY);
|
|
4704
|
+
const settle2 = this.#release();
|
|
4705
|
+
if (!point || Math.hypot(event.clientX - drag.startX, event.clientY - drag.startY) < 0.5 || this.controller.state.document !== drag.document) {
|
|
4706
|
+
settle2();
|
|
4707
|
+
return;
|
|
4708
|
+
}
|
|
4709
|
+
const request = ++this.#request;
|
|
4710
|
+
try {
|
|
4711
|
+
await this.controller.applyEdits([
|
|
4712
|
+
{
|
|
4713
|
+
type: "set-control",
|
|
4714
|
+
pageId: drag.page.id,
|
|
4715
|
+
shapeId: drag.shapeId,
|
|
4716
|
+
row: drag.control.row,
|
|
4717
|
+
...drag.control.drag.x ? { x: point.x } : {},
|
|
4718
|
+
...drag.control.drag.y ? { y: point.y } : {}
|
|
4719
|
+
}
|
|
4720
|
+
]);
|
|
4721
|
+
if (request === this.#request) this.options.announce("Control handle moved.");
|
|
4722
|
+
} catch (error) {
|
|
4723
|
+
if (request === this.#request && !isEditCancellation(error))
|
|
4724
|
+
this.options.announce(editErrorMessage(error));
|
|
4725
|
+
} finally {
|
|
4726
|
+
settle2();
|
|
4727
|
+
}
|
|
4728
|
+
}
|
|
4729
|
+
};
|
|
4730
|
+
function pagePoint(svg2, page3, event, options2 = {}) {
|
|
4731
|
+
const matrix2 = svg2.getScreenCTM?.();
|
|
4732
|
+
if (!matrix2) return void 0;
|
|
4733
|
+
const point = new DOMPoint(event.clientX, event.clientY).matrixTransform(matrix2.inverse());
|
|
4734
|
+
return visioDrawingPoint(page3, point, options2);
|
|
4735
|
+
}
|
|
4736
|
+
|
|
4292
4737
|
// src/visio/viewer-drawing-gesture.ts
|
|
4293
4738
|
var MAX_SAMPLES = 1e4;
|
|
4294
4739
|
var ViewerDrawingGesture = class {
|
|
@@ -4487,7 +4932,7 @@ var ShapeDrawTool = class {
|
|
|
4487
4932
|
}
|
|
4488
4933
|
};
|
|
4489
4934
|
var TARGET = "connectTarget";
|
|
4490
|
-
var
|
|
4935
|
+
var SVG2 = "http://www.w3.org/2000/svg";
|
|
4491
4936
|
var POINT_SNAP_PX = 8;
|
|
4492
4937
|
function connectorGlueTarget(page3, element) {
|
|
4493
4938
|
let group2 = element?.closest?.("[data-shape-id]");
|
|
@@ -4503,11 +4948,11 @@ function connectorGlueAt(viewport, page3, event, zoom, glue = VISIO_GLUE.connect
|
|
|
4503
4948
|
const svg2 = viewport.querySelector("svg.paper");
|
|
4504
4949
|
const point = svg2 ? pagePoint(svg2, page3, event, { snap: false, bounded: false }) : void 0;
|
|
4505
4950
|
if (point && svg2 && glue & VISIO_GLUE.connectionPoints) {
|
|
4506
|
-
const
|
|
4951
|
+
const scale3 = svg2.getScreenCTM?.()?.a || 96 * zoom;
|
|
4507
4952
|
const hit = visioNearestConnectionPoint(
|
|
4508
4953
|
page3,
|
|
4509
4954
|
{ x: point.x, y: page3.height - point.y },
|
|
4510
|
-
POINT_SNAP_PX /
|
|
4955
|
+
POINT_SNAP_PX / scale3
|
|
4511
4956
|
);
|
|
4512
4957
|
if (hit) return { shapeId: hit.shapeId, point: hit.index, x: hit.x, y: page3.height - hit.y };
|
|
4513
4958
|
}
|
|
@@ -4649,7 +5094,7 @@ var ViewerConnectorTool = class {
|
|
|
4649
5094
|
this.#marker = void 0;
|
|
4650
5095
|
const svg2 = this.viewport.querySelector("svg.paper");
|
|
4651
5096
|
if (hit?.point === void 0 || hit.x === void 0 || hit.y === void 0 || !svg2) return;
|
|
4652
|
-
const marker = this.viewport.ownerDocument.createElementNS(
|
|
5097
|
+
const marker = this.viewport.ownerDocument.createElementNS(SVG2, "circle");
|
|
4653
5098
|
marker.classList.add("connect-point-target");
|
|
4654
5099
|
marker.setAttribute("cx", String(hit.x));
|
|
4655
5100
|
marker.setAttribute("cy", String(hit.y));
|
|
@@ -4664,7 +5109,7 @@ var ViewerConnectorTool = class {
|
|
|
4664
5109
|
};
|
|
4665
5110
|
|
|
4666
5111
|
// src/visio/viewer-line-endpoints.ts
|
|
4667
|
-
var
|
|
5112
|
+
var SVG3 = "http://www.w3.org/2000/svg";
|
|
4668
5113
|
var pointOptions = { snap: false, bounded: false };
|
|
4669
5114
|
function lineHandles(shape) {
|
|
4670
5115
|
if (visioStraightLineHandles(shape))
|
|
@@ -4704,7 +5149,7 @@ var ViewerLineEndpoints = class {
|
|
|
4704
5149
|
if (!group2) return;
|
|
4705
5150
|
const svg2 = group2.ownerSVGElement;
|
|
4706
5151
|
if (!svg2) return;
|
|
4707
|
-
const overlay = this.viewport.ownerDocument.createElementNS(
|
|
5152
|
+
const overlay = this.viewport.ownerDocument.createElementNS(SVG3, "g");
|
|
4708
5153
|
overlay.dataset.lineEndpointOverlay = "";
|
|
4709
5154
|
const rootMatrix = svg2.getCTM?.(), groupMatrix = group2.getCTM?.();
|
|
4710
5155
|
if (rootMatrix && groupMatrix) {
|
|
@@ -4717,7 +5162,7 @@ var ViewerLineEndpoints = class {
|
|
|
4717
5162
|
const screen = group2.getScreenCTM?.();
|
|
4718
5163
|
const screenScale = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
|
|
4719
5164
|
for (const endpoint of ["begin", "end"]) {
|
|
4720
|
-
const handle = this.viewport.ownerDocument.createElementNS(
|
|
5165
|
+
const handle = this.viewport.ownerDocument.createElementNS(SVG3, "circle");
|
|
4721
5166
|
handle.dataset.lineEndpoint = endpoint;
|
|
4722
5167
|
handle.dataset.lineShapeId = shape.id;
|
|
4723
5168
|
handle.setAttribute("cx", String(ends[endpoint].x));
|
|
@@ -4765,7 +5210,7 @@ var ViewerLineEndpoints = class {
|
|
|
4765
5210
|
if (!fixed || !start) return;
|
|
4766
5211
|
event.preventDefault();
|
|
4767
5212
|
event.stopImmediatePropagation();
|
|
4768
|
-
const preview5 = this.viewport.ownerDocument.createElementNS(
|
|
5213
|
+
const preview5 = this.viewport.ownerDocument.createElementNS(SVG3, "line");
|
|
4769
5214
|
preview5.classList.add("endpoint-preview");
|
|
4770
5215
|
preview5.setAttribute("vector-effect", "non-scaling-stroke");
|
|
4771
5216
|
for (const [name, value] of Object.entries({
|
|
@@ -5221,7 +5666,7 @@ function nearbyShape(viewport, svg2, event, selected) {
|
|
|
5221
5666
|
for (const probe of hitProbes(hitTolerance(event.pointerType))) {
|
|
5222
5667
|
const hits = root.elementsFromPoint(event.clientX + probe.x, event.clientY + probe.y);
|
|
5223
5668
|
for (const element of hits) {
|
|
5224
|
-
if (!svg2.contains(element) || element.closest("[data-resize-overlay], .rotation-overlay"))
|
|
5669
|
+
if (!svg2.contains(element) || element.closest("[data-resize-overlay], [data-control-overlay], .rotation-overlay"))
|
|
5225
5670
|
continue;
|
|
5226
5671
|
const shape = pointerShapeTarget(element, selected, true);
|
|
5227
5672
|
if (shape) return shape;
|
|
@@ -5295,7 +5740,7 @@ var ViewerPointerGestures = class {
|
|
|
5295
5740
|
if (this.#drag || event.button !== 0 || !this.options.active()) return;
|
|
5296
5741
|
const node = event.target;
|
|
5297
5742
|
if (node.closest?.(
|
|
5298
|
-
"[data-line-endpoint], [data-rotation-handle], [data-resize-handle], .rotation-overlay, [data-guide-id]"
|
|
5743
|
+
"[data-line-endpoint], [data-control-handle], [data-rotation-handle], [data-resize-handle], .rotation-overlay, [data-guide-id]"
|
|
5299
5744
|
))
|
|
5300
5745
|
return;
|
|
5301
5746
|
const state = this.controller.state, page3 = state.document?.pages[state.pageIndex];
|
|
@@ -5366,7 +5811,7 @@ var ViewerPointerGestures = class {
|
|
|
5366
5811
|
);
|
|
5367
5812
|
drag.showOverlays = hideGestureOverlays(
|
|
5368
5813
|
this.viewport,
|
|
5369
|
-
"[data-resize-overlay], .rotation-overlay"
|
|
5814
|
+
"[data-resize-overlay], [data-control-overlay], .rotation-overlay"
|
|
5370
5815
|
);
|
|
5371
5816
|
} else {
|
|
5372
5817
|
drag.marquee = createMarqueeRect(drag.svg);
|
|
@@ -5648,7 +6093,7 @@ var ViewerSwimlanes = class {
|
|
|
5648
6093
|
);
|
|
5649
6094
|
}
|
|
5650
6095
|
};
|
|
5651
|
-
function createResizeFrame(svg2, page3, frame,
|
|
6096
|
+
function createResizeFrame(svg2, page3, frame, scale3, shapeId) {
|
|
5652
6097
|
const create = (name) => svg2.ownerDocument.createElementNS("http://www.w3.org/2000/svg", name);
|
|
5653
6098
|
const element = create("g");
|
|
5654
6099
|
element.dataset.resizeOverlay = "";
|
|
@@ -5660,7 +6105,7 @@ function createResizeFrame(svg2, page3, frame, scale2, shapeId) {
|
|
|
5660
6105
|
const handle = create("circle");
|
|
5661
6106
|
handle.dataset.resizeHandle = location.id;
|
|
5662
6107
|
handle.dataset.resizeShape = shapeId;
|
|
5663
|
-
handle.setAttribute("r", String(5 /
|
|
6108
|
+
handle.setAttribute("r", String(5 / scale3));
|
|
5664
6109
|
handle.setAttribute("vector-effect", "non-scaling-stroke");
|
|
5665
6110
|
handle.setAttribute("aria-label", `Drag ${location.id} resize handle`);
|
|
5666
6111
|
element.append(handle);
|
|
@@ -5736,9 +6181,9 @@ var ViewerResizeHandles = class {
|
|
|
5736
6181
|
const group2 = selected[0];
|
|
5737
6182
|
const svg2 = group2?.ownerSVGElement, screen = svg2?.getScreenCTM?.();
|
|
5738
6183
|
if (!svg2 || selected.some((group3) => group3?.ownerSVGElement !== svg2)) return;
|
|
5739
|
-
const
|
|
5740
|
-
if (!(
|
|
5741
|
-
this.#frame = createResizeFrame(svg2, page3, frame,
|
|
6184
|
+
const scale3 = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
|
|
6185
|
+
if (!(scale3 > 0 && Number.isFinite(scale3))) return;
|
|
6186
|
+
this.#frame = createResizeFrame(svg2, page3, frame, scale3, selection2.id);
|
|
5742
6187
|
}
|
|
5743
6188
|
wire() {
|
|
5744
6189
|
const dispose = wireHandleEvents(this.viewport, {
|
|
@@ -5909,7 +6354,7 @@ function createRotationPreview(model, page3, shape, source) {
|
|
|
5909
6354
|
}
|
|
5910
6355
|
|
|
5911
6356
|
// src/visio/viewer-rotation-handle.ts
|
|
5912
|
-
var
|
|
6357
|
+
var SVG4 = "http://www.w3.org/2000/svg";
|
|
5913
6358
|
var pointOptions4 = { snap: false, bounded: false };
|
|
5914
6359
|
var radians = (degrees, snap) => -(snap ? snapAngle(degrees) : degrees) * Math.PI / 180;
|
|
5915
6360
|
var ViewerRotationHandle = class {
|
|
@@ -5954,7 +6399,7 @@ var ViewerRotationHandle = class {
|
|
|
5954
6399
|
if (!location) return;
|
|
5955
6400
|
const point = { x: location.x - bounds2.left, y: location.y - bounds2.top };
|
|
5956
6401
|
const pivot = new DOMPoint(center.x, center.y).matrixTransform(matrix2);
|
|
5957
|
-
const overlay = this.viewport.ownerDocument.createElementNS(
|
|
6402
|
+
const overlay = this.viewport.ownerDocument.createElementNS(SVG4, "svg");
|
|
5958
6403
|
overlay.classList.add("rotation-overlay");
|
|
5959
6404
|
overlay.style.left = `${this.viewport.scrollLeft}px`;
|
|
5960
6405
|
overlay.style.top = `${this.viewport.scrollTop}px`;
|
|
@@ -5962,7 +6407,7 @@ var ViewerRotationHandle = class {
|
|
|
5962
6407
|
overlay.setAttribute("height", String(bounds2.height));
|
|
5963
6408
|
overlay.setAttribute("viewBox", `0 0 ${bounds2.width} ${bounds2.height}`);
|
|
5964
6409
|
overlay.dataset.rotationOverlay = "";
|
|
5965
|
-
const stem = this.viewport.ownerDocument.createElementNS(
|
|
6410
|
+
const stem = this.viewport.ownerDocument.createElementNS(SVG4, "line");
|
|
5966
6411
|
for (const [name, value] of Object.entries({
|
|
5967
6412
|
x1: pivot.x - bounds2.left,
|
|
5968
6413
|
y1: pivot.y - bounds2.top,
|
|
@@ -5972,14 +6417,14 @@ var ViewerRotationHandle = class {
|
|
|
5972
6417
|
stem.setAttribute(name, String(value));
|
|
5973
6418
|
stem.classList.add("rotation-stem");
|
|
5974
6419
|
stem.setAttribute("vector-effect", "non-scaling-stroke");
|
|
5975
|
-
const handle = this.viewport.ownerDocument.createElementNS(
|
|
6420
|
+
const handle = this.viewport.ownerDocument.createElementNS(SVG4, "circle");
|
|
5976
6421
|
handle.dataset.rotationHandle = shape.id;
|
|
5977
6422
|
handle.setAttribute("cx", String(point.x));
|
|
5978
6423
|
handle.setAttribute("cy", String(point.y));
|
|
5979
6424
|
handle.setAttribute("r", "8");
|
|
5980
6425
|
handle.setAttribute("vector-effect", "non-scaling-stroke");
|
|
5981
6426
|
handle.setAttribute("aria-label", "Drag rotation handle");
|
|
5982
|
-
const glyph = this.viewport.ownerDocument.createElementNS(
|
|
6427
|
+
const glyph = this.viewport.ownerDocument.createElementNS(SVG4, "path");
|
|
5983
6428
|
glyph.classList.add("rotation-glyph");
|
|
5984
6429
|
glyph.setAttribute("transform", `translate(${point.x} ${point.y})`);
|
|
5985
6430
|
glyph.setAttribute("d", "M4.6 -2.9A5.4 5.4 0 1 0 5.4 .6M5.6 -5.9V-2.4H2.1");
|
|
@@ -6024,7 +6469,7 @@ var ViewerRotationHandle = class {
|
|
|
6024
6469
|
if (!start) return;
|
|
6025
6470
|
this.viewport.focus({ preventScroll: true });
|
|
6026
6471
|
const center = { x: shape.rotation.pinX, y: page3.height - shape.rotation.pinY };
|
|
6027
|
-
const preview5 = this.viewport.ownerDocument.createElementNS(
|
|
6472
|
+
const preview5 = this.viewport.ownerDocument.createElementNS(SVG4, "line");
|
|
6028
6473
|
preview5.classList.add("rotation-preview");
|
|
6029
6474
|
preview5.setAttribute("vector-effect", "non-scaling-stroke");
|
|
6030
6475
|
for (const [name, value] of Object.entries({
|
|
@@ -6339,6 +6784,7 @@ function createCanvasEditing(viewport, controller, options2) {
|
|
|
6339
6784
|
...options2.clearSnap ? { clearSnap: options2.clearSnap } : {}
|
|
6340
6785
|
});
|
|
6341
6786
|
const lineEndpoints = new ViewerLineEndpoints(viewport, controller, gesture);
|
|
6787
|
+
const controls = new ViewerControlHandles(viewport, controller, gesture);
|
|
6342
6788
|
const rotation = new ViewerRotationHandle(viewport, controller, gesture);
|
|
6343
6789
|
const resize = new ViewerResizeHandles(viewport, controller, {
|
|
6344
6790
|
...gesture,
|
|
@@ -6366,6 +6812,7 @@ function createCanvasEditing(viewport, controller, options2) {
|
|
|
6366
6812
|
return {
|
|
6367
6813
|
pointer,
|
|
6368
6814
|
lineEndpoints,
|
|
6815
|
+
controls,
|
|
6369
6816
|
rotation,
|
|
6370
6817
|
resize,
|
|
6371
6818
|
edit,
|
|
@@ -6381,6 +6828,7 @@ function createCanvasEditing(viewport, controller, options2) {
|
|
|
6381
6828
|
/** Redraw the selection handles after a state or tool change. */
|
|
6382
6829
|
renderHandles(state) {
|
|
6383
6830
|
lineEndpoints.render(state);
|
|
6831
|
+
controls.render(state);
|
|
6384
6832
|
rotation.render(state);
|
|
6385
6833
|
resize.render(state);
|
|
6386
6834
|
},
|
|
@@ -6396,6 +6844,7 @@ function createCanvasEditing(viewport, controller, options2) {
|
|
|
6396
6844
|
const stops = [
|
|
6397
6845
|
pointer.wire(),
|
|
6398
6846
|
lineEndpoints.wire(),
|
|
6847
|
+
controls.wire(),
|
|
6399
6848
|
rotation.wire(),
|
|
6400
6849
|
resize.wire(),
|
|
6401
6850
|
edit.wire(),
|
|
@@ -6410,32 +6859,328 @@ function createCanvasEditing(viewport, controller, options2) {
|
|
|
6410
6859
|
};
|
|
6411
6860
|
}
|
|
6412
6861
|
|
|
6413
|
-
// src/visio/canvas-services.ts
|
|
6414
|
-
var mounted = /* @__PURE__ */ new WeakMap();
|
|
6415
|
-
var watchers = /* @__PURE__ */ new WeakMap();
|
|
6416
|
-
var tell = (controller) => {
|
|
6417
|
-
for (const watcher of [...watchers.get(controller) ?? []]) watcher(mounted.get(controller));
|
|
6418
|
-
};
|
|
6419
|
-
function registerCanvasServices(controller, services) {
|
|
6420
|
-
mounted.set(controller, services);
|
|
6421
|
-
tell(controller);
|
|
6422
|
-
return () => {
|
|
6423
|
-
if (mounted.get(controller) !== services) return;
|
|
6424
|
-
mounted.delete(controller);
|
|
6425
|
-
tell(controller);
|
|
6426
|
-
};
|
|
6427
|
-
}
|
|
6428
|
-
function watchCanvasServices(controller, watcher) {
|
|
6429
|
-
const set = watchers.get(controller) ?? /* @__PURE__ */ new Set();
|
|
6430
|
-
watchers.set(controller, set);
|
|
6431
|
-
set.add(watcher);
|
|
6432
|
-
watcher(mounted.get(controller));
|
|
6433
|
-
return () => set.delete(watcher);
|
|
6862
|
+
// src/visio/canvas-services.ts
|
|
6863
|
+
var mounted = /* @__PURE__ */ new WeakMap();
|
|
6864
|
+
var watchers = /* @__PURE__ */ new WeakMap();
|
|
6865
|
+
var tell = (controller) => {
|
|
6866
|
+
for (const watcher of [...watchers.get(controller) ?? []]) watcher(mounted.get(controller));
|
|
6867
|
+
};
|
|
6868
|
+
function registerCanvasServices(controller, services) {
|
|
6869
|
+
mounted.set(controller, services);
|
|
6870
|
+
tell(controller);
|
|
6871
|
+
return () => {
|
|
6872
|
+
if (mounted.get(controller) !== services) return;
|
|
6873
|
+
mounted.delete(controller);
|
|
6874
|
+
tell(controller);
|
|
6875
|
+
};
|
|
6876
|
+
}
|
|
6877
|
+
function watchCanvasServices(controller, watcher) {
|
|
6878
|
+
const set = watchers.get(controller) ?? /* @__PURE__ */ new Set();
|
|
6879
|
+
watchers.set(controller, set);
|
|
6880
|
+
set.add(watcher);
|
|
6881
|
+
watcher(mounted.get(controller));
|
|
6882
|
+
return () => set.delete(watcher);
|
|
6883
|
+
}
|
|
6884
|
+
function canvasServices(controller) {
|
|
6885
|
+
return mounted.get(controller);
|
|
6886
|
+
}
|
|
6887
|
+
|
|
6888
|
+
// src/visio/viewer-insert-dialog.ts
|
|
6889
|
+
var InsertDialog = class {
|
|
6890
|
+
dialog;
|
|
6891
|
+
error;
|
|
6892
|
+
fields = /* @__PURE__ */ new Map();
|
|
6893
|
+
buttons = /* @__PURE__ */ new Map();
|
|
6894
|
+
constructor(root, className, heading, specs, buttons, press) {
|
|
6895
|
+
const doc = root.ownerDocument;
|
|
6896
|
+
this.dialog = doc.createElement("office-ui-dialog");
|
|
6897
|
+
this.dialog.className = className;
|
|
6898
|
+
this.dialog.setAttribute("heading", heading);
|
|
6899
|
+
for (const spec of specs) {
|
|
6900
|
+
const label = doc.createElement("label");
|
|
6901
|
+
label.textContent = spec.label;
|
|
6902
|
+
const field = doc.createElement(
|
|
6903
|
+
spec.choices ? "select" : spec.multiline ? "textarea" : "input"
|
|
6904
|
+
);
|
|
6905
|
+
field.name = spec.name;
|
|
6906
|
+
field.setAttribute("aria-label", spec.label);
|
|
6907
|
+
if (field instanceof HTMLTextAreaElement) {
|
|
6908
|
+
field.maxLength = spec.maxLength ?? 4096;
|
|
6909
|
+
field.rows = 5;
|
|
6910
|
+
}
|
|
6911
|
+
if (field instanceof HTMLInputElement) {
|
|
6912
|
+
field.type = spec.input ?? "text";
|
|
6913
|
+
if (spec.input === "number") field.step = "any";
|
|
6914
|
+
if (!spec.input) field.maxLength = spec.maxLength ?? 4096;
|
|
6915
|
+
if (spec.placeholder) field.placeholder = spec.placeholder;
|
|
6916
|
+
field.addEventListener("keydown", (event) => {
|
|
6917
|
+
if (event.key !== "Enter") return;
|
|
6918
|
+
event.preventDefault();
|
|
6919
|
+
press(buttons[0]);
|
|
6920
|
+
});
|
|
6921
|
+
}
|
|
6922
|
+
if (spec.input === "checkbox") label.prepend(field);
|
|
6923
|
+
else label.append(field);
|
|
6924
|
+
this.fields.set(spec.name, field);
|
|
6925
|
+
this.dialog.append(label);
|
|
6926
|
+
}
|
|
6927
|
+
this.error = doc.createElement("p");
|
|
6928
|
+
this.error.setAttribute("role", "alert");
|
|
6929
|
+
this.dialog.append(this.error);
|
|
6930
|
+
for (const name of buttons) {
|
|
6931
|
+
const button = doc.createElement("office-ui-button");
|
|
6932
|
+
button.slot = "footer";
|
|
6933
|
+
button.setAttribute("label", name);
|
|
6934
|
+
button.setAttribute("command", `${className}-${name.toLowerCase().replace(/\s+/g, "-")}`);
|
|
6935
|
+
button.addEventListener("office-command", () => {
|
|
6936
|
+
if (!button.disabled) press(name);
|
|
6937
|
+
});
|
|
6938
|
+
this.buttons.set(name, button);
|
|
6939
|
+
this.dialog.append(button);
|
|
6940
|
+
}
|
|
6941
|
+
root.append(this.dialog);
|
|
6942
|
+
}
|
|
6943
|
+
value(name) {
|
|
6944
|
+
return this.fields.get(name)?.value ?? "";
|
|
6945
|
+
}
|
|
6946
|
+
checked(name) {
|
|
6947
|
+
const field = this.fields.get(name);
|
|
6948
|
+
return field instanceof HTMLInputElement && field.checked;
|
|
6949
|
+
}
|
|
6950
|
+
/**
|
|
6951
|
+
* Replace a select's choices; the current value is kept as an extra choice when unknown.
|
|
6952
|
+
* `labels` names each value; `none: false` drops the leading empty choice.
|
|
6953
|
+
*/
|
|
6954
|
+
choices(name, values, current, options2 = {}) {
|
|
6955
|
+
const select = this.fields.get(name);
|
|
6956
|
+
if (!(select instanceof HTMLSelectElement)) return;
|
|
6957
|
+
const doc = select.ownerDocument;
|
|
6958
|
+
const list = options2.none === false ? [...values] : ["", ...values];
|
|
6959
|
+
if (!list.includes(current)) list.push(current);
|
|
6960
|
+
select.replaceChildren(
|
|
6961
|
+
...list.map((value) => {
|
|
6962
|
+
const option = doc.createElement("option");
|
|
6963
|
+
option.value = value;
|
|
6964
|
+
const index = values.indexOf(value);
|
|
6965
|
+
option.textContent = (index >= 0 ? options2.labels?.[index] : void 0) ?? (value || options2.noneLabel || "(none)");
|
|
6966
|
+
return option;
|
|
6967
|
+
})
|
|
6968
|
+
);
|
|
6969
|
+
select.value = current;
|
|
6970
|
+
}
|
|
6971
|
+
busy(value) {
|
|
6972
|
+
for (const field of this.fields.values()) field.disabled = value;
|
|
6973
|
+
for (const button of this.buttons.values()) button.disabled = value;
|
|
6974
|
+
}
|
|
6975
|
+
};
|
|
6976
|
+
|
|
6977
|
+
// src/visio/viewer-data-import.ts
|
|
6978
|
+
var DATA_IMPORT_MAX_BYTES = 16 * 1024 * 1024;
|
|
6979
|
+
var ACCEPT = ".csv,.txt,.xlsx,.xlsm,.xls";
|
|
6980
|
+
async function readWorkbook(file) {
|
|
6981
|
+
if (file.size > DATA_IMPORT_MAX_BYTES)
|
|
6982
|
+
throw new Error(`${file.name} is larger than the 16 MB import limit.`);
|
|
6983
|
+
const { loadWorkbook } = await import('ooxml-core/xlsx/load');
|
|
6984
|
+
return loadWorkbook(new Uint8Array(await file.arrayBuffer()), { fileName: file.name });
|
|
6985
|
+
}
|
|
6986
|
+
function readTable(workbook, options2) {
|
|
6987
|
+
const range = options2.range.trim() ? visioParseRange(options2.range) : void 0;
|
|
6988
|
+
if (options2.range.trim() && !range) throw new Error("Type a range such as A1:D20.");
|
|
6989
|
+
const table = visioDataTable(visioWorkbookGrid(workbook, options2.sheet, range), {
|
|
6990
|
+
header: options2.header
|
|
6991
|
+
});
|
|
6992
|
+
if (!table.rows.length) throw new Error("The selected data has no rows.");
|
|
6993
|
+
return table;
|
|
6994
|
+
}
|
|
6995
|
+
var DataFilePicker = class {
|
|
6996
|
+
input;
|
|
6997
|
+
#pending;
|
|
6998
|
+
constructor(root) {
|
|
6999
|
+
this.input = root.ownerDocument.createElement("input");
|
|
7000
|
+
this.input.type = "file";
|
|
7001
|
+
this.input.accept = ACCEPT;
|
|
7002
|
+
this.input.hidden = true;
|
|
7003
|
+
this.input.dataset.importData = "";
|
|
7004
|
+
this.input.addEventListener("change", () => {
|
|
7005
|
+
const file = this.input.files?.[0];
|
|
7006
|
+
this.input.value = "";
|
|
7007
|
+
this.#settle(file ? { file } : void 0);
|
|
7008
|
+
});
|
|
7009
|
+
this.input.addEventListener("cancel", () => this.#settle(void 0));
|
|
7010
|
+
root.append(this.input);
|
|
7011
|
+
}
|
|
7012
|
+
#settle(file) {
|
|
7013
|
+
const pending = this.#pending;
|
|
7014
|
+
this.#pending = void 0;
|
|
7015
|
+
pending?.(file);
|
|
7016
|
+
}
|
|
7017
|
+
async pick() {
|
|
7018
|
+
const picker = this.input.ownerDocument.defaultView?.showOpenFilePicker;
|
|
7019
|
+
if (typeof picker === "function") {
|
|
7020
|
+
try {
|
|
7021
|
+
const [handle] = await picker.call(this.input.ownerDocument.defaultView, {
|
|
7022
|
+
multiple: false,
|
|
7023
|
+
types: [
|
|
7024
|
+
{
|
|
7025
|
+
description: "Excel workbooks and CSV files",
|
|
7026
|
+
accept: {
|
|
7027
|
+
"text/csv": [".csv", ".txt"],
|
|
7028
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [
|
|
7029
|
+
".xlsx",
|
|
7030
|
+
".xlsm"
|
|
7031
|
+
],
|
|
7032
|
+
"application/vnd.ms-excel": [".xls"]
|
|
7033
|
+
}
|
|
7034
|
+
}
|
|
7035
|
+
]
|
|
7036
|
+
});
|
|
7037
|
+
return handle ? { file: await handle.getFile(), handle } : void 0;
|
|
7038
|
+
} catch (error) {
|
|
7039
|
+
if (error instanceof Error && error.name === "AbortError") return void 0;
|
|
7040
|
+
}
|
|
7041
|
+
}
|
|
7042
|
+
this.#settle(void 0);
|
|
7043
|
+
return new Promise((resolve) => {
|
|
7044
|
+
this.#pending = resolve;
|
|
7045
|
+
this.input.click();
|
|
7046
|
+
});
|
|
7047
|
+
}
|
|
7048
|
+
};
|
|
7049
|
+
function createImportDialog(root, press) {
|
|
7050
|
+
const dialog = new InsertDialog(
|
|
7051
|
+
root,
|
|
7052
|
+
"data-import-dialog",
|
|
7053
|
+
"Custom Import",
|
|
7054
|
+
[
|
|
7055
|
+
{ name: "name", label: "Recordset name", maxLength: 255 },
|
|
7056
|
+
{ name: "sheet", label: "Worksheet", choices: true },
|
|
7057
|
+
{ name: "range", label: "Range (optional)", placeholder: "A1:D20" },
|
|
7058
|
+
{ name: "key", label: "Unique identifier column (optional)", maxLength: 255 },
|
|
7059
|
+
{ name: "header", label: "First row of data contains column headings", input: "checkbox" }
|
|
7060
|
+
],
|
|
7061
|
+
["Import", "Cancel"],
|
|
7062
|
+
press
|
|
7063
|
+
);
|
|
7064
|
+
return dialog;
|
|
7065
|
+
}
|
|
7066
|
+
|
|
7067
|
+
// src/visio/viewer-org-chart.ts
|
|
7068
|
+
function orgChartSelection(state) {
|
|
7069
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
7070
|
+
const first = state.selectedShapes[0];
|
|
7071
|
+
if (!page3 || !first || !visioSelectionIsOnPage(first, page3.id)) return void 0;
|
|
7072
|
+
return visioOrgPosition(page3, first.id) ? { pageId: page3.id, id: first.id } : void 0;
|
|
6434
7073
|
}
|
|
6435
|
-
function
|
|
6436
|
-
|
|
7074
|
+
function orgChartDeleteSelection(state) {
|
|
7075
|
+
if (state.selectedShapes.length !== 1) return void 0;
|
|
7076
|
+
const selection2 = orgChartSelection(state);
|
|
7077
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
7078
|
+
if (!selection2 || !page3) return void 0;
|
|
7079
|
+
const edits = visioOrgDeletePosition(page3, selection2.id);
|
|
7080
|
+
return edits ? { edits, message: "Deleted the position and its connectors." } : void 0;
|
|
6437
7081
|
}
|
|
7082
|
+
var ViewerOrgChart = class {
|
|
7083
|
+
constructor(root, controller, edit) {
|
|
7084
|
+
this.root = root;
|
|
7085
|
+
this.controller = controller;
|
|
7086
|
+
this.edit = edit;
|
|
7087
|
+
}
|
|
7088
|
+
root;
|
|
7089
|
+
controller;
|
|
7090
|
+
edit;
|
|
7091
|
+
#picker;
|
|
7092
|
+
reason(state, command2) {
|
|
7093
|
+
if (!canEditDiagram(state)) return "Open a .vsdx file to edit the org chart.";
|
|
7094
|
+
if (state.loading || state.edit.busy) return "Wait for the current operation to finish.";
|
|
7095
|
+
if (command2 === "import") return void 0;
|
|
7096
|
+
const selection2 = orgChartSelection(state);
|
|
7097
|
+
if (!selection2) return "Select a position in an org chart.";
|
|
7098
|
+
const page3 = state.document.pages[state.pageIndex];
|
|
7099
|
+
if (command2 === "coworker" && !visioOrgHierarchy(page3).parentOf(selection2.id))
|
|
7100
|
+
return "The top position has no manager to add a coworker under.";
|
|
7101
|
+
return void 0;
|
|
7102
|
+
}
|
|
7103
|
+
/** Org Chart > Import: a CSV or Excel sheet with Name, Title and Reports To columns. */
|
|
7104
|
+
#import() {
|
|
7105
|
+
this.#picker ??= (() => {
|
|
7106
|
+
const picker2 = new DataFilePicker(this.root);
|
|
7107
|
+
delete picker2.input.dataset.importData;
|
|
7108
|
+
picker2.input.dataset.importOrg = "";
|
|
7109
|
+
return picker2;
|
|
7110
|
+
})();
|
|
7111
|
+
const picker = this.#picker;
|
|
7112
|
+
this.edit(async () => {
|
|
7113
|
+
const picked = await picker.pick();
|
|
7114
|
+
if (!picked) return;
|
|
7115
|
+
const table = readTable(await readWorkbook(picked.file), {
|
|
7116
|
+
sheet: 0,
|
|
7117
|
+
range: "",
|
|
7118
|
+
header: true
|
|
7119
|
+
});
|
|
7120
|
+
const people = visioOrgPeople(table);
|
|
7121
|
+
if (typeof people === "string") throw new Error(people);
|
|
7122
|
+
const state = this.controller.state;
|
|
7123
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
7124
|
+
if (!page3 || this.reason(state, "import") !== void 0) return;
|
|
7125
|
+
const plan = visioOrgImportEdits(page3, people);
|
|
7126
|
+
if (typeof plan === "string") throw new Error(plan);
|
|
7127
|
+
await this.controller.applyEdits(plan.edits);
|
|
7128
|
+
this.controller.selectShapes([{ id: plan.firstId, name: "", pageId: page3.id }]);
|
|
7129
|
+
}, "Imported the org chart.");
|
|
7130
|
+
}
|
|
7131
|
+
run(action2) {
|
|
7132
|
+
const state = this.controller.state;
|
|
7133
|
+
if (this.reason(state, action2.command) !== void 0) return;
|
|
7134
|
+
if (action2.command === "import") return this.#import();
|
|
7135
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
7136
|
+
const selection2 = orgChartSelection(state);
|
|
7137
|
+
if (!page3 || !selection2) return;
|
|
7138
|
+
const { id } = selection2;
|
|
7139
|
+
if (action2.command === "delete") {
|
|
7140
|
+
const plan = orgChartDeleteSelection(state);
|
|
7141
|
+
if (!plan?.edits) return;
|
|
7142
|
+
const edits = plan.edits;
|
|
7143
|
+
this.edit(async () => {
|
|
7144
|
+
await this.controller.applyEdits(edits);
|
|
7145
|
+
this.controller.selectShapes([]);
|
|
7146
|
+
}, plan.message);
|
|
7147
|
+
} else if (action2.command === "layout") {
|
|
7148
|
+
const edits = visioOrgReLayout(page3);
|
|
7149
|
+
if (!edits) return;
|
|
7150
|
+
this.edit(() => this.controller.applyEdits(edits), "Laid out the org chart.");
|
|
7151
|
+
} else {
|
|
7152
|
+
const kind = { subordinate: "subordinate", coworker: "peer", assistant: "assistant" }[action2.command];
|
|
7153
|
+
const plan = visioOrgAddPosition(page3, id, kind);
|
|
7154
|
+
if (!plan) return;
|
|
7155
|
+
this.edit(async () => {
|
|
7156
|
+
await this.controller.applyEdits(plan.edits);
|
|
7157
|
+
this.controller.selectShapes([{ id: plan.newId, name: "", pageId: page3.id }]);
|
|
7158
|
+
}, `Added a ${action2.command}.`);
|
|
7159
|
+
}
|
|
7160
|
+
}
|
|
7161
|
+
render(state) {
|
|
7162
|
+
for (const [id, command2] of [
|
|
7163
|
+
["org-subordinate", "subordinate"],
|
|
7164
|
+
["org-coworker", "coworker"],
|
|
7165
|
+
["org-assistant", "assistant"],
|
|
7166
|
+
["org-delete", "delete"],
|
|
7167
|
+
["org-layout", "layout"],
|
|
7168
|
+
["org-import", "import"],
|
|
7169
|
+
["org-import-data", "import"]
|
|
7170
|
+
]) {
|
|
7171
|
+
for (const item of this.root.querySelectorAll(`[command="${id}"]`)) {
|
|
7172
|
+
const reason = this.reason(state, command2);
|
|
7173
|
+
item.disabled = reason !== void 0;
|
|
7174
|
+
if (reason) item.title = reason;
|
|
7175
|
+
}
|
|
7176
|
+
}
|
|
7177
|
+
}
|
|
7178
|
+
};
|
|
7179
|
+
|
|
7180
|
+
// src/visio/viewer-delete.ts
|
|
6438
7181
|
function planDeleteSelection(state) {
|
|
7182
|
+
const position = orgChartDeleteSelection(state);
|
|
7183
|
+
if (position?.edits) return { edits: position.edits, message: position.message };
|
|
6439
7184
|
const shapes = state.selectedShapes;
|
|
6440
7185
|
const page3 = state.document?.pages[state.pageIndex];
|
|
6441
7186
|
if (!shapes.length || !page3 || shapes.some((shape) => shape.pageId && shape.pageId !== page3.id))
|
|
@@ -6585,8 +7330,34 @@ var deCommands = {
|
|
|
6585
7330
|
"Soft Edges": "Weiche Kanten",
|
|
6586
7331
|
"No Soft Edges": "Keine weichen Kanten",
|
|
6587
7332
|
"Soft Edges Options...": "Optionen f\xFCr weiche Kanten...",
|
|
6588
|
-
Bevel: "
|
|
7333
|
+
Bevel: "Abschr\xE4gung",
|
|
6589
7334
|
"3-D Rotation": "3D-Drehung",
|
|
7335
|
+
Circle: "Kreis",
|
|
7336
|
+
"Relaxed Inset": "Entspannter Einzug",
|
|
7337
|
+
Cross: "Kreuz",
|
|
7338
|
+
"Cool Slant": "K\xFChle Neigung",
|
|
7339
|
+
Angle: "Winkel",
|
|
7340
|
+
"Soft Round": "Weich abgerundet",
|
|
7341
|
+
Convex: "Konvex",
|
|
7342
|
+
Slope: "Schr\xE4ge",
|
|
7343
|
+
Divot: "Mulde",
|
|
7344
|
+
Riblet: "Rippchen",
|
|
7345
|
+
"Hard Edge": "Harte Kante",
|
|
7346
|
+
"Art Deco": "Art d\xE9co",
|
|
7347
|
+
"No Bevel": "Keine Abschr\xE4gung",
|
|
7348
|
+
"No Rotation": "Keine Drehung",
|
|
7349
|
+
"Isometric Left Down": "Isometrisch links unten",
|
|
7350
|
+
"Isometric Right Up": "Isometrisch rechts oben",
|
|
7351
|
+
"Isometric Top Up": "Isometrisch oben",
|
|
7352
|
+
"Off Axis Left": "Au\xDFeraxial links",
|
|
7353
|
+
"Off Axis Right": "Au\xDFeraxial rechts",
|
|
7354
|
+
"Perspective Left": "Perspektive links",
|
|
7355
|
+
"Perspective Right": "Perspektive rechts",
|
|
7356
|
+
"Perspective Relaxed": "Perspektive entspannt",
|
|
7357
|
+
"Perspective Above": "Perspektive oben",
|
|
7358
|
+
"Perspective Below": "Perspektive unten",
|
|
7359
|
+
"Perspective Heroic Left": "Perspektive heroisch links",
|
|
7360
|
+
"Perspective Heroic Right": "Perspektive heroisch rechts",
|
|
6590
7361
|
Arrange: "Anordnen",
|
|
6591
7362
|
Align: "Ausrichten",
|
|
6592
7363
|
"Align Center": "Zentrieren",
|
|
@@ -6698,6 +7469,11 @@ var deCommands = {
|
|
|
6698
7469
|
"Advanced Data Linking": "Erweiterte Datenverkn\xFCpfung",
|
|
6699
7470
|
"Link Data": "Daten verkn\xFCpfen",
|
|
6700
7471
|
"Advanced Data Graphics": "Erweiterte Datengrafiken",
|
|
7472
|
+
"Data Visualizer": "Datenvisualisierung",
|
|
7473
|
+
"Basic Flowchart...": "Einfaches Flussdiagramm...",
|
|
7474
|
+
"Cross-Functional Flowchart...": "Funktions\xFCbergreifendes Flussdiagramm...",
|
|
7475
|
+
"Refresh Diagram": "Diagramm aktualisieren",
|
|
7476
|
+
"Download Table Template": "Tabellenvorlage herunterladen",
|
|
6701
7477
|
Subprocess: "Teilprozess",
|
|
6702
7478
|
"Create New": "Neu erstellen",
|
|
6703
7479
|
"Link to Existing": "Mit vorhandenem verkn\xFCpfen",
|
|
@@ -6760,11 +7536,11 @@ var deCommands = {
|
|
|
6760
7536
|
"Text Effects": "Texteffekte",
|
|
6761
7537
|
"Text fill, outline and effects are not stored per run yet; use Home > Font for the text colour and style.": "Textf\xFCllung, Kontur und Effekte werden noch nicht pro Textabschnitt gespeichert; verwenden Sie Start > Schriftart f\xFCr Textfarbe und Formatierung.",
|
|
6762
7538
|
"Picture Format": "Bildformat",
|
|
6763
|
-
"Container Format": "
|
|
7539
|
+
"Container Format": "Container-Format",
|
|
6764
7540
|
"Chart Design": "Diagrammentwurf",
|
|
6765
7541
|
Adjust: "Anpassen",
|
|
6766
7542
|
"Picture Styles": "Bildformatvorlagen",
|
|
6767
|
-
"Container Styles": "
|
|
7543
|
+
"Container Styles": "Container-Formatvorlagen",
|
|
6768
7544
|
Membership: "Mitgliedschaft",
|
|
6769
7545
|
Brightness: "Helligkeit",
|
|
6770
7546
|
Contrast: "Kontrast",
|
|
@@ -6802,6 +7578,7 @@ var deCommands = {
|
|
|
6802
7578
|
Coworker: "Kollege",
|
|
6803
7579
|
Assistant: "Assistent",
|
|
6804
7580
|
"Delete Position": "Position l\xF6schen",
|
|
7581
|
+
"Import Org Chart": "Organigramm importieren",
|
|
6805
7582
|
None: "Keine",
|
|
6806
7583
|
Narrow: "Schmal",
|
|
6807
7584
|
Normal: "Normal",
|
|
@@ -6835,6 +7612,100 @@ var deCommands = {
|
|
|
6835
7612
|
"Changed the container margin.": "Containerrand ge\xE4ndert."
|
|
6836
7613
|
};
|
|
6837
7614
|
|
|
7615
|
+
// src/visio/locales/de-backstage.ts
|
|
7616
|
+
var deBackstage = {
|
|
7617
|
+
Info: "Informationen",
|
|
7618
|
+
New: "Neu",
|
|
7619
|
+
Save: "Speichern",
|
|
7620
|
+
"Save As": "Speichern unter",
|
|
7621
|
+
Print: "Drucken",
|
|
7622
|
+
Close: "Schlie\xDFen",
|
|
7623
|
+
Account: "Konto",
|
|
7624
|
+
"Documents stay in this browser; nothing is uploaded.": "Dokumente bleiben in diesem Browser; nichts wird hochgeladen.",
|
|
7625
|
+
"Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "Zuletzt verwendete Zeichnungen werden nicht erfasst. Dokumente bleiben in diesem Browser; nichts wird hochgeladen.",
|
|
7626
|
+
"Session name": "Sitzungsname",
|
|
7627
|
+
"Start sharing": "Freigabe starten",
|
|
7628
|
+
"Stop sharing": "Freigabe beenden",
|
|
7629
|
+
"Share with people": "Mit Personen teilen",
|
|
7630
|
+
"Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "Bearbeiten Sie diese Zeichnung gemeinsam mit anderen Fenstern dieses Browsers. \xD6ffnen Sie in einem anderen Fenster denselben Sitzungsnamen, um beizutreten.",
|
|
7631
|
+
"The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "Die gesamte Zeichnung wird geteilt; \xE4ndern zwei Personen sie gleichzeitig, gewinnt die letzte \xC4nderung. Nichts verl\xE4sst dieses Ger\xE4t.",
|
|
7632
|
+
"People in this session": "Personen in dieser Sitzung",
|
|
7633
|
+
"Product Information": "Produktinformationen",
|
|
7634
|
+
"Visio viewer (beta). No sign-in or subscription is used.": "Visio-Viewer (Beta). Es wird keine Anmeldung und kein Abonnement verwendet.",
|
|
7635
|
+
"Back to the drawing": "Zur\xFCck zur Zeichnung",
|
|
7636
|
+
"Current page": "Aktuelle Seite",
|
|
7637
|
+
"Page size": "Seitengr\xF6\xDFe",
|
|
7638
|
+
Compatibility: "Kompatibilit\xE4t",
|
|
7639
|
+
"Add Comment": "Kommentar hinzuf\xFCgen",
|
|
7640
|
+
"Comment on the current page or selected shape.": "Kommentieren Sie die aktuelle Seite oder die ausgew\xE4hlte Form.",
|
|
7641
|
+
Browse: "Durchsuchen",
|
|
7642
|
+
"Open a .vsdx drawing or a legacy .vsd preview from this device.": "\xD6ffnen Sie eine .vsdx-Zeichnung oder eine \xE4ltere .vsd-Vorschau von diesem Ger\xE4t.",
|
|
7643
|
+
"Download a copy": "Kopie herunterladen",
|
|
7644
|
+
"Save the drawing, with your edits, as a .vsdx file.": "Speichern Sie die Zeichnung mit Ihren \xC4nderungen als .vsdx-Datei.",
|
|
7645
|
+
"Export the current page as SVG": "Aktuelle Seite als SVG exportieren",
|
|
7646
|
+
"An approximate picture with compatibility notes.": "Ein ungef\xE4hres Bild mit Kompatibilit\xE4tshinweisen.",
|
|
7647
|
+
"Print the current page.": "Die aktuelle Seite drucken.",
|
|
7648
|
+
"Print preview of the current page": "Druckvorschau der aktuellen Seite",
|
|
7649
|
+
"Open a drawing to print it.": "\xD6ffnen Sie eine Zeichnung, um sie zu drucken.",
|
|
7650
|
+
"Printer paper, page size, drawing scale and page properties.": "Druckerpapier, Seitengr\xF6\xDFe, Zeichnungsma\xDFstab und Seiteneigenschaften.",
|
|
7651
|
+
Email: "E-Mail",
|
|
7652
|
+
"Send the drawing as an attachment.": "Senden Sie die Zeichnung als Anhang.",
|
|
7653
|
+
"Create PDF/XPS Document": "PDF/XPS-Dokument erstellen",
|
|
7654
|
+
"A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "Ein Vektor-PDF mit einer Seite je gew\xE4hlter Vordergrundseite in der Seitengr\xF6\xDFe und mit ausw\xE4hlbarem Text. Verl\xE4ufe werden als Schattierungen und Schatten als scharfkantige Vers\xE4tze gezeichnet; Leuchten wird angen\xE4hert; Unsch\xE4rfe, weiche Kanten und Spiegelungen werden nicht gezeichnet. Text verwendet Standardschriften, sofern der Host keine einzubettenden Schriften bereitstellt. Eine Seite, die sich nicht als Vektoren zeichnen l\xE4sst, wird zu einem Bild, und der Bericht unten nennt sie. XPS wird nicht angeboten.",
|
|
7655
|
+
"Change File Type": "Dateityp \xE4ndern",
|
|
7656
|
+
"Visio Drawing (*.vsdx)": "Visio-Zeichnung (*.vsdx)",
|
|
7657
|
+
"A copy of the drawing with your edits.": "Eine Kopie der Zeichnung mit Ihren \xC4nderungen.",
|
|
7658
|
+
"SVG (*.svg)": "SVG (*.svg)",
|
|
7659
|
+
"The current page as an approximate vector picture.": "Die aktuelle Seite als ungef\xE4hre Vektorgrafik.",
|
|
7660
|
+
"PDF (*.pdf)": "PDF (*.pdf)",
|
|
7661
|
+
"Every foreground page as vector shapes and selectable text.": "Jede Vordergrundseite als Vektorformen und ausw\xE4hlbarer Text.",
|
|
7662
|
+
"PNG picture (*.png)": "PNG-Bild (*.png)",
|
|
7663
|
+
"The current page at 150 dpi.": "Die aktuelle Seite mit 150 dpi.",
|
|
7664
|
+
"VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "Die Formate VSD, VSDM, VDX, Schablone, Vorlage und XPS werden nicht angeboten: Sie erfordern Konvertierungen, die dieser Viewer nicht hat.",
|
|
7665
|
+
"Choose a Visio drawing": "Eine Visio-Zeichnung ausw\xE4hlen",
|
|
7666
|
+
"Blank Drawing": "Leere Zeichnung",
|
|
7667
|
+
"Start an empty drawing.": "Eine leere Zeichnung beginnen.",
|
|
7668
|
+
"Basic Flowchart": "Einfaches Flussdiagramm",
|
|
7669
|
+
"A short process with a decision, using Basic Flowchart Shapes.": "Ein kurzer Prozess mit einer Entscheidung, mit Formen des einfachen Flussdiagramms.",
|
|
7670
|
+
"A process across three horizontal swimlanes that stack and resize together.": "Ein Prozess \xFCber drei horizontale Swimlanes, die sich gemeinsam stapeln und skalieren.",
|
|
7671
|
+
"Basic Organization Chart": "Einfaches Organigramm",
|
|
7672
|
+
"A small reporting hierarchy joined by connectors.": "Eine kleine Berichtshierarchie, verbunden durch Verbindungslinien.",
|
|
7673
|
+
"No drawing open": "Keine Zeichnung ge\xF6ffnet",
|
|
7674
|
+
"Untitled drawing": "Unbenannte Zeichnung",
|
|
7675
|
+
"Legacy VSD preview (read only)": "Vorschau einer \xE4lteren VSD-Datei (nur lesbar)",
|
|
7676
|
+
"Preview (read-only)": "Vorschau (nur lesbar)",
|
|
7677
|
+
"Edited copy (not saved)": "Bearbeitete Kopie (nicht gespeichert)",
|
|
7678
|
+
Original: "Original",
|
|
7679
|
+
"{width} \xD7 {height} in": "{width} \xD7 {height} Zoll",
|
|
7680
|
+
"{count} top-level": "{count} oberste Ebene",
|
|
7681
|
+
"One part of this drawing is shown approximately or not at all:": "Ein Teil dieser Zeichnung wird nur ungef\xE4hr oder gar nicht angezeigt:",
|
|
7682
|
+
"{count} parts of this drawing are shown approximately or not at all:": "{count} Teile dieser Zeichnung werden nur ungef\xE4hr oder gar nicht angezeigt:",
|
|
7683
|
+
"No compatibility notes.": "Keine Kompatibilit\xE4tshinweise.",
|
|
7684
|
+
"Wait for the current document operation.": "Warten Sie auf den laufenden Dokumentvorgang.",
|
|
7685
|
+
"Legacy VSD drawings are read only here.": "\xC4ltere VSD-Zeichnungen sind hier nur lesbar.",
|
|
7686
|
+
"Open a .vsdx file to save a copy.": "\xD6ffnen Sie eine .vsdx-Datei, um eine Kopie zu speichern.",
|
|
7687
|
+
"Open a .vsdx file to change the page setup.": "\xD6ffnen Sie eine .vsdx-Datei, um die Seiteneinrichtung zu \xE4ndern.",
|
|
7688
|
+
"Downloaded a copy of the drawing.": "Eine Kopie der Zeichnung wurde heruntergeladen.",
|
|
7689
|
+
"Saved the drawing.": "Die Zeichnung wurde gespeichert.",
|
|
7690
|
+
"SVG export requested. This is an approximate snapshot.": "SVG-Export angefordert. Dies ist eine ungef\xE4hre Momentaufnahme.",
|
|
7691
|
+
"Preparing the PDF...": "PDF wird vorbereitet...",
|
|
7692
|
+
"Preparing the PNG...": "PNG wird vorbereitet...",
|
|
7693
|
+
"PNG export requested. Pages are pictures of the approximate rendering.": "PNG-Export angefordert. Seiten sind Bilder der ungef\xE4hren Darstellung.",
|
|
7694
|
+
"PDF export requested.": "PDF-Export angefordert.",
|
|
7695
|
+
"PDF export requested. {count} page(s) lost something; see the report on the Export page.": "PDF-Export angefordert. {count} Seite(n) haben etwas verloren; siehe den Bericht auf der Seite \u201EExportieren\u201C.",
|
|
7696
|
+
"PDF options": "PDF-Optionen",
|
|
7697
|
+
"All pages": "Alle Seiten",
|
|
7698
|
+
"Page range": "Seitenbereich",
|
|
7699
|
+
From: "Von",
|
|
7700
|
+
To: "Bis",
|
|
7701
|
+
"{page}: drawn as vectors with selectable text.": "{page}: als Vektoren mit ausw\xE4hlbarem Text gezeichnet.",
|
|
7702
|
+
"{page}: saved as a picture ({reason}).": "{page}: als Bild gespeichert ({reason}).",
|
|
7703
|
+
"it cannot be drawn as vectors": "sie l\xE4sst sich nicht als Vektoren zeichnen",
|
|
7704
|
+
"Fonts embedded: {fonts}.": "Eingebettete Schriftarten: {fonts}.",
|
|
7705
|
+
"Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "Nicht eingebettete Schriftarten (kein TrueType, oder die Schriftlizenz verbietet das Einbetten): {fonts}.",
|
|
7706
|
+
"PDF created: {count} page(s)": "PDF erstellt: {count} Seite(n)"
|
|
7707
|
+
};
|
|
7708
|
+
|
|
6838
7709
|
// src/visio/locales/de-text.ts
|
|
6839
7710
|
var deText = {
|
|
6840
7711
|
"This chart contains unsupported content and is read-only. Its original workbook is preserved.": "Dieses Diagramm enth\xE4lt nicht unterst\xFCtzte Inhalte und ist schreibgesch\xFCtzt. Die urspr\xFCngliche Arbeitsmappe bleibt erhalten.",
|
|
@@ -6871,18 +7742,15 @@ var deText = {
|
|
|
6871
7742
|
"Tell me what you want to do": "Was m\xF6chten Sie tun?",
|
|
6872
7743
|
"Theme styles from the drawing's theme. A drawing without a theme gets the fixed Office colours shown here.": "Formatvorlagen aus dem Design der Zeichnung. Eine Zeichnung ohne Design erh\xE4lt die hier gezeigten festen Office-Farben.",
|
|
6873
7744
|
"Select one shape to change.": "W\xE4hlen Sie eine zu \xE4ndernde Form aus.",
|
|
6874
|
-
"Open a .vsdx file to insert diagram parts.": "\xD6ffnen Sie eine
|
|
7745
|
+
"Open a .vsdx file to insert diagram parts.": "\xD6ffnen Sie eine .vsdx-Datei, um Diagrammteile einzuf\xFCgen.",
|
|
6875
7746
|
"Apply a theme to the current page.": "Auf die aktuelle Seite ein Design anwenden.",
|
|
6876
7747
|
"Quick-styled shapes take its colours; text keeps its own font.": "Formen mit Schnellformatvorlage \xFCbernehmen die Farben; der Text beh\xE4lt seine Schriftart.",
|
|
6877
7748
|
"Pick one of the current theme's four colour variants.": "W\xE4hlen Sie eine der vier Farbvarianten des aktuellen Designs.",
|
|
6878
|
-
"Open a .vsdx file to add backgrounds.": "\xD6ffnen Sie eine
|
|
6879
|
-
"Open a .vsdx file to lay out its shapes.": "\xD6ffnen Sie eine
|
|
6880
|
-
"open a .vsdx file to lay out its shapes.": "\xD6ffnen Sie eine
|
|
6881
|
-
"3-D rotation needs a 3-D renderer.": "Die 3D-Drehung ben\xF6tigt einen 3D-Renderer.",
|
|
6882
|
-
"Bevel needs 3-D lighting the SVG renderer does not draw.": "Abgeschr\xE4gte Kanten ben\xF6tigen 3D-Beleuchtung, die der SVG-Renderer nicht zeichnet.",
|
|
7749
|
+
"Open a .vsdx file to add backgrounds.": "\xD6ffnen Sie eine .vsdx-Datei, um Hintergr\xFCnde hinzuzuf\xFCgen.",
|
|
7750
|
+
"Open a .vsdx file to lay out its shapes.": "\xD6ffnen Sie eine .vsdx-Datei, um deren Formen anzuordnen.",
|
|
7751
|
+
"open a .vsdx file to lay out its shapes.": "\xD6ffnen Sie eine .vsdx-Datei, um deren Formen anzuordnen.",
|
|
6883
7752
|
"Custom theme colour sets are not written yet; pick a theme or variant.": "Benutzerdefinierte Designfarbs\xE4tze werden noch nicht geschrieben; w\xE4hlen Sie ein Design oder eine Variante.",
|
|
6884
7753
|
"DWG and DXF import is not supported.": "Der Import von DWG und DXF wird nicht unterst\xFCtzt.",
|
|
6885
|
-
"Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "Datengrafiken werden im Men\xFC \u201EDatengrafiken\u201C ausgew\xE4hlt; es gibt keinen Feldbereich.",
|
|
6886
7754
|
"Data graphics are placed at their default position; this option is not built yet.": "Datengrafiken werden an ihrer Standardposition platziert; diese Option ist noch nicht verf\xFCgbar.",
|
|
6887
7755
|
"Embedded Excel charts are not supported.": "Eingebettete Excel-Diagramme werden nicht unterst\xFCtzt.",
|
|
6888
7756
|
"Embedded OLE objects are not supported; only pictures can be inserted.": "Eingebettete OLE-Objekte werden nicht unterst\xFCtzt; es k\xF6nnen nur Bilder eingef\xFCgt werden.",
|
|
@@ -7014,6 +7882,32 @@ var enCommands = {
|
|
|
7014
7882
|
"Soft Edges Options...": "Soft Edges Options...",
|
|
7015
7883
|
Bevel: "Bevel",
|
|
7016
7884
|
"3-D Rotation": "3-D Rotation",
|
|
7885
|
+
Circle: "Circle",
|
|
7886
|
+
"Relaxed Inset": "Relaxed Inset",
|
|
7887
|
+
Cross: "Cross",
|
|
7888
|
+
"Cool Slant": "Cool Slant",
|
|
7889
|
+
Angle: "Angle",
|
|
7890
|
+
"Soft Round": "Soft Round",
|
|
7891
|
+
Convex: "Convex",
|
|
7892
|
+
Slope: "Slope",
|
|
7893
|
+
Divot: "Divot",
|
|
7894
|
+
Riblet: "Riblet",
|
|
7895
|
+
"Hard Edge": "Hard Edge",
|
|
7896
|
+
"Art Deco": "Art Deco",
|
|
7897
|
+
"No Bevel": "No Bevel",
|
|
7898
|
+
"No Rotation": "No Rotation",
|
|
7899
|
+
"Isometric Left Down": "Isometric Left Down",
|
|
7900
|
+
"Isometric Right Up": "Isometric Right Up",
|
|
7901
|
+
"Isometric Top Up": "Isometric Top Up",
|
|
7902
|
+
"Off Axis Left": "Off Axis Left",
|
|
7903
|
+
"Off Axis Right": "Off Axis Right",
|
|
7904
|
+
"Perspective Left": "Perspective Left",
|
|
7905
|
+
"Perspective Right": "Perspective Right",
|
|
7906
|
+
"Perspective Relaxed": "Perspective Relaxed",
|
|
7907
|
+
"Perspective Above": "Perspective Above",
|
|
7908
|
+
"Perspective Below": "Perspective Below",
|
|
7909
|
+
"Perspective Heroic Left": "Perspective Heroic Left",
|
|
7910
|
+
"Perspective Heroic Right": "Perspective Heroic Right",
|
|
7017
7911
|
Arrange: "Arrange",
|
|
7018
7912
|
Align: "Align",
|
|
7019
7913
|
"Align Center": "Align Center",
|
|
@@ -7125,6 +8019,11 @@ var enCommands = {
|
|
|
7125
8019
|
"Advanced Data Linking": "Advanced Data Linking",
|
|
7126
8020
|
"Link Data": "Link Data",
|
|
7127
8021
|
"Advanced Data Graphics": "Advanced Data Graphics",
|
|
8022
|
+
"Data Visualizer": "Data Visualizer",
|
|
8023
|
+
"Basic Flowchart...": "Basic Flowchart...",
|
|
8024
|
+
"Cross-Functional Flowchart...": "Cross-Functional Flowchart...",
|
|
8025
|
+
"Refresh Diagram": "Refresh Diagram",
|
|
8026
|
+
"Download Table Template": "Download Table Template",
|
|
7128
8027
|
Subprocess: "Subprocess",
|
|
7129
8028
|
"Create New": "Create New",
|
|
7130
8029
|
"Link to Existing": "Link to Existing",
|
|
@@ -7229,6 +8128,7 @@ var enCommands = {
|
|
|
7229
8128
|
Coworker: "Coworker",
|
|
7230
8129
|
Assistant: "Assistant",
|
|
7231
8130
|
"Delete Position": "Delete Position",
|
|
8131
|
+
"Import Org Chart": "Import Org Chart",
|
|
7232
8132
|
None: "None",
|
|
7233
8133
|
Narrow: "Narrow",
|
|
7234
8134
|
Normal: "Normal",
|
|
@@ -7305,11 +8205,8 @@ var enText = {
|
|
|
7305
8205
|
"Open a .vsdx file to add backgrounds.": "Open a .vsdx file to add backgrounds.",
|
|
7306
8206
|
"Open a .vsdx file to lay out its shapes.": "Open a .vsdx file to lay out its shapes.",
|
|
7307
8207
|
"open a .vsdx file to lay out its shapes.": "open a .vsdx file to lay out its shapes.",
|
|
7308
|
-
"3-D rotation needs a 3-D renderer.": "3-D rotation needs a 3-D renderer.",
|
|
7309
|
-
"Bevel needs 3-D lighting the SVG renderer does not draw.": "Bevel needs 3-D lighting the SVG renderer does not draw.",
|
|
7310
8208
|
"Custom theme colour sets are not written yet; pick a theme or variant.": "Custom theme colour sets are not written yet; pick a theme or variant.",
|
|
7311
8209
|
"DWG and DXF import is not supported.": "DWG and DXF import is not supported.",
|
|
7312
|
-
"Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "Data graphics are chosen in the Data Graphics menu; there is no fields pane.",
|
|
7313
8210
|
"Data graphics are placed at their default position; this option is not built yet.": "Data graphics are placed at their default position; this option is not built yet.",
|
|
7314
8211
|
"Embedded Excel charts are not supported.": "Embedded Excel charts are not supported.",
|
|
7315
8212
|
"Embedded OLE objects are not supported; only pictures can be inserted.": "Embedded OLE objects are not supported; only pictures can be inserted.",
|
|
@@ -7360,6 +8257,100 @@ var enText = {
|
|
|
7360
8257
|
"Style {n}": "Style {n}"
|
|
7361
8258
|
};
|
|
7362
8259
|
|
|
8260
|
+
// src/visio/locales/en-backstage.ts
|
|
8261
|
+
var enBackstage = {
|
|
8262
|
+
Info: "Info",
|
|
8263
|
+
New: "New",
|
|
8264
|
+
Save: "Save",
|
|
8265
|
+
"Save As": "Save As",
|
|
8266
|
+
Print: "Print",
|
|
8267
|
+
Close: "Close",
|
|
8268
|
+
Account: "Account",
|
|
8269
|
+
"Documents stay in this browser; nothing is uploaded.": "Documents stay in this browser; nothing is uploaded.",
|
|
8270
|
+
"Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.",
|
|
8271
|
+
"Session name": "Session name",
|
|
8272
|
+
"Start sharing": "Start sharing",
|
|
8273
|
+
"Stop sharing": "Stop sharing",
|
|
8274
|
+
"Share with people": "Share with people",
|
|
8275
|
+
"Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "Edit this drawing together with other windows of this browser. Open the same session name in another window to join.",
|
|
8276
|
+
"The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.",
|
|
8277
|
+
"People in this session": "People in this session",
|
|
8278
|
+
"Product Information": "Product Information",
|
|
8279
|
+
"Visio viewer (beta). No sign-in or subscription is used.": "Visio viewer (beta). No sign-in or subscription is used.",
|
|
8280
|
+
"Back to the drawing": "Back to the drawing",
|
|
8281
|
+
"Current page": "Current page",
|
|
8282
|
+
"Page size": "Page size",
|
|
8283
|
+
Compatibility: "Compatibility",
|
|
8284
|
+
"Add Comment": "Add Comment",
|
|
8285
|
+
"Comment on the current page or selected shape.": "Comment on the current page or selected shape.",
|
|
8286
|
+
Browse: "Browse",
|
|
8287
|
+
"Open a .vsdx drawing or a legacy .vsd preview from this device.": "Open a .vsdx drawing or a legacy .vsd preview from this device.",
|
|
8288
|
+
"Download a copy": "Download a copy",
|
|
8289
|
+
"Save the drawing, with your edits, as a .vsdx file.": "Save the drawing, with your edits, as a .vsdx file.",
|
|
8290
|
+
"Export the current page as SVG": "Export the current page as SVG",
|
|
8291
|
+
"An approximate picture with compatibility notes.": "An approximate picture with compatibility notes.",
|
|
8292
|
+
"Print the current page.": "Print the current page.",
|
|
8293
|
+
"Print preview of the current page": "Print preview of the current page",
|
|
8294
|
+
"Open a drawing to print it.": "Open a drawing to print it.",
|
|
8295
|
+
"Printer paper, page size, drawing scale and page properties.": "Printer paper, page size, drawing scale and page properties.",
|
|
8296
|
+
Email: "Email",
|
|
8297
|
+
"Send the drawing as an attachment.": "Send the drawing as an attachment.",
|
|
8298
|
+
"Create PDF/XPS Document": "Create PDF/XPS Document",
|
|
8299
|
+
"A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.",
|
|
8300
|
+
"Change File Type": "Change File Type",
|
|
8301
|
+
"Visio Drawing (*.vsdx)": "Visio Drawing (*.vsdx)",
|
|
8302
|
+
"A copy of the drawing with your edits.": "A copy of the drawing with your edits.",
|
|
8303
|
+
"SVG (*.svg)": "SVG (*.svg)",
|
|
8304
|
+
"The current page as an approximate vector picture.": "The current page as an approximate vector picture.",
|
|
8305
|
+
"PDF (*.pdf)": "PDF (*.pdf)",
|
|
8306
|
+
"Every foreground page as vector shapes and selectable text.": "Every foreground page as vector shapes and selectable text.",
|
|
8307
|
+
"PNG picture (*.png)": "PNG picture (*.png)",
|
|
8308
|
+
"The current page at 150 dpi.": "The current page at 150 dpi.",
|
|
8309
|
+
"VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.",
|
|
8310
|
+
"Choose a Visio drawing": "Choose a Visio drawing",
|
|
8311
|
+
"Blank Drawing": "Blank Drawing",
|
|
8312
|
+
"Start an empty drawing.": "Start an empty drawing.",
|
|
8313
|
+
"Basic Flowchart": "Basic Flowchart",
|
|
8314
|
+
"A short process with a decision, using Basic Flowchart Shapes.": "A short process with a decision, using Basic Flowchart Shapes.",
|
|
8315
|
+
"A process across three horizontal swimlanes that stack and resize together.": "A process across three horizontal swimlanes that stack and resize together.",
|
|
8316
|
+
"Basic Organization Chart": "Basic Organization Chart",
|
|
8317
|
+
"A small reporting hierarchy joined by connectors.": "A small reporting hierarchy joined by connectors.",
|
|
8318
|
+
"No drawing open": "No drawing open",
|
|
8319
|
+
"Untitled drawing": "Untitled drawing",
|
|
8320
|
+
"Legacy VSD preview (read only)": "Legacy VSD preview (read only)",
|
|
8321
|
+
"Preview (read-only)": "Preview (read-only)",
|
|
8322
|
+
"Edited copy (not saved)": "Edited copy (not saved)",
|
|
8323
|
+
Original: "Original",
|
|
8324
|
+
"{width} \xD7 {height} in": "{width} \xD7 {height} in",
|
|
8325
|
+
"{count} top-level": "{count} top-level",
|
|
8326
|
+
"One part of this drawing is shown approximately or not at all:": "One part of this drawing is shown approximately or not at all:",
|
|
8327
|
+
"{count} parts of this drawing are shown approximately or not at all:": "{count} parts of this drawing are shown approximately or not at all:",
|
|
8328
|
+
"No compatibility notes.": "No compatibility notes.",
|
|
8329
|
+
"Wait for the current document operation.": "Wait for the current document operation.",
|
|
8330
|
+
"Legacy VSD drawings are read only here.": "Legacy VSD drawings are read only here.",
|
|
8331
|
+
"Open a .vsdx file to save a copy.": "Open a .vsdx file to save a copy.",
|
|
8332
|
+
"Open a .vsdx file to change the page setup.": "Open a .vsdx file to change the page setup.",
|
|
8333
|
+
"Downloaded a copy of the drawing.": "Downloaded a copy of the drawing.",
|
|
8334
|
+
"Saved the drawing.": "Saved the drawing.",
|
|
8335
|
+
"SVG export requested. This is an approximate snapshot.": "SVG export requested. This is an approximate snapshot.",
|
|
8336
|
+
"Preparing the PDF...": "Preparing the PDF...",
|
|
8337
|
+
"Preparing the PNG...": "Preparing the PNG...",
|
|
8338
|
+
"PNG export requested. Pages are pictures of the approximate rendering.": "PNG export requested. Pages are pictures of the approximate rendering.",
|
|
8339
|
+
"PDF export requested.": "PDF export requested.",
|
|
8340
|
+
"PDF export requested. {count} page(s) lost something; see the report on the Export page.": "PDF export requested. {count} page(s) lost something; see the report on the Export page.",
|
|
8341
|
+
"PDF options": "PDF options",
|
|
8342
|
+
"All pages": "All pages",
|
|
8343
|
+
"Page range": "Page range",
|
|
8344
|
+
From: "From",
|
|
8345
|
+
To: "To",
|
|
8346
|
+
"{page}: drawn as vectors with selectable text.": "{page}: drawn as vectors with selectable text.",
|
|
8347
|
+
"{page}: saved as a picture ({reason}).": "{page}: saved as a picture ({reason}).",
|
|
8348
|
+
"it cannot be drawn as vectors": "it cannot be drawn as vectors",
|
|
8349
|
+
"Fonts embedded: {fonts}.": "Fonts embedded: {fonts}.",
|
|
8350
|
+
"Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.",
|
|
8351
|
+
"PDF created: {count} page(s)": "PDF created: {count} page(s)"
|
|
8352
|
+
};
|
|
8353
|
+
|
|
7363
8354
|
// src/visio/locales/es-commands.ts
|
|
7364
8355
|
var esCommands = {
|
|
7365
8356
|
Home: "Inicio",
|
|
@@ -7441,6 +8432,32 @@ var esCommands = {
|
|
|
7441
8432
|
"Soft Edges Options...": "Opciones de bordes suaves...",
|
|
7442
8433
|
Bevel: "Bisel",
|
|
7443
8434
|
"3-D Rotation": "Rotaci\xF3n 3D",
|
|
8435
|
+
Circle: "C\xEDrculo",
|
|
8436
|
+
"Relaxed Inset": "Inserci\xF3n relajada",
|
|
8437
|
+
Cross: "Cruz",
|
|
8438
|
+
"Cool Slant": "Pendiente fr\xEDa",
|
|
8439
|
+
Angle: "\xC1ngulo",
|
|
8440
|
+
"Soft Round": "Redondeado suave",
|
|
8441
|
+
Convex: "Convexo",
|
|
8442
|
+
Slope: "Pendiente",
|
|
8443
|
+
Divot: "Hoyuelo",
|
|
8444
|
+
Riblet: "Acanalado",
|
|
8445
|
+
"Hard Edge": "Borde duro",
|
|
8446
|
+
"Art Deco": "Art d\xE9co",
|
|
8447
|
+
"No Bevel": "Sin bisel",
|
|
8448
|
+
"No Rotation": "Sin rotaci\xF3n",
|
|
8449
|
+
"Isometric Left Down": "Isom\xE9trica izquierda abajo",
|
|
8450
|
+
"Isometric Right Up": "Isom\xE9trica derecha arriba",
|
|
8451
|
+
"Isometric Top Up": "Isom\xE9trica superior arriba",
|
|
8452
|
+
"Off Axis Left": "Fuera de eje izquierda",
|
|
8453
|
+
"Off Axis Right": "Fuera de eje derecha",
|
|
8454
|
+
"Perspective Left": "Perspectiva izquierda",
|
|
8455
|
+
"Perspective Right": "Perspectiva derecha",
|
|
8456
|
+
"Perspective Relaxed": "Perspectiva relajada",
|
|
8457
|
+
"Perspective Above": "Perspectiva superior",
|
|
8458
|
+
"Perspective Below": "Perspectiva inferior",
|
|
8459
|
+
"Perspective Heroic Left": "Perspectiva heroica izquierda",
|
|
8460
|
+
"Perspective Heroic Right": "Perspectiva heroica derecha",
|
|
7444
8461
|
Arrange: "Organizar",
|
|
7445
8462
|
Align: "Alinear",
|
|
7446
8463
|
"Align Center": "Alinear al centro",
|
|
@@ -7552,6 +8569,11 @@ var esCommands = {
|
|
|
7552
8569
|
"Advanced Data Linking": "Vinculaci\xF3n de datos avanzada",
|
|
7553
8570
|
"Link Data": "Vincular datos",
|
|
7554
8571
|
"Advanced Data Graphics": "Gr\xE1ficos de datos avanzados",
|
|
8572
|
+
"Data Visualizer": "Visualizador de datos",
|
|
8573
|
+
"Basic Flowchart...": "Diagrama de flujo b\xE1sico...",
|
|
8574
|
+
"Cross-Functional Flowchart...": "Diagrama de flujo multifuncional...",
|
|
8575
|
+
"Refresh Diagram": "Actualizar diagrama",
|
|
8576
|
+
"Download Table Template": "Descargar plantilla de tabla",
|
|
7555
8577
|
Subprocess: "Subproceso",
|
|
7556
8578
|
"Create New": "Crear nuevo",
|
|
7557
8579
|
"Link to Existing": "Vincular a existente",
|
|
@@ -7656,6 +8678,7 @@ var esCommands = {
|
|
|
7656
8678
|
Coworker: "Compa\xF1ero",
|
|
7657
8679
|
Assistant: "Asistente",
|
|
7658
8680
|
"Delete Position": "Eliminar puesto",
|
|
8681
|
+
"Import Org Chart": "Importar organigrama",
|
|
7659
8682
|
None: "Ninguno",
|
|
7660
8683
|
Narrow: "Estrecho",
|
|
7661
8684
|
Normal: "Normal",
|
|
@@ -7685,7 +8708,7 @@ var esCommands = {
|
|
|
7685
8708
|
"Open a .vsdx file to change the container.": "Abra un archivo .vsdx para cambiar el contenedor.",
|
|
7686
8709
|
"Locked the container.": "Contenedor bloqueado.",
|
|
7687
8710
|
"Unlocked the container.": "Contenedor desbloqueado.",
|
|
7688
|
-
"Changed the automatic resize of the container.": "Se
|
|
8711
|
+
"Changed the automatic resize of the container.": "Se modific\xF3 el cambio de tama\xF1o autom\xE1tico del contenedor.",
|
|
7689
8712
|
"Changed the container margin.": "Se cambi\xF3 el margen del contenedor."
|
|
7690
8713
|
};
|
|
7691
8714
|
|
|
@@ -7732,11 +8755,8 @@ var esText = {
|
|
|
7732
8755
|
"Open a .vsdx file to add backgrounds.": "Abra un archivo .vsdx para agregar fondos.",
|
|
7733
8756
|
"Open a .vsdx file to lay out its shapes.": "Abra un archivo .vsdx para dise\xF1ar sus formas.",
|
|
7734
8757
|
"open a .vsdx file to lay out its shapes.": "Abra un archivo .vsdx para dise\xF1ar sus formas.",
|
|
7735
|
-
"3-D rotation needs a 3-D renderer.": "La rotaci\xF3n 3D requiere un motor de representaci\xF3n 3D.",
|
|
7736
|
-
"Bevel needs 3-D lighting the SVG renderer does not draw.": "El bisel requiere iluminaci\xF3n 3D que el motor SVG no dibuja.",
|
|
7737
8758
|
"Custom theme colour sets are not written yet; pick a theme or variant.": "Los conjuntos de colores de tema personalizados a\xFAn no se escriben; elija un tema o una variante.",
|
|
7738
8759
|
"DWG and DXF import is not supported.": "No se admite la importaci\xF3n de DWG y DXF.",
|
|
7739
|
-
"Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "Los gr\xE1ficos de datos se eligen en el men\xFA Gr\xE1ficos de datos; no hay panel de campos.",
|
|
7740
8760
|
"Data graphics are placed at their default position; this option is not built yet.": "Los gr\xE1ficos de datos se colocan en su posici\xF3n predeterminada; esta opci\xF3n a\xFAn no est\xE1 disponible.",
|
|
7741
8761
|
"Embedded Excel charts are not supported.": "No se admiten los gr\xE1ficos de Excel incrustados.",
|
|
7742
8762
|
"Embedded OLE objects are not supported; only pictures can be inserted.": "No se admiten los objetos OLE incrustados; solo se pueden insertar im\xE1genes.",
|
|
@@ -7787,6 +8807,100 @@ var esText = {
|
|
|
7787
8807
|
"Style {n}": "Estilo {n}"
|
|
7788
8808
|
};
|
|
7789
8809
|
|
|
8810
|
+
// src/visio/locales/es-backstage.ts
|
|
8811
|
+
var esBackstage = {
|
|
8812
|
+
Info: "Informaci\xF3n",
|
|
8813
|
+
New: "Nuevo",
|
|
8814
|
+
Save: "Guardar",
|
|
8815
|
+
"Save As": "Guardar como",
|
|
8816
|
+
Print: "Imprimir",
|
|
8817
|
+
Close: "Cerrar",
|
|
8818
|
+
Account: "Cuenta",
|
|
8819
|
+
"Documents stay in this browser; nothing is uploaded.": "Los documentos permanecen en este navegador; no se sube nada.",
|
|
8820
|
+
"Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "Los dibujos recientes no se registran. Los documentos permanecen en este navegador; no se sube nada.",
|
|
8821
|
+
"Session name": "Nombre de la sesi\xF3n",
|
|
8822
|
+
"Start sharing": "Iniciar uso compartido",
|
|
8823
|
+
"Stop sharing": "Detener uso compartido",
|
|
8824
|
+
"Share with people": "Compartir con personas",
|
|
8825
|
+
"Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "Edite este dibujo junto con otras ventanas de este navegador. Abra el mismo nombre de sesi\xF3n en otra ventana para unirse.",
|
|
8826
|
+
"The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "Se comparte todo el dibujo; si dos personas lo cambian a la vez, gana el \xFAltimo cambio. Nada sale de este dispositivo.",
|
|
8827
|
+
"People in this session": "Personas en esta sesi\xF3n",
|
|
8828
|
+
"Product Information": "Informaci\xF3n del producto",
|
|
8829
|
+
"Visio viewer (beta). No sign-in or subscription is used.": "Visor de Visio (beta). No se usa inicio de sesi\xF3n ni suscripci\xF3n.",
|
|
8830
|
+
"Back to the drawing": "Volver al dibujo",
|
|
8831
|
+
"Current page": "P\xE1gina actual",
|
|
8832
|
+
"Page size": "Tama\xF1o de p\xE1gina",
|
|
8833
|
+
Compatibility: "Compatibilidad",
|
|
8834
|
+
"Add Comment": "Agregar comentario",
|
|
8835
|
+
"Comment on the current page or selected shape.": "Comente la p\xE1gina actual o la forma seleccionada.",
|
|
8836
|
+
Browse: "Examinar",
|
|
8837
|
+
"Open a .vsdx drawing or a legacy .vsd preview from this device.": "Abra un dibujo .vsdx o una vista previa .vsd heredada desde este dispositivo.",
|
|
8838
|
+
"Download a copy": "Descargar una copia",
|
|
8839
|
+
"Save the drawing, with your edits, as a .vsdx file.": "Guarde el dibujo, con sus cambios, como archivo .vsdx.",
|
|
8840
|
+
"Export the current page as SVG": "Exportar la p\xE1gina actual como SVG",
|
|
8841
|
+
"An approximate picture with compatibility notes.": "Una imagen aproximada con notas de compatibilidad.",
|
|
8842
|
+
"Print the current page.": "Imprimir la p\xE1gina actual.",
|
|
8843
|
+
"Print preview of the current page": "Vista previa de impresi\xF3n de la p\xE1gina actual",
|
|
8844
|
+
"Open a drawing to print it.": "Abra un dibujo para imprimirlo.",
|
|
8845
|
+
"Printer paper, page size, drawing scale and page properties.": "Papel de la impresora, tama\xF1o de p\xE1gina, escala del dibujo y propiedades de la p\xE1gina.",
|
|
8846
|
+
Email: "Correo electr\xF3nico",
|
|
8847
|
+
"Send the drawing as an attachment.": "Env\xEDe el dibujo como archivo adjunto.",
|
|
8848
|
+
"Create PDF/XPS Document": "Crear documento PDF/XPS",
|
|
8849
|
+
"A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "Un PDF vectorial con una p\xE1gina por cada p\xE1gina de primer plano elegida, con el tama\xF1o de p\xE1gina y texto seleccionable. Los degradados son sombreados y las sombras son desplazamientos de borde duro; el resplandor se aproxima; el desenfoque, los bordes suaves y los reflejos no se dibujan. El texto usa fuentes est\xE1ndar, salvo que el host proporcione fuentes para incrustar. Una p\xE1gina que no puede dibujarse como vectores se convierte en imagen, y el informe de abajo indica cu\xE1les son. XPS no se ofrece.",
|
|
8850
|
+
"Change File Type": "Cambiar tipo de archivo",
|
|
8851
|
+
"Visio Drawing (*.vsdx)": "Dibujo de Visio (*.vsdx)",
|
|
8852
|
+
"A copy of the drawing with your edits.": "Una copia del dibujo con sus cambios.",
|
|
8853
|
+
"SVG (*.svg)": "SVG (*.svg)",
|
|
8854
|
+
"The current page as an approximate vector picture.": "La p\xE1gina actual como imagen vectorial aproximada.",
|
|
8855
|
+
"PDF (*.pdf)": "PDF (*.pdf)",
|
|
8856
|
+
"Every foreground page as vector shapes and selectable text.": "Cada p\xE1gina de primer plano como formas vectoriales y texto seleccionable.",
|
|
8857
|
+
"PNG picture (*.png)": "Imagen PNG (*.png)",
|
|
8858
|
+
"The current page at 150 dpi.": "La p\xE1gina actual a 150 ppp.",
|
|
8859
|
+
"VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "Los formatos VSD, VSDM, VDX, de plantilla de formas, de plantilla y XPS no se ofrecen: requieren conversiones que este visor no tiene.",
|
|
8860
|
+
"Choose a Visio drawing": "Elegir un dibujo de Visio",
|
|
8861
|
+
"Blank Drawing": "Dibujo en blanco",
|
|
8862
|
+
"Start an empty drawing.": "Iniciar un dibujo vac\xEDo.",
|
|
8863
|
+
"Basic Flowchart": "Diagrama de flujo b\xE1sico",
|
|
8864
|
+
"A short process with a decision, using Basic Flowchart Shapes.": "Un proceso breve con una decisi\xF3n, con formas de diagrama de flujo b\xE1sico.",
|
|
8865
|
+
"A process across three horizontal swimlanes that stack and resize together.": "Un proceso en tres calles horizontales que se apilan y cambian de tama\xF1o juntas.",
|
|
8866
|
+
"Basic Organization Chart": "Organigrama b\xE1sico",
|
|
8867
|
+
"A small reporting hierarchy joined by connectors.": "Una peque\xF1a jerarqu\xEDa de informes unida por conectores.",
|
|
8868
|
+
"No drawing open": "No hay ning\xFAn dibujo abierto",
|
|
8869
|
+
"Untitled drawing": "Dibujo sin t\xEDtulo",
|
|
8870
|
+
"Legacy VSD preview (read only)": "Vista previa de VSD heredado (solo lectura)",
|
|
8871
|
+
"Preview (read-only)": "Vista previa (solo lectura)",
|
|
8872
|
+
"Edited copy (not saved)": "Copia editada (no guardada)",
|
|
8873
|
+
Original: "Original",
|
|
8874
|
+
"{width} \xD7 {height} in": "{width} \xD7 {height} pulgadas",
|
|
8875
|
+
"{count} top-level": "{count} de nivel superior",
|
|
8876
|
+
"One part of this drawing is shown approximately or not at all:": "Una parte de este dibujo se muestra de forma aproximada o no se muestra:",
|
|
8877
|
+
"{count} parts of this drawing are shown approximately or not at all:": "{count} partes de este dibujo se muestran de forma aproximada o no se muestran:",
|
|
8878
|
+
"No compatibility notes.": "No hay notas de compatibilidad.",
|
|
8879
|
+
"Wait for the current document operation.": "Espere a que termine la operaci\xF3n actual del documento.",
|
|
8880
|
+
"Legacy VSD drawings are read only here.": "Los dibujos VSD heredados son de solo lectura aqu\xED.",
|
|
8881
|
+
"Open a .vsdx file to save a copy.": "Abra un archivo .vsdx para guardar una copia.",
|
|
8882
|
+
"Open a .vsdx file to change the page setup.": "Abra un archivo .vsdx para cambiar la configuraci\xF3n de p\xE1gina.",
|
|
8883
|
+
"Downloaded a copy of the drawing.": "Se descarg\xF3 una copia del dibujo.",
|
|
8884
|
+
"Saved the drawing.": "Se guard\xF3 el dibujo.",
|
|
8885
|
+
"SVG export requested. This is an approximate snapshot.": "Exportaci\xF3n a SVG solicitada. Es una instant\xE1nea aproximada.",
|
|
8886
|
+
"Preparing the PDF...": "Preparando el PDF...",
|
|
8887
|
+
"Preparing the PNG...": "Preparando el PNG...",
|
|
8888
|
+
"PNG export requested. Pages are pictures of the approximate rendering.": "Exportaci\xF3n a PNG solicitada. Las p\xE1ginas son im\xE1genes de la representaci\xF3n aproximada.",
|
|
8889
|
+
"PDF export requested.": "Exportaci\xF3n a PDF solicitada.",
|
|
8890
|
+
"PDF export requested. {count} page(s) lost something; see the report on the Export page.": "Exportaci\xF3n a PDF solicitada. {count} p\xE1gina(s) perdieron algo; vea el informe en la p\xE1gina Exportar.",
|
|
8891
|
+
"PDF options": "Opciones de PDF",
|
|
8892
|
+
"All pages": "Todas las p\xE1ginas",
|
|
8893
|
+
"Page range": "Intervalo de p\xE1ginas",
|
|
8894
|
+
From: "Desde",
|
|
8895
|
+
To: "Hasta",
|
|
8896
|
+
"{page}: drawn as vectors with selectable text.": "{page}: dibujada como vectores con texto seleccionable.",
|
|
8897
|
+
"{page}: saved as a picture ({reason}).": "{page}: guardada como imagen ({reason}).",
|
|
8898
|
+
"it cannot be drawn as vectors": "no puede dibujarse como vectores",
|
|
8899
|
+
"Fonts embedded: {fonts}.": "Fuentes incrustadas: {fonts}.",
|
|
8900
|
+
"Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "Fuentes no incrustadas (no son TrueType, o la licencia de la fuente proh\xEDbe incrustarlas): {fonts}.",
|
|
8901
|
+
"PDF created: {count} page(s)": "PDF creado: {count} p\xE1gina(s)"
|
|
8902
|
+
};
|
|
8903
|
+
|
|
7790
8904
|
// src/visio/locales/fr-commands.ts
|
|
7791
8905
|
var frCommands = {
|
|
7792
8906
|
Home: "Accueil",
|
|
@@ -7868,6 +8982,32 @@ var frCommands = {
|
|
|
7868
8982
|
"Soft Edges Options...": "Options des bords adoucis...",
|
|
7869
8983
|
Bevel: "Biseau",
|
|
7870
8984
|
"3-D Rotation": "Rotation 3D",
|
|
8985
|
+
Circle: "Cercle",
|
|
8986
|
+
"Relaxed Inset": "Retrait d\xE9tendu",
|
|
8987
|
+
Cross: "Croix",
|
|
8988
|
+
"Cool Slant": "Inclinaison fra\xEEche",
|
|
8989
|
+
Angle: "Angle",
|
|
8990
|
+
"Soft Round": "Arrondi doux",
|
|
8991
|
+
Convex: "Convexe",
|
|
8992
|
+
Slope: "Pente",
|
|
8993
|
+
Divot: "Cuvette",
|
|
8994
|
+
Riblet: "Nervure",
|
|
8995
|
+
"Hard Edge": "Bord dur",
|
|
8996
|
+
"Art Deco": "Art d\xE9co",
|
|
8997
|
+
"No Bevel": "Aucun biseau",
|
|
8998
|
+
"No Rotation": "Aucune rotation",
|
|
8999
|
+
"Isometric Left Down": "Isom\xE9trique gauche bas",
|
|
9000
|
+
"Isometric Right Up": "Isom\xE9trique droite haut",
|
|
9001
|
+
"Isometric Top Up": "Isom\xE9trique dessus haut",
|
|
9002
|
+
"Off Axis Left": "Hors axe gauche",
|
|
9003
|
+
"Off Axis Right": "Hors axe droit",
|
|
9004
|
+
"Perspective Left": "Perspective gauche",
|
|
9005
|
+
"Perspective Right": "Perspective droite",
|
|
9006
|
+
"Perspective Relaxed": "Perspective d\xE9tendue",
|
|
9007
|
+
"Perspective Above": "Perspective dessus",
|
|
9008
|
+
"Perspective Below": "Perspective dessous",
|
|
9009
|
+
"Perspective Heroic Left": "Perspective h\xE9ro\xEFque gauche",
|
|
9010
|
+
"Perspective Heroic Right": "Perspective h\xE9ro\xEFque droite",
|
|
7871
9011
|
Arrange: "Organiser",
|
|
7872
9012
|
Align: "Aligner",
|
|
7873
9013
|
"Align Center": "Aligner au centre",
|
|
@@ -7979,6 +9119,11 @@ var frCommands = {
|
|
|
7979
9119
|
"Advanced Data Linking": "Liaison de donn\xE9es avanc\xE9e",
|
|
7980
9120
|
"Link Data": "Lier des donn\xE9es",
|
|
7981
9121
|
"Advanced Data Graphics": "Graphiques de donn\xE9es avanc\xE9s",
|
|
9122
|
+
"Data Visualizer": "Visualiseur de donn\xE9es",
|
|
9123
|
+
"Basic Flowchart...": "Organigramme de base...",
|
|
9124
|
+
"Cross-Functional Flowchart...": "Organigramme interfonctionnel...",
|
|
9125
|
+
"Refresh Diagram": "Actualiser le diagramme",
|
|
9126
|
+
"Download Table Template": "T\xE9l\xE9charger le mod\xE8le de tableau",
|
|
7982
9127
|
Subprocess: "Sous-processus",
|
|
7983
9128
|
"Create New": "Cr\xE9er",
|
|
7984
9129
|
"Link to Existing": "Lier \xE0 un existant",
|
|
@@ -8051,7 +9196,7 @@ var frCommands = {
|
|
|
8051
9196
|
Contrast: "Contraste",
|
|
8052
9197
|
"Auto Balance": "\xC9quilibrage automatique",
|
|
8053
9198
|
Compression: "Compression",
|
|
8054
|
-
Crop: "
|
|
9199
|
+
Crop: "Recadrer",
|
|
8055
9200
|
Margins: "Marges",
|
|
8056
9201
|
"Fit to Contents": "Ajuster au contenu",
|
|
8057
9202
|
"Automatic Resize": "Redimensionnement automatique",
|
|
@@ -8083,6 +9228,7 @@ var frCommands = {
|
|
|
8083
9228
|
Coworker: "Coll\xE8gue",
|
|
8084
9229
|
Assistant: "Assistant",
|
|
8085
9230
|
"Delete Position": "Supprimer la position",
|
|
9231
|
+
"Import Org Chart": "Importer un organigramme",
|
|
8086
9232
|
None: "Aucun",
|
|
8087
9233
|
Narrow: "\xC9troit",
|
|
8088
9234
|
Normal: "Normal",
|
|
@@ -8159,11 +9305,8 @@ var frText = {
|
|
|
8159
9305
|
"Open a .vsdx file to add backgrounds.": "Ouvrez un fichier .vsdx pour ajouter des arri\xE8re-plans.",
|
|
8160
9306
|
"Open a .vsdx file to lay out its shapes.": "Ouvrez un fichier .vsdx pour disposer ses formes.",
|
|
8161
9307
|
"open a .vsdx file to lay out its shapes.": "Ouvrez un fichier .vsdx pour disposer ses formes.",
|
|
8162
|
-
"3-D rotation needs a 3-D renderer.": "La rotation 3D n\xE9cessite un moteur de rendu 3D.",
|
|
8163
|
-
"Bevel needs 3-D lighting the SVG renderer does not draw.": "Le biseau n\xE9cessite un \xE9clairage 3D que le moteur SVG ne dessine pas.",
|
|
8164
9308
|
"Custom theme colour sets are not written yet; pick a theme or variant.": "Les jeux de couleurs de th\xE8me personnalis\xE9s ne sont pas encore \xE9crits ; choisissez un th\xE8me ou une variante.",
|
|
8165
9309
|
"DWG and DXF import is not supported.": "L'importation de DWG et DXF n'est pas prise en charge.",
|
|
8166
|
-
"Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "Les graphiques de donn\xE9es se choisissent dans le menu Graphiques de donn\xE9es ; il n'y a pas de volet des champs.",
|
|
8167
9310
|
"Data graphics are placed at their default position; this option is not built yet.": "Les graphiques de donn\xE9es sont plac\xE9s \xE0 leur position par d\xE9faut ; cette option n'est pas encore disponible.",
|
|
8168
9311
|
"Embedded Excel charts are not supported.": "Les graphiques Excel incorpor\xE9s ne sont pas pris en charge.",
|
|
8169
9312
|
"Embedded OLE objects are not supported; only pictures can be inserted.": "Les objets OLE incorpor\xE9s ne sont pas pris en charge ; seules les images peuvent \xEAtre ins\xE9r\xE9es.",
|
|
@@ -8214,6 +9357,100 @@ var frText = {
|
|
|
8214
9357
|
"Style {n}": "Style {n}"
|
|
8215
9358
|
};
|
|
8216
9359
|
|
|
9360
|
+
// src/visio/locales/fr-backstage.ts
|
|
9361
|
+
var frBackstage = {
|
|
9362
|
+
Info: "Informations",
|
|
9363
|
+
New: "Nouveau",
|
|
9364
|
+
Save: "Enregistrer",
|
|
9365
|
+
"Save As": "Enregistrer sous",
|
|
9366
|
+
Print: "Imprimer",
|
|
9367
|
+
Close: "Fermer",
|
|
9368
|
+
Account: "Compte",
|
|
9369
|
+
"Documents stay in this browser; nothing is uploaded.": "Les documents restent dans ce navigateur ; rien n\u2019est t\xE9l\xE9vers\xE9.",
|
|
9370
|
+
"Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "Les dessins r\xE9cents ne sont pas suivis. Les documents restent dans ce navigateur ; rien n\u2019est t\xE9l\xE9vers\xE9.",
|
|
9371
|
+
"Session name": "Nom de la session",
|
|
9372
|
+
"Start sharing": "D\xE9marrer le partage",
|
|
9373
|
+
"Stop sharing": "Arr\xEAter le partage",
|
|
9374
|
+
"Share with people": "Partager avec des personnes",
|
|
9375
|
+
"Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "Modifiez ce dessin avec d\u2019autres fen\xEAtres de ce navigateur. Ouvrez le m\xEAme nom de session dans une autre fen\xEAtre pour vous joindre.",
|
|
9376
|
+
"The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "Tout le dessin est partag\xE9 ; si deux personnes le modifient en m\xEAme temps, la derni\xE8re modification l\u2019emporte. Rien ne quitte cet appareil.",
|
|
9377
|
+
"People in this session": "Personnes dans cette session",
|
|
9378
|
+
"Product Information": "Informations sur le produit",
|
|
9379
|
+
"Visio viewer (beta). No sign-in or subscription is used.": "Visionneuse Visio (b\xEAta). Aucune connexion ni aucun abonnement n\u2019est utilis\xE9.",
|
|
9380
|
+
"Back to the drawing": "Retour au dessin",
|
|
9381
|
+
"Current page": "Page actuelle",
|
|
9382
|
+
"Page size": "Taille de la page",
|
|
9383
|
+
Compatibility: "Compatibilit\xE9",
|
|
9384
|
+
"Add Comment": "Ajouter un commentaire",
|
|
9385
|
+
"Comment on the current page or selected shape.": "Commentez la page actuelle ou la forme s\xE9lectionn\xE9e.",
|
|
9386
|
+
Browse: "Parcourir",
|
|
9387
|
+
"Open a .vsdx drawing or a legacy .vsd preview from this device.": "Ouvrez un dessin .vsdx ou un aper\xE7u .vsd ancien depuis cet appareil.",
|
|
9388
|
+
"Download a copy": "T\xE9l\xE9charger une copie",
|
|
9389
|
+
"Save the drawing, with your edits, as a .vsdx file.": "Enregistrez le dessin, avec vos modifications, dans un fichier .vsdx.",
|
|
9390
|
+
"Export the current page as SVG": "Exporter la page actuelle en SVG",
|
|
9391
|
+
"An approximate picture with compatibility notes.": "Une image approximative avec des notes de compatibilit\xE9.",
|
|
9392
|
+
"Print the current page.": "Imprimer la page actuelle.",
|
|
9393
|
+
"Print preview of the current page": "Aper\xE7u avant impression de la page actuelle",
|
|
9394
|
+
"Open a drawing to print it.": "Ouvrez un dessin pour l\u2019imprimer.",
|
|
9395
|
+
"Printer paper, page size, drawing scale and page properties.": "Papier de l\u2019imprimante, taille de page, \xE9chelle du dessin et propri\xE9t\xE9s de la page.",
|
|
9396
|
+
Email: "E-mail",
|
|
9397
|
+
"Send the drawing as an attachment.": "Envoyez le dessin en pi\xE8ce jointe.",
|
|
9398
|
+
"Create PDF/XPS Document": "Cr\xE9er un document PDF/XPS",
|
|
9399
|
+
"A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "Un PDF vectoriel avec une page par page de premier plan choisie, \xE0 la taille de la page et avec du texte s\xE9lectionnable. Les d\xE9grad\xE9s sont des aplats et les ombres des d\xE9calages \xE0 bords nets ; la lueur est approxim\xE9e ; le flou, les bords adoucis et les reflets ne sont pas dessin\xE9s. Le texte utilise des polices standard, sauf si l\u2019h\xF4te fournit des polices \xE0 int\xE9grer. Une page qui ne peut pas \xEAtre dessin\xE9e en vecteurs devient une image, et le rapport ci-dessous l\u2019indique. Le XPS n\u2019est pas propos\xE9.",
|
|
9400
|
+
"Change File Type": "Changer de type de fichier",
|
|
9401
|
+
"Visio Drawing (*.vsdx)": "Dessin Visio (*.vsdx)",
|
|
9402
|
+
"A copy of the drawing with your edits.": "Une copie du dessin avec vos modifications.",
|
|
9403
|
+
"SVG (*.svg)": "SVG (*.svg)",
|
|
9404
|
+
"The current page as an approximate vector picture.": "La page actuelle sous forme d\u2019image vectorielle approximative.",
|
|
9405
|
+
"PDF (*.pdf)": "PDF (*.pdf)",
|
|
9406
|
+
"Every foreground page as vector shapes and selectable text.": "Chaque page de premier plan en formes vectorielles et texte s\xE9lectionnable.",
|
|
9407
|
+
"PNG picture (*.png)": "Image PNG (*.png)",
|
|
9408
|
+
"The current page at 150 dpi.": "La page actuelle \xE0 150 ppp.",
|
|
9409
|
+
"VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "Les formats VSD, VSDM, VDX, gabarit, mod\xE8le et XPS ne sont pas propos\xE9s : ils n\xE9cessitent des conversions que cette visionneuse ne poss\xE8de pas.",
|
|
9410
|
+
"Choose a Visio drawing": "Choisir un dessin Visio",
|
|
9411
|
+
"Blank Drawing": "Dessin vierge",
|
|
9412
|
+
"Start an empty drawing.": "Commencer un dessin vide.",
|
|
9413
|
+
"Basic Flowchart": "Organigramme de base",
|
|
9414
|
+
"A short process with a decision, using Basic Flowchart Shapes.": "Un court processus avec une d\xE9cision, utilisant les formes de base des organigrammes.",
|
|
9415
|
+
"A process across three horizontal swimlanes that stack and resize together.": "Un processus sur trois couloirs horizontaux qui s\u2019empilent et se redimensionnent ensemble.",
|
|
9416
|
+
"Basic Organization Chart": "Organigramme hi\xE9rarchique de base",
|
|
9417
|
+
"A small reporting hierarchy joined by connectors.": "Une petite hi\xE9rarchie de rapports reli\xE9e par des connecteurs.",
|
|
9418
|
+
"No drawing open": "Aucun dessin ouvert",
|
|
9419
|
+
"Untitled drawing": "Dessin sans titre",
|
|
9420
|
+
"Legacy VSD preview (read only)": "Aper\xE7u VSD ancien (lecture seule)",
|
|
9421
|
+
"Preview (read-only)": "Aper\xE7u (lecture seule)",
|
|
9422
|
+
"Edited copy (not saved)": "Copie modifi\xE9e (non enregistr\xE9e)",
|
|
9423
|
+
Original: "Original",
|
|
9424
|
+
"{width} \xD7 {height} in": "{width} \xD7 {height} po",
|
|
9425
|
+
"{count} top-level": "{count} de premier niveau",
|
|
9426
|
+
"One part of this drawing is shown approximately or not at all:": "Une partie de ce dessin est affich\xE9e de fa\xE7on approximative ou pas du tout :",
|
|
9427
|
+
"{count} parts of this drawing are shown approximately or not at all:": "{count} parties de ce dessin sont affich\xE9es de fa\xE7on approximative ou pas du tout :",
|
|
9428
|
+
"No compatibility notes.": "Aucune note de compatibilit\xE9.",
|
|
9429
|
+
"Wait for the current document operation.": "Attendez la fin de l\u2019op\xE9ration en cours sur le document.",
|
|
9430
|
+
"Legacy VSD drawings are read only here.": "Les dessins VSD anciens sont en lecture seule ici.",
|
|
9431
|
+
"Open a .vsdx file to save a copy.": "Ouvrez un fichier .vsdx pour enregistrer une copie.",
|
|
9432
|
+
"Open a .vsdx file to change the page setup.": "Ouvrez un fichier .vsdx pour modifier la mise en page.",
|
|
9433
|
+
"Downloaded a copy of the drawing.": "Une copie du dessin a \xE9t\xE9 t\xE9l\xE9charg\xE9e.",
|
|
9434
|
+
"Saved the drawing.": "Le dessin a \xE9t\xE9 enregistr\xE9.",
|
|
9435
|
+
"SVG export requested. This is an approximate snapshot.": "Export SVG demand\xE9. Il s\u2019agit d\u2019un instantan\xE9 approximatif.",
|
|
9436
|
+
"Preparing the PDF...": "Pr\xE9paration du PDF...",
|
|
9437
|
+
"Preparing the PNG...": "Pr\xE9paration du PNG...",
|
|
9438
|
+
"PNG export requested. Pages are pictures of the approximate rendering.": "Export PNG demand\xE9. Les pages sont des images du rendu approximatif.",
|
|
9439
|
+
"PDF export requested.": "Export PDF demand\xE9.",
|
|
9440
|
+
"PDF export requested. {count} page(s) lost something; see the report on the Export page.": "Export PDF demand\xE9. {count} page(s) ont perdu des \xE9l\xE9ments ; voir le rapport sur la page Exporter.",
|
|
9441
|
+
"PDF options": "Options PDF",
|
|
9442
|
+
"All pages": "Toutes les pages",
|
|
9443
|
+
"Page range": "Plage de pages",
|
|
9444
|
+
From: "De",
|
|
9445
|
+
To: "\xC0",
|
|
9446
|
+
"{page}: drawn as vectors with selectable text.": "{page} : dessin\xE9e en vecteurs avec texte s\xE9lectionnable.",
|
|
9447
|
+
"{page}: saved as a picture ({reason}).": "{page} : enregistr\xE9e sous forme d\u2019image ({reason}).",
|
|
9448
|
+
"it cannot be drawn as vectors": "elle ne peut pas \xEAtre dessin\xE9e en vecteurs",
|
|
9449
|
+
"Fonts embedded: {fonts}.": "Polices int\xE9gr\xE9es : {fonts}.",
|
|
9450
|
+
"Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "Polices non int\xE9gr\xE9es (pas TrueType, ou la licence de la police interdit l\u2019int\xE9gration) : {fonts}.",
|
|
9451
|
+
"PDF created: {count} page(s)": "PDF cr\xE9\xE9 : {count} page(s)"
|
|
9452
|
+
};
|
|
9453
|
+
|
|
8217
9454
|
// src/visio/locales/zh-CN-commands.ts
|
|
8218
9455
|
var zhCNCommands = {
|
|
8219
9456
|
Home: "\u5F00\u59CB",
|
|
@@ -8295,6 +9532,32 @@ var zhCNCommands = {
|
|
|
8295
9532
|
"Soft Edges Options...": "\u67D4\u5316\u8FB9\u7F18\u9009\u9879...",
|
|
8296
9533
|
Bevel: "\u68F1\u53F0",
|
|
8297
9534
|
"3-D Rotation": "\u4E09\u7EF4\u65CB\u8F6C",
|
|
9535
|
+
Circle: "\u5706",
|
|
9536
|
+
"Relaxed Inset": "\u677E\u6563\u5D4C\u5165",
|
|
9537
|
+
Cross: "\u5341\u5B57\u5F62",
|
|
9538
|
+
"Cool Slant": "\u51B7\u8272\u8C03\u659C\u9762",
|
|
9539
|
+
Angle: "\u89D2\u5EA6",
|
|
9540
|
+
"Soft Round": "\u67D4\u5706",
|
|
9541
|
+
Convex: "\u51F8\u5706\u5F62",
|
|
9542
|
+
Slope: "\u659C\u9762",
|
|
9543
|
+
Divot: "\u504F\u79FB\u91CF",
|
|
9544
|
+
Riblet: "\u68F1\u7EB9",
|
|
9545
|
+
"Hard Edge": "\u786C\u8FB9\u7F18",
|
|
9546
|
+
"Art Deco": "\u88C5\u9970\u827A\u672F\u6548\u679C",
|
|
9547
|
+
"No Bevel": "\u65E0\u68F1\u53F0",
|
|
9548
|
+
"No Rotation": "\u65E0\u65CB\u8F6C",
|
|
9549
|
+
"Isometric Left Down": "\u7B49\u8F74\u5DE6\u4E0B",
|
|
9550
|
+
"Isometric Right Up": "\u7B49\u8F74\u53F3\u4E0A",
|
|
9551
|
+
"Isometric Top Up": "\u7B49\u8F74\u9876\u90E8\u5411\u4E0A",
|
|
9552
|
+
"Off Axis Left": "\u79BB\u8F74\u5DE6",
|
|
9553
|
+
"Off Axis Right": "\u79BB\u8F74\u53F3",
|
|
9554
|
+
"Perspective Left": "\u900F\u89C6\u5DE6",
|
|
9555
|
+
"Perspective Right": "\u900F\u89C6\u53F3",
|
|
9556
|
+
"Perspective Relaxed": "\u900F\u89C6\u653E\u677E",
|
|
9557
|
+
"Perspective Above": "\u900F\u89C6\u4E0A\u65B9",
|
|
9558
|
+
"Perspective Below": "\u900F\u89C6\u4E0B\u65B9",
|
|
9559
|
+
"Perspective Heroic Left": "\u900F\u89C6\u82F1\u96C4\u5DE6",
|
|
9560
|
+
"Perspective Heroic Right": "\u900F\u89C6\u82F1\u96C4\u53F3",
|
|
8298
9561
|
Arrange: "\u6392\u5217",
|
|
8299
9562
|
Align: "\u5BF9\u9F50",
|
|
8300
9563
|
"Align Center": "\u5C45\u4E2D\u5BF9\u9F50",
|
|
@@ -8406,6 +9669,11 @@ var zhCNCommands = {
|
|
|
8406
9669
|
"Advanced Data Linking": "\u9AD8\u7EA7\u6570\u636E\u94FE\u63A5",
|
|
8407
9670
|
"Link Data": "\u94FE\u63A5\u6570\u636E",
|
|
8408
9671
|
"Advanced Data Graphics": "\u9AD8\u7EA7\u6570\u636E\u56FE\u5F62",
|
|
9672
|
+
"Data Visualizer": "\u6570\u636E\u53EF\u89C6\u5316\u5DE5\u5177",
|
|
9673
|
+
"Basic Flowchart...": "\u57FA\u672C\u6D41\u7A0B\u56FE...",
|
|
9674
|
+
"Cross-Functional Flowchart...": "\u8DE8\u804C\u80FD\u6D41\u7A0B\u56FE...",
|
|
9675
|
+
"Refresh Diagram": "\u5237\u65B0\u56FE\u8868",
|
|
9676
|
+
"Download Table Template": "\u4E0B\u8F7D\u8868\u683C\u6A21\u677F",
|
|
8409
9677
|
Subprocess: "\u5B50\u6D41\u7A0B",
|
|
8410
9678
|
"Create New": "\u65B0\u5EFA",
|
|
8411
9679
|
"Link to Existing": "\u94FE\u63A5\u5230\u73B0\u6709",
|
|
@@ -8510,6 +9778,7 @@ var zhCNCommands = {
|
|
|
8510
9778
|
Coworker: "\u540C\u4E8B",
|
|
8511
9779
|
Assistant: "\u52A9\u7406",
|
|
8512
9780
|
"Delete Position": "\u5220\u9664\u804C\u4F4D",
|
|
9781
|
+
"Import Org Chart": "\u5BFC\u5165\u7EC4\u7EC7\u7ED3\u6784\u56FE",
|
|
8513
9782
|
None: "\u65E0",
|
|
8514
9783
|
Narrow: "\u7A84",
|
|
8515
9784
|
Normal: "\u666E\u901A",
|
|
@@ -8586,11 +9855,8 @@ var zhCNText = {
|
|
|
8586
9855
|
"Open a .vsdx file to add backgrounds.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u6DFB\u52A0\u80CC\u666F\u3002",
|
|
8587
9856
|
"Open a .vsdx file to lay out its shapes.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u5E03\u5C40\u5176\u5F62\u72B6\u3002",
|
|
8588
9857
|
"open a .vsdx file to lay out its shapes.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u5E03\u5C40\u5176\u5F62\u72B6\u3002",
|
|
8589
|
-
"3-D rotation needs a 3-D renderer.": "\u4E09\u7EF4\u65CB\u8F6C\u9700\u8981\u4E09\u7EF4\u6E32\u67D3\u5668\u3002",
|
|
8590
|
-
"Bevel needs 3-D lighting the SVG renderer does not draw.": "\u68F1\u53F0\u9700\u8981 SVG \u6E32\u67D3\u5668\u65E0\u6CD5\u7ED8\u5236\u7684\u4E09\u7EF4\u5149\u7167\u3002",
|
|
8591
9858
|
"Custom theme colour sets are not written yet; pick a theme or variant.": "\u5C1A\u4E0D\u80FD\u5199\u5165\u81EA\u5B9A\u4E49\u4E3B\u9898\u989C\u8272\u96C6\uFF1B\u8BF7\u9009\u62E9\u4E3B\u9898\u6216\u53D8\u4F53\u3002",
|
|
8592
9859
|
"DWG and DXF import is not supported.": "\u4E0D\u652F\u6301\u5BFC\u5165 DWG \u548C DXF\u3002",
|
|
8593
|
-
"Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "\u6570\u636E\u56FE\u5F62\u5728\u201C\u6570\u636E\u56FE\u5F62\u201D\u83DC\u5355\u4E2D\u9009\u62E9\uFF1B\u6CA1\u6709\u5B57\u6BB5\u7A97\u683C\u3002",
|
|
8594
9860
|
"Data graphics are placed at their default position; this option is not built yet.": "\u6570\u636E\u56FE\u5F62\u653E\u7F6E\u5728\u9ED8\u8BA4\u4F4D\u7F6E\uFF1B\u5C1A\u672A\u63D0\u4F9B\u6B64\u9009\u9879\u3002",
|
|
8595
9861
|
"Embedded Excel charts are not supported.": "\u4E0D\u652F\u6301\u5D4C\u5165\u7684 Excel \u56FE\u8868\u3002",
|
|
8596
9862
|
"Embedded OLE objects are not supported; only pictures can be inserted.": "\u4E0D\u652F\u6301\u5D4C\u5165\u7684 OLE \u5BF9\u8C61\uFF1B\u53EA\u80FD\u63D2\u5165\u56FE\u7247\u3002",
|
|
@@ -8641,14 +9907,108 @@ var zhCNText = {
|
|
|
8641
9907
|
"Style {n}": "\u6837\u5F0F {n}"
|
|
8642
9908
|
};
|
|
8643
9909
|
|
|
9910
|
+
// src/visio/locales/zh-CN-backstage.ts
|
|
9911
|
+
var zhCNBackstage = {
|
|
9912
|
+
Info: "\u4FE1\u606F",
|
|
9913
|
+
New: "\u65B0\u5EFA",
|
|
9914
|
+
Save: "\u4FDD\u5B58",
|
|
9915
|
+
"Save As": "\u53E6\u5B58\u4E3A",
|
|
9916
|
+
Print: "\u6253\u5370",
|
|
9917
|
+
Close: "\u5173\u95ED",
|
|
9918
|
+
Account: "\u5E10\u6237",
|
|
9919
|
+
"Documents stay in this browser; nothing is uploaded.": "\u6587\u6863\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668\u4E2D\uFF1B\u4E0D\u4F1A\u4E0A\u4F20\u4EFB\u4F55\u5185\u5BB9\u3002",
|
|
9920
|
+
"Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "\u4E0D\u8BB0\u5F55\u6700\u8FD1\u4F7F\u7528\u7684\u56FE\u8868\u3002\u6587\u6863\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668\u4E2D\uFF1B\u4E0D\u4F1A\u4E0A\u4F20\u4EFB\u4F55\u5185\u5BB9\u3002",
|
|
9921
|
+
"Session name": "\u4F1A\u8BDD\u540D\u79F0",
|
|
9922
|
+
"Start sharing": "\u5F00\u59CB\u5171\u4EAB",
|
|
9923
|
+
"Stop sharing": "\u505C\u6B62\u5171\u4EAB",
|
|
9924
|
+
"Share with people": "\u4E0E\u4ED6\u4EBA\u5171\u4EAB",
|
|
9925
|
+
"Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "\u4E0E\u6B64\u6D4F\u89C8\u5668\u7684\u5176\u4ED6\u7A97\u53E3\u5171\u540C\u7F16\u8F91\u6B64\u56FE\u8868\u3002\u5728\u53E6\u4E00\u4E2A\u7A97\u53E3\u4E2D\u6253\u5F00\u76F8\u540C\u7684\u4F1A\u8BDD\u540D\u79F0\u5373\u53EF\u52A0\u5165\u3002",
|
|
9926
|
+
"The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "\u6574\u4E2A\u56FE\u8868\u90FD\u4F1A\u5171\u4EAB\uFF1B\u5982\u679C\u4E24\u4EBA\u540C\u65F6\u4FEE\u6539\uFF0C\u4EE5\u6700\u540E\u4E00\u6B21\u4FEE\u6539\u4E3A\u51C6\u3002\u5185\u5BB9\u4E0D\u4F1A\u79BB\u5F00\u6B64\u8BBE\u5907\u3002",
|
|
9927
|
+
"People in this session": "\u6B64\u4F1A\u8BDD\u4E2D\u7684\u4EBA\u5458",
|
|
9928
|
+
"Product Information": "\u4EA7\u54C1\u4FE1\u606F",
|
|
9929
|
+
"Visio viewer (beta). No sign-in or subscription is used.": "Visio \u67E5\u770B\u5668\uFF08\u6D4B\u8BD5\u7248\uFF09\u3002\u4E0D\u4F7F\u7528\u767B\u5F55\u6216\u8BA2\u9605\u3002",
|
|
9930
|
+
"Back to the drawing": "\u8FD4\u56DE\u56FE\u8868",
|
|
9931
|
+
"Current page": "\u5F53\u524D\u9875\u9762",
|
|
9932
|
+
"Page size": "\u9875\u9762\u5927\u5C0F",
|
|
9933
|
+
Compatibility: "\u517C\u5BB9\u6027",
|
|
9934
|
+
"Add Comment": "\u6DFB\u52A0\u6279\u6CE8",
|
|
9935
|
+
"Comment on the current page or selected shape.": "\u5BF9\u5F53\u524D\u9875\u9762\u6216\u6240\u9009\u5F62\u72B6\u6DFB\u52A0\u6279\u6CE8\u3002",
|
|
9936
|
+
Browse: "\u6D4F\u89C8",
|
|
9937
|
+
"Open a .vsdx drawing or a legacy .vsd preview from this device.": "\u4ECE\u6B64\u8BBE\u5907\u6253\u5F00 .vsdx \u56FE\u8868\u6216\u65E7\u7248 .vsd \u9884\u89C8\u3002",
|
|
9938
|
+
"Download a copy": "\u4E0B\u8F7D\u526F\u672C",
|
|
9939
|
+
"Save the drawing, with your edits, as a .vsdx file.": "\u5C06\u56FE\u8868\uFF08\u5305\u62EC\u60A8\u7684\u4FEE\u6539\uFF09\u4FDD\u5B58\u4E3A .vsdx \u6587\u4EF6\u3002",
|
|
9940
|
+
"Export the current page as SVG": "\u5C06\u5F53\u524D\u9875\u9762\u5BFC\u51FA\u4E3A SVG",
|
|
9941
|
+
"An approximate picture with compatibility notes.": "\u5E26\u6709\u517C\u5BB9\u6027\u8BF4\u660E\u7684\u8FD1\u4F3C\u56FE\u7247\u3002",
|
|
9942
|
+
"Print the current page.": "\u6253\u5370\u5F53\u524D\u9875\u9762\u3002",
|
|
9943
|
+
"Print preview of the current page": "\u5F53\u524D\u9875\u9762\u7684\u6253\u5370\u9884\u89C8",
|
|
9944
|
+
"Open a drawing to print it.": "\u6253\u5F00\u56FE\u8868\u540E\u5373\u53EF\u6253\u5370\u3002",
|
|
9945
|
+
"Printer paper, page size, drawing scale and page properties.": "\u6253\u5370\u673A\u7EB8\u5F20\u3001\u9875\u9762\u5927\u5C0F\u3001\u56FE\u8868\u6BD4\u4F8B\u548C\u9875\u9762\u5C5E\u6027\u3002",
|
|
9946
|
+
Email: "\u7535\u5B50\u90AE\u4EF6",
|
|
9947
|
+
"Send the drawing as an attachment.": "\u4EE5\u9644\u4EF6\u5F62\u5F0F\u53D1\u9001\u56FE\u8868\u3002",
|
|
9948
|
+
"Create PDF/XPS Document": "\u521B\u5EFA PDF/XPS \u6587\u6863",
|
|
9949
|
+
"A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "\u77E2\u91CF PDF\uFF0C\u6BCF\u4E2A\u6240\u9009\u524D\u666F\u9875\u5BF9\u5E94\u4E00\u9875\uFF0C\u9875\u9762\u5927\u5C0F\u4E0D\u53D8\uFF0C\u6587\u672C\u53EF\u9009\u62E9\u3002\u6E10\u53D8\u4EE5\u7740\u8272\u65B9\u5F0F\u7ED8\u5236\uFF0C\u9634\u5F71\u4E3A\u786C\u8FB9\u504F\u79FB\uFF1B\u53D1\u5149\u4E3A\u8FD1\u4F3C\u6548\u679C\uFF1B\u6A21\u7CCA\u3001\u67D4\u5316\u8FB9\u7F18\u548C\u5012\u5F71\u4E0D\u7ED8\u5236\u3002\u9664\u975E\u5BBF\u4E3B\u63D0\u4F9B\u8981\u5D4C\u5165\u7684\u5B57\u4F53\uFF0C\u5426\u5219\u6587\u672C\u4F7F\u7528\u6807\u51C6\u5B57\u4F53\u3002\u65E0\u6CD5\u4EE5\u77E2\u91CF\u7ED8\u5236\u7684\u9875\u9762\u4F1A\u53D8\u4E3A\u56FE\u7247\uFF0C\u4E0B\u65B9\u62A5\u544A\u4F1A\u8BF4\u660E\u54EA\u4E9B\u9875\u9762\u3002\u4E0D\u63D0\u4F9B XPS\u3002",
|
|
9950
|
+
"Change File Type": "\u66F4\u6539\u6587\u4EF6\u7C7B\u578B",
|
|
9951
|
+
"Visio Drawing (*.vsdx)": "Visio \u56FE\u8868 (*.vsdx)",
|
|
9952
|
+
"A copy of the drawing with your edits.": "\u5305\u542B\u60A8\u4FEE\u6539\u5185\u5BB9\u7684\u56FE\u8868\u526F\u672C\u3002",
|
|
9953
|
+
"SVG (*.svg)": "SVG (*.svg)",
|
|
9954
|
+
"The current page as an approximate vector picture.": "\u5F53\u524D\u9875\u9762\u7684\u8FD1\u4F3C\u77E2\u91CF\u56FE\u7247\u3002",
|
|
9955
|
+
"PDF (*.pdf)": "PDF (*.pdf)",
|
|
9956
|
+
"Every foreground page as vector shapes and selectable text.": "\u6BCF\u4E2A\u524D\u666F\u9875\u9762\u4EE5\u77E2\u91CF\u56FE\u5F62\u548C\u53EF\u9009\u6587\u672C\u5F62\u5F0F\u8F93\u51FA\u3002",
|
|
9957
|
+
"PNG picture (*.png)": "PNG \u56FE\u7247 (*.png)",
|
|
9958
|
+
"The current page at 150 dpi.": "\u5F53\u524D\u9875\u9762\uFF0C150 dpi\u3002",
|
|
9959
|
+
"VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "\u4E0D\u63D0\u4F9B VSD\u3001VSDM\u3001VDX\u3001\u6A21\u5177\u3001\u6A21\u677F\u548C XPS \u683C\u5F0F\uFF1A\u8FD9\u4E9B\u683C\u5F0F\u9700\u8981\u672C\u67E5\u770B\u5668\u4E0D\u5177\u5907\u7684\u8F6C\u6362\u529F\u80FD\u3002",
|
|
9960
|
+
"Choose a Visio drawing": "\u9009\u62E9 Visio \u56FE\u8868",
|
|
9961
|
+
"Blank Drawing": "\u7A7A\u767D\u56FE\u8868",
|
|
9962
|
+
"Start an empty drawing.": "\u65B0\u5EFA\u7A7A\u767D\u56FE\u8868\u3002",
|
|
9963
|
+
"Basic Flowchart": "\u57FA\u672C\u6D41\u7A0B\u56FE",
|
|
9964
|
+
"A short process with a decision, using Basic Flowchart Shapes.": "\u4E00\u4E2A\u5305\u542B\u51B3\u7B56\u7684\u7B80\u77ED\u6D41\u7A0B\uFF0C\u4F7F\u7528\u57FA\u672C\u6D41\u7A0B\u56FE\u5F62\u72B6\u3002",
|
|
9965
|
+
"A process across three horizontal swimlanes that stack and resize together.": "\u8DE8\u4E09\u6761\u6C34\u5E73\u6CF3\u9053\u7684\u6D41\u7A0B\uFF0C\u6CF3\u9053\u4F1A\u4E00\u8D77\u5806\u53E0\u548C\u8C03\u6574\u5927\u5C0F\u3002",
|
|
9966
|
+
"Basic Organization Chart": "\u57FA\u672C\u7EC4\u7EC7\u7ED3\u6784\u56FE",
|
|
9967
|
+
"A small reporting hierarchy joined by connectors.": "\u7531\u8FDE\u63A5\u7EBF\u76F8\u8FDE\u7684\u5C0F\u578B\u6C47\u62A5\u5C42\u7EA7\u3002",
|
|
9968
|
+
"No drawing open": "\u672A\u6253\u5F00\u56FE\u8868",
|
|
9969
|
+
"Untitled drawing": "\u672A\u547D\u540D\u56FE\u8868",
|
|
9970
|
+
"Legacy VSD preview (read only)": "\u65E7\u7248 VSD \u9884\u89C8\uFF08\u53EA\u8BFB\uFF09",
|
|
9971
|
+
"Preview (read-only)": "\u9884\u89C8\uFF08\u53EA\u8BFB\uFF09",
|
|
9972
|
+
"Edited copy (not saved)": "\u5DF2\u7F16\u8F91\u7684\u526F\u672C\uFF08\u672A\u4FDD\u5B58\uFF09",
|
|
9973
|
+
Original: "\u539F\u59CB",
|
|
9974
|
+
"{width} \xD7 {height} in": "{width} \xD7 {height} \u82F1\u5BF8",
|
|
9975
|
+
"{count} top-level": "{count} \u4E2A\u9876\u5C42\u5F62\u72B6",
|
|
9976
|
+
"One part of this drawing is shown approximately or not at all:": "\u6B64\u56FE\u8868\u6709 1 \u4E2A\u90E8\u5206\u4EC5\u8FD1\u4F3C\u663E\u793A\u6216\u4E0D\u663E\u793A\uFF1A",
|
|
9977
|
+
"{count} parts of this drawing are shown approximately or not at all:": "\u6B64\u56FE\u8868\u6709 {count} \u4E2A\u90E8\u5206\u4EC5\u8FD1\u4F3C\u663E\u793A\u6216\u4E0D\u663E\u793A\uFF1A",
|
|
9978
|
+
"No compatibility notes.": "\u6CA1\u6709\u517C\u5BB9\u6027\u8BF4\u660E\u3002",
|
|
9979
|
+
"Wait for the current document operation.": "\u8BF7\u7B49\u5F85\u5F53\u524D\u6587\u6863\u64CD\u4F5C\u5B8C\u6210\u3002",
|
|
9980
|
+
"Legacy VSD drawings are read only here.": "\u6B64\u5904\u7684\u65E7\u7248 VSD \u56FE\u8868\u4E3A\u53EA\u8BFB\u3002",
|
|
9981
|
+
"Open a .vsdx file to save a copy.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u4FDD\u5B58\u526F\u672C\u3002",
|
|
9982
|
+
"Open a .vsdx file to change the page setup.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u66F4\u6539\u9875\u9762\u8BBE\u7F6E\u3002",
|
|
9983
|
+
"Downloaded a copy of the drawing.": "\u5DF2\u4E0B\u8F7D\u56FE\u8868\u526F\u672C\u3002",
|
|
9984
|
+
"Saved the drawing.": "\u5DF2\u4FDD\u5B58\u56FE\u8868\u3002",
|
|
9985
|
+
"SVG export requested. This is an approximate snapshot.": "\u5DF2\u8BF7\u6C42\u5BFC\u51FA SVG\u3002\u8FD9\u662F\u8FD1\u4F3C\u5FEB\u7167\u3002",
|
|
9986
|
+
"Preparing the PDF...": "\u6B63\u5728\u51C6\u5907 PDF...",
|
|
9987
|
+
"Preparing the PNG...": "\u6B63\u5728\u51C6\u5907 PNG...",
|
|
9988
|
+
"PNG export requested. Pages are pictures of the approximate rendering.": "\u5DF2\u8BF7\u6C42\u5BFC\u51FA PNG\u3002\u9875\u9762\u4E3A\u8FD1\u4F3C\u6E32\u67D3\u7684\u56FE\u7247\u3002",
|
|
9989
|
+
"PDF export requested.": "\u5DF2\u8BF7\u6C42\u5BFC\u51FA PDF\u3002",
|
|
9990
|
+
"PDF export requested. {count} page(s) lost something; see the report on the Export page.": "\u5DF2\u8BF7\u6C42\u5BFC\u51FA PDF\u3002{count} \u4E2A\u9875\u9762\u4E22\u5931\u4E86\u90E8\u5206\u5185\u5BB9\uFF1B\u8BF7\u67E5\u770B\u201C\u5BFC\u51FA\u201D\u9875\u9762\u4E0A\u7684\u62A5\u544A\u3002",
|
|
9991
|
+
"PDF options": "PDF \u9009\u9879",
|
|
9992
|
+
"All pages": "\u6240\u6709\u9875\u9762",
|
|
9993
|
+
"Page range": "\u9875\u9762\u8303\u56F4",
|
|
9994
|
+
From: "\u4ECE",
|
|
9995
|
+
To: "\u5230",
|
|
9996
|
+
"{page}: drawn as vectors with selectable text.": "{page}\uFF1A\u4EE5\u77E2\u91CF\u7ED8\u5236\uFF0C\u6587\u672C\u53EF\u9009\u62E9\u3002",
|
|
9997
|
+
"{page}: saved as a picture ({reason}).": "{page}\uFF1A\u53E6\u5B58\u4E3A\u56FE\u7247\uFF08{reason}\uFF09\u3002",
|
|
9998
|
+
"it cannot be drawn as vectors": "\u65E0\u6CD5\u4EE5\u77E2\u91CF\u7ED8\u5236",
|
|
9999
|
+
"Fonts embedded: {fonts}.": "\u5DF2\u5D4C\u5165\u5B57\u4F53\uFF1A{fonts}\u3002",
|
|
10000
|
+
"Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "\u672A\u5D4C\u5165\u7684\u5B57\u4F53\uFF08\u4E0D\u662F TrueType\uFF0C\u6216\u5B57\u4F53\u8BB8\u53EF\u7981\u6B62\u5D4C\u5165\uFF09\uFF1A{fonts}\u3002",
|
|
10001
|
+
"PDF created: {count} page(s)": "\u5DF2\u521B\u5EFA PDF\uFF1A{count} \u9875"
|
|
10002
|
+
};
|
|
10003
|
+
|
|
8644
10004
|
// src/visio/ribbon-locale.ts
|
|
8645
10005
|
var VISIO_LOCALES = ["en", "de", "es", "fr", "zh-CN"];
|
|
8646
10006
|
var VISIO_RIBBON_STRINGS = {
|
|
8647
|
-
en: { ...enCommands, ...enText },
|
|
8648
|
-
de: { ...deCommands, ...deText },
|
|
8649
|
-
es: { ...esCommands, ...esText },
|
|
8650
|
-
fr: { ...frCommands, ...frText },
|
|
8651
|
-
"zh-CN": { ...zhCNCommands, ...zhCNText }
|
|
10007
|
+
en: { ...enCommands, ...enText, ...enBackstage },
|
|
10008
|
+
de: { ...deCommands, ...deText, ...deBackstage },
|
|
10009
|
+
es: { ...esCommands, ...esText, ...esBackstage },
|
|
10010
|
+
fr: { ...frCommands, ...frText, ...frBackstage },
|
|
10011
|
+
"zh-CN": { ...zhCNCommands, ...zhCNText, ...zhCNBackstage }
|
|
8652
10012
|
};
|
|
8653
10013
|
function normalizeVisioLocale(value) {
|
|
8654
10014
|
return normalizeLocale(value, VISIO_LOCALES, "en");
|
|
@@ -8860,6 +10220,7 @@ var ATTRIBUTES = [
|
|
|
8860
10220
|
"launcher-label",
|
|
8861
10221
|
"more-label",
|
|
8862
10222
|
"none-label",
|
|
10223
|
+
"empty-label",
|
|
8863
10224
|
"placeholder",
|
|
8864
10225
|
"data-label"
|
|
8865
10226
|
];
|
|
@@ -8876,12 +10237,9 @@ function translateSlot(element, name, current, locale, write) {
|
|
|
8876
10237
|
function ribbonLocale(ribbon) {
|
|
8877
10238
|
return normalizeVisioLocale(ribbon.dataset.visioLocale);
|
|
8878
10239
|
}
|
|
8879
|
-
function
|
|
8880
|
-
const locale = normalizeVisioLocale(value);
|
|
8881
|
-
ribbon.dataset.visioLocale = locale;
|
|
8882
|
-
const elements = [ribbon, ...ribbon.querySelectorAll("*")];
|
|
10240
|
+
function localizeWording(elements, locale) {
|
|
8883
10241
|
for (const element of elements) {
|
|
8884
|
-
if (element.closest("[data-add-in]")) continue;
|
|
10242
|
+
if (element.closest("[data-add-in], [data-user-text]")) continue;
|
|
8885
10243
|
for (const name of ATTRIBUTES) {
|
|
8886
10244
|
const text2 = element.getAttribute(name);
|
|
8887
10245
|
if (text2)
|
|
@@ -8892,6 +10250,11 @@ function localizeRibbon(ribbon, value) {
|
|
|
8892
10250
|
translateSlot(element, "#text", text2, locale, (next) => element.textContent = next);
|
|
8893
10251
|
}
|
|
8894
10252
|
}
|
|
10253
|
+
}
|
|
10254
|
+
function localizeRibbon(ribbon, value) {
|
|
10255
|
+
const locale = normalizeVisioLocale(value);
|
|
10256
|
+
ribbon.dataset.visioLocale = locale;
|
|
10257
|
+
localizeWording([ribbon, ...ribbon.querySelectorAll("*")], locale);
|
|
8895
10258
|
ribbon.setAttribute("file-label", translateRibbonText(locale, "File"));
|
|
8896
10259
|
ribbon.setAttribute("collapse-label", translateRibbonText(locale, "Collapse the ribbon"));
|
|
8897
10260
|
return locale;
|
|
@@ -8925,8 +10288,8 @@ var BASIC_SHAPES = VISIO_BASIC_STENCIL.masters.map((master) => ({
|
|
|
8925
10288
|
var BASIC_STENCIL_ID = "basic";
|
|
8926
10289
|
var n = (value) => String(Math.round(value * 100) / 100);
|
|
8927
10290
|
function outlinePreviewPath(outline, size) {
|
|
8928
|
-
const
|
|
8929
|
-
const w = size.width *
|
|
10291
|
+
const scale3 = 20 / Math.max(size.width, size.height);
|
|
10292
|
+
const w = size.width * scale3, h = size.height * scale3;
|
|
8930
10293
|
const left = 12 - w / 2, top = 12 - h / 2;
|
|
8931
10294
|
if (outline === "ellipse")
|
|
8932
10295
|
return `M${n(left)} 12a${n(w / 2)} ${n(h / 2)} 0 1 0 ${n(w)} 0a${n(w / 2)} ${n(h / 2)} 0 1 0 ${n(-w)} 0`;
|
|
@@ -10706,10 +12069,40 @@ function quickStyleGallery(doc) {
|
|
|
10706
12069
|
});
|
|
10707
12070
|
return gallery3;
|
|
10708
12071
|
}
|
|
10709
|
-
var
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
12072
|
+
var bevelItemId = (id) => `bevel-${id}`;
|
|
12073
|
+
var rotationItemId = (id) => `rotation-3d-${id}`;
|
|
12074
|
+
function bevelOptions() {
|
|
12075
|
+
return {
|
|
12076
|
+
id: "bevel",
|
|
12077
|
+
label: "Bevel",
|
|
12078
|
+
items: [
|
|
12079
|
+
{
|
|
12080
|
+
id: bevelItemId("none"),
|
|
12081
|
+
label: "No Bevel",
|
|
12082
|
+
action: { type: "shape-format", patch: { bevel: "none" } },
|
|
12083
|
+
checked: false
|
|
12084
|
+
},
|
|
12085
|
+
...VISIO_BEVEL_PRESETS.map(({ id, label }) => ({
|
|
12086
|
+
id: bevelItemId(id),
|
|
12087
|
+
label,
|
|
12088
|
+
action: { type: "shape-format", patch: { bevel: id } },
|
|
12089
|
+
checked: false
|
|
12090
|
+
}))
|
|
12091
|
+
]
|
|
12092
|
+
};
|
|
12093
|
+
}
|
|
12094
|
+
function rotationOptions() {
|
|
12095
|
+
return {
|
|
12096
|
+
id: "rotation-3d",
|
|
12097
|
+
label: "3-D Rotation",
|
|
12098
|
+
items: VISIO_ROTATION_PRESETS.map(({ id, label }) => ({
|
|
12099
|
+
id: rotationItemId(id),
|
|
12100
|
+
label,
|
|
12101
|
+
action: { type: "shape-format", patch: { rotation3d: id } },
|
|
12102
|
+
checked: false
|
|
12103
|
+
}))
|
|
12104
|
+
};
|
|
12105
|
+
}
|
|
10713
12106
|
var glowItemId = (size, accent) => `glow-${size}-${accent}`;
|
|
10714
12107
|
var softEdgesItemId = (size) => `soft-edges-${String(size).replace(".", "-")}`;
|
|
10715
12108
|
var reflectionItemId = (id) => `reflection-${id}`;
|
|
@@ -10809,7 +12202,8 @@ function effectsOptions() {
|
|
|
10809
12202
|
reflectionOptions(),
|
|
10810
12203
|
glowOptions(),
|
|
10811
12204
|
softEdgeOptions(),
|
|
10812
|
-
|
|
12205
|
+
bevelOptions(),
|
|
12206
|
+
rotationOptions()
|
|
10813
12207
|
];
|
|
10814
12208
|
}
|
|
10815
12209
|
|
|
@@ -11433,9 +12827,9 @@ function pageSetupGroup(doc) {
|
|
|
11433
12827
|
return el3;
|
|
11434
12828
|
}
|
|
11435
12829
|
function preview3(shapes, empty = false) {
|
|
11436
|
-
const
|
|
12830
|
+
const scale3 = 24 / 11;
|
|
11437
12831
|
const rects = shapes.map(
|
|
11438
|
-
(shape) => `<rect x="${shape.x *
|
|
12832
|
+
(shape) => `<rect x="${shape.x * scale3 + 3}" y="${(11 - shape.y - shape.height) * scale3}" width="${shape.width * scale3}" height="${shape.height * scale3}" fill="${shape.fill ?? "none"}" stroke="${shape.line ?? "none"}" stroke-width="0.6"/>` + (shape.text ? `<rect x="${shape.x * scale3 + 4}" y="${(11 - shape.y - shape.height * 0.6) * scale3}" width="${shape.width * scale3 * 0.5}" height="1.2" fill="${shape.textColor ?? "#000000"}"/>` : "")
|
|
11439
12833
|
).join("");
|
|
11440
12834
|
const slash = empty ? '<path d="M3 24L21.5 0" stroke="#C00000" stroke-width="1"/>' : "";
|
|
11441
12835
|
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="0" width="18.5" height="24" fill="#FFFFFF" stroke="#8A8A8A" stroke-width="0.6"/>${rects}${slash}</svg>`;
|
|
@@ -11832,7 +13226,6 @@ function syncReLayout(gallery3, reason) {
|
|
|
11832
13226
|
|
|
11833
13227
|
// src/visio/ribbon-other-tabs.ts
|
|
11834
13228
|
var OBJECTS = "Embedded OLE objects are not supported; only pictures can be inserted.";
|
|
11835
|
-
var GRAPHICS = "Advanced data graphics (editing individual items, rules and callout styles) are not built yet.";
|
|
11836
13229
|
var POSITIONS = [
|
|
11837
13230
|
["top-left", "Top Left"],
|
|
11838
13231
|
["top", "Top Center"],
|
|
@@ -11982,6 +13375,12 @@ function buildDataPanel(doc, panel) {
|
|
|
11982
13375
|
icon: "visioData",
|
|
11983
13376
|
action: data("custom-import")
|
|
11984
13377
|
}),
|
|
13378
|
+
command(doc, {
|
|
13379
|
+
id: "org-import-data",
|
|
13380
|
+
label: "Import Org Chart",
|
|
13381
|
+
icon: "visioData",
|
|
13382
|
+
action: { type: "org-chart", command: "import" }
|
|
13383
|
+
}),
|
|
11985
13384
|
command(doc, {
|
|
11986
13385
|
id: "refresh-all",
|
|
11987
13386
|
label: "Refresh All",
|
|
@@ -11989,6 +13388,35 @@ function buildDataPanel(doc, panel) {
|
|
|
11989
13388
|
action: data("refresh")
|
|
11990
13389
|
})
|
|
11991
13390
|
]),
|
|
13391
|
+
group(doc, "Data Visualizer", [
|
|
13392
|
+
menu(doc, {
|
|
13393
|
+
id: "data-visualizer",
|
|
13394
|
+
label: "Data Visualizer",
|
|
13395
|
+
icon: "visioData",
|
|
13396
|
+
items: [
|
|
13397
|
+
{
|
|
13398
|
+
id: "visualizer-basic",
|
|
13399
|
+
label: "Basic Flowchart...",
|
|
13400
|
+
action: data("visualizer-basic")
|
|
13401
|
+
},
|
|
13402
|
+
{
|
|
13403
|
+
id: "visualizer-cross-functional",
|
|
13404
|
+
label: "Cross-Functional Flowchart...",
|
|
13405
|
+
action: data("visualizer-cross-functional")
|
|
13406
|
+
},
|
|
13407
|
+
{
|
|
13408
|
+
id: "visualizer-refresh",
|
|
13409
|
+
label: "Refresh Diagram",
|
|
13410
|
+
action: data("visualizer-refresh")
|
|
13411
|
+
},
|
|
13412
|
+
{
|
|
13413
|
+
id: "visualizer-template",
|
|
13414
|
+
label: "Download Table Template",
|
|
13415
|
+
action: data("visualizer-template")
|
|
13416
|
+
}
|
|
13417
|
+
]
|
|
13418
|
+
})
|
|
13419
|
+
]),
|
|
11992
13420
|
group(doc, "Data Graphics", [
|
|
11993
13421
|
menu(doc, {
|
|
11994
13422
|
id: "data-graphics",
|
|
@@ -12064,7 +13492,7 @@ function buildDataPanel(doc, panel) {
|
|
|
12064
13492
|
check(doc, {
|
|
12065
13493
|
id: "data-graphic-fields",
|
|
12066
13494
|
label: "Data Graphic Fields",
|
|
12067
|
-
|
|
13495
|
+
action: data("graphic-fields")
|
|
12068
13496
|
})
|
|
12069
13497
|
])
|
|
12070
13498
|
]),
|
|
@@ -12075,10 +13503,12 @@ function buildDataPanel(doc, panel) {
|
|
|
12075
13503
|
icon: "visioLink",
|
|
12076
13504
|
action: data("link-data")
|
|
12077
13505
|
}),
|
|
12078
|
-
command(
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
13506
|
+
command(doc, {
|
|
13507
|
+
id: "advanced-data-graphics",
|
|
13508
|
+
label: "Advanced Data Graphics",
|
|
13509
|
+
icon: "visioChart",
|
|
13510
|
+
action: data("graphic-advanced")
|
|
13511
|
+
})
|
|
12082
13512
|
])
|
|
12083
13513
|
])
|
|
12084
13514
|
);
|
|
@@ -12373,6 +13803,14 @@ function buildOrgChartPanel(doc, panel) {
|
|
|
12373
13803
|
action: { type: "org-chart", command: "delete" }
|
|
12374
13804
|
})
|
|
12375
13805
|
]),
|
|
13806
|
+
group(doc, "Import", [
|
|
13807
|
+
command(doc, {
|
|
13808
|
+
id: "org-import",
|
|
13809
|
+
label: "Import Org Chart",
|
|
13810
|
+
icon: "visioData",
|
|
13811
|
+
action: { type: "org-chart", command: "import" }
|
|
13812
|
+
})
|
|
13813
|
+
]),
|
|
12376
13814
|
group(doc, "Arrange", [
|
|
12377
13815
|
command(doc, {
|
|
12378
13816
|
id: "org-layout",
|
|
@@ -13187,117 +14625,46 @@ var GROUP_ICONS = {
|
|
|
13187
14625
|
Font: "fontColor",
|
|
13188
14626
|
Paragraph: "alignLeft",
|
|
13189
14627
|
Tools: "pointer",
|
|
13190
|
-
"Shape Styles": "quickStyles",
|
|
13191
|
-
Arrange: "alignObjects",
|
|
13192
|
-
Editing: "search",
|
|
13193
|
-
Pages: "visioPagesPane",
|
|
13194
|
-
Illustrations: "visioPicture",
|
|
13195
|
-
"Diagram Parts": "connector",
|
|
13196
|
-
Links: "visioLink",
|
|
13197
|
-
Text: "textBox",
|
|
13198
|
-
"Page Setup": "fitPage",
|
|
13199
|
-
Themes: "quickStyles",
|
|
13200
|
-
Variants: "effects",
|
|
13201
|
-
Backgrounds: "fill",
|
|
13202
|
-
Layout: "position",
|
|
13203
|
-
"External Data": "visioData",
|
|
13204
|
-
"Data Graphics": "visioChart",
|
|
13205
|
-
"Display Data": "bullets",
|
|
13206
|
-
"Show/Hide": "visioShapeData",
|
|
13207
|
-
"Advanced Data Linking": "visioLink",
|
|
13208
|
-
Subprocess: "visioPagesPane",
|
|
13209
|
-
"Diagram Validation": "check",
|
|
13210
|
-
"SharePoint Workflow": "visioData",
|
|
13211
|
-
Proofing: "check",
|
|
13212
|
-
Accessibility: "check",
|
|
13213
|
-
Language: "message",
|
|
13214
|
-
Comments: "message",
|
|
13215
|
-
Reports: "visioData",
|
|
13216
|
-
Views: "visioPresentation",
|
|
13217
|
-
Show: "ruler",
|
|
13218
|
-
Zoom: "zoomIn",
|
|
13219
|
-
"Visual Aids": "grid",
|
|
13220
|
-
Window: "copy",
|
|
13221
|
-
Macros: "visioMacros",
|
|
13222
|
-
Help: "help"
|
|
13223
|
-
};
|
|
13224
|
-
function wireRibbonOverflow(ribbon) {
|
|
13225
|
-
return attachRibbonGroupOverflow(ribbon, {
|
|
13226
|
-
moreLabel: () => translateRibbonText(ribbonLocale(ribbon), "More"),
|
|
13227
|
-
icon: (group2) => GROUP_ICONS[group2.getAttribute("label") ?? ""]
|
|
13228
|
-
});
|
|
13229
|
-
}
|
|
13230
|
-
function orgChartSelection(state) {
|
|
13231
|
-
const page3 = state.document?.pages[state.pageIndex];
|
|
13232
|
-
const first = state.selectedShapes[0];
|
|
13233
|
-
if (!page3 || !first || !visioSelectionIsOnPage(first, page3.id)) return void 0;
|
|
13234
|
-
return visioOrgPosition(page3, first.id) ? { pageId: page3.id, id: first.id } : void 0;
|
|
13235
|
-
}
|
|
13236
|
-
var ViewerOrgChart = class {
|
|
13237
|
-
constructor(root, controller, edit) {
|
|
13238
|
-
this.root = root;
|
|
13239
|
-
this.controller = controller;
|
|
13240
|
-
this.edit = edit;
|
|
13241
|
-
}
|
|
13242
|
-
root;
|
|
13243
|
-
controller;
|
|
13244
|
-
edit;
|
|
13245
|
-
reason(state, command2) {
|
|
13246
|
-
if (!canEditDiagram(state)) return "Open a .vsdx file to edit the org chart.";
|
|
13247
|
-
if (state.loading || state.edit.busy) return "Wait for the current operation to finish.";
|
|
13248
|
-
const selection2 = orgChartSelection(state);
|
|
13249
|
-
if (!selection2) return "Select a position in an org chart.";
|
|
13250
|
-
const page3 = state.document.pages[state.pageIndex];
|
|
13251
|
-
if (command2 === "coworker" && !visioOrgHierarchy(page3).parentOf(selection2.id))
|
|
13252
|
-
return "The top position has no manager to add a coworker under.";
|
|
13253
|
-
return void 0;
|
|
13254
|
-
}
|
|
13255
|
-
run(action2) {
|
|
13256
|
-
const state = this.controller.state;
|
|
13257
|
-
if (this.reason(state, action2.command) !== void 0) return;
|
|
13258
|
-
const page3 = state.document?.pages[state.pageIndex];
|
|
13259
|
-
const selection2 = orgChartSelection(state);
|
|
13260
|
-
if (!page3 || !selection2) return;
|
|
13261
|
-
const { id } = selection2;
|
|
13262
|
-
if (action2.command === "delete") {
|
|
13263
|
-
const batches = visioOrgDeletePosition(page3, id);
|
|
13264
|
-
if (!batches) return;
|
|
13265
|
-
this.edit(async () => {
|
|
13266
|
-
for (const batch of batches) await this.controller.applyEdits(batch);
|
|
13267
|
-
this.controller.selectShapes([]);
|
|
13268
|
-
}, "Deleted the position and its connectors.");
|
|
13269
|
-
} else if (action2.command === "layout") {
|
|
13270
|
-
const edits = visioOrgReLayout(page3);
|
|
13271
|
-
if (!edits) return;
|
|
13272
|
-
this.edit(() => this.controller.applyEdits(edits), "Laid out the org chart.");
|
|
13273
|
-
} else {
|
|
13274
|
-
const kind = { subordinate: "subordinate", coworker: "peer", assistant: "assistant" }[action2.command];
|
|
13275
|
-
const plan = visioOrgAddPosition(page3, id, kind);
|
|
13276
|
-
if (!plan) return;
|
|
13277
|
-
this.edit(async () => {
|
|
13278
|
-
await this.controller.applyEdits(plan.edits);
|
|
13279
|
-
this.controller.selectShapes([{ id: plan.newId, name: "", pageId: page3.id }]);
|
|
13280
|
-
}, `Added a ${action2.command}.`);
|
|
13281
|
-
}
|
|
13282
|
-
}
|
|
13283
|
-
render(state) {
|
|
13284
|
-
const panel = this.root.querySelector('[data-ribbon-tab="org-chart"]');
|
|
13285
|
-
if (!panel) return;
|
|
13286
|
-
for (const [id, command2] of [
|
|
13287
|
-
["org-subordinate", "subordinate"],
|
|
13288
|
-
["org-coworker", "coworker"],
|
|
13289
|
-
["org-assistant", "assistant"],
|
|
13290
|
-
["org-delete", "delete"],
|
|
13291
|
-
["org-layout", "layout"]
|
|
13292
|
-
]) {
|
|
13293
|
-
const item = panel.querySelector(`[command="${id}"]`);
|
|
13294
|
-
if (!item) continue;
|
|
13295
|
-
const reason = this.reason(state, command2);
|
|
13296
|
-
item.disabled = reason !== void 0;
|
|
13297
|
-
if (reason) item.title = reason;
|
|
13298
|
-
}
|
|
13299
|
-
}
|
|
14628
|
+
"Shape Styles": "quickStyles",
|
|
14629
|
+
Arrange: "alignObjects",
|
|
14630
|
+
Editing: "search",
|
|
14631
|
+
Pages: "visioPagesPane",
|
|
14632
|
+
Illustrations: "visioPicture",
|
|
14633
|
+
"Diagram Parts": "connector",
|
|
14634
|
+
Links: "visioLink",
|
|
14635
|
+
Text: "textBox",
|
|
14636
|
+
"Page Setup": "fitPage",
|
|
14637
|
+
Themes: "quickStyles",
|
|
14638
|
+
Variants: "effects",
|
|
14639
|
+
Backgrounds: "fill",
|
|
14640
|
+
Layout: "position",
|
|
14641
|
+
"External Data": "visioData",
|
|
14642
|
+
"Data Graphics": "visioChart",
|
|
14643
|
+
"Display Data": "bullets",
|
|
14644
|
+
"Show/Hide": "visioShapeData",
|
|
14645
|
+
"Advanced Data Linking": "visioLink",
|
|
14646
|
+
Subprocess: "visioPagesPane",
|
|
14647
|
+
"Diagram Validation": "check",
|
|
14648
|
+
"SharePoint Workflow": "visioData",
|
|
14649
|
+
Proofing: "check",
|
|
14650
|
+
Accessibility: "check",
|
|
14651
|
+
Language: "message",
|
|
14652
|
+
Comments: "message",
|
|
14653
|
+
Reports: "visioData",
|
|
14654
|
+
Views: "visioPresentation",
|
|
14655
|
+
Show: "ruler",
|
|
14656
|
+
Zoom: "zoomIn",
|
|
14657
|
+
"Visual Aids": "grid",
|
|
14658
|
+
Window: "copy",
|
|
14659
|
+
Macros: "visioMacros",
|
|
14660
|
+
Help: "help"
|
|
13300
14661
|
};
|
|
14662
|
+
function wireRibbonOverflow(ribbon) {
|
|
14663
|
+
return attachRibbonGroupOverflow(ribbon, {
|
|
14664
|
+
moreLabel: () => translateRibbonText(ribbonLocale(ribbon), "More"),
|
|
14665
|
+
icon: (group2) => GROUP_ICONS[group2.getAttribute("label") ?? ""]
|
|
14666
|
+
});
|
|
14667
|
+
}
|
|
13301
14668
|
|
|
13302
14669
|
// src/visio/viewer-contextual-tabs.ts
|
|
13303
14670
|
var CONTEXTUAL_TABS = [
|
|
@@ -13944,6 +15311,7 @@ function createBackstage(doc) {
|
|
|
13944
15311
|
]) {
|
|
13945
15312
|
const value = el2(doc, "dd");
|
|
13946
15313
|
value.dataset.info = key;
|
|
15314
|
+
if (key === "page") value.dataset.userText = "";
|
|
13947
15315
|
facts.append(el2(doc, "dt", "", label), value);
|
|
13948
15316
|
}
|
|
13949
15317
|
const notes = el2(doc, "div", "backstage-notes");
|
|
@@ -13955,6 +15323,7 @@ function createBackstage(doc) {
|
|
|
13955
15323
|
);
|
|
13956
15324
|
const file = el2(doc, "h2", "backstage-file");
|
|
13957
15325
|
file.dataset.info = "name";
|
|
15326
|
+
file.dataset.userText = "";
|
|
13958
15327
|
const templates = el2(doc, "div", "backstage-templates");
|
|
13959
15328
|
const slot = doc.createElement("slot");
|
|
13960
15329
|
slot.name = "templates";
|
|
@@ -14186,7 +15555,7 @@ function estimatePageSvgBytes(model, page3, maxBytes) {
|
|
|
14186
15555
|
for (const note2 of model.diagnostics) reserve(384 + note2.message.length * 36);
|
|
14187
15556
|
const images = /* @__PURE__ */ new Map();
|
|
14188
15557
|
const stack2 = [];
|
|
14189
|
-
for (const
|
|
15558
|
+
for (const layer2 of getVisioPageLayers(model, page3.id)) stack2.push(...layer2.shapes);
|
|
14190
15559
|
while (stack2.length) {
|
|
14191
15560
|
const shape = stack2.pop();
|
|
14192
15561
|
if (shape.hidden) continue;
|
|
@@ -14436,6 +15805,7 @@ function quickAccessShown(behaviour, resolved) {
|
|
|
14436
15805
|
}
|
|
14437
15806
|
|
|
14438
15807
|
// src/visio/viewer-backstage.ts
|
|
15808
|
+
var BACK_LABEL = "Back to the drawing";
|
|
14439
15809
|
var ViewerBackstage = class {
|
|
14440
15810
|
constructor(host) {
|
|
14441
15811
|
this.host = host;
|
|
@@ -14464,6 +15834,33 @@ var ViewerBackstage = class {
|
|
|
14464
15834
|
#custom() {
|
|
14465
15835
|
return this.host.customization?.() ?? EMPTY_VISIO_CUSTOMIZATION;
|
|
14466
15836
|
}
|
|
15837
|
+
#locale() {
|
|
15838
|
+
return normalizeVisioLocale(this.host.locale());
|
|
15839
|
+
}
|
|
15840
|
+
/** `text` (English) in the display language. */
|
|
15841
|
+
#t(text2) {
|
|
15842
|
+
return translateRibbonText(this.#locale(), text2);
|
|
15843
|
+
}
|
|
15844
|
+
/** Announces `text` (English) in the display language. */
|
|
15845
|
+
#say(text2) {
|
|
15846
|
+
this.host.announce(this.#t(text2));
|
|
15847
|
+
}
|
|
15848
|
+
/** Translates the built-in pages in place, the way the ribbon is translated. */
|
|
15849
|
+
#translate() {
|
|
15850
|
+
const sections = [...this.#root.children].filter(
|
|
15851
|
+
(child) => child instanceof HTMLElement && child.matches("section")
|
|
15852
|
+
);
|
|
15853
|
+
localizeWording(
|
|
15854
|
+
sections.flatMap((section2) => [section2, ...section2.querySelectorAll("*")]),
|
|
15855
|
+
this.#locale()
|
|
15856
|
+
);
|
|
15857
|
+
this.#root.setAttribute("back-label", this.#t(BACK_LABEL));
|
|
15858
|
+
}
|
|
15859
|
+
/** Shows the pages in the current display language again (after the locale changes). */
|
|
15860
|
+
localize() {
|
|
15861
|
+
if (this.#state) this.render(this.#state);
|
|
15862
|
+
else this.#translate();
|
|
15863
|
+
}
|
|
14467
15864
|
/** Re-applies the host customisation: hidden pages, host pages and their contexts. */
|
|
14468
15865
|
refreshCustomization() {
|
|
14469
15866
|
this.#hostPages.setPages(this.#custom().extraPages);
|
|
@@ -14621,7 +16018,7 @@ var ViewerBackstage = class {
|
|
|
14621
16018
|
);
|
|
14622
16019
|
this.host.downloaded?.();
|
|
14623
16020
|
this.hide();
|
|
14624
|
-
this
|
|
16021
|
+
this.#say("Downloaded a copy of the drawing.");
|
|
14625
16022
|
} catch (error) {
|
|
14626
16023
|
this.host.announce(error instanceof Error ? error.message : String(error));
|
|
14627
16024
|
}
|
|
@@ -14638,7 +16035,7 @@ var ViewerBackstage = class {
|
|
|
14638
16035
|
this.hide();
|
|
14639
16036
|
const name = await saveDrawingToStorage(storage2, bytes, this.host.fileName());
|
|
14640
16037
|
this.host.savedToStorage?.(name, revision);
|
|
14641
|
-
this
|
|
16038
|
+
this.#say("Saved the drawing.");
|
|
14642
16039
|
} catch (cause) {
|
|
14643
16040
|
const error = cause instanceof Error ? cause : new Error(String(cause));
|
|
14644
16041
|
this.host.saveFailed?.(error);
|
|
@@ -14655,7 +16052,7 @@ var ViewerBackstage = class {
|
|
|
14655
16052
|
`${this.#base()}-page-${result.pageIndex + 1}.svg`
|
|
14656
16053
|
);
|
|
14657
16054
|
this.hide();
|
|
14658
|
-
this
|
|
16055
|
+
this.#say("SVG export requested. This is an approximate snapshot.");
|
|
14659
16056
|
} catch (error) {
|
|
14660
16057
|
this.host.announce(error instanceof Error ? error.message : String(error));
|
|
14661
16058
|
}
|
|
@@ -14663,18 +16060,21 @@ var ViewerBackstage = class {
|
|
|
14663
16060
|
async #exportPicture(format) {
|
|
14664
16061
|
if (format === "png") this.hide();
|
|
14665
16062
|
else showPdfReport(this.#root, void 0);
|
|
14666
|
-
this
|
|
16063
|
+
this.#say(format === "pdf" ? "Preparing the PDF..." : "Preparing the PNG...");
|
|
14667
16064
|
try {
|
|
14668
16065
|
const count = this.#state?.document?.pages.filter((page3) => !page3.isBackground).length ?? 0;
|
|
14669
16066
|
const choice2 = format === "pdf" ? readPdfChoice(this.#root, count) : void 0;
|
|
14670
16067
|
const { blob: blob2, pageIndex, report } = await this.host.exportPicture(format, choice2);
|
|
14671
16068
|
const name = format === "pdf" ? this.#base() : `${this.#base()}-page-${pageIndex + 1}`;
|
|
14672
16069
|
this.#save(blob2, `${name}.${format}`);
|
|
14673
|
-
if (report)
|
|
16070
|
+
if (report) {
|
|
16071
|
+
showPdfReport(this.#root, report);
|
|
16072
|
+
this.#translate();
|
|
16073
|
+
}
|
|
14674
16074
|
const degraded = report?.pages.filter(
|
|
14675
16075
|
(page3) => page3.mode === "picture" || page3.degraded.length
|
|
14676
16076
|
);
|
|
14677
|
-
this
|
|
16077
|
+
this.#say(
|
|
14678
16078
|
format === "png" ? "PNG export requested. Pages are pictures of the approximate rendering." : degraded?.length ? `PDF export requested. ${degraded.length} page(s) lost something; see the report on the Export page.` : "PDF export requested."
|
|
14679
16079
|
);
|
|
14680
16080
|
} catch (error) {
|
|
@@ -14721,10 +16121,13 @@ var ViewerBackstage = class {
|
|
|
14721
16121
|
const node = this.#root.querySelector(`[data-info="${key2}"]`);
|
|
14722
16122
|
if (node) node.textContent = value;
|
|
14723
16123
|
};
|
|
14724
|
-
set(
|
|
16124
|
+
set(
|
|
16125
|
+
"name",
|
|
16126
|
+
state.document ? this.host.fileName() || this.#t("Untitled drawing") : this.#t("No drawing open")
|
|
16127
|
+
);
|
|
14725
16128
|
set("pages", String(state.document?.pages.length ?? 0));
|
|
14726
16129
|
syncPdfPanel(this.#root, state.document);
|
|
14727
|
-
set("page", page3?.name ?? "None");
|
|
16130
|
+
set("page", page3?.name ?? this.#t("None"));
|
|
14728
16131
|
set("size", page3 ? `${page3.width} \xD7 ${page3.height} in` : "None");
|
|
14729
16132
|
set("shapes", page3 ? `${page3.shapes.length} top-level` : "None");
|
|
14730
16133
|
set(
|
|
@@ -14760,9 +16163,13 @@ var ViewerBackstage = class {
|
|
|
14760
16163
|
backstageItems({
|
|
14761
16164
|
save: { disabled: saveDisabled, ...saveDisabled ? { title: saveReason } : {} },
|
|
14762
16165
|
close: { disabled: !state.document }
|
|
14763
|
-
}).filter((item) => !hidden.has(item.id))
|
|
16166
|
+
}).filter((item) => !hidden.has(item.id)).map((item) => ({
|
|
16167
|
+
...item,
|
|
16168
|
+
label: this.#t(item.label),
|
|
16169
|
+
...item.title ? { title: this.#t(item.title) } : {}
|
|
16170
|
+
}))
|
|
14764
16171
|
);
|
|
14765
|
-
const key = JSON.stringify(items);
|
|
16172
|
+
const key = JSON.stringify([this.#locale(), items]);
|
|
14766
16173
|
if (key !== this.#items) {
|
|
14767
16174
|
this.#items = key;
|
|
14768
16175
|
this.#root.items = items;
|
|
@@ -14771,6 +16178,7 @@ var ViewerBackstage = class {
|
|
|
14771
16178
|
'[data-backstage-action^="export-"], [data-backstage-action="print"]'
|
|
14772
16179
|
))
|
|
14773
16180
|
node.disabled = !page3 || busy;
|
|
16181
|
+
this.#translate();
|
|
14774
16182
|
}
|
|
14775
16183
|
};
|
|
14776
16184
|
var fields = ["x", "y", "width", "height", "angle"];
|
|
@@ -15251,6 +16659,72 @@ function wireContextMenus(root, viewport, controller, onShapeMenu = () => {
|
|
|
15251
16659
|
);
|
|
15252
16660
|
return () => events.abort();
|
|
15253
16661
|
}
|
|
16662
|
+
var ITEM = "data-shape-action";
|
|
16663
|
+
var COMMAND = "ctx-action:";
|
|
16664
|
+
var listening = /* @__PURE__ */ new WeakSet();
|
|
16665
|
+
function orderedActions(actions) {
|
|
16666
|
+
const keyed = actions.some((action2) => action2.sortKey);
|
|
16667
|
+
return actions.map((action2, index) => ({ action: action2, index })).sort(
|
|
16668
|
+
(a, b) => keyed ? (a.action.sortKey ?? "").localeCompare(b.action.sortKey ?? "") || a.index - b.index : a.index - b.index
|
|
16669
|
+
).map((item) => item.action);
|
|
16670
|
+
}
|
|
16671
|
+
function actionBlock(action2, editable3) {
|
|
16672
|
+
if (action2.disabled) return "The shape has disabled this action.";
|
|
16673
|
+
if (action2.run.kind === "unsupported") return action2.run.reason;
|
|
16674
|
+
return editable3 ? void 0 : "The drawing cannot be edited.";
|
|
16675
|
+
}
|
|
16676
|
+
function selectedShape2(controller) {
|
|
16677
|
+
const { state } = controller;
|
|
16678
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
16679
|
+
if (!page3 || state.selectedShapes.length !== 1) return void 0;
|
|
16680
|
+
const id = state.selectedShape?.id;
|
|
16681
|
+
return page3.shapes.find((shape) => shape.id === id);
|
|
16682
|
+
}
|
|
16683
|
+
function syncShapeActions(menu2, target, controller, announce) {
|
|
16684
|
+
for (const node of [...menu2.querySelectorAll(`:scope > [${ITEM}]`)]) node.remove();
|
|
16685
|
+
if (target !== "shape") return;
|
|
16686
|
+
const shape = selectedShape2(controller);
|
|
16687
|
+
const actions = orderedActions((shape?.actions ?? []).filter((action2) => !action2.invisible));
|
|
16688
|
+
if (!shape || !actions.length) return;
|
|
16689
|
+
const doc = menu2.ownerDocument;
|
|
16690
|
+
const editable3 = canEditDiagram(controller.state);
|
|
16691
|
+
const separator = () => {
|
|
16692
|
+
const rule = doc.createElement("office-ui-menu-separator");
|
|
16693
|
+
rule.setAttribute(ITEM, "");
|
|
16694
|
+
return rule;
|
|
16695
|
+
};
|
|
16696
|
+
menu2.append(separator());
|
|
16697
|
+
for (const action2 of actions) {
|
|
16698
|
+
if (action2.beginGroup && menu2.lastElementChild?.localName !== "office-ui-menu-separator")
|
|
16699
|
+
menu2.append(separator());
|
|
16700
|
+
const item = doc.createElement("office-ui-menu-item");
|
|
16701
|
+
item.setAttribute(ITEM, action2.row);
|
|
16702
|
+
item.setAttribute("command", `${COMMAND}${action2.row}`);
|
|
16703
|
+
item.setAttribute("label", action2.menu || action2.name || action2.row);
|
|
16704
|
+
if (action2.checked) item.setAttribute("checked", "true");
|
|
16705
|
+
const block = actionBlock(action2, editable3);
|
|
16706
|
+
if (block) {
|
|
16707
|
+
item.setAttribute("disabled", "");
|
|
16708
|
+
item.setAttribute("title", block);
|
|
16709
|
+
}
|
|
16710
|
+
menu2.append(item);
|
|
16711
|
+
}
|
|
16712
|
+
if (listening.has(menu2)) return;
|
|
16713
|
+
listening.add(menu2);
|
|
16714
|
+
menu2.addEventListener("office-command", (event) => {
|
|
16715
|
+
const command2 = event.detail?.command ?? "";
|
|
16716
|
+
if (!command2.startsWith(COMMAND)) return;
|
|
16717
|
+
const owner = selectedShape2(controller);
|
|
16718
|
+
const page3 = controller.state.document?.pages[controller.state.pageIndex];
|
|
16719
|
+
if (!owner || !page3) return;
|
|
16720
|
+
const row = command2.slice(COMMAND.length);
|
|
16721
|
+
const action2 = owner.actions?.find((item) => item.row === row);
|
|
16722
|
+
if (!action2 || actionBlock(action2, canEditDiagram(controller.state))) return;
|
|
16723
|
+
controller.applyEdits([{ type: "run-action", pageId: page3.id, shapeId: owner.id, row }]).then(() => announce(`${action2.menu || "Action"} done.`)).catch((error) => {
|
|
16724
|
+
if (!isEditCancellation(error)) announce(editErrorMessage(error));
|
|
16725
|
+
});
|
|
16726
|
+
});
|
|
16727
|
+
}
|
|
15254
16728
|
|
|
15255
16729
|
// src/visio/viewer-mini-toolbar.ts
|
|
15256
16730
|
var GAP = 8;
|
|
@@ -15823,10 +17297,10 @@ var ViewerPanZoom = class {
|
|
|
15823
17297
|
if (!paper || !page3) return;
|
|
15824
17298
|
const box2 = paper.getBoundingClientRect();
|
|
15825
17299
|
const port = this.viewport.getBoundingClientRect();
|
|
15826
|
-
const
|
|
17300
|
+
const scale3 = box2.width / page3.width;
|
|
15827
17301
|
this.viewport.scrollBy({
|
|
15828
|
-
left: box2.left + x *
|
|
15829
|
-
top: box2.top + y *
|
|
17302
|
+
left: box2.left + x * scale3 - (port.left + port.width / 2),
|
|
17303
|
+
top: box2.top + y * scale3 - (port.top + port.height / 2)
|
|
15830
17304
|
});
|
|
15831
17305
|
}
|
|
15832
17306
|
#schedule() {
|
|
@@ -15864,11 +17338,11 @@ var ViewerPanZoom = class {
|
|
|
15864
17338
|
const box2 = paper.getBoundingClientRect();
|
|
15865
17339
|
const port = this.viewport.getBoundingClientRect();
|
|
15866
17340
|
if (!box2.width || !this.#frame) return;
|
|
15867
|
-
const
|
|
15868
|
-
const left = Math.max(0, (port.left - box2.left) *
|
|
15869
|
-
const top = Math.max(0, (port.top - box2.top) *
|
|
15870
|
-
const right = Math.min(page3.width, (port.right - box2.left) *
|
|
15871
|
-
const bottom = Math.min(page3.height, (port.bottom - box2.top) *
|
|
17341
|
+
const scale3 = page3.width / box2.width;
|
|
17342
|
+
const left = Math.max(0, (port.left - box2.left) * scale3);
|
|
17343
|
+
const top = Math.max(0, (port.top - box2.top) * scale3);
|
|
17344
|
+
const right = Math.min(page3.width, (port.right - box2.left) * scale3);
|
|
17345
|
+
const bottom = Math.min(page3.height, (port.bottom - box2.top) * scale3);
|
|
15872
17346
|
this.#frame.setAttribute("x", String(left));
|
|
15873
17347
|
this.#frame.setAttribute("y", String(top));
|
|
15874
17348
|
this.#frame.setAttribute("width", String(Math.max(0, right - left)));
|
|
@@ -16299,10 +17773,10 @@ var COLOR = /^#[\da-f]{3,8}$/i;
|
|
|
16299
17773
|
var ARROW = "M0 0 L0 14 L3.8 10.6 L6.4 16.6 L8.6 15.6 L6 9.8 L11 9.8 Z";
|
|
16300
17774
|
function presenceScale(svg2, zoom) {
|
|
16301
17775
|
const screen = svg2.getScreenCTM?.();
|
|
16302
|
-
const
|
|
16303
|
-
return
|
|
17776
|
+
const scale3 = screen ? Math.hypot(screen.a, screen.b) : 96 * zoom;
|
|
17777
|
+
return scale3 > 0 && Number.isFinite(scale3) ? scale3 : 96;
|
|
16304
17778
|
}
|
|
16305
|
-
function renderPresenceOverlay(svg2, page3, peers,
|
|
17779
|
+
function renderPresenceOverlay(svg2, page3, peers, scale3) {
|
|
16306
17780
|
svg2.querySelector(":scope > [data-presence-overlay]")?.remove();
|
|
16307
17781
|
const here = peers.filter((peer) => peer.page === page3.id);
|
|
16308
17782
|
if (!here.length) return;
|
|
@@ -16340,7 +17814,7 @@ function renderPresenceOverlay(svg2, page3, peers, scale2) {
|
|
|
16340
17814
|
const color3 = COLOR.test(peer.userColor) ? peer.userColor : "#2563eb";
|
|
16341
17815
|
const cursor = create("g");
|
|
16342
17816
|
cursor.dataset.presenceCursor = String(peer.clientId);
|
|
16343
|
-
cursor.setAttribute("transform", `translate(${peer.x} ${peer.y}) scale(${1 /
|
|
17817
|
+
cursor.setAttribute("transform", `translate(${peer.x} ${peer.y}) scale(${1 / scale3})`);
|
|
16344
17818
|
const arrow = create("path");
|
|
16345
17819
|
arrow.setAttribute("d", ARROW);
|
|
16346
17820
|
arrow.setAttribute("fill", color3);
|
|
@@ -16779,9 +18253,9 @@ function createRulers(viewport) {
|
|
|
16779
18253
|
if (!paper) return;
|
|
16780
18254
|
const base = viewport.getBoundingClientRect();
|
|
16781
18255
|
const page3 = paper.getBoundingClientRect();
|
|
16782
|
-
const
|
|
16783
|
-
top.setAttribute("scale",
|
|
16784
|
-
left.setAttribute("scale",
|
|
18256
|
+
const scale3 = String(96 * zoom);
|
|
18257
|
+
top.setAttribute("scale", scale3);
|
|
18258
|
+
left.setAttribute("scale", scale3);
|
|
16785
18259
|
top.setAttribute("origin", String(page3.left - base.left + look.originX * 96 * zoom));
|
|
16786
18260
|
left.setAttribute("origin", String(page3.bottom - base.top - look.originY * 96 * zoom));
|
|
16787
18261
|
top.setAttribute("density", String(look.densityX));
|
|
@@ -17139,7 +18613,7 @@ function routeRibbonAction(targets, action2) {
|
|
|
17139
18613
|
return targets.fit(action2.mode === "fit" ? "page" : "width");
|
|
17140
18614
|
}
|
|
17141
18615
|
}
|
|
17142
|
-
var
|
|
18616
|
+
var SVG5 = "http://www.w3.org/2000/svg";
|
|
17143
18617
|
var MARKER_PX = 4;
|
|
17144
18618
|
var REFUSED = "Connection points can be added to local 2D shapes; groups, lines, connectors and master instances (whose points come from their master) are not edited here.";
|
|
17145
18619
|
function placedShapes(page3) {
|
|
@@ -17194,17 +18668,17 @@ var ViewerConnectionPoints = class {
|
|
|
17194
18668
|
this.#overlay = void 0;
|
|
17195
18669
|
if (!shown || !page3 || !svg2) return;
|
|
17196
18670
|
const doc = this.viewport.ownerDocument;
|
|
17197
|
-
const overlay = doc.createElementNS(
|
|
18671
|
+
const overlay = doc.createElementNS(SVG5, "g");
|
|
17198
18672
|
overlay.dataset.connectionPoints = "";
|
|
17199
18673
|
overlay.setAttribute("aria-hidden", "true");
|
|
17200
|
-
const
|
|
17201
|
-
const size = MARKER_PX /
|
|
18674
|
+
const scale3 = svg2.getScreenCTM?.()?.a || 96 * state.zoom;
|
|
18675
|
+
const size = MARKER_PX / scale3;
|
|
17202
18676
|
for (const { shape, world } of placedShapes(page3).values()) {
|
|
17203
18677
|
if (shape.hidden) continue;
|
|
17204
18678
|
for (const point of shape.connectionPoints ?? []) {
|
|
17205
18679
|
const x = world[0] * point.x + world[2] * point.y + world[4];
|
|
17206
18680
|
const y = page3.height - (world[1] * point.x + world[3] * point.y + world[5]);
|
|
17207
|
-
const marker = doc.createElementNS(
|
|
18681
|
+
const marker = doc.createElementNS(SVG5, "path");
|
|
17208
18682
|
marker.setAttribute(
|
|
17209
18683
|
"d",
|
|
17210
18684
|
`M ${x - size} ${y - size} L ${x + size} ${y + size} M ${x - size} ${y + size} L ${x + size} ${y - size}`
|
|
@@ -17281,13 +18755,13 @@ var ViewerConnectionPoints = class {
|
|
|
17281
18755
|
void this.#apply(command2, `Connection point added to ${shape.name}.`);
|
|
17282
18756
|
}
|
|
17283
18757
|
/** The connection point within a few pixels of `point` (SVG page inches, y down). */
|
|
17284
|
-
#pointNear(page3, point,
|
|
18758
|
+
#pointNear(page3, point, scale3) {
|
|
17285
18759
|
let best;
|
|
17286
18760
|
for (const { shape, world } of placedShapes(page3).values())
|
|
17287
18761
|
for (const candidate of shape.connectionPoints ?? []) {
|
|
17288
18762
|
const x = world[0] * candidate.x + world[2] * candidate.y + world[4];
|
|
17289
18763
|
const y = page3.height - (world[1] * candidate.x + world[3] * candidate.y + world[5]);
|
|
17290
|
-
const distance = Math.hypot(x - point.x, y - point.y) *
|
|
18764
|
+
const distance = Math.hypot(x - point.x, y - point.y) * scale3;
|
|
17291
18765
|
if (distance <= MARKER_PX + 3 && (!best || distance < best.distance))
|
|
17292
18766
|
best = { shape, index: candidate.index, inherited: candidate.inherited, distance };
|
|
17293
18767
|
}
|
|
@@ -17687,12 +19161,26 @@ function renderShapeStyleControls(root, shapes, reason, set, page3) {
|
|
|
17687
19161
|
set(element, reason);
|
|
17688
19162
|
element?.setAttribute("checked", String(checked));
|
|
17689
19163
|
};
|
|
17690
|
-
for (const id of ["shadow", "glow", "soft-edges", "reflection"])
|
|
19164
|
+
for (const id of ["shadow", "glow", "soft-edges", "reflection", "bevel", "rotation-3d"])
|
|
17691
19165
|
set(root.querySelector(`[data-menu="${id}"]`), reason);
|
|
17692
19166
|
for (const size of VISIO_GLOW_SIZES)
|
|
17693
19167
|
set(root.querySelector(`[data-menu="glow-size-${size}"]`), reason);
|
|
17694
19168
|
for (const id of ["shadow-options", "glow-options", "soft-edges-options", "reflection-options"])
|
|
17695
19169
|
set(root.querySelector(`[command="${id}"]`), reason);
|
|
19170
|
+
const bevel = common(shapes.map((shape) => String(shape.style.bevel?.type ?? 0)));
|
|
19171
|
+
check2(bevelItemId("none"), bevel === "0");
|
|
19172
|
+
for (const preset of VISIO_BEVEL_PRESETS)
|
|
19173
|
+
check2(bevelItemId(preset.id), bevel === String(preset.type));
|
|
19174
|
+
const turn = (shape) => {
|
|
19175
|
+
const r = shape.style.rotation3d;
|
|
19176
|
+
return r ? [r.x, r.y, r.z, r.perspective].map((v) => Math.round(v * 180 / Math.PI)).join() : "0,0,0,0";
|
|
19177
|
+
};
|
|
19178
|
+
const rotation = common(shapes.map(turn));
|
|
19179
|
+
for (const preset of VISIO_ROTATION_PRESETS)
|
|
19180
|
+
check2(
|
|
19181
|
+
rotationItemId(preset.id),
|
|
19182
|
+
rotation === [preset.x, preset.y, preset.z, preset.perspective].join()
|
|
19183
|
+
);
|
|
17696
19184
|
check2("glow-none", glow2 === "none");
|
|
17697
19185
|
for (const size of VISIO_GLOW_SIZES)
|
|
17698
19186
|
for (let accent = 1; accent <= 6; accent++)
|
|
@@ -18237,95 +19725,6 @@ var ViewerGrouping = class {
|
|
|
18237
19725
|
if (menu2) menu2.disabled = !any;
|
|
18238
19726
|
}
|
|
18239
19727
|
};
|
|
18240
|
-
|
|
18241
|
-
// src/visio/viewer-insert-dialog.ts
|
|
18242
|
-
var InsertDialog = class {
|
|
18243
|
-
dialog;
|
|
18244
|
-
error;
|
|
18245
|
-
fields = /* @__PURE__ */ new Map();
|
|
18246
|
-
buttons = /* @__PURE__ */ new Map();
|
|
18247
|
-
constructor(root, className, heading, specs, buttons, press) {
|
|
18248
|
-
const doc = root.ownerDocument;
|
|
18249
|
-
this.dialog = doc.createElement("office-ui-dialog");
|
|
18250
|
-
this.dialog.className = className;
|
|
18251
|
-
this.dialog.setAttribute("heading", heading);
|
|
18252
|
-
for (const spec of specs) {
|
|
18253
|
-
const label = doc.createElement("label");
|
|
18254
|
-
label.textContent = spec.label;
|
|
18255
|
-
const field = doc.createElement(
|
|
18256
|
-
spec.choices ? "select" : spec.multiline ? "textarea" : "input"
|
|
18257
|
-
);
|
|
18258
|
-
field.name = spec.name;
|
|
18259
|
-
field.setAttribute("aria-label", spec.label);
|
|
18260
|
-
if (field instanceof HTMLTextAreaElement) {
|
|
18261
|
-
field.maxLength = spec.maxLength ?? 4096;
|
|
18262
|
-
field.rows = 5;
|
|
18263
|
-
}
|
|
18264
|
-
if (field instanceof HTMLInputElement) {
|
|
18265
|
-
field.type = spec.input ?? "text";
|
|
18266
|
-
if (spec.input === "number") field.step = "any";
|
|
18267
|
-
if (!spec.input) field.maxLength = spec.maxLength ?? 4096;
|
|
18268
|
-
if (spec.placeholder) field.placeholder = spec.placeholder;
|
|
18269
|
-
field.addEventListener("keydown", (event) => {
|
|
18270
|
-
if (event.key !== "Enter") return;
|
|
18271
|
-
event.preventDefault();
|
|
18272
|
-
press(buttons[0]);
|
|
18273
|
-
});
|
|
18274
|
-
}
|
|
18275
|
-
if (spec.input === "checkbox") label.prepend(field);
|
|
18276
|
-
else label.append(field);
|
|
18277
|
-
this.fields.set(spec.name, field);
|
|
18278
|
-
this.dialog.append(label);
|
|
18279
|
-
}
|
|
18280
|
-
this.error = doc.createElement("p");
|
|
18281
|
-
this.error.setAttribute("role", "alert");
|
|
18282
|
-
this.dialog.append(this.error);
|
|
18283
|
-
for (const name of buttons) {
|
|
18284
|
-
const button = doc.createElement("office-ui-button");
|
|
18285
|
-
button.slot = "footer";
|
|
18286
|
-
button.setAttribute("label", name);
|
|
18287
|
-
button.setAttribute("command", `${className}-${name.toLowerCase().replace(/\s+/g, "-")}`);
|
|
18288
|
-
button.addEventListener("office-command", () => {
|
|
18289
|
-
if (!button.disabled) press(name);
|
|
18290
|
-
});
|
|
18291
|
-
this.buttons.set(name, button);
|
|
18292
|
-
this.dialog.append(button);
|
|
18293
|
-
}
|
|
18294
|
-
root.append(this.dialog);
|
|
18295
|
-
}
|
|
18296
|
-
value(name) {
|
|
18297
|
-
return this.fields.get(name)?.value ?? "";
|
|
18298
|
-
}
|
|
18299
|
-
checked(name) {
|
|
18300
|
-
const field = this.fields.get(name);
|
|
18301
|
-
return field instanceof HTMLInputElement && field.checked;
|
|
18302
|
-
}
|
|
18303
|
-
/**
|
|
18304
|
-
* Replace a select's choices; the current value is kept as an extra choice when unknown.
|
|
18305
|
-
* `labels` names each value; `none: false` drops the leading empty choice.
|
|
18306
|
-
*/
|
|
18307
|
-
choices(name, values, current, options2 = {}) {
|
|
18308
|
-
const select = this.fields.get(name);
|
|
18309
|
-
if (!(select instanceof HTMLSelectElement)) return;
|
|
18310
|
-
const doc = select.ownerDocument;
|
|
18311
|
-
const list = options2.none === false ? [...values] : ["", ...values];
|
|
18312
|
-
if (!list.includes(current)) list.push(current);
|
|
18313
|
-
select.replaceChildren(
|
|
18314
|
-
...list.map((value) => {
|
|
18315
|
-
const option = doc.createElement("option");
|
|
18316
|
-
option.value = value;
|
|
18317
|
-
const index = values.indexOf(value);
|
|
18318
|
-
option.textContent = (index >= 0 ? options2.labels?.[index] : void 0) ?? (value || options2.noneLabel || "(none)");
|
|
18319
|
-
return option;
|
|
18320
|
-
})
|
|
18321
|
-
);
|
|
18322
|
-
select.value = current;
|
|
18323
|
-
}
|
|
18324
|
-
busy(value) {
|
|
18325
|
-
for (const field of this.fields.values()) field.disabled = value;
|
|
18326
|
-
for (const button of this.buttons.values()) button.disabled = value;
|
|
18327
|
-
}
|
|
18328
|
-
};
|
|
18329
19728
|
var PREVIEW_WIDTH = 640;
|
|
18330
19729
|
var NEW_HEIGHT = 400;
|
|
18331
19730
|
var SCALE = 1.5;
|
|
@@ -20461,6 +21860,32 @@ var PANE_FIELDS = [
|
|
|
20461
21860
|
read: (context) => text(effect(context, (values) => values.softEdges)),
|
|
20462
21861
|
patch: (value) => ({ softEdges: value })
|
|
20463
21862
|
},
|
|
21863
|
+
// Visio 16 draws a depth or a contour only on a shape that has a top bevel (3-D Format).
|
|
21864
|
+
...[
|
|
21865
|
+
[
|
|
21866
|
+
"extrusionDepth",
|
|
21867
|
+
"3-D depth (pt)",
|
|
21868
|
+
"a 3-D depth",
|
|
21869
|
+
288,
|
|
21870
|
+
(s) => s.style.extrusion?.depth
|
|
21871
|
+
],
|
|
21872
|
+
[
|
|
21873
|
+
"contourSize",
|
|
21874
|
+
"3-D contour size (pt)",
|
|
21875
|
+
"a 3-D contour size",
|
|
21876
|
+
72,
|
|
21877
|
+
(s) => s.style.contour?.size
|
|
21878
|
+
]
|
|
21879
|
+
].map(([key, label, name, max, inches2]) => ({
|
|
21880
|
+
key,
|
|
21881
|
+
label,
|
|
21882
|
+
group: "effects",
|
|
21883
|
+
max,
|
|
21884
|
+
step: "1",
|
|
21885
|
+
name,
|
|
21886
|
+
read: (context) => text(style(context, (shape) => round2((inches2(shape) ?? 0) * 72))),
|
|
21887
|
+
patch: (amount) => ({ [key]: amount })
|
|
21888
|
+
})),
|
|
20464
21889
|
...[
|
|
20465
21890
|
["size", "Reflection size (%)", "a reflection size"],
|
|
20466
21891
|
["transparency", "Reflection transparency (%)", "a reflection transparency"],
|
|
@@ -20952,9 +22377,9 @@ function drawCommentMarkers(svg2, document2, page3, zoom) {
|
|
|
20952
22377
|
const threads = visioCommentThreads(document2, page3);
|
|
20953
22378
|
if (!threads.length) return;
|
|
20954
22379
|
const create = (name) => svg2.ownerDocument.createElementNS("http://www.w3.org/2000/svg", name);
|
|
20955
|
-
const
|
|
20956
|
-
|
|
20957
|
-
const
|
|
22380
|
+
const layer2 = create("g");
|
|
22381
|
+
layer2.dataset.commentMarkers = "";
|
|
22382
|
+
const scale3 = 1 / (96 * zoom);
|
|
20958
22383
|
for (const thread of threads) {
|
|
20959
22384
|
let x = 0, y = 0;
|
|
20960
22385
|
const id = threadShapeId(thread.id);
|
|
@@ -20973,7 +22398,7 @@ function drawCommentMarkers(svg2, document2, page3, zoom) {
|
|
|
20973
22398
|
const count = thread.comments.length;
|
|
20974
22399
|
const label = `${count} comment${count === 1 ? "" : "s"}: ${thread.anchorLabel ?? ""}`;
|
|
20975
22400
|
marker.setAttribute("aria-label", label);
|
|
20976
|
-
marker.setAttribute("transform", `translate(${x} ${y}) scale(${
|
|
22401
|
+
marker.setAttribute("transform", `translate(${x} ${y}) scale(${scale3})`);
|
|
20977
22402
|
const bubble = create("path");
|
|
20978
22403
|
bubble.setAttribute("d", BUBBLE);
|
|
20979
22404
|
const text2 = create("text");
|
|
@@ -20984,9 +22409,9 @@ function drawCommentMarkers(svg2, document2, page3, zoom) {
|
|
|
20984
22409
|
title2.textContent = label;
|
|
20985
22410
|
marker.append(title2, bubble, text2);
|
|
20986
22411
|
marker.toggleAttribute("data-resolved", thread.resolved);
|
|
20987
|
-
|
|
22412
|
+
layer2.append(marker);
|
|
20988
22413
|
}
|
|
20989
|
-
svg2.append(
|
|
22414
|
+
svg2.append(layer2);
|
|
20990
22415
|
}
|
|
20991
22416
|
|
|
20992
22417
|
// src/visio/viewer-comments.ts
|
|
@@ -22094,126 +23519,36 @@ var ViewerPictureFormat = class {
|
|
|
22094
23519
|
root;
|
|
22095
23520
|
controller;
|
|
22096
23521
|
edit;
|
|
22097
|
-
reason(state) {
|
|
22098
|
-
if (!canEditDiagram(state)) return "Open a .vsdx file to edit a picture.";
|
|
22099
|
-
if (state.loading || state.edit.busy) return "Wait for the current operation to finish.";
|
|
22100
|
-
if (!selectedPicture(state)) return "Select one picture to adjust or crop it.";
|
|
22101
|
-
return void 0;
|
|
22102
|
-
}
|
|
22103
|
-
run(action2) {
|
|
22104
|
-
const state = this.controller.state;
|
|
22105
|
-
const target = selectedPicture(state);
|
|
22106
|
-
if (!target || this.reason(state) !== void 0) return;
|
|
22107
|
-
const edit = action2.type === "picture-crop" ? { type: "crop-picture", ...target, crop: action2.crop } : {
|
|
22108
|
-
type: "set-picture-adjust",
|
|
22109
|
-
...target,
|
|
22110
|
-
...action2.brightness === void 0 ? {} : { brightness: action2.brightness },
|
|
22111
|
-
...action2.contrast === void 0 ? {} : { contrast: action2.contrast }
|
|
22112
|
-
};
|
|
22113
|
-
const message = action2.type === "picture-crop" ? action2.crop === "square" ? "Cropped the picture to a square." : "Reset the picture crop." : "Adjusted the picture.";
|
|
22114
|
-
this.edit(() => this.controller.applyEdits([edit]), message);
|
|
22115
|
-
}
|
|
22116
|
-
render(state) {
|
|
22117
|
-
const reason = this.reason(state);
|
|
22118
|
-
for (const id of ["picture-brightness", "picture-contrast", "picture-crop"]) {
|
|
22119
|
-
const menu2 = this.root.querySelector(`[data-menu="${id}"]`);
|
|
22120
|
-
if (!menu2) continue;
|
|
22121
|
-
menu2.disabled = reason !== void 0;
|
|
22122
|
-
menu2.toggleAttribute("disabled", reason !== void 0);
|
|
22123
|
-
menu2.title = reason ? `${menu2.getAttribute("label") ?? ""}: ${reason}` : menu2.getAttribute("label") ?? "";
|
|
22124
|
-
}
|
|
22125
|
-
}
|
|
22126
|
-
};
|
|
22127
|
-
var DATA_IMPORT_MAX_BYTES = 16 * 1024 * 1024;
|
|
22128
|
-
var ACCEPT = ".csv,.txt,.xlsx,.xlsm,.xls";
|
|
22129
|
-
async function readWorkbook(file) {
|
|
22130
|
-
if (file.size > DATA_IMPORT_MAX_BYTES)
|
|
22131
|
-
throw new Error(`${file.name} is larger than the 16 MB import limit.`);
|
|
22132
|
-
const { loadWorkbook } = await import('ooxml-core/xlsx/load');
|
|
22133
|
-
return loadWorkbook(new Uint8Array(await file.arrayBuffer()), { fileName: file.name });
|
|
22134
|
-
}
|
|
22135
|
-
function readTable(workbook, options2) {
|
|
22136
|
-
const range = options2.range.trim() ? visioParseRange(options2.range) : void 0;
|
|
22137
|
-
if (options2.range.trim() && !range) throw new Error("Type a range such as A1:D20.");
|
|
22138
|
-
const table = visioDataTable(visioWorkbookGrid(workbook, options2.sheet, range), {
|
|
22139
|
-
header: options2.header
|
|
22140
|
-
});
|
|
22141
|
-
if (!table.rows.length) throw new Error("The selected data has no rows.");
|
|
22142
|
-
return table;
|
|
22143
|
-
}
|
|
22144
|
-
var DataFilePicker = class {
|
|
22145
|
-
input;
|
|
22146
|
-
#pending;
|
|
22147
|
-
constructor(root) {
|
|
22148
|
-
this.input = root.ownerDocument.createElement("input");
|
|
22149
|
-
this.input.type = "file";
|
|
22150
|
-
this.input.accept = ACCEPT;
|
|
22151
|
-
this.input.hidden = true;
|
|
22152
|
-
this.input.dataset.importData = "";
|
|
22153
|
-
this.input.addEventListener("change", () => {
|
|
22154
|
-
const file = this.input.files?.[0];
|
|
22155
|
-
this.input.value = "";
|
|
22156
|
-
this.#settle(file ? { file } : void 0);
|
|
22157
|
-
});
|
|
22158
|
-
this.input.addEventListener("cancel", () => this.#settle(void 0));
|
|
22159
|
-
root.append(this.input);
|
|
22160
|
-
}
|
|
22161
|
-
#settle(file) {
|
|
22162
|
-
const pending = this.#pending;
|
|
22163
|
-
this.#pending = void 0;
|
|
22164
|
-
pending?.(file);
|
|
22165
|
-
}
|
|
22166
|
-
async pick() {
|
|
22167
|
-
const picker = this.input.ownerDocument.defaultView?.showOpenFilePicker;
|
|
22168
|
-
if (typeof picker === "function") {
|
|
22169
|
-
try {
|
|
22170
|
-
const [handle] = await picker.call(this.input.ownerDocument.defaultView, {
|
|
22171
|
-
multiple: false,
|
|
22172
|
-
types: [
|
|
22173
|
-
{
|
|
22174
|
-
description: "Excel workbooks and CSV files",
|
|
22175
|
-
accept: {
|
|
22176
|
-
"text/csv": [".csv", ".txt"],
|
|
22177
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [
|
|
22178
|
-
".xlsx",
|
|
22179
|
-
".xlsm"
|
|
22180
|
-
],
|
|
22181
|
-
"application/vnd.ms-excel": [".xls"]
|
|
22182
|
-
}
|
|
22183
|
-
}
|
|
22184
|
-
]
|
|
22185
|
-
});
|
|
22186
|
-
return handle ? { file: await handle.getFile(), handle } : void 0;
|
|
22187
|
-
} catch (error) {
|
|
22188
|
-
if (error instanceof Error && error.name === "AbortError") return void 0;
|
|
22189
|
-
}
|
|
23522
|
+
reason(state) {
|
|
23523
|
+
if (!canEditDiagram(state)) return "Open a .vsdx file to edit a picture.";
|
|
23524
|
+
if (state.loading || state.edit.busy) return "Wait for the current operation to finish.";
|
|
23525
|
+
if (!selectedPicture(state)) return "Select one picture to adjust or crop it.";
|
|
23526
|
+
return void 0;
|
|
23527
|
+
}
|
|
23528
|
+
run(action2) {
|
|
23529
|
+
const state = this.controller.state;
|
|
23530
|
+
const target = selectedPicture(state);
|
|
23531
|
+
if (!target || this.reason(state) !== void 0) return;
|
|
23532
|
+
const edit = action2.type === "picture-crop" ? { type: "crop-picture", ...target, crop: action2.crop } : {
|
|
23533
|
+
type: "set-picture-adjust",
|
|
23534
|
+
...target,
|
|
23535
|
+
...action2.brightness === void 0 ? {} : { brightness: action2.brightness },
|
|
23536
|
+
...action2.contrast === void 0 ? {} : { contrast: action2.contrast }
|
|
23537
|
+
};
|
|
23538
|
+
const message = action2.type === "picture-crop" ? action2.crop === "square" ? "Cropped the picture to a square." : "Reset the picture crop." : "Adjusted the picture.";
|
|
23539
|
+
this.edit(() => this.controller.applyEdits([edit]), message);
|
|
23540
|
+
}
|
|
23541
|
+
render(state) {
|
|
23542
|
+
const reason = this.reason(state);
|
|
23543
|
+
for (const id of ["picture-brightness", "picture-contrast", "picture-crop"]) {
|
|
23544
|
+
const menu2 = this.root.querySelector(`[data-menu="${id}"]`);
|
|
23545
|
+
if (!menu2) continue;
|
|
23546
|
+
menu2.disabled = reason !== void 0;
|
|
23547
|
+
menu2.toggleAttribute("disabled", reason !== void 0);
|
|
23548
|
+
menu2.title = reason ? `${menu2.getAttribute("label") ?? ""}: ${reason}` : menu2.getAttribute("label") ?? "";
|
|
22190
23549
|
}
|
|
22191
|
-
this.#settle(void 0);
|
|
22192
|
-
return new Promise((resolve) => {
|
|
22193
|
-
this.#pending = resolve;
|
|
22194
|
-
this.input.click();
|
|
22195
|
-
});
|
|
22196
23550
|
}
|
|
22197
23551
|
};
|
|
22198
|
-
function createImportDialog(root, press) {
|
|
22199
|
-
const dialog = new InsertDialog(
|
|
22200
|
-
root,
|
|
22201
|
-
"data-import-dialog",
|
|
22202
|
-
"Custom Import",
|
|
22203
|
-
[
|
|
22204
|
-
{ name: "name", label: "Recordset name", maxLength: 255 },
|
|
22205
|
-
{ name: "sheet", label: "Worksheet", choices: true },
|
|
22206
|
-
{ name: "range", label: "Range (optional)", placeholder: "A1:D20" },
|
|
22207
|
-
{ name: "key", label: "Unique identifier column (optional)", maxLength: 255 },
|
|
22208
|
-
{ name: "header", label: "First row of data contains column headings", input: "checkbox" }
|
|
22209
|
-
],
|
|
22210
|
-
["Import", "Cancel"],
|
|
22211
|
-
press
|
|
22212
|
-
);
|
|
22213
|
-
return dialog;
|
|
22214
|
-
}
|
|
22215
|
-
|
|
22216
|
-
// src/visio/viewer-data-sources.ts
|
|
22217
23552
|
var ViewerDataSources = class {
|
|
22218
23553
|
constructor(root, controller, announce, run, links) {
|
|
22219
23554
|
this.controller = controller;
|
|
@@ -22298,7 +23633,7 @@ var ViewerDataSources = class {
|
|
|
22298
23633
|
);
|
|
22299
23634
|
}
|
|
22300
23635
|
const column = key ? table.columns.find((item) => item.name === key || item.label === key) : void 0;
|
|
22301
|
-
const
|
|
23636
|
+
const csv2 = /\.(csv|txt)$/i.test(picked.file.name);
|
|
22302
23637
|
const range = options2.range.trim().toUpperCase();
|
|
22303
23638
|
const before = new Set(
|
|
22304
23639
|
(this.controller.state.document?.dataRecordsets ?? []).map((set) => set.id)
|
|
@@ -22312,9 +23647,9 @@ var ViewerDataSources = class {
|
|
|
22312
23647
|
...table,
|
|
22313
23648
|
// Saved as the recordset's data connection, command and primary key.
|
|
22314
23649
|
source: {
|
|
22315
|
-
kind:
|
|
23650
|
+
kind: csv2 ? "csv" : "workbook",
|
|
22316
23651
|
fileName: picked.file.name,
|
|
22317
|
-
...
|
|
23652
|
+
...csv2 ? {} : { sheet: workbook.sheets[options2.sheet]?.name ?? "Sheet1" },
|
|
22318
23653
|
...range ? { range } : {}
|
|
22319
23654
|
},
|
|
22320
23655
|
...column ? { primaryKey: column.name } : {}
|
|
@@ -22942,7 +24277,10 @@ var ViewerShapeData = class {
|
|
|
22942
24277
|
...this.form.checked("hidden") ? { invisible: true } : {}
|
|
22943
24278
|
};
|
|
22944
24279
|
try {
|
|
22945
|
-
|
|
24280
|
+
const state = this.controller.state;
|
|
24281
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
24282
|
+
const edit = { type: "set-shape-data", ...target, row, data };
|
|
24283
|
+
await this.controller.applyEdits(page3 ? visioOrgFollowData(page3, [edit]) : [edit]);
|
|
22946
24284
|
this.form.dialog.close();
|
|
22947
24285
|
this.announce(data ? `Saved Shape Data ${label}.` : `Deleted Shape Data ${existing}.`);
|
|
22948
24286
|
} catch (error) {
|
|
@@ -22966,9 +24304,113 @@ var ViewerShapeData = class {
|
|
|
22966
24304
|
this.form.busy(state.edit.busy);
|
|
22967
24305
|
}
|
|
22968
24306
|
};
|
|
24307
|
+
var fieldsOf = (shape) => (shape.shapeData ?? []).filter((row) => !row.invisible && !row.name.startsWith("_"));
|
|
24308
|
+
var ViewerGraphicFields = class {
|
|
24309
|
+
constructor(root, controller, run) {
|
|
24310
|
+
this.controller = controller;
|
|
24311
|
+
this.run = run;
|
|
24312
|
+
const doc = root.ownerDocument;
|
|
24313
|
+
this.pane = doc.createElement("office-ui-task-pane");
|
|
24314
|
+
this.pane.className = "graphic-fields";
|
|
24315
|
+
this.pane.hidden = true;
|
|
24316
|
+
this.pane.setAttribute("label", "Data Graphic Fields");
|
|
24317
|
+
this.pane.setAttribute("close-label", "Close Data Graphic Fields");
|
|
24318
|
+
this.#hint = doc.createElement("p");
|
|
24319
|
+
this.#hint.className = "graphic-fields-hint";
|
|
24320
|
+
this.#list = doc.createElement("div");
|
|
24321
|
+
this.#list.className = "graphic-fields-list";
|
|
24322
|
+
this.#list.setAttribute("role", "group");
|
|
24323
|
+
this.#list.setAttribute("aria-label", "Fields to show as text");
|
|
24324
|
+
this.pane.append(this.#hint, this.#list);
|
|
24325
|
+
this.pane.addEventListener("office-pane-close", () => this.toggle(false));
|
|
24326
|
+
(root.querySelector(".workspace") ?? root).append(this.pane);
|
|
24327
|
+
this.#list.addEventListener("change", (event) => {
|
|
24328
|
+
const box2 = event.target;
|
|
24329
|
+
if (box2.dataset.field !== void 0) this.#toggle(box2.dataset.field, box2.checked);
|
|
24330
|
+
});
|
|
24331
|
+
}
|
|
24332
|
+
controller;
|
|
24333
|
+
run;
|
|
24334
|
+
pane;
|
|
24335
|
+
#list;
|
|
24336
|
+
#hint;
|
|
24337
|
+
#signature = "";
|
|
24338
|
+
toggle(open = this.pane.hidden) {
|
|
24339
|
+
this.pane.hidden = !open;
|
|
24340
|
+
this.#signature = "";
|
|
24341
|
+
this.render(this.controller.state);
|
|
24342
|
+
}
|
|
24343
|
+
#page(state) {
|
|
24344
|
+
return state.document?.pages[state.pageIndex];
|
|
24345
|
+
}
|
|
24346
|
+
#targets(state, page3) {
|
|
24347
|
+
const ids = new Set(state.selectedShapes.map((shape) => shape.id));
|
|
24348
|
+
return page3.shapes.filter((shape) => ids.has(shape.id));
|
|
24349
|
+
}
|
|
24350
|
+
#toggle(field, on) {
|
|
24351
|
+
const state = this.controller.state;
|
|
24352
|
+
const page3 = this.#page(state);
|
|
24353
|
+
if (!page3 || !canEditDiagram(state)) return;
|
|
24354
|
+
const owners = this.#targets(state, page3).filter(
|
|
24355
|
+
(shape) => fieldsOf(shape).some((row) => row.name === field)
|
|
24356
|
+
);
|
|
24357
|
+
const ids = owners.map((shape) => shape.id);
|
|
24358
|
+
const item = { kind: "text", field };
|
|
24359
|
+
const edits = on ? visioSetDataGraphicItemEdits(page3, ids, item) : visioDeleteDataGraphicItemEdits(page3, ids, item);
|
|
24360
|
+
if (edits.length)
|
|
24361
|
+
this.run(
|
|
24362
|
+
() => this.controller.applyEdits(edits),
|
|
24363
|
+
on ? `Showing ${field} on the selection.` : `Hid ${field} on the selection.`
|
|
24364
|
+
);
|
|
24365
|
+
}
|
|
24366
|
+
render(state) {
|
|
24367
|
+
const box2 = this.pane.getRootNode();
|
|
24368
|
+
const check2 = box2.querySelector(
|
|
24369
|
+
'[data-check="data-graphic-fields"]'
|
|
24370
|
+
);
|
|
24371
|
+
if (check2) {
|
|
24372
|
+
check2.checked = !this.pane.hidden;
|
|
24373
|
+
check2.disabled = !state.document;
|
|
24374
|
+
}
|
|
24375
|
+
if (this.pane.hidden) return;
|
|
24376
|
+
const page3 = this.#page(state);
|
|
24377
|
+
const editable3 = canEditDiagram(state) && !state.loading && !state.edit.busy;
|
|
24378
|
+
const owners = page3 ? this.#targets(state, page3) : [];
|
|
24379
|
+
const first = owners[0];
|
|
24380
|
+
const rows = first ? fieldsOf(first) : [];
|
|
24381
|
+
const on = new Set(
|
|
24382
|
+
first && page3 ? visioDataGraphicItems(page3, first.id).filter((item) => item.kind === "text").map((item) => item.field) : []
|
|
24383
|
+
);
|
|
24384
|
+
const signature = JSON.stringify([
|
|
24385
|
+
first?.id,
|
|
24386
|
+
editable3,
|
|
24387
|
+
rows.map((row) => [row.name, row.label, row.value, on.has(row.name)])
|
|
24388
|
+
]);
|
|
24389
|
+
if (signature === this.#signature) return;
|
|
24390
|
+
this.#signature = signature;
|
|
24391
|
+
this.#hint.textContent = !first ? "Select a shape to choose which of its data fields show as text." : rows.length ? `Fields of ${first.text.plainText || `shape ${first.id}`}. Checked fields show as text on the shape.` : "The selected shape has no Shape Data fields. Link data or define Shape Data first.";
|
|
24392
|
+
const doc = this.pane.ownerDocument;
|
|
24393
|
+
this.#list.replaceChildren(
|
|
24394
|
+
...rows.map((row) => {
|
|
24395
|
+
const label = doc.createElement("label");
|
|
24396
|
+
const input = doc.createElement("input");
|
|
24397
|
+
input.type = "checkbox";
|
|
24398
|
+
input.dataset.field = row.name;
|
|
24399
|
+
input.checked = on.has(row.name);
|
|
24400
|
+
input.disabled = !editable3;
|
|
24401
|
+
const name = doc.createElement("span");
|
|
24402
|
+
name.textContent = row.label || row.name;
|
|
24403
|
+
const value = doc.createElement("small");
|
|
24404
|
+
value.textContent = String(row.value ?? row.rawValue ?? "");
|
|
24405
|
+
label.append(input, name, value);
|
|
24406
|
+
return label;
|
|
24407
|
+
})
|
|
24408
|
+
);
|
|
24409
|
+
}
|
|
24410
|
+
};
|
|
22969
24411
|
|
|
22970
|
-
// src/visio/viewer-data.ts
|
|
22971
|
-
var
|
|
24412
|
+
// src/visio/viewer-data-labels.ts
|
|
24413
|
+
var GRAPHIC_KINDS = {
|
|
22972
24414
|
"graphic-text": "text",
|
|
22973
24415
|
"graphic-bar": "bar",
|
|
22974
24416
|
"graphic-icon": "icon",
|
|
@@ -22985,6 +24427,215 @@ var POSITION_LABELS = [
|
|
|
22985
24427
|
"Bottom center",
|
|
22986
24428
|
"Bottom right"
|
|
22987
24429
|
];
|
|
24430
|
+
var kindLabel = (kind) => KIND_LABELS[Object.values(GRAPHIC_KINDS).indexOf(kind)] ?? kind;
|
|
24431
|
+
var itemLabel = (item, fieldLabel) => `${kindLabel(item.kind)}: ${fieldLabel}${item.position ? ` (${item.position.replace("-", " ")})` : ""}`;
|
|
24432
|
+
|
|
24433
|
+
// src/visio/viewer-data-advanced.ts
|
|
24434
|
+
var ViewerAdvancedGraphics = class {
|
|
24435
|
+
constructor(root, controller, announce, run, targets) {
|
|
24436
|
+
this.controller = controller;
|
|
24437
|
+
this.announce = announce;
|
|
24438
|
+
this.run = run;
|
|
24439
|
+
this.targets = targets;
|
|
24440
|
+
this.dialog = new InsertDialog(
|
|
24441
|
+
root,
|
|
24442
|
+
"data-graphic-items-dialog",
|
|
24443
|
+
"Edit Data Graphic",
|
|
24444
|
+
[{ name: "items", label: "Items in this data graphic", choices: true }],
|
|
24445
|
+
["New Item", "Edit Item", "Delete Item", "Close"],
|
|
24446
|
+
(button) => this.#press(button)
|
|
24447
|
+
);
|
|
24448
|
+
const list = this.dialog.fields.get("items");
|
|
24449
|
+
list.size = 6;
|
|
24450
|
+
list.addEventListener("change", () => this.#sync());
|
|
24451
|
+
list.addEventListener("dblclick", () => this.#press("Edit Item"));
|
|
24452
|
+
}
|
|
24453
|
+
controller;
|
|
24454
|
+
announce;
|
|
24455
|
+
run;
|
|
24456
|
+
targets;
|
|
24457
|
+
dialog;
|
|
24458
|
+
#items = [];
|
|
24459
|
+
/** Opens the item form, empty for a new item. */
|
|
24460
|
+
onEdit = () => {
|
|
24461
|
+
};
|
|
24462
|
+
#page() {
|
|
24463
|
+
const state = this.controller.state;
|
|
24464
|
+
return state.document?.pages[state.pageIndex];
|
|
24465
|
+
}
|
|
24466
|
+
/** The shape whose items are listed: the first selected top-level shape. */
|
|
24467
|
+
#owner(page3) {
|
|
24468
|
+
return this.targets(page3).find((id) => page3.shapes.some((shape) => shape.id === id));
|
|
24469
|
+
}
|
|
24470
|
+
open() {
|
|
24471
|
+
const page3 = this.#page();
|
|
24472
|
+
if (!page3 || !canEditDiagram(this.controller.state)) return;
|
|
24473
|
+
const selected = this.controller.state.selectedShapes.some(
|
|
24474
|
+
(shape) => page3.shapes.some((item) => item.id === shape.id)
|
|
24475
|
+
);
|
|
24476
|
+
if (!selected) return this.announce("Select a shape to edit its data graphic.");
|
|
24477
|
+
if (!visioDataGraphicFields(page3).length)
|
|
24478
|
+
return this.announce(
|
|
24479
|
+
"Link or define Shape Data first; data graphics display Shape Data fields."
|
|
24480
|
+
);
|
|
24481
|
+
this.refresh();
|
|
24482
|
+
this.dialog.error.textContent = "";
|
|
24483
|
+
this.dialog.dialog.show();
|
|
24484
|
+
this.dialog.fields.get("items").focus();
|
|
24485
|
+
}
|
|
24486
|
+
/** Rebuild the list from the drawing, keeping the selected item when it is still there. */
|
|
24487
|
+
refresh() {
|
|
24488
|
+
const page3 = this.#page();
|
|
24489
|
+
const owner = page3 && this.#owner(page3);
|
|
24490
|
+
this.#items = page3 && owner ? visioDataGraphicItems(page3, owner) : [];
|
|
24491
|
+
const fields2 = page3 ? visioDataGraphicFields(page3) : [];
|
|
24492
|
+
const labelOf = (name) => fields2.find((field) => field.name === name)?.label ?? name;
|
|
24493
|
+
const select = this.dialog.fields.get("items");
|
|
24494
|
+
const previous = select.value;
|
|
24495
|
+
this.dialog.choices(
|
|
24496
|
+
"items",
|
|
24497
|
+
this.#items.map((_, index) => String(index)),
|
|
24498
|
+
Number(previous) < this.#items.length ? previous || "0" : "0",
|
|
24499
|
+
{
|
|
24500
|
+
labels: this.#items.map((item) => itemLabel(item, labelOf(item.field))),
|
|
24501
|
+
none: false,
|
|
24502
|
+
noneLabel: "No items yet. Choose New Item."
|
|
24503
|
+
}
|
|
24504
|
+
);
|
|
24505
|
+
if (!this.#items.length) select.replaceChildren();
|
|
24506
|
+
this.#sync();
|
|
24507
|
+
}
|
|
24508
|
+
#selected() {
|
|
24509
|
+
return this.#items[Number(this.dialog.fields.get("items").value)];
|
|
24510
|
+
}
|
|
24511
|
+
#sync() {
|
|
24512
|
+
const has = !!this.#selected();
|
|
24513
|
+
for (const name of ["Edit Item", "Delete Item"]) this.dialog.buttons.get(name).disabled = !has;
|
|
24514
|
+
}
|
|
24515
|
+
#press(button) {
|
|
24516
|
+
if (button === "Close") return this.dialog.dialog.close();
|
|
24517
|
+
const page3 = this.#page();
|
|
24518
|
+
if (!page3) return;
|
|
24519
|
+
if (button === "New Item") return this.onEdit(void 0);
|
|
24520
|
+
const item = this.#selected();
|
|
24521
|
+
if (!item) return;
|
|
24522
|
+
if (button === "Edit Item") return this.onEdit(item);
|
|
24523
|
+
const edits = visioDeleteDataGraphicItemEdits(page3, this.targets(page3), item);
|
|
24524
|
+
this.run(async () => {
|
|
24525
|
+
await this.controller.applyEdits(edits);
|
|
24526
|
+
this.refresh();
|
|
24527
|
+
}, "Deleted the item from the data graphic.");
|
|
24528
|
+
}
|
|
24529
|
+
};
|
|
24530
|
+
var SAMPLE2 = [
|
|
24531
|
+
["1", "Receive order", "2", "", "Start", "Sales"],
|
|
24532
|
+
["2", "Check stock", "3,4", "Yes,No", "Decision", "Warehouse"],
|
|
24533
|
+
["3", "Ship order", "5", "", "Process", "Warehouse"],
|
|
24534
|
+
["4", "Back order", "5", "", "Process", "Sales"],
|
|
24535
|
+
["5", "Order complete", "", "", "End", "Sales"]
|
|
24536
|
+
];
|
|
24537
|
+
var csv = (row) => row.map((cell) => `"${cell.replace(/"/g, '""')}"`).join(",");
|
|
24538
|
+
var ViewerDataVisualizer = class {
|
|
24539
|
+
constructor(controller, announce, run, picker) {
|
|
24540
|
+
this.controller = controller;
|
|
24541
|
+
this.announce = announce;
|
|
24542
|
+
this.run = run;
|
|
24543
|
+
this.picker = picker;
|
|
24544
|
+
}
|
|
24545
|
+
controller;
|
|
24546
|
+
announce;
|
|
24547
|
+
run;
|
|
24548
|
+
picker;
|
|
24549
|
+
#handle;
|
|
24550
|
+
#page() {
|
|
24551
|
+
const state = this.controller.state;
|
|
24552
|
+
return state.document?.pages[state.pageIndex];
|
|
24553
|
+
}
|
|
24554
|
+
/** Whether this page already holds a flowchart this command drew. */
|
|
24555
|
+
drawn(page3) {
|
|
24556
|
+
return !!page3 && visioVisualizerShapes(page3).steps.size > 0;
|
|
24557
|
+
}
|
|
24558
|
+
/** The kind of diagram a refresh redraws: the page's swimlanes decide. */
|
|
24559
|
+
#variantOf(page3) {
|
|
24560
|
+
return page3.shapes.some(
|
|
24561
|
+
(shape) => shape.structure?.type === "container" && shape.structure.swimlane?.role === "frame"
|
|
24562
|
+
) ? "cross-functional" : "basic";
|
|
24563
|
+
}
|
|
24564
|
+
async create(variant) {
|
|
24565
|
+
const picked = await this.picker.pick();
|
|
24566
|
+
if (!picked) return;
|
|
24567
|
+
this.#handle = picked.handle;
|
|
24568
|
+
await this.#draw(picked.file, variant);
|
|
24569
|
+
}
|
|
24570
|
+
async refresh() {
|
|
24571
|
+
const page3 = this.#page();
|
|
24572
|
+
if (!page3 || !this.drawn(page3))
|
|
24573
|
+
return this.announce("Create a flowchart from a table first; Refresh Diagram redraws it.");
|
|
24574
|
+
let file;
|
|
24575
|
+
try {
|
|
24576
|
+
file = await this.#handle?.getFile();
|
|
24577
|
+
} catch {
|
|
24578
|
+
file = void 0;
|
|
24579
|
+
}
|
|
24580
|
+
if (!file) {
|
|
24581
|
+
this.announce(
|
|
24582
|
+
"Choose the edited table again; this browser cannot re-read the original file."
|
|
24583
|
+
);
|
|
24584
|
+
const picked = await this.picker.pick();
|
|
24585
|
+
if (!picked) return;
|
|
24586
|
+
this.#handle = picked.handle;
|
|
24587
|
+
file = picked.file;
|
|
24588
|
+
}
|
|
24589
|
+
await this.#draw(file, this.#variantOf(page3), true);
|
|
24590
|
+
}
|
|
24591
|
+
async #draw(file, variant, refreshing = false) {
|
|
24592
|
+
const page3 = this.#page();
|
|
24593
|
+
if (!page3 || !canEditDiagram(this.controller.state)) return;
|
|
24594
|
+
let plan;
|
|
24595
|
+
let warnings;
|
|
24596
|
+
try {
|
|
24597
|
+
const table = readTable(await readWorkbook(file), { sheet: 0, range: "", header: true });
|
|
24598
|
+
const parsed = visioParseVisualizerTable(table);
|
|
24599
|
+
warnings = parsed.warnings;
|
|
24600
|
+
plan = visioDataVisualizerEdits(page3, parsed.steps, variant);
|
|
24601
|
+
this.#count = parsed.steps.length;
|
|
24602
|
+
} catch (error) {
|
|
24603
|
+
return this.announce(
|
|
24604
|
+
`${file.name} cannot be drawn: ${error instanceof Error ? error.message : String(error)}`
|
|
24605
|
+
);
|
|
24606
|
+
}
|
|
24607
|
+
const { batches, notes } = plan;
|
|
24608
|
+
const extra = [...warnings, ...notes];
|
|
24609
|
+
this.run(
|
|
24610
|
+
async () => {
|
|
24611
|
+
for (const batch of batches)
|
|
24612
|
+
try {
|
|
24613
|
+
await this.controller.applyEdits(batch);
|
|
24614
|
+
} catch (error) {
|
|
24615
|
+
const sized = batch.filter((edit) => edit.type !== "set-page-size");
|
|
24616
|
+
if (sized.length === batch.length) throw error;
|
|
24617
|
+
if (sized.length) await this.controller.applyEdits(sized);
|
|
24618
|
+
}
|
|
24619
|
+
},
|
|
24620
|
+
`${refreshing ? "Redrew" : "Drew"} ${this.#count} process steps from ${file.name}.${extra.length ? ` ${extra.join(" ")}` : ""}`
|
|
24621
|
+
);
|
|
24622
|
+
}
|
|
24623
|
+
#count = 0;
|
|
24624
|
+
/** A CSV with the expected columns and a small example, for the person to edit. */
|
|
24625
|
+
downloadTemplate() {
|
|
24626
|
+
const doc = document;
|
|
24627
|
+
const text2 = [VISIO_VISUALIZER_COLUMNS, ...SAMPLE2].map((row) => csv(row)).join("\r\n");
|
|
24628
|
+
const url = URL.createObjectURL(new Blob([text2], { type: "text/csv" }));
|
|
24629
|
+
const link2 = doc.createElement("a");
|
|
24630
|
+
link2.href = url;
|
|
24631
|
+
link2.download = "data-visualizer-flowchart.csv";
|
|
24632
|
+
link2.click();
|
|
24633
|
+
setTimeout(() => URL.revokeObjectURL(url), 1e3);
|
|
24634
|
+
this.announce("Saved a table template with the Data Visualizer columns.");
|
|
24635
|
+
}
|
|
24636
|
+
};
|
|
24637
|
+
|
|
24638
|
+
// src/visio/viewer-data.ts
|
|
22988
24639
|
var POSITION_PREFIX = "graphic-position-";
|
|
22989
24640
|
var ViewerData = class {
|
|
22990
24641
|
constructor(root, controller, announce, run) {
|
|
@@ -23006,7 +24657,7 @@ var ViewerData = class {
|
|
|
23006
24657
|
["Apply", "Cancel"],
|
|
23007
24658
|
(button) => this.#applyGraphic(button)
|
|
23008
24659
|
);
|
|
23009
|
-
this.graphics.choices("kind", Object.values(
|
|
24660
|
+
this.graphics.choices("kind", Object.values(GRAPHIC_KINDS), "text", {
|
|
23010
24661
|
labels: KIND_LABELS,
|
|
23011
24662
|
none: false
|
|
23012
24663
|
});
|
|
@@ -23019,6 +24670,16 @@ var ViewerData = class {
|
|
|
23019
24670
|
this.sources = new ViewerDataSources(root, controller, announce, run, this.links);
|
|
23020
24671
|
this.links.onRefresh = () => void this.sources.refresh();
|
|
23021
24672
|
this.shapeData = new ViewerShapeData(root, controller, announce);
|
|
24673
|
+
this.fields = new ViewerGraphicFields(root, controller, run);
|
|
24674
|
+
this.visualizer = new ViewerDataVisualizer(controller, announce, run, this.sources.picker);
|
|
24675
|
+
this.advanced = new ViewerAdvancedGraphics(
|
|
24676
|
+
root,
|
|
24677
|
+
controller,
|
|
24678
|
+
announce,
|
|
24679
|
+
run,
|
|
24680
|
+
(page3) => this.#targets(page3)
|
|
24681
|
+
);
|
|
24682
|
+
this.advanced.onEdit = (item) => this.#editItem(item);
|
|
23022
24683
|
}
|
|
23023
24684
|
root;
|
|
23024
24685
|
controller;
|
|
@@ -23028,6 +24689,32 @@ var ViewerData = class {
|
|
|
23028
24689
|
graphics;
|
|
23029
24690
|
links;
|
|
23030
24691
|
shapeData;
|
|
24692
|
+
fields;
|
|
24693
|
+
advanced;
|
|
24694
|
+
visualizer;
|
|
24695
|
+
/** Set while the item form edits one item of Advanced Data Graphics (undefined replacing: new). */
|
|
24696
|
+
#item;
|
|
24697
|
+
/** Open the graphics form for one Advanced Data Graphics item, or a new one. */
|
|
24698
|
+
#editItem(item) {
|
|
24699
|
+
const page3 = this.#page();
|
|
24700
|
+
if (!page3) return;
|
|
24701
|
+
const fields2 = visioDataGraphicFields(page3);
|
|
24702
|
+
this.graphics.choices(
|
|
24703
|
+
"field",
|
|
24704
|
+
fields2.map((field) => field.name),
|
|
24705
|
+
item?.field ?? fields2[0].name,
|
|
24706
|
+
{ labels: fields2.map((field) => field.label), none: false }
|
|
24707
|
+
);
|
|
24708
|
+
this.graphics.fields.get("kind").value = item?.kind ?? "text";
|
|
24709
|
+
this.graphics.fields.get("position").value = item?.position ?? "";
|
|
24710
|
+
this.graphics.fields.get("min").value = String(item?.min ?? "");
|
|
24711
|
+
this.graphics.fields.get("max").value = String(item?.max ?? "");
|
|
24712
|
+
this.graphics.error.textContent = "";
|
|
24713
|
+
this.#item = { replacing: item };
|
|
24714
|
+
this.advanced.dialog.dialog.close();
|
|
24715
|
+
this.graphics.dialog.show();
|
|
24716
|
+
this.graphics.fields.get("field").focus();
|
|
24717
|
+
}
|
|
23031
24718
|
#editable(state) {
|
|
23032
24719
|
return canEditDiagram(state) && !state.loading && !state.edit.busy;
|
|
23033
24720
|
}
|
|
@@ -23043,8 +24730,17 @@ var ViewerData = class {
|
|
|
23043
24730
|
handle(command2) {
|
|
23044
24731
|
const state = this.controller.state;
|
|
23045
24732
|
if (command2 === "external-data-window") return this.links.toggle();
|
|
24733
|
+
if (command2 === "graphic-fields") return this.fields.toggle();
|
|
24734
|
+
this.#item = void 0;
|
|
23046
24735
|
if (!this.#editable(state)) return;
|
|
23047
24736
|
if (command2 === "define-shape-data") return this.shapeData.open();
|
|
24737
|
+
if (command2 === "graphic-advanced") return this.advanced.open();
|
|
24738
|
+
if (command2 === "visualizer-template") return this.visualizer.downloadTemplate();
|
|
24739
|
+
if (command2 === "visualizer-refresh") return void this.visualizer.refresh();
|
|
24740
|
+
if (command2.startsWith("visualizer-"))
|
|
24741
|
+
return void this.visualizer.create(
|
|
24742
|
+
command2 === "visualizer-basic" ? "basic" : "cross-functional"
|
|
24743
|
+
);
|
|
23048
24744
|
if (command2 === "link-data") {
|
|
23049
24745
|
this.links.show();
|
|
23050
24746
|
if (!state.document?.dataRecordsets?.length) void this.sources.import(false);
|
|
@@ -23077,7 +24773,7 @@ var ViewerData = class {
|
|
|
23077
24773
|
fields2[0].name,
|
|
23078
24774
|
{ labels: fields2.map((field) => field.label), none: false }
|
|
23079
24775
|
);
|
|
23080
|
-
this.graphics.fields.get("kind").value =
|
|
24776
|
+
this.graphics.fields.get("kind").value = GRAPHIC_KINDS[command2] ?? "text";
|
|
23081
24777
|
for (const name of ["min", "max"])
|
|
23082
24778
|
this.graphics.fields.get(name).value = "";
|
|
23083
24779
|
this.graphics.fields.get("position").value = "";
|
|
@@ -23119,7 +24815,11 @@ var ViewerData = class {
|
|
|
23119
24815
|
);
|
|
23120
24816
|
}
|
|
23121
24817
|
#applyGraphic(button) {
|
|
23122
|
-
if (button === "Cancel")
|
|
24818
|
+
if (button === "Cancel") {
|
|
24819
|
+
this.graphics.dialog.close();
|
|
24820
|
+
if (this.#item) this.advanced.dialog.dialog.show();
|
|
24821
|
+
return;
|
|
24822
|
+
}
|
|
23123
24823
|
const page3 = this.#page();
|
|
23124
24824
|
if (!page3) return;
|
|
23125
24825
|
const number3 = (name) => {
|
|
@@ -23131,6 +24831,7 @@ var ViewerData = class {
|
|
|
23131
24831
|
return void (this.graphics.error.textContent = "Type numbers for the minimum and maximum.");
|
|
23132
24832
|
const kind = this.graphics.value("kind");
|
|
23133
24833
|
const position = this.graphics.value("position");
|
|
24834
|
+
if (this.#item) return this.#applyItem(page3, kind, position, min, max);
|
|
23134
24835
|
const edits = visioDataGraphicEdits(page3, this.#targets(page3), {
|
|
23135
24836
|
kind,
|
|
23136
24837
|
...position && kind !== "color" ? { position } : {},
|
|
@@ -23141,9 +24842,33 @@ var ViewerData = class {
|
|
|
23141
24842
|
if (!edits.length)
|
|
23142
24843
|
return void (this.graphics.error.textContent = "No shapes have a usable value for this field.");
|
|
23143
24844
|
this.graphics.dialog.close();
|
|
24845
|
+
this.run(() => this.controller.applyEdits(edits), `Applied ${kindLabel(kind)} data graphics.`);
|
|
24846
|
+
}
|
|
24847
|
+
/** The item form of Advanced Data Graphics: add the item, or change the one being edited. */
|
|
24848
|
+
#applyItem(page3, kind, position, min, max) {
|
|
24849
|
+
const replacing = this.#item?.replacing;
|
|
24850
|
+
const edits = visioSetDataGraphicItemEdits(
|
|
24851
|
+
page3,
|
|
24852
|
+
this.#targets(page3),
|
|
24853
|
+
{
|
|
24854
|
+
kind,
|
|
24855
|
+
field: this.graphics.value("field"),
|
|
24856
|
+
...position && kind !== "color" ? { position } : {},
|
|
24857
|
+
...min === void 0 ? {} : { min },
|
|
24858
|
+
...max === void 0 ? {} : { max }
|
|
24859
|
+
},
|
|
24860
|
+
replacing
|
|
24861
|
+
);
|
|
24862
|
+
if (!edits.length)
|
|
24863
|
+
return void (this.graphics.error.textContent = "No shapes have a usable value for this field.");
|
|
24864
|
+
this.graphics.dialog.close();
|
|
23144
24865
|
this.run(
|
|
23145
|
-
() =>
|
|
23146
|
-
|
|
24866
|
+
async () => {
|
|
24867
|
+
await this.controller.applyEdits(edits);
|
|
24868
|
+
this.advanced.refresh();
|
|
24869
|
+
this.advanced.dialog.dialog.show();
|
|
24870
|
+
},
|
|
24871
|
+
replacing ? "Changed the data graphic item." : "Added the item to the data graphic."
|
|
23147
24872
|
);
|
|
23148
24873
|
}
|
|
23149
24874
|
#legend(page3, orientation) {
|
|
@@ -23179,10 +24904,34 @@ var ViewerData = class {
|
|
|
23179
24904
|
return () => {
|
|
23180
24905
|
events.abort();
|
|
23181
24906
|
disposeLinks();
|
|
23182
|
-
for (const dialog of [
|
|
24907
|
+
for (const dialog of [
|
|
24908
|
+
this.sources.importer,
|
|
24909
|
+
this.graphics,
|
|
24910
|
+
this.advanced.dialog,
|
|
24911
|
+
this.shapeData.form
|
|
24912
|
+
])
|
|
23183
24913
|
dialog.dialog.close();
|
|
23184
24914
|
};
|
|
23185
24915
|
}
|
|
24916
|
+
#renderVisualizer(state, editing) {
|
|
24917
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
24918
|
+
const set = (name, enabled, title2) => {
|
|
24919
|
+
const control = this.root.querySelector(`[command="${name}"]`);
|
|
24920
|
+
if (!control) return;
|
|
24921
|
+
control.disabled = !enabled;
|
|
24922
|
+
if (title2) control.title = title2;
|
|
24923
|
+
};
|
|
24924
|
+
for (const id of ["visualizer-basic", "visualizer-cross-functional"])
|
|
24925
|
+
set(id, editing && !!page3);
|
|
24926
|
+
set(
|
|
24927
|
+
"visualizer-refresh",
|
|
24928
|
+
editing && this.visualizer.drawn(page3),
|
|
24929
|
+
"Redraw the diagram from the edited table."
|
|
24930
|
+
);
|
|
24931
|
+
const menu2 = this.root.querySelector('[data-menu="data-visualizer"]');
|
|
24932
|
+
if (menu2) menu2.disabled = !editing || !page3;
|
|
24933
|
+
set("advanced-data-graphics", editing && !!page3 && visioDataGraphicFields(page3).length > 0);
|
|
24934
|
+
}
|
|
23186
24935
|
render(state) {
|
|
23187
24936
|
const editing = this.#editable(state);
|
|
23188
24937
|
const page3 = state.document?.pages[state.pageIndex];
|
|
@@ -23241,13 +24990,15 @@ var ViewerData = class {
|
|
|
23241
24990
|
}
|
|
23242
24991
|
this.links.render(state);
|
|
23243
24992
|
this.shapeData.render(state);
|
|
23244
|
-
|
|
24993
|
+
this.fields.render(state);
|
|
24994
|
+
this.#renderVisualizer(state, editing);
|
|
24995
|
+
for (const dialog of [this.sources.importer, this.graphics, this.advanced.dialog])
|
|
23245
24996
|
if (dialog.dialog.open && (!canEditDiagram(state) || state.loading)) dialog.dialog.close();
|
|
23246
24997
|
}
|
|
23247
24998
|
};
|
|
23248
24999
|
|
|
23249
25000
|
// src/visio/viewer-auto-connect-parts.ts
|
|
23250
|
-
var
|
|
25001
|
+
var SVG6 = "http://www.w3.org/2000/svg";
|
|
23251
25002
|
var ARROWS = {
|
|
23252
25003
|
up: "M8 2.5 14 12H2Z",
|
|
23253
25004
|
right: "M13.5 8 4 14V2Z",
|
|
@@ -23255,10 +25006,10 @@ var ARROWS = {
|
|
|
23255
25006
|
left: "M2.5 8 12 2v12Z"
|
|
23256
25007
|
};
|
|
23257
25008
|
function icon3(doc, viewBox, d) {
|
|
23258
|
-
const svg2 = doc.createElementNS(
|
|
25009
|
+
const svg2 = doc.createElementNS(SVG6, "svg");
|
|
23259
25010
|
svg2.setAttribute("viewBox", viewBox);
|
|
23260
25011
|
svg2.setAttribute("aria-hidden", "true");
|
|
23261
|
-
const path = doc.createElementNS(
|
|
25012
|
+
const path = doc.createElementNS(SVG6, "path");
|
|
23262
25013
|
path.setAttribute("d", d);
|
|
23263
25014
|
svg2.append(path);
|
|
23264
25015
|
return svg2;
|
|
@@ -23361,15 +25112,15 @@ var ViewerAutoConnect = class {
|
|
|
23361
25112
|
}
|
|
23362
25113
|
const bounds2 = this.host.viewport.getBoundingClientRect();
|
|
23363
25114
|
const matrix2 = svg2.getScreenCTM?.();
|
|
23364
|
-
const
|
|
25115
|
+
const scale3 = matrix2?.a || 96 * (state.zoom || 1);
|
|
23365
25116
|
const paper = svg2.getBoundingClientRect();
|
|
23366
25117
|
const place = (point) => {
|
|
23367
|
-
const screen = matrix2 ? new DOMPoint(point.x, point.y).matrixTransform(matrix2) : { x: paper.left + point.x *
|
|
25118
|
+
const screen = matrix2 ? new DOMPoint(point.x, point.y).matrixTransform(matrix2) : { x: paper.left + point.x * scale3, y: paper.top + point.y * scale3 };
|
|
23368
25119
|
return { x: screen.x - bounds2.left, y: screen.y - bounds2.top };
|
|
23369
25120
|
};
|
|
23370
25121
|
const selected = state.selectedShapes.length === 1 && state.selectedShape?.id === shape.id && visioSelectionIsOnPage(state.selectedShape, page3.id);
|
|
23371
|
-
const arrows = visioAutoConnectArrows(page3, shape, OFFSET /
|
|
23372
|
-
const lift = arrow.direction === "up" && selected ? (SELECTED_TOP_OFFSET - OFFSET) /
|
|
25122
|
+
const arrows = visioAutoConnectArrows(page3, shape, OFFSET / scale3).map((arrow) => {
|
|
25123
|
+
const lift = arrow.direction === "up" && selected ? (SELECTED_TOP_OFFSET - OFFSET) / scale3 : 0;
|
|
23373
25124
|
return { direction: arrow.direction, ...place({ x: arrow.x, y: arrow.y - lift }) };
|
|
23374
25125
|
});
|
|
23375
25126
|
const masters = this.#arrow ? this.#quickShapes(state) : [];
|
|
@@ -23384,19 +25135,19 @@ var ViewerAutoConnect = class {
|
|
|
23384
25135
|
if (this.#layer?.isConnected && signature === this.#signature) return;
|
|
23385
25136
|
this.#clear();
|
|
23386
25137
|
const doc = this.host.viewport.ownerDocument;
|
|
23387
|
-
const
|
|
23388
|
-
|
|
23389
|
-
|
|
23390
|
-
|
|
23391
|
-
|
|
25138
|
+
const layer2 = doc.createElement("div");
|
|
25139
|
+
layer2.className = "auto-connect";
|
|
25140
|
+
layer2.dataset.autoConnectFor = shape.id;
|
|
25141
|
+
layer2.style.left = `${this.host.viewport.scrollLeft}px`;
|
|
25142
|
+
layer2.style.top = `${this.host.viewport.scrollTop}px`;
|
|
23392
25143
|
for (const arrow of arrows) {
|
|
23393
25144
|
const neighbour = visioAutoConnectNeighbor(page3, shape, arrow.direction);
|
|
23394
|
-
|
|
25145
|
+
layer2.append(autoConnectArrow(doc, arrow, !!neighbour));
|
|
23395
25146
|
if (arrow.direction === this.#arrow && masters.length)
|
|
23396
|
-
|
|
25147
|
+
layer2.append(autoConnectBar(doc, arrow, masters));
|
|
23397
25148
|
}
|
|
23398
|
-
this.host.viewport.append(
|
|
23399
|
-
this.#layer =
|
|
25149
|
+
this.host.viewport.append(layer2);
|
|
25150
|
+
this.#layer = layer2;
|
|
23400
25151
|
this.#signature = signature;
|
|
23401
25152
|
}
|
|
23402
25153
|
/** Connects in `direction`: to `masterId` as a new shape, else to the neighbour or first Quick Shape. */
|
|
@@ -23464,8 +25215,8 @@ var ViewerAutoConnect = class {
|
|
|
23464
25215
|
const box2 = shape && visioShapePageBox(page3, shape);
|
|
23465
25216
|
const point = svg2 && pagePoint(svg2, page3, event, { snap: false, bounded: false });
|
|
23466
25217
|
if (!box2 || !point || !svg2) return false;
|
|
23467
|
-
const
|
|
23468
|
-
const margin = (SELECTED_TOP_OFFSET + KEEP) /
|
|
25218
|
+
const scale3 = svg2.getScreenCTM?.()?.a || 96 * (state.zoom || 1);
|
|
25219
|
+
const margin = (SELECTED_TOP_OFFSET + KEEP) / scale3;
|
|
23469
25220
|
return point.x >= box2.x - margin && point.x <= box2.x + box2.width + margin && point.y >= box2.y - margin && point.y <= box2.y + box2.height + margin;
|
|
23470
25221
|
}
|
|
23471
25222
|
wire() {
|
|
@@ -23655,10 +25406,10 @@ var ViewerExplorer = class {
|
|
|
23655
25406
|
const children = [this.#branch("Pages", pages)];
|
|
23656
25407
|
if (page3) {
|
|
23657
25408
|
const layers = (page3.layers ?? []).map(
|
|
23658
|
-
(
|
|
25409
|
+
(layer2) => this.#button(
|
|
23659
25410
|
"layer",
|
|
23660
|
-
|
|
23661
|
-
`${
|
|
25411
|
+
layer2.id,
|
|
25412
|
+
`${layer2.name.slice(0, 120) || `Layer ${layer2.id}`}${layer2.visible ? "" : " (hidden)"}`
|
|
23662
25413
|
)
|
|
23663
25414
|
);
|
|
23664
25415
|
const masters = visioPageMasters(page3).map(
|
|
@@ -23686,7 +25437,7 @@ var ViewerExplorer = class {
|
|
|
23686
25437
|
this.#tree.replaceChildren(...children);
|
|
23687
25438
|
}
|
|
23688
25439
|
};
|
|
23689
|
-
var
|
|
25440
|
+
var SVG7 = "http://www.w3.org/2000/svg";
|
|
23690
25441
|
var SNAP_PIXELS = 8;
|
|
23691
25442
|
var ViewerGuides = class {
|
|
23692
25443
|
constructor(root, viewport, rulers, controller, announce) {
|
|
@@ -23772,12 +25523,12 @@ var ViewerGuides = class {
|
|
|
23772
25523
|
const svg2 = this.#svg();
|
|
23773
25524
|
this.clearHints();
|
|
23774
25525
|
if (!svg2 || !(lines.length || matches.length)) return;
|
|
23775
|
-
const hints = svg2.ownerDocument.createElementNS(
|
|
25526
|
+
const hints = svg2.ownerDocument.createElementNS(SVG7, "g");
|
|
23776
25527
|
hints.dataset.snapHints = "";
|
|
23777
25528
|
hints.setAttribute("aria-hidden", "true");
|
|
23778
25529
|
hints.style.pointerEvents = "none";
|
|
23779
25530
|
for (const line of lines) {
|
|
23780
|
-
const element = svg2.ownerDocument.createElementNS(
|
|
25531
|
+
const element = svg2.ownerDocument.createElementNS(SVG7, "line");
|
|
23781
25532
|
const clamp = (value, size) => Math.max(-size, Math.min(2 * size, value));
|
|
23782
25533
|
const { height, width } = page3;
|
|
23783
25534
|
const vertical2 = line.axis === "x";
|
|
@@ -23790,7 +25541,7 @@ var ViewerGuides = class {
|
|
|
23790
25541
|
hints.append(element);
|
|
23791
25542
|
}
|
|
23792
25543
|
for (const match of matches) {
|
|
23793
|
-
const element = svg2.ownerDocument.createElementNS(
|
|
25544
|
+
const element = svg2.ownerDocument.createElementNS(SVG7, "rect");
|
|
23794
25545
|
element.dataset.sizeMatch = match.axis;
|
|
23795
25546
|
const { x, y, width, height } = match.box;
|
|
23796
25547
|
for (const [name, value] of Object.entries({
|
|
@@ -23820,11 +25571,11 @@ var ViewerGuides = class {
|
|
|
23820
25571
|
/** A guide: a wide transparent hit line under the visible dashed line. */
|
|
23821
25572
|
#line(vertical2, position, page3, id) {
|
|
23822
25573
|
const doc = this.root.ownerDocument;
|
|
23823
|
-
const group2 = doc.createElementNS(
|
|
25574
|
+
const group2 = doc.createElementNS(SVG7, "g");
|
|
23824
25575
|
group2.classList.add("guide");
|
|
23825
25576
|
group2.dataset.orientation = vertical2 ? "vertical" : "horizontal";
|
|
23826
25577
|
for (const kind of ["guide-hit", "guide-line"]) {
|
|
23827
|
-
const line = doc.createElementNS(
|
|
25578
|
+
const line = doc.createElementNS(SVG7, "line");
|
|
23828
25579
|
line.classList.add(kind);
|
|
23829
25580
|
line.setAttribute("vector-effect", "non-scaling-stroke");
|
|
23830
25581
|
group2.append(line);
|
|
@@ -24011,7 +25762,7 @@ var ViewerGuides = class {
|
|
|
24011
25762
|
drawn2?.remove();
|
|
24012
25763
|
this.#drawn = void 0;
|
|
24013
25764
|
if (!svg2 || !page3 || !this.#shown) return;
|
|
24014
|
-
const group2 = svg2.ownerDocument.createElementNS(
|
|
25765
|
+
const group2 = svg2.ownerDocument.createElementNS(SVG7, "g");
|
|
24015
25766
|
group2.dataset.guides = "";
|
|
24016
25767
|
for (const guide of guides)
|
|
24017
25768
|
group2.append(this.#line(guide.orientation === "vertical", guide.position, page3, guide.id));
|
|
@@ -24084,17 +25835,17 @@ var ViewerLayerAssign = class {
|
|
|
24084
25835
|
this.#target = { pageId: page3.id, shapeIds, generation: this.controller.documentGeneration };
|
|
24085
25836
|
const doc = this.root.ownerDocument;
|
|
24086
25837
|
this.#list.replaceChildren(
|
|
24087
|
-
...result.rows.length ? result.rows.map(({ layer, state: membership }) => {
|
|
25838
|
+
...result.rows.length ? result.rows.map(({ layer: layer2, state: membership }) => {
|
|
24088
25839
|
const item = choice(
|
|
24089
25840
|
doc,
|
|
24090
25841
|
"checkbox",
|
|
24091
25842
|
"layer",
|
|
24092
|
-
|
|
24093
|
-
`${
|
|
25843
|
+
layer2.id,
|
|
25844
|
+
`${layer2.name.slice(0, 256) || "Layer"}${layer2.locked ? " (locked)" : ""}${layer2.visible ? "" : " (hidden)"}`
|
|
24094
25845
|
);
|
|
24095
25846
|
item.input.checked = membership === "all";
|
|
24096
25847
|
item.input.indeterminate = membership === "some";
|
|
24097
|
-
if (
|
|
25848
|
+
if (layer2.locked) {
|
|
24098
25849
|
item.input.disabled = true;
|
|
24099
25850
|
item.input.dataset.unavailable = "";
|
|
24100
25851
|
}
|
|
@@ -24160,7 +25911,7 @@ var FLAGS = [
|
|
|
24160
25911
|
["print", "Print"],
|
|
24161
25912
|
["lock", "Lock"]
|
|
24162
25913
|
];
|
|
24163
|
-
var saved = (
|
|
25914
|
+
var saved = (layer2, flag) => flag === "visible" ? layer2.visible : flag === "print" ? layer2.printable : layer2.locked;
|
|
24164
25915
|
var ViewerLayerProperties = class {
|
|
24165
25916
|
constructor(root, controller, announce) {
|
|
24166
25917
|
this.root = root;
|
|
@@ -24227,15 +25978,15 @@ var ViewerLayerProperties = class {
|
|
|
24227
25978
|
caption.append(label);
|
|
24228
25979
|
body.append(caption);
|
|
24229
25980
|
}
|
|
24230
|
-
for (const
|
|
25981
|
+
for (const layer2 of layers) {
|
|
24231
25982
|
if (shown >= VIEWER_LAYER_LIMITS.controls) break;
|
|
24232
25983
|
++shown;
|
|
24233
|
-
const name =
|
|
25984
|
+
const name = layer2.name.slice(0, 256) || "Layer";
|
|
24234
25985
|
const row = doc.createElement("tr");
|
|
24235
25986
|
row.dataset.pageId = source.id;
|
|
24236
|
-
row.dataset.layerId =
|
|
25987
|
+
row.dataset.layerId = layer2.id;
|
|
24237
25988
|
const count = (page3?.shapes ?? []).filter(
|
|
24238
|
-
(shape) => shape.layerIds?.includes(
|
|
25989
|
+
(shape) => shape.layerIds?.includes(layer2.id)
|
|
24239
25990
|
).length;
|
|
24240
25991
|
row.append(Object.assign(cell("th", name), { scope: "row" }), cell("td", String(count)));
|
|
24241
25992
|
for (const [flag, title2] of FLAGS) {
|
|
@@ -24243,19 +25994,19 @@ var ViewerLayerProperties = class {
|
|
|
24243
25994
|
box2.type = "checkbox";
|
|
24244
25995
|
box2.dataset.flag = flag;
|
|
24245
25996
|
box2.setAttribute("aria-label", `${name}: ${title2}`);
|
|
24246
|
-
const override = flag === "visible" ? overrides.get(source.id)?.get(
|
|
24247
|
-
box2.checked = override ?? saved(
|
|
25997
|
+
const override = flag === "visible" ? overrides.get(source.id)?.get(layer2.id) : void 0;
|
|
25998
|
+
box2.checked = override ?? saved(layer2, flag);
|
|
24248
25999
|
box2.disabled = !editable3 && flag !== "visible";
|
|
24249
26000
|
const holder = cell("td");
|
|
24250
26001
|
holder.append(box2);
|
|
24251
26002
|
row.append(holder);
|
|
24252
26003
|
}
|
|
24253
26004
|
const colour = cell("td");
|
|
24254
|
-
if (
|
|
26005
|
+
if (layer2.color) {
|
|
24255
26006
|
const swatch = doc.createElement("span");
|
|
24256
26007
|
swatch.className = "layer-colour";
|
|
24257
|
-
swatch.style.background =
|
|
24258
|
-
swatch.title =
|
|
26008
|
+
swatch.style.background = layer2.color;
|
|
26009
|
+
swatch.title = layer2.color;
|
|
24259
26010
|
colour.append(swatch);
|
|
24260
26011
|
}
|
|
24261
26012
|
row.append(colour);
|
|
@@ -24281,18 +26032,18 @@ var ViewerLayerProperties = class {
|
|
|
24281
26032
|
const shown = [];
|
|
24282
26033
|
for (const row of this.#table.querySelectorAll("tr[data-layer-id]")) {
|
|
24283
26034
|
const pageId = row.dataset.pageId, layerId = row.dataset.layerId;
|
|
24284
|
-
const
|
|
24285
|
-
if (!
|
|
26035
|
+
const layer2 = sources.get(pageId)?.layers?.find((candidate) => candidate.id === layerId);
|
|
26036
|
+
if (!layer2) continue;
|
|
24286
26037
|
const value = (flag) => row.querySelector(`input[data-flag="${flag}"]`).checked;
|
|
24287
26038
|
if (!editable3) {
|
|
24288
26039
|
shown.push({
|
|
24289
26040
|
pageId,
|
|
24290
26041
|
layerId,
|
|
24291
|
-
visible: value("visible") ===
|
|
26042
|
+
visible: value("visible") === layer2.visible ? null : value("visible")
|
|
24292
26043
|
});
|
|
24293
26044
|
continue;
|
|
24294
26045
|
}
|
|
24295
|
-
const changed = FLAGS.filter(([flag]) => value(flag) !== saved(
|
|
26046
|
+
const changed = FLAGS.filter(([flag]) => value(flag) !== saved(layer2, flag));
|
|
24296
26047
|
if (changed.length)
|
|
24297
26048
|
edits.push({
|
|
24298
26049
|
type: "set-layer-properties",
|
|
@@ -24673,13 +26424,13 @@ var ViewerSelectType = class {
|
|
|
24673
26424
|
VISIO_SELECT_TYPES.map((type) => [type, VISIO_SELECT_TYPE_LABELS[type]]),
|
|
24674
26425
|
(type) => type === "shape"
|
|
24675
26426
|
);
|
|
24676
|
-
const layers = [...new Map((page3.layers ?? []).map((
|
|
26427
|
+
const layers = [...new Map((page3.layers ?? []).map((layer2) => [layer2.id, layer2])).values()];
|
|
24677
26428
|
fill(
|
|
24678
26429
|
"layer",
|
|
24679
26430
|
[
|
|
24680
|
-
...layers.map((
|
|
24681
|
-
|
|
24682
|
-
|
|
26431
|
+
...layers.map((layer2) => [
|
|
26432
|
+
layer2.id,
|
|
26433
|
+
layer2.name.slice(0, 256) || `Layer ${layer2.id}`
|
|
24683
26434
|
]),
|
|
24684
26435
|
["", "No layer"]
|
|
24685
26436
|
],
|
|
@@ -25145,7 +26896,7 @@ function createTextDialog(root, press) {
|
|
|
25145
26896
|
}
|
|
25146
26897
|
};
|
|
25147
26898
|
}
|
|
25148
|
-
var
|
|
26899
|
+
var SVG8 = "http://www.w3.org/2000/svg";
|
|
25149
26900
|
var ViewerTextBlockTool = class {
|
|
25150
26901
|
constructor(viewport, controller, options2) {
|
|
25151
26902
|
this.viewport = viewport;
|
|
@@ -25192,17 +26943,17 @@ var ViewerTextBlockTool = class {
|
|
|
25192
26943
|
const svg2 = this.viewport.querySelector("svg.paper");
|
|
25193
26944
|
if (!target || !svg2) return;
|
|
25194
26945
|
const screen = svg2.getScreenCTM?.();
|
|
25195
|
-
const
|
|
26946
|
+
const scale3 = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
|
|
25196
26947
|
this.#overlay = this.#draw(
|
|
25197
26948
|
svg2,
|
|
25198
26949
|
target.page,
|
|
25199
26950
|
target.shape,
|
|
25200
26951
|
visioTextBlockFrame(target.shape),
|
|
25201
|
-
|
|
26952
|
+
scale3
|
|
25202
26953
|
);
|
|
25203
26954
|
}
|
|
25204
|
-
#draw(svg2, page3, shape, frame,
|
|
25205
|
-
const create = (name) => svg2.ownerDocument.createElementNS(
|
|
26955
|
+
#draw(svg2, page3, shape, frame, scale3) {
|
|
26956
|
+
const create = (name) => svg2.ownerDocument.createElementNS(SVG8, name);
|
|
25206
26957
|
const group2 = create("g");
|
|
25207
26958
|
group2.dataset.textBlockOverlay = shape.id;
|
|
25208
26959
|
group2.setAttribute(
|
|
@@ -25217,7 +26968,7 @@ var ViewerTextBlockTool = class {
|
|
|
25217
26968
|
rect.setAttribute("vector-effect", "non-scaling-stroke");
|
|
25218
26969
|
rect.setAttribute("aria-label", "Drag to move the text block");
|
|
25219
26970
|
group2.append(rect);
|
|
25220
|
-
const radius = String(5 / (
|
|
26971
|
+
const radius = String(5 / (scale3 || 96));
|
|
25221
26972
|
const handle = (id, x, y, label) => {
|
|
25222
26973
|
const circle = create("circle");
|
|
25223
26974
|
circle.dataset.textBlockHandle = id;
|
|
@@ -25238,7 +26989,7 @@ var ViewerTextBlockTool = class {
|
|
|
25238
26989
|
handle(
|
|
25239
26990
|
"rotate",
|
|
25240
26991
|
frame.width / 2,
|
|
25241
|
-
frame.height + 24 / (
|
|
26992
|
+
frame.height + 24 / (scale3 || 96),
|
|
25242
26993
|
"Drag to rotate the text block"
|
|
25243
26994
|
);
|
|
25244
26995
|
svg2.append(group2);
|
|
@@ -25309,9 +27060,9 @@ var ViewerTextBlockTool = class {
|
|
|
25309
27060
|
if (!point || !this.#overlay) return;
|
|
25310
27061
|
drag.next = visioTextBlockDrag(drag.frame, drag.handle, drag.start, point);
|
|
25311
27062
|
const svg2 = this.#overlay.ownerSVGElement;
|
|
25312
|
-
const
|
|
27063
|
+
const scale3 = Math.hypot(svg2.getScreenCTM?.()?.a ?? 96, svg2.getScreenCTM?.()?.b ?? 0);
|
|
25313
27064
|
this.#overlay.remove();
|
|
25314
|
-
this.#overlay = this.#draw(svg2, drag.page, drag.shape, drag.next,
|
|
27065
|
+
this.#overlay = this.#draw(svg2, drag.page, drag.shape, drag.next, scale3);
|
|
25315
27066
|
this.#overlay.dataset.textBlockPreview = "";
|
|
25316
27067
|
}
|
|
25317
27068
|
async #finish(event) {
|
|
@@ -26825,10 +28576,10 @@ var ViewerPresentation = class {
|
|
|
26825
28576
|
var EXPORT_DPI = 150;
|
|
26826
28577
|
var MAX_CANVAS_SIDE = 4096;
|
|
26827
28578
|
function rasterSize(widthIn, heightIn, dpi = EXPORT_DPI) {
|
|
26828
|
-
const
|
|
28579
|
+
const scale3 = Math.min(dpi, MAX_CANVAS_SIDE / widthIn, MAX_CANVAS_SIDE / heightIn);
|
|
26829
28580
|
return {
|
|
26830
|
-
width: Math.max(1, Math.round(widthIn *
|
|
26831
|
-
height: Math.max(1, Math.round(heightIn *
|
|
28581
|
+
width: Math.max(1, Math.round(widthIn * scale3)),
|
|
28582
|
+
height: Math.max(1, Math.round(heightIn * scale3))
|
|
26832
28583
|
};
|
|
26833
28584
|
}
|
|
26834
28585
|
async function rasterizePage(doc, model, pageIndex, dpi = EXPORT_DPI) {
|
|
@@ -26934,9 +28685,9 @@ var PdfEmbeddedFont = class _PdfEmbeddedFont {
|
|
|
26934
28685
|
/** Everything the PDF needs to write the font objects. */
|
|
26935
28686
|
build() {
|
|
26936
28687
|
const subset = subsetTrueType(this.font, this.#used);
|
|
26937
|
-
const
|
|
26938
|
-
const widths = subset.glyphs.map((glyph) => Math.round(this.font.advance(glyph) *
|
|
26939
|
-
const units = (value) => Math.round(value *
|
|
28688
|
+
const scale3 = 1e3 / this.font.unitsPerEm;
|
|
28689
|
+
const widths = subset.glyphs.map((glyph) => Math.round(this.font.advance(glyph) * scale3));
|
|
28690
|
+
const units = (value) => Math.round(value * scale3);
|
|
26940
28691
|
const [x0, y0, x1, y1] = this.font.bbox;
|
|
26941
28692
|
const ascent = units(this.font.ascent);
|
|
26942
28693
|
return {
|
|
@@ -27119,14 +28870,14 @@ var HELVETICA = [
|
|
|
27119
28870
|
];
|
|
27120
28871
|
function pdfTextWidth(text2, baseFont) {
|
|
27121
28872
|
if (baseFont.startsWith("Courier")) return text2.length * 0.6;
|
|
27122
|
-
const
|
|
28873
|
+
const scale3 = baseFont.startsWith("Times") ? 0.9 : 1;
|
|
27123
28874
|
const bold = /Bold/.test(baseFont) ? 1.05 : 1;
|
|
27124
28875
|
let total = 0;
|
|
27125
28876
|
for (let index = 0; index < text2.length; index++) {
|
|
27126
28877
|
const code = text2.charCodeAt(index);
|
|
27127
28878
|
total += code >= 32 && code <= 126 ? HELVETICA[code - 32] : 556;
|
|
27128
28879
|
}
|
|
27129
|
-
return total / 1e3 *
|
|
28880
|
+
return total / 1e3 * scale3 * bold;
|
|
27130
28881
|
}
|
|
27131
28882
|
var CP1252_HIGH = [
|
|
27132
28883
|
8364,
|
|
@@ -27349,13 +29100,15 @@ ${body}
|
|
|
27349
29100
|
endobj
|
|
27350
29101
|
`);
|
|
27351
29102
|
};
|
|
27352
|
-
const stream = (id, dictionary, data) => {
|
|
29103
|
+
const stream = (id, dictionary, data, filtered = false) => {
|
|
29104
|
+
const packed = filtered ? data : zlibCompress(data);
|
|
29105
|
+
const entries = [dictionary, filtered ? "" : "/Filter /FlateDecode"].filter(Boolean);
|
|
27353
29106
|
offsets[id] = position;
|
|
27354
29107
|
emit(`${id} 0 obj
|
|
27355
|
-
<< ${
|
|
29108
|
+
<< ${entries.join(" ")} /Length ${packed.length} >>
|
|
27356
29109
|
stream
|
|
27357
29110
|
`);
|
|
27358
|
-
emit(
|
|
29111
|
+
emit(packed);
|
|
27359
29112
|
emit("\nendstream\nendobj\n");
|
|
27360
29113
|
};
|
|
27361
29114
|
emit("%PDF-1.4\n%\xE2\xE3\xCF\xD3\n");
|
|
@@ -27374,7 +29127,8 @@ stream
|
|
|
27374
29127
|
stream(
|
|
27375
29128
|
maskId,
|
|
27376
29129
|
`/Type /XObject /Subtype /Image /Width ${image.width} /Height ${image.height} /ColorSpace /DeviceGray /BitsPerComponent 8${image.alpha.filter ? ` /Filter /${image.alpha.filter}` : ""}`,
|
|
27377
|
-
image.alpha.data
|
|
29130
|
+
image.alpha.data,
|
|
29131
|
+
!!image.alpha.filter
|
|
27378
29132
|
);
|
|
27379
29133
|
mask = ` /SMask ${maskId} 0 R`;
|
|
27380
29134
|
}
|
|
@@ -27382,7 +29136,8 @@ stream
|
|
|
27382
29136
|
stream(
|
|
27383
29137
|
id,
|
|
27384
29138
|
`/Type /XObject /Subtype /Image /Width ${image.width} /Height ${image.height} /ColorSpace /DeviceRGB /BitsPerComponent 8${image.filter ? ` /Filter /${image.filter}` : ""}${mask}`,
|
|
27385
|
-
image.data
|
|
29139
|
+
image.data,
|
|
29140
|
+
!!image.filter
|
|
27386
29141
|
);
|
|
27387
29142
|
xobjects.push(`/${name} ${id} 0 R`);
|
|
27388
29143
|
}
|
|
@@ -27455,177 +29210,6 @@ ${xref}
|
|
|
27455
29210
|
}
|
|
27456
29211
|
return result;
|
|
27457
29212
|
}
|
|
27458
|
-
|
|
27459
|
-
// src/visio/pdf-path.ts
|
|
27460
|
-
var MAX_PATH_CHARS = 2e6;
|
|
27461
|
-
var MAX_PATH_SEGMENTS = 2e5;
|
|
27462
|
-
var COUNTS = {
|
|
27463
|
-
m: 2,
|
|
27464
|
-
l: 2,
|
|
27465
|
-
h: 1,
|
|
27466
|
-
v: 1,
|
|
27467
|
-
c: 6,
|
|
27468
|
-
s: 4,
|
|
27469
|
-
q: 4,
|
|
27470
|
-
t: 2,
|
|
27471
|
-
a: 7,
|
|
27472
|
-
z: 0
|
|
27473
|
-
};
|
|
27474
|
-
function parsePath(d) {
|
|
27475
|
-
if (d.length > MAX_PATH_CHARS) return void 0;
|
|
27476
|
-
const tokens = d.match(/[a-zA-Z]|[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/g);
|
|
27477
|
-
if (!tokens) return [];
|
|
27478
|
-
const out = [];
|
|
27479
|
-
let x = 0, y = 0, startX = 0, startY = 0, lastC, lastQ;
|
|
27480
|
-
let command2 = "";
|
|
27481
|
-
let index = 0;
|
|
27482
|
-
const read = () => Number(tokens[index++]);
|
|
27483
|
-
while (index < tokens.length) {
|
|
27484
|
-
if (out.length > MAX_PATH_SEGMENTS) return void 0;
|
|
27485
|
-
const token = tokens[index];
|
|
27486
|
-
if (/[a-zA-Z]/.test(token)) {
|
|
27487
|
-
command2 = token;
|
|
27488
|
-
index++;
|
|
27489
|
-
} else if (!command2) return void 0;
|
|
27490
|
-
else if (command2 === "M") command2 = "L";
|
|
27491
|
-
else if (command2 === "m") command2 = "l";
|
|
27492
|
-
const lower = command2.toLowerCase();
|
|
27493
|
-
const need = COUNTS[lower];
|
|
27494
|
-
if (need === void 0) return void 0;
|
|
27495
|
-
if (index + need > tokens.length) return void 0;
|
|
27496
|
-
const relative = command2 === lower;
|
|
27497
|
-
const ox = relative ? x : 0, oy = relative ? y : 0;
|
|
27498
|
-
let nextC, nextQ;
|
|
27499
|
-
switch (lower) {
|
|
27500
|
-
case "m":
|
|
27501
|
-
x = ox + read();
|
|
27502
|
-
y = oy + read();
|
|
27503
|
-
startX = x;
|
|
27504
|
-
startY = y;
|
|
27505
|
-
out.push({ t: "M", x, y });
|
|
27506
|
-
break;
|
|
27507
|
-
case "l":
|
|
27508
|
-
x = ox + read();
|
|
27509
|
-
y = oy + read();
|
|
27510
|
-
out.push({ t: "L", x, y });
|
|
27511
|
-
break;
|
|
27512
|
-
case "h":
|
|
27513
|
-
x = (relative ? x : 0) + read();
|
|
27514
|
-
out.push({ t: "L", x, y });
|
|
27515
|
-
break;
|
|
27516
|
-
case "v":
|
|
27517
|
-
y = (relative ? y : 0) + read();
|
|
27518
|
-
out.push({ t: "L", x, y });
|
|
27519
|
-
break;
|
|
27520
|
-
case "c": {
|
|
27521
|
-
const x1 = ox + read(), y1 = oy + read(), x2 = ox + read(), y2 = oy + read();
|
|
27522
|
-
out.push({ t: "C", x1, y1, x2, y2, x: x = ox + read(), y: y = oy + read() });
|
|
27523
|
-
nextC = [x2, y2];
|
|
27524
|
-
break;
|
|
27525
|
-
}
|
|
27526
|
-
case "s": {
|
|
27527
|
-
const x1 = lastC ? 2 * x - lastC[0] : x, y1 = lastC ? 2 * y - lastC[1] : y;
|
|
27528
|
-
const x2 = ox + read(), y2 = oy + read();
|
|
27529
|
-
out.push({ t: "C", x1, y1, x2, y2, x: x = ox + read(), y: y = oy + read() });
|
|
27530
|
-
nextC = [x2, y2];
|
|
27531
|
-
break;
|
|
27532
|
-
}
|
|
27533
|
-
case "q":
|
|
27534
|
-
case "t": {
|
|
27535
|
-
let qx, qy;
|
|
27536
|
-
if (lower === "q") {
|
|
27537
|
-
qx = ox + read();
|
|
27538
|
-
qy = oy + read();
|
|
27539
|
-
} else {
|
|
27540
|
-
qx = lastQ ? 2 * x - lastQ[0] : x;
|
|
27541
|
-
qy = lastQ ? 2 * y - lastQ[1] : y;
|
|
27542
|
-
}
|
|
27543
|
-
const ex = ox + read(), ey = oy + read();
|
|
27544
|
-
out.push({
|
|
27545
|
-
t: "C",
|
|
27546
|
-
x1: x + 2 / 3 * (qx - x),
|
|
27547
|
-
y1: y + 2 / 3 * (qy - y),
|
|
27548
|
-
x2: ex + 2 / 3 * (qx - ex),
|
|
27549
|
-
y2: ey + 2 / 3 * (qy - ey),
|
|
27550
|
-
x: ex,
|
|
27551
|
-
y: ey
|
|
27552
|
-
});
|
|
27553
|
-
x = ex;
|
|
27554
|
-
y = ey;
|
|
27555
|
-
nextQ = [qx, qy];
|
|
27556
|
-
break;
|
|
27557
|
-
}
|
|
27558
|
-
case "a": {
|
|
27559
|
-
const rx = read(), ry = read(), rotation = read(), large = read(), sweep = read();
|
|
27560
|
-
const ex = ox + read(), ey = oy + read();
|
|
27561
|
-
arc(out, x, y, rx, ry, rotation, large !== 0, sweep !== 0, ex, ey);
|
|
27562
|
-
x = ex;
|
|
27563
|
-
y = ey;
|
|
27564
|
-
break;
|
|
27565
|
-
}
|
|
27566
|
-
case "z":
|
|
27567
|
-
out.push({ t: "Z" });
|
|
27568
|
-
x = startX;
|
|
27569
|
-
y = startY;
|
|
27570
|
-
break;
|
|
27571
|
-
}
|
|
27572
|
-
lastC = nextC;
|
|
27573
|
-
lastQ = nextQ;
|
|
27574
|
-
if (lower === "z") command2 = "";
|
|
27575
|
-
}
|
|
27576
|
-
return out;
|
|
27577
|
-
}
|
|
27578
|
-
function arc(out, x0, y0, rxIn, ryIn, degrees, large, sweep, x, y) {
|
|
27579
|
-
let rx = Math.abs(rxIn), ry = Math.abs(ryIn);
|
|
27580
|
-
if (x0 === x && y0 === y || rx === 0 || ry === 0) {
|
|
27581
|
-
out.push({ t: "L", x, y });
|
|
27582
|
-
return;
|
|
27583
|
-
}
|
|
27584
|
-
const phi = degrees * Math.PI / 180, cos = Math.cos(phi), sin = Math.sin(phi);
|
|
27585
|
-
const dx = (x0 - x) / 2, dy = (y0 - y) / 2;
|
|
27586
|
-
const x1 = cos * dx + sin * dy, y1 = -sin * dx + cos * dy;
|
|
27587
|
-
const lambda = x1 * x1 / (rx * rx) + y1 * y1 / (ry * ry);
|
|
27588
|
-
if (lambda > 1) {
|
|
27589
|
-
rx *= Math.sqrt(lambda);
|
|
27590
|
-
ry *= Math.sqrt(lambda);
|
|
27591
|
-
}
|
|
27592
|
-
const numerator = rx * rx * ry * ry - rx * rx * y1 * y1 - ry * ry * x1 * x1;
|
|
27593
|
-
const denominator = rx * rx * y1 * y1 + ry * ry * x1 * x1;
|
|
27594
|
-
const factor = (large === sweep ? -1 : 1) * Math.sqrt(Math.max(0, numerator / (denominator || 1)));
|
|
27595
|
-
const cx1 = factor * rx * y1 / ry, cy1 = -factor * ry * x1 / rx;
|
|
27596
|
-
const cx = cos * cx1 - sin * cy1 + (x0 + x) / 2, cy = sin * cx1 + cos * cy1 + (y0 + y) / 2;
|
|
27597
|
-
const angle = (ux, uy, vx, vy) => Math.atan2(ux * vy - uy * vx, ux * vx + uy * vy);
|
|
27598
|
-
const start = angle(1, 0, (x1 - cx1) / rx, (y1 - cy1) / ry);
|
|
27599
|
-
let delta = angle((x1 - cx1) / rx, (y1 - cy1) / ry, (-x1 - cx1) / rx, (-y1 - cy1) / ry);
|
|
27600
|
-
if (!sweep && delta > 0) delta -= 2 * Math.PI;
|
|
27601
|
-
else if (sweep && delta < 0) delta += 2 * Math.PI;
|
|
27602
|
-
const pieces = Math.max(1, Math.ceil(Math.abs(delta) / (Math.PI / 2) - 1e-9));
|
|
27603
|
-
const step = delta / pieces;
|
|
27604
|
-
const k = 4 / 3 * Math.tan(step / 4);
|
|
27605
|
-
const point = (t) => {
|
|
27606
|
-
const c = Math.cos(t), s = Math.sin(t);
|
|
27607
|
-
return [
|
|
27608
|
-
cx + rx * c * cos - ry * s * sin,
|
|
27609
|
-
cy + rx * c * sin + ry * s * cos,
|
|
27610
|
-
-rx * s * cos - ry * c * sin,
|
|
27611
|
-
-rx * s * sin + ry * c * cos
|
|
27612
|
-
];
|
|
27613
|
-
};
|
|
27614
|
-
for (let piece = 0; piece < pieces; piece++) {
|
|
27615
|
-
const a = start + piece * step, b = a + step;
|
|
27616
|
-
const [px, py, dpx, dpy] = point(a);
|
|
27617
|
-
const [qx, qy, dqx, dqy] = point(b);
|
|
27618
|
-
out.push({
|
|
27619
|
-
t: "C",
|
|
27620
|
-
x1: px + k * dpx,
|
|
27621
|
-
y1: py + k * dpy,
|
|
27622
|
-
x2: qx - k * dqx,
|
|
27623
|
-
y2: qy - k * dqy,
|
|
27624
|
-
x: piece === pieces - 1 ? x : qx,
|
|
27625
|
-
y: piece === pieces - 1 ? y : qy
|
|
27626
|
-
});
|
|
27627
|
-
}
|
|
27628
|
-
}
|
|
27629
29213
|
var n2 = (value) => Number.isFinite(value) ? String(Math.round(value * 1e6) / 1e6) : "0";
|
|
27630
29214
|
function pathOperators(segments) {
|
|
27631
29215
|
return segments.map((segment) => {
|
|
@@ -28074,6 +29658,16 @@ var Converter = class {
|
|
|
28074
29658
|
this.degraded.add("Reflections and masked shapes are not drawn.");
|
|
28075
29659
|
return;
|
|
28076
29660
|
}
|
|
29661
|
+
if (element.hasAttribute("data-bevel")) {
|
|
29662
|
+
this.degraded.add("Bevel lighting is not drawn.");
|
|
29663
|
+
return;
|
|
29664
|
+
}
|
|
29665
|
+
if (element.hasAttribute("data-solid3d"))
|
|
29666
|
+
this.degraded.add(
|
|
29667
|
+
"Perspective and extrusion are drawn from the projected outline with flat shading; text and pictures use a parallel projection."
|
|
29668
|
+
);
|
|
29669
|
+
else if (element.hasAttribute("data-perspective"))
|
|
29670
|
+
this.degraded.add("3-D rotation is drawn as a parallel projection without perspective.");
|
|
28077
29671
|
if (element.hasAttribute("data-embedded-chart")) throw new PdfFallback("embedded chart");
|
|
28078
29672
|
if (element.hasAttribute("filter") && !shadow && !glow2)
|
|
28079
29673
|
this.degraded.add("Blur and soft-edge filters are not applied.");
|
|
@@ -28203,13 +29797,13 @@ var Converter = class {
|
|
|
28203
29797
|
if (!marker || marker.localName !== "marker" || !at) continue;
|
|
28204
29798
|
const [minX, minY, vw, vh] = (marker.getAttribute("viewBox") ?? "0 0 3 3").split(/[\s,]+/).map(Number);
|
|
28205
29799
|
const mw = number2(marker.getAttribute("markerWidth"), 3), mh = number2(marker.getAttribute("markerHeight"), 3);
|
|
28206
|
-
const
|
|
28207
|
-
if (!Number.isFinite(
|
|
29800
|
+
const scale3 = Math.min(mw / vw, mh / vh);
|
|
29801
|
+
if (!Number.isFinite(scale3) || scale3 <= 0) continue;
|
|
28208
29802
|
const angle = side === "start" ? at.angle + Math.PI : at.angle;
|
|
28209
29803
|
const cos = Math.cos(angle), sin = Math.sin(angle);
|
|
28210
29804
|
this.page.save();
|
|
28211
29805
|
this.page.concat([cos, sin, -sin, cos, at.x, at.y]);
|
|
28212
|
-
this.page.concat([
|
|
29806
|
+
this.page.concat([scale3, 0, 0, scale3, 0, 0]);
|
|
28213
29807
|
this.page.concat([
|
|
28214
29808
|
1,
|
|
28215
29809
|
0,
|
|
@@ -28269,12 +29863,12 @@ async function decodeImage(doc, href) {
|
|
|
28269
29863
|
image.onerror = () => reject(new Error("picture"));
|
|
28270
29864
|
image.src = href;
|
|
28271
29865
|
});
|
|
28272
|
-
const
|
|
29866
|
+
const scale3 = Math.min(
|
|
28273
29867
|
1,
|
|
28274
29868
|
MAX_IMAGE_SIDE / Math.max(image.naturalWidth, image.naturalHeight, 1)
|
|
28275
29869
|
);
|
|
28276
|
-
const width = Math.max(1, Math.round(image.naturalWidth *
|
|
28277
|
-
const height = Math.max(1, Math.round(image.naturalHeight *
|
|
29870
|
+
const width = Math.max(1, Math.round(image.naturalWidth * scale3));
|
|
29871
|
+
const height = Math.max(1, Math.round(image.naturalHeight * scale3));
|
|
28278
29872
|
const canvas2 = doc.createElement("canvas");
|
|
28279
29873
|
canvas2.width = width;
|
|
28280
29874
|
canvas2.height = height;
|
|
@@ -28505,8 +30099,8 @@ function createPrintSnapshot(model, options2) {
|
|
|
28505
30099
|
within(width * height, limits.maxPageAreaCssPixels, "drawing area in CSS pixels");
|
|
28506
30100
|
add("totalAreaCssPixels", width * height, limits.maxTotalAreaCssPixels);
|
|
28507
30101
|
const resources = /* @__PURE__ */ new Set();
|
|
28508
|
-
for (const
|
|
28509
|
-
const stack2 = [...
|
|
30102
|
+
for (const layer2 of getVisioPageLayers(model, page3.id)) {
|
|
30103
|
+
const stack2 = [...layer2.shapes];
|
|
28510
30104
|
while (stack2.length) {
|
|
28511
30105
|
const shape = stack2.pop();
|
|
28512
30106
|
add("shapeInstances", 1, limits.maxShapeInstances);
|
|
@@ -28581,7 +30175,7 @@ function validationCost(model) {
|
|
|
28581
30175
|
for (const note2 of model.diagnostics) strings(note2.code, note2.message);
|
|
28582
30176
|
for (const page3 of model.pages) {
|
|
28583
30177
|
strings(page3.id, page3.name, page3.backgroundPageId);
|
|
28584
|
-
for (const
|
|
30178
|
+
for (const layer2 of page3.layers ?? []) strings(layer2.id, layer2.name);
|
|
28585
30179
|
const stack2 = [...page3.shapes];
|
|
28586
30180
|
while (stack2.length) {
|
|
28587
30181
|
const shape = stack2.pop();
|
|
@@ -28734,6 +30328,7 @@ var VisioViewerElement = class extends BaseElement {
|
|
|
28734
30328
|
#commands;
|
|
28735
30329
|
#presentation;
|
|
28736
30330
|
#lineEndpoints;
|
|
30331
|
+
#controlHandles;
|
|
28737
30332
|
#rotationHandle;
|
|
28738
30333
|
#resizeHandles;
|
|
28739
30334
|
#handleState;
|
|
@@ -28843,6 +30438,7 @@ var VisioViewerElement = class extends BaseElement {
|
|
|
28843
30438
|
this.#edit = editing.edit;
|
|
28844
30439
|
this.#pointer = editing.pointer;
|
|
28845
30440
|
this.#lineEndpoints = editing.lineEndpoints;
|
|
30441
|
+
this.#controlHandles = editing.controls;
|
|
28846
30442
|
this.#rotationHandle = editing.rotation;
|
|
28847
30443
|
this.#resizeHandles = editing.resize;
|
|
28848
30444
|
this.#edit.onSelection = (at) => at ? this.#mini.showAt(at.x, at.y) : this.#mini.hide();
|
|
@@ -28879,6 +30475,7 @@ var VisioViewerElement = class extends BaseElement {
|
|
|
28879
30475
|
toolChanged: () => {
|
|
28880
30476
|
this.#pointer.render(this.controller.state);
|
|
28881
30477
|
this.#lineEndpoints.render(this.controller.state);
|
|
30478
|
+
this.#controlHandles.render(this.controller.state);
|
|
28882
30479
|
this.#rotationHandle.render(this.controller.state);
|
|
28883
30480
|
this.#resizeHandles.render(this.controller.state);
|
|
28884
30481
|
},
|
|
@@ -28937,6 +30534,7 @@ var VisioViewerElement = class extends BaseElement {
|
|
|
28937
30534
|
root: this.#root,
|
|
28938
30535
|
viewport: this.#viewport,
|
|
28939
30536
|
fileName: () => this.#fileName,
|
|
30537
|
+
locale: () => this.#locale(),
|
|
28940
30538
|
load: (source) => this.load(source),
|
|
28941
30539
|
createBlankDrawing: () => this.createBlankDrawing(),
|
|
28942
30540
|
createFromTemplate: (template) => this.createFromTemplate(template),
|
|
@@ -29306,6 +30904,7 @@ var VisioViewerElement = class extends BaseElement {
|
|
|
29306
30904
|
if (this.#disposed || !this.#overflow) return;
|
|
29307
30905
|
restoreScreenTips(this.#toolbar);
|
|
29308
30906
|
localizeRibbon(this.#toolbar, this.#locale());
|
|
30907
|
+
this.#backstage?.localize();
|
|
29309
30908
|
applyScreenTips(this.#toolbar, this.#behaviour.screenTips);
|
|
29310
30909
|
this.#overflow.refit();
|
|
29311
30910
|
}
|
|
@@ -29338,6 +30937,7 @@ var VisioViewerElement = class extends BaseElement {
|
|
|
29338
30937
|
const disposePresentation = this.#presentation.wire();
|
|
29339
30938
|
const disposePointer = this.#pointer.wire();
|
|
29340
30939
|
const disposeLineEndpoints = this.#lineEndpoints.wire();
|
|
30940
|
+
const disposeControls = this.#controlHandles.wire();
|
|
29341
30941
|
const disposeRotation = this.#rotationHandle.wire();
|
|
29342
30942
|
const disposeResize = this.#resizeHandles.wire();
|
|
29343
30943
|
const disposeBackstage = this.#backstage.wire();
|
|
@@ -29349,7 +30949,13 @@ var VisioViewerElement = class extends BaseElement {
|
|
|
29349
30949
|
this.#viewport,
|
|
29350
30950
|
this.controller,
|
|
29351
30951
|
(x, y) => this.#mini.showAt(x, y),
|
|
29352
|
-
(menu2, target) =>
|
|
30952
|
+
(menu2, target) => {
|
|
30953
|
+
syncVisioHostMenu(menu2, target, this.#custom.resolved, this.controller);
|
|
30954
|
+
syncShapeActions(menu2, target, this.controller, (message) => {
|
|
30955
|
+
this.#announcement = message;
|
|
30956
|
+
this.#status.textContent = message;
|
|
30957
|
+
});
|
|
30958
|
+
}
|
|
29353
30959
|
);
|
|
29354
30960
|
const disposeTellMe = wireTellMe(this.#root);
|
|
29355
30961
|
const disposeGalleries = wireInlineGalleries(this, this.#root);
|
|
@@ -29406,6 +31012,7 @@ var VisioViewerElement = class extends BaseElement {
|
|
|
29406
31012
|
disposePresentation();
|
|
29407
31013
|
disposePointer();
|
|
29408
31014
|
disposeLineEndpoints();
|
|
31015
|
+
disposeControls();
|
|
29409
31016
|
disposeRotation();
|
|
29410
31017
|
disposeResize();
|
|
29411
31018
|
disposeBackstage();
|
|
@@ -29448,6 +31055,7 @@ var VisioViewerElement = class extends BaseElement {
|
|
|
29448
31055
|
this.#handleState = state;
|
|
29449
31056
|
if (changed || !previous || previous.canEdit !== state.canEdit || previous.zoom !== state.zoom || previous.selectedShape !== state.selectedShape || previous.selectedShapes !== state.selectedShapes || previous.loading !== state.loading || previous.edit.busy !== state.edit.busy || previous.edit.sourceAvailable !== state.edit.sourceAvailable) {
|
|
29450
31057
|
this.#lineEndpoints.render(state);
|
|
31058
|
+
this.#controlHandles.render(state);
|
|
29451
31059
|
this.#rotationHandle.render(state);
|
|
29452
31060
|
this.#resizeHandles.render(state);
|
|
29453
31061
|
this.#viewport.toggleAttribute(
|