@woven-canvas/core 0.1.3 → 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/build/_tsup-dts-rollup.d.cts +28 -4
- package/build/_tsup-dts-rollup.d.ts +28 -4
- package/build/index.cjs +308 -263
- package/build/index.cjs.map +1 -1
- package/build/index.d.cts +3 -1
- package/build/index.d.ts +3 -1
- package/build/index.js +311 -269
- package/build/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -132,6 +132,7 @@ declare const BlockDef: z.ZodObject<{
|
|
|
132
132
|
}>>;
|
|
133
133
|
canRotate: z.ZodDefault<z.ZodBoolean>;
|
|
134
134
|
canScale: z.ZodDefault<z.ZodBoolean>;
|
|
135
|
+
selectable: z.ZodDefault<z.ZodBoolean>;
|
|
135
136
|
connectors: z.ZodDefault<z.ZodObject<{
|
|
136
137
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
137
138
|
terminals: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
@@ -172,6 +173,7 @@ declare const BlockSchema: {
|
|
|
172
173
|
rotateZ: NumberFieldBuilder<"float64">;
|
|
173
174
|
flip: TupleFieldBuilder<BooleanFieldBuilder, 2>;
|
|
174
175
|
rank: StringFieldBuilder;
|
|
176
|
+
resizeMode: EnumFieldBuilder<"default" | "scale" | "text" | "free" | "groupOnly">;
|
|
175
177
|
};
|
|
176
178
|
|
|
177
179
|
declare const Camera: CameraDef;
|
|
@@ -214,6 +216,11 @@ declare function canBlockScale(ctx: Context, tag: string): boolean;
|
|
|
214
216
|
export { canBlockScale }
|
|
215
217
|
export { canBlockScale as canBlockScale_alias_1 }
|
|
216
218
|
|
|
219
|
+
declare function canBlockSelect(ctx: Context, tag: string): boolean;
|
|
220
|
+
export { canBlockSelect }
|
|
221
|
+
export { canBlockSelect as canBlockSelect_alias_1 }
|
|
222
|
+
export { canBlockSelect as canBlockSelect_alias_2 }
|
|
223
|
+
|
|
217
224
|
declare const canSeeBlocksSystem: EditorSystem;
|
|
218
225
|
export { canSeeBlocksSystem }
|
|
219
226
|
export { canSeeBlocksSystem as canSeeBlocksSystem_alias_1 }
|
|
@@ -335,6 +342,8 @@ declare const ControlsSchema: {
|
|
|
335
342
|
heldSnapshot: StringFieldBuilder;
|
|
336
343
|
};
|
|
337
344
|
|
|
345
|
+
export declare const CORE_PLUGIN_NAME = "core";
|
|
346
|
+
|
|
338
347
|
declare const CorePlugin: EditorPlugin;
|
|
339
348
|
export { CorePlugin }
|
|
340
349
|
export { CorePlugin as CorePlugin_alias_1 }
|
|
@@ -500,6 +509,7 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
500
509
|
resizeMode?: "scale" | "text" | "free" | "groupOnly" | undefined;
|
|
501
510
|
canRotate?: boolean | undefined;
|
|
502
511
|
canScale?: boolean | undefined;
|
|
512
|
+
selectable?: boolean | undefined;
|
|
503
513
|
connectors?: {
|
|
504
514
|
enabled?: boolean | undefined;
|
|
505
515
|
terminals?: [number, number][] | undefined;
|
|
@@ -515,6 +525,7 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
515
525
|
resizeMode?: "scale" | "text" | "free" | "groupOnly" | undefined;
|
|
516
526
|
canRotate?: boolean | undefined;
|
|
517
527
|
canScale?: boolean | undefined;
|
|
528
|
+
selectable?: boolean | undefined;
|
|
518
529
|
connectors?: {
|
|
519
530
|
enabled?: boolean | undefined;
|
|
520
531
|
terminals?: [number, number][] | undefined;
|
|
@@ -726,6 +737,11 @@ declare function getBlockDefs(ctx: Context): Record<string, BlockDef>;
|
|
|
726
737
|
export { getBlockDefs }
|
|
727
738
|
export { getBlockDefs as getBlockDefs_alias_1 }
|
|
728
739
|
|
|
740
|
+
declare function getBlockResizeMode(ctx: Context, entityId: EntityId): ResizeMode;
|
|
741
|
+
export { getBlockResizeMode }
|
|
742
|
+
export { getBlockResizeMode as getBlockResizeMode_alias_1 }
|
|
743
|
+
export { getBlockResizeMode as getBlockResizeMode_alias_2 }
|
|
744
|
+
|
|
729
745
|
export declare function getCursorSvg(cursors: Record<string, CursorDef>, kind: string, rotateZ: number): string;
|
|
730
746
|
|
|
731
747
|
declare function getFrameInput(ctx: Context): FrameInput;
|
|
@@ -1107,6 +1123,7 @@ declare class MouseDef extends CanvasSingletonDef<typeof MouseSchema> {
|
|
|
1107
1123
|
didLeave(ctx: Context): boolean;
|
|
1108
1124
|
getPosition(ctx: Context): Vec2;
|
|
1109
1125
|
getWheelDelta(ctx: Context): Vec2;
|
|
1126
|
+
isObscured(ctx: Context): boolean;
|
|
1110
1127
|
}
|
|
1111
1128
|
|
|
1112
1129
|
declare interface MouseInput {
|
|
@@ -1134,6 +1151,7 @@ declare const MouseSchema: {
|
|
|
1134
1151
|
wheelTrigger: BooleanFieldBuilder;
|
|
1135
1152
|
enterTrigger: BooleanFieldBuilder;
|
|
1136
1153
|
leaveTrigger: BooleanFieldBuilder;
|
|
1154
|
+
obscured: BooleanFieldBuilder;
|
|
1137
1155
|
};
|
|
1138
1156
|
|
|
1139
1157
|
declare const mouseSystem: EditorSystem;
|
|
@@ -1155,8 +1173,6 @@ declare function parsePlugin(input: EditorPluginInput): EditorPlugin;
|
|
|
1155
1173
|
export { parsePlugin }
|
|
1156
1174
|
export { parsePlugin as parsePlugin_alias_1 }
|
|
1157
1175
|
|
|
1158
|
-
export declare const PLUGIN_NAME = "core";
|
|
1159
|
-
|
|
1160
1176
|
declare const Pointer: PointerDef;
|
|
1161
1177
|
export { Pointer }
|
|
1162
1178
|
export { Pointer as Pointer_alias_1 }
|
|
@@ -1225,7 +1241,7 @@ declare const PointerSchema: {
|
|
|
1225
1241
|
position: TupleFieldBuilder<NumberFieldBuilder<"float32">, 2>;
|
|
1226
1242
|
downPosition: TupleFieldBuilder<NumberFieldBuilder<"float32">, 2>;
|
|
1227
1243
|
downFrame: NumberFieldBuilder<"uint32">;
|
|
1228
|
-
button: EnumFieldBuilder<"
|
|
1244
|
+
button: EnumFieldBuilder<"left" | "none" | "middle" | "right" | "back" | "forward">;
|
|
1229
1245
|
pointerType: EnumFieldBuilder<"mouse" | "pen" | "touch">;
|
|
1230
1246
|
pressure: NumberFieldBuilder<"float32">;
|
|
1231
1247
|
obscured: BooleanFieldBuilder;
|
|
@@ -1298,7 +1314,15 @@ declare const ResetKeyboard: CommandDef<void>;
|
|
|
1298
1314
|
export { ResetKeyboard }
|
|
1299
1315
|
export { ResetKeyboard as ResetKeyboard_alias_1 }
|
|
1300
1316
|
|
|
1301
|
-
declare
|
|
1317
|
+
declare const ResizeMode: {
|
|
1318
|
+
readonly Default: "default";
|
|
1319
|
+
readonly Scale: "scale";
|
|
1320
|
+
readonly Text: "text";
|
|
1321
|
+
readonly Free: "free";
|
|
1322
|
+
readonly GroupOnly: "groupOnly";
|
|
1323
|
+
};
|
|
1324
|
+
|
|
1325
|
+
declare type ResizeMode = (typeof ResizeMode)[keyof typeof ResizeMode];
|
|
1302
1326
|
export { ResizeMode }
|
|
1303
1327
|
export { ResizeMode as ResizeMode_alias_1 }
|
|
1304
1328
|
|
|
@@ -132,6 +132,7 @@ declare const BlockDef: z.ZodObject<{
|
|
|
132
132
|
}>>;
|
|
133
133
|
canRotate: z.ZodDefault<z.ZodBoolean>;
|
|
134
134
|
canScale: z.ZodDefault<z.ZodBoolean>;
|
|
135
|
+
selectable: z.ZodDefault<z.ZodBoolean>;
|
|
135
136
|
connectors: z.ZodDefault<z.ZodObject<{
|
|
136
137
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
137
138
|
terminals: z.ZodDefault<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
@@ -172,6 +173,7 @@ declare const BlockSchema: {
|
|
|
172
173
|
rotateZ: NumberFieldBuilder<"float64">;
|
|
173
174
|
flip: TupleFieldBuilder<BooleanFieldBuilder, 2>;
|
|
174
175
|
rank: StringFieldBuilder;
|
|
176
|
+
resizeMode: EnumFieldBuilder<"default" | "scale" | "text" | "free" | "groupOnly">;
|
|
175
177
|
};
|
|
176
178
|
|
|
177
179
|
declare const Camera: CameraDef;
|
|
@@ -214,6 +216,11 @@ declare function canBlockScale(ctx: Context, tag: string): boolean;
|
|
|
214
216
|
export { canBlockScale }
|
|
215
217
|
export { canBlockScale as canBlockScale_alias_1 }
|
|
216
218
|
|
|
219
|
+
declare function canBlockSelect(ctx: Context, tag: string): boolean;
|
|
220
|
+
export { canBlockSelect }
|
|
221
|
+
export { canBlockSelect as canBlockSelect_alias_1 }
|
|
222
|
+
export { canBlockSelect as canBlockSelect_alias_2 }
|
|
223
|
+
|
|
217
224
|
declare const canSeeBlocksSystem: EditorSystem;
|
|
218
225
|
export { canSeeBlocksSystem }
|
|
219
226
|
export { canSeeBlocksSystem as canSeeBlocksSystem_alias_1 }
|
|
@@ -335,6 +342,8 @@ declare const ControlsSchema: {
|
|
|
335
342
|
heldSnapshot: StringFieldBuilder;
|
|
336
343
|
};
|
|
337
344
|
|
|
345
|
+
export declare const CORE_PLUGIN_NAME = "core";
|
|
346
|
+
|
|
338
347
|
declare const CorePlugin: EditorPlugin;
|
|
339
348
|
export { CorePlugin }
|
|
340
349
|
export { CorePlugin as CorePlugin_alias_1 }
|
|
@@ -500,6 +509,7 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
500
509
|
resizeMode?: "scale" | "text" | "free" | "groupOnly" | undefined;
|
|
501
510
|
canRotate?: boolean | undefined;
|
|
502
511
|
canScale?: boolean | undefined;
|
|
512
|
+
selectable?: boolean | undefined;
|
|
503
513
|
connectors?: {
|
|
504
514
|
enabled?: boolean | undefined;
|
|
505
515
|
terminals?: [number, number][] | undefined;
|
|
@@ -515,6 +525,7 @@ export declare const EditorOptionsSchema: z.ZodObject<{
|
|
|
515
525
|
resizeMode?: "scale" | "text" | "free" | "groupOnly" | undefined;
|
|
516
526
|
canRotate?: boolean | undefined;
|
|
517
527
|
canScale?: boolean | undefined;
|
|
528
|
+
selectable?: boolean | undefined;
|
|
518
529
|
connectors?: {
|
|
519
530
|
enabled?: boolean | undefined;
|
|
520
531
|
terminals?: [number, number][] | undefined;
|
|
@@ -726,6 +737,11 @@ declare function getBlockDefs(ctx: Context): Record<string, BlockDef>;
|
|
|
726
737
|
export { getBlockDefs }
|
|
727
738
|
export { getBlockDefs as getBlockDefs_alias_1 }
|
|
728
739
|
|
|
740
|
+
declare function getBlockResizeMode(ctx: Context, entityId: EntityId): ResizeMode;
|
|
741
|
+
export { getBlockResizeMode }
|
|
742
|
+
export { getBlockResizeMode as getBlockResizeMode_alias_1 }
|
|
743
|
+
export { getBlockResizeMode as getBlockResizeMode_alias_2 }
|
|
744
|
+
|
|
729
745
|
export declare function getCursorSvg(cursors: Record<string, CursorDef>, kind: string, rotateZ: number): string;
|
|
730
746
|
|
|
731
747
|
declare function getFrameInput(ctx: Context): FrameInput;
|
|
@@ -1107,6 +1123,7 @@ declare class MouseDef extends CanvasSingletonDef<typeof MouseSchema> {
|
|
|
1107
1123
|
didLeave(ctx: Context): boolean;
|
|
1108
1124
|
getPosition(ctx: Context): Vec2;
|
|
1109
1125
|
getWheelDelta(ctx: Context): Vec2;
|
|
1126
|
+
isObscured(ctx: Context): boolean;
|
|
1110
1127
|
}
|
|
1111
1128
|
|
|
1112
1129
|
declare interface MouseInput {
|
|
@@ -1134,6 +1151,7 @@ declare const MouseSchema: {
|
|
|
1134
1151
|
wheelTrigger: BooleanFieldBuilder;
|
|
1135
1152
|
enterTrigger: BooleanFieldBuilder;
|
|
1136
1153
|
leaveTrigger: BooleanFieldBuilder;
|
|
1154
|
+
obscured: BooleanFieldBuilder;
|
|
1137
1155
|
};
|
|
1138
1156
|
|
|
1139
1157
|
declare const mouseSystem: EditorSystem;
|
|
@@ -1155,8 +1173,6 @@ declare function parsePlugin(input: EditorPluginInput): EditorPlugin;
|
|
|
1155
1173
|
export { parsePlugin }
|
|
1156
1174
|
export { parsePlugin as parsePlugin_alias_1 }
|
|
1157
1175
|
|
|
1158
|
-
export declare const PLUGIN_NAME = "core";
|
|
1159
|
-
|
|
1160
1176
|
declare const Pointer: PointerDef;
|
|
1161
1177
|
export { Pointer }
|
|
1162
1178
|
export { Pointer as Pointer_alias_1 }
|
|
@@ -1225,7 +1241,7 @@ declare const PointerSchema: {
|
|
|
1225
1241
|
position: TupleFieldBuilder<NumberFieldBuilder<"float32">, 2>;
|
|
1226
1242
|
downPosition: TupleFieldBuilder<NumberFieldBuilder<"float32">, 2>;
|
|
1227
1243
|
downFrame: NumberFieldBuilder<"uint32">;
|
|
1228
|
-
button: EnumFieldBuilder<"
|
|
1244
|
+
button: EnumFieldBuilder<"left" | "none" | "middle" | "right" | "back" | "forward">;
|
|
1229
1245
|
pointerType: EnumFieldBuilder<"mouse" | "pen" | "touch">;
|
|
1230
1246
|
pressure: NumberFieldBuilder<"float32">;
|
|
1231
1247
|
obscured: BooleanFieldBuilder;
|
|
@@ -1298,7 +1314,15 @@ declare const ResetKeyboard: CommandDef<void>;
|
|
|
1298
1314
|
export { ResetKeyboard }
|
|
1299
1315
|
export { ResetKeyboard as ResetKeyboard_alias_1 }
|
|
1300
1316
|
|
|
1301
|
-
declare
|
|
1317
|
+
declare const ResizeMode: {
|
|
1318
|
+
readonly Default: "default";
|
|
1319
|
+
readonly Scale: "scale";
|
|
1320
|
+
readonly Text: "text";
|
|
1321
|
+
readonly Free: "free";
|
|
1322
|
+
readonly GroupOnly: "groupOnly";
|
|
1323
|
+
};
|
|
1324
|
+
|
|
1325
|
+
declare type ResizeMode = (typeof ResizeMode)[keyof typeof ResizeMode];
|
|
1302
1326
|
export { ResizeMode }
|
|
1303
1327
|
export { ResizeMode as ResizeMode_alias_1 }
|
|
1304
1328
|
|