ooxml-ui 1.12.2 → 1.13.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/custom-elements.json +19 -4
- package/dist/chrome/status-layout.d.ts +23 -0
- package/dist/{chunk-GI3WX6LZ.js → chunk-3XST4F6J.js} +1 -1
- package/dist/{chunk-S6ZXU442.js → chunk-7E3HU7RL.js} +1 -1
- package/dist/{chunk-PXIYHFZ5.js → chunk-ANPFMQ6E.js} +1 -1
- package/dist/{chunk-FUQYUUIQ.js → chunk-BFPHRWEB.js} +356 -99
- package/dist/{chunk-OGNNNTKI.js → chunk-CWBSXK7P.js} +1 -1
- package/dist/{chunk-3H5NR32A.js → chunk-D7JPVAYS.js} +319 -202
- package/dist/{chunk-NLJVBHLG.js → chunk-EL2A3BDM.js} +5 -5
- package/dist/{chunk-L7JV5FVE.js → chunk-KNC2UEUR.js} +1 -1
- package/dist/{chunk-SPNWHKSR.js → chunk-LD3K2RDN.js} +7 -5
- package/dist/chunk-UBBC5FH7.js +31 -0
- package/dist/{chunk-HZSYGNNB.js → chunk-VRVFLYGI.js} +1 -0
- package/dist/controls.d.ts +2 -1
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +4 -4
- package/dist/dialog/options-categories.d.ts +39 -0
- package/dist/dialog/options-categories.d.ts.map +1 -0
- package/dist/dialog/options-controls.d.ts +49 -0
- package/dist/dialog/options-controls.d.ts.map +1 -0
- package/dist/dialog/options-dialog.d.ts +35 -41
- package/dist/dialog/options-dialog.d.ts.map +1 -1
- package/dist/docx/auto-fit.d.ts +10 -0
- package/dist/docx/backstage-customize.d.ts +7 -0
- package/dist/docx/backstage-options.d.ts +13 -3
- package/dist/docx/backstage-pages.d.ts +0 -6
- package/dist/docx/backstage.d.ts +3 -0
- package/dist/docx/canvas-click.d.ts +7 -0
- package/dist/docx/locales/en-app.d.ts +1 -0
- package/dist/docx/locales/en.d.ts +5 -0
- package/dist/docx/locales/options.d.ts +11 -0
- package/dist/docx/localization-strings.d.ts +5 -0
- package/dist/docx/page-controller.d.ts +17 -3
- package/dist/docx/print-editing.d.ts +2 -0
- package/dist/docx/print-layout-view.d.ts +2 -0
- package/dist/docx/status-bar.d.ts +1 -1
- package/dist/docx.js +531 -218
- package/dist/form/color-swatches.d.ts +8 -5
- package/dist/form/color-swatches.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/pptx/{chunk-5AD3V3PA.mjs → chunk-CB2DZVKL.mjs} +127 -1
- package/dist/pptx/{chunk-4EHNTVSN.mjs → chunk-DZUSNYRA.mjs} +1310 -216
- package/dist/pptx/{chunk-Y7CDPPMZ.cjs → chunk-J3GEBMYK.cjs} +127 -1
- package/dist/pptx/{chunk-LMZK4UNY.cjs → chunk-J4HVGXPW.cjs} +1333 -213
- package/dist/pptx/dom/elements/table.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +209 -206
- package/dist/pptx/dom/index.mjs +8 -5
- package/dist/pptx/dom/load-presentation.d.ts +3 -1
- package/dist/pptx/dom/load-presentation.d.ts.map +1 -1
- package/dist/pptx/dom/slide-stage.d.ts +3 -1
- package/dist/pptx/dom/slide-stage.d.ts.map +1 -1
- package/dist/pptx/dom/types.d.ts +6 -1
- package/dist/pptx/dom/types.d.ts.map +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en-galleries-data.d.ts.map +1 -1
- package/dist/pptx/i18n/translations-en-table-layout.d.ts +3 -0
- package/dist/pptx/i18n/translations-en-table-layout.d.ts.map +1 -0
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +2838 -2758
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/action-buttons.d.ts +2 -0
- package/dist/pptx/render/action-buttons.d.ts.map +1 -1
- package/dist/pptx/render/comment-navigation.d.ts +51 -0
- package/dist/pptx/render/comment-navigation.d.ts.map +1 -0
- package/dist/pptx/render/customization/ribbon-control-catalog-tail.d.ts +61 -0
- package/dist/pptx/render/customization/ribbon-control-catalog-tail.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts +61 -0
- package/dist/pptx/render/customization/ribbon-control-catalog.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +2 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/review-comment-commands.d.ts +42 -0
- package/dist/pptx/render/review-comment-commands.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/gallery-placements.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-registry.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-types.d.ts +17 -1
- package/dist/pptx/render/ribbon-galleries/gallery-types.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/gallery-view.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/index.d.ts +2 -0
- package/dist/pptx/render/ribbon-galleries/index.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/shape-styles-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-layout-commands.d.ts +7 -0
- package/dist/pptx/render/ribbon-galleries/table-layout-commands.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/table-layout-ops.d.ts +64 -0
- package/dist/pptx/render/ribbon-galleries/table-layout-ops.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/table-style-tile-svg.d.ts +7 -3
- package/dist/pptx/render/ribbon-galleries/table-style-tile-svg.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-styles-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/table-text-direction-gallery.d.ts +3 -0
- package/dist/pptx/render/ribbon-galleries/table-text-direction-gallery.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-galleries/theme-colors-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-galleries/theme-fonts-gallery.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-families-objects.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-home-spec.d.ts +10 -6
- package/dist/pptx/render/ribbon-home-spec.d.ts.map +1 -1
- package/dist/pptx/render/ribbon-review-commands.d.ts +7 -0
- package/dist/pptx/render/ribbon-review-commands.d.ts.map +1 -1
- package/dist/pptx/render/shape-quick-styles.d.ts +6 -0
- package/dist/pptx/render/shape-quick-styles.d.ts.map +1 -1
- package/dist/pptx/render/table-style-borders.d.ts.map +1 -1
- package/dist/pptx/render/table-style-builtins-data.d.ts +7 -1
- package/dist/pptx/render/table-style-builtins-data.d.ts.map +1 -1
- package/dist/pptx/render/table-style-scheme.d.ts +2 -0
- package/dist/pptx/render/table-style-scheme.d.ts.map +1 -1
- package/dist/pptx/render/table-style-theme-refs.d.ts +16 -0
- package/dist/pptx/render/table-style-theme-refs.d.ts.map +1 -0
- package/dist/pptx/render/table-style.d.ts +7 -1
- package/dist/pptx/render/table-style.d.ts.map +1 -1
- package/dist/pptx/render/theme-color-swatches.d.ts +1 -1
- package/dist/pptx/render/theme-color-swatches.d.ts.map +1 -1
- package/dist/pptx/render/toolbar-actions.d.ts +1 -1
- package/dist/pptx/render/toolbar-actions.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-draw-view.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-home-colour.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-insert-view.d.ts.map +1 -1
- package/dist/presence.js +3 -3
- package/dist/{presentation-preview-VIIU7E2S.js → presentation-preview-HVKJ3KJN.js} +1 -1
- package/dist/ribbon/auto-collapse.d.ts +8 -0
- package/dist/ribbon/auto-collapse.d.ts.map +1 -0
- package/dist/ribbon/group-overflow.d.ts +7 -0
- package/dist/ribbon/group-overflow.d.ts.map +1 -1
- package/dist/ribbon/overflow.d.ts +7 -0
- package/dist/ribbon/overflow.d.ts.map +1 -1
- package/dist/ribbon/ribbon-tabs.d.ts +5 -0
- package/dist/ribbon/ribbon-tabs.d.ts.map +1 -1
- package/dist/ribbon/scroll-more.d.ts +17 -0
- package/dist/ribbon/scroll-more.d.ts.map +1 -0
- package/dist/smartart.js +3 -3
- package/dist/teams/app/activity.d.ts +5 -0
- package/dist/teams/app/pinned-bar.d.ts +24 -0
- package/dist/teams/app/profile-menu.d.ts +18 -1
- package/dist/teams/app/teams-app.d.ts +8 -3
- package/dist/teams/app-rail.d.ts +3 -1
- package/dist/teams/avatar.d.ts +2 -2
- package/dist/teams/chat-list.d.ts +10 -2
- package/dist/teams.js +7 -7
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +7 -5
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio/viewer-gesture-state.d.ts +54 -0
- package/dist/visio/viewer-options-categories.d.ts +8 -0
- package/dist/visio/viewer-options.d.ts +3 -7
- package/dist/visio/viewer-touch-gestures.d.ts +17 -0
- package/dist/visio/viewer-touch-hit.d.ts +3 -0
- package/dist/visio/viewer-touch-long-press.d.ts +13 -0
- package/dist/visio/viewer-touch-math.d.ts +44 -0
- package/dist/visio.js +319 -149
- package/dist/xlsx/backstage/index.d.ts +3 -0
- package/dist/xlsx/backstage/options-customize.d.ts +7 -0
- package/dist/xlsx/backstage/options-dialog.d.ts +13 -0
- package/dist/xlsx/ribbon/ribbon.d.ts +1 -1
- package/dist/xlsx/status-bar.d.ts +1 -1
- package/dist/xlsx.js +282 -172
- package/package.json +2 -2
- package/dist/teams/app/navigation-drawer.d.ts +0 -26
- package/dist/xlsx/backstage/pages-options.d.ts +0 -7
package/dist/visio.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { trackPointerPan, ownsCaptureLoss } from './chunk-GSXOZCAN.js';
|
|
2
|
-
import { syncRibbonAddIns } from './chunk-
|
|
3
|
-
export { RIBBON_ADD_IN_EVENT } from './chunk-
|
|
4
|
-
import { themeBridge, installOfficeUiTheme } from './chunk-
|
|
5
|
-
import { attachKeyTips, registerControls, readOfficeProfile, sanitizeOfficeProfile, writeOfficeProfile, attachRibbonGroupOverflow, commentInitials } from './chunk-
|
|
2
|
+
import { syncRibbonAddIns } from './chunk-3XST4F6J.js';
|
|
3
|
+
export { RIBBON_ADD_IN_EVENT } from './chunk-3XST4F6J.js';
|
|
4
|
+
import { themeBridge, installOfficeUiTheme } from './chunk-7E3HU7RL.js';
|
|
5
|
+
import { userInterfaceSection, personalizeSection, unavailableCategory, attachKeyTips, registerControls, readOfficeProfile, sanitizeOfficeProfile, writeOfficeProfile, attachRibbonGroupOverflow, commentInitials } from './chunk-BFPHRWEB.js';
|
|
6
6
|
import { getIcon, registerIcon } from './chunk-M6GF5ED2.js';
|
|
7
|
-
import { definePresence } from './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import { 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, DocumentHistory, snapshotEdits, visioWithContainerMembers, visioSelectionIsOnPage, visioDuplicateCommand, visioGroupCommand, visioUngroupCommand, visioContainerCommand, visioCalloutCommand, visioPasteCommand, visioTextOccurrenceSelection, ForeignVectorBudget, VISIO_IDENTITY_TRANSFORM, hasVisibleShapeContent, composeVisioTransform, compatibilityNotes, compatibilityText, visioGradientInstances, visioRenderedGradientStopCount, inspectForeignVectorResource, copySnapshotScene, editErrorMessage, eventKeys, propertyKeys, VISIO_TEXT_REPLACE_LIMITS, visioTextReplaceOccurrences, visioTextReplacePlan, visioTextReplaceCommands, TEXT_SEARCH_LIMITS, visioTextShape, visioTextDraftEdit, isEditCancellation, visioSizePositionCommand, visioSizePositionState, visioWithCalloutLeaders, visioWithDataGraphics, visioPageInsertCommand, visioQuarterTurnCommand, visioRotationShape, visioMovementShape, visioMoveCommands, visioMoveTargets, visioMarqueeBox, visioPageDragDelta,
|
|
7
|
+
import { definePresence } from './chunk-KNC2UEUR.js';
|
|
8
|
+
import './chunk-CWBSXK7P.js';
|
|
9
|
+
import './chunk-LD3K2RDN.js';
|
|
10
|
+
import { 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, DocumentHistory, snapshotEdits, visioWithContainerMembers, visioSelectionIsOnPage, visioDuplicateCommand, visioGroupCommand, visioUngroupCommand, visioContainerCommand, visioCalloutCommand, visioPasteCommand, visioTextOccurrenceSelection, ForeignVectorBudget, VISIO_IDENTITY_TRANSFORM, hasVisibleShapeContent, composeVisioTransform, compatibilityNotes, compatibilityText, visioGradientInstances, visioRenderedGradientStopCount, inspectForeignVectorResource, copySnapshotScene, editErrorMessage, eventKeys, propertyKeys, VISIO_TEXT_REPLACE_LIMITS, visioTextReplaceOccurrences, visioTextReplacePlan, visioTextReplaceCommands, TEXT_SEARCH_LIMITS, visioTextShape, visioTextDraftEdit, isEditCancellation, visioSizePositionCommand, visioSizePositionState, visioWithCalloutLeaders, visioWithDataGraphics, visioPageInsertCommand, visioQuarterTurnCommand, visioRotationShape, visioMovementShape, visioMoveCommands, visioMoveTargets, visioMarqueeBox, visioPageDragDelta, visioConnectorRouteOf, visioPageEditToDrawing, visioResizeShape, visioResizeDrag, textSearchStatus, visioSvgStrokeStyle, visioLineDashLengths, VISIO_DIAGRAM_RULE_SETS, visioClipboardShape, visioArrangeCommands, visioChangeMasterTargets, visioChangeMasterCommand, visioChangeShapeRefusal, visioChangeShapeCommand, visioChangeCaseShape, visioChangeCaseCommand, visioTextBlockShape, visioTextBlockFrame, visioTextBlockEdit, visioOrderingShape, visioFormatTargetShape, visioFormattingShape, visioTextFormattingState, visioTextIndentCommand, visioTextFontStepCommand, visioFontFamilies, visioPictureInsertCommand, normalizeVisioHyperlinkAddress, visioFitToDrawingEdits, VISIO_PAPER_SIZES, visioPageSizePresetEdits, visioOrientationEdits, visioPageDecorationState, visioNewPageId, visioMatchingPaperSize, visioPageBreaks, visioRemoveDataGraphicEdits, visioDataGraphicFields, visioDataGraphicEdits, visioShapeDataRow, VISIO_DATA_GRAPHIC_FILL_ROW, visioColorRules, visioLegendEdits, visioTextDialogValues, visioTextDialogPatch, visioFormatPainterSnapshot, visioFormatPainterEdits, VISIO_FORMAT_PAINTER_LIMITS, isVisioPathTool, visioPathDrawPlan, visioDrawPlan, visioDrawIsLargeEnough, visioConnectorCreationCommand, visioConnectableShape, visioAddConnectionPointCommand, visioDrawBounds, visioDrawingPoint, visioMovePreviewTransform, visioMarqueeSelection, visioStraightLineHandles, visioConnectorEndHandles, visioNearestConnectionPoint, visioRotationPreviewTransform, VISIO_RESIZE_HANDLES, visioStencilDropCommand, visioNudgeCommands, visioFillPatternTransform, visioRenderedGradientStops, visioStrokeGradient, VISIO_LAYOUT_STYLES, visioMasterDropRefusal, visioMasterDropSize, 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, visioShapeDataText, 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, visioPathPreview, visioConnectorMovePreviews, visioConnectorPreviewPath, visioGlueableShape, visioMasterDropCommand, visioMasterPreviewBox, visioDataGraphicMarker, visioParseRange, visioDataTable, visioWorkbookGrid, visioGuideCreateCommand, visioGuideMoveCommand } from 'ooxml-core/visio/ui';
|
|
11
11
|
export { TEXT_SEARCH_LIMITS, compatibilityNotes, compatibilityText, demoDocument, eventKeys, propertyKeys } from 'ooxml-core/visio/ui';
|
|
12
12
|
import { VISIO_VISIBILITY_LIMITS, VISIO_BASIC_STENCIL, VISIO_STENCILS, visioOutlineShape, VISIO_SNAP, VISIO_GLUE, VISIO_SHADOW_PRESETS, loadVisio, createVsdx, deserializeVisioClipboard, getVisioPageLayers, resolveVisioPageVisibility, visioLineJumpPaths, visioSnapGlue, VISIO_CLIPBOARD_MAX_CHARS, VISIO_GLOW_TRANSPARENCY, VISIO_METADATA_TEXT_LIMIT, VISIO_PICTURE_MAX_BYTES, inspectVisioRasterImage, visioPageLayout, VISIO_BUILT_IN_THEMES, VISIO_CONNECTOR_ROUTES, visioFilledArrow, layoutVisioFilledArrowLine, visioOpenArrowPath, isVisioChangeShapeTarget, VISIO_CONTAINER_STYLES, VISIO_CALLOUT_STYLES, visioBuiltInStencil, visioFallbackQuickStyle, VISIO_GLOW_SIZES, VISIO_SOFT_EDGE_SIZES, VISIO_REFLECTION_PRESETS, VISIO_BACKGROUND_STYLES, visioBackgroundShapes, VISIO_BORDER_STYLES, visioBorderShapes, checkVisioAlternativeText, VISIO_SHAPE_DATA_TYPES, visioShapeDataRowName, VISIO_CLIPBOARD_MAGIC, visioThemeVariantColors, visioPageThemeColors, visioBuiltInMaster, VISIO_QUICK_STYLE_COLORS, isVisioBuiltInThemeId, VISIO_SCALE_UNITS } from 'ooxml-core/visio';
|
|
13
13
|
import { pushRecentColor, normalizePaletteHex } from 'ooxml-core/color';
|
|
@@ -1844,7 +1844,7 @@ summary::marker { color:var(--_vv-muted); font-size:10px; }
|
|
|
1844
1844
|
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/* 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";
|
|
1845
1845
|
|
|
1846
1846
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/canvas.css?raw
|
|
1847
|
-
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";
|
|
1847
|
+
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";
|
|
1848
1848
|
|
|
1849
1849
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/ribbon.css?raw
|
|
1850
1850
|
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.tools-content 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 .ribbon-tools .tools-content office-ui-ribbon-group {\n width: 100%;\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";
|
|
@@ -4780,7 +4780,7 @@ function syncChangeShape(gallery3, reason, masters, builtIn) {
|
|
|
4780
4780
|
}
|
|
4781
4781
|
|
|
4782
4782
|
// src/visio/ribbon-home.ts
|
|
4783
|
-
var ARRANGE = "
|
|
4783
|
+
var ARRANGE = "Select shapes to align, distribute, rotate or flip them.";
|
|
4784
4784
|
var small2 = (spec) => ({ size: "small", ...spec });
|
|
4785
4785
|
var icon2 = (spec) => ({ size: "icon", ...spec });
|
|
4786
4786
|
function paintMenu(doc, target, label) {
|
|
@@ -7804,6 +7804,246 @@ function hideGestureOverlays(viewport, selector) {
|
|
|
7804
7804
|
};
|
|
7805
7805
|
}
|
|
7806
7806
|
|
|
7807
|
+
// src/visio/viewer-touch-math.ts
|
|
7808
|
+
var TOUCH_SLOP = 8;
|
|
7809
|
+
var LONG_PRESS_MS = 500;
|
|
7810
|
+
var TOUCH_HIT_RADIUS = 14;
|
|
7811
|
+
var MIN_ZOOM = 0.1;
|
|
7812
|
+
var MAX_ZOOM = 8;
|
|
7813
|
+
function pinchDistance(a, b) {
|
|
7814
|
+
return Math.hypot(a.x - b.x, a.y - b.y);
|
|
7815
|
+
}
|
|
7816
|
+
function pinchMidpoint(a, b) {
|
|
7817
|
+
return { x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 };
|
|
7818
|
+
}
|
|
7819
|
+
function clampZoom(zoom, min = MIN_ZOOM, max = MAX_ZOOM) {
|
|
7820
|
+
return Number.isFinite(zoom) ? Math.max(min, Math.min(max, zoom)) : 1;
|
|
7821
|
+
}
|
|
7822
|
+
function pinchZoom(startZoom, startDistance, distance, min = MIN_ZOOM, max = MAX_ZOOM) {
|
|
7823
|
+
if (!(startDistance > 0) || !(distance > 0)) return clampZoom(startZoom, min, max);
|
|
7824
|
+
return clampZoom(startZoom * distance / startDistance, min, max);
|
|
7825
|
+
}
|
|
7826
|
+
function pointFraction(point, rect) {
|
|
7827
|
+
return {
|
|
7828
|
+
x: rect.width > 0 ? (point.x - rect.left) / rect.width : 0.5,
|
|
7829
|
+
y: rect.height > 0 ? (point.y - rect.top) / rect.height : 0.5
|
|
7830
|
+
};
|
|
7831
|
+
}
|
|
7832
|
+
function pinchScrollDelta(fraction, rect, target) {
|
|
7833
|
+
return {
|
|
7834
|
+
x: rect.left + fraction.x * rect.width - target.x,
|
|
7835
|
+
y: rect.top + fraction.y * rect.height - target.y
|
|
7836
|
+
};
|
|
7837
|
+
}
|
|
7838
|
+
function hitTolerance(pointerType) {
|
|
7839
|
+
return pointerType === "touch" ? TOUCH_HIT_RADIUS : 0;
|
|
7840
|
+
}
|
|
7841
|
+
function hitProbes(radius) {
|
|
7842
|
+
const probes = [{ x: 0, y: 0 }];
|
|
7843
|
+
if (radius <= 0) return probes;
|
|
7844
|
+
for (const r of [radius / 2, radius])
|
|
7845
|
+
for (let i = 0; i < 8; i++) {
|
|
7846
|
+
const angle = i * Math.PI / 4;
|
|
7847
|
+
probes.push({ x: Math.cos(angle) * r, y: Math.sin(angle) * r });
|
|
7848
|
+
}
|
|
7849
|
+
return probes;
|
|
7850
|
+
}
|
|
7851
|
+
|
|
7852
|
+
// src/visio/viewer-touch-gestures.ts
|
|
7853
|
+
var ViewerTouchGestures = class {
|
|
7854
|
+
constructor(viewport, controller, options2) {
|
|
7855
|
+
this.viewport = viewport;
|
|
7856
|
+
this.controller = controller;
|
|
7857
|
+
this.options = options2;
|
|
7858
|
+
}
|
|
7859
|
+
viewport;
|
|
7860
|
+
controller;
|
|
7861
|
+
options;
|
|
7862
|
+
#touches = /* @__PURE__ */ new Map();
|
|
7863
|
+
/** Pointers consumed by a pinch stay ignored until they lift, so no finger starts a pan after it. */
|
|
7864
|
+
#spent = /* @__PURE__ */ new Set();
|
|
7865
|
+
#pinch;
|
|
7866
|
+
get pinching() {
|
|
7867
|
+
return !!this.#pinch;
|
|
7868
|
+
}
|
|
7869
|
+
wire() {
|
|
7870
|
+
const view = this.viewport.ownerDocument.defaultView;
|
|
7871
|
+
const Abort = view?.AbortController ?? AbortController;
|
|
7872
|
+
const events = new Abort();
|
|
7873
|
+
const options2 = { signal: events.signal, capture: true };
|
|
7874
|
+
const viewport = this.viewport;
|
|
7875
|
+
viewport.addEventListener("pointerdown", (event) => this.#down(event), options2);
|
|
7876
|
+
viewport.addEventListener("pointermove", (event) => this.#move(event), options2);
|
|
7877
|
+
for (const type of ["pointerup", "pointercancel"])
|
|
7878
|
+
viewport.addEventListener(type, (event) => this.#up(event), options2);
|
|
7879
|
+
return () => {
|
|
7880
|
+
events.abort();
|
|
7881
|
+
this.#touches.clear();
|
|
7882
|
+
this.#spent.clear();
|
|
7883
|
+
this.#pinch = void 0;
|
|
7884
|
+
};
|
|
7885
|
+
}
|
|
7886
|
+
#down(event) {
|
|
7887
|
+
if (event.pointerType !== "touch") return;
|
|
7888
|
+
this.#touches.set(event.pointerId, { x: event.clientX, y: event.clientY });
|
|
7889
|
+
if (this.#spent.size || this.#pinch) {
|
|
7890
|
+
this.#spent.add(event.pointerId);
|
|
7891
|
+
event.stopImmediatePropagation();
|
|
7892
|
+
return;
|
|
7893
|
+
}
|
|
7894
|
+
if (this.#touches.size < 2 || !this.options.active()) return;
|
|
7895
|
+
const [first, second] = [...this.#touches.keys()];
|
|
7896
|
+
const a = this.#touches.get(first), b = this.#touches.get(second);
|
|
7897
|
+
const distance = pinchDistance(a, b);
|
|
7898
|
+
if (!(distance > 0)) return;
|
|
7899
|
+
this.options.cancelSingle();
|
|
7900
|
+
const paper = this.viewport.querySelector("svg.paper") ?? this.viewport;
|
|
7901
|
+
this.#pinch = {
|
|
7902
|
+
ids: [first, second],
|
|
7903
|
+
startDistance: distance,
|
|
7904
|
+
startZoom: this.controller.state.zoom,
|
|
7905
|
+
fraction: pointFraction(pinchMidpoint(a, b), paper.getBoundingClientRect())
|
|
7906
|
+
};
|
|
7907
|
+
this.#spent.add(first).add(second);
|
|
7908
|
+
for (const id of this.#pinch.ids) this.viewport.setPointerCapture?.(id);
|
|
7909
|
+
event.preventDefault();
|
|
7910
|
+
event.stopImmediatePropagation();
|
|
7911
|
+
}
|
|
7912
|
+
#move(event) {
|
|
7913
|
+
if (event.pointerType !== "touch" || !this.#touches.has(event.pointerId)) return;
|
|
7914
|
+
this.#touches.set(event.pointerId, { x: event.clientX, y: event.clientY });
|
|
7915
|
+
if (this.#spent.has(event.pointerId)) event.stopImmediatePropagation();
|
|
7916
|
+
const pinch = this.#pinch;
|
|
7917
|
+
if (!pinch || !pinch.ids.includes(event.pointerId)) return;
|
|
7918
|
+
const a = this.#touches.get(pinch.ids[0]), b = this.#touches.get(pinch.ids[1]);
|
|
7919
|
+
const next = pinchZoom(
|
|
7920
|
+
pinch.startZoom,
|
|
7921
|
+
pinch.startDistance,
|
|
7922
|
+
pinchDistance(a, b),
|
|
7923
|
+
MIN_ZOOM,
|
|
7924
|
+
MAX_ZOOM
|
|
7925
|
+
);
|
|
7926
|
+
this.controller.setZoom(next);
|
|
7927
|
+
const paper = this.viewport.querySelector("svg.paper");
|
|
7928
|
+
if (paper) {
|
|
7929
|
+
const delta = pinchScrollDelta(
|
|
7930
|
+
pinch.fraction,
|
|
7931
|
+
paper.getBoundingClientRect(),
|
|
7932
|
+
pinchMidpoint(a, b)
|
|
7933
|
+
);
|
|
7934
|
+
this.viewport.scrollLeft += delta.x;
|
|
7935
|
+
this.viewport.scrollTop += delta.y;
|
|
7936
|
+
}
|
|
7937
|
+
event.preventDefault();
|
|
7938
|
+
}
|
|
7939
|
+
#up(event) {
|
|
7940
|
+
if (event.pointerType !== "touch") return;
|
|
7941
|
+
this.#touches.delete(event.pointerId);
|
|
7942
|
+
if (this.#pinch?.ids.includes(event.pointerId)) this.#pinch = void 0;
|
|
7943
|
+
if (this.#spent.delete(event.pointerId)) event.stopImmediatePropagation();
|
|
7944
|
+
}
|
|
7945
|
+
};
|
|
7946
|
+
|
|
7947
|
+
// src/visio/viewer-touch-long-press.ts
|
|
7948
|
+
function armLongPress(view, drag, shape, event, live) {
|
|
7949
|
+
if (!view) return;
|
|
7950
|
+
const { clientX, clientY } = event;
|
|
7951
|
+
drag.longPress = view.setTimeout(() => {
|
|
7952
|
+
drag.longPress = void 0;
|
|
7953
|
+
if (drag.started || !live()) return;
|
|
7954
|
+
drag.held = () => shape.dispatchEvent(
|
|
7955
|
+
new view.MouseEvent("contextmenu", { bubbles: true, cancelable: true, clientX, clientY })
|
|
7956
|
+
);
|
|
7957
|
+
}, LONG_PRESS_MS);
|
|
7958
|
+
}
|
|
7959
|
+
function touchRelease(drag, controller) {
|
|
7960
|
+
const held = drag.held;
|
|
7961
|
+
if (held) return (view) => void view?.setTimeout(held, 100);
|
|
7962
|
+
const target = drag.target;
|
|
7963
|
+
if (drag.touch && drag.nearby && target) return () => controller.selectShapes([target]);
|
|
7964
|
+
return void 0;
|
|
7965
|
+
}
|
|
7966
|
+
function gestureIsCurrent(drag, state, active) {
|
|
7967
|
+
return state.document === drag.document && state.document?.pages[state.pageIndex] === drag.page && state.selectedShapes === drag.selection && state.layerVisibilityOverrides === drag.layers && state.zoom === drag.zoom && drag.svg.isConnected && !state.loading && !state.edit.busy && active;
|
|
7968
|
+
}
|
|
7969
|
+
function selectDragTarget(controller, drag, active) {
|
|
7970
|
+
const target = drag.target;
|
|
7971
|
+
const intended = drag.additive ? [...drag.selection, target] : [target];
|
|
7972
|
+
controller.selectShapes(intended);
|
|
7973
|
+
const state = controller.state;
|
|
7974
|
+
if (state.document !== drag.document || state.document.pages[state.pageIndex] !== drag.page || state.layerVisibilityOverrides !== drag.layers || state.loading || state.edit.busy || !active || state.selectedShapes.length !== intended.length || !state.selectedShapes.every(
|
|
7975
|
+
(shape, index) => shape.id === intended[index].id && visioSelectionIsOnPage(shape, drag.page.id)
|
|
7976
|
+
))
|
|
7977
|
+
return false;
|
|
7978
|
+
drag.selection = state.selectedShapes;
|
|
7979
|
+
return true;
|
|
7980
|
+
}
|
|
7981
|
+
function createMarqueeRect(svg2) {
|
|
7982
|
+
const rect = svg2.ownerDocument.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
7983
|
+
rect.dataset.marqueePreview = "";
|
|
7984
|
+
rect.setAttribute("fill", "var(--_vv-accent)");
|
|
7985
|
+
rect.setAttribute("fill-opacity", "0.12");
|
|
7986
|
+
rect.setAttribute("stroke", "var(--_vv-accent)");
|
|
7987
|
+
rect.setAttribute("stroke-width", "1.5");
|
|
7988
|
+
rect.setAttribute("vector-effect", "non-scaling-stroke");
|
|
7989
|
+
rect.setAttribute("aria-hidden", "true");
|
|
7990
|
+
rect.style.pointerEvents = "none";
|
|
7991
|
+
svg2.append(rect);
|
|
7992
|
+
return rect;
|
|
7993
|
+
}
|
|
7994
|
+
function createGesture(input) {
|
|
7995
|
+
const { event, state, group: group2 } = input;
|
|
7996
|
+
return {
|
|
7997
|
+
pointer: event.pointerId,
|
|
7998
|
+
svg: input.svg,
|
|
7999
|
+
page: input.page,
|
|
8000
|
+
document: state.document,
|
|
8001
|
+
selection: state.selectedShapes,
|
|
8002
|
+
layers: state.layerVisibilityOverrides,
|
|
8003
|
+
zoom: state.zoom,
|
|
8004
|
+
start: input.start,
|
|
8005
|
+
clientX: event.clientX,
|
|
8006
|
+
clientY: event.clientY,
|
|
8007
|
+
started: false,
|
|
8008
|
+
additive: event.shiftKey || event.ctrlKey || event.metaKey,
|
|
8009
|
+
touch: input.touch,
|
|
8010
|
+
nearby: input.nearby,
|
|
8011
|
+
...group2 ? {
|
|
8012
|
+
target: {
|
|
8013
|
+
id: group2.dataset.shapeId,
|
|
8014
|
+
name: group2.dataset.shapeName ?? "",
|
|
8015
|
+
pageId: input.page.id
|
|
8016
|
+
}
|
|
8017
|
+
} : {}
|
|
8018
|
+
};
|
|
8019
|
+
}
|
|
8020
|
+
function marqueeSelect(controller, drag, point) {
|
|
8021
|
+
const box2 = visioMarqueeBox(drag.start, point);
|
|
8022
|
+
if (!box2) return;
|
|
8023
|
+
const selected = visioMarqueeSelection(
|
|
8024
|
+
drag.page,
|
|
8025
|
+
box2,
|
|
8026
|
+
documentVisibility(drag.document, drag.layers)
|
|
8027
|
+
);
|
|
8028
|
+
controller.selectShapes(drag.additive ? [...drag.selection, ...selected] : selected);
|
|
8029
|
+
}
|
|
8030
|
+
|
|
8031
|
+
// src/visio/viewer-touch-hit.ts
|
|
8032
|
+
function nearbyShape(viewport, svg2, event, selected) {
|
|
8033
|
+
const root = viewport.getRootNode();
|
|
8034
|
+
if (typeof root.elementsFromPoint !== "function") return null;
|
|
8035
|
+
for (const probe of hitProbes(hitTolerance(event.pointerType))) {
|
|
8036
|
+
const hits = root.elementsFromPoint(event.clientX + probe.x, event.clientY + probe.y);
|
|
8037
|
+
for (const element of hits) {
|
|
8038
|
+
if (!svg2.contains(element) || element.closest("[data-resize-overlay], .rotation-overlay"))
|
|
8039
|
+
continue;
|
|
8040
|
+
const shape = pointerShapeTarget(element, selected, true);
|
|
8041
|
+
if (shape) return shape;
|
|
8042
|
+
}
|
|
8043
|
+
}
|
|
8044
|
+
return null;
|
|
8045
|
+
}
|
|
8046
|
+
|
|
7807
8047
|
// src/visio/viewer-pointer-gestures.ts
|
|
7808
8048
|
var pointOptions = { snap: false, bounded: false };
|
|
7809
8049
|
var ViewerPointerGestures = class {
|
|
@@ -7811,6 +8051,15 @@ var ViewerPointerGestures = class {
|
|
|
7811
8051
|
this.viewport = viewport;
|
|
7812
8052
|
this.controller = controller;
|
|
7813
8053
|
this.options = options2;
|
|
8054
|
+
this.#touch = new ViewerTouchGestures(viewport, controller, {
|
|
8055
|
+
active: () => options2.active(),
|
|
8056
|
+
cancelSingle: () => {
|
|
8057
|
+
this.#cancelPan?.();
|
|
8058
|
+
this.#cancelPan = void 0;
|
|
8059
|
+
if (this.#drag) this.#cancel();
|
|
8060
|
+
this.#cancelClick = true;
|
|
8061
|
+
}
|
|
8062
|
+
});
|
|
7814
8063
|
}
|
|
7815
8064
|
viewport;
|
|
7816
8065
|
controller;
|
|
@@ -7819,6 +8068,7 @@ var ViewerPointerGestures = class {
|
|
|
7819
8068
|
#request = 0;
|
|
7820
8069
|
#cancelClick = false;
|
|
7821
8070
|
#cancelPan;
|
|
8071
|
+
#touch;
|
|
7822
8072
|
render(state) {
|
|
7823
8073
|
this.#cancelPan?.();
|
|
7824
8074
|
if (this.#drag && !this.#current(this.#drag, state)) this.#cancel();
|
|
@@ -7829,6 +8079,7 @@ var ViewerPointerGestures = class {
|
|
|
7829
8079
|
this.#cancel();
|
|
7830
8080
|
};
|
|
7831
8081
|
this.viewport.ownerDocument.addEventListener("pointerup", stopOutside);
|
|
8082
|
+
const disposeTouch = this.#touch.wire();
|
|
7832
8083
|
const dispose = wireHandleEvents(this.viewport, {
|
|
7833
8084
|
pointer: () => this.#drag?.pointer,
|
|
7834
8085
|
start: (event) => this.#start(event),
|
|
@@ -7847,10 +8098,11 @@ var ViewerPointerGestures = class {
|
|
|
7847
8098
|
++this.#request;
|
|
7848
8099
|
this.viewport.ownerDocument.removeEventListener("pointerup", stopOutside);
|
|
7849
8100
|
dispose();
|
|
8101
|
+
disposeTouch();
|
|
7850
8102
|
};
|
|
7851
8103
|
}
|
|
7852
8104
|
#current(drag, state = this.controller.state) {
|
|
7853
|
-
return
|
|
8105
|
+
return gestureIsCurrent(drag, state, this.options.active());
|
|
7854
8106
|
}
|
|
7855
8107
|
#start(event) {
|
|
7856
8108
|
this.#cancelClick = false;
|
|
@@ -7864,8 +8116,14 @@ var ViewerPointerGestures = class {
|
|
|
7864
8116
|
const svg2 = this.viewport.querySelector("svg.paper");
|
|
7865
8117
|
if (!svg2 || !page3 || !state.document || state.loading || state.edit.busy || !svg2.contains(node) && !(node === this.viewport && event.pointerType === "touch"))
|
|
7866
8118
|
return;
|
|
7867
|
-
|
|
7868
|
-
|
|
8119
|
+
let group2 = pointerShapeTarget(node, state.selectedShapes, true);
|
|
8120
|
+
const touch = event.pointerType === "touch";
|
|
8121
|
+
let nearby = false;
|
|
8122
|
+
if (!group2 && touch) {
|
|
8123
|
+
group2 = nearbyShape(this.viewport, svg2, event, state.selectedShapes);
|
|
8124
|
+
nearby = !!group2;
|
|
8125
|
+
}
|
|
8126
|
+
if (!group2 && touch) {
|
|
7869
8127
|
this.#cancelPan?.();
|
|
7870
8128
|
this.#cancelPan = trackPointerPan(
|
|
7871
8129
|
this.viewport,
|
|
@@ -7884,28 +8142,13 @@ var ViewerPointerGestures = class {
|
|
|
7884
8142
|
return;
|
|
7885
8143
|
const start = pagePoint(svg2, page3, event, pointOptions);
|
|
7886
8144
|
if (!start) return;
|
|
7887
|
-
const drag = {
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
zoom: state.zoom,
|
|
7895
|
-
start,
|
|
7896
|
-
clientX: event.clientX,
|
|
7897
|
-
clientY: event.clientY,
|
|
7898
|
-
started: false,
|
|
7899
|
-
additive: event.shiftKey || event.ctrlKey || event.metaKey,
|
|
7900
|
-
...group2 ? {
|
|
7901
|
-
target: {
|
|
7902
|
-
id: group2.dataset.shapeId,
|
|
7903
|
-
name: group2.dataset.shapeName ?? "",
|
|
7904
|
-
pageId: page3.id
|
|
7905
|
-
}
|
|
7906
|
-
} : {}
|
|
7907
|
-
};
|
|
7908
|
-
if (this.#current(drag)) this.#drag = drag;
|
|
8145
|
+
const drag = createGesture({ event, svg: svg2, page: page3, state, start, touch, nearby, group: group2 });
|
|
8146
|
+
if (!this.#current(drag)) return;
|
|
8147
|
+
this.#drag = drag;
|
|
8148
|
+
if (touch && group2)
|
|
8149
|
+
armLongPress(this.viewport.ownerDocument.defaultView, drag, group2, event, () => {
|
|
8150
|
+
return this.#drag === drag && this.#current(drag);
|
|
8151
|
+
});
|
|
7909
8152
|
}
|
|
7910
8153
|
#begin(drag) {
|
|
7911
8154
|
if (drag.target) {
|
|
@@ -7913,15 +8156,8 @@ var ViewerPointerGestures = class {
|
|
|
7913
8156
|
(shape) => shape.id === drag.target.id && visioSelectionIsOnPage(shape, drag.page.id)
|
|
7914
8157
|
);
|
|
7915
8158
|
if (!selected) {
|
|
7916
|
-
const intended = drag.additive ? [...drag.selection, drag.target] : [drag.target];
|
|
7917
8159
|
this.#drag = void 0;
|
|
7918
|
-
this.controller.
|
|
7919
|
-
const state = this.controller.state;
|
|
7920
|
-
if (state.document !== drag.document || state.document.pages[state.pageIndex] !== drag.page || state.layerVisibilityOverrides !== drag.layers || state.loading || state.edit.busy || !this.options.active() || state.selectedShapes.length !== intended.length || !state.selectedShapes.every(
|
|
7921
|
-
(shape, index) => shape.id === intended[index].id && visioSelectionIsOnPage(shape, drag.page.id)
|
|
7922
|
-
))
|
|
7923
|
-
return false;
|
|
7924
|
-
drag.selection = state.selectedShapes;
|
|
8160
|
+
if (!selectDragTarget(this.controller, drag, this.options.active())) return false;
|
|
7925
8161
|
this.#drag = drag;
|
|
7926
8162
|
}
|
|
7927
8163
|
if (!drag.selection.every((shape) => visioSelectionIsOnPage(shape, drag.page.id)) || !visioMoveCommands(
|
|
@@ -7947,22 +8183,10 @@ var ViewerPointerGestures = class {
|
|
|
7947
8183
|
"[data-resize-overlay], .rotation-overlay"
|
|
7948
8184
|
);
|
|
7949
8185
|
} else {
|
|
7950
|
-
|
|
7951
|
-
"http://www.w3.org/2000/svg",
|
|
7952
|
-
"rect"
|
|
7953
|
-
);
|
|
7954
|
-
rect.dataset.marqueePreview = "";
|
|
7955
|
-
rect.setAttribute("fill", "var(--_vv-accent)");
|
|
7956
|
-
rect.setAttribute("fill-opacity", "0.12");
|
|
7957
|
-
rect.setAttribute("stroke", "var(--_vv-accent)");
|
|
7958
|
-
rect.setAttribute("stroke-width", "1.5");
|
|
7959
|
-
rect.setAttribute("vector-effect", "non-scaling-stroke");
|
|
7960
|
-
rect.setAttribute("aria-hidden", "true");
|
|
7961
|
-
rect.style.pointerEvents = "none";
|
|
7962
|
-
drag.svg.append(rect);
|
|
7963
|
-
drag.marquee = rect;
|
|
8186
|
+
drag.marquee = createMarqueeRect(drag.svg);
|
|
7964
8187
|
}
|
|
7965
8188
|
drag.started = true;
|
|
8189
|
+
drag.held = void 0;
|
|
7966
8190
|
this.viewport.focus({ preventScroll: true });
|
|
7967
8191
|
this.viewport.setPointerCapture?.(drag.pointer);
|
|
7968
8192
|
return true;
|
|
@@ -7975,7 +8199,8 @@ var ViewerPointerGestures = class {
|
|
|
7975
8199
|
return;
|
|
7976
8200
|
}
|
|
7977
8201
|
if (!drag.started) {
|
|
7978
|
-
|
|
8202
|
+
const slop = drag.touch ? TOUCH_SLOP : 4;
|
|
8203
|
+
if (Math.hypot(event.clientX - drag.clientX, event.clientY - drag.clientY) < slop) return;
|
|
7979
8204
|
try {
|
|
7980
8205
|
if (!this.#begin(drag)) {
|
|
7981
8206
|
this.#cancel();
|
|
@@ -8018,6 +8243,7 @@ var ViewerPointerGestures = class {
|
|
|
8018
8243
|
#release() {
|
|
8019
8244
|
const drag = this.#drag;
|
|
8020
8245
|
this.#drag = void 0;
|
|
8246
|
+
if (drag?.longPress) this.viewport.ownerDocument.defaultView?.clearTimeout(drag.longPress);
|
|
8021
8247
|
if (drag?.started) this.#cancelClick = true;
|
|
8022
8248
|
if (drag && this.viewport.hasPointerCapture?.(drag.pointer))
|
|
8023
8249
|
this.viewport.releasePointerCapture(drag.pointer);
|
|
@@ -8031,6 +8257,13 @@ var ViewerPointerGestures = class {
|
|
|
8031
8257
|
async #finish(event) {
|
|
8032
8258
|
const drag = this.#drag;
|
|
8033
8259
|
if (!drag || event.pointerId !== drag.pointer) return;
|
|
8260
|
+
const tap = !drag.started && this.#current(drag) ? touchRelease(drag, this.controller) : void 0;
|
|
8261
|
+
if (tap) {
|
|
8262
|
+
this.#cancel();
|
|
8263
|
+
this.#cancelClick = true;
|
|
8264
|
+
tap(this.viewport.ownerDocument.defaultView);
|
|
8265
|
+
return;
|
|
8266
|
+
}
|
|
8034
8267
|
if (!this.#current(drag) || !drag.started) {
|
|
8035
8268
|
this.#cancel();
|
|
8036
8269
|
return;
|
|
@@ -8042,16 +8275,7 @@ var ViewerPointerGestures = class {
|
|
|
8042
8275
|
if (!point || !this.#current(drag) || !drag.target) settle();
|
|
8043
8276
|
if (!point || !this.#current(drag)) return;
|
|
8044
8277
|
if (!drag.target) {
|
|
8045
|
-
|
|
8046
|
-
if (box2) {
|
|
8047
|
-
const selected = visioMarqueeSelection(
|
|
8048
|
-
drag.page,
|
|
8049
|
-
box2,
|
|
8050
|
-
documentVisibility(drag.document, drag.layers)
|
|
8051
|
-
);
|
|
8052
|
-
if (this.#current(drag))
|
|
8053
|
-
this.controller.selectShapes(drag.additive ? [...drag.selection, ...selected] : selected);
|
|
8054
|
-
}
|
|
8278
|
+
if (this.#current(drag)) marqueeSelect(this.controller, drag, point);
|
|
8055
8279
|
return;
|
|
8056
8280
|
}
|
|
8057
8281
|
const edits = visioMoveCommands(
|
|
@@ -8668,7 +8892,8 @@ var ViewerPanZoom = class {
|
|
|
8668
8892
|
}
|
|
8669
8893
|
};
|
|
8670
8894
|
|
|
8671
|
-
// src/visio/viewer-options.ts
|
|
8895
|
+
// src/visio/viewer-options-categories.ts
|
|
8896
|
+
var visio = { product: "Visio", t: (text2) => text2 };
|
|
8672
8897
|
var disabled = (reason) => ({ disabled: `Not available yet. ${reason}` });
|
|
8673
8898
|
var VISIO_OPTION_CATEGORIES = [
|
|
8674
8899
|
{
|
|
@@ -8676,36 +8901,10 @@ var VISIO_OPTION_CATEGORIES = [
|
|
|
8676
8901
|
label: "General",
|
|
8677
8902
|
description: "General options for working with Visio.",
|
|
8678
8903
|
sections: [
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
{
|
|
8684
|
-
kind: "toggle",
|
|
8685
|
-
key: "miniToolbar",
|
|
8686
|
-
label: "Show Mini Toolbar on selection",
|
|
8687
|
-
...disabled("Needs rich text formatting.")
|
|
8688
|
-
},
|
|
8689
|
-
{
|
|
8690
|
-
kind: "toggle",
|
|
8691
|
-
key: "livePreview",
|
|
8692
|
-
label: "Enable Live Preview",
|
|
8693
|
-
...disabled("Styles are applied on click; hover previews are not drawn yet.")
|
|
8694
|
-
},
|
|
8695
|
-
{
|
|
8696
|
-
kind: "select",
|
|
8697
|
-
key: "screenTips",
|
|
8698
|
-
label: "ScreenTip style",
|
|
8699
|
-
choices: [{ value: "descriptions", label: "Show feature descriptions in ScreenTips" }],
|
|
8700
|
-
...disabled("ScreenTips always describe the command.")
|
|
8701
|
-
}
|
|
8702
|
-
]
|
|
8703
|
-
},
|
|
8704
|
-
{
|
|
8705
|
-
id: "personalize",
|
|
8706
|
-
title: "Personalize your copy of Microsoft Office",
|
|
8707
|
-
description: "Stored on this device only. Shared sessions show this name to others.",
|
|
8708
|
-
controls: [
|
|
8904
|
+
userInterfaceSection(visio),
|
|
8905
|
+
personalizeSection(
|
|
8906
|
+
visio,
|
|
8907
|
+
[
|
|
8709
8908
|
{ kind: "text", key: "userName", label: "User name", maxLength: 64 },
|
|
8710
8909
|
{ kind: "text", key: "userInitials", label: "Initials", maxLength: 2 },
|
|
8711
8910
|
{
|
|
@@ -8719,31 +8918,21 @@ var VISIO_OPTION_CATEGORIES = [
|
|
|
8719
8918
|
{ value: "dark", label: "Black" }
|
|
8720
8919
|
]
|
|
8721
8920
|
}
|
|
8722
|
-
]
|
|
8723
|
-
|
|
8921
|
+
],
|
|
8922
|
+
"Stored on this device only. Shared sessions show this name to others."
|
|
8923
|
+
)
|
|
8724
8924
|
]
|
|
8725
8925
|
},
|
|
8726
|
-
{
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
disabled: "Not available yet. Spelling and AutoCorrect need rich text editing.",
|
|
8731
|
-
sections: []
|
|
8732
|
-
},
|
|
8733
|
-
{
|
|
8734
|
-
id: "save",
|
|
8735
|
-
label: "Save",
|
|
8926
|
+
unavailableCategory(visio, "proofing", {
|
|
8927
|
+
reason: "Not available yet. Spelling and AutoCorrect need rich text editing."
|
|
8928
|
+
}),
|
|
8929
|
+
unavailableCategory(visio, "save", {
|
|
8736
8930
|
description: "Customize how drawings are saved.",
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
label: "Language",
|
|
8743
|
-
description: "Set the Office Language Preferences.",
|
|
8744
|
-
disabled: "Not available yet. The viewer is English only.",
|
|
8745
|
-
sections: []
|
|
8746
|
-
},
|
|
8931
|
+
reason: "Not available yet. Drawings are saved as downloaded copies; AutoRecover is not kept."
|
|
8932
|
+
}),
|
|
8933
|
+
unavailableCategory(visio, "language", {
|
|
8934
|
+
reason: "Not available yet. The viewer is English only."
|
|
8935
|
+
}),
|
|
8747
8936
|
{
|
|
8748
8937
|
id: "advanced",
|
|
8749
8938
|
label: "Advanced",
|
|
@@ -8771,35 +8960,15 @@ var VISIO_OPTION_CATEGORIES = [
|
|
|
8771
8960
|
}
|
|
8772
8961
|
]
|
|
8773
8962
|
},
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
},
|
|
8781
|
-
{
|
|
8782
|
-
id: "qat",
|
|
8783
|
-
label: "Quick Access Toolbar",
|
|
8784
|
-
description: "Customize the Quick Access Toolbar.",
|
|
8785
|
-
disabled: "Not available yet. The Quick Access Toolbar shows Undo and Redo.",
|
|
8786
|
-
sections: []
|
|
8787
|
-
},
|
|
8788
|
-
{
|
|
8789
|
-
id: "add-ins",
|
|
8790
|
-
label: "Add-ins",
|
|
8791
|
-
description: "View and manage Microsoft Office Add-ins.",
|
|
8792
|
-
disabled: "Not available. Add-ins and macros never run in this viewer.",
|
|
8793
|
-
sections: []
|
|
8794
|
-
},
|
|
8795
|
-
{
|
|
8796
|
-
id: "trust",
|
|
8797
|
-
label: "Trust Center",
|
|
8798
|
-
description: "Help keep your documents safe and your computer secure and healthy.",
|
|
8799
|
-
disabled: "Not available. Documents stay local and active content is never run.",
|
|
8800
|
-
sections: []
|
|
8801
|
-
}
|
|
8963
|
+
unavailableCategory(visio, "ribbon"),
|
|
8964
|
+
unavailableCategory(visio, "qat", {
|
|
8965
|
+
reason: "Not available yet. The Quick Access Toolbar shows Undo and Redo."
|
|
8966
|
+
}),
|
|
8967
|
+
unavailableCategory(visio, "addins"),
|
|
8968
|
+
unavailableCategory(visio, "trust")
|
|
8802
8969
|
];
|
|
8970
|
+
|
|
8971
|
+
// src/visio/viewer-options.ts
|
|
8803
8972
|
var THEME_KEY = "ooxml-visio-office-theme";
|
|
8804
8973
|
var isStatusBarTheme = (value) => value === "colorful" || value === "neutral";
|
|
8805
8974
|
function readStatusBarTheme() {
|
|
@@ -8833,6 +9002,7 @@ function createOptionsDialog(doc) {
|
|
|
8833
9002
|
const dialog = doc.createElement("office-ui-options-dialog");
|
|
8834
9003
|
dialog.setAttribute("heading", "Visio Options");
|
|
8835
9004
|
dialog.categories = VISIO_OPTION_CATEGORIES;
|
|
9005
|
+
dialog.defaults = { userName: "", userInitials: "", officeTheme: "neutral" };
|
|
8836
9006
|
return dialog;
|
|
8837
9007
|
}
|
|
8838
9008
|
var ViewerProfile = class {
|