@neta-art/cohub 8.23.0 → 9.0.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 (159) hide show
  1. package/dist/board/animation.d.ts +57 -181
  2. package/dist/board/animation.js +374 -220
  3. package/dist/board/core/arrow-geometry.d.ts +33 -18
  4. package/dist/board/core/arrow-geometry.js +283 -52
  5. package/dist/board/core/draw-geometry.d.ts +22 -36
  6. package/dist/board/core/draw-geometry.js +148 -85
  7. package/dist/board/core/export-assets.d.ts +3 -6
  8. package/dist/board/core/export-assets.js +0 -2
  9. package/dist/board/core/export-plan.d.ts +12 -63
  10. package/dist/board/core/export-plan.js +55 -94
  11. package/dist/board/core/palette.d.ts +4 -21
  12. package/dist/board/core/palette.js +8 -13
  13. package/dist/board/core/scene.d.ts +33 -0
  14. package/dist/board/core/scene.js +302 -0
  15. package/dist/board/core/shape-definition.d.ts +12 -24
  16. package/dist/board/core/shape-definition.js +0 -19
  17. package/dist/board/core/shape-types.d.ts +6 -120
  18. package/dist/board/core/shape-types.js +5 -5
  19. package/dist/board/core/text-metrics.d.ts +8 -11
  20. package/dist/board/core/text-metrics.js +5 -34
  21. package/dist/board/core/tool-styles.d.ts +6 -16
  22. package/dist/board/core/tool-styles.js +17 -25
  23. package/dist/board/export/index.d.ts +10 -17
  24. package/dist/board/export/index.js +22 -21
  25. package/dist/board/export/scene.d.ts +10 -16
  26. package/dist/board/export/scene.js +17 -30
  27. package/dist/board/geometry.d.ts +27 -56
  28. package/dist/board/geometry.js +7 -67
  29. package/dist/board/headless/index.d.ts +7 -27
  30. package/dist/board/headless/index.js +20 -19
  31. package/dist/board/headless/sketch.d.ts +19 -0
  32. package/dist/board/headless/sketch.js +146 -0
  33. package/dist/board/image-key.d.ts +2 -12
  34. package/dist/board/image-key.js +3 -13
  35. package/dist/board/index.d.ts +18 -20
  36. package/dist/board/index.js +17 -17
  37. package/dist/board/media-playback.d.ts +3 -6
  38. package/dist/board/media-playback.js +6 -6
  39. package/dist/board/presets.d.ts +150 -0
  40. package/dist/board/presets.js +226 -0
  41. package/dist/board/render/board-background.d.ts +5 -3
  42. package/dist/board/render/board-background.js +8 -7
  43. package/dist/board/render/clip.d.ts +14 -0
  44. package/dist/board/render/clip.js +47 -0
  45. package/dist/board/render/index.d.ts +8 -5
  46. package/dist/board/render/index.js +7 -4
  47. package/dist/board/render/media-interaction.d.ts +4 -5
  48. package/dist/board/render/media-interaction.js +1 -2
  49. package/dist/board/render/palette.d.ts +6 -2
  50. package/dist/board/render/palette.js +7 -1
  51. package/dist/board/render/renderers/arrow-card-renderer.js +69 -71
  52. package/dist/board/render/renderers/audio-card-renderer.js +3 -3
  53. package/dist/board/render/renderers/base-card-renderer.d.ts +6 -17
  54. package/dist/board/render/renderers/base-card-renderer.js +1 -24
  55. package/dist/board/render/renderers/board-renderer-registry.d.ts +20 -50
  56. package/dist/board/render/renderers/board-renderer-registry.js +6 -7
  57. package/dist/board/render/renderers/draw-card-renderer.js +89 -56
  58. package/dist/board/render/renderers/effect-card-renderer.d.ts +6 -0
  59. package/dist/board/render/renderers/effect-card-renderer.js +197 -0
  60. package/dist/board/render/renderers/far-plate.d.ts +4 -21
  61. package/dist/board/render/renderers/far-plate.js +15 -34
  62. package/dist/board/render/renderers/file-card-renderer.d.ts +4 -25
  63. package/dist/board/render/renderers/file-card-renderer.js +8 -58
  64. package/dist/board/render/renderers/frame-card-renderer.js +28 -28
  65. package/dist/board/render/renderers/image-card-renderer.d.ts +4 -3
  66. package/dist/board/render/renderers/image-card-renderer.js +0 -9
  67. package/dist/board/render/renderers/shape-card-renderer.d.ts +9 -0
  68. package/dist/board/render/renderers/shape-card-renderer.js +240 -0
  69. package/dist/board/render/renderers/sketch-card-renderer.d.ts +5 -0
  70. package/dist/board/render/renderers/sketch-card-renderer.js +98 -0
  71. package/dist/board/render/renderers/task-card-renderer.d.ts +0 -1
  72. package/dist/board/render/renderers/task-card-renderer.js +14 -16
  73. package/dist/board/render/renderers/text-card-renderer.d.ts +1 -3
  74. package/dist/board/render/renderers/text-card-renderer.js +56 -46
  75. package/dist/board/render/renderers/unknown-card-renderer.js +4 -10
  76. package/dist/board/render/renderers/video-card-renderer.d.ts +4 -2
  77. package/dist/board/render/renderers/video-card-renderer.js +2 -1
  78. package/dist/board/render/sketch-host.d.ts +14 -0
  79. package/dist/board/render/sketch-host.js +216 -0
  80. package/dist/board/render/stroke.d.ts +12 -0
  81. package/dist/board/render/stroke.js +90 -0
  82. package/dist/board/render/text-measurement.d.ts +6 -26
  83. package/dist/board/render/text-measurement.js +11 -30
  84. package/dist/board/replay.d.ts +6 -31
  85. package/dist/board/replay.js +45 -203
  86. package/dist/board/runtime/board-player.d.ts +24 -0
  87. package/dist/board/runtime/board-player.js +161 -0
  88. package/dist/board/task.d.ts +2 -10
  89. package/dist/board/task.js +1 -10
  90. package/dist/chunks/environment.d.ts +2296 -3864
  91. package/dist/chunks/host-bridge.d.ts +253 -0
  92. package/dist/chunks/http.d.ts +238 -58
  93. package/dist/chunks/http.js +1061 -1034
  94. package/dist/chunks/transport.js +113 -59
  95. package/dist/chunks/websocket.d.ts +1 -1
  96. package/dist/chunks/websocket.js +1 -1
  97. package/dist/host-bridge.d.ts +54 -0
  98. package/dist/host-bridge.js +322 -0
  99. package/dist/http.d.ts +3 -3
  100. package/dist/index.d.ts +76 -193
  101. package/dist/index.js +2037 -1191
  102. package/dist/protocol/dist/board-constants.d.ts +1 -29
  103. package/dist/protocol/dist/board-constants.js +2 -115
  104. package/dist/protocol/dist/board-layout.d.ts +59 -0
  105. package/dist/protocol/dist/board-layout.js +482 -0
  106. package/dist/protocol/dist/board-model.d.ts +2052 -0
  107. package/dist/protocol/dist/board-model.js +592 -0
  108. package/dist/protocol/dist/board-patch.d.ts +86 -0
  109. package/dist/protocol/dist/board-patch.js +734 -0
  110. package/dist/protocol/dist/board-schema.d.ts +33 -0
  111. package/dist/protocol/dist/board-schema.js +59 -0
  112. package/dist/protocol/dist/board-upgrade.d.ts +1 -0
  113. package/dist/protocol/dist/board-url.d.ts +1 -3
  114. package/dist/protocol/dist/board-url.js +2 -2
  115. package/dist/protocol/dist/board.d.ts +37 -232
  116. package/dist/protocol/dist/board.js +62 -160
  117. package/dist/protocol/dist/display/actions.d.ts +1 -0
  118. package/dist/protocol/dist/display/index.d.ts +2 -0
  119. package/dist/protocol/dist/index.d.ts +11 -12
  120. package/dist/protocol/dist/model/metrics.d.ts +2 -0
  121. package/dist/protocol/dist/model/session.d.ts +2 -1
  122. package/dist/protocol/dist/realtime/types.d.ts +2 -2
  123. package/dist/protocol/dist/runtime/index.d.ts +1 -0
  124. package/dist/space-picker.d.ts +1 -0
  125. package/dist/space-picker.js +1 -0
  126. package/dist/types.d.ts +2 -5
  127. package/package.json +9 -1
  128. package/dist/board/core/connections.d.ts +0 -108
  129. package/dist/board/core/connections.js +0 -455
  130. package/dist/board/mutation.d.ts +0 -6
  131. package/dist/board/mutation.js +0 -14
  132. package/dist/board/render/connection-layer.d.ts +0 -53
  133. package/dist/board/render/connection-layer.js +0 -375
  134. package/dist/board/render/renderers/geo-card-renderer.d.ts +0 -5
  135. package/dist/board/render/renderers/geo-card-renderer.js +0 -127
  136. package/dist/board/semantic-document.d.ts +0 -37
  137. package/dist/board/semantic-document.js +0 -288
  138. package/dist/board/semantic-mutation.d.ts +0 -10
  139. package/dist/board/semantic-mutation.js +0 -209
  140. package/dist/protocol/dist/board-animation.js +0 -34
  141. package/dist/protocol/dist/board-authoring.d.ts +0 -1326
  142. package/dist/protocol/dist/board-authoring.js +0 -302
  143. package/dist/protocol/dist/board-capability-registry.d.ts +0 -2
  144. package/dist/protocol/dist/board-capability-registry.js +0 -123
  145. package/dist/protocol/dist/board-codec.d.ts +0 -3
  146. package/dist/protocol/dist/board-codec.js +0 -383
  147. package/dist/protocol/dist/board-composition.d.ts +0 -383
  148. package/dist/protocol/dist/board-composition.js +0 -310
  149. package/dist/protocol/dist/board-connection.d.ts +0 -317
  150. package/dist/protocol/dist/board-connection.js +0 -219
  151. package/dist/protocol/dist/board-document.d.ts +0 -1566
  152. package/dist/protocol/dist/board-document.js +0 -456
  153. package/dist/protocol/dist/board-effect.d.ts +0 -96
  154. package/dist/protocol/dist/board-effect.js +0 -54
  155. package/dist/protocol/dist/board-geometry.d.ts +0 -15
  156. package/dist/protocol/dist/board-geometry.js +0 -137
  157. package/dist/protocol/dist/board-node.d.ts +0 -8
  158. package/dist/protocol/dist/board-node.js +0 -252
  159. /package/dist/protocol/dist/{board-animation.d.ts → host-bridge.d.ts} +0 -0
@@ -1,17 +1,15 @@
1
1
  import "./app-authorization.js";
2
- import { BOARD_STROKE_MAX_SIZE, BOARD_STROKE_MIN_SIZE, BoardCapability, BoardCoordinateSpace, BoardRenderCost, clampBoardStrokeSize } from "./board-constants.js";
3
- import { AUTO_BOARD_CONNECTION_ANCHOR, BOARD_CONNECTION_DIRECTIONS, BOARD_CONNECTION_LINES, BOARD_CONNECTION_ROUTINGS, BOARD_CONNECTION_SIDES, BoardConnection, BoardConnectionAnchor, BoardConnectionAnchorSchema, BoardConnectionDirection, BoardConnectionEndpoint, BoardConnectionEndpointSchema, BoardConnectionInput, BoardConnectionLine, BoardConnectionPatch, BoardConnectionPatchSchema, BoardConnectionRecord, BoardConnectionRouting, BoardConnectionRoutingConfig, BoardConnectionRoutingSchema, BoardConnectionSchema, BoardConnectionSide, BoardConnectionStyle, BoardConnectionStyleSchema, BoardConnectionWaypointSchema, BoardRelationSchema, DEFAULT_BOARD_CONNECTION_ROUTING, DEFAULT_BOARD_CONNECTION_STYLE, DEFAULT_BOARD_RELATION, connectionItemIds, connectionOtherItemId, connectionTouchesItem, createBoardConnection, flipBoardConnection, normalizeBoardConnectionStyle } from "./board-connection.js";
4
- import { BoardAnimationTarget, BoardAnimationTargetSchema, BoardComposition, BoardCompositionInput, BoardCompositionInputSchema, BoardCompositionSchema, BoardEasing, BoardEasingSchema, BoardProceduralClip, BoardProceduralClipSchema, BoardTimelineMarker, BoardTimelineMarkerSchema, BoardTrack, BoardTrackInterpolation, BoardTrackSchema } from "./board-composition.js";
5
- import { BoardAssetRef, BoardAssetRefSchema, BoardEffect, BoardEffectInput, BoardEffectInputSchema, BoardEffectSchema } from "./board-effect.js";
6
- import { BoardAuthoringItem, BoardAuthoringItemSchema, BoardAuthoringSnapshot, BoardSemanticCommand, BoardSemanticCommandSchema } from "./board-authoring.js";
2
+ import { BOARD_ANCHOR_SIDES, BOARD_ARROW_ROUTES, BOARD_CAMERA_TARGET, BOARD_COLOR_TOKENS, BOARD_DASHES, BOARD_DERIVED_SIZE_TYPES, BOARD_EFFECT_KINDS, BOARD_EFFECT_KIND_INFO, BOARD_ENTER_PRESETS, BOARD_EXTENSION_TYPE_PATTERN, BOARD_GRID_DEFAULT_SIZE, BOARD_GRID_MAX_SIZE, BOARD_GRID_MIN_SIZE, BOARD_ID_MAX_LENGTH, BOARD_ITEM_SCHEMAS, BOARD_ITEM_TYPES, BOARD_PLAY_MODES, BOARD_SHAPE_GEOMETRIES, BOARD_TASK_ARTIFACT_LIMIT, BOARD_TEXT_ALIGNS, BoardAnchorSide, BoardAnimation, BoardAnimationHeader, BoardAnimationHeaderSchema, BoardAnimationSchema, BoardArrowAnchor, BoardArrowAnchorSchema, BoardArrowBinding, BoardArrowBindingSchema, BoardArrowEnd, BoardArrowEndSchema, BoardArrowItem, BoardArrowItemSchema, BoardArrowRoute, BoardAudioItem, BoardAudioItemSchema, BoardBackgroundSchema, BoardBuiltinItem, BoardBuiltinItemType, BoardColor, BoardColorSchema, BoardColorToken, BoardCropSchema, BoardDash, BoardDelta, BoardDiagnostic, BoardDocument, BoardDrawItem, BoardDrawItemSchema, BoardDrawPoint, BoardDrawPointSchema, BoardEaseSchema, BoardEffectItem, BoardEffectItemSchema, BoardEffectKind, BoardEnterPreset, BoardExtensionItem, BoardExtensionItemSchema, BoardFileBackedItem, BoardFileItem, BoardFileItemSchema, BoardFrameItem, BoardFrameItemSchema, BoardIdSchema, BoardImageItem, BoardImageItemSchema, BoardItem, BoardItemType, BoardKeyframe, BoardKeyframeSchema, BoardMarker, BoardMarkerSchema, BoardMediaSnapshot, BoardMediaSnapshotSchema, BoardPatch, BoardPatchSchema, BoardPlayMode, BoardSettings, BoardSettingsSchema, BoardShapeGeometry, BoardShapeItem, BoardShapeItemSchema, BoardSize, BoardSizeSchema, BoardSketchItem, BoardSketchItemSchema, BoardStyle, BoardStyleSchema, BoardTaskArtifact, BoardTaskArtifactSchema, BoardTaskItem, BoardTaskItemSchema, BoardTaskSnapshot, BoardTaskSnapshotSchema, BoardTextItem, BoardTextItemSchema, BoardTrack, BoardTrackSchema, BoardVec2, BoardVec2Schema, BoardVideoItem, BoardVideoItemSchema, boardItemSchema, emptyBoardDocument, hasAuthoredSize, isBoardColorString, isBoardEase, isBuiltinItem, isBuiltinItemType, isEmptyBoardDelta, isFileBackedItem, isMediaItem, isSafeBoardSourcePath, parseBoardItem } from "./board-model.js";
7
3
  import { RequestSource, RequestSourceVia } from "./provenance.js";
8
- import { BOARD_DELETE_REASONS, BOARD_DOCUMENT_KIND, BOARD_EXTENSION, BoardCameraFocus, BoardCameraFocusParams, BoardCameraFocusParamsSchema, BoardCameraFocusSchema, BoardCameraState, BoardCameraStateSchema, BoardDeleteReason, BoardDiagnostic, BoardManifest, BoardManifestSchema, BoardMutationReceipt, BoardNodeInput, BoardNodeRecord, BoardOperation, BoardPlaybackSnapshot, BoardPlaybackStatus, BoardRecord, BoardTransactionOperation, BoardTransactionRecord, BoardTransactionsPage, BoardValidationResult, isBoardPath, parseBoardManifest, serializeBoardManifest } from "./board.js";
9
- import "./board-animation.js";
10
- import "./board-capability-registry.js";
11
- import { BOARD_COLOR_IDS, BOARD_GEO_KINDS, BoardColorId, BoardGeoKind } from "./board-node.js";
12
- import "./board-codec.js";
4
+ import { BoardHistoryPage, BoardManifest, BoardManifestSchema, BoardPlaybackCommand, BoardPlaybackCommandSchema, BoardPlaybackSnapshot, BoardPlaybackStatus, BoardTransactionRecord, isBoardPath, parseBoardManifest, serializeBoardManifest } from "./board.js";
5
+ import { BOARD_STROKE_MAX_SIZE, BOARD_STROKE_MIN_SIZE, clampBoardStrokeSize } from "./board-constants.js";
13
6
  import "./board-content.js";
14
- import { BoardArrowGeometryInput, boardArrowFrame, boardDrawBounds, boardDrawSampleRadius } from "./board-geometry.js";
7
+ import { BoardFrame, BoardItemLookup, BoardLayout, BoardMatrix, BoardRect, BoardTextLayout, BoardTextMeasurer, IDENTITY_MATRIX, anchorPoint, applyMatrix, arrowBindings, autoAnchorSide, bendControl, clampBoardFontSize, createBoardLayout, createDocumentLayout, drawPointsBounds, drawSampleRadius, estimateTextWidth, framePoint, invertMatrix, isArrowBinding, layoutBoardText, multiplyMatrix, pointsRect, rotateAround, scaleVector, setBoardTextMeasurer, sideAnchor } from "./board-layout.js";
8
+ import { BoardApplyOptions, BoardPatchResult, BoardPropertySpec, BoardState, BoardValueKind, applyBoardDelta, applyBoardPatch, applyBoardPatchToDocument, boardPatchTouches, createDocumentState, diffBoardDocuments, diffMergePatch, isEmptyBoardPatch, listBoardProperties, mergePatch, parseBoardDocument, pruneBoardTrack, resolveBoardProperty, trackReferences } from "./board-patch.js";
9
+ import { BOARD_SCHEMA_TARGETS, BoardJsonSchemaResult, boardJsonSchema, boardSchemaOverview } from "./board-schema.js";
10
+ import "./board-upgrade.js";
11
+ import { isPublicBoardRemoteAddress, normalizeBoardRemoteUrl } from "./board-url.js";
12
+ import "./display/index.js";
15
13
  import "./runtime/index.js";
16
14
  import "./model/turn.js";
17
15
  import "./model/session.js";
@@ -19,4 +17,5 @@ import "./realtime/board-awareness.js";
19
17
  import "./app.js";
20
18
  import "./realtime/types.js";
21
19
  import "./app-catalog.js";
22
- export { AUTO_BOARD_CONNECTION_ANCHOR, BOARD_COLOR_IDS, BOARD_CONNECTION_DIRECTIONS, BOARD_CONNECTION_LINES, BOARD_CONNECTION_ROUTINGS, BOARD_CONNECTION_SIDES, BOARD_DELETE_REASONS, BOARD_DOCUMENT_KIND, BOARD_EXTENSION, BOARD_GEO_KINDS, BOARD_STROKE_MAX_SIZE, BOARD_STROKE_MIN_SIZE, BoardAnimationTarget, BoardAnimationTargetSchema, BoardArrowGeometryInput, type BoardAssetRef, BoardAuthoringItem, BoardAuthoringItemSchema, BoardAuthoringSnapshot, BoardCameraFocus, BoardCameraFocusParams, BoardCameraFocusParamsSchema, BoardCameraFocusSchema, BoardCameraState, BoardCameraStateSchema, BoardCapability, BoardColorId, BoardComposition, BoardCompositionInput, BoardCompositionInputSchema, BoardCompositionSchema, BoardConnection, BoardConnectionAnchor, BoardConnectionAnchorSchema, BoardConnectionDirection, BoardConnectionEndpoint, BoardConnectionEndpointSchema, BoardConnectionInput, BoardConnectionLine, BoardConnectionPatch, BoardConnectionPatchSchema, BoardConnectionRecord, BoardConnectionRouting, BoardConnectionRoutingConfig, BoardConnectionRoutingSchema, BoardConnectionSchema, BoardConnectionSide, BoardConnectionStyle, BoardConnectionStyleSchema, BoardConnectionWaypointSchema, BoardDeleteReason, BoardDiagnostic, BoardEasing, BoardEasingSchema, type BoardEffect, BoardGeoKind, BoardManifest, BoardManifestSchema, BoardMutationReceipt, BoardNodeInput, BoardNodeRecord, BoardOperation, BoardPlaybackSnapshot, BoardPlaybackStatus, BoardProceduralClip, BoardProceduralClipSchema, BoardRecord, BoardRelationSchema, BoardRenderCost, BoardSemanticCommand, BoardSemanticCommandSchema, BoardTimelineMarker, BoardTimelineMarkerSchema, BoardTrack, BoardTrackInterpolation, BoardTrackSchema, BoardTransactionOperation, BoardTransactionRecord, BoardTransactionsPage, BoardValidationResult, DEFAULT_BOARD_CONNECTION_ROUTING, DEFAULT_BOARD_CONNECTION_STYLE, DEFAULT_BOARD_RELATION, RequestSource, RequestSourceVia, boardArrowFrame, boardDrawBounds, boardDrawSampleRadius, clampBoardStrokeSize, connectionItemIds, connectionOtherItemId, connectionTouchesItem, createBoardConnection, flipBoardConnection, isBoardPath, normalizeBoardConnectionStyle, parseBoardManifest, serializeBoardManifest };
20
+ import "./host-bridge.js";
21
+ export { BOARD_ANCHOR_SIDES, BOARD_ARROW_ROUTES, BOARD_CAMERA_TARGET, BOARD_COLOR_TOKENS, BOARD_DASHES, BOARD_DERIVED_SIZE_TYPES, BOARD_EFFECT_KINDS, BOARD_EFFECT_KIND_INFO, BOARD_ENTER_PRESETS, BOARD_EXTENSION_TYPE_PATTERN, BOARD_GRID_DEFAULT_SIZE, BOARD_GRID_MAX_SIZE, BOARD_GRID_MIN_SIZE, BOARD_ID_MAX_LENGTH, BOARD_ITEM_SCHEMAS, BOARD_ITEM_TYPES, BOARD_PLAY_MODES, BOARD_SCHEMA_TARGETS, BOARD_SHAPE_GEOMETRIES, BOARD_STROKE_MAX_SIZE, BOARD_STROKE_MIN_SIZE, BOARD_TASK_ARTIFACT_LIMIT, BOARD_TEXT_ALIGNS, BoardAnchorSide, BoardAnimation, BoardAnimationHeader, BoardAnimationHeaderSchema, BoardAnimationSchema, BoardApplyOptions, BoardArrowAnchor, BoardArrowAnchorSchema, BoardArrowBinding, BoardArrowBindingSchema, BoardArrowEnd, BoardArrowEndSchema, BoardArrowItem, BoardArrowItemSchema, BoardArrowRoute, BoardAudioItem, BoardAudioItemSchema, BoardBackgroundSchema, BoardBuiltinItem, BoardBuiltinItemType, BoardColor, BoardColorSchema, BoardColorToken, BoardCropSchema, BoardDash, BoardDelta, BoardDiagnostic, BoardDocument, BoardDrawItem, BoardDrawItemSchema, BoardDrawPoint, BoardDrawPointSchema, BoardEaseSchema, BoardEffectItem, BoardEffectItemSchema, BoardEffectKind, BoardEnterPreset, BoardExtensionItem, BoardExtensionItemSchema, BoardFileBackedItem, BoardFileItem, BoardFileItemSchema, BoardFrame, BoardFrameItem, BoardFrameItemSchema, BoardHistoryPage, BoardIdSchema, BoardImageItem, BoardImageItemSchema, BoardItem, BoardItemLookup, BoardItemType, BoardJsonSchemaResult, BoardKeyframe, BoardKeyframeSchema, BoardLayout, BoardManifest, BoardManifestSchema, BoardMarker, BoardMarkerSchema, BoardMatrix, BoardMediaSnapshot, BoardMediaSnapshotSchema, BoardPatchResult, BoardPatchSchema, BoardPlayMode, BoardPlaybackCommand, BoardPlaybackCommandSchema, BoardPlaybackSnapshot, BoardPlaybackStatus, BoardPropertySpec, BoardRect, BoardSettings, BoardSettingsSchema, BoardShapeGeometry, BoardShapeItem, BoardShapeItemSchema, BoardSize, BoardSizeSchema, BoardSketchItem, BoardSketchItemSchema, BoardState, BoardStyle, BoardStyleSchema, BoardTaskArtifact, BoardTaskArtifactSchema, BoardTaskItem, BoardTaskItemSchema, BoardTaskSnapshot, BoardTaskSnapshotSchema, BoardTextItem, BoardTextItemSchema, BoardTextLayout, BoardTextMeasurer, BoardTrack, BoardTrackSchema, BoardTransactionRecord, BoardValueKind, BoardVec2, BoardVec2Schema, BoardVideoItem, BoardVideoItemSchema, IDENTITY_MATRIX, RequestSource, RequestSourceVia, anchorPoint, applyBoardDelta, applyBoardPatch, applyBoardPatchToDocument, applyMatrix, arrowBindings, autoAnchorSide, bendControl, boardItemSchema, boardJsonSchema, boardPatchTouches, boardSchemaOverview, clampBoardFontSize, clampBoardStrokeSize, createBoardLayout, createDocumentLayout, createDocumentState, diffBoardDocuments, diffMergePatch, drawPointsBounds, drawSampleRadius, emptyBoardDocument, estimateTextWidth, framePoint, hasAuthoredSize, invertMatrix, isArrowBinding, isBoardColorString, isBoardEase, isBoardPath, isBuiltinItem, isBuiltinItemType, isEmptyBoardDelta, isEmptyBoardPatch, isFileBackedItem, isMediaItem, isPublicBoardRemoteAddress, isSafeBoardSourcePath, layoutBoardText, listBoardProperties, mergePatch, multiplyMatrix, normalizeBoardRemoteUrl, parseBoardDocument, parseBoardItem, parseBoardManifest, pointsRect, pruneBoardTrack, resolveBoardProperty, rotateAround, scaleVector, serializeBoardManifest, setBoardTextMeasurer, sideAnchor, trackReferences };
@@ -0,0 +1,2 @@
1
+ import "./turn.js";
2
+ import { z } from "zod";
@@ -1 +1,2 @@
1
- import "./turn.js";
1
+ import "./turn.js";
2
+ import "./metrics.js";
@@ -1,7 +1,7 @@
1
- import "../board-composition.js";
2
- import "../board-effect.js";
1
+ import "../board-model.js";
3
2
  import "../board.js";
4
3
  import "../model/turn.js";
4
+ import "../model/metrics.js";
5
5
  import "../model/session.js";
6
6
  import "./board-awareness.js";
7
7
  import "../app.js";
@@ -1,3 +1,4 @@
1
+ import "../display/index.js";
1
2
  import "./archive.js";
2
3
  import "./native.js";
3
4
  import "./context.js";
@@ -10,6 +10,7 @@ type SpacePickerItem = {
10
10
  name: string | null;
11
11
  ownerUserUuid?: string | null;
12
12
  isPinned?: boolean;
13
+ isArchived?: boolean;
13
14
  };
14
15
  type SpacePickerOptions = {
15
16
  filter: SpacePickerFilter;
@@ -22,6 +22,7 @@ function filterSpacePickerItems(items, options) {
22
22
  return items.filter((item) => {
23
23
  if (effectiveFilter === "mine" && item.ownerUserUuid !== options.viewerUserUuid) return false;
24
24
  if (effectiveFilter === "pinned" && !item.isPinned) return false;
25
+ if (item.isArchived) return false;
25
26
  if (effectiveFilter === "recent" && !recentIds.has(item.id)) return false;
26
27
  if (!normalizedQuery) return true;
27
28
  return normalizeSpacePickerQuery(item.name ?? item.id).includes(normalizedQuery);
package/dist/types.d.ts CHANGED
@@ -1,8 +1,5 @@
1
- import { BoardCapability, BoardCoordinateSpace, BoardRenderCost } from "./protocol/dist/board-constants.js";
2
- import { BoardAnimationTarget, BoardComposition, BoardEasing, BoardProceduralClip, BoardTimelineMarker, BoardTrack } from "./protocol/dist/board-composition.js";
3
- import { BoardAssetRef, BoardEffect, BoardEffectInput } from "./protocol/dist/board-effect.js";
4
- import { BoardAuthoringItem, BoardAuthoringSnapshot, BoardSemanticCommand } from "./protocol/dist/board-authoring.js";
5
- import { BoardCameraFocus, BoardCameraFocusParams, BoardCameraState, BoardDiagnostic, BoardManifest, BoardMutationReceipt, BoardPlaybackSnapshot, BoardRecord, BoardTransactionOperation, BoardTransactionRecord, BoardTransactionsPage, BoardValidationResult } from "./protocol/dist/board.js";
1
+ import { BoardAnimation, BoardAnimationHeader, BoardColor, BoardDelta, BoardDiagnostic, BoardDocument, BoardItem, BoardKeyframe, BoardMarker, BoardPatch, BoardSettings, BoardStyle, BoardTrack } from "./protocol/dist/board-model.js";
2
+ import { BoardHistoryPage, BoardManifest, BoardPlaybackCommand, BoardPlaybackSnapshot, BoardTransactionRecord } from "./protocol/dist/board.js";
6
3
  import "./protocol/dist/model/session.js";
7
4
  import "./protocol/dist/index.js";
8
5
  //#region src/types.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neta-art/cohub",
3
- "version": "8.23.0",
3
+ "version": "9.0.0",
4
4
  "description": "Cohub SDK for spaces, sessions, boards, and realtime agent collaboration.",
5
5
  "license": "Apache-2.0",
6
6
  "private": false,
@@ -49,6 +49,10 @@
49
49
  "types": "./dist/space-picker.d.ts",
50
50
  "import": "./dist/space-picker.js"
51
51
  },
52
+ "./host-bridge": {
53
+ "types": "./dist/host-bridge.d.ts",
54
+ "import": "./dist/host-bridge.js"
55
+ },
52
56
  "./media": {
53
57
  "types": "./dist/media.d.ts",
54
58
  "import": "./dist/media.js"
@@ -57,6 +61,10 @@
57
61
  "types": "./dist/board/index.d.ts",
58
62
  "import": "./dist/board/index.js"
59
63
  },
64
+ "./board/player": {
65
+ "types": "./dist/board/runtime/board-player.d.ts",
66
+ "import": "./dist/board/runtime/board-player.js"
67
+ },
60
68
  "./board/render": {
61
69
  "types": "./dist/board/render/index.d.ts",
62
70
  "import": "./dist/board/render/index.js"
@@ -1,108 +0,0 @@
1
- import { BoardConnection, BoardConnectionAnchor, BoardConnectionSide } from "../../protocol/dist/board-connection.js";
2
- import { BoardFrame } from "../../protocol/dist/board-document.js";
3
- import { Rect, WorldPoint } from "../geometry.js";
4
- //#region src/board/core/connections.d.ts
5
- type FrameLookup = (id: string) => BoardFrame | undefined;
6
- /**
7
- * Gap between a node's edge and the line's endpoint, in world units.
8
- *
9
- * A connection that touches the border reads as part of the node; a small gap
10
- * makes the relation legible as its own object and keeps an arrowhead from being
11
- * swallowed by the card it points at.
12
- */
13
- declare const CONNECTION_ENDPOINT_GAP = 4;
14
- type ResolvedConnectionEndpoint = {
15
- point: WorldPoint;
16
- /** Outward normal at the attachment, used to aim arrowheads and elbows. */
17
- normal: WorldPoint;
18
- side: BoardConnectionSide;
19
- };
20
- type ResolvedConnection = {
21
- source: ResolvedConnectionEndpoint;
22
- target: ResolvedConnectionEndpoint;
23
- /** Sampled world-space path, always at least two points. */
24
- path: WorldPoint[];
25
- /** Midpoint of the path, for labels and the drag handle. */
26
- mid: WorldPoint;
27
- };
28
- /** Denormalize a (nx, ny) anchor to a world point on a possibly rotated frame. */
29
- declare function anchorToWorld(frame: BoardFrame, nx: number, ny: number): WorldPoint;
30
- /** Normalize a world point into a (nx, ny) anchor on a frame, clamped to it. */
31
- declare function worldToAnchor(frame: BoardFrame, point: WorldPoint): {
32
- nx: number;
33
- ny: number;
34
- };
35
- /**
36
- * Choose the side an `auto` anchor should use.
37
- *
38
- * The dominant axis of the center-to-center vector wins, weighted by the frame's
39
- * own proportions so a wide card prefers its long edges. Comparing raw dx/dy
40
- * instead would make a wide node attach to its short side for most angles, which
41
- * is the classic "line leaves from the corner" artifact.
42
- */
43
- declare function autoConnectionSide(from: BoardFrame, to: BoardFrame): BoardConnectionSide;
44
- /**
45
- * World point of an anchor on a frame, ignoring the gap and the facing node.
46
- *
47
- * For a live drag the other end is the pointer, not a node, so `auto` has no
48
- * frame to face: it resolves to the node's centre, which is the only honest
49
- * answer while the relation has nowhere to point yet.
50
- */
51
- declare function anchorPointOnFrame(anchor: BoardConnectionAnchor, frame: BoardFrame): WorldPoint;
52
- /**
53
- * Resolve a connection into world-space geometry, or null if either node is gone.
54
- *
55
- * A null result means "not drawable right now", never "delete this": the caller
56
- * may be looking at a viewport-culled read where an endpoint simply was not
57
- * fetched.
58
- */
59
- declare function resolveConnection(connection: BoardConnection, getFrame: FrameLookup, options?: {
60
- gap?: number;
61
- }): ResolvedConnection | null;
62
- /** Midpoint by arc length, so a label sits visually centered on the line. */
63
- declare function pathMidpoint(path: WorldPoint[]): WorldPoint;
64
- /** World bounds of a resolved connection, padded for its stroke. */
65
- declare function connectionBounds(resolved: ResolvedConnection, strokeSize: number): Rect;
66
- type ConnectionGeometry = {
67
- connection: BoardConnection;
68
- resolved: ResolvedConnection;
69
- bounds: Rect;
70
- };
71
- /**
72
- * Resolved geometry reused until the connection or an endpoint frame changes
73
- * identity, so unchanged relations keep returning the same object.
74
- */
75
- type ConnectionGeometryCache = {
76
- get: (connection: BoardConnection, getFrame: FrameLookup) => ConnectionGeometry | null;
77
- peek: (connectionId: string) => ConnectionGeometry | null;
78
- retain: (connections: readonly BoardConnection[]) => void;
79
- clear: () => void;
80
- };
81
- declare function createConnectionGeometryCache(): ConnectionGeometryCache;
82
- /** Distance from a world point to a resolved connection's path. */
83
- declare function distanceToConnection(resolved: ResolvedConnection, point: WorldPoint): number;
84
- /** Hit test a connection with a zoom-independent screen-space tolerance. */
85
- declare function connectionHitTest(resolved: ResolvedConnection, point: WorldPoint, strokeSize: number): boolean;
86
- declare function connectionHitRadius(strokeSize: number): number;
87
- /** Whether the connection draws an arrowhead at its source / target. */
88
- declare function connectionArrowheads(connection: BoardConnection): {
89
- atSource: boolean;
90
- atTarget: boolean;
91
- };
92
- /**
93
- * Index of connections by the nodes they touch.
94
- *
95
- * Built once per document revision and consulted per gesture frame: moving a node
96
- * must cost its own degree, not a scan of every connection on the board. Without
97
- * this, dragging one node in a densely connected board is O(connections) per
98
- * frame, which is exactly the cost that shows up as drag lag.
99
- */
100
- type ConnectionIndex = {
101
- /** Connection ids touching a node (either endpoint). */
102
- byNode: (nodeId: string) => readonly string[];
103
- get: (connectionId: string) => BoardConnection | undefined;
104
- readonly all: readonly BoardConnection[];
105
- };
106
- declare function createConnectionIndex(connections: readonly BoardConnection[]): ConnectionIndex;
107
- //#endregion
108
- export { CONNECTION_ENDPOINT_GAP, ConnectionGeometry, ConnectionGeometryCache, ConnectionIndex, FrameLookup, ResolvedConnection, ResolvedConnectionEndpoint, anchorPointOnFrame, anchorToWorld, autoConnectionSide, connectionArrowheads, connectionBounds, connectionHitRadius, connectionHitTest, createConnectionGeometryCache, createConnectionIndex, distanceToConnection, pathMidpoint, resolveConnection, worldToAnchor };