@splunk/visualizations 28.5.2 → 28.6.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/Area/Area.d.ts.map +1 -1
- package/Area/areaUtils.d.ts +1 -1
- package/Area/areaUtils.d.ts.map +1 -1
- package/Area/config.d.ts.map +1 -1
- package/Area.config.js +93 -25
- package/Area.config.js.map +3 -3
- package/Area.js +708 -319
- package/Area.js.map +4 -4
- package/Bar/Bar.d.ts.map +1 -1
- package/Bar.config.js +81 -24
- package/Bar.config.js.map +3 -3
- package/Bar.js +528 -297
- package/Bar.js.map +4 -4
- package/Bubble.config.js +80 -23
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +375 -208
- package/Bubble.js.map +4 -4
- package/CHANGELOG.external.md +75 -8
- package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts +1 -0
- package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts.map +1 -1
- package/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts +12 -25
- package/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts.map +1 -1
- package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts +11 -4
- package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts.map +1 -1
- package/ChoroplethSvg.js +1133 -253
- package/ChoroplethSvg.js.map +4 -4
- package/Column/Column.d.ts.map +1 -1
- package/Column.config.js +81 -24
- package/Column.config.js.map +3 -3
- package/Column.js +531 -300
- package/Column.js.map +4 -4
- package/Ellipse.config.js +1 -1
- package/Ellipse.config.js.map +2 -2
- package/Ellipse.js +277 -161
- package/Ellipse.js.map +4 -4
- package/Events/config.d.ts.map +1 -1
- package/Events.config.js +13 -3
- package/Events.config.js.map +2 -2
- package/Events.js +330 -194
- package/Events.js.map +4 -4
- package/FillerGauge/FillerGauge.d.ts.map +1 -1
- package/FillerGauge/config.d.ts.map +1 -1
- package/FillerGauge.config.js +76 -24
- package/FillerGauge.config.js.map +2 -2
- package/FillerGauge.js +512 -271
- package/FillerGauge.js.map +4 -4
- package/Image/config.d.ts.map +1 -1
- package/Image.config.js +7 -0
- package/Image.config.js.map +2 -2
- package/Image.js +282 -149
- package/Image.js.map +4 -4
- package/LICENSE +13 -0
- package/Line/Line.d.ts.map +1 -1
- package/Line/config.d.ts.map +1 -1
- package/Line/lineUtils.d.ts.map +1 -1
- package/Line/mockdata/LineData.d.ts +21 -0
- package/Line/mockdata/LineData.d.ts.map +1 -1
- package/Line.config.js +86 -25
- package/Line.config.js.map +3 -3
- package/Line.js +638 -382
- package/Line.js.map +4 -4
- package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts +47 -73
- package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts +11 -2
- package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Graph.d.ts +5 -5
- package/LinkGraph/PureLinkGraph/components/Node.d.ts +2 -2
- package/LinkGraph/PureLinkGraph/components/Nodes.d.ts +2 -2
- package/LinkGraph.js +886 -759
- package/LinkGraph.js.map +4 -4
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/Tooltip.d.ts.map +1 -1
- package/Map/config.d.ts.map +1 -1
- package/Map.config.js +4 -1
- package/Map.config.js.map +2 -2
- package/Map.js +296 -169
- package/Map.js.map +4 -4
- package/Markdown/Markdown.d.ts.map +1 -1
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +283 -157
- package/Markdown.js.map +4 -4
- package/MarkerGauge/MarkerGauge.d.ts +1 -47
- package/MarkerGauge/MarkerGauge.d.ts.map +1 -1
- package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts +22 -68
- package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -1
- package/MarkerGauge/config.d.ts.map +1 -1
- package/MarkerGauge.config.js +75 -23
- package/MarkerGauge.config.js.map +2 -2
- package/MarkerGauge.js +560 -375
- package/MarkerGauge.js.map +4 -4
- package/NetworkGraph/NetworkGraph.d.ts +2 -1
- package/NetworkGraph/NetworkGraph.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
- package/NetworkGraph.config.js.map +2 -2
- package/NetworkGraph.js +628 -434
- package/NetworkGraph.js.map +4 -4
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +288 -172
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/Pie.d.ts.map +1 -1
- package/Pie/pieUtils.d.ts +2 -2
- package/Pie.config.js +74 -22
- package/Pie.config.js.map +2 -2
- package/Pie.js +522 -296
- package/Pie.js.map +4 -4
- package/ProcessTree/ProcessTree.d.ts +21 -0
- package/ProcessTree/ProcessTree.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/PureProcessTree.d.ts +32 -0
- package/ProcessTree/PureProcessTree/PureProcessTree.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/components/DirectionalBytes.d.ts +8 -0
- package/ProcessTree/PureProcessTree/components/DirectionalBytes.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts +44 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts +20 -0
- package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeExpansionState.d.ts +20 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeExpansionState.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts +44 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeLinkOverlay.d.ts +23 -0
- package/ProcessTree/PureProcessTree/hooks/useProcessTreeLinkOverlay.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/mockdata/data.d.ts +235 -0
- package/ProcessTree/PureProcessTree/mockdata/data.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts +9 -0
- package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/utils/processTreeLinkOverlayUtils.d.ts +36 -0
- package/ProcessTree/PureProcessTree/utils/processTreeLinkOverlayUtils.d.ts.map +1 -0
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts +80 -0
- package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts.map +1 -0
- package/ProcessTree/config.d.ts +4 -0
- package/ProcessTree/config.d.ts.map +1 -0
- package/ProcessTree/index.d.ts +3 -0
- package/ProcessTree/index.d.ts.map +1 -0
- package/ProcessTree.config.js +192 -0
- package/ProcessTree.config.js.map +7 -0
- package/ProcessTree.js +5058 -0
- package/ProcessTree.js.map +7 -0
- package/Punchcard/Punchcard.d.ts +1 -5
- package/Punchcard/Punchcard.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/Punchcard.d.ts +28 -32
- package/Punchcard/PurePunchcard/Punchcard.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts +7 -12
- package/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts +14 -19
- package/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts +22 -27
- package/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts +3 -8
- package/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts +9 -14
- package/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts.map +1 -1
- package/Punchcard/PurePunchcard/src/PunchcardRow.d.ts.map +1 -1
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +444 -631
- package/Punchcard.js.map +4 -4
- package/Rectangle.config.js +1 -1
- package/Rectangle.config.js.map +2 -2
- package/Rectangle.js +289 -173
- package/Rectangle.js.map +4 -4
- package/RichText/PureRichText/Editor/EditorPanel.d.ts +20 -0
- package/RichText/PureRichText/Editor/EditorPanel.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/EditorPanelStyles.d.ts +17 -0
- package/RichText/PureRichText/Editor/EditorPanelStyles.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/FontSelector.d.ts +15 -0
- package/RichText/PureRichText/Editor/FontSelector.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/FormatButton.d.ts +23 -0
- package/RichText/PureRichText/Editor/FormatButton.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/editorPanelUtils.d.ts +19 -0
- package/RichText/PureRichText/Editor/editorPanelUtils.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/hooks/useLineSpacing.d.ts +11 -0
- package/RichText/PureRichText/Editor/hooks/useLineSpacing.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts +26 -0
- package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts.map +1 -0
- package/RichText/PureRichText/Editor/index.d.ts +9 -0
- package/RichText/PureRichText/Editor/index.d.ts.map +1 -0
- package/RichText/PureRichText/InnerEditor.d.ts +41 -0
- package/RichText/PureRichText/InnerEditor.d.ts.map +1 -0
- package/RichText/PureRichText/PureRichText.d.ts +19 -0
- package/RichText/PureRichText/PureRichText.d.ts.map +1 -0
- package/RichText/PureRichText/PureRichTextContext.d.ts +64 -0
- package/RichText/PureRichText/PureRichTextContext.d.ts.map +1 -0
- package/RichText/PureRichText/RichTextStyles.d.ts +25 -0
- package/RichText/PureRichText/RichTextStyles.d.ts.map +1 -0
- package/RichText/PureRichText/activeInstance.d.ts +23 -0
- package/RichText/PureRichText/activeInstance.d.ts.map +1 -0
- package/RichText/PureRichText/config.d.ts +17 -0
- package/RichText/PureRichText/config.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/index.d.ts +12 -0
- package/RichText/PureRichText/hooks/index.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useContentSave.d.ts +25 -0
- package/RichText/PureRichText/hooks/useContentSave.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useContentSync.d.ts +28 -0
- package/RichText/PureRichText/hooks/useContentSync.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts +33 -0
- package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useEditModeEffect.d.ts +10 -0
- package/RichText/PureRichText/hooks/useEditModeEffect.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useEditorSetup.d.ts +36 -0
- package/RichText/PureRichText/hooks/useEditorSetup.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useFakeHighlight.d.ts +33 -0
- package/RichText/PureRichText/hooks/useFakeHighlight.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useFocusHandlers.d.ts +35 -0
- package/RichText/PureRichText/hooks/useFocusHandlers.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts +18 -0
- package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useMouseHandlers.d.ts +24 -0
- package/RichText/PureRichText/hooks/useMouseHandlers.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useRichTextState.d.ts +38 -0
- package/RichText/PureRichText/hooks/useRichTextState.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useStepFontSize.d.ts +17 -0
- package/RichText/PureRichText/hooks/useStepFontSize.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts +18 -0
- package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts.map +1 -0
- package/RichText/PureRichText/hooks/useTokenMap.d.ts +45 -0
- package/RichText/PureRichText/hooks/useTokenMap.d.ts.map +1 -0
- package/RichText/PureRichText/index.d.ts +16 -0
- package/RichText/PureRichText/index.d.ts.map +1 -0
- package/RichText/PureRichText/renderers/ElementRenderer.d.ts +8 -0
- package/RichText/PureRichText/renderers/ElementRenderer.d.ts.map +1 -0
- package/RichText/PureRichText/renderers/LeafRenderer.d.ts +8 -0
- package/RichText/PureRichText/renderers/LeafRenderer.d.ts.map +1 -0
- package/RichText/PureRichText/types.d.ts +111 -0
- package/RichText/PureRichText/types.d.ts.map +1 -0
- package/RichText/PureRichText/utils/a11yUtils.d.ts +9 -0
- package/RichText/PureRichText/utils/a11yUtils.d.ts.map +1 -0
- package/RichText/PureRichText/utils/fontSize.d.ts +6 -0
- package/RichText/PureRichText/utils/fontSize.d.ts.map +1 -0
- package/RichText/PureRichText/utils/slateUtils.d.ts +99 -0
- package/RichText/PureRichText/utils/slateUtils.d.ts.map +1 -0
- package/RichText/RichText.d.ts +17 -0
- package/RichText/RichText.d.ts.map +1 -0
- package/RichText/config.d.ts +4 -0
- package/RichText/config.d.ts.map +1 -0
- package/RichText/index.d.ts +7 -0
- package/RichText/index.d.ts.map +1 -0
- package/RichText.config.js +268 -0
- package/RichText.config.js.map +7 -0
- package/RichText.js +7674 -0
- package/RichText.js.map +7 -0
- package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyNode.d.ts +10 -3
- package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyUtils.d.ts +10 -0
- package/Sankey/PureSankey/SankeyUtils.d.ts.map +1 -1
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +562 -290
- package/Sankey.js.map +4 -4
- package/Scatter/Scatter.d.ts.map +1 -1
- package/Scatter.config.js +81 -24
- package/Scatter.config.js.map +3 -3
- package/Scatter.js +528 -297
- package/Scatter.js.map +4 -4
- package/SingleValue/SingleValue.d.ts.map +1 -1
- package/SingleValue/config.d.ts.map +1 -1
- package/SingleValue.config.js +76 -24
- package/SingleValue.config.js.map +2 -2
- package/SingleValue.js +534 -314
- package/SingleValue.js.map +4 -4
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -1
- package/SingleValueIcon/config.d.ts.map +1 -1
- package/SingleValueIcon.config.js +76 -24
- package/SingleValueIcon.config.js.map +2 -2
- package/SingleValueIcon.js +512 -287
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts +0 -8
- package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +1 -1
- package/SingleValueRadial/SingleValueRadial.d.ts.map +1 -1
- package/SingleValueRadial/config.d.ts.map +1 -1
- package/SingleValueRadial.config.js +76 -24
- package/SingleValueRadial.config.js.map +2 -2
- package/SingleValueRadial.js +543 -326
- package/SingleValueRadial.js.map +4 -4
- package/TRELLIS.md +48 -0
- package/Table/PureTable.d.ts +1 -0
- package/Table/PureTable.d.ts.map +1 -1
- package/Table/Table.d.ts.map +1 -1
- package/Table/cells/ArrayCell.d.ts.map +1 -1
- package/Table/config.d.ts.map +1 -1
- package/Table/hooks.d.ts.map +1 -1
- package/Table/tableUtils.d.ts +14 -0
- package/Table/tableUtils.d.ts.map +1 -0
- package/Table.config.js +4 -10
- package/Table.config.js.map +2 -2
- package/Table.js +769 -355
- package/Table.js.map +4 -4
- package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +5 -0
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
- package/Timeline/Timeline.d.ts +2 -0
- package/Timeline/Timeline.d.ts.map +1 -1
- package/Timeline/config.d.ts.map +1 -1
- package/Timeline/mockdata/timelineDataSource.d.ts +34 -0
- package/Timeline/mockdata/timelineDataSource.d.ts.map +1 -1
- package/Timeline.config.js +15 -0
- package/Timeline.config.js.map +2 -2
- package/Timeline.js +348 -186
- package/Timeline.js.map +4 -4
- package/common/Charting.d.ts.map +1 -1
- package/common/Charting.js +50 -28
- package/common/Charting.js.map +2 -2
- package/common/ChartingApi.d.ts +1 -1
- package/common/ChartingApi.d.ts.map +1 -1
- package/common/ChartingApi.js.map +2 -2
- package/common/DocExampleWithVizSandbox.js.map +1 -1
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.d.ts +1 -1
- package/common/SplunkVisualization.d.ts.map +1 -1
- package/common/SplunkVisualization.js +6 -4
- package/common/SplunkVisualization.js.map +2 -2
- package/common/StyledSkipLink.d.ts +2 -0
- package/common/StyledSkipLink.d.ts.map +1 -0
- package/common/StyledSkipLink.js +81 -0
- package/common/StyledSkipLink.js.map +7 -0
- package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
- package/common/TimeSeriesChartWrapper.js +228 -107
- package/common/TimeSeriesChartWrapper.js.map +4 -4
- package/common/chartingUtils.d.ts +32 -6
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +166 -39
- package/common/chartingUtils.js.map +4 -4
- package/common/components/TrellisTitle.d.ts.map +1 -1
- package/common/docUtils.js +1 -1
- package/common/docUtils.js.map +2 -2
- package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
- package/common/editorConfig/AxesChartYGridAndLabels.d.ts.map +1 -1
- package/common/editorConfig/BackgroundColor.d.ts +2 -2
- package/common/editorConfig/TrellisEditors.d.ts +33 -5
- package/common/editorConfig/TrellisEditors.d.ts.map +1 -1
- package/common/hocs/mockdata/trellisData.d.ts +54 -0
- package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
- package/common/hocs/withTrellis.d.ts +9 -0
- package/common/hocs/withTrellis.d.ts.map +1 -1
- package/common/hooks/useSorting.d.ts +2 -2
- package/common/hooks/useSorting.d.ts.map +1 -1
- package/common/shapeUtils.d.ts +1 -1
- package/common/shapeUtils.d.ts.map +1 -1
- package/common/shapeUtils.js.map +2 -2
- package/common/utils/dataUtils.js +2 -1
- package/common/utils/dataUtils.js.map +2 -2
- package/common/utils/focusUtils.d.ts +4 -0
- package/common/utils/focusUtils.d.ts.map +1 -0
- package/common/utils/focusUtils.js +101 -0
- package/common/utils/focusUtils.js.map +7 -0
- package/common/utils/mapUtils.js +2 -6
- package/common/utils/mapUtils.js.map +2 -2
- package/common/utils/singleValueUtils.js +14 -26
- package/common/utils/singleValueUtils.js.map +2 -2
- package/common/utils/trellisUtils.d.ts.map +1 -1
- package/common/utils/trellisUtils.js +76 -70
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/withDashboardViz.d.ts.map +1 -1
- package/common/withDashboardViz.js +276 -151
- package/common/withDashboardViz.js.map +4 -4
- package/package.json +32 -27
- package/LICENSE.md +0 -449
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EditorPanel Component
|
|
3
|
+
*
|
|
4
|
+
* Editor panel toolbar for the Slate.js-based rich text editor.
|
|
5
|
+
* Portals to data-test="editor-purerichtext" in the editor sidebar.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { VerticalAlign } from '../types';
|
|
9
|
+
export interface EditorPanelProps {
|
|
10
|
+
isEditMode: boolean;
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
fontColor?: string;
|
|
13
|
+
fontSize?: number;
|
|
14
|
+
lineHeight?: string;
|
|
15
|
+
verticalAlign?: VerticalAlign;
|
|
16
|
+
onVerticalAlignChange?: (align: VerticalAlign) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const EditorPanel: React.FC<EditorPanelProps>;
|
|
19
|
+
export default EditorPanel;
|
|
20
|
+
//# sourceMappingURL=EditorPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorPanel.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/Editor/EditorPanel.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AA2BxE,OAAO,EAAsC,aAAa,EAAa,MAAM,UAAU,CAAC;AAyCxF,MAAM,WAAW,gBAAgB;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC1D;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAypBlD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const EditorContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const Row: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const ColorRow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const ButtonRow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const LineSpacingWrapper: import("styled-components").StyledComponent<"div", any, import("@splunk/themes").OptionalThemedProps<import("@splunk/themes").AnyTheme>, never>;
|
|
6
|
+
export declare const MixedLabel: import("styled-components").StyledComponent<"div", any, import("@splunk/themes").OptionalThemedProps<import("@splunk/themes").AnyTheme>, never>;
|
|
7
|
+
export declare const MixedColorWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
$isMixed?: boolean;
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const FormatToggleButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@splunk/react-ui/Button").ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>, any, {
|
|
11
|
+
$isActive?: boolean;
|
|
12
|
+
}, never>;
|
|
13
|
+
export declare const AlignmentSection: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
+
export declare const HorizontalAlignmentRadioBar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
|
+
export declare const VerticalAlignmentRadioBar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
|
+
export declare const LinkPopoverContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
//# sourceMappingURL=EditorPanelStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorPanelStyles.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/Editor/EditorPanelStyles.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,oEAO3B,CAAC;AAEF,eAAO,MAAM,GAAG,oEAKf,CAAC;AAEF,eAAO,MAAM,QAAQ,oEAmCpB,CAAC;AAEF,eAAO,MAAM,SAAS,oEAOrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,iJAmB9B,CAAC;AAKF,eAAO,MAAM,UAAU,iJAQtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;eAA2B,OAAO;SAmB/D,CAAC;AAGF,eAAO,MAAM,kBAAkB;gBAAgC,OAAO;SAuBrE,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAI5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,oEAYvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,oEAYrC,CAAC;AAEF,eAAO,MAAM,kBAAkB,oEAM9B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FontSelector Component
|
|
3
|
+
*
|
|
4
|
+
* A font family selector with support for preloaded system fonts.
|
|
5
|
+
* MVP version - web fonts support will be added in future releases.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
interface FontSelectorProps {
|
|
9
|
+
value: string;
|
|
10
|
+
onChange: (fontFamily: string) => void;
|
|
11
|
+
onBeforeChange?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const FontSelector: React.FC<FontSelectorProps>;
|
|
14
|
+
export default FontSelector;
|
|
15
|
+
//# sourceMappingURL=FontSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FontSelector.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/Editor/FontSelector.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAqC3C,UAAU,iBAAiB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAMD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsCpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormatButton Component
|
|
3
|
+
*
|
|
4
|
+
* A styled button for formatting actions in the rich text editor toolbar.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
export interface FormatButtonProps {
|
|
8
|
+
/** Icon to display in the button */
|
|
9
|
+
icon: React.ReactNode;
|
|
10
|
+
/** Whether the format is currently active */
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
/** Click handler */
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
/** Tooltip title */
|
|
15
|
+
title: string;
|
|
16
|
+
/** Accessible label for screen readers */
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
/** Whether the button is disabled */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const FormatButton: React.FC<FormatButtonProps>;
|
|
22
|
+
export default FormatButton;
|
|
23
|
+
//# sourceMappingURL=FormatButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormatButton.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/Editor/FormatButton.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAwC1B,MAAM,WAAW,iBAAiB;IAC9B,oCAAoC;IACpC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2BpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const getEditorPanelTarget: () => Element | null;
|
|
2
|
+
export declare const FONT_SIZE_OPTIONS: readonly [{
|
|
3
|
+
readonly label: "Extra small";
|
|
4
|
+
readonly value: "10";
|
|
5
|
+
}, {
|
|
6
|
+
readonly label: "Small";
|
|
7
|
+
readonly value: "12";
|
|
8
|
+
}, {
|
|
9
|
+
readonly label: "Default";
|
|
10
|
+
readonly value: "14";
|
|
11
|
+
}, {
|
|
12
|
+
readonly label: "Large";
|
|
13
|
+
readonly value: "16";
|
|
14
|
+
}, {
|
|
15
|
+
readonly label: "Extra large";
|
|
16
|
+
readonly value: "20";
|
|
17
|
+
}];
|
|
18
|
+
export declare const getFontSizePreset: (fontSize: number) => string;
|
|
19
|
+
//# sourceMappingURL=editorPanelUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorPanelUtils.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/Editor/editorPanelUtils.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,oBAAoB,QAAO,OAAO,GAAG,IAQjD,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAMpB,CAAC;AAEX,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,KAAG,MAGpD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormatCommand } from '../../types';
|
|
2
|
+
export declare function useLineSpacing(lineHeight: string, displayLineHeight: string | undefined, isLineHeightMixed: boolean, applyFormat: ((command: FormatCommand, value?: string) => void) | undefined, handleFormat: (command: FormatCommand, value?: string) => void, stepLineSpacing?: (delta: number) => void): {
|
|
3
|
+
lineSpacingPercent: number;
|
|
4
|
+
showMixed: boolean;
|
|
5
|
+
handleLineSpacingChange: (_e: unknown, data: {
|
|
6
|
+
value?: number;
|
|
7
|
+
reason?: "input" | "stepButton";
|
|
8
|
+
}) => void;
|
|
9
|
+
handleLineSpacingBlur: () => void;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useLineSpacing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLineSpacing.d.ts","sourceRoot":"","sources":["../../../../src/RichText/PureRichText/Editor/hooks/useLineSpacing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,wBAAgB,cAAc,CAC1B,UAAU,EAAE,MAAM,EAClB,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,iBAAiB,EAAE,OAAO,EAC1B,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,EAC3E,YAAY,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,EAC9D,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;;;kCAyBhC,OAAO,QAAQ;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAA;KAAE;;EA8C9E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface UseLinkHandlersParams {
|
|
2
|
+
isInLink: (() => boolean) | undefined;
|
|
3
|
+
getLinkInfo: (() => {
|
|
4
|
+
text: string;
|
|
5
|
+
url: string;
|
|
6
|
+
} | null) | undefined;
|
|
7
|
+
createOrUpdateLink: ((url: string, text?: string) => void) | undefined;
|
|
8
|
+
removeLink: (() => void) | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function useLinkHandlers(handlers: UseLinkHandlersParams): {
|
|
11
|
+
linkIsActive: boolean;
|
|
12
|
+
linkPopoverOpen: boolean;
|
|
13
|
+
linkPopoverRef: import("react").MutableRefObject<HTMLDivElement>;
|
|
14
|
+
linkText: string;
|
|
15
|
+
linkUrl: string;
|
|
16
|
+
linkButtonRef: import("react").MutableRefObject<HTMLButtonElement>;
|
|
17
|
+
setLinkText: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
18
|
+
setLinkUrl: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
19
|
+
handleLinkButtonClick: () => void;
|
|
20
|
+
handleLinkPopoverClose: () => void;
|
|
21
|
+
handleLinkSave: () => void;
|
|
22
|
+
handleLinkRemove: () => void;
|
|
23
|
+
handleLinkKeyDown: (e: React.KeyboardEvent) => void;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=useLinkHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLinkHandlers.d.ts","sourceRoot":"","sources":["../../../../src/RichText/PureRichText/Editor/hooks/useLinkHandlers.ts"],"names":[],"mappings":"AAOA,UAAU,qBAAqB;IAC3B,QAAQ,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,CAAC;IACtC,WAAW,EAAE,CAAC,MAAM;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACtE,kBAAkB,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACvE,UAAU,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACxC;AAGD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,qBAAqB;;;;;;;;;;;;;2BAyDnD,KAAK,CAAC,aAAa;EAwD9B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PureRichText Toolbar Components
|
|
3
|
+
*/
|
|
4
|
+
export { FormatButton } from './FormatButton';
|
|
5
|
+
export type { FormatButtonProps } from './FormatButton';
|
|
6
|
+
export { FontSelector } from './FontSelector';
|
|
7
|
+
export { EditorPanel } from './EditorPanel';
|
|
8
|
+
export type { EditorPanelProps } from './EditorPanel';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/Editor/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InnerEditor - Slate editor wrapper with all editing hooks.
|
|
3
|
+
*
|
|
4
|
+
* Handles: editor setup, content sync, keyboard shortcuts, focus/blur,
|
|
5
|
+
* mouse events, fake highlight, font size stepping, and edit mode transitions.
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Descendant, Editor } from 'slate';
|
|
9
|
+
import type { RichTextStateResult } from './hooks/useRichTextState';
|
|
10
|
+
export interface InnerEditorProps {
|
|
11
|
+
initialValue: Descendant[];
|
|
12
|
+
richTextContent: string;
|
|
13
|
+
isEditMode: boolean;
|
|
14
|
+
isTextEditing: boolean;
|
|
15
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
16
|
+
defaultTextStyle: {
|
|
17
|
+
color?: string;
|
|
18
|
+
backgroundColor?: string;
|
|
19
|
+
fontSize?: string;
|
|
20
|
+
fontFamily?: string;
|
|
21
|
+
lineHeight?: string;
|
|
22
|
+
bold?: boolean;
|
|
23
|
+
italic?: boolean;
|
|
24
|
+
underline?: boolean;
|
|
25
|
+
strikethrough?: boolean;
|
|
26
|
+
};
|
|
27
|
+
onContentChange: (html: string, immediate?: boolean) => void;
|
|
28
|
+
onFocusGained?: (editable: HTMLDivElement | null, editor: Editor | null) => void;
|
|
29
|
+
onFocusLost?: () => void;
|
|
30
|
+
/** Consolidated text-editing lifecycle from useRichTextState. */
|
|
31
|
+
richTextState?: Partial<RichTextStateResult>;
|
|
32
|
+
onEditorReady?: (editor: Editor) => void;
|
|
33
|
+
updateActiveStylesRef?: React.MutableRefObject<(() => void) | null>;
|
|
34
|
+
clearFakeHighlightRef?: React.MutableRefObject<(() => void) | null>;
|
|
35
|
+
/** Set by useContentSave; checked to detect round-trips and skip tree resets. */
|
|
36
|
+
recentSavesRef?: React.MutableRefObject<Set<string>>;
|
|
37
|
+
/** Callback for screenreader announcements on format changes. */
|
|
38
|
+
onAnnouncement?: (message: string) => void;
|
|
39
|
+
}
|
|
40
|
+
export declare const InnerEditor: React.FC<InnerEditorProps>;
|
|
41
|
+
//# sourceMappingURL=InnerEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InnerEditor.d.ts","sourceRoot":"","sources":["../../src/RichText/PureRichText/InnerEditor.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAc,MAAM,OAAO,CAAC;AAevD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC7B,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,gBAAgB,EAAE;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,aAAa,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;IACF,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7D,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjF,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,iEAAiE;IACjE,aAAa,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC7C,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,qBAAqB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACpE,qBAAqB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACpE,iFAAiF;IACjF,cAAc,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACrD,iEAAiE;IACjE,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8UlD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PureRichText - Slate.js based rich text visualization
|
|
3
|
+
*
|
|
4
|
+
* A production-ready rich text editor component with full formatting support.
|
|
5
|
+
* Uses Slate.js for robust text editing capabilities.
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { PureRichTextProps } from './types';
|
|
9
|
+
import { createElementRenderer } from './renderers/ElementRenderer';
|
|
10
|
+
import { Leaf } from './renderers/LeafRenderer';
|
|
11
|
+
import { getFontSizeInPx } from './utils/fontSize';
|
|
12
|
+
declare const PureRichText: React.ForwardRefExoticComponent<PureRichTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Leaf, createElementRenderer, getFontSizeInPx };
|
|
14
|
+
export { InnerEditor } from './InnerEditor';
|
|
15
|
+
export type { InnerEditorProps } from './InnerEditor';
|
|
16
|
+
export type { PureRichTextProps };
|
|
17
|
+
export { PureRichText as PureRichTextPure };
|
|
18
|
+
export default PureRichText;
|
|
19
|
+
//# sourceMappingURL=PureRichText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PureRichText.d.ts","sourceRoot":"","sources":["../../src/RichText/PureRichText/PureRichText.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,EAAoC,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAcnD,QAAA,MAAM,YAAY,0FAmchB,CAAC;AAKH,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,eAAe,EAAE,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,CAAC;AAC5C,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PureRichText Context - Simplified
|
|
3
|
+
*
|
|
4
|
+
* activeTextStyles: active > user defaults > system defaults
|
|
5
|
+
* - Starts with user defaults || system defaults
|
|
6
|
+
* - Updates when cursor moves or user makes changes
|
|
7
|
+
* - Reset button restores to user defaults
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { Editor } from 'slate';
|
|
11
|
+
import { TextStyles, FormatCommand } from './types';
|
|
12
|
+
type LinkInfo = {
|
|
13
|
+
url: string;
|
|
14
|
+
text: string;
|
|
15
|
+
};
|
|
16
|
+
export type ActiveTextStyles = TextStyles & {
|
|
17
|
+
isMixed?: {
|
|
18
|
+
color?: boolean;
|
|
19
|
+
backgroundColor?: boolean;
|
|
20
|
+
fontSize?: boolean;
|
|
21
|
+
fontFamily?: boolean;
|
|
22
|
+
lineHeight?: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export interface PureRichTextContextValue {
|
|
26
|
+
activeTextStyles: ActiveTextStyles;
|
|
27
|
+
userDefaultStyles: TextStyles;
|
|
28
|
+
editor: Editor | null;
|
|
29
|
+
setEditor: (editor: Editor) => void;
|
|
30
|
+
updateActiveStyles: (isContentChange?: boolean) => void;
|
|
31
|
+
saveSelection: () => void;
|
|
32
|
+
applyFormat: (command: FormatCommand, value?: string) => void;
|
|
33
|
+
resetToDefault: () => void;
|
|
34
|
+
stepFontSize: (delta: number) => void;
|
|
35
|
+
registerStepFontSize: (fn: (delta: number) => void) => void;
|
|
36
|
+
stepLineSpacing: (delta: number) => void;
|
|
37
|
+
registerStepLineSpacing: (fn: (delta: number) => void) => void;
|
|
38
|
+
/** Register callback invoked after each applyFormat with the post-format selection. */
|
|
39
|
+
registerOnFormatApplied: (fn: (selection: Editor['selection']) => void) => void;
|
|
40
|
+
/** Register callback for screenreader announcements on format changes. */
|
|
41
|
+
registerAnnouncement: (fn: (message: string) => void) => void;
|
|
42
|
+
openLinkPopover: () => void;
|
|
43
|
+
registerOpenLinkPopover: (fn: () => void) => void;
|
|
44
|
+
isInLink: () => boolean;
|
|
45
|
+
getLinkInfo: () => LinkInfo | null;
|
|
46
|
+
createOrUpdateLink: (url: string, text?: string) => void;
|
|
47
|
+
removeLink: () => void;
|
|
48
|
+
}
|
|
49
|
+
export declare function usePureRichText(): PureRichTextContextValue;
|
|
50
|
+
export declare function usePureRichTextOptional(): PureRichTextContextValue | null;
|
|
51
|
+
interface PureRichTextProviderProps {
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
defaultColor?: string;
|
|
54
|
+
defaultBackgroundColor?: string;
|
|
55
|
+
defaultFontFamily?: string;
|
|
56
|
+
defaultFontSize?: string;
|
|
57
|
+
defaultBold?: boolean;
|
|
58
|
+
defaultItalic?: boolean;
|
|
59
|
+
defaultUnderline?: boolean;
|
|
60
|
+
defaultStrikethrough?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare function PureRichTextProvider({ children, defaultColor, defaultBackgroundColor, defaultFontFamily, defaultFontSize, defaultBold, defaultItalic, defaultUnderline, defaultStrikethrough, }: Readonly<PureRichTextProviderProps>): JSX.Element;
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=PureRichTextContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PureRichTextContext.d.ts","sourceRoot":"","sources":["../../src/RichText/PureRichText/PureRichTextContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAuF,MAAM,OAAO,CAAC;AAC5G,OAAO,EAAE,MAAM,EAAoD,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,UAAU,EAAuB,aAAa,EAAE,MAAM,SAAS,CAAC;AAgBzE,KAAK,QAAQ,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAI9C,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IACxC,OAAO,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC;CACL,CAAC;AAEF,MAAM,WAAW,wBAAwB;IAErC,gBAAgB,EAAE,gBAAgB,CAAC;IAGnC,iBAAiB,EAAE,UAAU,CAAC;IAG9B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAIpC,kBAAkB,EAAE,CAAC,eAAe,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAGxD,aAAa,EAAE,MAAM,IAAI,CAAC;IAG1B,WAAW,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;IAC5D,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,uBAAuB,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;IAC/D,uFAAuF;IACvF,uBAAuB,EAAE,CAAC,EAAE,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,KAAK,IAAI,KAAK,IAAI,CAAC;IAChF,0EAA0E;IAC1E,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;IAG9D,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,uBAAuB,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,WAAW,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC;IACnC,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B;AAID,wBAAgB,eAAe,IAAI,wBAAwB,CAM1D;AAED,wBAAgB,uBAAuB,IAAI,wBAAwB,GAAG,IAAI,CAEzE;AAED,UAAU,yBAAyB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,wBAAgB,oBAAoB,CAAC,EACjC,QAAQ,EACR,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,oBAAoB,GACvB,EAAE,QAAQ,CAAC,yBAAyB,CAAC,GAAG,GAAG,CAAC,OAAO,CAkdnD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { VerticalAlign } from './types';
|
|
2
|
+
export declare const PureRichTextContainer: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
$backgroundColor?: string;
|
|
4
|
+
$verticalAlign?: VerticalAlign;
|
|
5
|
+
$borderColor?: string;
|
|
6
|
+
$borderWidth?: number;
|
|
7
|
+
$borderStyle?: string;
|
|
8
|
+
$borderRadius?: number;
|
|
9
|
+
$padding: [number, number, number, number];
|
|
10
|
+
$isTextEditing?: boolean;
|
|
11
|
+
$hasEventHandlers?: boolean;
|
|
12
|
+
}, never>;
|
|
13
|
+
/**
|
|
14
|
+
* Skip-link styled drilldown button shown when consumer has bound a richtext.click handler.
|
|
15
|
+
* Mirrors the Markdown viz pattern so screen-reader / keyboard users can reach the click action.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DrilldownButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@splunk/react-ui/Button").ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>, any, import("@splunk/themes").OptionalThemedProps<import("@splunk/themes").AnyTheme>, never>;
|
|
18
|
+
export declare const EditorWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
19
|
+
$isEditMode: boolean;
|
|
20
|
+
$isTextEditing: boolean;
|
|
21
|
+
$lineHeight?: string;
|
|
22
|
+
}, never>;
|
|
23
|
+
/** Visually hidden live region for screenreader announcements. */
|
|
24
|
+
export declare const LiveRegion: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
25
|
+
//# sourceMappingURL=RichTextStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextStyles.d.ts","sourceRoot":"","sources":["../../src/RichText/PureRichText/RichTextStyles.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,qBAAqB;uBACX,MAAM;qBACR,aAAa;mBACf,MAAM;mBACN,MAAM;mBACN,MAAM;oBACL,MAAM;cACZ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;qBACzB,OAAO;wBACJ,OAAO;SAqC9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,2SAQ3B,CAAC;AAEF,eAAO,MAAM,aAAa;iBACT,OAAO;oBACJ,OAAO;kBACT,MAAM;SA+DvB,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,UAAU,oEAUtB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module-level tracker for the currently active (focused) PureRichText instance.
|
|
3
|
+
*
|
|
4
|
+
* Kept in a separate file so both PureRichText.tsx and EditorPanel.tsx can import
|
|
5
|
+
* from it without creating a circular dependency.
|
|
6
|
+
*/
|
|
7
|
+
import { Editor } from 'slate';
|
|
8
|
+
export declare function registerActiveRichText(id: string, editable: HTMLDivElement | null, editor: Editor | null): void;
|
|
9
|
+
export declare function clearActiveRichText(id: string): void;
|
|
10
|
+
export declare function getActiveRichTextId(): string | null;
|
|
11
|
+
export declare function getActiveSlateEditor(): Editor | null;
|
|
12
|
+
/**
|
|
13
|
+
* Restore focus and caret on the active Slate editor.
|
|
14
|
+
* Uses ReactEditor.focus() which properly restores both DOM focus and the
|
|
15
|
+
* Slate selection into window.getSelection(), making the caret visible again.
|
|
16
|
+
*/
|
|
17
|
+
export declare function focusActiveEditable(): void;
|
|
18
|
+
export declare function subscribeActiveRichText(callback: () => void): () => void;
|
|
19
|
+
export declare function setSuppressBlurDeactivation(value: boolean): void;
|
|
20
|
+
export declare function isSuppressBlurDeactivation(): boolean;
|
|
21
|
+
export declare function setMouseSelecting(value: boolean): void;
|
|
22
|
+
export declare function isMouseSelecting(): boolean;
|
|
23
|
+
//# sourceMappingURL=activeInstance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activeInstance.d.ts","sourceRoot":"","sources":["../../src/RichText/PureRichText/activeInstance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAQ/B,wBAAgB,sBAAsB,CAClC,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,cAAc,GAAG,IAAI,EAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,GACtB,IAAI,CAKN;AAED,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAOpD;AAED,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAEnD;AAED,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAU1C;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAGxE;AAMD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEhE;AACD,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD;AAKD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEtD;AACD,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PureRichText Visualization Configuration
|
|
3
|
+
*
|
|
4
|
+
* Defines the visualization metadata, options schema, and editor configuration.
|
|
5
|
+
*/
|
|
6
|
+
import { VizConfig } from '../../common/interfaces/VizConfig';
|
|
7
|
+
/**
|
|
8
|
+
* Theme-aware defaults
|
|
9
|
+
*/
|
|
10
|
+
declare const themes: {
|
|
11
|
+
defaultFontColor: (props: any) => import("@splunk/themes").InterpolationResult<import("@splunk/themes").AnyTheme, object>;
|
|
12
|
+
defaultBackgroundColor: () => string;
|
|
13
|
+
};
|
|
14
|
+
export { themes };
|
|
15
|
+
declare const _default: VizConfig;
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/RichText/PureRichText/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AA6B9D;;GAEG;AACH,QAAA,MAAM,MAAM;8BACkB,GAAG;;CAShC,CAAC;AAkKF,OAAO,EAAE,MAAM,EAAE,CAAC;;AAClB,wBAAqC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { useFakeHighlight, pointToAbsOffset, absOffsetToPoint } from './useFakeHighlight';
|
|
2
|
+
export type { AbsRange, FakeHighlightResult } from './useFakeHighlight';
|
|
3
|
+
export { useEditorSetup, useInitialMarks, isEditorEmpty, applyInitialMarks } from './useEditorSetup';
|
|
4
|
+
export { useContentSync } from './useContentSync';
|
|
5
|
+
export { useKeyboardShortcuts } from './useKeyboardShortcuts';
|
|
6
|
+
export { useStepFontSize } from './useStepFontSize';
|
|
7
|
+
export { useFocusHandlers } from './useFocusHandlers';
|
|
8
|
+
export { useMouseHandlers } from './useMouseHandlers';
|
|
9
|
+
export { useEditModeEffect } from './useEditModeEffect';
|
|
10
|
+
export { useRichTextState } from './useRichTextState';
|
|
11
|
+
export type { RichTextStateResult } from './useRichTextState';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,YAAY,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useContentSave - Synchronous content save with smart typing batches.
|
|
3
|
+
*
|
|
4
|
+
* Replaces useDebouncedSave. Key differences:
|
|
5
|
+
* - Format and structural changes (Enter, Delete, bold, alignment) save immediately
|
|
6
|
+
* - Typing batches with a short idle timer so undo reverts a chunk, not one char
|
|
7
|
+
* - Token restoration before every save
|
|
8
|
+
* - recentSavesRef (Set) for round-trip detection in useContentSync
|
|
9
|
+
*/
|
|
10
|
+
interface ContentSaveArgs {
|
|
11
|
+
richTextContent: string;
|
|
12
|
+
onOptionsChange?: (options: Record<string, unknown>) => void;
|
|
13
|
+
restoreTokensInHtml: (html: string) => string;
|
|
14
|
+
}
|
|
15
|
+
interface ContentSaveResult {
|
|
16
|
+
/** Called by useContentSync on every content change. immediate=true skips batching. */
|
|
17
|
+
handleContentChange: (html: string, immediate?: boolean) => void;
|
|
18
|
+
/** Flush any pending batched typing content (blur, unmount). */
|
|
19
|
+
flushPendingChanges: () => void;
|
|
20
|
+
/** Tracks recently saved HTML values for round-trip detection. */
|
|
21
|
+
recentSavesRef: React.MutableRefObject<Set<string>>;
|
|
22
|
+
}
|
|
23
|
+
export declare function useContentSave({ richTextContent, onOptionsChange, restoreTokensInHtml, }: ContentSaveArgs): ContentSaveResult;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=useContentSave.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContentSave.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/hooks/useContentSave.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,UAAU,eAAe;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAC7D,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACjD;AAED,UAAU,iBAAiB;IACvB,uFAAuF;IACvF,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,gEAAgE;IAChE,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,kEAAkE;IAClE,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;CACvD;AAKD,wBAAgB,cAAc,CAAC,EAC3B,eAAe,EACf,eAAe,EACf,mBAAmB,GACtB,EAAE,eAAe,GAAG,iBAAiB,CA0FrC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useContentSync - Manages editor value state, external content syncing,
|
|
3
|
+
* and the onChange handler with history tracking.
|
|
4
|
+
*/
|
|
5
|
+
import { Descendant, Editor } from 'slate';
|
|
6
|
+
import type { AbsRange } from './useFakeHighlight';
|
|
7
|
+
interface ContentSyncArgs {
|
|
8
|
+
editor: Editor;
|
|
9
|
+
initialValue: Descendant[];
|
|
10
|
+
richTextContent: string;
|
|
11
|
+
onContentChange: (html: string, immediate?: boolean) => void;
|
|
12
|
+
updateActiveStyles: (isContentChange?: boolean) => void;
|
|
13
|
+
updateFakeHighlightAbs: (abs: AbsRange | null) => void;
|
|
14
|
+
fakeHighlightAbsRef: React.MutableRefObject<AbsRange | null>;
|
|
15
|
+
hasFocusRef: React.MutableRefObject<boolean>;
|
|
16
|
+
lastSelectionRef: React.MutableRefObject<Editor['selection']>;
|
|
17
|
+
/** Set by useContentSave; checked to detect round-trips and skip tree resets. */
|
|
18
|
+
recentSavesRef?: React.MutableRefObject<Set<string>>;
|
|
19
|
+
/** When true, accept the next external content change even if the editor has focus (e.g. Cmd+Z undo). */
|
|
20
|
+
forceNextSyncRef?: React.MutableRefObject<boolean>;
|
|
21
|
+
}
|
|
22
|
+
interface ContentSyncResult {
|
|
23
|
+
value: Descendant[];
|
|
24
|
+
handleChange: (newValue: Descendant[]) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function useContentSync({ editor, initialValue, richTextContent, onContentChange, updateActiveStyles, updateFakeHighlightAbs, fakeHighlightAbsRef, hasFocusRef, lastSelectionRef, recentSavesRef, forceNextSyncRef, }: ContentSyncArgs): ContentSyncResult;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=useContentSync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContentSync.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/hooks/useContentSync.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAqD,MAAM,OAAO,CAAC;AAE9F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAiDnD,UAAU,eAAe;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7D,kBAAkB,EAAE,CAAC,eAAe,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,sBAAsB,EAAE,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,mBAAmB,EAAE,KAAK,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC7D,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC7C,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAC9D,iFAAiF;IACjF,cAAc,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACrD,yGAAyG;IACzG,gBAAgB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACtD;AAED,UAAU,iBAAiB;IACvB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,YAAY,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;CAClD;AAsCD,wBAAgB,cAAc,CAAC,EAC3B,MAAM,EACN,YAAY,EACZ,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACnB,EAAE,eAAe,GAAG,iBAAiB,CAmIrC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useDashboardKeyboardNav - Document-level keyboard navigation for PureRichText.
|
|
3
|
+
*
|
|
4
|
+
* Handles: Tab/Shift+Tab skip-link behavior, Escape from sidebar,
|
|
5
|
+
* Enter-to-edit activation, skip-link activation, focus-out deselection,
|
|
6
|
+
* and viz-item selection observation.
|
|
7
|
+
*
|
|
8
|
+
* See keyboard reference sections D and E in the component knowledge base.
|
|
9
|
+
*/
|
|
10
|
+
import { Editor } from 'slate';
|
|
11
|
+
interface DashboardKeyboardNavArgs {
|
|
12
|
+
isEditMode: boolean;
|
|
13
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
14
|
+
instanceId: string;
|
|
15
|
+
slateEditorRef: React.MutableRefObject<Editor | null>;
|
|
16
|
+
isTextEditingRef: React.MutableRefObject<boolean>;
|
|
17
|
+
wasTextEditingRef: React.MutableRefObject<boolean>;
|
|
18
|
+
clearFakeHighlightRef: React.MutableRefObject<(() => void) | null>;
|
|
19
|
+
updateActiveStylesFnRef: React.MutableRefObject<(() => void) | null>;
|
|
20
|
+
activateTextEditing: () => void;
|
|
21
|
+
richTextState: {
|
|
22
|
+
deactivateTextEditing: () => void;
|
|
23
|
+
getPreEditSelection: () => Editor['selection'];
|
|
24
|
+
returnFromConfigPanel: () => void;
|
|
25
|
+
clearWasTextEditing: () => void;
|
|
26
|
+
};
|
|
27
|
+
dashboardCoreApi: {
|
|
28
|
+
updateSelectedItems: (items?: unknown[]) => void;
|
|
29
|
+
} | null;
|
|
30
|
+
}
|
|
31
|
+
export declare function useDashboardKeyboardNav(args: DashboardKeyboardNavArgs): void;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=useDashboardKeyboardNav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDashboardKeyboardNav.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/hooks/useDashboardKeyboardNav.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,MAAM,EAAc,MAAM,OAAO,CAAC;AAK3C,UAAU,wBAAwB;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtD,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClD,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnD,qBAAqB,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACnE,uBAAuB,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACrE,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,aAAa,EAAE;QACX,qBAAqB,EAAE,MAAM,IAAI,CAAC;QAClC,mBAAmB,EAAE,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC;QAC/C,qBAAqB,EAAE,MAAM,IAAI,CAAC;QAClC,mBAAmB,EAAE,MAAM,IAAI,CAAC;KACnC,CAAC;IACF,gBAAgB,EAAE;QACd,mBAAmB,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;KACpD,GAAG,IAAI,CAAC;CACZ;AAiTD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,wBAAwB,GAAG,IAAI,CAY5E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useEditModeEffect - Handles transitions out of edit mode.
|
|
3
|
+
*
|
|
4
|
+
* When leaving edit mode: deselects and blurs.
|
|
5
|
+
* Text editing is NOT auto-activated on edit mode entry; the user must
|
|
6
|
+
* explicitly press Enter.
|
|
7
|
+
*/
|
|
8
|
+
import { Editor } from 'slate';
|
|
9
|
+
export declare function useEditModeEffect(editor: Editor, editableRef: React.RefObject<HTMLDivElement | null>, isEditMode: boolean): void;
|
|
10
|
+
//# sourceMappingURL=useEditModeEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditModeEffect.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/hooks/useEditModeEffect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EACnD,UAAU,EAAE,OAAO,GACpB,IAAI,CAYN"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useEditorSetup - Creates and configures the Slate editor instance.
|
|
3
|
+
*
|
|
4
|
+
* Handles: inline links, markdown autoformat, empty list-item Enter,
|
|
5
|
+
* and stale selection recovery on onChange.
|
|
6
|
+
*/
|
|
7
|
+
import { Editor } from 'slate';
|
|
8
|
+
/** Returns true if the editor contains a single empty paragraph. */
|
|
9
|
+
export declare function isEditorEmpty(e: Editor): boolean;
|
|
10
|
+
/** Apply defaultTextStyle marks so the first typed character inherits them. */
|
|
11
|
+
export declare function applyInitialMarks(e: Editor, style: {
|
|
12
|
+
color?: string;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
fontSize?: string;
|
|
15
|
+
fontFamily?: string;
|
|
16
|
+
bold?: boolean;
|
|
17
|
+
italic?: boolean;
|
|
18
|
+
underline?: boolean;
|
|
19
|
+
strikethrough?: boolean;
|
|
20
|
+
}): void;
|
|
21
|
+
interface DefaultTextStyleRef {
|
|
22
|
+
current: {
|
|
23
|
+
color?: string;
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
fontSize?: string;
|
|
26
|
+
fontFamily?: string;
|
|
27
|
+
bold?: boolean;
|
|
28
|
+
italic?: boolean;
|
|
29
|
+
underline?: boolean;
|
|
30
|
+
strikethrough?: boolean;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare function useEditorSetup(defaultTextStyleRef: DefaultTextStyleRef): Editor;
|
|
34
|
+
export declare function useInitialMarks(editor: Editor, isEditMode: boolean, defaultTextStyle: DefaultTextStyleRef['current']): void;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=useEditorSetup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditorSetup.d.ts","sourceRoot":"","sources":["../../../src/RichText/PureRichText/hooks/useEditorSetup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAgB,MAAM,EAA8D,MAAM,OAAO,CAAC;AA0BzG,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAMhD;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAC7B,CAAC,EAAE,MAAM,EACT,KAAK,EAAE;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,GACF,IAAI,CASN;AAED,UAAU,mBAAmB;IACzB,OAAO,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,aAAa,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;CACL;AA2cD,wBAAgB,cAAc,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,MAAM,CA8B/E;AAED,wBAAgB,eAAe,CAC3B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,OAAO,EACnB,gBAAgB,EAAE,mBAAmB,CAAC,SAAS,CAAC,GACjD,IAAI,CAWN"}
|