@neta-art/cohub 8.5.0 → 8.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/board/core/draw-geometry.d.ts +21 -4
- package/dist/board/core/draw-geometry.js +93 -4
- package/dist/board/core/file-preview.js +1 -1
- package/dist/board/geometry.js +4 -3
- package/dist/board/index.d.ts +2 -2
- package/dist/board/index.js +2 -2
- package/dist/board/render/renderers/draw-card-renderer.js +25 -18
- package/dist/board/render/renderers/file-card-renderer.js +1 -1
- package/dist/board/render/renderers/geo-card-renderer.js +1 -2
- package/dist/board/render/renderers/task-card-renderer.js +7 -8
- package/dist/board/render/renderers/text-card-renderer.js +2 -1
- package/dist/board/render/renderers/unknown-card-renderer.js +1 -1
- package/dist/board/render/text-resolution.js +1 -1
- package/dist/board/render/themes/clean-theme.js +2 -1
- package/dist/chunks/http.d.ts +1 -1
- package/dist/chunks/http.js +15 -14
- package/dist/chunks/transport.js +1 -1
- package/dist/chunks/websocket.d.ts +14 -8
- package/dist/debugger.d.ts +2 -0
- package/dist/debugger.js +48 -38
- package/dist/http.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -6
- package/dist/protocol/dist/app-catalog.d.ts +1 -0
- package/dist/protocol/dist/board-authoring.d.ts +2 -2
- package/dist/protocol/dist/board-capability-registry.js +1 -2
- package/dist/protocol/dist/board-codec.d.ts +2 -1
- package/dist/protocol/dist/board-codec.js +21 -3
- package/dist/protocol/dist/board-composition.js +3 -3
- package/dist/protocol/dist/board-constants.js +2 -3
- package/dist/protocol/dist/board.js +1 -2
- package/dist/protocol/dist/index.d.ts +4 -3
- package/dist/protocol/dist/realtime/types.d.ts +2 -0
- package/dist/voice-input.js +1 -1
- package/package.json +8 -8
- /package/docs/{work-runtime-guide.md → app-runtime-guide.md} +0 -0
package/README.md
CHANGED
|
@@ -339,4 +339,4 @@ viewer a single seat instead.
|
|
|
339
339
|
|
|
340
340
|
For the complete API-to-scope mapping, initialization recipe, capability
|
|
341
341
|
recipes, a full working example, and a pitfalls checklist, see the
|
|
342
|
-
**[App Runtime Guide](./docs/
|
|
342
|
+
**[App Runtime Guide](./docs/app-runtime-guide.md)**.
|
|
@@ -12,14 +12,31 @@ declare function computeDrawBounds(points: DrawPoint[], size: number): Rect;
|
|
|
12
12
|
*/
|
|
13
13
|
declare function simplifyDrawIndices(points: DrawPoint[], tolerance: number): number[];
|
|
14
14
|
/**
|
|
15
|
-
* Build
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Build the legacy closed outline used by exports and callers that need a path.
|
|
16
|
+
* Interactive Board rendering uses `buildStrokeRibbonGeometry` below instead:
|
|
17
|
+
* filling one outline is unsafe when a freehand path folds back over itself.
|
|
18
18
|
*/
|
|
19
19
|
declare function buildStrokeOutline(points: DrawPoint[], size: number): Array<{
|
|
20
20
|
x: number;
|
|
21
21
|
y: number;
|
|
22
22
|
}>;
|
|
23
|
+
/** Whether a sample needs a round join rather than the neighboring segment caps. */
|
|
24
|
+
declare function isStrokeCorner(points: readonly DrawPoint[], index: number): boolean;
|
|
25
|
+
type StrokeRibbonGeometry = {
|
|
26
|
+
positions: Float32Array;
|
|
27
|
+
indices: Uint32Array;
|
|
28
|
+
uvs: Float32Array;
|
|
29
|
+
/** Normalized distance along the centerline for reveal animations. */
|
|
30
|
+
progress: Float32Array;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Tessellate a freehand stroke as independent, convex primitives.
|
|
34
|
+
*
|
|
35
|
+
* A whole-path polygon is deliberately avoided: a path that folds back can make
|
|
36
|
+
* its outline self-intersect, and GPU polygon triangulation then creates a large
|
|
37
|
+
* accidental fill. Segment quads plus round point joins overlap safely instead.
|
|
38
|
+
*/
|
|
39
|
+
declare function buildStrokeRibbonGeometry(points: readonly DrawPoint[], size: number): StrokeRibbonGeometry;
|
|
23
40
|
/**
|
|
24
41
|
* Distance from a world point to the stroke's polyline, in the shape's local
|
|
25
42
|
* space. Used for hit testing: a hit registers within half the stroke width plus
|
|
@@ -27,4 +44,4 @@ declare function buildStrokeOutline(points: DrawPoint[], size: number): Array<{
|
|
|
27
44
|
*/
|
|
28
45
|
declare function distanceToStroke(points: DrawPoint[], local: WorldPoint): number;
|
|
29
46
|
//#endregion
|
|
30
|
-
export { buildStrokeOutline, computeDrawBounds, distanceToStroke, sampleRadius, simplifyDrawIndices };
|
|
47
|
+
export { StrokeRibbonGeometry, buildStrokeOutline, buildStrokeRibbonGeometry, computeDrawBounds, distanceToStroke, isStrokeCorner, sampleRadius, simplifyDrawIndices };
|
|
@@ -81,9 +81,9 @@ function perpendicularDistance(point, a, b) {
|
|
|
81
81
|
return Math.hypot(point.x - projX, point.y - projY);
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* Build
|
|
85
|
-
*
|
|
86
|
-
*
|
|
84
|
+
* Build the legacy closed outline used by exports and callers that need a path.
|
|
85
|
+
* Interactive Board rendering uses `buildStrokeRibbonGeometry` below instead:
|
|
86
|
+
* filling one outline is unsafe when a freehand path folds back over itself.
|
|
87
87
|
*/
|
|
88
88
|
function buildStrokeOutline(points, size) {
|
|
89
89
|
const n = points.length;
|
|
@@ -147,6 +147,95 @@ function buildStrokeOutline(points, size) {
|
|
|
147
147
|
y
|
|
148
148
|
}));
|
|
149
149
|
}
|
|
150
|
+
const RIBBON_CIRCLE_SIDES = 8;
|
|
151
|
+
/** Whether a sample needs a round join rather than the neighboring segment caps. */
|
|
152
|
+
function isStrokeCorner(points, index) {
|
|
153
|
+
if (index === 0 || index === points.length - 1) return true;
|
|
154
|
+
const before = points[index - 1];
|
|
155
|
+
const point = points[index];
|
|
156
|
+
const after = points[index + 1];
|
|
157
|
+
if (!before || !point || !after) return false;
|
|
158
|
+
const ax = point.x - before.x;
|
|
159
|
+
const ay = point.y - before.y;
|
|
160
|
+
const bx = after.x - point.x;
|
|
161
|
+
const by = after.y - point.y;
|
|
162
|
+
const aLength = Math.hypot(ax, ay);
|
|
163
|
+
const bLength = Math.hypot(bx, by);
|
|
164
|
+
if (aLength < 1e-6 || bLength < 1e-6) return true;
|
|
165
|
+
return (ax * bx + ay * by) / (aLength * bLength) < .92;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Tessellate a freehand stroke as independent, convex primitives.
|
|
169
|
+
*
|
|
170
|
+
* A whole-path polygon is deliberately avoided: a path that folds back can make
|
|
171
|
+
* its outline self-intersect, and GPU polygon triangulation then creates a large
|
|
172
|
+
* accidental fill. Segment quads plus round point joins overlap safely instead.
|
|
173
|
+
*/
|
|
174
|
+
function buildStrokeRibbonGeometry(points, size) {
|
|
175
|
+
const positions = [];
|
|
176
|
+
const indices = [];
|
|
177
|
+
const uvs = [];
|
|
178
|
+
const progress = [];
|
|
179
|
+
if (points.length === 0) return {
|
|
180
|
+
positions: /* @__PURE__ */ new Float32Array(),
|
|
181
|
+
indices: /* @__PURE__ */ new Uint32Array(),
|
|
182
|
+
uvs: /* @__PURE__ */ new Float32Array(),
|
|
183
|
+
progress: /* @__PURE__ */ new Float32Array()
|
|
184
|
+
};
|
|
185
|
+
const lengths = new Array(points.length).fill(0);
|
|
186
|
+
for (let i = 1; i < points.length; i += 1) {
|
|
187
|
+
const from = points[i - 1];
|
|
188
|
+
const to = points[i];
|
|
189
|
+
if (from && to) lengths[i] = (lengths[i - 1] ?? 0) + Math.hypot(to.x - from.x, to.y - from.y);
|
|
190
|
+
}
|
|
191
|
+
const total = Math.max(lengths.at(-1) ?? 0, 1e-6);
|
|
192
|
+
const addVertex = (x, y, at) => {
|
|
193
|
+
const normalized = at / total;
|
|
194
|
+
positions.push(x, y);
|
|
195
|
+
uvs.push(normalized, 0);
|
|
196
|
+
progress.push(normalized);
|
|
197
|
+
return positions.length / 2 - 1;
|
|
198
|
+
};
|
|
199
|
+
const addTriangle = (a, b, c) => indices.push(a, b, c);
|
|
200
|
+
const addRoundPoint = (point, at) => {
|
|
201
|
+
const radius = sampleRadius(size, point.p);
|
|
202
|
+
const center = addVertex(point.x, point.y, at);
|
|
203
|
+
const circle = [];
|
|
204
|
+
for (let side = 0; side < RIBBON_CIRCLE_SIDES; side += 1) {
|
|
205
|
+
const angle = side / RIBBON_CIRCLE_SIDES * Math.PI * 2;
|
|
206
|
+
circle.push(addVertex(point.x + Math.cos(angle) * radius, point.y + Math.sin(angle) * radius, at));
|
|
207
|
+
}
|
|
208
|
+
for (let side = 0; side < RIBBON_CIRCLE_SIDES; side += 1) addTriangle(center, circle[side], circle[(side + 1) % RIBBON_CIRCLE_SIDES]);
|
|
209
|
+
};
|
|
210
|
+
for (let i = 0; i < points.length; i += 1) {
|
|
211
|
+
const point = points[i];
|
|
212
|
+
if (!point) continue;
|
|
213
|
+
if (isStrokeCorner(points, i)) addRoundPoint(point, lengths[i] ?? 0);
|
|
214
|
+
if (i === points.length - 1) continue;
|
|
215
|
+
const next = points[i + 1];
|
|
216
|
+
if (!next) continue;
|
|
217
|
+
const dx = next.x - point.x;
|
|
218
|
+
const dy = next.y - point.y;
|
|
219
|
+
const length = Math.hypot(dx, dy);
|
|
220
|
+
if (length < 1e-6) continue;
|
|
221
|
+
const normalX = -dy / length;
|
|
222
|
+
const normalY = dx / length;
|
|
223
|
+
const radius = sampleRadius(size, point.p);
|
|
224
|
+
const leftA = addVertex(point.x + normalX * radius, point.y + normalY * radius, lengths[i] ?? 0);
|
|
225
|
+
const rightA = addVertex(point.x - normalX * radius, point.y - normalY * radius, lengths[i] ?? 0);
|
|
226
|
+
const nextRadius = sampleRadius(size, next.p);
|
|
227
|
+
const leftB = addVertex(next.x + normalX * nextRadius, next.y + normalY * nextRadius, lengths[i + 1] ?? 0);
|
|
228
|
+
const rightB = addVertex(next.x - normalX * nextRadius, next.y - normalY * nextRadius, lengths[i + 1] ?? 0);
|
|
229
|
+
addTriangle(leftA, rightA, leftB);
|
|
230
|
+
addTriangle(rightA, rightB, leftB);
|
|
231
|
+
}
|
|
232
|
+
return {
|
|
233
|
+
positions: new Float32Array(positions),
|
|
234
|
+
indices: new Uint32Array(indices),
|
|
235
|
+
uvs: new Float32Array(uvs),
|
|
236
|
+
progress: new Float32Array(progress)
|
|
237
|
+
};
|
|
238
|
+
}
|
|
150
239
|
/**
|
|
151
240
|
* Distance from a world point to the stroke's polyline, in the shape's local
|
|
152
241
|
* space. Used for hit testing: a hit registers within half the stroke width plus
|
|
@@ -172,4 +261,4 @@ function distanceToStroke(points, local) {
|
|
|
172
261
|
return min;
|
|
173
262
|
}
|
|
174
263
|
//#endregion
|
|
175
|
-
export { buildStrokeOutline, computeDrawBounds, distanceToStroke, sampleRadius, simplifyDrawIndices };
|
|
264
|
+
export { buildStrokeOutline, buildStrokeRibbonGeometry, computeDrawBounds, distanceToStroke, isStrokeCorner, sampleRadius, simplifyDrawIndices };
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* snapshot rides along in every board transaction — so this stays small. */
|
|
20
20
|
const FILE_EXCERPT_MAX_CHARS = 480;
|
|
21
21
|
/** Files above this size are shown as `blank`; we never pull them for a preview. */
|
|
22
|
-
const FILE_EXCERPT_MAX_BYTES =
|
|
22
|
+
const FILE_EXCERPT_MAX_BYTES = 262144;
|
|
23
23
|
/** Frontmatter keys checked for a cover image, in precedence order. */
|
|
24
24
|
const COVER_KEYS = [
|
|
25
25
|
"cover",
|
package/dist/board/geometry.js
CHANGED
|
@@ -409,9 +409,10 @@ function resizeFrame(frame, handle, pointer, minSize = 24, keepAspect = false) {
|
|
|
409
409
|
let width = direction.x !== 0 ? clamp(direction.x * local.x, minSize, Number.POSITIVE_INFINITY) : rect.width;
|
|
410
410
|
let height = direction.y !== 0 ? clamp(direction.y * local.y, minSize, Number.POSITIVE_INFINITY) : rect.height;
|
|
411
411
|
if (keepAspect) {
|
|
412
|
-
if (direction.x !== 0 && direction.y !== 0)
|
|
413
|
-
|
|
414
|
-
|
|
412
|
+
if (direction.x !== 0 && direction.y !== 0) {
|
|
413
|
+
if (Math.abs(width / aspect) > height) height = width / aspect;
|
|
414
|
+
else width = height * aspect;
|
|
415
|
+
} else if (direction.x !== 0) height = width / aspect;
|
|
415
416
|
else if (direction.y !== 0) width = height * aspect;
|
|
416
417
|
width = Math.max(minSize, width);
|
|
417
418
|
height = Math.max(minSize, height);
|
package/dist/board/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { BOARD_TASK_ARTIFACT_LIMIT, BoardAppearance, BoardAppearanceSchema, Boar
|
|
|
10
10
|
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
11
|
import { ResolvedArrow, arrowBounds, arrowFrame, distanceToArrow, resolveArrow, sampleArrow, translateArrow } from "./core/arrow-geometry.js";
|
|
12
12
|
import { CONNECTION_ENDPOINT_GAP, ConnectionIndex, FrameLookup, ResolvedConnection, ResolvedConnectionEndpoint, anchorPointOnFrame, anchorToWorld, autoConnectionSide, connectionArrowheads, connectionBounds, connectionHitTest, createConnectionIndex, distanceToConnection, pathMidpoint, resolveConnection, worldToAnchor } from "./core/connections.js";
|
|
13
|
-
import { buildStrokeOutline, computeDrawBounds, distanceToStroke, sampleRadius, simplifyDrawIndices } from "./core/draw-geometry.js";
|
|
13
|
+
import { StrokeRibbonGeometry, buildStrokeOutline, buildStrokeRibbonGeometry, computeDrawBounds, distanceToStroke, isStrokeCorner, sampleRadius, simplifyDrawIndices } from "./core/draw-geometry.js";
|
|
14
14
|
import { BOARD_EXPORT_MAX_TEXTURES, BoardExportAssetSelection, selectBoardExportAssets } from "./core/export-assets.js";
|
|
15
15
|
import { BOARD_EXPORT_DEFAULT_PADDING, BOARD_EXPORT_DEFAULT_SCALE, BOARD_EXPORT_ITEM_WARN_THRESHOLD, BOARD_EXPORT_MAX_EDGE, BOARD_EXPORT_MAX_PIXELS, BoardExportPlan, BoardExportPlanInput, BoardExportRegion, boardFrameLookup, exportConnectionBounds, exportItemBounds, normalizeBoardDocument, planBoardExport } from "./core/export-plan.js";
|
|
16
16
|
import { BoardFileSnapshotFacts, BuildSnapshotInput, FILE_EXCERPT_MAX_BYTES, FILE_EXCERPT_MAX_CHARS, FileAvailability, FilePreviewKind, ResolvedCover, availabilityFromError, buildFileExcerpt, buildFileSnapshot, fileBaseName, filePreviewKind, filePreviewMemoKey, filePreviewScope, fileTypeLabel, formatFileSize, isFileSnapshotFresh, mergeFileSnapshot, readCoverFromFrontmatter, readTitleFromFrontmatter, resolveCoverRef, resolveSpacePath, shouldFetchFileExcerpt, splitFrontmatter } from "./core/file-preview.js";
|
|
@@ -26,4 +26,4 @@ import { BoardAssetSource, BoardPlayableMedia, playableBoardMedia, playableBoard
|
|
|
26
26
|
import { patchBoardAppearance } from "./mutation.js";
|
|
27
27
|
import { applyBoardSemanticCommands, boardDocumentToSemanticCommands } from "./semantic-mutation.js";
|
|
28
28
|
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, 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, 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, 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 };
|
|
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 };
|
package/dist/board/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { boardImageKeySource, imageAssetKey } from "./image-key.js";
|
|
|
10
10
|
import { DEFAULT_BOARD_APPEARANCE, applyBoardAuthoringSnapshot, boardAuthoringItemToDocumentItem, boardAuthoringSnapshotToDocument, boardItemToAuthoringItem } from "./semantic-document.js";
|
|
11
11
|
import { arrowBounds, arrowFrame, distanceToArrow, resolveArrow, sampleArrow, translateArrow } from "./core/arrow-geometry.js";
|
|
12
12
|
import { CONNECTION_ENDPOINT_GAP, anchorPointOnFrame, anchorToWorld, autoConnectionSide, connectionArrowheads, connectionBounds, connectionHitTest, createConnectionIndex, distanceToConnection, pathMidpoint, resolveConnection, worldToAnchor } from "./core/connections.js";
|
|
13
|
-
import { buildStrokeOutline, computeDrawBounds, distanceToStroke, sampleRadius, simplifyDrawIndices } from "./core/draw-geometry.js";
|
|
13
|
+
import { buildStrokeOutline, buildStrokeRibbonGeometry, computeDrawBounds, distanceToStroke, isStrokeCorner, sampleRadius, simplifyDrawIndices } from "./core/draw-geometry.js";
|
|
14
14
|
import { BOARD_EXPORT_MAX_TEXTURES, selectBoardExportAssets } from "./core/export-assets.js";
|
|
15
15
|
import { BOARD_EXPORT_DEFAULT_PADDING, BOARD_EXPORT_DEFAULT_SCALE, BOARD_EXPORT_ITEM_WARN_THRESHOLD, BOARD_EXPORT_MAX_EDGE, BOARD_EXPORT_MAX_PIXELS, boardFrameLookup, exportConnectionBounds, exportItemBounds, normalizeBoardDocument, planBoardExport } from "./core/export-plan.js";
|
|
16
16
|
import { FILE_EXCERPT_MAX_BYTES, FILE_EXCERPT_MAX_CHARS, availabilityFromError, buildFileExcerpt, buildFileSnapshot, fileBaseName, filePreviewKind, filePreviewMemoKey, filePreviewScope, fileTypeLabel, formatFileSize, isFileSnapshotFresh, mergeFileSnapshot, readCoverFromFrontmatter, readTitleFromFrontmatter, resolveCoverRef, resolveSpacePath, shouldFetchFileExcerpt, splitFrontmatter } from "./core/file-preview.js";
|
|
@@ -23,4 +23,4 @@ import { getMediaExtension, getMediaResourceTitle, inferBoardMediaKind } from ".
|
|
|
23
23
|
import { playableBoardMedia, playableBoardMediaList, resetBoardPlaybackUrlCache } from "./media-playback.js";
|
|
24
24
|
import { patchBoardAppearance } from "./mutation.js";
|
|
25
25
|
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, 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, 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 };
|
|
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 };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildStrokeRibbonGeometry, computeDrawBounds } from "../../core/draw-geometry.js";
|
|
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,
|
|
5
|
+
import { Container, 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
8
|
function sync(container, item, context) {
|
|
@@ -25,21 +25,22 @@ function sync(container, item, context) {
|
|
|
25
25
|
parts.sig = sig;
|
|
26
26
|
parts.points = item.points;
|
|
27
27
|
parts.baseWidth = computeDrawBounds(item.points, item.size).width;
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
28
|
+
const ribbon = buildStrokeRibbonGeometry(item.points, item.size);
|
|
29
|
+
const geometry = new MeshGeometry({
|
|
30
|
+
positions: ribbon.positions,
|
|
31
|
+
indices: ribbon.indices
|
|
32
|
+
});
|
|
33
|
+
const nextStroke = new Mesh({
|
|
34
|
+
geometry,
|
|
35
|
+
texture: Texture.WHITE
|
|
36
|
+
});
|
|
37
|
+
nextStroke.tint = color.stroke;
|
|
38
|
+
nextStroke.alpha = selected || hovered ? 1 : .92;
|
|
39
|
+
const previous = parts.stroke;
|
|
40
|
+
parts.stroke = nextStroke;
|
|
41
|
+
parts.root.removeChild(previous);
|
|
42
|
+
previous.destroy({ children: true });
|
|
43
|
+
parts.root.addChild(nextStroke);
|
|
43
44
|
}
|
|
44
45
|
const previewScale = item.frame.width / Math.max(1e-4, parts.baseWidth);
|
|
45
46
|
parts.stroke.scale.set(Number.isFinite(previewScale) ? previewScale : 1);
|
|
@@ -49,7 +50,13 @@ const drawCardRenderer = {
|
|
|
49
50
|
canRender: (item) => item.type === "draw",
|
|
50
51
|
create: (item, context) => {
|
|
51
52
|
const root = new Container();
|
|
52
|
-
const stroke = new
|
|
53
|
+
const stroke = new Mesh({
|
|
54
|
+
geometry: new MeshGeometry({
|
|
55
|
+
positions: /* @__PURE__ */ new Float32Array(),
|
|
56
|
+
indices: /* @__PURE__ */ new Uint32Array()
|
|
57
|
+
}),
|
|
58
|
+
texture: Texture.WHITE
|
|
59
|
+
});
|
|
53
60
|
root.addChild(stroke);
|
|
54
61
|
partsByContainer.set(root, {
|
|
55
62
|
root,
|
|
@@ -228,7 +228,7 @@ function sync(container, item, context) {
|
|
|
228
228
|
if (detail === "plate") return;
|
|
229
229
|
const title = item.snapshot?.title || fileBaseName(item.ref.path);
|
|
230
230
|
const excerpt = item.snapshot?.excerpt ?? "";
|
|
231
|
-
const innerWidth = Math.max(1, width -
|
|
231
|
+
const innerWidth = Math.max(1, width - 20);
|
|
232
232
|
const textSig = [
|
|
233
233
|
title,
|
|
234
234
|
excerpt,
|
|
@@ -6,7 +6,6 @@ import { drawFarPlate } from "./far-plate.js";
|
|
|
6
6
|
import { Container, Graphics, Text } from "pixi.js";
|
|
7
7
|
//#region src/board/render/renderers/geo-card-renderer.ts
|
|
8
8
|
const RADIUS = 8;
|
|
9
|
-
const LABEL_PADDING = 8;
|
|
10
9
|
const partsByContainer = /* @__PURE__ */ new WeakMap();
|
|
11
10
|
function traceOutline(graphics, geo, width, height) {
|
|
12
11
|
switch (geo) {
|
|
@@ -68,7 +67,7 @@ function sync(container, item, context) {
|
|
|
68
67
|
parts.label.visible = item.text.length > 0;
|
|
69
68
|
parts.label.style.fill = color.label;
|
|
70
69
|
}
|
|
71
|
-
syncTextWrapWidth(parts.label, parts, Math.max(1, width -
|
|
70
|
+
syncTextWrapWidth(parts.label, parts, Math.max(1, width - 16), resizing);
|
|
72
71
|
parts.label.position.set(width / 2, height / 2);
|
|
73
72
|
}
|
|
74
73
|
const geoCardRenderer = {
|
|
@@ -141,12 +141,11 @@ function drawStateMark(graphics, surface, cx, cy, color) {
|
|
|
141
141
|
}
|
|
142
142
|
function drawFailedBadge(graphics, width, color, context) {
|
|
143
143
|
const cx = Math.max(12, width - 12);
|
|
144
|
-
|
|
145
|
-
graphics.circle(cx, cy, 8).fill({
|
|
144
|
+
graphics.circle(cx, 12, 8).fill({
|
|
146
145
|
color: context.palette.bg,
|
|
147
146
|
alpha: .72
|
|
148
147
|
});
|
|
149
|
-
graphics.moveTo(cx - 2.5,
|
|
148
|
+
graphics.moveTo(cx - 2.5, 9.5).lineTo(cx + 2.5, 14.5).moveTo(cx + 2.5, 9.5).lineTo(cx - 2.5, 14.5).stroke({
|
|
150
149
|
color,
|
|
151
150
|
width: 1.5,
|
|
152
151
|
alpha: .96,
|
|
@@ -214,7 +213,7 @@ function sync(container, item, context) {
|
|
|
214
213
|
width: selected ? 2 : 1,
|
|
215
214
|
alpha: selected ? .96 : .82
|
|
216
215
|
});
|
|
217
|
-
parts.clip.clear().roundRect(1, 1, frame.width, frame.height,
|
|
216
|
+
parts.clip.clear().roundRect(1, 1, frame.width, frame.height, 3).fill({ color: 16777215 });
|
|
218
217
|
parts.previewBg.clear().rect(frame.x, frame.y, frame.width, frame.height).fill({
|
|
219
218
|
color: context.palette.hover,
|
|
220
219
|
alpha: .5
|
|
@@ -226,8 +225,8 @@ function sync(container, item, context) {
|
|
|
226
225
|
drawAudioWaveform(parts.previewArt, item.taskRunId, {
|
|
227
226
|
x: frame.x + PADDING,
|
|
228
227
|
y: frame.y + PADDING,
|
|
229
|
-
width: Math.max(1, frame.width -
|
|
230
|
-
height: Math.max(1, frame.height -
|
|
228
|
+
width: Math.max(1, frame.width - 24),
|
|
229
|
+
height: Math.max(1, frame.height - 24 - bottomInset)
|
|
231
230
|
}, context.colors.brand.stroke);
|
|
232
231
|
}
|
|
233
232
|
if (full && (artifact?.type === "audio" || artifact?.type === "video" && texture)) drawPlayBadge(parts.previewArt, frame, context);
|
|
@@ -264,9 +263,9 @@ function sync(container, item, context) {
|
|
|
264
263
|
if (textSig !== parts.textSig) {
|
|
265
264
|
parts.textSig = textSig;
|
|
266
265
|
parts.body.style.fill = surface === "failed" ? color : context.palette.text;
|
|
267
|
-
fitTextToLines(parts.body, bodyText, kind === "text" ? Math.max(1, Math.floor((height -
|
|
266
|
+
fitTextToLines(parts.body, bodyText, kind === "text" ? Math.max(1, Math.floor((height - 24 - (showMeta ? META_HEIGHT : 0)) / 16)) : 1, Math.max(24, width - 24));
|
|
268
267
|
parts.meta.style.fill = context.palette.text;
|
|
269
|
-
fitTextToLines(parts.meta, metaText, 1, Math.max(24, width -
|
|
268
|
+
fitTextToLines(parts.meta, metaText, 1, Math.max(24, width - 24));
|
|
270
269
|
}
|
|
271
270
|
parts.body.visible = full && Boolean(bodyText);
|
|
272
271
|
parts.meta.visible = showMeta;
|
|
@@ -41,10 +41,11 @@ const textCardRenderer = {
|
|
|
41
41
|
const root = new Container();
|
|
42
42
|
const resolution = textResolutionForZoom(context.zoom);
|
|
43
43
|
const color = pickBoardColor(context.colors, item.type === "text" ? item.color || "neutral" : "neutral", context.colorScheme);
|
|
44
|
+
const ink = item.type === "text" && (item.color === "neutral" || !item.color) ? context.palette.text : color.stroke;
|
|
44
45
|
const body = new Text({
|
|
45
46
|
text: "",
|
|
46
47
|
style: {
|
|
47
|
-
fill:
|
|
48
|
+
fill: ink,
|
|
48
49
|
fontFamily: BOARD_FONT_STACK,
|
|
49
50
|
fontSize: TEXT_FONT_SIZE,
|
|
50
51
|
fontWeight: "500",
|
|
@@ -40,7 +40,7 @@ function sync(container, item, context) {
|
|
|
40
40
|
width: selected ? 2 : 1,
|
|
41
41
|
alpha: .8
|
|
42
42
|
});
|
|
43
|
-
parts.box.roundRect(6, 6, width - 12, height - 12,
|
|
43
|
+
parts.box.roundRect(6, 6, width - 12, height - 12, 6).stroke({
|
|
44
44
|
color: context.palette.muted,
|
|
45
45
|
width: 1,
|
|
46
46
|
alpha: .4
|
|
@@ -24,7 +24,7 @@ function textZoomBucket(zoom) {
|
|
|
24
24
|
/** Effective text resolution for a given camera zoom. */
|
|
25
25
|
function textResolutionForZoom(zoom) {
|
|
26
26
|
const bucket = textZoomBucket(zoom);
|
|
27
|
-
return Math.min(getBoardResolution() * Math.max(1, bucket),
|
|
27
|
+
return Math.min(getBoardResolution() * Math.max(1, bucket), 6);
|
|
28
28
|
}
|
|
29
29
|
/** Update a Pixi text texture only when zoom crosses a resolution bucket. */
|
|
30
30
|
function syncTextResolution(text, state, zoom) {
|
|
@@ -62,8 +62,9 @@ function sync(parts, context) {
|
|
|
62
62
|
parts.sprite.destroy();
|
|
63
63
|
previousTexture.destroy(true);
|
|
64
64
|
}
|
|
65
|
+
const texture = buildGridTexture(context, size, palette.border, opacity, kind);
|
|
65
66
|
parts.sprite = new TilingSprite({
|
|
66
|
-
texture
|
|
67
|
+
texture,
|
|
67
68
|
width,
|
|
68
69
|
height
|
|
69
70
|
});
|
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, Ao as
|
|
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, Ao as SpaceCompletionStreamEvent, Ar as SpacePendingDiffSummary, Ba as BoardAuthoringReadInput, Br as SpaceTurnAuthorFilter, Bt as Permission, Ci as GenerationModelDeclaration, Cr as SpaceInvitationListResponse, Ct as LabelAssignmentRecord, Dn as SpaceAccessPolicy, Do as CreateSpaceCompletionInput, Ea as BoardCreateInput, Er as SpaceMember, Et as LabelListItem, Fa as BoardSummary, Fr as SpaceRole, G as CheckpointDiffFileResponse, H as Channel, Hi as SessionTurnPatchEvent, Hn as SpaceCommerceProduct, In as SpaceCheckpointDetailResponse, 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 RequestSource, Mi as BoardPlaybackChangedEvent$1, Mo as BillingPayload, Mt as ModelCatalogEntry, Na as BoardPlaybackSnapshot, No as ContentBlock, Nr as SpacePublicProfile, Or as SpaceModListItem, Ot as LabelResourceType, 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, Ta as BoardCapabilities, Un as SpaceCommerceProductBenefitBinding, Ut as PromptTemplateCatalogResponse, Va as BoardAuthoringSnapshot, Vn as SpaceCommerceOrder, 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, bo as SessionTurnRecord, 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 Usage, jr as SpacePresenceSnapshot, jt as MeResponse, ka as BoardMutationReceipt, ko as SpaceCompletionResult, 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 SpaceTurnsResponse, xr as SpaceFsWriteFileInput, yn as SessionTurnSignedUrlsResponse, 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
|
package/dist/chunks/http.js
CHANGED
|
@@ -82,7 +82,7 @@ var CronJobsApi = class {
|
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region src/apis/generations.ts
|
|
84
84
|
const DEFAULT_INTERVAL_MS = 1500;
|
|
85
|
-
const DEFAULT_TIMEOUT_MS =
|
|
85
|
+
const DEFAULT_TIMEOUT_MS = 18e5;
|
|
86
86
|
function sleep$1(ms, signal) {
|
|
87
87
|
if (signal?.aborted) return Promise.reject(signal.reason ?? /* @__PURE__ */ new Error("Generation wait aborted"));
|
|
88
88
|
return new Promise((resolve, reject) => {
|
|
@@ -423,14 +423,13 @@ const DEFAULT_BOARD_RENDER_LIMITS = {
|
|
|
423
423
|
drawCalls: 400,
|
|
424
424
|
filterPasses: 24,
|
|
425
425
|
renderTexturePixels: 16777216,
|
|
426
|
-
textureBytes:
|
|
427
|
-
bufferBytes:
|
|
426
|
+
textureBytes: 536870912,
|
|
427
|
+
bufferBytes: 268435456,
|
|
428
428
|
simulationSteps: 1e5
|
|
429
429
|
};
|
|
430
430
|
const BOARD_BUILTIN_CLIP_KINDS = [
|
|
431
431
|
"motion.path",
|
|
432
432
|
"draw.reveal",
|
|
433
|
-
"draw.handwrite",
|
|
434
433
|
"text.reveal",
|
|
435
434
|
"effects.particles",
|
|
436
435
|
"effects.trail",
|
|
@@ -636,9 +635,9 @@ const vector2Schema = z.object({
|
|
|
636
635
|
x: finiteSchema$1,
|
|
637
636
|
y: finiteSchema$1
|
|
638
637
|
}).strict();
|
|
639
|
-
const scaleSchema = z.union([finiteSchema$1.
|
|
640
|
-
x: finiteSchema$1.
|
|
641
|
-
y: finiteSchema$1.
|
|
638
|
+
const scaleSchema = z.union([finiteSchema$1.nonnegative(), z.object({
|
|
639
|
+
x: finiteSchema$1.nonnegative(),
|
|
640
|
+
y: finiteSchema$1.nonnegative()
|
|
642
641
|
}).strict()]);
|
|
643
642
|
const BOARD_ANIMATION_CHANNELS = {
|
|
644
643
|
"transform.translation": {
|
|
@@ -1287,11 +1286,11 @@ const NAVIGATION_ERROR_MESSAGE_MAX_LENGTH = 2e3;
|
|
|
1287
1286
|
*/
|
|
1288
1287
|
const DESKTOP_COMMAND_VERSION = 1;
|
|
1289
1288
|
/** Persisted and broadcast, so every field is capped; MAX_BYTES bounds the whole. */
|
|
1290
|
-
const DESKTOP_COMMAND_PAYLOAD_MAX_BYTES =
|
|
1291
|
-
const DESKTOP_COMMAND_MAX_BYTES =
|
|
1289
|
+
const DESKTOP_COMMAND_PAYLOAD_MAX_BYTES = 32768;
|
|
1290
|
+
const DESKTOP_COMMAND_MAX_BYTES = 40960;
|
|
1292
1291
|
const DESKTOP_COMMAND_LAUNCH_MAX_LENGTH = NAVIGATION_LAUNCH_MAX_LENGTH;
|
|
1293
|
-
const DESKTOP_COMMAND_DEFAULT_TIMEOUT_MS =
|
|
1294
|
-
const DESKTOP_COMMAND_MAX_TIMEOUT_MS =
|
|
1292
|
+
const DESKTOP_COMMAND_DEFAULT_TIMEOUT_MS = 6e5;
|
|
1293
|
+
const DESKTOP_COMMAND_MAX_TIMEOUT_MS = 432e5;
|
|
1295
1294
|
const DESKTOP_COMMAND_SETTLEMENT_GRACE_SECONDS = 600;
|
|
1296
1295
|
/** Keeps pending commands reportable for the full wait window plus settlement grace. */
|
|
1297
1296
|
const DESKTOP_COMMAND_PENDING_TTL_SECONDS = 43800;
|
|
@@ -3846,7 +3845,8 @@ var SpaceClient = class {
|
|
|
3846
3845
|
};
|
|
3847
3846
|
return result;
|
|
3848
3847
|
}
|
|
3849
|
-
|
|
3848
|
+
const message = body && typeof body === "object" && typeof body.message === "string" ? body.message : "Unexpected completion response";
|
|
3849
|
+
throw new HttpError(message, raw.response.status, body);
|
|
3850
3850
|
}
|
|
3851
3851
|
if (!raw.response.body) throw new HttpError("Empty completion stream", 502, null);
|
|
3852
3852
|
const reader = raw.response.body.getReader();
|
|
@@ -4067,7 +4067,8 @@ var UserApi = class {
|
|
|
4067
4067
|
const response = await fetch(this.transportBaseUrl ? `${this.transportBaseUrl}/api/me` : "/api/me", { headers: { Authorization: `Bearer ${trimmedToken}` } });
|
|
4068
4068
|
if (!response.ok) {
|
|
4069
4069
|
const body = (response.headers.get("content-type") ?? "").includes("application/json") ? await response.json().catch(() => null) : await response.text().catch(() => response.statusText);
|
|
4070
|
-
|
|
4070
|
+
const message = typeof body === "string" ? body : JSON.stringify(body ?? null);
|
|
4071
|
+
throw new HttpError(message || response.statusText, response.status, body);
|
|
4071
4072
|
}
|
|
4072
4073
|
this.setStoredAuthToken?.(trimmedToken);
|
|
4073
4074
|
return response.json();
|
|
@@ -4469,4 +4470,4 @@ var CohubHttpClient = class {
|
|
|
4469
4470
|
};
|
|
4470
4471
|
const createHttpClient = (options) => new CohubHttpClient(options);
|
|
4471
4472
|
//#endregion
|
|
4472
|
-
export {
|
|
4473
|
+
export { BoardConnectionSchema as $, DESKTOP_COMMAND_PENDING_TTL_SECONDS as A, BoardItemPatchSchema as B, parseAssistantMessageCommit as C, DESKTOP_COMMAND_DEFAULT_TIMEOUT_MS as D, ensureRealtimeConnected as E, isTerminalDesktopCommandStatus as F, parseBoardEffectInput as G, BoardSemanticMutationSchema as H, parseDesktopCommand as I, BoardCompositionInputSchema as J, BOARD_ANIMATION_CHANNELS as K, parseDesktopCommandId as L, DESKTOP_COMMAND_TERMINAL_TTL_SECONDS as M, DESKTOP_COMMAND_VERSION as N, DESKTOP_COMMAND_MAX_TIMEOUT_MS as O, isDesktopCallMethod as P, parseBoardCompositionInput as Q, NAVIGATION_ERROR_MESSAGE_MAX_LENGTH as R, createSessionGenerationStreamClient as S, createSessionPatchReducer as T, BoardEffectInputSchema as U, BoardSemanticCommandSchema as V, BoardEffectSchema as W, BoardProceduralClipSchema as X, BoardCompositionSchema as Y, BoardTrackSchema as Z, SpacesApi as _, AppCommerceApi as a, SessionAccessApi as at, buildSpacePath as b, UiCommandsApi as c, PublicAssetsApi as ct, UsersApi as d, ModelsApi as dt, BOARD_ARROW_STROKE_SIZE as et, UserApi as f, GenerationsApi as ft, SpacePublicFilesApi as g, SpaceClient as h, scopeListHasPermission as i, DEFAULT_BOARD_RENDER_LIMITS as it, DESKTOP_COMMAND_SETTLEMENT_GRACE_SECONDS as j, DESKTOP_COMMAND_PAYLOAD_MAX_BYTES as k, AppsApi as l, SkillsApi as lt, BoardClient as m, ChannelsApi as mt, createHttpClient as n, BOARD_BUILTIN_CLIP_KINDS as nt, WorkCommerceApi as o, ReferencesApi as ot, TasksApi as p, CronJobsApi as pt, BOARD_ANIMATION_CHANNEL_CAPABILITIES as q, PERMISSIONS as r, BOARD_BUILTIN_EFFECT_KINDS as rt, DesktopCommandsApi as s, SearchApi as st, CohubHttpClient as t, BOARD_BUILTIN_CAPABILITIES as tt, ReferralsApi as u, PromptsApi as ut, PublicInviteApi as v, SessionPatchReducer as w, SessionGenerationStreamClient as x, buildSpaceInvitePath as y, BoardAuthoringItemSchema as z };
|
package/dist/chunks/transport.js
CHANGED
|
@@ -17,7 +17,7 @@ const isRealtimeDomain = (value) => typeof value === "string" && REALTIME_DOMAIN
|
|
|
17
17
|
/** Accepted room event names. Shared so a client can reject one before sending. */
|
|
18
18
|
const REALTIME_ROOM_EVENT_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$/;
|
|
19
19
|
/** Maximum encoded size of a room event payload. */
|
|
20
|
-
const REALTIME_ROOM_MAX_PAYLOAD_BYTES =
|
|
20
|
+
const REALTIME_ROOM_MAX_PAYLOAD_BYTES = 16384;
|
|
21
21
|
const getRealtimeSpaceRoom = (spaceId) => `space:${spaceId}`;
|
|
22
22
|
const getRealtimeBoardRoom = (boardId) => `board:${boardId}`;
|
|
23
23
|
const parseRealtimeRoom = (room) => {
|