semiotic 3.8.0 → 3.8.1

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 (234) hide show
  1. package/CLAUDE.md +12 -9
  2. package/README.md +39 -39
  3. package/ai/dist/mcp-server.js +98 -17
  4. package/ai/schema.json +1 -1
  5. package/ai/surface-manifest.json +3 -2
  6. package/ai/system-prompt.md +3 -2
  7. package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +20 -0
  8. package/dist/components/AccessibleNavTree.d.ts +7 -1
  9. package/dist/components/ai/chartClinicMetadata.generated.d.ts +15 -0
  10. package/dist/components/ai/useNavigationSync.d.ts +17 -2
  11. package/dist/components/chartContainerMobile.d.ts +9 -0
  12. package/dist/components/charts/geo/ChoroplethMap.d.ts +19 -2
  13. package/dist/components/charts/geo/DistanceCartogram.d.ts +14 -2
  14. package/dist/components/charts/geo/FlowMap.d.ts +10 -6
  15. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +14 -2
  16. package/dist/components/charts/index.d.ts +6 -0
  17. package/dist/components/charts/network/ChordDiagram.d.ts +9 -1
  18. package/dist/components/charts/network/ForceDirectedGraph.d.ts +11 -0
  19. package/dist/components/charts/network/SankeyDiagram.d.ts +9 -1
  20. package/dist/components/charts/ordinal/BarChart.d.ts +21 -0
  21. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +11 -0
  22. package/dist/components/charts/ordinal/StackedBarChart.d.ts +11 -0
  23. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +7 -0
  24. package/dist/components/charts/physics/EventDropChart.d.ts +7 -0
  25. package/dist/components/charts/physics/GaltonBoardChart.d.ts +8 -0
  26. package/dist/components/charts/physics/PhysicsCustomChart.d.ts +4 -25
  27. package/dist/components/charts/physics/PhysicsPileChart.d.ts +7 -0
  28. package/dist/components/charts/physics/physicsChartShared.d.ts +17 -1
  29. package/dist/components/charts/physics/physicsCustomLayout.d.ts +32 -0
  30. package/dist/components/charts/shared/AnnotationLabel.d.ts +88 -0
  31. package/dist/components/charts/shared/annotationActivation.d.ts +35 -0
  32. package/dist/components/charts/shared/annotationLabelLayout.d.ts +5 -0
  33. package/dist/components/charts/shared/annotationRules.d.ts +2 -1
  34. package/dist/components/charts/shared/chartSelectionUtils.d.ts +4 -0
  35. package/dist/components/charts/shared/chartSpecCore.d.ts +3 -3
  36. package/dist/components/charts/shared/datumTypes.d.ts +2 -0
  37. package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +2 -0
  38. package/dist/components/charts/shared/formatUtils.d.ts +3 -3
  39. package/dist/components/charts/shared/hatchFill.d.ts +87 -0
  40. package/dist/components/charts/shared/hooks.d.ts +7 -6
  41. package/dist/components/charts/shared/knownChartComponents.d.ts +9 -0
  42. package/dist/components/charts/shared/leastSquaresRegression.d.ts +16 -0
  43. package/dist/components/charts/shared/mergeShapeStyle.d.ts +3 -2
  44. package/dist/components/charts/shared/semanticInteractions.d.ts +42 -0
  45. package/dist/components/charts/shared/sparseArray.d.ts +1 -1
  46. package/dist/components/charts/shared/streamPropsHelpers.d.ts +6 -4
  47. package/dist/components/charts/shared/styleRules.d.ts +205 -0
  48. package/dist/components/charts/shared/tooltipUtils.d.ts +22 -9
  49. package/dist/components/charts/shared/types.d.ts +9 -6
  50. package/dist/components/charts/shared/useAreaSeriesSetup.d.ts +16 -2
  51. package/dist/components/charts/shared/useChartSetup.d.ts +2 -2
  52. package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
  53. package/dist/components/charts/shared/useFrameImperativeHandle.d.ts +1 -2
  54. package/dist/components/charts/shared/useLikertAggregation.d.ts +4 -4
  55. package/dist/components/charts/shared/useOrdinalBrush.d.ts +2 -1
  56. package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +24 -1
  57. package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
  58. package/dist/components/charts/shared/useXYLineStyle.d.ts +10 -0
  59. package/dist/components/charts/shared/useXYPointStyle.d.ts +19 -1
  60. package/dist/components/charts/shared/validateChartData.d.ts +7 -5
  61. package/dist/components/charts/shared/validationMap.d.ts +11 -2
  62. package/dist/components/charts/shared/validationMap.generated.d.ts +6 -0
  63. package/dist/components/charts/shared/withChartWrapper.d.ts +4 -3
  64. package/dist/components/charts/value/targetPresentation.d.ts +22 -0
  65. package/dist/components/charts/value/types.d.ts +5 -6
  66. package/dist/components/charts/xy/AreaChart.d.ts +8 -0
  67. package/dist/components/charts/xy/BubbleChart.d.ts +9 -0
  68. package/dist/components/charts/xy/ConnectedScatterplot.d.ts +7 -0
  69. package/dist/components/charts/xy/DifferenceChart.d.ts +1 -52
  70. package/dist/components/charts/xy/Heatmap.d.ts +2 -2
  71. package/dist/components/charts/xy/LineChart.d.ts +11 -0
  72. package/dist/components/charts/xy/QuadrantChart.d.ts +7 -0
  73. package/dist/components/charts/xy/Scatterplot.d.ts +10 -0
  74. package/dist/components/charts/xy/StackedAreaChart.d.ts +7 -0
  75. package/dist/components/charts/xy/differenceSegments.d.ts +49 -0
  76. package/dist/components/charts/xy/scatterplotMatrixInteractionTypes.d.ts +12 -0
  77. package/dist/components/controls/SentenceFilter.d.ts +97 -0
  78. package/dist/components/data/fromVegaLite.d.ts +19 -9
  79. package/dist/components/rough/createRoughRenderMode.d.ts +46 -0
  80. package/dist/components/semiotic-ai.d.ts +3 -1
  81. package/dist/components/semiotic-controls.d.ts +2 -0
  82. package/dist/components/semiotic-geo.d.ts +4 -0
  83. package/dist/components/semiotic-network.d.ts +4 -0
  84. package/dist/components/semiotic-ordinal.d.ts +6 -0
  85. package/dist/components/semiotic-physics.d.ts +4 -0
  86. package/dist/components/semiotic-rough.d.ts +4 -0
  87. package/dist/components/semiotic-utils-core.d.ts +4 -0
  88. package/dist/components/semiotic-xy.d.ts +4 -0
  89. package/dist/components/semiotic.d.ts +9 -1
  90. package/dist/components/server/optionalImageTypes.d.ts +37 -0
  91. package/dist/components/server/serverChartConfigShared.d.ts +9 -5
  92. package/dist/components/server/serverChartConfigs.d.ts +4 -4
  93. package/dist/components/server/staticAnnotations.d.ts +6 -3
  94. package/dist/components/server/staticLegend.d.ts +1 -1
  95. package/dist/components/server/staticNetwork.d.ts +4 -4
  96. package/dist/components/server/staticSVGChrome.d.ts +2 -2
  97. package/dist/components/store/ObservationStore.d.ts +21 -1
  98. package/dist/components/stream/AccessibleDataTable.d.ts +4 -10
  99. package/dist/components/stream/AriaLiveTooltip.d.ts +9 -0
  100. package/dist/components/stream/CanvasHitTester.d.ts +4 -4
  101. package/dist/components/stream/DataSourceAdapter.d.ts +1 -1
  102. package/dist/components/stream/FrameRuntime.d.ts +57 -0
  103. package/dist/components/stream/GeoParticlePool.d.ts +1 -1
  104. package/dist/components/stream/GeoPipelineStore.d.ts +43 -12
  105. package/dist/components/stream/GeoSVGOverlay.d.ts +64 -0
  106. package/dist/components/stream/NetworkCanvasHitTester.d.ts +2 -1
  107. package/dist/components/stream/NetworkPipelineStore.d.ts +24 -21
  108. package/dist/components/stream/NetworkSSRFrame.d.ts +17 -0
  109. package/dist/components/stream/NetworkSVGOverlay.d.ts +6 -0
  110. package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -2
  111. package/dist/components/stream/OrdinalPipelineStore.d.ts +13 -13
  112. package/dist/components/stream/OrdinalSVGOverlay.d.ts +9 -1
  113. package/dist/components/stream/OrdinalStyleResolver.d.ts +12 -0
  114. package/dist/components/stream/ParticlePool.d.ts +1 -1
  115. package/dist/components/stream/PipelineStore.d.ts +12 -16
  116. package/dist/components/stream/SVGOverlay.d.ts +6 -0
  117. package/dist/components/stream/SceneGraph.d.ts +3 -3
  118. package/dist/components/stream/accessorUtils.d.ts +2 -2
  119. package/dist/components/stream/annotationAccessorResolver.d.ts +2 -2
  120. package/dist/components/stream/frameGraphics.d.ts +4 -0
  121. package/dist/components/stream/frameKeyboardNavigation.d.ts +45 -0
  122. package/dist/components/stream/geoPipelineHelpers.d.ts +3 -3
  123. package/dist/components/stream/geoPipelineUpdateResults.d.ts +34 -0
  124. package/dist/components/stream/geoSceneBuilder.d.ts +16 -0
  125. package/dist/components/stream/geoTypes.d.ts +48 -15
  126. package/dist/components/stream/hitTestUtils.d.ts +2 -2
  127. package/dist/components/stream/hoverUtils.d.ts +4 -2
  128. package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +1 -0
  129. package/dist/components/stream/layouts/hierarchyUtils.d.ts +2 -2
  130. package/dist/components/stream/networkCustomLayoutRunner.d.ts +23 -0
  131. package/dist/components/stream/networkCustomRestyle.d.ts +15 -0
  132. package/dist/components/stream/networkFrameAnimation.d.ts +7 -0
  133. package/dist/components/stream/networkFrameHandleTypes.d.ts +39 -0
  134. package/dist/components/stream/networkFrameObservations.d.ts +15 -0
  135. package/dist/components/stream/networkFramePaint.d.ts +11 -2
  136. package/dist/components/stream/networkInteractionTypes.d.ts +26 -0
  137. package/dist/components/stream/networkPipelineConfig.d.ts +2 -2
  138. package/dist/components/stream/networkPipelineUpdateResults.d.ts +38 -0
  139. package/dist/components/stream/networkTypes.d.ts +37 -56
  140. package/dist/components/stream/ordinalCanvasRenderers.d.ts +2 -2
  141. package/dist/components/stream/ordinalPipelineUpdateResults.d.ts +20 -1
  142. package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -2
  143. package/dist/components/stream/ordinalTypes.d.ts +30 -3
  144. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +2 -0
  145. package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +6 -0
  146. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +21 -6
  147. package/dist/components/stream/physics/physicsFrameObservations.d.ts +19 -0
  148. package/dist/components/stream/physics/physicsFrameSetup.d.ts +4 -0
  149. package/dist/components/stream/physics/physicsPipelineUpdateResults.d.ts +19 -1
  150. package/dist/components/stream/physics/usePhysicsFrameLifecyclePolicy.d.ts +3 -1
  151. package/dist/components/stream/pipelineConfig.d.ts +4 -2
  152. package/dist/components/stream/pipelineDecay.d.ts +2 -2
  153. package/dist/components/stream/pipelinePulse.d.ts +2 -2
  154. package/dist/components/stream/pipelineStoreUpdateResults.d.ts +23 -2
  155. package/dist/components/stream/pipelineTransitions.d.ts +1 -1
  156. package/dist/components/stream/pipelineUpdateContract.d.ts +7 -0
  157. package/dist/components/stream/pipelineUpdateStore.d.ts +21 -0
  158. package/dist/components/stream/renderBackend.d.ts +27 -0
  159. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +15 -1
  160. package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +3 -2
  161. package/dist/components/stream/renderers/networkParticleRenderer.d.ts +1 -1
  162. package/dist/components/stream/sceneRenderBackendTypes.d.ts +28 -0
  163. package/dist/components/stream/sceneRevisionDiagnostics.d.ts +31 -4
  164. package/dist/components/stream/streamSemanticTypes.d.ts +16 -0
  165. package/dist/components/stream/streamThemeTypes.d.ts +14 -0
  166. package/dist/components/stream/svgOverlayUtils.d.ts +10 -0
  167. package/dist/components/stream/test-utils/frameScheduler.d.ts +12 -0
  168. package/dist/components/stream/test-utils/revisionConsumption.d.ts +13 -0
  169. package/dist/components/stream/titleLayout.d.ts +31 -0
  170. package/dist/components/stream/types.d.ts +30 -65
  171. package/dist/components/stream/useCanvasFrameHost.d.ts +71 -0
  172. package/dist/components/stream/useFrame.d.ts +23 -0
  173. package/dist/components/stream/useLegendCategoryEmission.d.ts +3 -3
  174. package/dist/components/stream/useSemanticFrameInteractions.d.ts +22 -0
  175. package/dist/components/stream/useUpdateResultSnapshot.d.ts +7 -0
  176. package/dist/components/stream/xyFrameAxisTypes.d.ts +50 -0
  177. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -5
  178. package/dist/controls.min.js +1 -1
  179. package/dist/controls.module.min.js +1 -1
  180. package/dist/forceLayoutWorker.js +1 -1
  181. package/dist/geo.min.js +1 -1
  182. package/dist/geo.module.min.js +1 -1
  183. package/dist/network.min.js +1 -1
  184. package/dist/network.module.min.js +1 -1
  185. package/dist/ordinal.min.js +1 -1
  186. package/dist/ordinal.module.min.js +1 -1
  187. package/dist/physics.min.js +1 -1
  188. package/dist/physics.module.min.js +1 -1
  189. package/dist/physicsWorker.js +1 -1
  190. package/dist/realtime.min.js +1 -1
  191. package/dist/realtime.module.min.js +1 -1
  192. package/dist/rough.min.js +1 -0
  193. package/dist/rough.module.min.js +1 -0
  194. package/dist/semiotic-ai-core.min.js +1 -1
  195. package/dist/semiotic-ai-core.module.min.js +1 -1
  196. package/dist/semiotic-ai.d.ts +3 -1
  197. package/dist/semiotic-ai.min.js +1 -1
  198. package/dist/semiotic-ai.module.min.js +1 -1
  199. package/dist/semiotic-controls.d.ts +2 -0
  200. package/dist/semiotic-data.min.js +1 -1
  201. package/dist/semiotic-data.module.min.js +1 -1
  202. package/dist/semiotic-experimental.min.js +1 -1
  203. package/dist/semiotic-experimental.module.min.js +1 -1
  204. package/dist/semiotic-geo.d.ts +4 -0
  205. package/dist/semiotic-network.d.ts +4 -0
  206. package/dist/semiotic-ordinal.d.ts +6 -0
  207. package/dist/semiotic-physics.d.ts +4 -0
  208. package/dist/semiotic-realtime-core.min.js +1 -1
  209. package/dist/semiotic-realtime-core.module.min.js +1 -1
  210. package/dist/semiotic-realtime-react.min.js +1 -1
  211. package/dist/semiotic-realtime-react.module.min.js +1 -1
  212. package/dist/semiotic-rough.d.ts +4 -0
  213. package/dist/semiotic-server-edge.min.js +1 -1
  214. package/dist/semiotic-server-edge.module.min.js +1 -1
  215. package/dist/semiotic-server-node.min.js +1 -1
  216. package/dist/semiotic-server-node.module.min.js +1 -1
  217. package/dist/semiotic-utils-core.d.ts +4 -0
  218. package/dist/semiotic-utils-core.min.js +1 -1
  219. package/dist/semiotic-utils-core.module.min.js +1 -1
  220. package/dist/semiotic-utils.min.js +1 -1
  221. package/dist/semiotic-utils.module.min.js +1 -1
  222. package/dist/semiotic-value.min.js +1 -1
  223. package/dist/semiotic-value.module.min.js +1 -1
  224. package/dist/semiotic-xy.d.ts +4 -0
  225. package/dist/semiotic.d.ts +9 -1
  226. package/dist/semiotic.min.js +1 -1
  227. package/dist/semiotic.module.min.js +1 -1
  228. package/dist/server.min.js +1 -1
  229. package/dist/server.module.min.js +1 -1
  230. package/dist/test-utils/capturedFrameProps.d.ts +67 -0
  231. package/dist/test-utils/frameMock.d.ts +12 -9
  232. package/dist/xy.min.js +1 -1
  233. package/dist/xy.module.min.js +1 -1
  234. package/package.json +26 -7
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";var e,r=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(s,{syncPushBuffer:()=>i,useStreamStatus:()=>l,useSyncedPushData:()=>f}),module.exports=(e=s,((e,s,o,a)=>{if(s)for(let o of n(s))u.call(e,o)||void 0===o||r(e,o,{get:()=>s[o],enumerable:!(a=t(s,o))||a.enumerable});return e})(r({},"__esModule",{value:!0}),e));var o=require("react"),a=Symbol("semiotic.useStreamStatus.wrapped");function l(e={}){const{staleThresholdMs:r=5e3,pollIntervalMs:t=1e3}=e,n=(0,o.useRef)(null),[u,s]=(0,o.useState)("idle"),[l,c]=(0,o.useState)(null),i=(0,o.useMemo)(()=>{const e={_frame:null,_origPush:null,_origPushMany:null};return{get current(){return e._frame},set current(r){const t=e._frame;if(t&&t!==r&&e._origPush&&e._origPushMany&&(t.push=e._origPush,t.pushMany=e._origPushMany,delete t[a]),e._frame=r,!r)return e._origPush=null,void(e._origPushMany=null);if(r[a])return;r[a]=!0;const n=r.push,u=r.pushMany,s=n.bind(r),o=u.bind(r);e._origPush=n,e._origPushMany=u,r.push=e=>(f(),s(e)),r.pushMany=e=>(e&&e.length>0&&f(),o(e))}}},[]),f=(0,o.useCallback)(()=>{const e="undefined"!=typeof performance?performance.now():Date.now();n.current=e,c(e),s(e=>"active"===e?e:"active")},[]);return(0,o.useEffect)(()=>{const e=setInterval(()=>{const e=n.current;if(null==e)return;const t=("undefined"!=typeof performance?performance.now():Date.now())-e>r;s(e=>{const r=t?"stale":"active";return e===r?e:r})},t);return()=>clearInterval(e)},[r,t]),{ref:i,status:u,lastPushTime:l}}var c=require("react");function i(e,r,t,n){const u=new Map;t.forEach((e,r)=>{u.set(n?n(e,r):r+"",e)});const s=[];r.forEach((e,r)=>{u.has(r)||s.push(r)}),s.length>0&&e.remove?.(s);const o=[];if(u.forEach((t,n)=>{const u=r.get(n);void 0===u?o.push(t):u!==t&&(e.update?e.update(n,()=>t):(e.remove?.(n),o.push(t)))}),o.length>0)if(e.pushMany)e.pushMany(o);else if(e.push)for(const r of o)e.push(r);return u}function f(e,r,t={}){const{id:n,resetKey:u}=t,s=(0,c.useMemo)(()=>function(e){return null==e?null:"function"==typeof e?(r,t)=>{const n=e(r,t);return null==n?t+"":n+""}:(r,t)=>{const n=r[e];return null==n?t+"":n+""}}(n),[n]),o=(0,c.useRef)({map:new Map,handle:null,resetKey:void 0});(0,c.useEffect)(()=>{const t=e.current;if(!t)return;const n=o.current;n.handle===t&&n.resetKey===u||(t.clear?.(),n.map=new Map,n.handle=t,n.resetKey=u),n.map=i(t,n.map,r,s)},[e,r,s,u])}
2
+ "use strict";var e,r=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(s,{syncPushBuffer:()=>i,useStreamStatus:()=>l,useSyncedPushData:()=>f}),module.exports=(e=s,((e,s,o,a)=>{if(s)for(let o of n(s))u.call(e,o)||void 0===o||r(e,o,{get:()=>s[o],enumerable:!(a=t(s,o))||a.enumerable});return e})(r({},"__esModule",{value:!0}),e));var o=require("react"),a=Symbol("semiotic.useStreamStatus.wrapped");function l(e={}){const{staleThresholdMs:r=5e3,pollIntervalMs:t=1e3}=e,n=(0,o.useRef)(null),[u,s]=(0,o.useState)("idle"),[l,c]=(0,o.useState)(null),i=(0,o.useCallback)(()=>{const e="undefined"!=typeof performance?performance.now():Date.now();n.current=e,c(e),s(e=>"active"===e?e:"active")},[]),f=(0,o.useMemo)(()=>{const e={_frame:null,_origPush:null,_origPushMany:null};return{get current(){return e._frame},set current(r){const t=e._frame;if(t&&t!==r&&e._origPush&&e._origPushMany&&(t.push=e._origPush,t.pushMany=e._origPushMany,delete t[a]),e._frame=r,!r)return e._origPush=null,void(e._origPushMany=null);if(r[a])return;r[a]=!0;const n=r.push,u=r.pushMany,s=n.bind(r),o=u.bind(r);e._origPush=n,e._origPushMany=u,r.push=e=>(i(),s(e)),r.pushMany=e=>(e&&e.length>0&&i(),o(e))}}},[i]);return(0,o.useEffect)(()=>{const e=setInterval(()=>{const e=n.current;if(null==e)return;const t=("undefined"!=typeof performance?performance.now():Date.now())-e>r;s(e=>{const r=t?"stale":"active";return e===r?e:r})},t);return()=>clearInterval(e)},[r,t]),{ref:f,status:u,lastPushTime:l}}var c=require("react");function i(e,r,t,n){const u=new Map;t.forEach((e,r)=>{u.set(n?n(e,r):r+"",e)});const s=[];r.forEach((e,r)=>{u.has(r)||s.push(r)}),s.length>0&&e.remove?.(s);const o=[];if(u.forEach((t,n)=>{const u=r.get(n);void 0===u?o.push(t):u!==t&&(e.update?e.update(n,()=>t):(e.remove?.(n),o.push(t)))}),o.length>0)if(e.pushMany)e.pushMany(o);else if(e.push)for(const r of o)e.push(r);return u}function f(e,r,t={}){const{id:n,resetKey:u}=t,s=(0,c.useMemo)(()=>function(e){return null==e?null:"function"==typeof e?(r,t)=>{const n=e(r,t);return null==n?t+"":n+""}:(r,t)=>{const n=r[e];return null==n?t+"":n+""}}(n),[n]),o=(0,c.useRef)({map:new Map,handle:null,resetKey:void 0});(0,c.useEffect)(()=>{const t=e.current;if(!t)return;const n=o.current;n.handle===t&&n.resetKey===u||(t.clear?.(),n.map=new Map,n.handle=t,n.resetKey=u),n.map=i(t,n.map,r,s)},[e,r,s,u])}
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{useCallback as e,useEffect as n,useMemo as r,useRef as t,useState as u}from"react";var s=Symbol("semiotic.useStreamStatus.wrapped");function o(o={}){const{staleThresholdMs:a=5e3,pollIntervalMs:l=1e3}=o,c=t(null),[i,f]=u("idle"),[h,p]=u(null),m=r(()=>{const e={_frame:null,_origPush:null,_origPushMany:null};return{get current(){return e._frame},set current(n){const r=e._frame;if(r&&r!==n&&e._origPush&&e._origPushMany&&(r.push=e._origPush,r.pushMany=e._origPushMany,delete r[s]),e._frame=n,!n)return e._origPush=null,void(e._origPushMany=null);if(n[s])return;n[s]=!0;const t=n.push,u=n.pushMany,o=t.bind(n),a=u.bind(n);e._origPush=t,e._origPushMany=u,n.push=e=>(d(),o(e)),n.pushMany=e=>(e&&e.length>0&&d(),a(e))}}},[]),d=e(()=>{const e="undefined"!=typeof performance?performance.now():Date.now();c.current=e,p(e),f(e=>"active"===e?e:"active")},[]);return n(()=>{const e=setInterval(()=>{const e=c.current;if(null==e)return;const n=("undefined"!=typeof performance?performance.now():Date.now())-e>a;f(e=>{const r=n?"stale":"active";return e===r?e:r})},l);return()=>clearInterval(e)},[a,l]),{ref:m,status:i,lastPushTime:h}}import{useEffect as a,useMemo as l,useRef as c}from"react";function i(e,n,r,t){const u=new Map;r.forEach((e,n)=>{u.set(t?t(e,n):n+"",e)});const s=[];n.forEach((e,n)=>{u.has(n)||s.push(n)}),s.length>0&&e.remove?.(s);const o=[];if(u.forEach((r,t)=>{const u=n.get(t);void 0===u?o.push(r):u!==r&&(e.update?e.update(t,()=>r):(e.remove?.(t),o.push(r)))}),o.length>0)if(e.pushMany)e.pushMany(o);else if(e.push)for(const n of o)e.push(n);return u}function f(e,n,r={}){const{id:t,resetKey:u}=r,s=l(()=>function(e){return null==e?null:"function"==typeof e?(n,r)=>{const t=e(n,r);return null==t?r+"":t+""}:(n,r)=>{const t=n[e];return null==t?r+"":t+""}}(t),[t]),o=c({map:new Map,handle:null,resetKey:void 0});a(()=>{const r=e.current;if(!r)return;const t=o.current;t.handle===r&&t.resetKey===u||(r.clear?.(),t.map=new Map,t.handle=r,t.resetKey=u),t.map=i(r,t.map,n,s)},[e,n,s,u])}export{i as syncPushBuffer,o as useStreamStatus,f as useSyncedPushData};
2
+ import{useCallback as e,useEffect as n,useMemo as r,useRef as t,useState as u}from"react";var s=Symbol("semiotic.useStreamStatus.wrapped");function o(o={}){const{staleThresholdMs:a=5e3,pollIntervalMs:l=1e3}=o,c=t(null),[i,f]=u("idle"),[h,p]=u(null),m=e(()=>{const e="undefined"!=typeof performance?performance.now():Date.now();c.current=e,p(e),f(e=>"active"===e?e:"active")},[]),d=r(()=>{const e={_frame:null,_origPush:null,_origPushMany:null};return{get current(){return e._frame},set current(n){const r=e._frame;if(r&&r!==n&&e._origPush&&e._origPushMany&&(r.push=e._origPush,r.pushMany=e._origPushMany,delete r[s]),e._frame=n,!n)return e._origPush=null,void(e._origPushMany=null);if(n[s])return;n[s]=!0;const t=n.push,u=n.pushMany,o=t.bind(n),a=u.bind(n);e._origPush=t,e._origPushMany=u,n.push=e=>(m(),o(e)),n.pushMany=e=>(e&&e.length>0&&m(),a(e))}}},[m]);return n(()=>{const e=setInterval(()=>{const e=c.current;if(null==e)return;const n=("undefined"!=typeof performance?performance.now():Date.now())-e>a;f(e=>{const r=n?"stale":"active";return e===r?e:r})},l);return()=>clearInterval(e)},[a,l]),{ref:d,status:i,lastPushTime:h}}import{useEffect as a,useMemo as l,useRef as c}from"react";function i(e,n,r,t){const u=new Map;r.forEach((e,n)=>{u.set(t?t(e,n):n+"",e)});const s=[];n.forEach((e,n)=>{u.has(n)||s.push(n)}),s.length>0&&e.remove?.(s);const o=[];if(u.forEach((r,t)=>{const u=n.get(t);void 0===u?o.push(r):u!==r&&(e.update?e.update(t,()=>r):(e.remove?.(t),o.push(r)))}),o.length>0)if(e.pushMany)e.pushMany(o);else if(e.push)for(const n of o)e.push(n);return u}function f(e,n,r={}){const{id:t,resetKey:u}=r,s=l(()=>function(e){return null==e?null:"function"==typeof e?(n,r)=>{const t=e(n,r);return null==t?r+"":t+""}:(n,r)=>{const t=n[e];return null==t?r+"":t+""}}(t),[t]),o=c({map:new Map,handle:null,resetKey:void 0});a(()=>{const r=e.current;if(!r)return;const t=o.current;t.handle===r&&t.resetKey===u||(r.clear?.(),t.map=new Map,t.handle=r,t.resetKey=u),t.map=i(r,t.map,n,s)},[e,n,s,u])}export{i as syncPushBuffer,o as useStreamStatus,f as useSyncedPushData};
@@ -0,0 +1,4 @@
1
+ /** Optional Rough.js rendering adapter. Import from `semiotic/rough`. */
2
+ export { createRoughRenderMode, stableRoughSeed } from "./components/rough/createRoughRenderMode";
3
+ export type { RoughRenderMode, RoughRenderModeOptions } from "./components/rough/createRoughRenderMode";
4
+ export type { SceneRenderBackend, SceneRenderMode } from "./components/stream/types";