@weasel-js/core 0.7.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +541 -0
- package/dist/{DrawCommand-CJtqqt8H.d.ts → DrawCommand-DCmiNkBj.d.ts} +38 -170
- package/dist/{chunk-CQNKCG34.js → chunk-6SHZHXXR.js} +47 -10
- package/dist/chunk-6SHZHXXR.js.map +1 -0
- package/dist/{chunk-5F3PIERN.js → chunk-D2C6K6FO.js} +1420 -652
- package/dist/chunk-D2C6K6FO.js.map +1 -0
- package/dist/chunk-DCIU3SRK.js +505 -0
- package/dist/chunk-DCIU3SRK.js.map +1 -0
- package/dist/chunk-IO5Z75X4.js +167 -0
- package/dist/chunk-IO5Z75X4.js.map +1 -0
- package/dist/{chunk-VOVKONXA.js → chunk-UB6A6L77.js} +3 -3
- package/dist/{chunk-VOVKONXA.js.map → chunk-UB6A6L77.js.map} +1 -1
- package/dist/{chunk-BGGZ4CVF.js → chunk-Z3KNFTTS.js} +6 -6
- package/dist/chunk-Z3KNFTTS.js.map +1 -0
- package/dist/clipboard.d.ts +2 -2
- package/dist/clone.d.ts +1 -1
- package/dist/{geometry-D9BDMiQi.d.ts → geometry-DVeZ2i-c.d.ts} +1 -1
- package/dist/{grid-CaSK9bHV.d.ts → grid-XcFQVS0f.d.ts} +1 -1
- package/dist/{index-DOYRTfP0.d.ts → index-ChM3ZJ2v.d.ts} +278 -93
- package/dist/index.d.ts +442 -57
- package/dist/index.js +6 -6
- package/dist/insert.d.ts +2 -2
- package/dist/insert.js +5 -5
- package/dist/insert.js.map +1 -1
- package/dist/move.d.ts +3 -3
- package/dist/move.js +2 -2
- package/dist/{options-DMWeTELe.d.ts → options-wAvCnOZd.d.ts} +1 -1
- package/dist/paint-types-CnLIzqq1.d.ts +261 -0
- package/dist/patterns-builtin.d.ts +57 -2
- package/dist/patterns-builtin.js +1 -97
- package/dist/patterns-builtin.js.map +1 -1
- package/dist/{pointSnapToGrid-C3EruUwt.d.ts → pointSnapToGrid-BuDZWBrL.d.ts} +2 -2
- package/dist/renderer.d.ts +25 -8
- package/dist/renderer.js +6 -6
- package/dist/resize.d.ts +3 -3
- package/dist/resize.js +2 -2
- package/dist/routing.d.ts +7 -7
- package/dist/routing.js +1 -1
- package/dist/{types-Dcaa0tPq.d.ts → types-BhJJ2OCM.d.ts} +9 -1
- package/dist/{types-Cpb4hii1.d.ts → types-DUpI7Apc.d.ts} +3 -95
- package/dist/{viewToMat3-D4lrBigW.d.ts → viewToMat3-BvaWCN99.d.ts} +1 -1
- package/package.json +6 -6
- package/dist/chunk-5F3PIERN.js.map +0 -1
- package/dist/chunk-BGGZ4CVF.js.map +0 -1
- package/dist/chunk-CQNKCG34.js.map +0 -1
- package/dist/chunk-SYM6RAM4.js +0 -232
- package/dist/chunk-SYM6RAM4.js.map +0 -1
- package/dist/chunk-Y52N27PF.js +0 -39
- package/dist/chunk-Y52N27PF.js.map +0 -1
- package/dist/registerTexture-BzHTLhD9.d.ts +0 -25
- /package/dist/{types-B6MMiodD.d.ts → path-B6MMiodD.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,41 +2,42 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { RefObject, ReactNode, Ref, MouseEvent as MouseEvent$1, MutableRefObject } from 'react';
|
|
3
3
|
import { a as ViewTransform, V as View, Z as ZoomBound, b as ZoomFactor } from './view-DSQgxBJB.js';
|
|
4
4
|
export { s as screenToWorld, v as viewToTransform, w as worldToScreen } from './view-DSQgxBJB.js';
|
|
5
|
-
import { a as UnitValue, b as UnitSystem, U as UseMoveOptions, O as OriginProjection } from './grid-
|
|
6
|
-
export { I as IMPERIAL_INCHES, M as METRIC_MM, P as PIXELS, R as RECT_ORIGIN_PROJECTION, c as Unit, f as formatUnit, g as gridSnapStrategy, p as pointToGridCell, r as resolveUnit } from './grid-
|
|
7
|
-
import { R as RenderLayer, D as Dims, C as Condition,
|
|
8
|
-
export {
|
|
9
|
-
import {
|
|
10
|
-
export {
|
|
11
|
-
import { B as Bounds, P as PoseProjection, F as FitViewToBoundsOptions, V as ViewportDims } from './geometry-
|
|
12
|
-
export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, f as fitViewToBounds } from './geometry-
|
|
13
|
-
import { N as NodeId, S as Scene, a as Node$1, b as SerializedScene, R as RectPose, U as UseSceneOptions, c as SceneRegistry, d as RegisteredOp } from './types-
|
|
14
|
-
export { A as AddLayerSpec, e as AddNodeSpec, C as ContainerNode,
|
|
15
|
-
import { M as ModifierState, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, a as RotatedPose, e as RotateBehavior, S as SnapStrategy, c as ResizeAnchor, b as MoveBehavior, I as InsertBehavior } from './types-
|
|
16
|
-
export { A as ActionBehavior, f as AreaSelectOverlay, g as BehaviorMoveResult, h as BehaviorResult, C as CloneBehavior, i as CloneLayer, j as ClonePose, G as GestureContext, k as GroupTransform, l as InsertMoveResult, m as InsertOverlay, n as InsertPoint, o as InsertProposed, p as LassoSelectMoveResult, q as LassoSelectOverlay, r as LassoSelectPose, s as LassoSelectProposed, t as PointSnapContext, d as PointSnapFrame, u as PointSnapResult, v as PointerState, w as ResizeMoveResult, x as ResizeOverlay, y as ResizeProposed, z as RotateMoveResult, D as RotateOverlay, E as RotateProposed } from './types-
|
|
17
|
-
import { U as UseResizeOptions } from './pointSnapToGrid-
|
|
18
|
-
export { C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-
|
|
5
|
+
import { a as UnitValue, b as UnitSystem, U as UseMoveOptions, O as OriginProjection } from './grid-XcFQVS0f.js';
|
|
6
|
+
export { I as IMPERIAL_INCHES, M as METRIC_MM, P as PIXELS, R as RECT_ORIGIN_PROJECTION, c as Unit, f as formatUnit, g as gridSnapStrategy, p as pointToGridCell, r as resolveUnit } from './grid-XcFQVS0f.js';
|
|
7
|
+
import { R as RenderLayer, D as Dims, a as DeviceProfile, b as DetectedDeviceFacts, C as Condition, c as Rule, d as RuleCtx, V as VisibilityRules, e as ChromeCtx, f as ChromeId, A as Action, g as DepSchema, S as SliceDep, h as ActionsRegistry, T as Tool, i as AffordanceHit, j as Dispatcher, k as AnyTool, l as ToolCtx, m as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, n as ChromeState, o as SelectionApi, I as InsertExtras, G as GeometryProjection, p as ContentHandlerEntry, q as SvgIngestOptions, U as UseSelectionOptions, r as ActionsProp, s as Affordance, t as AffordanceBinding, u as AffordanceRegion, v as CommonAffordanceScratch, B as BooleansAdapter, E as Eligibility, w as BindingScope, x as Contribution, y as ScopedBinding } from './index-ChM3ZJ2v.js';
|
|
8
|
+
export { z as ALWAYS, F as ActionDeps, J as ActionDisabledReason, K as ActionEnabledResult, M as ActionEntry, N as ActionsProvider, O as ActiveToolContextProvider, P as ActiveToolContextProviderIfRoot, Q as ActiveToolContextProviderProps, W as ActiveToolContextValue, X as AreaSelectDep, Y as BindingOpts, Z as BooleanOp, _ as BooleanOpResult, $ as BoundGesture, a0 as BuildRuleCtxArgs, a1 as ClaimableGesture, a2 as ClipboardDep, a3 as ClipboardIngestCtx, a4 as CustomPaintContext, a5 as DepName, a6 as DepRegistry, a7 as DepRegistryProvider, a8 as DispatcherContext, a9 as DragSample, aa as EditAnchorsDep, ab as GestureBinding, ac as IDENTITY_POSE_COMPOSITION, ad as ImmediateInvoker, ae as IngestCtx, af as IngestionDep, ag as InsertDep, ah as InvocationCtx, ai as Invoker, aj as LassoSelectDep, ak as LayoutDep, al as MatchResult, am as NEVER, an as NodeAtPointDep, ao as OngoingHandle, ap as OngoingInvoker, aq as OngoingOverlay, ar as Point2, as as PointerContextProvider, at as PointerContextValue, au as PointerWorldPos, av as PoseAdapter, aw as PoseComposition, ax as ResizePolicy, ay as ResolveAllOptions, az as ResolveOnlyResult, aA as ResolvedCandidate, aB as SelectionExtendKey, aC as SelectionMode, aD as Selector, aE as SnapDep, aF as SvgUnpacker, aG as TextEditDep, aH as ToolModifiers, aI as ToolPresentation, aJ as ToolSlot, aK as UiOngoingControl, aL as ViewApi, aM as applyBooleanOp, aN as buildRuleCtx, aO as clipboardCopyAction, aP as clipboardCutAction, aQ as composeRectPose, aR as composeWorldPose, aS as createDispatcher, aT as decomposeRectPose, aU as describeRule, aV as drawLayers, aW as enterTextEditAction, aX as evaluate, aY as evaluateEnabled, aZ as rebaseLocalPose, a_ as registerContentHandler, a$ as routing, b0 as sliceAction, b1 as specificity, b2 as translateRectPose, b3 as useAction, b4 as useActionsRegistry, b5 as useActiveToolContext, b6 as useDepRegistry, b7 as useDepSource, b8 as useOptionalActiveToolContext, b9 as useOptionalDepRegistry, ba as usePointerContext, bb as useSelection, bc as worldPoseLookup } from './index-ChM3ZJ2v.js';
|
|
9
|
+
import { S as Stroke, F as FillStyle, a as TextureHandle, T as TilePatternSpec, b as GradientKind, G as GradStop, c as GradientFill } from './paint-types-CnLIzqq1.js';
|
|
10
|
+
export { d as GradientUnits, R as Region, e as StrokeAlign, f as alignedStrokeRect } from './paint-types-CnLIzqq1.js';
|
|
11
|
+
import { B as Bounds, P as PoseProjection, F as FitViewToBoundsOptions, V as ViewportDims } from './geometry-DVeZ2i-c.js';
|
|
12
|
+
export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, f as fitViewToBounds } from './geometry-DVeZ2i-c.js';
|
|
13
|
+
import { N as NodeId, S as Scene, a as Node$1, b as SerializedScene, R as RectPose, U as UseSceneOptions, c as SceneRegistry, d as RegisteredOp } from './types-DUpI7Apc.js';
|
|
14
|
+
export { A as AddLayerSpec, e as AddNodeSpec, C as ContainerNode, L as LayerRecord, f as LeafNode, g as SerializedNode, h as SystemLayerRecord, i as SystemLayerSpec, j as UserLayerRecord, k as asNodeId } from './types-DUpI7Apc.js';
|
|
15
|
+
import { M as ModifierState, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, a as RotatedPose, e as RotateBehavior, S as SnapStrategy, c as ResizeAnchor, b as MoveBehavior, I as InsertBehavior } from './types-BhJJ2OCM.js';
|
|
16
|
+
export { A as ActionBehavior, f as AreaSelectOverlay, g as BehaviorMoveResult, h as BehaviorResult, C as CloneBehavior, i as CloneLayer, j as ClonePose, G as GestureContext, k as GroupTransform, l as InsertMoveResult, m as InsertOverlay, n as InsertPoint, o as InsertProposed, p as LassoSelectMoveResult, q as LassoSelectOverlay, r as LassoSelectPose, s as LassoSelectProposed, t as PointSnapContext, d as PointSnapFrame, u as PointSnapResult, v as PointerState, w as ResizeMoveResult, x as ResizeOverlay, y as ResizeProposed, z as RotateMoveResult, D as RotateOverlay, E as RotateProposed } from './types-BhJJ2OCM.js';
|
|
17
|
+
import { U as UseResizeOptions } from './pointSnapToGrid-BuDZWBrL.js';
|
|
18
|
+
export { C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-BuDZWBrL.js';
|
|
19
19
|
import { BodyClassification, IngestItem } from '@weasel-js/gestures';
|
|
20
20
|
export { ClickSpec, DragSpec, DropSpec, GestureSpec, IngestItem, InputEvent, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, TargetSpec, WheelSpec } from '@weasel-js/gestures';
|
|
21
21
|
import { M as MoveAdapter, A as AreaSelectAdapter, R as RotateAdapter, a as LassoHitMode, b as LassoSelectAdapter, c as ResizeAdapter, d as SceneAdapter, L as LayoutStrategy, e as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, O as OrderedAdapter, f as LayoutSnap } from './types-B_-khFM0.js';
|
|
22
22
|
export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-B_-khFM0.js';
|
|
23
23
|
import { D as DebugSink, a as DebugConfig, b as DebugSnapshot, c as DebugTheme } from './types-BJ8_cyT7.js';
|
|
24
24
|
export { d as DebugFeature, H as HandleKind, e as HitShape, R as RecordedBounds, f as RecordedHandle, g as RecordedHitbox, h as RecordedLayer, i as RecordedOrigin, j as RecordedSnap } from './types-BJ8_cyT7.js';
|
|
25
|
-
import { a as PolygonPath, P as Path, b as PathFillRule, R as RectPath } from './
|
|
26
|
-
export { c as PATH_C, d as PATH_CMD_LENGTHS, e as PATH_L, f as PATH_M, g as PATH_Q, h as PATH_Z } from './
|
|
25
|
+
import { a as PolygonPath, P as Path, b as PathFillRule, R as RectPath } from './path-B6MMiodD.js';
|
|
26
|
+
export { c as PATH_C, d as PATH_CMD_LENGTHS, e as PATH_L, f as PATH_M, g as PATH_Q, h as PATH_Z } from './path-B6MMiodD.js';
|
|
27
27
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
28
|
+
import { D as DrawCommand, S as ShaderProgramHandle, P as PathDrawCommand, d as StyledRun, R as ResolvedTextStyle, e as TextStyle, f as TextVerticalAlign } from './DrawCommand-DCmiNkBj.js';
|
|
29
|
+
export { g as DEFAULT_TEXT_STYLE, G as GroupDrawCommand, I as ImageDrawCommand, M as Mat3, h as ResolvedRun, a as ShaderDrawCommand, b as ShaderUniform, T as TextDrawCommand, i as fontString, j as markdownToRuns, k as resolveRuns, l as resolveTextStyle, n as runsToMarkdown, o as runsToPlainText, t as toRuns, v as verticalAlignOffset } from './DrawCommand-DCmiNkBj.js';
|
|
28
30
|
import { Op, CreateHistoryOptions, History } from '@weasel-js/history';
|
|
29
31
|
export * from '@weasel-js/history';
|
|
30
32
|
export { Op } from '@weasel-js/history';
|
|
31
|
-
import { T as TextureHandle } from './registerTexture-BzHTLhD9.js';
|
|
32
33
|
import { Mat3 } from '@weasel-js/geom';
|
|
33
34
|
import { G as Guide } from './types-D2tTKEU0.js';
|
|
34
|
-
export { U as UseInsertOptions } from './options-
|
|
35
|
+
export { U as UseInsertOptions } from './options-wAvCnOZd.js';
|
|
35
36
|
export { UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
|
|
36
37
|
export { cloneByAltDrag } from './clone.js';
|
|
37
|
-
export { I as ImageMinification, v as viewToMat3 } from './viewToMat3-
|
|
38
|
+
export { I as ImageMinification, v as viewToMat3 } from './viewToMat3-BvaWCN99.js';
|
|
38
39
|
export { FontVariant, LocalFontOutlinesResult, OutlineFontStyle, OutlineSource, OutlineStatus, OutlineVariant, canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
|
|
39
|
-
import '@weasel-js/modes';
|
|
40
|
+
import { CapabilityTag } from '@weasel-js/modes';
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
43
|
* The kit version a build was compiled from, so an app can report what it is
|
|
@@ -532,21 +533,66 @@ interface UsePointerStylusOptions {
|
|
|
532
533
|
declare function usePointerStylus(target?: RefObject<HTMLElement | null> | HTMLElement | null, options?: UsePointerStylusOptions): PointerStylusState;
|
|
533
534
|
|
|
534
535
|
/**
|
|
535
|
-
* Geometric mean of a per-axis scale.
|
|
536
|
-
*
|
|
537
|
-
* Degenerates to `s.x` (or `s.y`) when the two axes are equal; otherwise
|
|
538
|
-
* sits between them.
|
|
536
|
+
* Geometric mean of a per-axis scale. Degenerates to `s.x` (or `s.y`) when the
|
|
537
|
+
* two axes are equal; otherwise sits between them.
|
|
539
538
|
*
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
543
|
-
*
|
|
539
|
+
* **Not for hit-testing.** A screen-pixel length is not one world distance
|
|
540
|
+
* under non-uniform zoom, and collapsing it to a scalar makes a pickable
|
|
541
|
+
* region too generous on one axis and too mean on the other. Use `pxExtent`
|
|
542
|
+
* for a per-axis world length, or `withinPxBox` / `withinPxRadius` to compare
|
|
543
|
+
* in screen space directly. Chrome hit-tests moved off this in 2026-08.
|
|
544
|
+
*
|
|
545
|
+
* What legitimately remains: hairline stroke widths (`1 / meanScale`), where
|
|
546
|
+
* a single width is all the renderer accepts and no per-axis answer exists,
|
|
547
|
+
* and painted chrome placement, whose per-axis form doesn't separate under a
|
|
548
|
+
* rotated target.
|
|
544
549
|
*/
|
|
545
550
|
declare function meanScale(s: {
|
|
546
551
|
x: number;
|
|
547
552
|
y: number;
|
|
548
553
|
}): number;
|
|
549
554
|
|
|
555
|
+
/**
|
|
556
|
+
* Screen-pixel lengths in world units, per axis.
|
|
557
|
+
*
|
|
558
|
+
* Chrome declares its hit zones in screen pixels — an 8px handle stays 8px at
|
|
559
|
+
* every zoom, because it paints in screen space. Converting one such length to
|
|
560
|
+
* world units with a single scalar (see `meanScale`) is exact only under
|
|
561
|
+
* uniform zoom; per-axis it is too generous on one axis and too mean on the
|
|
562
|
+
* other, so the pickable region stops matching the painted one.
|
|
563
|
+
*
|
|
564
|
+
* Prefer {@link withinPxBox} / {@link withinPxRadius}, which compare in screen
|
|
565
|
+
* space and so can't drift from the paint at all. {@link pxExtent} is for the
|
|
566
|
+
* cases that must stay in world units — a tolerance handed to geometry that
|
|
567
|
+
* doesn't know about the view.
|
|
568
|
+
*/
|
|
569
|
+
interface Scale2 {
|
|
570
|
+
x: number;
|
|
571
|
+
y: number;
|
|
572
|
+
}
|
|
573
|
+
/** One screen-pixel length as world-space extents, per axis. */
|
|
574
|
+
declare function pxExtent(px: number, scale: Scale2): {
|
|
575
|
+
x: number;
|
|
576
|
+
y: number;
|
|
577
|
+
};
|
|
578
|
+
/** World delta → screen delta. Only the scale participates: translation
|
|
579
|
+
* cancels in a difference, and the kit's views carry no skew. */
|
|
580
|
+
declare function scaleDelta(dx: number, dy: number, scale: Scale2): {
|
|
581
|
+
x: number;
|
|
582
|
+
y: number;
|
|
583
|
+
};
|
|
584
|
+
/**
|
|
585
|
+
* Is a world-space delta inside a screen-space square of half-extent `px`?
|
|
586
|
+
*
|
|
587
|
+
* The square is axis-aligned **on screen**, which is what a handle painted in
|
|
588
|
+
* screen space actually is — so this stays true under non-uniform zoom and
|
|
589
|
+
* under a rotated target, where an axis-aligned world-space test is a rotated
|
|
590
|
+
* rectangle on screen.
|
|
591
|
+
*/
|
|
592
|
+
declare function withinPxBox(dx: number, dy: number, px: number, scale: Scale2): boolean;
|
|
593
|
+
/** Is a world-space delta inside a screen-space circle of radius `px`? */
|
|
594
|
+
declare function withinPxRadius(dx: number, dy: number, px: number, scale: Scale2): boolean;
|
|
595
|
+
|
|
550
596
|
/** A 2D point in the rect element's local coordinate space. */
|
|
551
597
|
interface HandleDragPoint {
|
|
552
598
|
x: number;
|
|
@@ -649,16 +695,95 @@ interface CanvasSize {
|
|
|
649
695
|
declare function clampView(view: View, bounds: ClampBounds, canvas: CanvasSize): View;
|
|
650
696
|
|
|
651
697
|
/** Size snapshot returned by `useCanvasSize` — the kit-wide `CanvasSize`
|
|
652
|
-
* (width × height in CSS pixels) plus the current
|
|
698
|
+
* (width × height in CSS pixels) plus the current devicePixelRatio. */
|
|
653
699
|
interface CanvasSizeSnapshot extends CanvasSize {
|
|
654
700
|
dpr: number;
|
|
655
701
|
}
|
|
656
|
-
/** Track a container's content-rect size
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
*
|
|
702
|
+
/** Track a container's content-rect size via `ResizeObserver`, and density via
|
|
703
|
+
* the ambient `DeviceProfile`.
|
|
704
|
+
*
|
|
705
|
+
* This hook is the screen path's designated ambient-density source —
|
|
706
|
+
* rendering code should take density as a parameter (cf.
|
|
707
|
+
* `renderSceneToPixels`, `renderSceneToCanvas`'s `dpr`) rather than reading
|
|
708
|
+
* `window.devicePixelRatio` inline.
|
|
709
|
+
*
|
|
710
|
+
* Density deliberately does NOT come from a `window.devicePixelRatio` read
|
|
711
|
+
* inside the resize callback: that only refreshes when the element resizes,
|
|
712
|
+
* so dragging a window to a different-density display without resizing it
|
|
713
|
+
* left the snapshot stale. The profile watches a re-armed resolution media
|
|
714
|
+
* query instead. */
|
|
660
715
|
declare function useCanvasSize(containerRef: RefObject<HTMLDivElement | null>): CanvasSizeSnapshot;
|
|
661
716
|
|
|
717
|
+
/**
|
|
718
|
+
* Handle/hit multiplier applied on a coarse pointer.
|
|
719
|
+
*
|
|
720
|
+
* 8px handle → 14px; 24px rotation distance → 42px. Counting the
|
|
721
|
+
* surrounding grab zone, that lands in the Apple HIG 44pt / Material 48dp
|
|
722
|
+
* minimum-touch-target band. One constant so it is tunable in one place.
|
|
723
|
+
*/
|
|
724
|
+
declare const COARSE_TARGET_SCALE = 1.75;
|
|
725
|
+
/**
|
|
726
|
+
* Fold consumer overrides over detected facts and derive `targetScale`.
|
|
727
|
+
*
|
|
728
|
+
* `targetScale` is re-derived AFTER the merge, so an override of
|
|
729
|
+
* `coarsePointer` alone scales the chrome as expected. An explicit
|
|
730
|
+
* `targetScale` override wins over the derivation.
|
|
731
|
+
*/
|
|
732
|
+
declare function resolveDeviceProfile(detected: DetectedDeviceFacts, overrides?: Partial<DeviceProfile>): DeviceProfile;
|
|
733
|
+
/**
|
|
734
|
+
* Assumed when `matchMedia` is unavailable (SSR, jsdom) and used as the
|
|
735
|
+
* absent-means value for `RuleCtx.device`.
|
|
736
|
+
*
|
|
737
|
+
* Derived from `resolveDeviceProfile` rather than hand-written, so it can
|
|
738
|
+
* never drift from what the function would compute for the same facts. A
|
|
739
|
+
* mouse-like device is the safe default: it is what the kit has always
|
|
740
|
+
* assumed, so an absent profile changes nothing for existing consumers.
|
|
741
|
+
*/
|
|
742
|
+
declare const DEFAULT_DEVICE_PROFILE: DeviceProfile;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Base sizes for grabbable chrome, in CSS pixels at `targetScale = 1`.
|
|
746
|
+
*
|
|
747
|
+
* These were six separate literal `8`s and one `24` scattered across
|
|
748
|
+
* `SceneCanvas`, `features/selection/overlay`, `affordances/cornerResize`,
|
|
749
|
+
* `canvas/affordanceAt`, and `interactions/actions/rotate/handle`. They are
|
|
750
|
+
* consolidated here because paint and hit-test MUST scale together: chrome
|
|
751
|
+
* you can see but cannot grab is the exact failure `chrome-caps` exists to
|
|
752
|
+
* make impossible, and duplicated literals in five files is how that failure
|
|
753
|
+
* gets reintroduced.
|
|
754
|
+
*
|
|
755
|
+
* Multiply by `DeviceProfile.targetScale` at the point of use — the profile
|
|
756
|
+
* is a runtime value, these are not.
|
|
757
|
+
*/
|
|
758
|
+
/** Selection corner-handle visual size and hit radius. */
|
|
759
|
+
declare const HANDLE_BASE_PX = 8;
|
|
760
|
+
/** Path anchor / control-point hit radius. */
|
|
761
|
+
declare const ANCHOR_HIT_BASE_PX = 8;
|
|
762
|
+
/** Distance from a selection's top edge to the rotation handle's center. */
|
|
763
|
+
declare const ROTATION_HANDLE_BASE_PX = 24;
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Read the ambient device profile.
|
|
767
|
+
*
|
|
768
|
+
* Uses the nearest {@link DeviceProfileProvider} when one exists, and
|
|
769
|
+
* otherwise detects for itself — so a standalone overlay or a labkit panel
|
|
770
|
+
* rendered outside a `<SceneCanvas>` still gets correct facts.
|
|
771
|
+
*
|
|
772
|
+
* `overrides` always wins over both, which is what makes tests and
|
|
773
|
+
* force-touch-chrome demos possible without stubbing `matchMedia`.
|
|
774
|
+
*/
|
|
775
|
+
declare function useDeviceProfile(overrides?: Partial<DeviceProfile>): DeviceProfile;
|
|
776
|
+
interface DeviceProfileProviderProps {
|
|
777
|
+
/** Partial override folded over detected facts. */
|
|
778
|
+
value?: Partial<DeviceProfile>;
|
|
779
|
+
children: ReactNode;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Publish one resolved profile to a subtree. `<SceneCanvas>` renders this so
|
|
783
|
+
* overlays, affordances, and consumer chrome all read the same object.
|
|
784
|
+
*/
|
|
785
|
+
declare function DeviceProfileProvider({ value, children }: DeviceProfileProviderProps): React$1.FunctionComponentElement<React$1.ProviderProps<DeviceProfile | null>>;
|
|
786
|
+
|
|
662
787
|
/**
|
|
663
788
|
* Compute the largest uniform zoom (px per content-unit) that fits a content
|
|
664
789
|
* rect of `contentW x contentH` (in content units) into a viewport rect of
|
|
@@ -933,6 +1058,14 @@ declare const capabilityIn: (caps: readonly string[]) => Condition;
|
|
|
933
1058
|
declare const capabilityAll: (caps: readonly string[]) => Condition;
|
|
934
1059
|
/** Active mode's `allows` does NOT include capability `cap`. */
|
|
935
1060
|
declare const capabilityNot: (cap: string) => Condition;
|
|
1061
|
+
/** Primary pointer is imprecise (touch, most styluses). Absent device
|
|
1062
|
+
* profile → false, so a rule written with this atom is inert on the
|
|
1063
|
+
* mouse-shaped default rather than silently flipping. */
|
|
1064
|
+
declare const coarsePointer: Condition;
|
|
1065
|
+
/** Primary pointer can hover. Absent device profile → true. Pair with
|
|
1066
|
+
* `not(...)` to gate chrome that only makes sense with a hovering
|
|
1067
|
+
* pointer: `not(canHover)` is "this device cannot hover". */
|
|
1068
|
+
declare const canHover: Condition;
|
|
936
1069
|
|
|
937
1070
|
/**
|
|
938
1071
|
* Kit-shipped defaults. Merged with the consumer's `chromeVisibility` map
|
|
@@ -944,10 +1077,11 @@ declare const capabilityNot: (cap: string) => Condition;
|
|
|
944
1077
|
*
|
|
945
1078
|
* Gating is written in terms of **capabilities, not mode ids**. A
|
|
946
1079
|
* capability rule keeps holding when a new mode is added that permits the
|
|
947
|
-
* same thing; a mode rule has to be found and edited every time.
|
|
948
|
-
*
|
|
949
|
-
*
|
|
950
|
-
*
|
|
1080
|
+
* same thing; a mode rule has to be found and edited every time. There is
|
|
1081
|
+
* no `mode:` rule left in this table — the `path-edit.*` chrome used to be
|
|
1082
|
+
* the exception, on the theory that it's the visual signature of one mode;
|
|
1083
|
+
* see the comment on those rules below for why that was wrong in both
|
|
1084
|
+
* directions and what replaced it.
|
|
951
1085
|
*
|
|
952
1086
|
* Chrome that gates on the *absence* of a capability (the selection
|
|
953
1087
|
* outline, suppressed while an anchor-editing overlay owns the visuals)
|
|
@@ -1736,9 +1870,6 @@ interface UseGestureDispatcherOptions {
|
|
|
1736
1870
|
actions: ActionsRegistry;
|
|
1737
1871
|
/** Tool definitions keyed by id. Typically passes an empty Map. */
|
|
1738
1872
|
toolsById: ReadonlyMap<string, Tool>;
|
|
1739
|
-
/** Ids (within `toolsById`) of always-on tools, whose bindings assemble at
|
|
1740
|
-
* ambient scope. See `DispatcherContext.ambientToolIds`. */
|
|
1741
|
-
ambientToolIds?: readonly string[];
|
|
1742
1873
|
/** Default true. Set false to opt out of dispatcher wiring (e.g. demos that disable it). */
|
|
1743
1874
|
enabled?: boolean;
|
|
1744
1875
|
/**
|
|
@@ -2031,10 +2162,9 @@ interface ToolsApi {
|
|
|
2031
2162
|
/**
|
|
2032
2163
|
* Manages the active tool and hotkey slot.
|
|
2033
2164
|
*
|
|
2034
|
-
*
|
|
2035
|
-
*
|
|
2036
|
-
*
|
|
2037
|
-
* the overlay roll-up.
|
|
2165
|
+
* A thin shim over {@link useContributions}: the `registry` / `ambient`
|
|
2166
|
+
* arguments are restated as declared eligibility (`focus` / `always`), and
|
|
2167
|
+
* assembly happens in one place for tools and non-tool contributions alike.
|
|
2038
2168
|
*
|
|
2039
2169
|
* Requires `<ActiveToolContextProvider>` (or `<WeaselProvider>` /
|
|
2040
2170
|
* `<SceneCanvas>`, which mount one internally) in scope: active/hotkey state
|
|
@@ -2043,8 +2173,8 @@ interface ToolsApi {
|
|
|
2043
2173
|
*
|
|
2044
2174
|
* **First-mount-wins semantics**: if `opts.active` differs from the context
|
|
2045
2175
|
* default (`'select'`) on first mount, `useTools` pushes `opts.active` to
|
|
2046
|
-
* the context
|
|
2047
|
-
*
|
|
2176
|
+
* the context. Subsequent mounts respect whatever the context currently
|
|
2177
|
+
* holds (the first caller wins).
|
|
2048
2178
|
*/
|
|
2049
2179
|
declare function useTools(opts: UseToolsOptions): ToolsApi;
|
|
2050
2180
|
|
|
@@ -2488,8 +2618,8 @@ interface UsePenToolOptions<TPose> {
|
|
|
2488
2618
|
* ⌘-click / double-click, producing a compound path. */
|
|
2489
2619
|
autoCommitOnClose?: boolean;
|
|
2490
2620
|
/** Screen-px hit radius for "click first anchor to close". Default `8`.
|
|
2491
|
-
*
|
|
2492
|
-
*
|
|
2621
|
+
* Measured as a screen-space circle, so it stays round under non-uniform
|
|
2622
|
+
* zoom; aligns with `useSelectTool.handleHitRadius`. */
|
|
2493
2623
|
closeHitRadius?: number;
|
|
2494
2624
|
/** Optional point snapper applied to every world-space coordinate the
|
|
2495
2625
|
* pen records or previews — anchor positions (corner clicks, smooth-
|
|
@@ -2815,13 +2945,15 @@ interface CanvasExtensionApi {
|
|
|
2815
2945
|
* `<SceneCanvas>` folds this into the `affordanceAt` thunk it hands the
|
|
2816
2946
|
* gesture dispatcher — ahead of the kit's own selection chrome, since
|
|
2817
2947
|
* registered layers draw on top — so a hit surfaces to actions as an
|
|
2818
|
-
* `AffordanceHit` with kind `layer:<id>` and the
|
|
2819
|
-
* as its `payload`.
|
|
2820
|
-
*
|
|
2948
|
+
* `AffordanceHit` with kind `layer:<id>` and the hit's `initialScratch`
|
|
2949
|
+
* as its `payload`. `owner` is set to the layer id, and `cursor` /
|
|
2950
|
+
* `strength` carry through from the hit when the layer sets them.
|
|
2951
|
+
* A layer's owner binds a `kindOf` predicate on that kind to claim the
|
|
2952
|
+
* gesture; see `@weasel-js/hud` for the worked example.
|
|
2821
2953
|
*/
|
|
2822
2954
|
hitTestExtras(worldX: number, worldY: number): {
|
|
2823
2955
|
layerId: string;
|
|
2824
|
-
|
|
2956
|
+
hit: LayerHit;
|
|
2825
2957
|
} | null;
|
|
2826
2958
|
/** Feed external content into the ingestion pipeline imperatively — the
|
|
2827
2959
|
* same content-handler registry that OS drop and clipboard paste hit.
|
|
@@ -4361,8 +4493,13 @@ declare function getNodeShapes(): readonly NodeShapeEntry[];
|
|
|
4361
4493
|
declare function defaultDrawOne<TData, TLayer extends string, TPose>(node: Node$1<TData, TLayer, TPose>, pose: TPose, ctx?: NodePaintCtx): DrawCommand[];
|
|
4362
4494
|
|
|
4363
4495
|
/** Default size in CSS pixels for selection corner-handles AND their
|
|
4364
|
-
* hit-test radius
|
|
4365
|
-
* via `selectTool.handleHitRadius` or
|
|
4496
|
+
* hit-test radius, at `targetScale = 1`. Used by the SceneCanvas defaults;
|
|
4497
|
+
* consumers override via `selectTool.handleHitRadius` or
|
|
4498
|
+
* `layers.selectionOverlay.handles.size`.
|
|
4499
|
+
*
|
|
4500
|
+
* Deliberately unscaled: consumers reading this constant keep getting the
|
|
4501
|
+
* number they always got. Kit-internal use sites multiply by
|
|
4502
|
+
* `DeviceProfile.targetScale`. */
|
|
4366
4503
|
declare const DEFAULT_HANDLE_SIZE = 8;
|
|
4367
4504
|
/** Built-in tool ids SceneCanvas knows how to mount when no `tools` prop
|
|
4368
4505
|
* is supplied. Pass a subset via `defaultTools` to slim the registered set. */
|
|
@@ -4769,6 +4906,16 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
4769
4906
|
id: string;
|
|
4770
4907
|
allowedCapabilities: ReadonlySet<string>;
|
|
4771
4908
|
};
|
|
4909
|
+
/**
|
|
4910
|
+
* Override detected device facts. Merged over what `matchMedia` reports;
|
|
4911
|
+
* `targetScale` is re-derived from the merged `coarsePointer` unless you
|
|
4912
|
+
* override it explicitly.
|
|
4913
|
+
*
|
|
4914
|
+
* Reach for this in three cases: tests that need a coarse profile without
|
|
4915
|
+
* stubbing `matchMedia`, demos that want to show touch-sized chrome on a
|
|
4916
|
+
* desktop, and hybrid devices where the media query guesses wrong.
|
|
4917
|
+
*/
|
|
4918
|
+
device?: Partial<DeviceProfile>;
|
|
4772
4919
|
/**
|
|
4773
4920
|
* Optional live focus getter for chrome-caps' `focused` ctx field.
|
|
4774
4921
|
* SceneCanvas does not own focus state by default — wire this when
|
|
@@ -6229,6 +6376,15 @@ interface UseTextEditOptions {
|
|
|
6229
6376
|
getText: (id: string) => string;
|
|
6230
6377
|
/** Read style for `id` (used for font setup on the overlay). */
|
|
6231
6378
|
getStyle: (id: string) => TextStyle | undefined;
|
|
6379
|
+
/**
|
|
6380
|
+
* Write style back for `id`. Optional; needed only to turn a flag **off**
|
|
6381
|
+
* inside a node whose own `TextStyle` sets it. Run flags are additive, so
|
|
6382
|
+
* that edit is expressed by lowering the node flag and raising it on the
|
|
6383
|
+
* runs outside the selection — which needs somewhere to put the new node
|
|
6384
|
+
* style. Without this, such a toggle is declined and nothing changes, as
|
|
6385
|
+
* before. See `runs/flagRange`.
|
|
6386
|
+
*/
|
|
6387
|
+
setStyle?: (id: string, style: TextStyle) => void;
|
|
6232
6388
|
/** Read screen-space pose for `id`. Called per frame while editing. */
|
|
6233
6389
|
getScreenPose: (id: string) => TextEditScreenPose | null;
|
|
6234
6390
|
/** Commit text. Caller wraps in op/undo. */
|
|
@@ -6406,6 +6562,57 @@ interface UseSceneTextEditReturn extends UseTextEditReturn {
|
|
|
6406
6562
|
}
|
|
6407
6563
|
declare function useSceneTextEdit<TData extends DefaultTextData, TLayer extends string, TPose extends RectPose = RectPose>(scene: Scene<TData, TLayer, TPose>, container: HTMLElement | null, options?: UseSceneTextEditOptions<TData>): UseSceneTextEditReturn;
|
|
6408
6564
|
|
|
6565
|
+
/**
|
|
6566
|
+
* Turning a run-level flag **off** inside a node that sets it.
|
|
6567
|
+
*
|
|
6568
|
+
* Run flags are additive over the node's `TextStyle` — a run turns `bold` /
|
|
6569
|
+
* `italic` / `underline` / `strikethrough` on, never off (see the contract at
|
|
6570
|
+
* the top of `rangeStyle.ts`). So "select a word inside an underlined node and
|
|
6571
|
+
* hit U" is unrepresentable by the stored shape, and the character bar can
|
|
6572
|
+
* only refuse.
|
|
6573
|
+
*
|
|
6574
|
+
* This resolves it by rewriting rather than by widening the model: clear the
|
|
6575
|
+
* flag on the node, and set it on every run *outside* the range. The rendered
|
|
6576
|
+
* result is identical and the edit becomes expressible, with `StyledRun`
|
|
6577
|
+
* unchanged — so nothing a document can already contain changes meaning, which
|
|
6578
|
+
* matters while the flags are heading for a persisted format.
|
|
6579
|
+
*
|
|
6580
|
+
* The alternative was a tri-state run flag (`true` / `false` / inherit). It
|
|
6581
|
+
* cannot cover `bold` or `italic`: those are booleans on a run but
|
|
6582
|
+
* `fontWeight` and `fontStyle` on the node, so a run's `false` has no node-level
|
|
6583
|
+
* boolean to override. Tri-state fixes two of the four flags; this fixes all
|
|
6584
|
+
* four.
|
|
6585
|
+
*/
|
|
6586
|
+
|
|
6587
|
+
/** The additive run flags. */
|
|
6588
|
+
type FlagKey = 'bold' | 'italic' | 'underline' | 'strikethrough';
|
|
6589
|
+
interface SetFlagResult {
|
|
6590
|
+
runs: StyledRun[];
|
|
6591
|
+
style: TextStyle;
|
|
6592
|
+
/**
|
|
6593
|
+
* False when the node flag could not be lowered without changing what is
|
|
6594
|
+
* drawn, and nothing was written. The only case is a `fontWeight` the run
|
|
6595
|
+
* boolean cannot express: `run.bold` resolves to exactly 700 everywhere, so
|
|
6596
|
+
* a node at 900 cannot have its weight pushed onto its runs. Callers should
|
|
6597
|
+
* disable the control rather than apply a silent downgrade.
|
|
6598
|
+
*/
|
|
6599
|
+
applied: boolean;
|
|
6600
|
+
}
|
|
6601
|
+
/** Does the node style carry this flag? */
|
|
6602
|
+
declare function nodeHasFlag(style: TextStyle, key: FlagKey): boolean;
|
|
6603
|
+
/**
|
|
6604
|
+
* Set `key` to `value` over `[start, end)`.
|
|
6605
|
+
*
|
|
6606
|
+
* Turning a flag **on**, or off in a node that doesn't set it, is the ordinary
|
|
6607
|
+
* additive write and leaves `style` alone. Turning it off in a node that *does*
|
|
6608
|
+
* set it takes the rewrite: the node flag is cleared and the flag is written
|
|
6609
|
+
* onto the complement of the range.
|
|
6610
|
+
*
|
|
6611
|
+
* `runs` is normalized on every path, so the complement collapses back to one
|
|
6612
|
+
* run when the range is empty and the whole array coalesces as usual.
|
|
6613
|
+
*/
|
|
6614
|
+
declare function setFlagOverRange(runs: readonly StyledRun[], style: TextStyle, start: number, end: number, key: FlagKey, value: boolean): SetFlagResult;
|
|
6615
|
+
|
|
6409
6616
|
/**
|
|
6410
6617
|
* Build a `TextDrawCommand`. `textCommand` takes a plain string and wraps it
|
|
6411
6618
|
* in one run; `textCommandFromRuns` takes the styled runs directly. Both
|
|
@@ -6484,6 +6691,138 @@ interface TilePatternOpts {
|
|
|
6484
6691
|
*/
|
|
6485
6692
|
declare function createTilePattern(opts: TilePatternOpts): TextureHandle | null;
|
|
6486
6693
|
|
|
6694
|
+
/**
|
|
6695
|
+
* `TilePatternSpec` → `TextureHandle`. The bridge between the serializable
|
|
6696
|
+
* half of a pattern paint and the GL texture that paints it.
|
|
6697
|
+
*
|
|
6698
|
+
* Memoized on the spec's field values, so identical specs across nodes share
|
|
6699
|
+
* one texture and a re-render never re-rasterizes. Entries live for the
|
|
6700
|
+
* session, matching `registerTexture`'s own lifetime.
|
|
6701
|
+
*/
|
|
6702
|
+
|
|
6703
|
+
/**
|
|
6704
|
+
* Build (or fetch) the texture for a spec. Returns `null` when the tile
|
|
6705
|
+
* can't be rasterized — no `OffscreenCanvas`, same as `createTilePattern`.
|
|
6706
|
+
*/
|
|
6707
|
+
declare function resolvePatternSpec(spec: TilePatternSpec): TextureHandle | null;
|
|
6708
|
+
/** Whether a pattern payload is a spec rather than an already-built handle. */
|
|
6709
|
+
declare function isPatternSpec(payload: TextureHandle | TilePatternSpec): payload is TilePatternSpec;
|
|
6710
|
+
/**
|
|
6711
|
+
* Swap a pattern paint's spec payload for the texture that paints it,
|
|
6712
|
+
* leaving every other fill untouched. The built-in painters run this
|
|
6713
|
+
* alongside `fillInPoseFrame`; a consumer emitting its own draw commands
|
|
6714
|
+
* runs it at the same place it runs that one.
|
|
6715
|
+
*
|
|
6716
|
+
* A spec that can't rasterize drops the fill rather than painting garbage.
|
|
6717
|
+
*/
|
|
6718
|
+
declare function resolveFillPattern(fill: FillStyle): FillStyle | null;
|
|
6719
|
+
|
|
6720
|
+
/**
|
|
6721
|
+
* Gradient helpers shared by renderers, editors and exporters: reading a
|
|
6722
|
+
* color out of a stop list, and moving a gradient between its three kinds.
|
|
6723
|
+
*
|
|
6724
|
+
* The stop list is the part every consumer agrees on; the geometry
|
|
6725
|
+
* (`from`/`to`, `center`, `radius`, `angle`) differs per kind, which is what
|
|
6726
|
+
* `withGradientKind` exists to translate.
|
|
6727
|
+
*/
|
|
6728
|
+
|
|
6729
|
+
/**
|
|
6730
|
+
* Color at position `t` (0..1) along a stop list, matching how the GL ramp
|
|
6731
|
+
* texture is built: stops sorted by offset, flat extension past either end,
|
|
6732
|
+
* linear RGB interpolation between neighbors.
|
|
6733
|
+
*
|
|
6734
|
+
* Returns transparent black for an empty list. Alpha is interpolated too, so
|
|
6735
|
+
* a stop list fading to `transparent` samples correctly.
|
|
6736
|
+
*/
|
|
6737
|
+
declare function sampleGradientStops(stops: readonly GradStop[], t: number): string;
|
|
6738
|
+
/**
|
|
6739
|
+
* Retarget a gradient to a different kind, preserving stops, `units` and
|
|
6740
|
+
* `opacity`, and carrying the geometry across as faithfully as the kinds
|
|
6741
|
+
* allow.
|
|
6742
|
+
*
|
|
6743
|
+
* Linear carries a segment; radial and conic carry a center. Converting
|
|
6744
|
+
* between them keeps the center fixed and reads the radius / angle off the
|
|
6745
|
+
* segment, so switching kind in an editor moves the paint as little as
|
|
6746
|
+
* possible instead of snapping to an arbitrary default.
|
|
6747
|
+
*
|
|
6748
|
+
* Lossy in both directions, because the kinds hold different information: a
|
|
6749
|
+
* radial gradient stores no angle, so a round trip through one leaves the
|
|
6750
|
+
* segment horizontal; a conic stores no radius, so a round trip through one
|
|
6751
|
+
* resets the segment's length. An editor that wants a kind switch to be
|
|
6752
|
+
* undoable should keep the original paint rather than converting back.
|
|
6753
|
+
*/
|
|
6754
|
+
declare function withGradientKind(fill: GradientFill, kind: GradientKind): GradientFill;
|
|
6755
|
+
/**
|
|
6756
|
+
* Center / radius / angle for any gradient kind — the shared polar reading
|
|
6757
|
+
* `withGradientKind` converts through, and what on-canvas handles position
|
|
6758
|
+
* themselves from.
|
|
6759
|
+
*
|
|
6760
|
+
* For a linear gradient the center is the segment midpoint, the radius is
|
|
6761
|
+
* half its length, and the angle is its direction.
|
|
6762
|
+
*/
|
|
6763
|
+
declare function gradientGeometry(fill: GradientFill): {
|
|
6764
|
+
center: {
|
|
6765
|
+
x: number;
|
|
6766
|
+
y: number;
|
|
6767
|
+
};
|
|
6768
|
+
radius: number;
|
|
6769
|
+
angle: number;
|
|
6770
|
+
};
|
|
6771
|
+
/**
|
|
6772
|
+
* A gradient spanning a box corner-to-corner (linear) or filling it
|
|
6773
|
+
* (radial / conic) — the sensible starting geometry when a consumer turns a
|
|
6774
|
+
* solid fill into a gradient and has only the shape's bounds to go on.
|
|
6775
|
+
*/
|
|
6776
|
+
declare function gradientForBounds(kind: GradientKind, bounds: {
|
|
6777
|
+
x: number;
|
|
6778
|
+
y: number;
|
|
6779
|
+
width: number;
|
|
6780
|
+
height: number;
|
|
6781
|
+
}, stops: GradStop[], units?: GradientFill['units']): GradientFill;
|
|
6782
|
+
|
|
6783
|
+
/**
|
|
6784
|
+
* Resolve a `units: 'bounds'` gradient into the frame its node is painted in.
|
|
6785
|
+
*
|
|
6786
|
+
* Node painters bake the pose into their geometry (`pathInPoseFrame`) rather
|
|
6787
|
+
* than emitting a per-node transform, so by the time the renderer sees a
|
|
6788
|
+
* scene node there is no node-local space left for a gradient to refer to.
|
|
6789
|
+
* This is the paint-side counterpart: it maps box-relative gradient geometry
|
|
6790
|
+
* onto the same box the path was just projected into, so the two arrive in
|
|
6791
|
+
* the renderer in one frame.
|
|
6792
|
+
*/
|
|
6793
|
+
|
|
6794
|
+
interface FillPoseBox {
|
|
6795
|
+
x: number;
|
|
6796
|
+
y: number;
|
|
6797
|
+
width: number;
|
|
6798
|
+
height: number;
|
|
6799
|
+
}
|
|
6800
|
+
/**
|
|
6801
|
+
* Map a `'bounds'` gradient's `0..1` geometry onto `box`, returning it in the
|
|
6802
|
+
* box's own frame (`units: 'local'`). Any other fill — solid, pattern, or a
|
|
6803
|
+
* gradient in another space — is returned untouched.
|
|
6804
|
+
*
|
|
6805
|
+
* Radii scale by the box's normalized diagonal, SVG's rule for a percentage
|
|
6806
|
+
* radius against `objectBoundingBox`: `sqrt(w² + h²) / sqrt(2)`, which is
|
|
6807
|
+
* exactly `w` for a square box. The renderer's radial gradient is circular,
|
|
6808
|
+
* so a non-square box cannot make it the ellipse SVG would — this keeps the
|
|
6809
|
+
* radius proportionate instead.
|
|
6810
|
+
*/
|
|
6811
|
+
declare function fillInPoseFrame(fill: FillStyle, box: FillPoseBox): FillStyle;
|
|
6812
|
+
/**
|
|
6813
|
+
* Inverse of {@link fillInPoseFrame}: express a gradient already positioned
|
|
6814
|
+
* in `box`'s frame as `0..1` fractions of that box (`units: 'bounds'`), so
|
|
6815
|
+
* it follows the node when moved or resized.
|
|
6816
|
+
*
|
|
6817
|
+
* The importer's counterpart — SVG `userSpaceOnUse` coordinates arrive in
|
|
6818
|
+
* page space, and normalizing them here makes an imported gradient behave
|
|
6819
|
+
* exactly like one drawn in the app.
|
|
6820
|
+
*
|
|
6821
|
+
* A zero-width or zero-height box has no frame to normalize against; the
|
|
6822
|
+
* fill is returned untouched rather than divided by zero.
|
|
6823
|
+
*/
|
|
6824
|
+
declare function fillToBoundsFrame(fill: FillStyle, box: FillPoseBox): FillStyle;
|
|
6825
|
+
|
|
6487
6826
|
/**
|
|
6488
6827
|
* Default `applyOps` implementation: apply each op in order against
|
|
6489
6828
|
* `adapter`. Used by hooks when an adapter omits `applyOps`. Apps that
|
|
@@ -7861,8 +8200,16 @@ declare const RECT_ALIGN_PROJECTION: AlignBoundsProjection<AlignBounds>;
|
|
|
7861
8200
|
* lines. Returns the per-axis snap delta and the matched candidate line(s).
|
|
7862
8201
|
* The two axes resolve independently; on each axis the closest in-tolerance
|
|
7863
8202
|
* (feature, candidate) pair wins.
|
|
8203
|
+
*
|
|
8204
|
+
* `worldTolerance` is per axis because a screen-pixel tolerance is not one
|
|
8205
|
+
* world distance under non-uniform zoom — and each axis here is matched by a
|
|
8206
|
+
* distance along that axis alone, so there is an exact answer rather than an
|
|
8207
|
+
* approximation. Pass the same number twice for a world-space tolerance.
|
|
7864
8208
|
*/
|
|
7865
|
-
declare function matchAlignment(bounds: AlignBounds, candidates: readonly Guide[], worldTolerance:
|
|
8209
|
+
declare function matchAlignment(bounds: AlignBounds, candidates: readonly Guide[], worldTolerance: {
|
|
8210
|
+
x: number;
|
|
8211
|
+
y: number;
|
|
8212
|
+
}, anchors: {
|
|
7866
8213
|
x: readonly AlignAnchor[];
|
|
7867
8214
|
y: readonly AlignAnchor[];
|
|
7868
8215
|
}): AlignMatchResult;
|
|
@@ -7912,7 +8259,8 @@ declare function pointInRotatedRect(pose: RotatedPose, worldX: number, worldY: n
|
|
|
7912
8259
|
|
|
7913
8260
|
/** Default world-space distance from the rect's top edge to the rotation
|
|
7914
8261
|
* handle's center. Matches the demo's visual default; consumers can
|
|
7915
|
-
* override per-call.
|
|
8262
|
+
* override per-call. Unscaled — kit-internal use sites multiply by
|
|
8263
|
+
* `DeviceProfile.targetScale`. */
|
|
7916
8264
|
declare const DEFAULT_ROTATION_HANDLE_DISTANCE = 24;
|
|
7917
8265
|
/** Rotation handle position in world coords. */
|
|
7918
8266
|
interface RotationHandle {
|
|
@@ -8883,6 +9231,43 @@ declare function ExcludeIcon(): react_jsx_runtime.JSX.Element;
|
|
|
8883
9231
|
declare function DivideIcon(): react_jsx_runtime.JSX.Element;
|
|
8884
9232
|
declare function CropIcon(): react_jsx_runtime.JSX.Element;
|
|
8885
9233
|
|
|
9234
|
+
/** What the registry knows at dispatch time. */
|
|
9235
|
+
interface EligibilityState {
|
|
9236
|
+
focusedId: string | null;
|
|
9237
|
+
heldTriggers: ReadonlySet<string>;
|
|
9238
|
+
/** Ids the host reports as hotkey-engaged. A declared `offhand` registers
|
|
9239
|
+
* the binding, but `tool.offhand`'s invoker still reports engagement by
|
|
9240
|
+
* pushing an id — this retires only if that contract changes. */
|
|
9241
|
+
engagedIds?: ReadonlySet<string>;
|
|
9242
|
+
/** Whether the active mode allows these capability tags. Omitted → allow. */
|
|
9243
|
+
allows?: (tags: readonly CapabilityTag[]) => boolean;
|
|
9244
|
+
}
|
|
9245
|
+
/**
|
|
9246
|
+
* The scope tier an entry's bindings are live at, or null when none are.
|
|
9247
|
+
* Ordered hotkey > active > ambient to match the dispatcher's own walk.
|
|
9248
|
+
*/
|
|
9249
|
+
declare function liveScope(id: string, eligibility: Eligibility, state: EligibilityState): BindingScope | null;
|
|
9250
|
+
|
|
9251
|
+
/**
|
|
9252
|
+
* Every binding the entry set contributes right now, each tiered by the
|
|
9253
|
+
* entry's own declared eligibility. Entries with no live tier are omitted.
|
|
9254
|
+
*
|
|
9255
|
+
* Order is preserved: `matchSorted` sorts by specificity within a scope and
|
|
9256
|
+
* breaks ties by declaration order, so the caller's entry order decides which
|
|
9257
|
+
* of two same-specificity bindings in one tier wins.
|
|
9258
|
+
*/
|
|
9259
|
+
declare function scopeBindings(entries: Iterable<Contribution>, state: EligibilityState): ScopedBinding[];
|
|
9260
|
+
|
|
9261
|
+
/**
|
|
9262
|
+
* Concatenate contribution bundles into one registry, preserving order —
|
|
9263
|
+
* entry order decides which of two same-specificity bindings in one scope
|
|
9264
|
+
* tier wins, so it is part of the result, not an accident of it.
|
|
9265
|
+
*
|
|
9266
|
+
* Throws on a duplicate id rather than dropping one: a feature silently
|
|
9267
|
+
* losing its bindings is the failure this registry exists to make loud.
|
|
9268
|
+
*/
|
|
9269
|
+
declare function mergeContributions(...bundles: readonly Contribution[][]): Contribution[];
|
|
9270
|
+
|
|
8886
9271
|
interface InsertOverlayStyle {
|
|
8887
9272
|
fill?: string;
|
|
8888
9273
|
stroke?: string;
|
|
@@ -8890,4 +9275,4 @@ interface InsertOverlayStyle {
|
|
|
8890
9275
|
lineWidth?: number;
|
|
8891
9276
|
}
|
|
8892
9277
|
|
|
8893
|
-
export { Action, ActionsProp, ActionsProviderIfRoot, ActionsRegistry, Affordance, AffordanceBinding, AffordanceHit, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignBounds, type AlignBoundsProjection, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimateToBoundsOptions, type AnimationHandle, type Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, BUNDLE_TOOLS, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, type ColorOverride, type ColorOverrideFn, ColorOverrideRegistry, type ColorSpace, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, Condition, ContentHandlerEntry, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewportLayerOpts, CropIcon, CursorCoordsHud, type CursorCoordsHudProps, type CurveRepKind, type CurveRepresentation, type CustomLayerEntry, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, DEFAULT_HANDLE_SIZE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_STROKE_COLOR, DEFAULT_VELOCITY_DECAY, DebugConfig, DebugSink, DebugSnapshot, DebugTheme, type DecayLoopConfig, type DecayOptions, type DefaultTextData, DepRegistryProviderIfRoot, DepSchema, type DeriveAlignmentGuidesOptions, Dims, type Discriminator, Dispatcher, type DistributeAdapter, type DistributeAxis, type DistributeMode, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCommand, type DropZoneOptions, EASINGS, type EasingFn, type EasingName, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, FillStyle, type FitTextPoseOptions, FitViewToBoundsOptions, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GestureSource, type GridLayerOpts, type GridSlotConfig, Guide, type GuideSnapOptions, type GuidesLayerOpts, HandIcon, type InertiaConfig as HandToolInertiaConfig, type HandleDragPoint, type HeadlessCanvasLike, HotkeyTrigger, type IconProps, type ImageNodeData, type ImageStatus, type IndicatorStyle, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type Interpolate, type InterpolatorFactory, IntersectIcon, KIT_SHAPE_KINDS, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, type LayerSlotValue, type LayersMap, type LayoutLine, type LayoutResult, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, type LoopFactory, type LoopOptions, MIXED, MOVE_ANCHORS, type MarkdownFontOptions, type MeasureFn, type MeasureTextBoundsOpts, type MeasuredText, MinimapCanvas, type MinimapCanvasProps, type MinimapFit, type Mixed, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeId, type NodeInk, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, PATH_ANCHOR_CHROME_ID, type PanBounds, type ParallaxOpts, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, PathFillRule, type PathInWorldPose, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, type PhysicsHandle, type PhysicsOptions, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomToolOpts, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, PoseProjection, type PoseRotation, type PositionedRun, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, type RangeStyle, type RasterImage, type Rect, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, ResolvedTextStyle, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, type RunStylePatch, SPRING_PRESETS, type ScalarOrXY, Scene, SceneAdapter, type SceneAdapterSelection, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewDrawOne, type ScratchKey, type ScratchStore, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionApi, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandlesLayerOpts, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, SerializedScene, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type SharedAnchor, type Simulation, type SimulationForce, type SimulationNode, SliceDep, type SnapPattern, type SnapPointOptions, SnapStrategy, type SplitByLineOptions, type SpringOptions, type SpringPoseOptions, type SpringPreset, type SpringPresetName, type SpringVertexColorsOptions, type StaggerBuilder, type StaggerDelay, type StaggerFactory, type StaggerOptions, type StaggerPerItem, type StaggerSpringPoseOptions, type StaggerTweenOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, Stroke, type StyleKey, StyledRun, type StylusData, SubtractIcon, SvgIngestOptions, type TextEditScreenPose, type TextEditSelection, TextIcon, type TextLineBoxesOpts, type TextPose, type TextRenderer, TextStyle, TextVerticalAlign, TextureHandle, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, Tool, type ToolBundle, ToolCtx, ToolKeybinding, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenLoopOptions, type TweenOptions, type TweenPoseOptions, type TweenVertexColorsOptions, UnionIcon, UnitSystem, UnitValue, UnknownIcon, type UseAlignOptions, type UseAlignReturn, type UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseGestureDispatcherOptions, type UseGridCellHoverOptions, type UseGridCellHoverReturn, type UseGuidesReturn, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, type UseRotateToolOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, UseSelectionOptions, type UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, type UseToolsOptions, type UseZoomOptions, type UseZoomReturn, VERSION, type Vec2, type VertexColorChannel, View, ViewTransform, type ViewportConfig, ViewportDims, type ViewportZoomOptions, VisibilityRules, WeaselProvider, type WheelInput, type WheelState, ZoomBound, type ZoomBounds, type ZoomClampOpts, ZoomFactor, aabbCenter, actionIs, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyHitExistingGate, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, bezierCubic, bezierQuadratic, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, cloneAction, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTilePattern, createTransformOp, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, deleteScratch, deriveAlignmentGuides, deriveParallaxView, dispatchApplyBatch, dlog, domPositionToCharOffset, domToRuns, dwarn, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, ellipsePath, enumerateAnchors, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getNodeShapes, getScratch, getStylusData, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, isDebugEnabled, isEditableTarget, lassoSelectAction, layoutMarkdown, lerpColorArray, lerpOklab, lerpOklch, linePath, linear, makeViewportZoomAction, matchAlignment, matchesKeyBinding, meanScale, measureText, measureTextBounds, measuredWidth, mergeAlphaFromPrev, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, or, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathPoseDescriptor, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInPath, pointInRotatedRect, pointInTextPose, polygonFromPoints, poseRotationOf, pressureToWidth, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerNodeShape, registerOpFactory, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneToAdapter, scratchKey, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setScratch, shapeCoversPoint, snap, snapPoint, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, styleAtRange, subscribeImageReady, textCommand, textLineBoxes, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, tweenPose, tweenVertexColors, unionBounds, unionBoundsPath, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewTween, useZoom, viewportDragPanAction, viewportZoomAction, when, withAlpha01, withCoord, worldEditToStorage, zoomAt, zoomAtLeast };
|
|
9278
|
+
export { ANCHOR_HIT_BASE_PX, Action, ActionsProp, ActionsProviderIfRoot, ActionsRegistry, Affordance, AffordanceBinding, AffordanceHit, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignBounds, type AlignBoundsProjection, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimateToBoundsOptions, type AnimationHandle, type Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, BUNDLE_TOOLS, BindingScope, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COARSE_TARGET_SCALE, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, type ColorOverride, type ColorOverrideFn, ColorOverrideRegistry, type ColorSpace, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, Condition, ContentHandlerEntry, Contribution, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewportLayerOpts, CropIcon, CursorCoordsHud, type CursorCoordsHudProps, type CurveRepKind, type CurveRepresentation, type CustomLayerEntry, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, DEFAULT_HANDLE_SIZE, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_STROKE_COLOR, DEFAULT_VELOCITY_DECAY, DebugConfig, DebugSink, DebugSnapshot, DebugTheme, type DecayLoopConfig, type DecayOptions, type DefaultTextData, DepRegistryProviderIfRoot, DepSchema, type DeriveAlignmentGuidesOptions, DetectedDeviceFacts, DeviceProfile, DeviceProfileProvider, type DeviceProfileProviderProps, Dims, type Discriminator, Dispatcher, type DistributeAdapter, type DistributeAxis, type DistributeMode, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCommand, type DropZoneOptions, EASINGS, type EasingFn, type EasingName, Eligibility, type EligibilityState, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FillPoseBox, FillStyle, type FitTextPoseOptions, FitViewToBoundsOptions, type FlagKey, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GestureSource, GradStop, GradientFill, GradientKind, type GridLayerOpts, type GridSlotConfig, Guide, type GuideSnapOptions, type GuidesLayerOpts, HANDLE_BASE_PX, HandIcon, type InertiaConfig as HandToolInertiaConfig, type HandleDragPoint, type HeadlessCanvasLike, HotkeyTrigger, type IconProps, type ImageNodeData, type ImageStatus, type IndicatorStyle, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type Interpolate, type InterpolatorFactory, IntersectIcon, KIT_SHAPE_KINDS, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerHit, type LayerSlotValue, type LayersMap, type LayoutLine, type LayoutResult, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, type LoopFactory, type LoopOptions, MIXED, MOVE_ANCHORS, type MarkdownFontOptions, type MeasureFn, type MeasureTextBoundsOpts, type MeasuredText, MinimapCanvas, type MinimapCanvasProps, type MinimapFit, type Mixed, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeId, type NodeInk, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, PATH_ANCHOR_CHROME_ID, type PanBounds, type ParallaxOpts, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, PathFillRule, type PathInWorldPose, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, type PhysicsHandle, type PhysicsOptions, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomToolOpts, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, PoseProjection, type PoseRotation, type PositionedRun, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, type Rect, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, ResolvedTextStyle, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, type RunStylePatch, SPRING_PRESETS, type ScalarOrXY, Scene, SceneAdapter, type SceneAdapterSelection, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewDrawOne, ScopedBinding, type ScratchKey, type ScratchStore, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionApi, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandlesLayerOpts, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type SharedAnchor, type Simulation, type SimulationForce, type SimulationNode, SliceDep, type SnapPattern, type SnapPointOptions, SnapStrategy, type SplitByLineOptions, type SpringOptions, type SpringPoseOptions, type SpringPreset, type SpringPresetName, type SpringVertexColorsOptions, type StaggerBuilder, type StaggerDelay, type StaggerFactory, type StaggerOptions, type StaggerPerItem, type StaggerSpringPoseOptions, type StaggerTweenOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, Stroke, type StyleKey, StyledRun, type StylusData, SubtractIcon, SvgIngestOptions, type TextEditScreenPose, type TextEditSelection, TextIcon, type TextLineBoxesOpts, type TextPose, type TextRenderer, TextStyle, TextVerticalAlign, TextureHandle, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, TilePatternSpec, Tool, type ToolBundle, ToolCtx, ToolKeybinding, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenLoopOptions, type TweenOptions, type TweenPoseOptions, type TweenVertexColorsOptions, UnionIcon, UnitSystem, UnitValue, UnknownIcon, type UseAlignOptions, type UseAlignReturn, type UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseGestureDispatcherOptions, type UseGridCellHoverOptions, type UseGridCellHoverReturn, type UseGuidesReturn, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, type UseRotateToolOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, UseSelectionOptions, type UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, type UseToolsOptions, type UseZoomOptions, type UseZoomReturn, VERSION, type Vec2, type VertexColorChannel, View, ViewTransform, type ViewportConfig, ViewportDims, type ViewportZoomOptions, VisibilityRules, WeaselProvider, type WheelInput, type WheelState, ZoomBound, type ZoomBounds, type ZoomClampOpts, ZoomFactor, aabbCenter, actionIs, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyHitExistingGate, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, bezierCubic, bezierQuadratic, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTilePattern, createTransformOp, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, deleteScratch, deriveAlignmentGuides, deriveParallaxView, dispatchApplyBatch, dlog, domPositionToCharOffset, domToRuns, dwarn, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorsAction, ellipsePath, enumerateAnchors, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getNodeShapes, getScratch, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, isDebugEnabled, isEditableTarget, isPatternSpec, lassoSelectAction, layoutMarkdown, lerpColorArray, lerpOklab, lerpOklch, linePath, linear, liveScope, makeViewportZoomAction, matchAlignment, matchesKeyBinding, meanScale, measureText, measureTextBounds, measuredWidth, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, or, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathPoseDescriptor, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInPath, pointInRotatedRect, pointInTextPose, polygonFromPoints, poseRotationOf, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerNodeShape, registerOpFactory, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveDeviceProfile, resolveFillPattern, resolvePatternSpec, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, sampleGradientStops, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneToAdapter, scopeBindings, scratchKey, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, snap, snapPoint, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, styleAtRange, subscribeImageReady, textCommand, textLineBoxes, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, tweenPose, tweenVertexColors, unionBounds, unionBoundsPath, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewTween, useZoom, viewportDragPanAction, viewportZoomAction, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };
|