@bendyline/squisq-react 1.3.1 → 1.4.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.
Files changed (215) hide show
  1. package/dist/index.d.ts +766 -35
  2. package/dist/index.js +4793 -33
  3. package/dist/index.js.map +1 -1
  4. package/dist/squisq-player.css +1 -1
  5. package/dist/squisq-player.css.map +1 -1
  6. package/dist/squisq-player.global.js +17 -13
  7. package/dist/squisq-player.global.js.map +1 -1
  8. package/dist/standalone-source.js +1 -1
  9. package/package.json +3 -2
  10. package/src/BlockRenderer.tsx +15 -7
  11. package/src/DocPlayer.tsx +65 -12
  12. package/src/DocProgressBar.tsx +21 -3
  13. package/src/LinearDocView.tsx +11 -197
  14. package/src/MarkdownRenderer.tsx +165 -41
  15. package/src/MediaClipLayer.tsx +135 -0
  16. package/src/__tests__/DocPlayer.test.tsx +51 -0
  17. package/src/__tests__/DocProgressBar.test.tsx +76 -0
  18. package/src/__tests__/MarkdownRenderer.test.tsx +95 -1
  19. package/src/__tests__/PathLayer.test.tsx +73 -0
  20. package/src/__tests__/fillStyle.test.tsx +112 -0
  21. package/src/__tests__/transitionStyles.test.ts +125 -0
  22. package/src/__tests__/useDocPlayback.transition.test.ts +70 -0
  23. package/src/hooks/useAudioSync.ts +14 -1
  24. package/src/hooks/useDocPlayback.ts +81 -100
  25. package/src/hooks/useMediaSchedule.ts +39 -0
  26. package/src/index.ts +7 -0
  27. package/src/layers/ImageLayer.tsx +11 -1
  28. package/src/layers/PathLayer.tsx +146 -0
  29. package/src/layers/ShapeLayer.tsx +27 -5
  30. package/src/layers/TextLayer.tsx +395 -22
  31. package/src/layers/VideoLayer.tsx +16 -9
  32. package/src/layers/index.ts +1 -0
  33. package/src/styles/doc-animations.css +1857 -2
  34. package/src/utils/fillStyle.tsx +148 -0
  35. package/dist/BlockRenderer.d.ts +0 -37
  36. package/dist/BlockRenderer.d.ts.map +0 -1
  37. package/dist/BlockRenderer.js +0 -54
  38. package/dist/BlockRenderer.js.map +0 -1
  39. package/dist/CaptionOverlay.d.ts +0 -33
  40. package/dist/CaptionOverlay.d.ts.map +0 -1
  41. package/dist/CaptionOverlay.js +0 -44
  42. package/dist/CaptionOverlay.js.map +0 -1
  43. package/dist/DocControlsBottom.d.ts +0 -28
  44. package/dist/DocControlsBottom.d.ts.map +0 -1
  45. package/dist/DocControlsBottom.js +0 -27
  46. package/dist/DocControlsBottom.js.map +0 -1
  47. package/dist/DocControlsOverlay.d.ts +0 -28
  48. package/dist/DocControlsOverlay.d.ts.map +0 -1
  49. package/dist/DocControlsOverlay.js +0 -80
  50. package/dist/DocControlsOverlay.js.map +0 -1
  51. package/dist/DocControlsSidebar.d.ts +0 -27
  52. package/dist/DocControlsSidebar.d.ts.map +0 -1
  53. package/dist/DocControlsSidebar.js +0 -10
  54. package/dist/DocControlsSidebar.js.map +0 -1
  55. package/dist/DocControlsSlideshow.d.ts +0 -20
  56. package/dist/DocControlsSlideshow.d.ts.map +0 -1
  57. package/dist/DocControlsSlideshow.js +0 -69
  58. package/dist/DocControlsSlideshow.js.map +0 -1
  59. package/dist/DocPlayer.d.ts +0 -97
  60. package/dist/DocPlayer.d.ts.map +0 -1
  61. package/dist/DocPlayer.js +0 -657
  62. package/dist/DocPlayer.js.map +0 -1
  63. package/dist/DocPlayerWithSidebar.d.ts +0 -41
  64. package/dist/DocPlayerWithSidebar.d.ts.map +0 -1
  65. package/dist/DocPlayerWithSidebar.js +0 -69
  66. package/dist/DocPlayerWithSidebar.js.map +0 -1
  67. package/dist/DocProgressBar.d.ts +0 -31
  68. package/dist/DocProgressBar.d.ts.map +0 -1
  69. package/dist/DocProgressBar.js +0 -122
  70. package/dist/DocProgressBar.js.map +0 -1
  71. package/dist/InlineAudioPlayer.d.ts +0 -15
  72. package/dist/InlineAudioPlayer.d.ts.map +0 -1
  73. package/dist/InlineAudioPlayer.js +0 -22
  74. package/dist/InlineAudioPlayer.js.map +0 -1
  75. package/dist/InlineVideoPlayer.d.ts +0 -21
  76. package/dist/InlineVideoPlayer.d.ts.map +0 -1
  77. package/dist/InlineVideoPlayer.js +0 -29
  78. package/dist/InlineVideoPlayer.js.map +0 -1
  79. package/dist/LinearDocView.d.ts +0 -73
  80. package/dist/LinearDocView.d.ts.map +0 -1
  81. package/dist/LinearDocView.js +0 -451
  82. package/dist/LinearDocView.js.map +0 -1
  83. package/dist/MarkdownRenderer.d.ts +0 -32
  84. package/dist/MarkdownRenderer.d.ts.map +0 -1
  85. package/dist/MarkdownRenderer.js +0 -259
  86. package/dist/MarkdownRenderer.js.map +0 -1
  87. package/dist/SocialCaptionOverlay.d.ts +0 -27
  88. package/dist/SocialCaptionOverlay.d.ts.map +0 -1
  89. package/dist/SocialCaptionOverlay.js +0 -185
  90. package/dist/SocialCaptionOverlay.js.map +0 -1
  91. package/dist/__tests__/BlockRenderer.test.d.ts +0 -2
  92. package/dist/__tests__/BlockRenderer.test.d.ts.map +0 -1
  93. package/dist/__tests__/BlockRenderer.test.js +0 -82
  94. package/dist/__tests__/BlockRenderer.test.js.map +0 -1
  95. package/dist/__tests__/DocControlsSlideshow.test.d.ts +0 -2
  96. package/dist/__tests__/DocControlsSlideshow.test.d.ts.map +0 -1
  97. package/dist/__tests__/DocControlsSlideshow.test.js +0 -89
  98. package/dist/__tests__/DocControlsSlideshow.test.js.map +0 -1
  99. package/dist/__tests__/JsonView.test.d.ts +0 -2
  100. package/dist/__tests__/JsonView.test.d.ts.map +0 -1
  101. package/dist/__tests__/JsonView.test.js +0 -93
  102. package/dist/__tests__/JsonView.test.js.map +0 -1
  103. package/dist/__tests__/LinearDocView.test.d.ts +0 -2
  104. package/dist/__tests__/LinearDocView.test.d.ts.map +0 -1
  105. package/dist/__tests__/LinearDocView.test.js +0 -250
  106. package/dist/__tests__/LinearDocView.test.js.map +0 -1
  107. package/dist/__tests__/MarkdownRenderer.test.d.ts +0 -2
  108. package/dist/__tests__/MarkdownRenderer.test.d.ts.map +0 -1
  109. package/dist/__tests__/MarkdownRenderer.test.js +0 -208
  110. package/dist/__tests__/MarkdownRenderer.test.js.map +0 -1
  111. package/dist/__tests__/TableLayer.test.d.ts +0 -2
  112. package/dist/__tests__/TableLayer.test.d.ts.map +0 -1
  113. package/dist/__tests__/TableLayer.test.js +0 -121
  114. package/dist/__tests__/TableLayer.test.js.map +0 -1
  115. package/dist/__tests__/exports.test.d.ts +0 -2
  116. package/dist/__tests__/exports.test.d.ts.map +0 -1
  117. package/dist/__tests__/exports.test.js +0 -48
  118. package/dist/__tests__/exports.test.js.map +0 -1
  119. package/dist/hooks/AudioProvider.d.ts +0 -71
  120. package/dist/hooks/AudioProvider.d.ts.map +0 -1
  121. package/dist/hooks/AudioProvider.js +0 -52
  122. package/dist/hooks/AudioProvider.js.map +0 -1
  123. package/dist/hooks/MediaContext.d.ts +0 -35
  124. package/dist/hooks/MediaContext.d.ts.map +0 -1
  125. package/dist/hooks/MediaContext.js +0 -72
  126. package/dist/hooks/MediaContext.js.map +0 -1
  127. package/dist/hooks/index.d.ts +0 -6
  128. package/dist/hooks/index.d.ts.map +0 -1
  129. package/dist/hooks/index.js +0 -5
  130. package/dist/hooks/index.js.map +0 -1
  131. package/dist/hooks/useAudioSync.d.ts +0 -18
  132. package/dist/hooks/useAudioSync.d.ts.map +0 -1
  133. package/dist/hooks/useAudioSync.js +0 -340
  134. package/dist/hooks/useAudioSync.js.map +0 -1
  135. package/dist/hooks/useAutoSurface.d.ts +0 -11
  136. package/dist/hooks/useAutoSurface.d.ts.map +0 -1
  137. package/dist/hooks/useAutoSurface.js +0 -24
  138. package/dist/hooks/useAutoSurface.js.map +0 -1
  139. package/dist/hooks/useDocPlayback.d.ts +0 -47
  140. package/dist/hooks/useDocPlayback.d.ts.map +0 -1
  141. package/dist/hooks/useDocPlayback.js +0 -179
  142. package/dist/hooks/useDocPlayback.js.map +0 -1
  143. package/dist/hooks/useViewportOrientation.d.ts +0 -31
  144. package/dist/hooks/useViewportOrientation.d.ts.map +0 -1
  145. package/dist/hooks/useViewportOrientation.js +0 -92
  146. package/dist/hooks/useViewportOrientation.js.map +0 -1
  147. package/dist/index.d.ts.map +0 -1
  148. package/dist/jsonView/JsonView.d.ts +0 -26
  149. package/dist/jsonView/JsonView.d.ts.map +0 -1
  150. package/dist/jsonView/JsonView.js +0 -12
  151. package/dist/jsonView/JsonView.js.map +0 -1
  152. package/dist/jsonView/RenderNode.d.ts +0 -22
  153. package/dist/jsonView/RenderNode.d.ts.map +0 -1
  154. package/dist/jsonView/RenderNode.js +0 -30
  155. package/dist/jsonView/RenderNode.js.map +0 -1
  156. package/dist/jsonView/index.d.ts +0 -3
  157. package/dist/jsonView/index.d.ts.map +0 -1
  158. package/dist/jsonView/index.js +0 -2
  159. package/dist/jsonView/index.js.map +0 -1
  160. package/dist/jsonView/useJsonViewTokens.d.ts +0 -14
  161. package/dist/jsonView/useJsonViewTokens.d.ts.map +0 -1
  162. package/dist/jsonView/useJsonViewTokens.js +0 -34
  163. package/dist/jsonView/useJsonViewTokens.js.map +0 -1
  164. package/dist/jsonView/viewers.d.ts +0 -30
  165. package/dist/jsonView/viewers.d.ts.map +0 -1
  166. package/dist/jsonView/viewers.js +0 -226
  167. package/dist/jsonView/viewers.js.map +0 -1
  168. package/dist/layers/ImageLayer.d.ts +0 -23
  169. package/dist/layers/ImageLayer.d.ts.map +0 -1
  170. package/dist/layers/ImageLayer.js +0 -104
  171. package/dist/layers/ImageLayer.js.map +0 -1
  172. package/dist/layers/MapLayer.d.ts +0 -29
  173. package/dist/layers/MapLayer.d.ts.map +0 -1
  174. package/dist/layers/MapLayer.js +0 -97
  175. package/dist/layers/MapLayer.js.map +0 -1
  176. package/dist/layers/ShapeLayer.d.ts +0 -20
  177. package/dist/layers/ShapeLayer.d.ts.map +0 -1
  178. package/dist/layers/ShapeLayer.js +0 -39
  179. package/dist/layers/ShapeLayer.js.map +0 -1
  180. package/dist/layers/TableLayer.d.ts +0 -23
  181. package/dist/layers/TableLayer.d.ts.map +0 -1
  182. package/dist/layers/TableLayer.js +0 -58
  183. package/dist/layers/TableLayer.js.map +0 -1
  184. package/dist/layers/TextLayer.d.ts +0 -23
  185. package/dist/layers/TextLayer.d.ts.map +0 -1
  186. package/dist/layers/TextLayer.js +0 -126
  187. package/dist/layers/TextLayer.js.map +0 -1
  188. package/dist/layers/VideoLayer.d.ts +0 -40
  189. package/dist/layers/VideoLayer.d.ts.map +0 -1
  190. package/dist/layers/VideoLayer.js +0 -105
  191. package/dist/layers/VideoLayer.js.map +0 -1
  192. package/dist/layers/index.d.ts +0 -6
  193. package/dist/layers/index.d.ts.map +0 -1
  194. package/dist/layers/index.js +0 -6
  195. package/dist/layers/index.js.map +0 -1
  196. package/dist/standalone-entry.d.ts +0 -69
  197. package/dist/standalone-entry.d.ts.map +0 -1
  198. package/dist/standalone-entry.js +0 -185
  199. package/dist/standalone-entry.js.map +0 -1
  200. package/dist/types.d.ts +0 -154
  201. package/dist/types.d.ts.map +0 -1
  202. package/dist/types.js +0 -21
  203. package/dist/types.js.map +0 -1
  204. package/dist/utils/animationUtils.d.ts +0 -8
  205. package/dist/utils/animationUtils.d.ts.map +0 -1
  206. package/dist/utils/animationUtils.js +0 -8
  207. package/dist/utils/animationUtils.js.map +0 -1
  208. package/dist/utils/layerUtils.d.ts +0 -17
  209. package/dist/utils/layerUtils.d.ts.map +0 -1
  210. package/dist/utils/layerUtils.js +0 -37
  211. package/dist/utils/layerUtils.js.map +0 -1
  212. package/dist/utils/mapTileUtils.d.ts +0 -105
  213. package/dist/utils/mapTileUtils.d.ts.map +0 -1
  214. package/dist/utils/mapTileUtils.js +0 -268
  215. package/dist/utils/mapTileUtils.js.map +0 -1
@@ -1,179 +0,0 @@
1
- /**
2
- * useDocPlayback Hook
3
- *
4
- * Manages the playback state for a visual doc, including which block
5
- * is currently active, transition states, and synchronization with audio.
6
- *
7
- * This hook provides:
8
- * - Current block determination based on time
9
- * - Transition tracking (entering/exiting blocks)
10
- * - Manual navigation (next/prev block)
11
- * - Time-based seeking
12
- * - Automatic expansion of template blocks
13
- */
14
- import { useState, useEffect, useMemo, useCallback, useRef } from 'react';
15
- import { getBlockAtTime } from '@bendyline/squisq/schemas';
16
- import { expandDocBlocks, flattenBlocks, isTemplateBlock, VIEWPORT_PRESETS, } from '@bendyline/squisq/doc';
17
- export function useDocPlayback(script, currentTime, viewport = VIEWPORT_PRESETS.landscape, renderMode = false, theme) {
18
- const [transitionState, setTransitionState] = useState({
19
- entering: false,
20
- exiting: false,
21
- previousBlock: null,
22
- });
23
- // Expand any template blocks into full blocks
24
- const blocks = useMemo(() => {
25
- if (!script?.blocks) {
26
- return [];
27
- }
28
- // Flatten nested block hierarchy (markdown-derived docs have children)
29
- const hasChildren = script.blocks.some((b) => b.children && b.children.length > 0);
30
- const flatBlocks = hasChildren ? flattenBlocks(script.blocks) : script.blocks;
31
- // Check if any blocks are templates
32
- const hasTemplates = flatBlocks.some(isTemplateBlock);
33
- if (hasTemplates) {
34
- // Extract audio segment timing for proper block synchronization
35
- const audioSegments = script.audio?.segments?.map((seg) => ({
36
- startTime: seg.startTime,
37
- duration: seg.duration,
38
- }));
39
- // Expand template blocks with audio segment timing, viewport, and persistent layers
40
- const expanded = expandDocBlocks(flatBlocks, {
41
- audioSegments,
42
- viewport,
43
- persistentLayers: script.persistentLayers,
44
- theme,
45
- });
46
- return expanded;
47
- }
48
- // All raw blocks, use as-is
49
- return flatBlocks;
50
- }, [script?.blocks, script?.audio?.segments, script?.persistentLayers, viewport, theme]);
51
- // Find current block based on time
52
- const currentBlock = useMemo(() => getBlockAtTime(blocks, currentTime), [blocks, currentTime]);
53
- const currentBlockIndex = useMemo(() => (currentBlock ? blocks.indexOf(currentBlock) : -1), [blocks, currentBlock]);
54
- // Calculate block-relative time
55
- const blockTime = useMemo(() => {
56
- if (!currentBlock)
57
- return 0;
58
- return Math.max(0, currentTime - currentBlock.startTime);
59
- }, [currentBlock, currentTime]);
60
- // Calculate progress values
61
- const blockProgress = useMemo(() => {
62
- if (!currentBlock || currentBlock.duration === 0)
63
- return 0;
64
- return Math.min(1, blockTime / currentBlock.duration);
65
- }, [currentBlock, blockTime]);
66
- const docProgress = useMemo(() => {
67
- if (!script || script.duration === 0)
68
- return 0;
69
- return Math.min(1, currentTime / script.duration);
70
- }, [script, currentTime]);
71
- // Track block transitions.
72
- // In render mode, transitions are computed from blockTime so they stay
73
- // synchronized with the seekTo timeline. In normal mode, setTimeout drives
74
- // transitions at the browser's real-time clock speed.
75
- const _prevBlockRef = useMemo(() => currentBlock,
76
- // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed on index, not block reference
77
- [currentBlockIndex]);
78
- useEffect(() => {
79
- if (!currentBlock || renderMode)
80
- return;
81
- // When block changes, trigger transition (real-time mode only)
82
- if (transitionState.previousBlock?.id !== currentBlock.id) {
83
- const transition = currentBlock.transition;
84
- const transitionDuration = transition?.duration || 0;
85
- if (transitionDuration > 0) {
86
- // Start transition
87
- setTransitionState({
88
- entering: true,
89
- exiting: true,
90
- previousBlock: transitionState.previousBlock,
91
- });
92
- // End transition after duration
93
- const timer = setTimeout(() => {
94
- setTransitionState({
95
- entering: false,
96
- exiting: false,
97
- previousBlock: currentBlock,
98
- });
99
- }, transitionDuration * 1000);
100
- return () => clearTimeout(timer);
101
- }
102
- else {
103
- // Instant cut
104
- setTransitionState({
105
- entering: false,
106
- exiting: false,
107
- previousBlock: currentBlock,
108
- });
109
- }
110
- }
111
- // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed on currentBlock?.id only; reading transitionState.previousBlock without dep to avoid infinite loop
112
- }, [currentBlock?.id, renderMode]);
113
- // Render mode: track previous block via ref and compute transition from time
114
- const renderPrevBlockRef = useRef(null);
115
- useEffect(() => {
116
- if (!renderMode || !currentBlock)
117
- return;
118
- if (transitionState.previousBlock?.id !== currentBlock.id) {
119
- // Block changed — remember the old block for crossfade
120
- const oldPrev = transitionState.previousBlock;
121
- renderPrevBlockRef.current = oldPrev;
122
- // Store current block as the "last seen" for next transition
123
- setTransitionState((prev) => ({
124
- ...prev,
125
- previousBlock: currentBlock,
126
- }));
127
- }
128
- // eslint-disable-next-line react-hooks/exhaustive-deps -- same pattern: keyed on block identity change
129
- }, [currentBlock?.id, renderMode]);
130
- // In render mode, derive entering/exiting from blockTime
131
- const renderTransitionDuration = currentBlock?.transition?.duration || 0;
132
- const renderIsEntering = renderMode && renderTransitionDuration > 0 && blockTime < renderTransitionDuration;
133
- const renderIsExiting = renderIsEntering && renderPrevBlockRef.current !== null;
134
- // Manual navigation
135
- const goToBlock = useCallback((index) => {
136
- if (!script || index < 0 || index >= blocks.length)
137
- return;
138
- // This would need to be coordinated with seekTo from audio sync
139
- // For now, just return the target block's start time
140
- const targetBlock = blocks[index];
141
- if (targetBlock) {
142
- // Caller should use this time with audio seekTo
143
- return targetBlock.startTime;
144
- }
145
- }, [script, blocks]);
146
- const nextBlock = useCallback(() => {
147
- if (currentBlockIndex < blocks.length - 1) {
148
- return goToBlock(currentBlockIndex + 1);
149
- }
150
- }, [currentBlockIndex, blocks.length, goToBlock]);
151
- const prevBlock = useCallback(() => {
152
- if (currentBlockIndex > 0) {
153
- return goToBlock(currentBlockIndex - 1);
154
- }
155
- }, [currentBlockIndex, goToBlock]);
156
- return {
157
- currentBlock,
158
- currentBlockIndex,
159
- previousBlock: renderMode
160
- ? renderIsExiting
161
- ? renderPrevBlockRef.current
162
- : null
163
- : transitionState.exiting
164
- ? transitionState.previousBlock
165
- : null,
166
- isEntering: renderMode ? renderIsEntering : transitionState.entering,
167
- isExiting: renderMode ? renderIsExiting : transitionState.exiting,
168
- blockTime,
169
- blockProgress,
170
- docProgress,
171
- nextBlock,
172
- prevBlock,
173
- goToBlock,
174
- /** Expanded blocks (templates converted to full blocks with layers) */
175
- blocks,
176
- };
177
- }
178
- export default useDocPlayback;
179
- //# sourceMappingURL=useDocPlayback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDocPlayback.js","sourceRoot":"","sources":["../../src/hooks/useDocPlayback.ts"],"names":[],"m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AAU,EAAE,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ;QACpE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO;QACjE,SAAS;QACT,aAAa;QACb,WAAW;QACX,SAAS;QACT,SAAS;QACT,SAAS;QACT,uEAAuE;QACvE,MAAM;KACP,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
@@ -1,31 +0,0 @@
1
- /**
2
- * useViewportOrientation Hook
3
- *
4
- * Detects the current viewport orientation and returns the appropriate
5
- * VIEWPORT_PRESET for rendering docs. Automatically updates when
6
- * the window is resized.
7
- *
8
- * Thresholds:
9
- * - Portrait: height > width * 1.2 (significantly taller than wide)
10
- * - Square: width and height within 20% of each other
11
- * - Landscape: width > height * 1.2 (significantly wider than tall)
12
- */
13
- import { type ViewportConfig, type ViewportOrientation } from '@bendyline/squisq/doc';
14
- interface UseViewportOrientationResult {
15
- /** Current viewport preset configuration */
16
- viewport: ViewportConfig;
17
- /** Current orientation name */
18
- orientation: ViewportOrientation;
19
- /** Current window dimensions */
20
- windowSize: {
21
- width: number;
22
- height: number;
23
- };
24
- }
25
- /**
26
- * Hook to detect viewport orientation and return appropriate preset.
27
- * Updates automatically when window is resized.
28
- */
29
- export declare function useViewportOrientation(): UseViewportOrientationResult;
30
- export default useViewportOrientation;
31
- //# sourceMappingURL=useViewportOrientation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useViewportOrientation.d.ts","sourceRoot":"","sources":["../../src/hooks/useViewportOrientation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,UAAU,4BAA4B;IACpC,4CAA4C;IAC5C,QAAQ,EAAE,cAAc,CAAC;IACzB,+BAA+B;IAC/B,WAAW,EAAE,mBAAmB,CAAC;IACjC,gCAAgC;IAChC,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/C;AAsCD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,4BAA4B,CA6CrE;AAED,eAAe,sBAAsB,CAAC"}
@@ -1,92 +0,0 @@
1
- /**
2
- * useViewportOrientation Hook
3
- *
4
- * Detects the current viewport orientation and returns the appropriate
5
- * VIEWPORT_PRESET for rendering docs. Automatically updates when
6
- * the window is resized.
7
- *
8
- * Thresholds:
9
- * - Portrait: height > width * 1.2 (significantly taller than wide)
10
- * - Square: width and height within 20% of each other
11
- * - Landscape: width > height * 1.2 (significantly wider than tall)
12
- */
13
- import { useState, useEffect, useMemo } from 'react';
14
- import { VIEWPORT_PRESETS, } from '@bendyline/squisq/doc';
15
- /**
16
- * Determine viewport orientation from window dimensions.
17
- */
18
- function getOrientationFromWindow(width, height) {
19
- const ratio = width / height;
20
- // Use thresholds to determine orientation
21
- // - Ratio > 1.2 = landscape (wider than tall)
22
- // - Ratio < 0.83 (1/1.2) = portrait (taller than wide)
23
- // - Otherwise = square-ish, use landscape for better readability
24
- if (ratio > 1.2) {
25
- return 'landscape';
26
- }
27
- else if (ratio < 0.83) {
28
- return 'portrait';
29
- }
30
- else {
31
- // Near-square viewports: use landscape for better text readability
32
- // Could also use 'square' preset if available and desired
33
- return 'landscape';
34
- }
35
- }
36
- /**
37
- * Get the appropriate viewport preset for an orientation.
38
- */
39
- function getViewportForOrientation(orientation) {
40
- switch (orientation) {
41
- case 'portrait':
42
- return VIEWPORT_PRESETS.portrait;
43
- case 'square':
44
- return VIEWPORT_PRESETS.square;
45
- case 'landscape':
46
- default:
47
- return VIEWPORT_PRESETS.landscape;
48
- }
49
- }
50
- /**
51
- * Hook to detect viewport orientation and return appropriate preset.
52
- * Updates automatically when window is resized.
53
- */
54
- export function useViewportOrientation() {
55
- const [windowSize, setWindowSize] = useState(() => ({
56
- width: typeof window !== 'undefined' ? window.innerWidth : 1920,
57
- height: typeof window !== 'undefined' ? window.innerHeight : 1080,
58
- }));
59
- // Listen for window resize
60
- useEffect(() => {
61
- if (typeof window === 'undefined')
62
- return;
63
- const handleResize = () => {
64
- setWindowSize({
65
- width: window.innerWidth,
66
- height: window.innerHeight,
67
- });
68
- };
69
- // Debounce resize handler to avoid excessive re-renders
70
- let timeoutId;
71
- const debouncedResize = () => {
72
- clearTimeout(timeoutId);
73
- timeoutId = setTimeout(handleResize, 100);
74
- };
75
- window.addEventListener('resize', debouncedResize);
76
- return () => {
77
- window.removeEventListener('resize', debouncedResize);
78
- clearTimeout(timeoutId);
79
- };
80
- }, []);
81
- // Calculate orientation from window size
82
- const orientation = useMemo(() => getOrientationFromWindow(windowSize.width, windowSize.height), [windowSize.width, windowSize.height]);
83
- // Get appropriate viewport preset
84
- const viewport = useMemo(() => getViewportForOrientation(orientation), [orientation]);
85
- return {
86
- viewport,
87
- orientation,
88
- windowSize,
89
- };
90
- }
91
- export default useViewportOrientation;
92
- //# sourceMappingURL=useViewportOrientation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useViewportOrientation.js","sourceRoot":"","sources":["../../src/hooks/useViewportOrientation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EACL,gBAAgB,GAGjB,MAAM,uBAAuB,CAAC;AAW/B;;GAEG;AACH,SAAS,wBAAwB,CAAC,KAAa,EAAE,MAAc;IAC7D,MAAM,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAE7B,0CAA0C;IAC1C,8CAA8C;IAC9C,uDAAuD;IACvD,iEAAiE;IACjE,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC;QAChB,OAAO,WAAW,CAAC;IACrB,CAAC;SAAM,IAAI,KAAK,GAAG,IAAI,EAAE,CAAC;QACxB,OAAO,UAAU,C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B,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGlF,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * <JsonView>
3
- *
4
- * Read-only renderer for any JSON value bound to a JSON Schema (with
5
- * optional Squisq UI hints). Designed to look like a polished settings
6
- * summary or CRM record — not a disabled form. Themable via the
7
- * standard Theme + SurfaceScheme props used elsewhere in Squisq.
8
- */
9
- import type { SquisqAnnotatedSchema } from '@bendyline/squisq/jsonForm';
10
- import type { SurfaceScheme, Theme } from '@bendyline/squisq/schemas';
11
- export interface JsonViewProps {
12
- /** Schema describing the value's shape (with optional `squisq` UI hints). */
13
- schema: SquisqAnnotatedSchema;
14
- /** The value to display. */
15
- value: unknown;
16
- /** Optional theme. Defaults to `DEFAULT_THEME`. */
17
- theme?: Theme;
18
- /** Light/dark surface override; `'auto'` follows `prefers-color-scheme`. */
19
- surface?: SurfaceScheme | 'auto';
20
- /** Padding/gap density. Default: 'comfortable'. */
21
- density?: 'comfortable' | 'compact';
22
- /** Optional CSS class for the outer container. */
23
- className?: string;
24
- }
25
- export declare function JsonView(props: JsonViewProps): import("react/jsx-runtime").JSX.Element;
26
- //# sourceMappingURL=JsonView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JsonView.d.ts","sourceRoot":"","sources":["../../src/jsonView/JsonView.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAItE,MAAM,WAAW,aAAa;IAC5B,6EAA6E;IAC7E,MAAM,EAAE,qBAAqB,CAAC;IAC9B,4BAA4B;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,mDAAmD;IACnD,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,4EAA4E;IAC5E,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IACjC,mDAAmD;IACnD,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAqB5C"}
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useJsonViewTokens } from './useJsonViewTokens';
3
- import { RenderNode } from './RenderNode';
4
- export function JsonView(props) {
5
- const { schema, value, theme, surface, density = 'comfortable', className } = props;
6
- const { style } = useJsonViewTokens(theme, surface);
7
- const cls = 'squisq-json-view' +
8
- (density === 'compact' ? ' squisq-json-view--compact' : '') +
9
- (className ? ` ${className}` : '');
10
- return (_jsx("div", { className: cls, style: style, children: _jsx(RenderNode, { value: value, schema: schema, rootSchema: schema, rootData: value, pointer: "", density: density }) }));
11
- }
12
- //# sourceMappingURL=JsonView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"JsonView.js","sourceRoot":"","sources":["../../src/jsonView/JsonView.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,aAAa,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACpF,MAAM,EAAE,KAAK,EAAE,GAAG,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAEpD,MAAM,GAAG,GACP,kBAAkB;QAClB,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3D,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAErC,OAAO,CACL,cAAK,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,YAC/B,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,KAAK,EACf,OAAO,EAAC,EAAE,EACV,OAAO,EAAE,OAAO,GAChB,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -1,22 +0,0 @@
1
- /**
2
- * Recursive dispatcher: looks at a schema node + value, chooses a
3
- * `ControlKind`, evaluates `hidden` rules, and renders the matching
4
- * read-only viewer.
5
- */
6
- import { type SquisqAnnotatedSchema } from '@bendyline/squisq/jsonForm';
7
- export interface RenderNodeProps {
8
- value: unknown;
9
- schema: SquisqAnnotatedSchema;
10
- rootSchema: SquisqAnnotatedSchema;
11
- rootData: unknown;
12
- pointer: string;
13
- density: 'comfortable' | 'compact';
14
- /**
15
- * When a parent group already wrote its own card chrome (e.g. a
16
- * card-stack item), suppress the nested group's outer title so the
17
- * UI doesn't double up on labels.
18
- */
19
- suppressTopGroupTitle?: boolean;
20
- }
21
- export declare function RenderNode(props: RenderNodeProps): React.ReactElement | null;
22
- //# sourceMappingURL=RenderNode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderNode.d.ts","sourceRoot":"","sources":["../../src/jsonView/RenderNode.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,4BAA4B,CAAC;AAGpC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,qBAAqB,CAAC;IAC9B,UAAU,EAAE,qBAAqB,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAqB5E"}
@@ -1,30 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
3
- * Recursive dispatcher: looks at a schema node + value, chooses a
4
- * `ControlKind`, evaluates `hidden` rules, and renders the matching
5
- * read-only viewer.
6
- */
7
- import { chooseControl, resolveFlag, resolveRef, } from '@bendyline/squisq/jsonForm';
8
- import { VIEWERS } from './viewers';
9
- export function RenderNode(props) {
10
- const resolved = resolveRef(props.schema, props.rootSchema) ?? props.schema;
11
- if (resolveFlag(resolved.squisq?.hidden, props.rootData))
12
- return null;
13
- const kind = chooseControl(resolved);
14
- const Viewer = VIEWERS[kind];
15
- const viewerProps = {
16
- value: props.value,
17
- schema: resolved,
18
- rootSchema: props.rootSchema,
19
- rootData: props.rootData,
20
- pointer: props.pointer,
21
- density: props.density,
22
- };
23
- if (kind === 'group' || kind === 'card') {
24
- // GroupViewer accepts an extra prop that RenderNode forwards.
25
- const Group = Viewer;
26
- return _jsx(Group, { ...viewerProps, suppressTitle: props.suppressTopGroupTitle });
27
- }
28
- return _jsx(Viewer, { ...viewerProps });
29
- }
30
- //# sourceMappingURL=RenderNode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderNode.js","sourceRoot":"","sources":["../../src/jsonView/RenderNode.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,GAEX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,OAAO,EAAoB,MAAM,WAAW,CAAC;AAiBtD,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC;IAE5E,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAEtE,MAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IACrC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,WAAW,GAAgB;QAC/B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC;IACF,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACxC,8DAA8D;QAC9D,MAAM,KAAK,GAAG,MAAwE,CAAC;QACvF,OAAO,KAAC,KAAK,OAAK,WAAW,EAAE,aAAa,EAAE,KAAK,CAAC,qBAAqB,GAAI,CAAC;IAChF,CAAC;IACD,OAAO,KAAC,MAAM,OAAK,WAAW,GAAI,CAAC;AACrC,CAAC"}
@@ -1,3 +0,0 @@
1
- export { JsonView } from './JsonView';
2
- export type { JsonViewProps } from './JsonView';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/jsonView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
@@ -1,2 +0,0 @@
1
- export { JsonView } from './JsonView';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/jsonView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Derive the CSS custom-property bag for `<JsonView>` from a Theme + Surface.
3
- * Mirrors the pattern in LinearDocView so JsonView re-themes consistently
4
- * with the rest of Squisq.
5
- */
6
- import { type SurfaceScheme, type Theme } from '@bendyline/squisq/schemas';
7
- export interface JsonViewTokens {
8
- /** Inline style object to spread onto the root element. */
9
- style: React.CSSProperties;
10
- /** The effective theme (after surface application). */
11
- theme: Theme;
12
- }
13
- export declare function useJsonViewTokens(theme: Theme | undefined, surface: SurfaceScheme | 'auto' | undefined): JsonViewTokens;
14
- //# sourceMappingURL=useJsonViewTokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useJsonViewTokens.d.ts","sourceRoot":"","sources":["../../src/jsonView/useJsonViewTokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,KAAK,EACX,MAAM,2BAA2B,CAAC;AAInC,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,uDAAuD;IACvD,KAAK,EAAE,KAAK,CAAC;CACd;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,GAAG,SAAS,EACxB,OAAO,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,GAC1C,cAAc,CA8BhB"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Derive the CSS custom-property bag for `<JsonView>` from a Theme + Surface.
3
- * Mirrors the pattern in LinearDocView so JsonView re-themes consistently
4
- * with the rest of Squisq.
5
- */
6
- import { useMemo } from 'react';
7
- import { applySurface, resolveFontFamily, } from '@bendyline/squisq/schemas';
8
- import { DEFAULT_THEME } from '@bendyline/squisq/doc';
9
- import { useAutoSurface } from '../hooks/useAutoSurface';
10
- export function useJsonViewTokens(theme, surface) {
11
- const auto = useAutoSurface(surface === 'auto');
12
- const effectiveSurface = surface === 'auto' ? auto : (surface ?? undefined);
13
- return useMemo(() => {
14
- const baseTheme = theme ?? DEFAULT_THEME;
15
- const finalTheme = effectiveSurface ? applySurface(baseTheme, effectiveSurface) : baseTheme;
16
- const titleFont = resolveFontFamily(finalTheme.typography.titleFont, 'system-ui, sans-serif');
17
- const bodyFont = resolveFontFamily(finalTheme.typography.bodyFont, 'system-ui, sans-serif');
18
- const monoFont = resolveFontFamily(finalTheme.typography.monoFont, 'ui-monospace, Consolas, monospace');
19
- const style = {
20
- ['--squisq-json-bg']: finalTheme.colors.background,
21
- ['--squisq-json-text']: finalTheme.colors.text,
22
- ['--squisq-json-muted']: finalTheme.colors.textMuted,
23
- ['--squisq-json-primary']: finalTheme.colors.primary,
24
- ['--squisq-json-accent']: finalTheme.colors.secondary,
25
- ['--squisq-json-border']: `color-mix(in srgb, ${finalTheme.colors.textMuted} 35%, transparent)`,
26
- ['--squisq-json-title-font']: titleFont,
27
- ['--squisq-json-body-font']: bodyFont,
28
- ['--squisq-json-mono-font']: monoFont,
29
- ['--squisq-json-radius']: `${finalTheme.style.borderRadius ?? 8}px`,
30
- };
31
- return { style, theme: finalTheme };
32
- }, [theme, effectiveSurface]);
33
- }
34
- //# sourceMappingURL=useJsonViewTokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useJsonViewTokens.js","sourceRoot":"","sources":["../../src/jsonView/useJsonViewTokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACL,YAAY,EACZ,iBAAiB,GAGlB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AASzD,MAAM,UAAU,iBAAiB,CAC/B,KAAwB,EACx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,QAAQ;YAC/C,CAAC,sBAAgC,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,IAAI;SAC9E,CAAC;QAEF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IACtC,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAChC,CAAC"}
@@ -1,30 +0,0 @@
1
- /**
2
- * Read-only viewer renderers for `<JsonView>`. Each viewer is a small
3
- * pure function that takes a value + schema slice and renders inline.
4
- * Group / card-stack viewers recurse into `RenderNode`.
5
- */
6
- import { type ControlKind, type SquisqAnnotatedSchema } from '@bendyline/squisq/jsonForm';
7
- export interface ViewerProps {
8
- value: unknown;
9
- schema: SquisqAnnotatedSchema;
10
- rootSchema: SquisqAnnotatedSchema;
11
- rootData: unknown;
12
- pointer: string;
13
- density: 'comfortable' | 'compact';
14
- }
15
- export declare function TextViewer({ value }: ViewerProps): import("react/jsx-runtime").JSX.Element;
16
- export declare function MultilineViewer({ value }: ViewerProps): import("react/jsx-runtime").JSX.Element;
17
- export declare function RichTextViewer({ value }: ViewerProps): import("react/jsx-runtime").JSX.Element;
18
- export declare function NumberViewer({ value }: ViewerProps): import("react/jsx-runtime").JSX.Element;
19
- export declare function BooleanViewer({ value }: ViewerProps): import("react/jsx-runtime").JSX.Element;
20
- export declare function EnumViewer({ value, schema }: ViewerProps): import("react/jsx-runtime").JSX.Element;
21
- export declare function ColorViewer({ value }: ViewerProps): import("react/jsx-runtime").JSX.Element;
22
- export declare function DateViewer({ value, schema }: ViewerProps): import("react/jsx-runtime").JSX.Element;
23
- export declare function ChipBinViewer({ value, schema }: ViewerProps): import("react/jsx-runtime").JSX.Element;
24
- export declare function CardStackViewer(props: ViewerProps): import("react/jsx-runtime").JSX.Element;
25
- export declare function GroupViewer(props: ViewerProps & {
26
- suppressTitle?: boolean;
27
- }): import("react/jsx-runtime").JSX.Element;
28
- export declare function TabsViewer(props: ViewerProps): import("react/jsx-runtime").JSX.Element;
29
- export declare const VIEWERS: Record<ControlKind, React.ComponentType<ViewerProps>>;
30
- //# sourceMappingURL=viewers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"viewers.d.ts","sourceRoot":"","sources":["../../src/jsonView/viewers.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC3B,MAAM,4BAA4B,CAAC;AAKpC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,qBAAqB,CAAC;IAC9B,UAAU,EAAE,qBAAqB,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;CACpC;AAID,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CAKhD;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CAKrD;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CAgBpD;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CAKlD;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CAOnD;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,2CAOxD;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CAUjD;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,2CAqBxD;AAID,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,2CAmB3D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,2CA4BjD;AAiBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,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