@neta-art/cohub 8.6.0 → 8.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/board/core/arrow-geometry.js +8 -45
- package/dist/board/core/draw-geometry.d.ts +8 -6
- package/dist/board/core/draw-geometry.js +6 -32
- package/dist/board/core/shape-types.d.ts +1 -1
- package/dist/board/export/scene.js +1 -0
- package/dist/board/geometry.d.ts +1 -1
- package/dist/board/index.d.ts +4 -3
- package/dist/board/index.js +2 -1
- package/dist/board/render/renderers/board-renderer-registry.d.ts +2 -0
- package/dist/board/render/renderers/draw-card-renderer.js +28 -18
- package/dist/board/semantic-document.d.ts +1 -1
- package/dist/board/semantic-document.js +23 -4
- package/dist/board/semantic-mutation.d.ts +1 -1
- package/dist/board/semantic-mutation.js +7 -1
- package/dist/chunks/http.d.ts +33 -4
- package/dist/chunks/http.js +97 -25
- package/dist/chunks/websocket.d.ts +469 -369
- package/dist/http.d.ts +3 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +7 -0
- package/dist/protocol/dist/board-authoring.d.ts +201 -181
- package/dist/protocol/dist/board-authoring.js +32 -21
- package/dist/protocol/dist/board-codec.js +200 -1
- package/dist/protocol/dist/board-geometry.d.ts +15 -0
- package/dist/protocol/dist/board-geometry.js +137 -0
- package/dist/protocol/dist/board-node.js +94 -1
- package/dist/protocol/dist/board.js +2 -2
- package/dist/protocol/dist/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { boardArrowBounds, boardArrowFrame, boardResolveArrow, boardSampleResolvedArrow } from "../../protocol/dist/board-geometry.js";
|
|
1
2
|
import { worldPoint } from "../geometry.js";
|
|
2
3
|
//#region src/board/core/arrow-geometry.ts
|
|
3
4
|
/**
|
|
@@ -11,62 +12,24 @@ import { worldPoint } from "../geometry.js";
|
|
|
11
12
|
*/
|
|
12
13
|
/** Resolve an arrow's endpoints and its bent control point. */
|
|
13
14
|
function resolveArrow(item) {
|
|
14
|
-
const
|
|
15
|
-
const end = worldPoint(item.end.x, item.end.y);
|
|
16
|
-
const mid = worldPoint((start.x + end.x) / 2, (start.y + end.y) / 2);
|
|
17
|
-
if (!item.bend) return {
|
|
18
|
-
start,
|
|
19
|
-
end,
|
|
20
|
-
control: mid
|
|
21
|
-
};
|
|
22
|
-
const dx = end.x - start.x;
|
|
23
|
-
const dy = end.y - start.y;
|
|
24
|
-
const length = Math.hypot(dx, dy) || 1;
|
|
25
|
-
const offset = item.bend * length;
|
|
15
|
+
const resolved = boardResolveArrow(item);
|
|
26
16
|
return {
|
|
27
|
-
start,
|
|
28
|
-
end,
|
|
29
|
-
control: worldPoint(
|
|
17
|
+
start: worldPoint(resolved.start.x, resolved.start.y),
|
|
18
|
+
end: worldPoint(resolved.end.x, resolved.end.y),
|
|
19
|
+
control: worldPoint(resolved.control.x, resolved.control.y)
|
|
30
20
|
};
|
|
31
21
|
}
|
|
32
22
|
/** Sample an arrow's quadratic curve into world points. */
|
|
33
23
|
function sampleArrow(resolved, segments) {
|
|
34
|
-
|
|
35
|
-
const out = [];
|
|
36
|
-
for (let index = 0; index <= segments; index += 1) {
|
|
37
|
-
const t = index / segments;
|
|
38
|
-
const mt = 1 - t;
|
|
39
|
-
out.push(worldPoint(mt * mt * start.x + 2 * mt * t * control.x + t * t * end.x, mt * mt * start.y + 2 * mt * t * control.y + t * t * end.y));
|
|
40
|
-
}
|
|
41
|
-
return out;
|
|
24
|
+
return boardSampleResolvedArrow(resolved, segments).map((point) => worldPoint(point.x, point.y));
|
|
42
25
|
}
|
|
43
26
|
/** World bounds of an arrow, padded for its stroke. */
|
|
44
27
|
function arrowBounds(item) {
|
|
45
|
-
|
|
46
|
-
let minX = Number.POSITIVE_INFINITY;
|
|
47
|
-
let minY = Number.POSITIVE_INFINITY;
|
|
48
|
-
let maxX = Number.NEGATIVE_INFINITY;
|
|
49
|
-
let maxY = Number.NEGATIVE_INFINITY;
|
|
50
|
-
for (const point of samples) {
|
|
51
|
-
minX = Math.min(minX, point.x);
|
|
52
|
-
minY = Math.min(minY, point.y);
|
|
53
|
-
maxX = Math.max(maxX, point.x);
|
|
54
|
-
maxY = Math.max(maxY, point.y);
|
|
55
|
-
}
|
|
56
|
-
const pad = Math.max(8, item.size * 2);
|
|
57
|
-
return {
|
|
58
|
-
x: minX - pad,
|
|
59
|
-
y: minY - pad,
|
|
60
|
-
width: Math.max(1, maxX - minX + pad * 2),
|
|
61
|
-
height: Math.max(1, maxY - minY + pad * 2)
|
|
62
|
-
};
|
|
28
|
+
return boardArrowBounds(item);
|
|
63
29
|
}
|
|
64
30
|
/** The frame an arrow should carry, derived from its endpoints. */
|
|
65
31
|
function arrowFrame(item) {
|
|
66
|
-
return
|
|
67
|
-
...arrowBounds(item),
|
|
68
|
-
rotation: 0
|
|
69
|
-
};
|
|
32
|
+
return boardArrowFrame(item);
|
|
70
33
|
}
|
|
71
34
|
/** Distance from a world point to an arrow's curve (hit testing). */
|
|
72
35
|
function distanceToArrow(item, point) {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { DrawPoint } from "../../protocol/dist/board-document.js";
|
|
2
|
-
import {
|
|
2
|
+
import { boardDrawBounds, boardDrawSampleRadius } from "../../protocol/dist/board-geometry.js";
|
|
3
|
+
import "../../protocol/dist/index.js";
|
|
4
|
+
import { WorldPoint } from "../geometry.js";
|
|
3
5
|
//#region src/board/core/draw-geometry.d.ts
|
|
4
6
|
/** Radius of a sample in world units given the stroke size and pressure. */
|
|
5
|
-
declare
|
|
7
|
+
declare const sampleRadius: typeof boardDrawSampleRadius;
|
|
6
8
|
/** Axis-aligned bounds of a stroke in its local space, padded by stroke width. */
|
|
7
|
-
declare
|
|
9
|
+
declare const computeDrawBounds: typeof boardDrawBounds;
|
|
8
10
|
/**
|
|
9
11
|
* Ramer–Douglas–Peucker simplification. Reduces point count for low-zoom
|
|
10
12
|
* rendering without touching the persisted raw samples. Returns indices into
|
|
@@ -12,9 +14,9 @@ declare function computeDrawBounds(points: DrawPoint[], size: number): Rect;
|
|
|
12
14
|
*/
|
|
13
15
|
declare function simplifyDrawIndices(points: DrawPoint[], tolerance: number): number[];
|
|
14
16
|
/**
|
|
15
|
-
* Build
|
|
16
|
-
* Interactive
|
|
17
|
-
*
|
|
17
|
+
* Build a closed outline for callers that need a path representation.
|
|
18
|
+
* Interactive rendering uses `buildStrokeRibbonGeometry` below because a single
|
|
19
|
+
* outline is unsafe when a freehand path folds back over itself.
|
|
18
20
|
*/
|
|
19
21
|
declare function buildStrokeOutline(points: DrawPoint[], size: number): Array<{
|
|
20
22
|
x: number;
|
|
@@ -1,36 +1,10 @@
|
|
|
1
|
+
import { boardDrawBounds, boardDrawSampleRadius } from "../../protocol/dist/board-geometry.js";
|
|
1
2
|
import { getStroke } from "perfect-freehand";
|
|
2
3
|
//#region src/board/core/draw-geometry.ts
|
|
3
4
|
/** Radius of a sample in world units given the stroke size and pressure. */
|
|
4
|
-
|
|
5
|
-
const clamped = Math.min(1, Math.max(0, pressure));
|
|
6
|
-
return Math.max(.5, size / 2 * (.5 + clamped));
|
|
7
|
-
}
|
|
5
|
+
const sampleRadius = boardDrawSampleRadius;
|
|
8
6
|
/** Axis-aligned bounds of a stroke in its local space, padded by stroke width. */
|
|
9
|
-
|
|
10
|
-
if (points.length === 0) return {
|
|
11
|
-
x: 0,
|
|
12
|
-
y: 0,
|
|
13
|
-
width: 1,
|
|
14
|
-
height: 1
|
|
15
|
-
};
|
|
16
|
-
let minX = Number.POSITIVE_INFINITY;
|
|
17
|
-
let minY = Number.POSITIVE_INFINITY;
|
|
18
|
-
let maxX = Number.NEGATIVE_INFINITY;
|
|
19
|
-
let maxY = Number.NEGATIVE_INFINITY;
|
|
20
|
-
for (const point of points) {
|
|
21
|
-
const r = sampleRadius(size, point.p);
|
|
22
|
-
minX = Math.min(minX, point.x - r);
|
|
23
|
-
minY = Math.min(minY, point.y - r);
|
|
24
|
-
maxX = Math.max(maxX, point.x + r);
|
|
25
|
-
maxY = Math.max(maxY, point.y + r);
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
x: minX,
|
|
29
|
-
y: minY,
|
|
30
|
-
width: Math.max(1, maxX - minX),
|
|
31
|
-
height: Math.max(1, maxY - minY)
|
|
32
|
-
};
|
|
33
|
-
}
|
|
7
|
+
const computeDrawBounds = boardDrawBounds;
|
|
34
8
|
/**
|
|
35
9
|
* Ramer–Douglas–Peucker simplification. Reduces point count for low-zoom
|
|
36
10
|
* rendering without touching the persisted raw samples. Returns indices into
|
|
@@ -81,9 +55,9 @@ function perpendicularDistance(point, a, b) {
|
|
|
81
55
|
return Math.hypot(point.x - projX, point.y - projY);
|
|
82
56
|
}
|
|
83
57
|
/**
|
|
84
|
-
* Build
|
|
85
|
-
* Interactive
|
|
86
|
-
*
|
|
58
|
+
* Build a closed outline for callers that need a path representation.
|
|
59
|
+
* Interactive rendering uses `buildStrokeRibbonGeometry` below because a single
|
|
60
|
+
* outline is unsafe when a freehand path folds back over itself.
|
|
87
61
|
*/
|
|
88
62
|
function buildStrokeOutline(points, size) {
|
|
89
63
|
const n = points.length;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BoardGeoKind } from "../../protocol/dist/board-node.js";
|
|
2
|
-
import "../../protocol/dist/index.js";
|
|
3
2
|
import { BoardFrame } from "../../protocol/dist/board-document.js";
|
|
3
|
+
import "../../protocol/dist/index.js";
|
|
4
4
|
import { Rect, WorldPoint } from "../geometry.js";
|
|
5
5
|
//#region src/board/core/shape-types.d.ts
|
|
6
6
|
/**
|
|
@@ -28,6 +28,7 @@ function buildContext(input) {
|
|
|
28
28
|
},
|
|
29
29
|
colors: input.colors ?? buildFallbackShapeColors(input.colorScheme),
|
|
30
30
|
colorScheme: input.colorScheme,
|
|
31
|
+
rendererType: "canvas",
|
|
31
32
|
zoom: input.scale,
|
|
32
33
|
assetKey: input.assetKey ?? imageAssetKey,
|
|
33
34
|
getTexture: (key) => textures.get(key) ?? null,
|
package/dist/board/geometry.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BoardCameraFocus, BoardCameraFocusParams, BoardCameraState } from "../protocol/dist/board.js";
|
|
2
|
-
import "../protocol/dist/index.js";
|
|
3
2
|
import { BoardFrame, BoardViewport } from "../protocol/dist/board-document.js";
|
|
3
|
+
import "../protocol/dist/index.js";
|
|
4
4
|
//#region src/board/geometry.d.ts
|
|
5
5
|
type Point = {
|
|
6
6
|
x: number;
|
package/dist/board/index.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ import { AUTO_BOARD_CONNECTION_ANCHOR, BOARD_CONNECTION_DIRECTIONS, BOARD_CONNEC
|
|
|
3
3
|
import { BoardTrackInterpolation } from "../protocol/dist/board-composition.js";
|
|
4
4
|
import { BOARD_DOCUMENT_KIND, BOARD_EXTENSION, BoardCameraFocus, BoardCameraFocusParams, BoardCameraFocusParamsSchema, BoardCameraFocusSchema, BoardCameraState, BoardCameraStateSchema, isBoardPath, parseBoardManifest, serializeBoardManifest } from "../protocol/dist/board.js";
|
|
5
5
|
import { BoardColorId } from "../protocol/dist/board-node.js";
|
|
6
|
-
import "../protocol/dist/index.js";
|
|
7
|
-
import { BOARD_CHANNELS, BoardExtensionDefinition, BoardExtensionRegistry, BoardPresetDefinition, CompositionInput, DEFAULT_BOARD_LIMITS, ProceduralClipInput, QualityProfile, RenderBounds, SampledTrack, TrackInput, compileComposition, composition, createBoardExtensionRegistry, proceduralClip, sampleCompositionTracks, sampleEasing, sampleTrack, track } from "./animation.js";
|
|
8
6
|
import { BOARD_REMOTE_URL_MAX_LENGTH, BoardRemoteUrlSchema, isPublicBoardRemoteAddress, normalizeBoardRemoteUrl } from "../protocol/dist/board-url.js";
|
|
9
7
|
import { BOARD_TASK_ARTIFACT_LIMIT, BoardAppearance, BoardAppearanceSchema, BoardArrowItem, BoardArrowItemSchema, BoardAudioItem, BoardAudioItemSchema, BoardDocument, BoardDocumentSchema, BoardDrawItem, BoardDrawItemSchema, BoardFileItem, BoardFileItemSchema, BoardFileSnapshot, BoardFileSnapshotSchema, BoardFrame, BoardFrameItem, BoardFrameItemSchema, BoardFrameSchema, BoardGeoItem, BoardGeoItemSchema, BoardImageItem, BoardImageItemSchema, BoardItem, BoardItemSchema, BoardItemStyle, BoardItemStyleSchema, BoardKnownItem, BoardMediaSnapshot, BoardMediaSnapshotSchema, BoardPoint, BoardPointSchema, BoardTaskArtifact, BoardTaskArtifactSchema, BoardTaskItem, BoardTaskItemSchema, BoardTaskSnapshot, BoardTaskSnapshotSchema, BoardTextItem, BoardTextItemSchema, BoardUnknownItem, BoardVideoItem, BoardVideoItemSchema, BoardViewport, BoardViewportSchema, DrawPoint, DrawPointSchema, KNOWN_BOARD_ITEM_TYPES, KnownBoardItemType, SpaceFileRef, SpaceFileRefSchema, UNKNOWN_BOARD_ITEM_TYPE, isFileBackedItem, isMediaItem, isUnknownItem, parseBoardDocument, parseBoardItemLoose, unknownRealType, withResolvedConnections } from "../protocol/dist/board-document.js";
|
|
8
|
+
import { boardArrowFrame } from "../protocol/dist/board-geometry.js";
|
|
9
|
+
import "../protocol/dist/index.js";
|
|
10
|
+
import { BOARD_CHANNELS, BoardExtensionDefinition, BoardExtensionRegistry, BoardPresetDefinition, CompositionInput, DEFAULT_BOARD_LIMITS, ProceduralClipInput, QualityProfile, RenderBounds, SampledTrack, TrackInput, compileComposition, composition, createBoardExtensionRegistry, proceduralClip, sampleCompositionTracks, sampleEasing, sampleTrack, track } from "./animation.js";
|
|
10
11
|
import { BoardNormalizedPoint, BoardScreenOffset, BoardScreenPoint, BoardWorldOffset, BoardWorldPoint, BoardWorldRect, CORNER_RESIZE_HANDLES, CORNER_ROTATION_ZONE_WIDTH, CornerResizeHandle, EDGE_RESIZE_HANDLES, FIT_PADDING, HANDLE_DIRECTION, HANDLE_HIT_RADIUS, MAX_BOARD_ZOOM, MIN_BOARD_ZOOM, MIN_ITEM_SIZE, Point, RESIZE_HANDLES, ROTATION_HANDLE_OFFSET, Rect, ResizeHandle, ScreenPoint, Size, VIEWPORT_MARGIN_RATIO, WorldPoint, angleFromCenter, cameraForFocus, cameraForRect, cameraForState, clamp, clampZoom, degToRad, expandRect, fitToContent, frameContainsPoint, frameCornerRotationHandleAt, frameCorners, frameEdgeHandleAt, frameHandlePosition, frameRayIntersection, frameRect, handlePosition, itemBounds, normalizeRotation, normalizeViewport, normalizedPoint, panBy, pointToWorld, pointsBounds, radToDeg, rectCenter, rectContainsPoint, rectForCameraFocus, rectsIntersect, resizeFrame, resizeFrameToSize, rotateFrames, rotatePointAround, rotationHandleAnchor, rotationHandlePosition, scaleFrames, screenOffset, screenPoint, screenToWorld, selectionBounds, unionRects, visibleWorldRect, worldOffset, worldPoint, worldRect, worldToScreen, zoomAround } from "./geometry.js";
|
|
11
12
|
import { ResolvedArrow, arrowBounds, arrowFrame, distanceToArrow, resolveArrow, sampleArrow, translateArrow } from "./core/arrow-geometry.js";
|
|
12
13
|
import { CONNECTION_ENDPOINT_GAP, ConnectionIndex, FrameLookup, ResolvedConnection, ResolvedConnectionEndpoint, anchorPointOnFrame, anchorToWorld, autoConnectionSide, connectionArrowheads, connectionBounds, connectionHitTest, createConnectionIndex, distanceToConnection, pathMidpoint, resolveConnection, worldToAnchor } from "./core/connections.js";
|
|
@@ -26,4 +27,4 @@ import { BoardAssetSource, BoardPlayableMedia, playableBoardMedia, playableBoard
|
|
|
26
27
|
import { patchBoardAppearance } from "./mutation.js";
|
|
27
28
|
import { applyBoardSemanticCommands, boardDocumentToSemanticCommands } from "./semantic-mutation.js";
|
|
28
29
|
import { featuredTaskArtifact, rankedTaskArtifacts, taskArtifactPreviewUrl, taskArtifacts, taskRunToBoardTaskSnapshot } from "./task.js";
|
|
29
|
-
export { AUTO_BOARD_CONNECTION_ANCHOR, type ArrowShapeProps, type AudioShapeProps, BOARD_CHANNELS, BOARD_COLORS, BOARD_CONNECTION_DIRECTIONS, BOARD_CONNECTION_LINES, BOARD_CONNECTION_ROUTINGS, BOARD_CONNECTION_SIDES, BOARD_DOCUMENT_KIND, BOARD_EXPORT_DEFAULT_PADDING, BOARD_EXPORT_DEFAULT_SCALE, BOARD_EXPORT_ITEM_WARN_THRESHOLD, BOARD_EXPORT_MAX_EDGE, BOARD_EXPORT_MAX_PIXELS, BOARD_EXPORT_MAX_TEXTURES, BOARD_EXTENSION, BOARD_REMOTE_URL_MAX_LENGTH, BOARD_STROKE_MAX_SIZE, BOARD_STROKE_MIN_SIZE, BOARD_TASK_ARTIFACT_LIMIT, BoardAppearance, BoardAppearanceSchema, BoardArrowItem, BoardArrowItemSchema, BoardAssetSource, BoardAudioItem, BoardAudioItemSchema, type BoardCameraFocus, type BoardCameraFocusParams, BoardCameraFocusParamsSchema, BoardCameraFocusSchema, type BoardCameraState, BoardCameraStateSchema, BoardColorEntry, type BoardColorId, BoardColorValue, BoardConnection, BoardConnectionAnchor, BoardConnectionAnchorSchema, BoardConnectionDirection, BoardConnectionEndpoint, BoardConnectionEndpointSchema, BoardConnectionInput, BoardConnectionLine, BoardConnectionPatch, BoardConnectionPatchSchema, BoardConnectionRecord, BoardConnectionRouting, BoardConnectionRoutingConfig, BoardConnectionRoutingSchema, BoardConnectionSchema, BoardConnectionSide, BoardConnectionStyle, BoardConnectionStyleSchema, BoardConnectionWaypointSchema, BoardDocument, BoardDocumentSchema, BoardDrawItem, BoardDrawItemSchema, BoardExportAssetSelection, BoardExportPlan, BoardExportPlanInput, BoardExportRegion, BoardExtensionDefinition, BoardExtensionRegistry, BoardFileItem, BoardFileItemSchema, BoardFileSnapshot, BoardFileSnapshotFacts, BoardFileSnapshotSchema, BoardFrame, BoardFrameItem, BoardFrameItemSchema, BoardFrameSchema, BoardGeoItem, BoardGeoItemSchema, BoardImageItem, BoardImageItemSchema, BoardItem, BoardItemSchema, BoardItemStyle, BoardItemStyleSchema, BoardKnownItem, BoardMediaKind, BoardMediaSnapshot, BoardMediaSnapshotSchema, BoardNormalizedPoint, BoardPlayableMedia, BoardPoint, BoardPointSchema, BoardPresetDefinition, BoardRelationSchema, BoardRemoteUrlSchema, BoardScreenOffset, BoardScreenPoint, BoardShapeColors, BoardStyledToolId, BoardTaskArtifact, BoardTaskArtifactSchema, BoardTaskItem, BoardTaskItemSchema, BoardTaskSnapshot, BoardTaskSnapshotSchema, BoardTextItem, BoardTextItemSchema, BoardToolStyleMap, BoardToolStylePatch, type BoardTrackInterpolation, BoardUnknownItem, BoardVideoItem, BoardVideoItemSchema, BoardViewport, BoardViewportSchema, BoardWorldOffset, BoardWorldPoint, BoardWorldRect, BuildSnapshotInput, CONNECTION_ENDPOINT_GAP, CORNER_RESIZE_HANDLES, CORNER_ROTATION_ZONE_WIDTH, CompositionInput, ConnectionIndex, CornerResizeHandle, DEFAULT_BOARD_APPEARANCE, DEFAULT_BOARD_COLOR, DEFAULT_BOARD_CONNECTION_ROUTING, DEFAULT_BOARD_CONNECTION_STYLE, DEFAULT_BOARD_LIMITS, DEFAULT_BOARD_RELATION, DEFAULT_BOARD_TOOL_STYLES, DrawPoint, DrawPointSchema, type DrawShapeProps, EDGE_RESIZE_HANDLES, FILE_EXCERPT_MAX_BYTES, FILE_EXCERPT_MAX_CHARS, FIT_PADDING, FULL_CAPABILITIES, FileAvailability, FilePreviewKind, FrameLookup, GEO_KINDS, type GeoKind, type GeoShapeProps, HANDLE_DIRECTION, HANDLE_HIT_RADIUS, type HandleDragResult, type ImageShapeProps, KNOWN_BOARD_ITEM_TYPES, KnownBoardItemType, MAX_BOARD_ZOOM, MIN_BOARD_ZOOM, MIN_ITEM_SIZE, Point, ProceduralClipInput, QualityProfile, RESIZE_HANDLES, ROTATION_HANDLE_OFFSET, Rect, RenderBounds, ResizeHandle, ResolvedArrow, ResolvedConnection, ResolvedConnectionEndpoint, ResolvedCover, SampledTrack, ScreenPoint, type ShapeCapabilities, ShapeDefinition, type ShapeGeometry, type ShapeHandle, type ShapeHandleId, type ShapeResizeMode, Size, SpaceFileRef, SpaceFileRefSchema, StrokeRibbonGeometry, TEXT_FONT_FAMILY, TEXT_FONT_SIZE, TEXT_LINE_HEIGHT, TEXT_MAX_FONT_SIZE, TEXT_MIN_FONT_SIZE, type TextShapeProps, TrackInput, UNKNOWN_BOARD_ITEM_TYPE, VIEWPORT_MARGIN_RATIO, type VideoShapeProps, WorldPoint, anchorPointOnFrame, anchorToWorld, angleFromCenter, applyBoardAuthoringSnapshot, applyBoardSemanticCommands, arrowBounds, arrowFrame, autoConnectionSide, availabilityFromError, boardAuthoringItemToDocumentItem, boardAuthoringSnapshotToDocument, boardColorCssVar, boardDocumentToSemanticCommands, boardFrameLookup, boardImageKeySource, boardItemToAuthoringItem, boardTextLineHeight, buildFallbackShapeColors, buildFileExcerpt, buildFileSnapshot, buildStrokeOutline, buildStrokeRibbonGeometry, cameraForFocus, cameraForRect, cameraForState, clamp, clampBoardStrokeSize, clampBoardTextFontSize, clampZoom, compileComposition, composition, computeDrawBounds, connectionArrowheads, connectionBounds, connectionHitTest, connectionItemIds, connectionOtherItemId, connectionTouchesItem, createBoardConnection, createBoardExtensionRegistry, createBoardToolStyles, createConnectionIndex, definitionForItem, degToRad, distanceToArrow, distanceToConnection, distanceToStroke, expandRect, exportConnectionBounds, exportItemBounds, featuredTaskArtifact, fileBaseName, filePreviewKind, filePreviewMemoKey, filePreviewScope, fileTypeLabel, fitToContent, flipBoardConnection, formatFileSize, frameContainsPoint, frameCornerRotationHandleAt, frameCorners, frameEdgeHandleAt, frameHandlePosition, frameRayIntersection, frameRect, getMediaExtension, getMediaResourceTitle, getShapeDefinition, handlePosition, imageAssetKey, inferBoardMediaKind, isBoardColorId, isBoardPath, isFileBackedItem, isFileSnapshotFresh, isGeoKind, isMediaItem, isPublicBoardRemoteAddress, isStrokeCorner, isUnknownItem, itemBounds, measureBoardText, mergeFileSnapshot, normalizeBoardConnectionStyle, normalizeBoardDocument, normalizeBoardRemoteUrl, normalizeRotation, normalizeViewport, normalizedPoint, panBy, parseBoardDocument, parseBoardItemLoose, parseBoardManifest, patchBoardAppearance, pathMidpoint, pickBoardColor, planBoardExport, playableBoardMedia, playableBoardMediaList, pointToWorld, pointsBounds, proceduralClip, radToDeg, rankedTaskArtifacts, readCoverFromFrontmatter, readTitleFromFrontmatter, rectCenter, rectContainsPoint, rectForCameraFocus, rectsIntersect, registerShapeDefinition, resetBoardPlaybackUrlCache, resizeFrame, resizeFrameToSize, resizeModeForCapabilities, resolveArrow, resolveBoardColor, resolveConnection, resolveCoverRef, resolveSpacePath, rotateFrames, rotatePointAround, rotationHandleAnchor, rotationHandlePosition, sampleArrow, sampleCompositionTracks, sampleEasing, sampleRadius, sampleTrack, scaleFrames, screenOffset, screenPoint, screenToWorld, selectBoardExportAssets, selectionBounds, serializeBoardManifest, setBoardTextMeasurer, shapeBounds, shapeCapabilities, shapeHandles, shapeHitTest, shapeResizeMode, shouldFetchFileExcerpt, simplifyDrawIndices, splitFrontmatter, taskArtifactPreviewUrl, taskArtifacts, taskRunToBoardTaskSnapshot, track, translateArrow, unionRects, unknownRealType, unknownShapeDefinition, visibleWorldRect, withResolvedConnections, worldOffset, worldPoint, worldRect, worldToAnchor, worldToScreen, zoomAround };
|
|
30
|
+
export { AUTO_BOARD_CONNECTION_ANCHOR, type ArrowShapeProps, type AudioShapeProps, BOARD_CHANNELS, BOARD_COLORS, BOARD_CONNECTION_DIRECTIONS, BOARD_CONNECTION_LINES, BOARD_CONNECTION_ROUTINGS, BOARD_CONNECTION_SIDES, BOARD_DOCUMENT_KIND, BOARD_EXPORT_DEFAULT_PADDING, BOARD_EXPORT_DEFAULT_SCALE, BOARD_EXPORT_ITEM_WARN_THRESHOLD, BOARD_EXPORT_MAX_EDGE, BOARD_EXPORT_MAX_PIXELS, BOARD_EXPORT_MAX_TEXTURES, BOARD_EXTENSION, BOARD_REMOTE_URL_MAX_LENGTH, BOARD_STROKE_MAX_SIZE, BOARD_STROKE_MIN_SIZE, BOARD_TASK_ARTIFACT_LIMIT, BoardAppearance, BoardAppearanceSchema, BoardArrowItem, BoardArrowItemSchema, BoardAssetSource, BoardAudioItem, BoardAudioItemSchema, type BoardCameraFocus, type BoardCameraFocusParams, BoardCameraFocusParamsSchema, BoardCameraFocusSchema, type BoardCameraState, BoardCameraStateSchema, BoardColorEntry, type BoardColorId, BoardColorValue, BoardConnection, BoardConnectionAnchor, BoardConnectionAnchorSchema, BoardConnectionDirection, BoardConnectionEndpoint, BoardConnectionEndpointSchema, BoardConnectionInput, BoardConnectionLine, BoardConnectionPatch, BoardConnectionPatchSchema, BoardConnectionRecord, BoardConnectionRouting, BoardConnectionRoutingConfig, BoardConnectionRoutingSchema, BoardConnectionSchema, BoardConnectionSide, BoardConnectionStyle, BoardConnectionStyleSchema, BoardConnectionWaypointSchema, BoardDocument, BoardDocumentSchema, BoardDrawItem, BoardDrawItemSchema, BoardExportAssetSelection, BoardExportPlan, BoardExportPlanInput, BoardExportRegion, BoardExtensionDefinition, BoardExtensionRegistry, BoardFileItem, BoardFileItemSchema, BoardFileSnapshot, BoardFileSnapshotFacts, BoardFileSnapshotSchema, BoardFrame, BoardFrameItem, BoardFrameItemSchema, BoardFrameSchema, BoardGeoItem, BoardGeoItemSchema, BoardImageItem, BoardImageItemSchema, BoardItem, BoardItemSchema, BoardItemStyle, BoardItemStyleSchema, BoardKnownItem, BoardMediaKind, BoardMediaSnapshot, BoardMediaSnapshotSchema, BoardNormalizedPoint, BoardPlayableMedia, BoardPoint, BoardPointSchema, BoardPresetDefinition, BoardRelationSchema, BoardRemoteUrlSchema, BoardScreenOffset, BoardScreenPoint, BoardShapeColors, BoardStyledToolId, BoardTaskArtifact, BoardTaskArtifactSchema, BoardTaskItem, BoardTaskItemSchema, BoardTaskSnapshot, BoardTaskSnapshotSchema, BoardTextItem, BoardTextItemSchema, BoardToolStyleMap, BoardToolStylePatch, type BoardTrackInterpolation, BoardUnknownItem, BoardVideoItem, BoardVideoItemSchema, BoardViewport, BoardViewportSchema, BoardWorldOffset, BoardWorldPoint, BoardWorldRect, BuildSnapshotInput, CONNECTION_ENDPOINT_GAP, CORNER_RESIZE_HANDLES, CORNER_ROTATION_ZONE_WIDTH, CompositionInput, ConnectionIndex, CornerResizeHandle, DEFAULT_BOARD_APPEARANCE, DEFAULT_BOARD_COLOR, DEFAULT_BOARD_CONNECTION_ROUTING, DEFAULT_BOARD_CONNECTION_STYLE, DEFAULT_BOARD_LIMITS, DEFAULT_BOARD_RELATION, DEFAULT_BOARD_TOOL_STYLES, DrawPoint, DrawPointSchema, type DrawShapeProps, EDGE_RESIZE_HANDLES, FILE_EXCERPT_MAX_BYTES, FILE_EXCERPT_MAX_CHARS, FIT_PADDING, FULL_CAPABILITIES, FileAvailability, FilePreviewKind, FrameLookup, GEO_KINDS, type GeoKind, type GeoShapeProps, HANDLE_DIRECTION, HANDLE_HIT_RADIUS, type HandleDragResult, type ImageShapeProps, KNOWN_BOARD_ITEM_TYPES, KnownBoardItemType, MAX_BOARD_ZOOM, MIN_BOARD_ZOOM, MIN_ITEM_SIZE, Point, ProceduralClipInput, QualityProfile, RESIZE_HANDLES, ROTATION_HANDLE_OFFSET, Rect, RenderBounds, ResizeHandle, ResolvedArrow, ResolvedConnection, ResolvedConnectionEndpoint, ResolvedCover, SampledTrack, ScreenPoint, type ShapeCapabilities, ShapeDefinition, type ShapeGeometry, type ShapeHandle, type ShapeHandleId, type ShapeResizeMode, Size, SpaceFileRef, SpaceFileRefSchema, StrokeRibbonGeometry, TEXT_FONT_FAMILY, TEXT_FONT_SIZE, TEXT_LINE_HEIGHT, TEXT_MAX_FONT_SIZE, TEXT_MIN_FONT_SIZE, type TextShapeProps, TrackInput, UNKNOWN_BOARD_ITEM_TYPE, VIEWPORT_MARGIN_RATIO, type VideoShapeProps, WorldPoint, anchorPointOnFrame, anchorToWorld, angleFromCenter, applyBoardAuthoringSnapshot, applyBoardSemanticCommands, arrowBounds, arrowFrame, autoConnectionSide, availabilityFromError, boardAuthoringItemToDocumentItem, boardAuthoringSnapshotToDocument, boardColorCssVar, boardDocumentToSemanticCommands, boardFrameLookup, boardImageKeySource, boardItemToAuthoringItem, boardTextLineHeight, buildFallbackShapeColors, buildFileExcerpt, buildFileSnapshot, buildStrokeOutline, buildStrokeRibbonGeometry, cameraForFocus, cameraForRect, cameraForState, clamp, clampBoardStrokeSize, clampBoardTextFontSize, clampZoom, compileComposition, composition, boardArrowFrame as computeArrowFrame, computeDrawBounds, connectionArrowheads, connectionBounds, connectionHitTest, connectionItemIds, connectionOtherItemId, connectionTouchesItem, createBoardConnection, createBoardExtensionRegistry, createBoardToolStyles, createConnectionIndex, definitionForItem, degToRad, distanceToArrow, distanceToConnection, distanceToStroke, expandRect, exportConnectionBounds, exportItemBounds, featuredTaskArtifact, fileBaseName, filePreviewKind, filePreviewMemoKey, filePreviewScope, fileTypeLabel, fitToContent, flipBoardConnection, formatFileSize, frameContainsPoint, frameCornerRotationHandleAt, frameCorners, frameEdgeHandleAt, frameHandlePosition, frameRayIntersection, frameRect, getMediaExtension, getMediaResourceTitle, getShapeDefinition, handlePosition, imageAssetKey, inferBoardMediaKind, isBoardColorId, isBoardPath, isFileBackedItem, isFileSnapshotFresh, isGeoKind, isMediaItem, isPublicBoardRemoteAddress, isStrokeCorner, isUnknownItem, itemBounds, measureBoardText, mergeFileSnapshot, normalizeBoardConnectionStyle, normalizeBoardDocument, normalizeBoardRemoteUrl, normalizeRotation, normalizeViewport, normalizedPoint, panBy, parseBoardDocument, parseBoardItemLoose, parseBoardManifest, patchBoardAppearance, pathMidpoint, pickBoardColor, planBoardExport, playableBoardMedia, playableBoardMediaList, pointToWorld, pointsBounds, proceduralClip, radToDeg, rankedTaskArtifacts, readCoverFromFrontmatter, readTitleFromFrontmatter, rectCenter, rectContainsPoint, rectForCameraFocus, rectsIntersect, registerShapeDefinition, resetBoardPlaybackUrlCache, resizeFrame, resizeFrameToSize, resizeModeForCapabilities, resolveArrow, resolveBoardColor, resolveConnection, resolveCoverRef, resolveSpacePath, rotateFrames, rotatePointAround, rotationHandleAnchor, rotationHandlePosition, sampleArrow, sampleCompositionTracks, sampleEasing, sampleRadius, sampleTrack, scaleFrames, screenOffset, screenPoint, screenToWorld, selectBoardExportAssets, selectionBounds, serializeBoardManifest, setBoardTextMeasurer, shapeBounds, shapeCapabilities, shapeHandles, shapeHitTest, shapeResizeMode, shouldFetchFileExcerpt, simplifyDrawIndices, splitFrontmatter, taskArtifactPreviewUrl, taskArtifacts, taskRunToBoardTaskSnapshot, track, translateArrow, unionRects, unknownRealType, unknownShapeDefinition, visibleWorldRect, withResolvedConnections, worldOffset, worldPoint, worldRect, worldToAnchor, worldToScreen, zoomAround };
|
package/dist/board/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { AUTO_BOARD_CONNECTION_ANCHOR, BOARD_CONNECTION_DIRECTIONS, BOARD_CONNEC
|
|
|
3
3
|
import { BOARD_DOCUMENT_KIND, BOARD_EXTENSION, BoardCameraFocusParamsSchema, BoardCameraFocusSchema, BoardCameraStateSchema, isBoardPath, parseBoardManifest, serializeBoardManifest } from "../protocol/dist/board.js";
|
|
4
4
|
import { BOARD_REMOTE_URL_MAX_LENGTH, BoardRemoteUrlSchema, isPublicBoardRemoteAddress, normalizeBoardRemoteUrl } from "../protocol/dist/board-url.js";
|
|
5
5
|
import { BOARD_TASK_ARTIFACT_LIMIT, BoardAppearanceSchema, BoardArrowItemSchema, BoardAudioItemSchema, BoardDocumentSchema, BoardDrawItemSchema, BoardFileItemSchema, BoardFileSnapshotSchema, BoardFrameItemSchema, BoardFrameSchema, BoardGeoItemSchema, BoardImageItemSchema, BoardItemSchema, BoardItemStyleSchema, BoardMediaSnapshotSchema, BoardPointSchema, BoardTaskArtifactSchema, BoardTaskItemSchema, BoardTaskSnapshotSchema, BoardTextItemSchema, BoardVideoItemSchema, BoardViewportSchema, DrawPointSchema, KNOWN_BOARD_ITEM_TYPES, SpaceFileRefSchema, UNKNOWN_BOARD_ITEM_TYPE, isFileBackedItem, isMediaItem, isUnknownItem, parseBoardDocument, parseBoardItemLoose, unknownRealType, withResolvedConnections } from "../protocol/dist/board-document.js";
|
|
6
|
+
import { boardArrowFrame } from "../protocol/dist/board-geometry.js";
|
|
6
7
|
import { BOARD_CHANNELS, BoardExtensionRegistry, DEFAULT_BOARD_LIMITS, compileComposition, composition, createBoardExtensionRegistry, proceduralClip, sampleCompositionTracks, sampleEasing, sampleTrack, track } from "./animation.js";
|
|
7
8
|
import { CORNER_RESIZE_HANDLES, CORNER_ROTATION_ZONE_WIDTH, EDGE_RESIZE_HANDLES, FIT_PADDING, HANDLE_DIRECTION, HANDLE_HIT_RADIUS, MAX_BOARD_ZOOM, MIN_BOARD_ZOOM, MIN_ITEM_SIZE, RESIZE_HANDLES, ROTATION_HANDLE_OFFSET, VIEWPORT_MARGIN_RATIO, angleFromCenter, cameraForFocus, cameraForRect, cameraForState, clamp, clampZoom, degToRad, expandRect, fitToContent, frameContainsPoint, frameCornerRotationHandleAt, frameCorners, frameEdgeHandleAt, frameHandlePosition, frameRayIntersection, frameRect, handlePosition, itemBounds, normalizeRotation, normalizeViewport, normalizedPoint, panBy, pointToWorld, pointsBounds, radToDeg, rectCenter, rectContainsPoint, rectForCameraFocus, rectsIntersect, resizeFrame, resizeFrameToSize, rotateFrames, rotatePointAround, rotationHandleAnchor, rotationHandlePosition, scaleFrames, screenOffset, screenPoint, screenToWorld, selectionBounds, unionRects, visibleWorldRect, worldOffset, worldPoint, worldRect, worldToScreen, zoomAround } from "./geometry.js";
|
|
8
9
|
import { featuredTaskArtifact, rankedTaskArtifacts, taskArtifactPreviewUrl, taskArtifacts, taskRunToBoardTaskSnapshot } from "./task.js";
|
|
@@ -23,4 +24,4 @@ import { getMediaExtension, getMediaResourceTitle, inferBoardMediaKind } from ".
|
|
|
23
24
|
import { playableBoardMedia, playableBoardMediaList, resetBoardPlaybackUrlCache } from "./media-playback.js";
|
|
24
25
|
import { patchBoardAppearance } from "./mutation.js";
|
|
25
26
|
import { applyBoardSemanticCommands, boardDocumentToSemanticCommands } from "./semantic-mutation.js";
|
|
26
|
-
export { AUTO_BOARD_CONNECTION_ANCHOR, BOARD_CHANNELS, BOARD_COLORS, BOARD_CONNECTION_DIRECTIONS, BOARD_CONNECTION_LINES, BOARD_CONNECTION_ROUTINGS, BOARD_CONNECTION_SIDES, BOARD_DOCUMENT_KIND, BOARD_EXPORT_DEFAULT_PADDING, BOARD_EXPORT_DEFAULT_SCALE, BOARD_EXPORT_ITEM_WARN_THRESHOLD, BOARD_EXPORT_MAX_EDGE, BOARD_EXPORT_MAX_PIXELS, BOARD_EXPORT_MAX_TEXTURES, BOARD_EXTENSION, BOARD_REMOTE_URL_MAX_LENGTH, BOARD_STROKE_MAX_SIZE, BOARD_STROKE_MIN_SIZE, BOARD_TASK_ARTIFACT_LIMIT, BoardAppearanceSchema, BoardArrowItemSchema, BoardAudioItemSchema, BoardCameraFocusParamsSchema, BoardCameraFocusSchema, BoardCameraStateSchema, BoardConnectionAnchorSchema, BoardConnectionEndpointSchema, BoardConnectionPatchSchema, BoardConnectionRoutingSchema, BoardConnectionSchema, BoardConnectionStyleSchema, BoardConnectionWaypointSchema, BoardDocumentSchema, BoardDrawItemSchema, BoardExtensionRegistry, BoardFileItemSchema, BoardFileSnapshotSchema, BoardFrameItemSchema, BoardFrameSchema, BoardGeoItemSchema, BoardImageItemSchema, BoardItemSchema, BoardItemStyleSchema, BoardMediaSnapshotSchema, BoardPointSchema, BoardRelationSchema, BoardRemoteUrlSchema, BoardTaskArtifactSchema, BoardTaskItemSchema, BoardTaskSnapshotSchema, BoardTextItemSchema, BoardVideoItemSchema, BoardViewportSchema, CONNECTION_ENDPOINT_GAP, CORNER_RESIZE_HANDLES, CORNER_ROTATION_ZONE_WIDTH, DEFAULT_BOARD_APPEARANCE, DEFAULT_BOARD_COLOR, DEFAULT_BOARD_CONNECTION_ROUTING, DEFAULT_BOARD_CONNECTION_STYLE, DEFAULT_BOARD_LIMITS, DEFAULT_BOARD_RELATION, DEFAULT_BOARD_TOOL_STYLES, DrawPointSchema, EDGE_RESIZE_HANDLES, FILE_EXCERPT_MAX_BYTES, FILE_EXCERPT_MAX_CHARS, FIT_PADDING, FULL_CAPABILITIES, GEO_KINDS, HANDLE_DIRECTION, HANDLE_HIT_RADIUS, KNOWN_BOARD_ITEM_TYPES, MAX_BOARD_ZOOM, MIN_BOARD_ZOOM, MIN_ITEM_SIZE, RESIZE_HANDLES, ROTATION_HANDLE_OFFSET, SpaceFileRefSchema, TEXT_FONT_FAMILY, TEXT_FONT_SIZE, TEXT_LINE_HEIGHT, TEXT_MAX_FONT_SIZE, TEXT_MIN_FONT_SIZE, UNKNOWN_BOARD_ITEM_TYPE, VIEWPORT_MARGIN_RATIO, anchorPointOnFrame, anchorToWorld, angleFromCenter, applyBoardAuthoringSnapshot, applyBoardSemanticCommands, arrowBounds, arrowFrame, autoConnectionSide, availabilityFromError, boardAuthoringItemToDocumentItem, boardAuthoringSnapshotToDocument, boardColorCssVar, boardDocumentToSemanticCommands, boardFrameLookup, boardImageKeySource, boardItemToAuthoringItem, boardTextLineHeight, buildFallbackShapeColors, buildFileExcerpt, buildFileSnapshot, buildStrokeOutline, buildStrokeRibbonGeometry, cameraForFocus, cameraForRect, cameraForState, clamp, clampBoardStrokeSize, clampBoardTextFontSize, clampZoom, compileComposition, composition, computeDrawBounds, connectionArrowheads, connectionBounds, connectionHitTest, connectionItemIds, connectionOtherItemId, connectionTouchesItem, createBoardConnection, createBoardExtensionRegistry, createBoardToolStyles, createConnectionIndex, definitionForItem, degToRad, distanceToArrow, distanceToConnection, distanceToStroke, expandRect, exportConnectionBounds, exportItemBounds, featuredTaskArtifact, fileBaseName, filePreviewKind, filePreviewMemoKey, filePreviewScope, fileTypeLabel, fitToContent, flipBoardConnection, formatFileSize, frameContainsPoint, frameCornerRotationHandleAt, frameCorners, frameEdgeHandleAt, frameHandlePosition, frameRayIntersection, frameRect, getMediaExtension, getMediaResourceTitle, getShapeDefinition, handlePosition, imageAssetKey, inferBoardMediaKind, isBoardColorId, isBoardPath, isFileBackedItem, isFileSnapshotFresh, isGeoKind, isMediaItem, isPublicBoardRemoteAddress, isStrokeCorner, isUnknownItem, itemBounds, measureBoardText, mergeFileSnapshot, normalizeBoardConnectionStyle, normalizeBoardDocument, normalizeBoardRemoteUrl, normalizeRotation, normalizeViewport, normalizedPoint, panBy, parseBoardDocument, parseBoardItemLoose, parseBoardManifest, patchBoardAppearance, pathMidpoint, pickBoardColor, planBoardExport, playableBoardMedia, playableBoardMediaList, pointToWorld, pointsBounds, proceduralClip, radToDeg, rankedTaskArtifacts, readCoverFromFrontmatter, readTitleFromFrontmatter, rectCenter, rectContainsPoint, rectForCameraFocus, rectsIntersect, registerShapeDefinition, resetBoardPlaybackUrlCache, resizeFrame, resizeFrameToSize, resizeModeForCapabilities, resolveArrow, resolveBoardColor, resolveConnection, resolveCoverRef, resolveSpacePath, rotateFrames, rotatePointAround, rotationHandleAnchor, rotationHandlePosition, sampleArrow, sampleCompositionTracks, sampleEasing, sampleRadius, sampleTrack, scaleFrames, screenOffset, screenPoint, screenToWorld, selectBoardExportAssets, selectionBounds, serializeBoardManifest, setBoardTextMeasurer, shapeBounds, shapeCapabilities, shapeHandles, shapeHitTest, shapeResizeMode, shouldFetchFileExcerpt, simplifyDrawIndices, splitFrontmatter, taskArtifactPreviewUrl, taskArtifacts, taskRunToBoardTaskSnapshot, track, translateArrow, unionRects, unknownRealType, unknownShapeDefinition, visibleWorldRect, withResolvedConnections, worldOffset, worldPoint, worldRect, worldToAnchor, worldToScreen, zoomAround };
|
|
27
|
+
export { AUTO_BOARD_CONNECTION_ANCHOR, BOARD_CHANNELS, BOARD_COLORS, BOARD_CONNECTION_DIRECTIONS, BOARD_CONNECTION_LINES, BOARD_CONNECTION_ROUTINGS, BOARD_CONNECTION_SIDES, BOARD_DOCUMENT_KIND, BOARD_EXPORT_DEFAULT_PADDING, BOARD_EXPORT_DEFAULT_SCALE, BOARD_EXPORT_ITEM_WARN_THRESHOLD, BOARD_EXPORT_MAX_EDGE, BOARD_EXPORT_MAX_PIXELS, BOARD_EXPORT_MAX_TEXTURES, BOARD_EXTENSION, BOARD_REMOTE_URL_MAX_LENGTH, BOARD_STROKE_MAX_SIZE, BOARD_STROKE_MIN_SIZE, BOARD_TASK_ARTIFACT_LIMIT, BoardAppearanceSchema, BoardArrowItemSchema, BoardAudioItemSchema, BoardCameraFocusParamsSchema, BoardCameraFocusSchema, BoardCameraStateSchema, BoardConnectionAnchorSchema, BoardConnectionEndpointSchema, BoardConnectionPatchSchema, BoardConnectionRoutingSchema, BoardConnectionSchema, BoardConnectionStyleSchema, BoardConnectionWaypointSchema, BoardDocumentSchema, BoardDrawItemSchema, BoardExtensionRegistry, BoardFileItemSchema, BoardFileSnapshotSchema, BoardFrameItemSchema, BoardFrameSchema, BoardGeoItemSchema, BoardImageItemSchema, BoardItemSchema, BoardItemStyleSchema, BoardMediaSnapshotSchema, BoardPointSchema, BoardRelationSchema, BoardRemoteUrlSchema, BoardTaskArtifactSchema, BoardTaskItemSchema, BoardTaskSnapshotSchema, BoardTextItemSchema, BoardVideoItemSchema, BoardViewportSchema, CONNECTION_ENDPOINT_GAP, CORNER_RESIZE_HANDLES, CORNER_ROTATION_ZONE_WIDTH, DEFAULT_BOARD_APPEARANCE, DEFAULT_BOARD_COLOR, DEFAULT_BOARD_CONNECTION_ROUTING, DEFAULT_BOARD_CONNECTION_STYLE, DEFAULT_BOARD_LIMITS, DEFAULT_BOARD_RELATION, DEFAULT_BOARD_TOOL_STYLES, DrawPointSchema, EDGE_RESIZE_HANDLES, FILE_EXCERPT_MAX_BYTES, FILE_EXCERPT_MAX_CHARS, FIT_PADDING, FULL_CAPABILITIES, GEO_KINDS, HANDLE_DIRECTION, HANDLE_HIT_RADIUS, KNOWN_BOARD_ITEM_TYPES, MAX_BOARD_ZOOM, MIN_BOARD_ZOOM, MIN_ITEM_SIZE, RESIZE_HANDLES, ROTATION_HANDLE_OFFSET, SpaceFileRefSchema, TEXT_FONT_FAMILY, TEXT_FONT_SIZE, TEXT_LINE_HEIGHT, TEXT_MAX_FONT_SIZE, TEXT_MIN_FONT_SIZE, UNKNOWN_BOARD_ITEM_TYPE, VIEWPORT_MARGIN_RATIO, anchorPointOnFrame, anchorToWorld, angleFromCenter, applyBoardAuthoringSnapshot, applyBoardSemanticCommands, arrowBounds, arrowFrame, autoConnectionSide, availabilityFromError, boardAuthoringItemToDocumentItem, boardAuthoringSnapshotToDocument, boardColorCssVar, boardDocumentToSemanticCommands, boardFrameLookup, boardImageKeySource, boardItemToAuthoringItem, boardTextLineHeight, buildFallbackShapeColors, buildFileExcerpt, buildFileSnapshot, buildStrokeOutline, buildStrokeRibbonGeometry, cameraForFocus, cameraForRect, cameraForState, clamp, clampBoardStrokeSize, clampBoardTextFontSize, clampZoom, compileComposition, composition, boardArrowFrame as computeArrowFrame, computeDrawBounds, connectionArrowheads, connectionBounds, connectionHitTest, connectionItemIds, connectionOtherItemId, connectionTouchesItem, createBoardConnection, createBoardExtensionRegistry, createBoardToolStyles, createConnectionIndex, definitionForItem, degToRad, distanceToArrow, distanceToConnection, distanceToStroke, expandRect, exportConnectionBounds, exportItemBounds, featuredTaskArtifact, fileBaseName, filePreviewKind, filePreviewMemoKey, filePreviewScope, fileTypeLabel, fitToContent, flipBoardConnection, formatFileSize, frameContainsPoint, frameCornerRotationHandleAt, frameCorners, frameEdgeHandleAt, frameHandlePosition, frameRayIntersection, frameRect, getMediaExtension, getMediaResourceTitle, getShapeDefinition, handlePosition, imageAssetKey, inferBoardMediaKind, isBoardColorId, isBoardPath, isFileBackedItem, isFileSnapshotFresh, isGeoKind, isMediaItem, isPublicBoardRemoteAddress, isStrokeCorner, isUnknownItem, itemBounds, measureBoardText, mergeFileSnapshot, normalizeBoardConnectionStyle, normalizeBoardDocument, normalizeBoardRemoteUrl, normalizeRotation, normalizeViewport, normalizedPoint, panBy, parseBoardDocument, parseBoardItemLoose, parseBoardManifest, patchBoardAppearance, pathMidpoint, pickBoardColor, planBoardExport, playableBoardMedia, playableBoardMediaList, pointToWorld, pointsBounds, proceduralClip, radToDeg, rankedTaskArtifacts, readCoverFromFrontmatter, readTitleFromFrontmatter, rectCenter, rectContainsPoint, rectForCameraFocus, rectsIntersect, registerShapeDefinition, resetBoardPlaybackUrlCache, resizeFrame, resizeFrameToSize, resizeModeForCapabilities, resolveArrow, resolveBoardColor, resolveConnection, resolveCoverRef, resolveSpacePath, rotateFrames, rotatePointAround, rotationHandleAnchor, rotationHandlePosition, sampleArrow, sampleCompositionTracks, sampleEasing, sampleRadius, sampleTrack, scaleFrames, screenOffset, screenPoint, screenToWorld, selectBoardExportAssets, selectionBounds, serializeBoardManifest, setBoardTextMeasurer, shapeBounds, shapeCapabilities, shapeHandles, shapeHitTest, shapeResizeMode, shouldFetchFileExcerpt, simplifyDrawIndices, splitFrontmatter, taskArtifactPreviewUrl, taskArtifacts, taskRunToBoardTaskSnapshot, track, translateArrow, unionRects, unknownRealType, unknownShapeDefinition, visibleWorldRect, withResolvedConnections, worldOffset, worldPoint, worldRect, worldToAnchor, worldToScreen, zoomAround };
|
|
@@ -34,6 +34,8 @@ type BoardRenderContext = {
|
|
|
34
34
|
colors: BoardShapeColors;
|
|
35
35
|
/** Resolved color mode, for fallback mapping when colors are unavailable. */
|
|
36
36
|
colorScheme: "dark" | "light";
|
|
37
|
+
/** Rendering backend selected by the host; Canvas uses compatibility paths. */
|
|
38
|
+
rendererType: "gpu" | "canvas";
|
|
37
39
|
/** Current camera zoom — used for text re-rasterisation buckets. */
|
|
38
40
|
zoom: number;
|
|
39
41
|
/** Stable preview texture key for an item, or null when it has no preview. */
|
|
@@ -2,9 +2,23 @@ import { buildStrokeRibbonGeometry, computeDrawBounds } from "../../core/draw-ge
|
|
|
2
2
|
import { pickBoardColor } from "../../core/palette.js";
|
|
3
3
|
import { positionShell } from "./base-card-renderer.js";
|
|
4
4
|
import { drawFarStroke } from "./far-plate.js";
|
|
5
|
-
import { Container, Mesh, MeshGeometry, Texture } from "pixi.js";
|
|
5
|
+
import { Container, Graphics, Mesh, MeshGeometry, Texture } from "pixi.js";
|
|
6
6
|
//#region src/board/render/renderers/draw-card-renderer.ts
|
|
7
7
|
const partsByContainer = /* @__PURE__ */ new WeakMap();
|
|
8
|
+
/** Canvas fallback for environments where Pixi intentionally has no Mesh pipe. */
|
|
9
|
+
function createCanvasStroke(positions, indices, color, alpha) {
|
|
10
|
+
const graphics = new Graphics();
|
|
11
|
+
for (let offset = 0; offset < indices.length; offset += 3) {
|
|
12
|
+
const a = (indices[offset] ?? 0) * 2;
|
|
13
|
+
const b = (indices[offset + 1] ?? 0) * 2;
|
|
14
|
+
const c = (indices[offset + 2] ?? 0) * 2;
|
|
15
|
+
graphics.moveTo(positions[a] ?? 0, positions[a + 1] ?? 0).lineTo(positions[b] ?? 0, positions[b + 1] ?? 0).lineTo(positions[c] ?? 0, positions[c + 1] ?? 0).closePath();
|
|
16
|
+
}
|
|
17
|
+
return graphics.fill({
|
|
18
|
+
color,
|
|
19
|
+
alpha
|
|
20
|
+
});
|
|
21
|
+
}
|
|
8
22
|
function sync(container, item, context) {
|
|
9
23
|
const parts = partsByContainer.get(container);
|
|
10
24
|
if (!parts) return;
|
|
@@ -26,20 +40,22 @@ function sync(container, item, context) {
|
|
|
26
40
|
parts.points = item.points;
|
|
27
41
|
parts.baseWidth = computeDrawBounds(item.points, item.size).width;
|
|
28
42
|
const ribbon = buildStrokeRibbonGeometry(item.points, item.size);
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
const alpha = selected || hovered ? 1 : .92;
|
|
44
|
+
const nextStroke = context.rendererType !== "canvas" ? new Mesh({
|
|
45
|
+
geometry: new MeshGeometry({
|
|
46
|
+
positions: ribbon.positions,
|
|
47
|
+
indices: ribbon.indices
|
|
48
|
+
}),
|
|
35
49
|
texture: Texture.WHITE
|
|
36
|
-
});
|
|
37
|
-
nextStroke
|
|
38
|
-
|
|
50
|
+
}) : createCanvasStroke(ribbon.positions, ribbon.indices, color.stroke, alpha);
|
|
51
|
+
if (nextStroke instanceof Mesh) {
|
|
52
|
+
nextStroke.tint = color.stroke;
|
|
53
|
+
nextStroke.alpha = alpha;
|
|
54
|
+
}
|
|
39
55
|
const previous = parts.stroke;
|
|
40
56
|
parts.stroke = nextStroke;
|
|
41
57
|
parts.root.removeChild(previous);
|
|
42
|
-
previous.destroy(
|
|
58
|
+
previous.destroy();
|
|
43
59
|
parts.root.addChild(nextStroke);
|
|
44
60
|
}
|
|
45
61
|
const previewScale = item.frame.width / Math.max(1e-4, parts.baseWidth);
|
|
@@ -50,13 +66,7 @@ const drawCardRenderer = {
|
|
|
50
66
|
canRender: (item) => item.type === "draw",
|
|
51
67
|
create: (item, context) => {
|
|
52
68
|
const root = new Container();
|
|
53
|
-
const stroke = new
|
|
54
|
-
geometry: new MeshGeometry({
|
|
55
|
-
positions: /* @__PURE__ */ new Float32Array(),
|
|
56
|
-
indices: /* @__PURE__ */ new Uint32Array()
|
|
57
|
-
}),
|
|
58
|
-
texture: Texture.WHITE
|
|
59
|
-
});
|
|
69
|
+
const stroke = new Graphics();
|
|
60
70
|
root.addChild(stroke);
|
|
61
71
|
partsByContainer.set(root, {
|
|
62
72
|
root,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BoardAuthoringItem, BoardAuthoringSnapshot } from "../protocol/dist/board-authoring.js";
|
|
2
2
|
import { BoardMutationReceipt } from "../protocol/dist/board.js";
|
|
3
|
-
import "../protocol/dist/index.js";
|
|
4
3
|
import { BoardDocument, BoardItem } from "../protocol/dist/board-document.js";
|
|
4
|
+
import "../protocol/dist/index.js";
|
|
5
5
|
//#region src/board/semantic-document.d.ts
|
|
6
6
|
declare const DEFAULT_BOARD_APPEARANCE: {
|
|
7
7
|
theme: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BoardAuthoringItemSchema } from "../protocol/dist/board-authoring.js";
|
|
2
2
|
import { BOARD_DOCUMENT_KIND } from "../protocol/dist/board.js";
|
|
3
3
|
import { BoardAppearanceSchema, UNKNOWN_BOARD_ITEM_TYPE, isUnknownItem, parseBoardDocument } from "../protocol/dist/board-document.js";
|
|
4
|
+
import { boardDrawPointsToWorld } from "../protocol/dist/board-geometry.js";
|
|
5
|
+
import { boardAuthoringItemToNode } from "../protocol/dist/board-codec.js";
|
|
4
6
|
//#region src/board/semantic-document.ts
|
|
5
7
|
const DEFAULT_BOARD_APPEARANCE = BoardAppearanceSchema.parse({
|
|
6
8
|
theme: "clean",
|
|
@@ -14,9 +16,16 @@ const DEFAULT_BOARD_APPEARANCE = BoardAppearanceSchema.parse({
|
|
|
14
16
|
});
|
|
15
17
|
/** Convert a public authoring Item to the renderer/editor document shape. */
|
|
16
18
|
function boardAuthoringItemToDocumentItem(item) {
|
|
19
|
+
const node = boardAuthoringItemToNode(item);
|
|
17
20
|
const base = {
|
|
18
21
|
id: item.id,
|
|
19
|
-
frame:
|
|
22
|
+
frame: {
|
|
23
|
+
x: node.x,
|
|
24
|
+
y: node.y,
|
|
25
|
+
width: node.width,
|
|
26
|
+
height: node.height,
|
|
27
|
+
rotation: node.rotation
|
|
28
|
+
},
|
|
20
29
|
...item.parentId !== void 0 ? { parentId: item.parentId } : {},
|
|
21
30
|
...item.locked ? { locked: true } : {},
|
|
22
31
|
...item.metadata ? { metadata: item.metadata } : {}
|
|
@@ -43,7 +52,7 @@ function boardAuthoringItemToDocumentItem(item) {
|
|
|
43
52
|
case "draw": return {
|
|
44
53
|
...base,
|
|
45
54
|
type: "draw",
|
|
46
|
-
points:
|
|
55
|
+
points: node.data.points,
|
|
47
56
|
color: String(style?.color ?? "brand"),
|
|
48
57
|
size: Number(style?.strokeWidth ?? 4)
|
|
49
58
|
};
|
|
@@ -118,7 +127,17 @@ function boardItemToAuthoringItem(item) {
|
|
|
118
127
|
}
|
|
119
128
|
const base = {
|
|
120
129
|
id: item.id,
|
|
121
|
-
|
|
130
|
+
...item.type === "draw" || item.type === "arrow" ? {} : {
|
|
131
|
+
position: {
|
|
132
|
+
x: item.frame.x,
|
|
133
|
+
y: item.frame.y
|
|
134
|
+
},
|
|
135
|
+
size: {
|
|
136
|
+
width: item.frame.width,
|
|
137
|
+
height: item.frame.height
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
rotation: item.frame.rotation,
|
|
122
141
|
...item.parentId !== void 0 ? { parentId: item.parentId } : {},
|
|
123
142
|
...item.locked ? { locked: true } : {},
|
|
124
143
|
...item.metadata ? { metadata: item.metadata } : {}
|
|
@@ -148,7 +167,7 @@ function boardItemToAuthoringItem(item) {
|
|
|
148
167
|
case "draw": return {
|
|
149
168
|
...base,
|
|
150
169
|
type: "draw",
|
|
151
|
-
props: { points: item.points },
|
|
170
|
+
props: { points: boardDrawPointsToWorld(item.points, item.frame.x, item.frame.y) },
|
|
152
171
|
style: {
|
|
153
172
|
color: item.color,
|
|
154
173
|
strokeWidth: item.size
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BoardSemanticCommand } from "../protocol/dist/board-authoring.js";
|
|
2
|
-
import "../protocol/dist/index.js";
|
|
3
2
|
import { BoardDocument } from "../protocol/dist/board-document.js";
|
|
3
|
+
import "../protocol/dist/index.js";
|
|
4
4
|
//#region src/board/semantic-mutation.d.ts
|
|
5
5
|
/** Compile an editor document delta to the public semantic mutation command set. */
|
|
6
6
|
declare function boardDocumentToSemanticCommands(before: BoardDocument, after: BoardDocument): BoardSemanticCommand[];
|
|
@@ -29,7 +29,13 @@ function itemPatch(before, after) {
|
|
|
29
29
|
const beforeAuthoring = semanticItem(before);
|
|
30
30
|
const afterAuthoring = semanticItem(after);
|
|
31
31
|
const patch = {};
|
|
32
|
-
|
|
32
|
+
const beforePosition = "position" in beforeAuthoring ? beforeAuthoring.position : void 0;
|
|
33
|
+
const afterPosition = "position" in afterAuthoring ? afterAuthoring.position : void 0;
|
|
34
|
+
if (!boardJsonEquals(beforePosition, afterPosition) && afterPosition) patch.position = afterPosition;
|
|
35
|
+
const beforeSize = "size" in beforeAuthoring ? beforeAuthoring.size : void 0;
|
|
36
|
+
const afterSize = "size" in afterAuthoring ? afterAuthoring.size : void 0;
|
|
37
|
+
if (!boardJsonEquals(beforeSize, afterSize)) patch.size = afterSize ?? null;
|
|
38
|
+
if (beforeAuthoring.rotation !== afterAuthoring.rotation) patch.rotation = afterAuthoring.rotation;
|
|
33
39
|
const beforeParent = before.parentId ?? null;
|
|
34
40
|
const afterParent = after.parentId ?? null;
|
|
35
41
|
if (beforeParent !== afterParent) patch.parentId = afterParent;
|
package/dist/chunks/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CreateInvitationInput, $i as AppContentKind, $n as SpaceFsCompleteUploadResponse, $r as UserRulesResponse, $t as ReferenceDirection, Aa as BoardPlaybackCommand, Ai as BoardAwarenessUpdatedEvent$1, An as SpaceActivityResponse,
|
|
1
|
+
import { $ as CreateInvitationInput, $i as AppContentKind, $n as SpaceFsCompleteUploadResponse, $r as UserRulesResponse, $t as ReferenceDirection, Aa as BoardPlaybackCommand, Ai as BoardAwarenessUpdatedEvent$1, An as SpaceActivityResponse, Ar as SpacePendingDiffSummary, Ba as BoardAuthoringReadInput, Br as SpaceTurnAuthorFilter, Bt as Permission, Ci as GenerationModelDeclaration, Co as StoredIntermediateMessage, Cr as SpaceInvitationListResponse, Ct as LabelAssignmentRecord, Dn as SpaceAccessPolicy, Ea as BoardCreateInput, Er as SpaceMember, Et as LabelListItem, Fa as BoardSummary, Fo as Usage, Fr as SpaceRole, G as CheckpointDiffFileResponse, H as Channel, Hi as SessionTurnPatchEvent, Hn as SpaceCommerceProduct, In as SpaceCheckpointDetailResponse, Io as BillingPayload, Jn as SpaceConfigUpdateResponse, Jr as UserActivityQuery, Ka as BoardSemanticMutation, Ki as BoardAwarenessUpdate, Kn as SpaceConfigInput, Kr as TaskRunDetailResponse, Kt as PublicUserPageResponse, Li as RealtimePatchOperation, Ln as SpaceCommerceBenefit, Lo as ContentBlock, Mi as BoardPlaybackChangedEvent$1, Mt as ModelCatalogEntry, Na as BoardPlaybackSnapshot, No as SpaceCompletionResult, Nr as SpacePublicProfile, Or as SpaceModListItem, Ot as LabelResourceType, Po as SpaceCompletionStreamEvent, Pr as SpaceRecord, Pt as PaletteOverviewResponse, Q as ClaimReferralResponse, Qn as SpaceFsCompleteUploadInput, Qr as UserProfile, Qt as ReferenceAggregateResponse, Rn as SpaceCommerceBuyerProfile, Rt as PatchResourceLabelsInput, Si as GenerationContentBlock, Sn as SessionTurnsPaginatedResponse, So as SpaceTurnsResponse, Ta as BoardCapabilities, To as TurnIntermediateMessagesFile, Un as SpaceCommerceProductBenefitBinding, Ut as PromptTemplateCatalogResponse, Va as BoardAuthoringSnapshot, Vn as SpaceCommerceOrder, Vo as RequestSource, Wr as SpaceUsageResponse, Wt as PublicReferral, X as CheckpointDiffSummary, Xn as SpaceDefaultResponse, Yn as SpaceCreateResponse, Z as CheckpointRecord, Zn as SpaceEnvInput, Zr as UserActivityResponse, Zt as ReferenceAggregateGroupBy, _n as SessionTurnIndexResponse, _o as SessionForkRecord, _t as InvitationDetail, a as WebsocketClientOptions, ai as ChannelHealth, an as ReferralDashboard, at as CreateSpaceSessionInput, ba as NavigationCall, bn as SessionTurnStreamSnapshotResponse, br as SpaceFsUploadResponse, cr as SpaceFsMoveInput, ct as CronJobUpdatePatch, d as BatchUserProfilesResponse, da as DesktopCommandError, en as ReferenceKind, et as CreateInvitationResponse, fa as DesktopCommandRecord, fr as SpaceFsReadFilesResponse, gn as SessionRecord, go as MessageRecord, hn as SessionMessagesResponse, ho as SpacePublicEndpoints, ht as GlobalSearchType, ii as ChannelConfig, it as CreateSpacePromptResponse, ji as BoardChangedEvent$1, jo as CreateSpaceCompletionInput, jr as SpacePresenceSnapshot, jt as MeResponse, ka as BoardMutationReceipt, kr as SpacePendingDiffFileResponse, l as AcceptInvitationResponse, la as DesktopCommand, lr as SpaceFsPreparingFile, lt as CursorPageInfo, mn as SessionMessagesPaginatedResponse, ni as UserSessionsResponse, nn as ReferenceQueryableType, nr as SpaceFsCreateUploadResponse, pa as DesktopCommandStatus, pn as SessionMessageResponse, pr as SpaceFsTreeResponse, pt as GlobalSearchResponse, qi as AppArtifactDescriptor, qn as SpaceConfigResponse, qr as TaskRunRecord, r as WebsocketClient, rt as CreateSpacePromptInput, s as WebsocketEventPayload, sr as SpaceFsFileResponse, st as CronJobRecord, tn as ReferenceQueryResponse, tr as SpaceFsCreateUploadInput, tt as CreateSpaceInput, vn as SessionTurnResponse, wn as SkillCatalogResponse, wt as LabelItemsResponse, xa as NavigationLaunch, xn as SessionTurnWindowResponse, xo as SessionTurnRecord, xr as SpaceFsWriteFileInput, yn as SessionTurnSignedUrlsResponse, yo as MessageToolCallsFile, zr as SpaceSessionsResponse, zt as PatchResourceLabelsResponse } from "./websocket.js";
|
|
2
2
|
import { n as CohubEnvironment } from "./environment.js";
|
|
3
3
|
import { a as VoiceInputCreateOptions } from "./voice-input.js";
|
|
4
4
|
//#region ../protocol/dist/model/status.d.ts
|
|
@@ -274,6 +274,21 @@ type AppRuntimeInvocationContext = {
|
|
|
274
274
|
turnId?: string;
|
|
275
275
|
toolCallId?: string;
|
|
276
276
|
};
|
|
277
|
+
/** Current navigation context supplied by the embedding Cohub shell. */
|
|
278
|
+
type AppRuntimeShellContext = {
|
|
279
|
+
surface: "workspace" | "background" | "broker";
|
|
280
|
+
space: {
|
|
281
|
+
id: string;
|
|
282
|
+
name?: string | null;
|
|
283
|
+
} | null;
|
|
284
|
+
session: {
|
|
285
|
+
id: string;
|
|
286
|
+
} | null;
|
|
287
|
+
/** The Turn currently in view, not necessarily the Turn being generated. */
|
|
288
|
+
turn: {
|
|
289
|
+
id: string;
|
|
290
|
+
} | null;
|
|
291
|
+
};
|
|
277
292
|
type AppRuntimeGrantSummary = {
|
|
278
293
|
spaceId: string;
|
|
279
294
|
scopes: Permission[];
|
|
@@ -298,6 +313,7 @@ type AppRuntimeContext = {
|
|
|
298
313
|
userUuid: string;
|
|
299
314
|
} | null;
|
|
300
315
|
invocation?: AppRuntimeInvocationContext;
|
|
316
|
+
shell?: AppRuntimeShellContext;
|
|
301
317
|
permissions?: {
|
|
302
318
|
scopes: Permission[];
|
|
303
319
|
appScopes: Permission[];
|
|
@@ -1196,7 +1212,20 @@ declare class SessionMessagesClient {
|
|
|
1196
1212
|
declare class SessionTurnsClient {
|
|
1197
1213
|
private readonly transport;
|
|
1198
1214
|
private readonly sessionId;
|
|
1199
|
-
|
|
1215
|
+
private readonly spaceId;
|
|
1216
|
+
readonly intermediate: {
|
|
1217
|
+
get: (turnId: string, messagesObjectKey?: string | null, options?: {
|
|
1218
|
+
fetch?: Fetch;
|
|
1219
|
+
signal?: AbortSignal;
|
|
1220
|
+
}) => Promise<TurnIntermediateMessagesFile | null>;
|
|
1221
|
+
getToolCalls: (turnId: string, message: StoredIntermediateMessage, options?: {
|
|
1222
|
+
fetch?: Fetch;
|
|
1223
|
+
signal?: AbortSignal;
|
|
1224
|
+
}) => Promise<MessageToolCallsFile | null>;
|
|
1225
|
+
};
|
|
1226
|
+
constructor(transport: HttpTransport, sessionId: string, spaceId: string);
|
|
1227
|
+
private getIntermediate;
|
|
1228
|
+
private getToolCalls;
|
|
1200
1229
|
listPaginated(options?: {
|
|
1201
1230
|
cursor?: number;
|
|
1202
1231
|
limit?: number;
|
|
@@ -1214,7 +1243,7 @@ declare class SessionTurnsClient {
|
|
|
1214
1243
|
}, customFetch?: Fetch): Promise<SessionTurnWindowResponse>;
|
|
1215
1244
|
streamSnapshot(customFetch?: Fetch): Promise<SessionTurnStreamSnapshotResponse>;
|
|
1216
1245
|
get(turnId: string, customFetch?: Fetch): Promise<SessionTurnResponse>;
|
|
1217
|
-
signedUrls(turnId: string, objectKeys: string[]): Promise<SessionTurnSignedUrlsResponse>;
|
|
1246
|
+
signedUrls(turnId: string, objectKeys: string[], customFetch?: Fetch): Promise<SessionTurnSignedUrlsResponse>;
|
|
1218
1247
|
}
|
|
1219
1248
|
declare class SessionRealtimeClient {
|
|
1220
1249
|
private readonly websocketClient;
|
|
@@ -2416,4 +2445,4 @@ declare class CohubHttpClient {
|
|
|
2416
2445
|
}
|
|
2417
2446
|
declare const createHttpClient: (options?: CohubClientOptions) => CohubHttpClient;
|
|
2418
2447
|
//#endregion
|
|
2419
|
-
export { AppUpdateInput as $, sanitizeAccessToken as $n, BuildSpacePathInput as $t, WaitForUiCommandOptions as A, PublicAssetMimeType as An,
|
|
2448
|
+
export { AppUpdateInput as $, sanitizeAccessToken as $n, BuildSpacePathInput as $t, WaitForUiCommandOptions as A, PublicAssetMimeType as An, CreateGenerationTaskRequest as Ar, WorkViewSource as At, AppPromotionCreateInput as B, ModelsApi as Bn, BoardEventName as Bt, DesktopCommandsApi as C, createSessionPatchReducer as Cn, PublicFileCreateUploadResponse as Cr, WorkRecord as Ct, UiCommandStatus as D, SearchApi as Dn, PublicFileUploadPlanEntry as Dr, WorkTargetType as Dt, UiCommandRecord as E, ReferencesApi as En, PublicFileUploadEntryInput as Er, WorkStatus as Et, AppDetailResponse as F, UploadChatAttachmentInput as Fn, PublicGenerationDeclaration as Fr, UserApi as Ft, AppPromotionStatsResponse as G, Fetch as Gn, SpaceChannelBindingRecord as Gt, AppPromotionProvider as H, CronJobsApi as Hn, BoardSubscriptionHandlers as Ht, AppExtractedPageMeta as I, UploadChatImageAttachmentInput as In, ModelStatusEntry as Ir, TasksApi as It, AppRecord as J, HttpTransport as Jn, SpacePublicFilesApi as Jt, AppPublicOwnerRecord as K, HttpError as Kn, SpaceClient as Kt, AppGetResponse as L, UploadPublicAssetInput as Ln, ModelStatusResponse as Lr, BoardAwarenessUpdatedEvent as Lt, AppContent as M, PublicAssetUploadProgress as Mn, GenerationTaskResult as Mr, WorkVisibility as Mt, AppContentDownload as N, PublicAssetUploadProtocol as Nn, GenerationUsageBilling as Nr, ReferralsApi as Nt, UiCommandsApi as O, CreatePublicAssetUploadInput as On, PublicFileUrlResponse as Or, WorkUpdateInput as Ot, AppCreateInput as P, PublicAssetsApi as Pn, ListGenerationModelsResponse as Pr, UsersApi as Pt, AppTargetType as Q, matchesUnauthorizedErrorToken as Qn, BuildSpaceInvitePathInput as Qt, AppMeta as R, SkillsApi as Rn, BoardChangedEvent as Rt, CreateUiCommandInput as S, SessionPatchStatus as Sn, PublicFileCreateUploadInput as Sr, WorkPublicSpaceRecord as St, UiCommandError as T, ReferenceResourceSelector as Tn, PublicFileListResponse as Tr, WorkSessionResponse as Tt, AppPromotionProviderStatus as U, ChannelsApi as Un, SessionEventName as Ut, AppPromotionEventResponse as V, GenerationsApi as Vn, BoardPlaybackChangedEvent as Vt, AppPromotionRecord as W, CohubClientOptions as Wn, SessionSubscriptionHandlers as Wt, AppSessionResponse as X, UnauthorizedContext as Xn, SpacesApi as Xt, AppResolveResponse as Y, RawHttpResponse as Yn, SpaceTurnListOptions as Yt, AppStatus as Z, joinApiUrl as Zn, WebSocketConnectionState as Zt, WorkCommerceEntitlementsResponse as _, parseAssistantMessageCommit as _n, AppNavigationCall as _r, WorkPromotionProvider as _t, AppCommerceCreditConsumeResponse as a, GenerationStreamErrorEvent as an, AppRuntimeCheckoutStatus as ar, AppsApi as at, WorkCommercePurchaseResponse as b, SessionPatchReducer as bn, AppNavigationOpenResponse as br, WorkPromotionStatsResponse as bt, AppCommerceEntitlementsResponse as c, GenerationStreamIntermediateMessage as cn, AppRuntimeModeConfig as cr, WorkContentDownload as ct, AppCommercePurchaseResponse as d, GenerationStreamStateEvent as dn, AppRuntimeTransport as dr, WorkExtractedPageMeta as dt, PublicInviteApi as en, AppContextChangedListener as er, AppVersionRecord as et, WorkCommerceApi as f, GenerationStreamSubscribeOptions as fn, ParentBridgeTransport as fr, WorkGetResponse as ft, WorkCommerceEntitlement as g, createSessionGenerationStreamClient as gn, resolveAppTransport as gr, WorkPromotionEventResponse as gt, WorkCommerceCreditConsumeStatus as h, SessionGenerationStreamClient as hn, createSlugAppIdResolver as hr, WorkPromotionCreateInput as ht, AppCommerceCheckoutStatus as i, GenerationStreamCommitEvent as in, AppRuntimeCheckoutState as ir, AppVisibility as it, AppAuthorizeResponse as j, PublicAssetPurpose as jn, CreateGenerationTaskResponse as jr, WorkViewStatsResponse as jt, WaitForDesktopCommandOptions as k, CreatePublicAssetUploadResponse as kn, SpaceStartupResponse as kr, WorkVersionRecord as kt, AppCommerceOrder as l, GenerationStreamLifecycleEvent as ln, AppRuntimeRequestOptions as lr, WorkCreateInput as lt, WorkCommerceCreditConsumeResponse as m, GenerationStreamTurnUpdatedEvent as mn, createAppRuntime as mr, WorkPresentationMeta as mt, createHttpClient as n, buildSpacePath as nn, AppRuntimeApi as nr, AppViewStatsResponse as nt, AppCommerceCreditConsumeStatus as o, GenerationStreamEvent as on, AppRuntimeContext as or, WorkAuthorizeResponse as ot, WorkCommerceCheckoutStatus as p, GenerationStreamSubscriptionHandlers as pn, PopupBrokerTransport as pr, WorkMeta as pt, AppPublicSpaceRecord as q, HttpTraceContext as qn, SpaceEventName as qt, AppCommerceApi as r, AssistantMessageCommit as rn, AppRuntimeAuthorizationResult as rr, AppViewerGrantRecord as rt, AppCommerceEntitlement as s, GenerationStreamFinalizedEvent as sn, AppRuntimeInvocationContext as sr, WorkContent as st, CohubHttpClient as t, buildSpaceInvitePath as tn, AppIdResolver as tr, AppViewSource as tt, AppCommerceProductResolveResponse as u, GenerationStreamOutOfSyncEvent as un, AppRuntimeShellContext as ur, WorkDetailResponse as ut, WorkCommerceOrder as v, SessionPatchApplyInput as vn, AppNavigationLaunch as vr, WorkPromotionProviderStatus as vt, UiCommand as w, SessionAccessApi as wn, PublicFileListEntry as wr, WorkResolveResponse as wt, CreateDesktopCommandInput as x, SessionPatchState as xn, AppNavigationTarget as xr, WorkPublicOwnerRecord as xt, WorkCommerceProductResolveResponse as y, SessionPatchApplyResult as yn, AppNavigationOpenMessage as yr, WorkPromotionRecord as yt, AppPresentationMeta as z, PromptsApi as zn, BoardClient as zt };
|