ooxml-ui 1.8.4 → 1.9.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/{chunk-CTPXTRDT.js → chunk-PH7IBZOZ.js} +1 -1
- package/dist/docx/columns-dialog.d.ts +1 -1
- package/dist/docx/editor-core.d.ts +2 -0
- package/dist/docx/page-controller.d.ts +3 -2
- package/dist/docx/print-drag-scroll.d.ts +7 -0
- package/dist/docx/print-editing-geometry.d.ts +2 -0
- package/dist/docx/print-editing-index.d.ts +30 -0
- package/dist/docx/print-editing.d.ts +12 -0
- package/dist/docx/print-keyboard-navigation.d.ts +18 -0
- package/dist/docx/print-layout-view.d.ts +6 -10
- package/dist/docx/print-layout.d.ts +2 -2
- package/dist/docx/print-picture.d.ts +1 -0
- package/dist/docx.js +677 -20
- package/dist/index.js +2 -2
- package/dist/pptx/{chunk-KMNNTEGF.cjs → chunk-BFZDO2DY.cjs} +429 -194
- package/dist/pptx/{chunk-VRFNAF3Q.mjs → chunk-F7BBPOVJ.mjs} +9 -0
- package/dist/pptx/{chunk-STXGHV25.cjs → chunk-HWW2UVUP.cjs} +161 -4
- package/dist/pptx/{chunk-GHFJ46NS.mjs → chunk-KBCKCW5M.mjs} +371 -161
- package/dist/pptx/{chunk-NVYVHNPD.mjs → chunk-MKVKISFW.mjs} +1 -1
- package/dist/pptx/{chunk-NKHPE4PS.cjs → chunk-PKDISDDZ.cjs} +2 -2
- package/dist/pptx/{chunk-SM3CWDIQ.cjs → chunk-QVYJB7G2.cjs} +9 -0
- package/dist/pptx/chunk-SABFKDRM.mjs +286 -0
- package/dist/pptx/dom/elements/image.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +221 -213
- package/dist/pptx/dom/index.mjs +24 -16
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +2834 -2766
- package/dist/pptx/index.mjs +4 -4
- package/dist/pptx/render/find-replace.d.ts +1 -1
- package/dist/pptx/render/find-replace.d.ts.map +1 -1
- package/dist/pptx/render/format-painter.cjs +5 -5
- package/dist/pptx/render/format-painter.mjs +2 -2
- package/dist/pptx/render/index.d.ts +3 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/inspector-helpers.cjs +12 -12
- package/dist/pptx/render/inspector-helpers.d.ts.map +1 -1
- package/dist/pptx/render/inspector-helpers.mjs +1 -1
- package/dist/pptx/render/inspector-number.d.ts +15 -0
- package/dist/pptx/render/inspector-number.d.ts.map +1 -0
- package/dist/pptx/render/picture-frame.d.ts +52 -0
- package/dist/pptx/render/picture-frame.d.ts.map +1 -0
- package/dist/pptx/render/ribbon-home-commands.d.ts +11 -2
- package/dist/pptx/render/ribbon-home-commands.d.ts.map +1 -1
- package/dist/pptx/render/share-session.d.ts.map +1 -1
- package/dist/pptx/render/slide-operations.d.ts +2 -1
- package/dist/pptx/render/slide-operations.d.ts.map +1 -1
- package/dist/pptx/render/slide-package-clipboard.d.ts +31 -0
- package/dist/pptx/render/slide-package-clipboard.d.ts.map +1 -0
- package/dist/pptx/render/slide-sorter-context-menu.d.ts +3 -5
- package/dist/pptx/render/slide-sorter-context-menu.d.ts.map +1 -1
- package/dist/pptx/render/slide-sorter-state.d.ts +8 -1
- package/dist/pptx/render/slide-sorter-state.d.ts.map +1 -1
- package/dist/pptx/render/text-advanced.d.ts.map +1 -1
- package/dist/pptx/render/text-style-scope.d.ts +41 -1
- package/dist/pptx/render/text-style-scope.d.ts.map +1 -1
- package/dist/pptx/render/text-style-update.d.ts.map +1 -1
- package/dist/pptx/web-components/index.d.ts +2 -0
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/slide-clipboard.d.ts +14 -0
- package/dist/pptx/web-components/slide-clipboard.d.ts.map +1 -0
- package/dist/teams.js +1 -1
- package/dist/visio/format-pane-fields.d.ts +2 -0
- package/dist/visio/page-setup-action.d.ts +1 -1
- package/dist/visio/page-setup-dialog-form.d.ts +1 -1
- package/dist/visio/ribbon-action.d.ts +1 -1
- package/dist/visio/viewer-accessibility.d.ts +17 -0
- package/dist/visio/viewer-insert-dialog.d.ts +2 -1
- package/dist/visio/viewer-review.d.ts +2 -0
- package/dist/visio.js +304 -14
- package/dist/xlsx/commands/pivots.d.ts +2 -0
- package/dist/xlsx/commands/sparklines.d.ts +2 -0
- package/dist/xlsx/dialogs/help-dialogs.d.ts +2 -2
- package/dist/xlsx/dialogs/page-header.d.ts +4 -0
- package/dist/xlsx/dialogs/page-setup-tabs.d.ts +6 -1
- package/dist/xlsx/dialogs/pivots.d.ts +2 -0
- package/dist/xlsx/dialogs/print-preview.d.ts +2 -0
- package/dist/xlsx/dialogs/sparklines.d.ts +4 -0
- package/dist/xlsx/print-cell.d.ts +4 -0
- package/dist/xlsx/print-header.d.ts +7 -0
- package/dist/xlsx/print-pages.d.ts +4 -0
- package/dist/xlsx/print.d.ts +4 -12
- package/dist/xlsx.js +1078 -287
- package/package.json +3 -3
- package/dist/pptx/chunk-VD7HRMTA.mjs +0 -137
- /package/dist/{chunk-SUHT5S2P.js → chunk-SKYBYVYH.js} +0 -0
package/dist/visio.js
CHANGED
|
@@ -6,9 +6,9 @@ import { getIcon, registerIcon } from './chunk-M6GF5ED2.js';
|
|
|
6
6
|
import { definePresence } from './chunk-L7JV5FVE.js';
|
|
7
7
|
import './chunk-OGNNNTKI.js';
|
|
8
8
|
import './chunk-SPNWHKSR.js';
|
|
9
|
-
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, visioPageInsertCommand, visioQuarterTurnCommand, visioRotationShape, visioMovementShape, visioMoveCommands, visioMoveTargets, visioMarqueeBox, visioPageDragDelta, visioMarqueeSelection, 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, 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';
|
|
9
|
+
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, visioMarqueeSelection, 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, 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';
|
|
10
10
|
export { TEXT_SEARCH_LIMITS, compatibilityNotes, compatibilityText, demoDocument, eventKeys, propertyKeys } from 'ooxml-core/visio/ui';
|
|
11
|
-
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, VISIO_SHAPE_DATA_TYPES, visioShapeDataRowName, VISIO_CLIPBOARD_MAGIC, visioThemeVariantColors, visioPageThemeColors, visioBuiltInMaster, VISIO_QUICK_STYLE_COLORS, isVisioBuiltInThemeId, VISIO_SCALE_UNITS } from 'ooxml-core/visio';
|
|
11
|
+
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';
|
|
12
12
|
import { pushRecentColor, normalizePaletteHex } from 'ooxml-core/color';
|
|
13
13
|
import { resolveRotateHandlePlacement, createRotationDrag, snapAngle } from 'ooxml-core/geometry';
|
|
14
14
|
|
|
@@ -1861,7 +1861,7 @@ var text_tool_default = ".viewport[data-tool='text'] {\n cursor: text;\n touch-a
|
|
|
1861
1861
|
var presentation_default = "/* Visio Presentation Mode: the page fitted on a dark backdrop, chrome-free, read only. */\n.presentation {\n position: fixed;\n inset: 0;\n z-index: 2147483000;\n display: grid;\n place-items: center;\n /* Visio presents on a dark backdrop in every theme. */\n background: #111;\n color: rgb(255 255 255 / 0.82);\n outline: none;\n cursor: default;\n}\n.presentation[hidden] {\n display: none;\n}\n.presentation:fullscreen {\n width: 100%;\n height: 100%;\n}\n.presentation-stage {\n position: absolute;\n inset: 2vmin;\n display: grid;\n place-items: center;\n container-type: size;\n}\n.presentation-stage > .paper {\n height: auto;\n max-width: 100%;\n max-height: 100%;\n margin: 0;\n box-shadow: none;\n}\n.presentation-bar {\n position: absolute;\n right: 12px;\n bottom: 12px;\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 2px 4px;\n border-radius: 4px;\n background: rgb(0 0 0 / 0.45);\n font: 12px/1.4 var(--office-font-family, 'Segoe UI', system-ui, sans-serif);\n opacity: 0.35;\n transition: opacity 0.2s;\n}\n.presentation-bar:hover,\n.presentation-bar:focus-within {\n opacity: 1;\n}\n.presentation-bar button {\n display: inline-grid;\n place-items: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: 0;\n border-radius: 3px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n.presentation-bar button:hover:not(:disabled) {\n background: rgb(255 255 255 / 0.16);\n}\n.presentation-bar button:focus-visible {\n outline: 2px solid currentColor;\n outline-offset: -2px;\n}\n.presentation-bar button:disabled {\n opacity: 0.35;\n cursor: default;\n}\n.presentation-page {\n min-width: 6em;\n max-width: 40vw;\n padding: 0 6px;\n overflow: hidden;\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n@media (prefers-reduced-motion: reduce) {\n .presentation-bar {\n transition: none;\n }\n}\n";
|
|
1862
1862
|
|
|
1863
1863
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/insert.css?raw
|
|
1864
|
-
var insert_default = ".link-dialog label,\n.screen-tip-dialog label {\n display: grid;\n gap: 4px;\n min-width: min(360px, 80vw);\n margin: 0 0 12px;\n}\n.link-dialog input,\n.link-dialog select,\n.screen-tip-dialog input {\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.link-dialog [role='alert'],\n.screen-tip-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n";
|
|
1864
|
+
var insert_default = ".link-dialog label,\n.alt-text-dialog label,\n.screen-tip-dialog label {\n display: grid;\n gap: 4px;\n min-width: min(360px, 80vw);\n margin: 0 0 12px;\n}\n.link-dialog input,\n.link-dialog select,\n.alt-text-dialog input,\n.alt-text-dialog textarea,\n.screen-tip-dialog input {\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 font: inherit;\n}\n.alt-text-dialog textarea {\n resize: vertical;\n min-height: 90px;\n}\n.accessibility-dialog [aria-live] {\n max-height: 50vh;\n overflow: auto;\n}\n.accessibility-dialog [aria-live] > button {\n display: block;\n width: 100%;\n padding: 8px;\n text-align: left;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n font: inherit;\n cursor: pointer;\n}\n.link-dialog [role='alert'],\n.alt-text-dialog [role='alert'],\n.screen-tip-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n";
|
|
1865
1865
|
|
|
1866
1866
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/page-setup.css?raw
|
|
1867
1867
|
var page_setup_default = ".page-setup-dialog .page-setup-tabs {\n display: flex;\n flex-wrap: wrap;\n gap: 2px;\n margin: 0 0 12px;\n border-bottom: 1px solid var(--_vv-border);\n}\n.page-setup-dialog [role='tab'] {\n padding: 6px 10px;\n color: inherit;\n font: inherit;\n background: transparent;\n border: 1px solid transparent;\n border-bottom: none;\n border-radius: 3px 3px 0 0;\n cursor: pointer;\n}\n.page-setup-dialog [role='tab'][aria-selected='true'] {\n background: var(--_vv-surface);\n border-color: var(--_vv-border);\n font-weight: 600;\n}\n.page-setup-dialog [role='tabpanel'] {\n display: grid;\n gap: 10px;\n min-width: min(420px, 80vw);\n}\n.page-setup-dialog [role='tabpanel'][hidden] {\n display: none;\n}\n.page-setup-dialog label {\n display: grid;\n grid-template-columns: minmax(130px, 1fr) minmax(150px, 1.4fr);\n align-items: center;\n gap: 12px;\n}\n.page-setup-dialog input {\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.page-setup-dialog .page-setup-hint {\n max-width: 440px;\n margin: 0;\n font-size: 12px;\n}\n.page-setup-dialog [role='alert'] {\n color: var(--office-error, #b00020);\n}\n.paper .page-break {\n fill: none;\n stroke: #7a7a7a;\n stroke-width: 1.25;\n stroke-dasharray: 6 4;\n vector-effect: non-scaling-stroke;\n}\n@media (max-width: 480px) {\n .page-setup-dialog label {\n grid-template-columns: 1fr;\n gap: 5px;\n }\n}\n";
|
|
@@ -3994,10 +3994,16 @@ function renderPage(model, page3, options2 = {}) {
|
|
|
3994
3994
|
);
|
|
3995
3995
|
svg2.setAttribute("viewBox", `0 0 ${page3.width} ${page3.height}`);
|
|
3996
3996
|
svg2.setAttribute("role", options2.static ? "img" : "group");
|
|
3997
|
-
svg2.setAttribute("aria-label", page3.name);
|
|
3997
|
+
svg2.setAttribute("aria-label", page3.accessibilityTitle || page3.name);
|
|
3998
|
+
if (page3.alternativeText) svg2.setAttribute("aria-description", page3.alternativeText);
|
|
3998
3999
|
const title2 = svgElement("title");
|
|
3999
|
-
title2.textContent = page3.name;
|
|
4000
|
+
title2.textContent = page3.accessibilityTitle || page3.name;
|
|
4000
4001
|
svg2.append(title2);
|
|
4002
|
+
if (page3.alternativeText) {
|
|
4003
|
+
const description = svgElement("desc");
|
|
4004
|
+
description.textContent = page3.alternativeText;
|
|
4005
|
+
svg2.append(description);
|
|
4006
|
+
}
|
|
4001
4007
|
const defs = svgElement("defs");
|
|
4002
4008
|
svg2.append(defs);
|
|
4003
4009
|
const root = svgElement("g");
|
|
@@ -4048,11 +4054,20 @@ function drawShape(shape, parent, context, pageId, parentTransform = VISIO_IDENT
|
|
|
4048
4054
|
group2.dataset.pageId = pageId;
|
|
4049
4055
|
group2.setAttribute("role", shape.kind === "group" ? "group" : "button");
|
|
4050
4056
|
group2.setAttribute("tabindex", "-1");
|
|
4051
|
-
group2.setAttribute(
|
|
4057
|
+
group2.setAttribute(
|
|
4058
|
+
"aria-label",
|
|
4059
|
+
shape.accessibilityTitle || shape.alternativeText || shape.text.plainText || shape.name || `Shape ${shape.id}`
|
|
4060
|
+
);
|
|
4061
|
+
if (shape.alternativeText) group2.setAttribute("aria-description", shape.alternativeText);
|
|
4052
4062
|
}
|
|
4053
4063
|
const title2 = svgElement("title");
|
|
4054
|
-
title2.textContent = shape.screenTip || shape.text.plainText || shape.name;
|
|
4064
|
+
title2.textContent = shape.screenTip || shape.accessibilityTitle || shape.text.plainText || shape.name;
|
|
4055
4065
|
group2.append(title2);
|
|
4066
|
+
if (shape.alternativeText) {
|
|
4067
|
+
const description = svgElement("desc");
|
|
4068
|
+
description.textContent = shape.alternativeText;
|
|
4069
|
+
group2.append(description);
|
|
4070
|
+
}
|
|
4056
4071
|
parent.append(group2);
|
|
4057
4072
|
const world = composeVisioTransform(parentTransform, shape.transform);
|
|
4058
4073
|
const own = () => drawOwn(shape, group2, context, world);
|
|
@@ -5199,7 +5214,19 @@ function buildReviewPanel(doc, panel) {
|
|
|
5199
5214
|
id: "check-accessibility",
|
|
5200
5215
|
label: "Check Accessibility",
|
|
5201
5216
|
icon: "check",
|
|
5202
|
-
|
|
5217
|
+
action: review("check-accessibility")
|
|
5218
|
+
}),
|
|
5219
|
+
command(doc, {
|
|
5220
|
+
id: "alt-text",
|
|
5221
|
+
label: "Alt Text",
|
|
5222
|
+
icon: "message",
|
|
5223
|
+
action: review("alt-text")
|
|
5224
|
+
}),
|
|
5225
|
+
command(doc, {
|
|
5226
|
+
id: "page-alt-text",
|
|
5227
|
+
label: "Page Alt Text",
|
|
5228
|
+
icon: "message",
|
|
5229
|
+
action: review("page-alt-text")
|
|
5203
5230
|
})
|
|
5204
5231
|
]),
|
|
5205
5232
|
group(doc, "Language", [
|
|
@@ -11624,9 +11651,15 @@ var InsertDialog = class {
|
|
|
11624
11651
|
for (const spec of specs) {
|
|
11625
11652
|
const label = doc.createElement("label");
|
|
11626
11653
|
label.textContent = spec.label;
|
|
11627
|
-
const field = doc.createElement(
|
|
11654
|
+
const field = doc.createElement(
|
|
11655
|
+
spec.choices ? "select" : spec.multiline ? "textarea" : "input"
|
|
11656
|
+
);
|
|
11628
11657
|
field.name = spec.name;
|
|
11629
11658
|
field.setAttribute("aria-label", spec.label);
|
|
11659
|
+
if (field instanceof HTMLTextAreaElement) {
|
|
11660
|
+
field.maxLength = spec.maxLength ?? 4096;
|
|
11661
|
+
field.rows = 5;
|
|
11662
|
+
}
|
|
11630
11663
|
if (field instanceof HTMLInputElement) {
|
|
11631
11664
|
field.type = spec.input ?? "text";
|
|
11632
11665
|
if (spec.input === "number") field.step = "any";
|
|
@@ -11934,7 +11967,8 @@ var SETUP_TABS = [
|
|
|
11934
11967
|
["print", "Print Setup"],
|
|
11935
11968
|
["size", "Page Size"],
|
|
11936
11969
|
["scale", "Drawing Scale"],
|
|
11937
|
-
["properties", "Page Properties"]
|
|
11970
|
+
["properties", "Page Properties"],
|
|
11971
|
+
["layout", "Layout and Routing"]
|
|
11938
11972
|
];
|
|
11939
11973
|
var UNIT_INCHES = {
|
|
11940
11974
|
IN: 1,
|
|
@@ -12037,6 +12071,43 @@ function createPageSetupDialog(doc) {
|
|
|
12037
12071
|
]),
|
|
12038
12072
|
input("name", "Name", "text"),
|
|
12039
12073
|
select("back-page", "Background", [["", "None"]])
|
|
12074
|
+
],
|
|
12075
|
+
layout: [
|
|
12076
|
+
select("jump-code", "Add line jumps to", [
|
|
12077
|
+
["0", "None"],
|
|
12078
|
+
["1", "Horizontal lines"],
|
|
12079
|
+
["2", "Vertical lines"],
|
|
12080
|
+
["3", "Last routed line"],
|
|
12081
|
+
["4", "Last displayed line"],
|
|
12082
|
+
["5", "First displayed line"]
|
|
12083
|
+
]),
|
|
12084
|
+
select("jump-style", "Line jump style", [
|
|
12085
|
+
["0", "Default (Arc)"],
|
|
12086
|
+
["1", "Arc"],
|
|
12087
|
+
["2", "Gap"],
|
|
12088
|
+
["3", "Square"],
|
|
12089
|
+
["4", "Triangle"],
|
|
12090
|
+
["5", "3 sides"],
|
|
12091
|
+
["6", "4 sides"],
|
|
12092
|
+
["7", "5 sides"],
|
|
12093
|
+
["8", "6 sides"],
|
|
12094
|
+
["9", "7 sides"]
|
|
12095
|
+
]),
|
|
12096
|
+
select("jump-direction-x", "Horizontal jump direction", [
|
|
12097
|
+
["0", "Default"],
|
|
12098
|
+
["1", "Up"],
|
|
12099
|
+
["2", "Down"]
|
|
12100
|
+
]),
|
|
12101
|
+
select("jump-direction-y", "Vertical jump direction", [
|
|
12102
|
+
["0", "Default"],
|
|
12103
|
+
["1", "Left"],
|
|
12104
|
+
["2", "Right"]
|
|
12105
|
+
]),
|
|
12106
|
+
input("jump-size-x", "Horizontal jump size (%)", "number"),
|
|
12107
|
+
input("jump-size-y", "Vertical jump size (%)", "number"),
|
|
12108
|
+
hint(
|
|
12109
|
+
"Connector-specific styles and directions override these page settings. Curved connectors do not show jumps. Last routed uses display order."
|
|
12110
|
+
)
|
|
12040
12111
|
]
|
|
12041
12112
|
};
|
|
12042
12113
|
const tabs = doc.createElement("div");
|
|
@@ -12134,6 +12205,13 @@ var ViewerPageSetupDialog = class {
|
|
|
12134
12205
|
this.#generation = this.controller.documentGeneration;
|
|
12135
12206
|
const setup = page3.pageSetup;
|
|
12136
12207
|
const f = (name) => this.#field(name);
|
|
12208
|
+
const layout = visioPageLayout(page3);
|
|
12209
|
+
f("jump-code").value = String(layout.lineJumpCode);
|
|
12210
|
+
f("jump-style").value = String(layout.lineJumpStyle);
|
|
12211
|
+
f("jump-direction-x").value = String(layout.lineJumpDirectionX ?? 0);
|
|
12212
|
+
f("jump-direction-y").value = String(layout.lineJumpDirectionY ?? 0);
|
|
12213
|
+
f("jump-size-x").value = round((layout.lineJumpFactorX ?? 2 / 3) * 100);
|
|
12214
|
+
f("jump-size-y").value = round((layout.lineJumpFactorY ?? 2 / 3) * 100);
|
|
12137
12215
|
f("paper").value = setup?.paperKind !== void 0 && visioPaperSize(setup.paperKind) ? String(setup.paperKind) : "";
|
|
12138
12216
|
f("print-orientation").value = setup?.printPageOrientation === 1 ? "portrait" : setup?.printPageOrientation === 2 ? "landscape" : "";
|
|
12139
12217
|
const match = visioMatchingPaperSize(page3);
|
|
@@ -12244,6 +12322,29 @@ var ViewerPageSetupDialog = class {
|
|
|
12244
12322
|
if ((orientation === "portrait" || orientation === "landscape") && orientation !== saved2)
|
|
12245
12323
|
print.printOrientation = orientation;
|
|
12246
12324
|
if (Object.keys(print).length > 2) edits.push(print);
|
|
12325
|
+
const layout = visioPageLayout(page3);
|
|
12326
|
+
const jump = { type: "set-page-layout", pageId: page3.id };
|
|
12327
|
+
for (const [field, key] of [
|
|
12328
|
+
["jump-code", "lineJumpCode"],
|
|
12329
|
+
["jump-style", "lineJumpStyle"],
|
|
12330
|
+
["jump-direction-x", "lineJumpDirectionX"],
|
|
12331
|
+
["jump-direction-y", "lineJumpDirectionY"]
|
|
12332
|
+
]) {
|
|
12333
|
+
const value = Number(f(field));
|
|
12334
|
+
if (value !== (layout[key] ?? 0)) jump[key] = value;
|
|
12335
|
+
}
|
|
12336
|
+
for (const [field, key] of [
|
|
12337
|
+
["jump-size-x", "lineJumpFactorX"],
|
|
12338
|
+
["jump-size-y", "lineJumpFactorY"]
|
|
12339
|
+
]) {
|
|
12340
|
+
const raw = f(field).trim();
|
|
12341
|
+
const value = Number(raw) / 100;
|
|
12342
|
+
if (!raw || !Number.isFinite(value) || value < 0 || value > 10)
|
|
12343
|
+
return "Line jump size must be between 0% and 1000% of routing spacing.";
|
|
12344
|
+
if (raw !== round((layout[key] ?? 2 / 3) * 100) && Math.abs(value - (layout[key] ?? 2 / 3)) > 1e-10)
|
|
12345
|
+
jump[key] = value;
|
|
12346
|
+
}
|
|
12347
|
+
if (Object.keys(jump).length > 2) edits.push(jump);
|
|
12247
12348
|
return visioKeepAutoSize(page3, edits);
|
|
12248
12349
|
}
|
|
12249
12350
|
async #apply() {
|
|
@@ -13125,6 +13226,39 @@ var withReflection = (context, next) => ({
|
|
|
13125
13226
|
reflection: { size: 0, transparency: 0, distance: 0, blur: 0, ...reflection(context), ...next }
|
|
13126
13227
|
});
|
|
13127
13228
|
var PANE_FIELDS = [
|
|
13229
|
+
...[
|
|
13230
|
+
[
|
|
13231
|
+
"lineJumpCode",
|
|
13232
|
+
"Add line jumps",
|
|
13233
|
+
["Page default", "Never", "Always", "Other connector jumps", "Neither connector jumps"]
|
|
13234
|
+
],
|
|
13235
|
+
[
|
|
13236
|
+
"lineJumpStyle",
|
|
13237
|
+
"Jump style",
|
|
13238
|
+
[
|
|
13239
|
+
"Page default",
|
|
13240
|
+
"Arc",
|
|
13241
|
+
"Gap",
|
|
13242
|
+
"Square",
|
|
13243
|
+
"2 sides",
|
|
13244
|
+
"3 sides",
|
|
13245
|
+
"4 sides",
|
|
13246
|
+
"5 sides",
|
|
13247
|
+
"6 sides",
|
|
13248
|
+
"7 sides"
|
|
13249
|
+
]
|
|
13250
|
+
],
|
|
13251
|
+
["lineJumpDirectionX", "Horizontal jump direction", ["Page default", "Up", "Down"]],
|
|
13252
|
+
["lineJumpDirectionY", "Vertical jump direction", ["Page default", "Left", "Right"]]
|
|
13253
|
+
].map(([key, label, labels2]) => ({
|
|
13254
|
+
key,
|
|
13255
|
+
label,
|
|
13256
|
+
group: "line",
|
|
13257
|
+
connectorOnly: true,
|
|
13258
|
+
options: labels2.map((label2, value) => ({ value: String(value), label: label2 })),
|
|
13259
|
+
read: (context) => text(style(context, (shape) => shape[key] ?? 0)),
|
|
13260
|
+
patch: (value) => ({ [key]: value })
|
|
13261
|
+
})),
|
|
13128
13262
|
{
|
|
13129
13263
|
key: "fillPattern",
|
|
13130
13264
|
label: "Pattern",
|
|
@@ -13666,8 +13800,15 @@ var ViewerFormatPane = class {
|
|
|
13666
13800
|
view.dash,
|
|
13667
13801
|
common.linePattern === void 0 || common.linePattern === 0 ? "" : String(common.linePattern)
|
|
13668
13802
|
);
|
|
13669
|
-
for (const field of PANE_FIELDS)
|
|
13670
|
-
|
|
13803
|
+
for (const field of PANE_FIELDS) {
|
|
13804
|
+
const input = view.fields.get(field.key);
|
|
13805
|
+
put(input, shapes.length ? field.read(context) : "");
|
|
13806
|
+
if (field.connectorOnly) {
|
|
13807
|
+
const applicable = shapes.length > 0 && shapes.every((shape) => shape.kind === "connector");
|
|
13808
|
+
input.closest("label").hidden = !applicable;
|
|
13809
|
+
input.disabled ||= !applicable;
|
|
13810
|
+
}
|
|
13811
|
+
}
|
|
13671
13812
|
}
|
|
13672
13813
|
};
|
|
13673
13814
|
var PAGE_THREAD = "page";
|
|
@@ -14452,6 +14593,142 @@ var ViewerSubprocess = class {
|
|
|
14452
14593
|
else if (this.link.dialog.open) this.link.busy(state.edit.busy);
|
|
14453
14594
|
}
|
|
14454
14595
|
};
|
|
14596
|
+
var ViewerAccessibility = class {
|
|
14597
|
+
constructor(root, controller, announce) {
|
|
14598
|
+
this.root = root;
|
|
14599
|
+
this.controller = controller;
|
|
14600
|
+
this.announce = announce;
|
|
14601
|
+
this.alt = new InsertDialog(
|
|
14602
|
+
root,
|
|
14603
|
+
"alt-text-dialog",
|
|
14604
|
+
"Alt Text",
|
|
14605
|
+
[
|
|
14606
|
+
{ name: "alt-title", label: "Title" },
|
|
14607
|
+
{ name: "alt-description", label: "Description", multiline: true }
|
|
14608
|
+
],
|
|
14609
|
+
["OK", "Cancel"],
|
|
14610
|
+
(button) => void this.#apply(button)
|
|
14611
|
+
);
|
|
14612
|
+
this.report = new InsertDialog(
|
|
14613
|
+
root,
|
|
14614
|
+
"accessibility-dialog",
|
|
14615
|
+
"Accessibility Checker",
|
|
14616
|
+
[],
|
|
14617
|
+
["Close"],
|
|
14618
|
+
() => this.report.dialog.close()
|
|
14619
|
+
);
|
|
14620
|
+
const scope = root.ownerDocument.createElement("p");
|
|
14621
|
+
scope.textContent = "Checks visible graphics without text or an alternative. Review reading order and color contrast separately.";
|
|
14622
|
+
this.results = root.ownerDocument.createElement("div");
|
|
14623
|
+
this.results.setAttribute("aria-live", "polite");
|
|
14624
|
+
this.report.dialog.prepend(scope, this.results);
|
|
14625
|
+
}
|
|
14626
|
+
root;
|
|
14627
|
+
controller;
|
|
14628
|
+
announce;
|
|
14629
|
+
alt;
|
|
14630
|
+
report;
|
|
14631
|
+
results;
|
|
14632
|
+
#target;
|
|
14633
|
+
#shape(state) {
|
|
14634
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
14635
|
+
if (!page3 || state.selectedShapes.length !== 1 || !state.selectedShape || !visioSelectionIsOnPage(state.selectedShape, page3.id))
|
|
14636
|
+
return;
|
|
14637
|
+
return selectedShape(state.document, state.selectedShape, state.pageIndex);
|
|
14638
|
+
}
|
|
14639
|
+
edit(pageOnly = false) {
|
|
14640
|
+
const state = this.controller.state;
|
|
14641
|
+
const page3 = state.document?.pages[state.pageIndex];
|
|
14642
|
+
const shape = pageOnly ? page3 : this.#shape(state);
|
|
14643
|
+
if (!state.edit.sourceAvailable || state.edit.busy || state.loading || !page3 || !shape) return;
|
|
14644
|
+
this.#target = {
|
|
14645
|
+
pageId: page3.id,
|
|
14646
|
+
...pageOnly ? {} : { shapeId: shape.id },
|
|
14647
|
+
generation: this.controller.documentGeneration
|
|
14648
|
+
};
|
|
14649
|
+
this.alt.fields.get("alt-title").value = shape.accessibilityTitle ?? "";
|
|
14650
|
+
this.alt.fields.get("alt-description").value = shape.alternativeText ?? "";
|
|
14651
|
+
this.alt.error.textContent = "";
|
|
14652
|
+
this.alt.busy(false);
|
|
14653
|
+
this.alt.dialog.setAttribute("heading", pageOnly ? "Page Alt Text" : "Alt Text");
|
|
14654
|
+
this.alt.dialog.show();
|
|
14655
|
+
this.alt.fields.get("alt-description").focus();
|
|
14656
|
+
}
|
|
14657
|
+
check() {
|
|
14658
|
+
const model = this.controller.state.document;
|
|
14659
|
+
if (!model) return;
|
|
14660
|
+
const issues = checkVisioAlternativeText(model);
|
|
14661
|
+
this.results.replaceChildren();
|
|
14662
|
+
const summary = this.root.ownerDocument.createElement("p");
|
|
14663
|
+
summary.textContent = issues.length ? issues.length === 1 ? "1 graphic needs alternative text." : `${issues.length} graphics need alternative text.` : "No missing text alternatives found.";
|
|
14664
|
+
this.results.append(summary);
|
|
14665
|
+
for (const issue of issues) {
|
|
14666
|
+
const button = this.root.ownerDocument.createElement("button");
|
|
14667
|
+
button.type = "button";
|
|
14668
|
+
button.textContent = `${model.pages.find((page3) => page3.id === issue.pageId)?.name}: ${issue.shapeName || `Shape ${issue.shapeId}`}`;
|
|
14669
|
+
button.addEventListener("click", () => {
|
|
14670
|
+
if (this.controller.state.document !== model) return;
|
|
14671
|
+
const index = model.pages.findIndex((page3) => page3.id === issue.pageId);
|
|
14672
|
+
this.controller.setPage(index);
|
|
14673
|
+
this.controller.selectShape({
|
|
14674
|
+
id: issue.shapeId,
|
|
14675
|
+
name: issue.shapeName,
|
|
14676
|
+
pageId: issue.pageId
|
|
14677
|
+
});
|
|
14678
|
+
this.report.dialog.close();
|
|
14679
|
+
this.edit();
|
|
14680
|
+
});
|
|
14681
|
+
this.results.append(button);
|
|
14682
|
+
}
|
|
14683
|
+
this.report.dialog.show();
|
|
14684
|
+
}
|
|
14685
|
+
async #apply(button) {
|
|
14686
|
+
if (button === "Cancel") return this.alt.dialog.close();
|
|
14687
|
+
const target = this.#target;
|
|
14688
|
+
if (!target || !this.alt.dialog.open || target.generation !== this.controller.documentGeneration)
|
|
14689
|
+
return;
|
|
14690
|
+
try {
|
|
14691
|
+
const values = {
|
|
14692
|
+
pageId: target.pageId,
|
|
14693
|
+
title: this.alt.value("alt-title"),
|
|
14694
|
+
description: this.alt.value("alt-description")
|
|
14695
|
+
};
|
|
14696
|
+
await this.controller.applyEdits([
|
|
14697
|
+
target.shapeId === void 0 ? { type: "set-page-alt-text", ...values } : { type: "set-shape-alt-text", shapeId: target.shapeId, ...values }
|
|
14698
|
+
]);
|
|
14699
|
+
if (this.#target === target) this.alt.dialog.close();
|
|
14700
|
+
this.announce("Saved alternative text.");
|
|
14701
|
+
} catch (error) {
|
|
14702
|
+
if (this.alt.dialog.open && this.#target === target && !isEditCancellation(error))
|
|
14703
|
+
this.alt.error.textContent = editErrorMessage(error);
|
|
14704
|
+
}
|
|
14705
|
+
}
|
|
14706
|
+
close() {
|
|
14707
|
+
this.alt.dialog.close();
|
|
14708
|
+
this.report.dialog.close();
|
|
14709
|
+
}
|
|
14710
|
+
render(state) {
|
|
14711
|
+
const editable3 = state.edit.sourceAvailable && !state.loading && !state.edit.busy;
|
|
14712
|
+
const alt = this.root.querySelector(
|
|
14713
|
+
'[command="alt-text"]'
|
|
14714
|
+
);
|
|
14715
|
+
if (alt) alt.disabled = !editable3 || !this.#shape(state);
|
|
14716
|
+
const pageAlt = this.root.querySelector(
|
|
14717
|
+
'[command="page-alt-text"]'
|
|
14718
|
+
);
|
|
14719
|
+
if (pageAlt) pageAlt.disabled = !editable3 || !state.document?.pages[state.pageIndex];
|
|
14720
|
+
const check2 = this.root.querySelector(
|
|
14721
|
+
'[command="check-accessibility"]'
|
|
14722
|
+
);
|
|
14723
|
+
if (check2) check2.disabled = !state.document || state.loading;
|
|
14724
|
+
if (this.alt.dialog.open) {
|
|
14725
|
+
if (!state.edit.sourceAvailable || state.loading || this.#target?.generation !== this.controller.documentGeneration)
|
|
14726
|
+
this.alt.dialog.close();
|
|
14727
|
+
else this.alt.busy(state.edit.busy);
|
|
14728
|
+
}
|
|
14729
|
+
if (state.loading || !state.document) this.report.dialog.close();
|
|
14730
|
+
}
|
|
14731
|
+
};
|
|
14455
14732
|
|
|
14456
14733
|
// src/visio/viewer-review.ts
|
|
14457
14734
|
var ViewerReview = class {
|
|
@@ -14461,14 +14738,22 @@ var ViewerReview = class {
|
|
|
14461
14738
|
this.issues = new ViewerIssues(root, controller, announce);
|
|
14462
14739
|
this.report = new ViewerShapeReport(root, controller, announce);
|
|
14463
14740
|
this.subprocess = new ViewerSubprocess(root, controller, announce, run);
|
|
14741
|
+
this.accessibility = new ViewerAccessibility(root, controller, announce);
|
|
14464
14742
|
}
|
|
14465
14743
|
root;
|
|
14466
14744
|
comments;
|
|
14467
14745
|
issues;
|
|
14468
14746
|
report;
|
|
14469
14747
|
subprocess;
|
|
14748
|
+
accessibility;
|
|
14470
14749
|
run(action2) {
|
|
14471
14750
|
switch (action2.command) {
|
|
14751
|
+
case "check-accessibility":
|
|
14752
|
+
return this.accessibility.check();
|
|
14753
|
+
case "alt-text":
|
|
14754
|
+
return this.accessibility.edit();
|
|
14755
|
+
case "page-alt-text":
|
|
14756
|
+
return this.accessibility.edit(true);
|
|
14472
14757
|
case "new-comment":
|
|
14473
14758
|
case "page-comment":
|
|
14474
14759
|
return this.comments.newComment(action2.command === "page-comment");
|
|
@@ -14516,12 +14801,14 @@ var ViewerReview = class {
|
|
|
14516
14801
|
disposeIssues();
|
|
14517
14802
|
this.report.dispose();
|
|
14518
14803
|
this.subprocess.close();
|
|
14804
|
+
this.accessibility.close();
|
|
14519
14805
|
};
|
|
14520
14806
|
}
|
|
14521
14807
|
render(state) {
|
|
14522
14808
|
this.comments.render(state);
|
|
14523
14809
|
this.issues.render(state);
|
|
14524
14810
|
this.subprocess.render(state);
|
|
14811
|
+
this.accessibility.render(state);
|
|
14525
14812
|
const editable3 = state.edit.sourceAvailable && !state.loading && !state.edit.busy;
|
|
14526
14813
|
const reports = this.root.querySelector(
|
|
14527
14814
|
'[command="shape-reports"]'
|
|
@@ -18467,10 +18754,13 @@ var ViewerCommands = class {
|
|
|
18467
18754
|
return;
|
|
18468
18755
|
void this.#edit(
|
|
18469
18756
|
() => this.host.controller.applyEdits(
|
|
18470
|
-
//
|
|
18757
|
+
// Keep generated graphics and callout leaders with their deleted owners.
|
|
18471
18758
|
visioWithCalloutLeaders(
|
|
18472
18759
|
page3,
|
|
18473
|
-
|
|
18760
|
+
visioWithDataGraphics(
|
|
18761
|
+
page3,
|
|
18762
|
+
shapes.map((shape) => shape.id)
|
|
18763
|
+
)
|
|
18474
18764
|
).map((shapeId) => ({ type: "delete-shape", pageId, shapeId }))
|
|
18475
18765
|
),
|
|
18476
18766
|
shapes.length === 1 ? `Deleted ${shapes[0].name || `shape ${shapes[0].id}`}.` : `Deleted ${shapes.length} shapes.`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
2
2
|
export declare function openShortcutHelp(ctx: EditorContext): Promise<undefined>;
|
|
3
|
-
export declare const SUPPORTED_FEATURES: readonly ['Cell editing with undo and redo', 'Formulas calculated by the built-in calculation engine', 'Number formats', 'Conditional formatting display', 'Tables', 'Charts (display and basic editing)', 'Comments and notes', 'Hyperlinks', 'Data validation', 'Sort and filter', 'Freeze panes'];
|
|
4
|
-
export declare const UNSUPPORTED_FEATURES: readonly ['
|
|
3
|
+
export declare const SUPPORTED_FEATURES: readonly ['Cell editing with undo and redo', 'Formulas calculated by the built-in calculation engine', 'Number formats', 'Conditional formatting display', 'Tables', 'Charts (display and basic editing)', 'Sparklines (create, format and clear)', 'Worksheet-range PivotTables (one row field, optional column field and one value field)', 'Comments and notes', 'Hyperlinks', 'Data validation', 'Sort and filter', 'Freeze panes'];
|
|
4
|
+
export declare const UNSUPPORTED_FEATURES: readonly ['Advanced PivotTable layouts, grouping and external data sources (preserved)', 'Show Formulas', 'Manual calculation', 'Outline (grouping) for columns', 'Password protection hashes', 'Editing threaded comment replies', 'Macros (VBA is kept in the file but never run)', 'Changing the workbook theme', 'Page Layout view'];
|
|
5
5
|
export declare function openFeatureStatus(ctx: EditorContext): Promise<undefined>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type PageSetup, type Worksheet } from 'ooxml-core/xlsx';
|
|
2
|
+
import { type PrintTitleSpan } from 'ooxml-core/xlsx';
|
|
3
|
+
export { headerTab } from './page-header.js';
|
|
2
4
|
import type { EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
5
|
export interface SetupTab {
|
|
4
6
|
panel: HTMLElement;
|
|
@@ -15,8 +17,11 @@ export interface MarginsTab extends SetupTab {
|
|
|
15
17
|
};
|
|
16
18
|
}
|
|
17
19
|
export declare function marginsTab(ctx: EditorContext, setup: PageSetup, ws: Worksheet): MarginsTab;
|
|
18
|
-
export declare function headerTab(ctx: EditorContext, setup: PageSetup): SetupTab;
|
|
19
20
|
export interface SheetTab extends SetupTab {
|
|
21
|
+
titles(): {
|
|
22
|
+
rows?: PrintTitleSpan | undefined;
|
|
23
|
+
columns?: PrintTitleSpan | undefined;
|
|
24
|
+
} | string | undefined;
|
|
20
25
|
gridlines(): boolean;
|
|
21
26
|
headings(): boolean;
|
|
22
27
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type SparklineType } from 'ooxml-core/xlsx';
|
|
2
|
+
import { type EditorContext } from 'ooxml-core/xlsx/ui';
|
|
3
|
+
export declare function openCreateSparklines(ctx: EditorContext, type?: SparklineType): Promise<boolean | undefined>;
|
|
4
|
+
export declare function openSparklineSettings(ctx: EditorContext): Promise<boolean | undefined>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PrintLayout, type Workbook } from 'ooxml-core/xlsx';
|
|
2
|
+
export interface PrintHeaderOptions {
|
|
3
|
+
date?: Date;
|
|
4
|
+
locale?: string;
|
|
5
|
+
fileName?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function printPageHeaders(workbook: Workbook, sheetIndex: number, layout: PrintLayout, page: number, title: string, options: PrintHeaderOptions): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Workbook } from 'ooxml-core/xlsx';
|
|
2
|
+
import { type PrintHeaderOptions } from './print-header.js';
|
|
3
|
+
/** Browser preview and printing use the exact same core page plan. */
|
|
4
|
+
export declare function buildPrintHtml(workbook: Workbook, sheetIndex: number, title: string, options?: PrintHeaderOptions): string;
|
package/dist/xlsx/print.d.ts
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
import { type CellRange, type CellView, type Workbook } from 'ooxml-core/xlsx';
|
|
7
|
-
/** Inline CSS for one cell view. */
|
|
8
|
-
export declare function cellCss(view: CellView): string;
|
|
9
|
-
/** The range a sheet prints: its print area, else its used range (undefined for an empty sheet). */
|
|
10
|
-
export declare function printRange(workbook: Workbook, sheetIndex: number): CellRange | undefined;
|
|
11
|
-
/** A standalone HTML document with the sheet's print range as a table. */
|
|
12
|
-
export declare function buildPrintHtml(workbook: Workbook, sheetIndex: number, title: string): string;
|
|
1
|
+
import type { Workbook } from 'ooxml-core/xlsx';
|
|
2
|
+
export { buildPrintHtml } from './print-pages.js';
|
|
3
|
+
export { cellCss } from './print-cell.js';
|
|
4
|
+
export { printRange } from 'ooxml-core/xlsx';
|
|
13
5
|
/** How long a print frame may stay without `afterprint` before it is removed anyway. */
|
|
14
6
|
export declare const PRINT_FRAME_TIMEOUT_MS = 60000;
|
|
15
7
|
/**
|