@snaptrude/plugin-core 0.9.6 → 0.9.7
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 +14 -0
- package/api-manifest.full.json +8442 -0
- package/api-manifest.json +162 -6
- package/dist/api/core/io/import/index.d.ts +3 -1
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +177 -0
- package/dist/api/design/create/bulk-items.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +273 -8
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +29 -0
- package/dist/api/design/create/opening-fields.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +4 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +427 -0
- package/dist/api/design/dimensions.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +5 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/presentation/annotate.d.ts +2 -2
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/handles.d.ts +19 -0
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2006 -1867
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1983 -1867
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/core/io/import/index.ts +11 -3
- package/src/api/design/create/bulk-items.ts +182 -0
- package/src/api/design/create/index.ts +296 -18
- package/src/api/design/create/opening-fields.ts +29 -0
- package/src/api/design/delete/index.ts +4 -0
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/index.ts +5 -0
- package/src/handles.ts +24 -0
package/api-manifest.json
CHANGED
|
@@ -4302,7 +4302,23 @@
|
|
|
4302
4302
|
"Add a door that opens into the living room\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst door = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Entry-01\" },\n)\n// …facing a specific side of the wall (pass a point inside that room):\nconst intoKitchen = await snaptrude.design.create.door(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\nawait snaptrude.core.math.vec3.new(3, 0, 9),\n)\n```"
|
|
4303
4303
|
],
|
|
4304
4304
|
"argsType": "string",
|
|
4305
|
-
"resultType": "ComponentHandle"
|
|
4305
|
+
"resultType": "ComponentHandle",
|
|
4306
|
+
"performance": "For MORE THAN ONE door, call `design.create.doors(items[])` — one host round-trip and ONE undo entry, with each host wall re-cut once per opening inside that single call. Looping this single-door creator is N round-trips."
|
|
4307
|
+
},
|
|
4308
|
+
{
|
|
4309
|
+
"path": "design.create.doors",
|
|
4310
|
+
"namespace": "design.create",
|
|
4311
|
+
"summary": "Place **many doors** into host walls in one undoable operation (bulk plural of {@linkcode door}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width` and `height` — the same fields as a `\"door\"` {@linkcode PluginDesignCreateOpeningOptions}. Validate-all-or-throw; one command.",
|
|
4312
|
+
"examplePrompts": [
|
|
4313
|
+
"Add doors to all of these walls at once",
|
|
4314
|
+
"Place a door in every room in one operation",
|
|
4315
|
+
"Bulk add the entrance doors from this schedule",
|
|
4316
|
+
"Put three doors on this wall in a single undo step",
|
|
4317
|
+
"Add all the doors for this floor plan together"
|
|
4318
|
+
],
|
|
4319
|
+
"argsType": "PluginCreateDoorItem[]",
|
|
4320
|
+
"resultType": "ComponentHandle[]",
|
|
4321
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.door` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [entry] = await snaptrude.design.doors.listCatalog() const [front, side] = await snaptrude.design.create.doors([ { catalogId: entry.id, hostWall: wall, position: await v.new(2, 0, 5), label: \"D-01\" }, { catalogId: entry.id, hostWall: wall, position: await v.new(6, 0, 5), width: 1.2 }, ]) // `wall` was re-cut twice and no longer resolves — ask the opening for its host: const currentWall = await snaptrude.design.query.getHost(front) ```"
|
|
4306
4322
|
},
|
|
4307
4323
|
{
|
|
4308
4324
|
"path": "design.create.floor",
|
|
@@ -4315,7 +4331,23 @@
|
|
|
4315
4331
|
"Put a floor at this position with 150mm thickness\n\n# Example\n```ts\nconst rect = await snaptrude.core.geom.create.profileRect(5, 4)\nconst contour = await snaptrude.core.geom.create.contourFromProfile(rect)\nconst floor = await snaptrude.design.create.floor(contour, 0.1)\n```"
|
|
4316
4332
|
],
|
|
4317
4333
|
"argsType": "ContourHandle",
|
|
4318
|
-
"resultType": "ComponentHandle"
|
|
4334
|
+
"resultType": "ComponentHandle",
|
|
4335
|
+
"performance": "For MORE THAN ONE floor, call `design.create.floors(items[])` — one host round-trip and ONE undo entry for the whole batch. Looping this single-floor creator is N round-trips and N undo entries."
|
|
4336
|
+
},
|
|
4337
|
+
{
|
|
4338
|
+
"path": "design.create.floors",
|
|
4339
|
+
"namespace": "design.create",
|
|
4340
|
+
"summary": "Create **many floors** in one undoable operation (bulk plural of {@linkcode floor}). Each item extrudes its own footprint contour (outer profile + holes) upward by its own `thickness`, at its own optional position offset. Validate-all-or-throw; one command.",
|
|
4341
|
+
"examplePrompts": [
|
|
4342
|
+
"Create floors for all these room outlines at once",
|
|
4343
|
+
"Add a floor to every space in one operation",
|
|
4344
|
+
"Bulk create the floor plates for this building",
|
|
4345
|
+
"Lay 100mm floors across these five footprints in one undo step",
|
|
4346
|
+
"Create the ground and first floor slabs together"
|
|
4347
|
+
],
|
|
4348
|
+
"argsType": "PluginCreateFloorItem[]",
|
|
4349
|
+
"resultType": "ComponentHandle[]",
|
|
4350
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.floor` in a loop: build the full `items[]` array first (all contours and offsets up front), then make one call. # Example ```ts const rect = await snaptrude.core.geom.create.profileRect(5, 4) const contour = await snaptrude.core.geom.create.contourFromProfile(rect) const [ground, upper] = await snaptrude.design.create.floors([ { contour, thickness: 0.1 }, { contour, thickness: 0.1, position: await snaptrude.core.math.vec3.new(0, 3, 0) }, ]) ```"
|
|
4319
4351
|
},
|
|
4320
4352
|
{
|
|
4321
4353
|
"path": "design.create.furniture",
|
|
@@ -4330,7 +4362,23 @@
|
|
|
4330
4362
|
"Place a chair here rotated 90 degrees\n\n# Example\n```ts\nconst chair = await snaptrude.design.create.furniture(\n\"6620f1a…\", // from design.furniture.listCatalog()\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Chair-01\" },\n)\n// …placed already turned 90° about the vertical axis:\nconst turned = await snaptrude.design.create.furniture(\n\"6620f1a…\",\nawait snaptrude.core.math.vec3.new(3, 0, 5),\nundefined,\n90,\n)\n```"
|
|
4331
4363
|
],
|
|
4332
4364
|
"argsType": "string",
|
|
4333
|
-
"resultType": "ComponentHandle"
|
|
4365
|
+
"resultType": "ComponentHandle",
|
|
4366
|
+
"performance": "For MORE THAN ONE item, call `design.create.furnitureItems(items[])` — one host round-trip and ONE undo entry, and a catalog source shared by several items is fetched once. Looping this single-item creator is N round-trips."
|
|
4367
|
+
},
|
|
4368
|
+
{
|
|
4369
|
+
"path": "design.create.furnitureItems",
|
|
4370
|
+
"namespace": "design.create",
|
|
4371
|
+
"summary": "Place **many furniture items** in one undoable operation (bulk plural of {@linkcode furniture}). Each item names a catalog id and an absolute world position (`position.y` is the REST elevation — the same grounding contract as the singular creator), with optional label and rotation. A catalog source shared by several items is fetched and recorded once for the whole batch, so the host — not the caller — owns source persistence (there is no per-item `createNewSourceMesh`). Validate-all-or-throw; one command.",
|
|
4372
|
+
"examplePrompts": [
|
|
4373
|
+
"Place all the desks for this office at once",
|
|
4374
|
+
"Furnish every bedroom in one operation",
|
|
4375
|
+
"Bulk place these chairs around the table",
|
|
4376
|
+
"Add the whole furniture layout in a single undo step",
|
|
4377
|
+
"Drop twenty copies of this chair at these positions"
|
|
4378
|
+
],
|
|
4379
|
+
"argsType": "PluginCreateFurnitureItem[]",
|
|
4380
|
+
"resultType": "ComponentHandle[]",
|
|
4381
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.furniture` in a loop: build the full `items[]` array first (all positions and angles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [chair] = await snaptrude.design.furniture.listCatalog() const placed = await snaptrude.design.create.furnitureItems([ { catalogId: chair.id, position: await v.new(3, 0, 5), label: \"Chair-01\" }, { catalogId: chair.id, position: await v.new(4, 0, 5), angleInDegrees: 90 }, { catalogId: chair.id, position: await v.new(5, 0, 5), angleInDegrees: 180 }, ]) ```"
|
|
4334
4382
|
},
|
|
4335
4383
|
{
|
|
4336
4384
|
"path": "design.create.mass",
|
|
@@ -4367,7 +4415,7 @@
|
|
|
4367
4415
|
],
|
|
4368
4416
|
"argsType": "PluginDesignCreateOpeningOptions",
|
|
4369
4417
|
"resultType": "ComponentHandle",
|
|
4370
|
-
"performance": "Single-opening creator — use it for one hosted opening.
|
|
4418
|
+
"performance": "Single-opening creator — use it for one hosted opening. For MORE THAN ONE, call `design.create.doors(items[])` / `design.create.windows(items[])`: the same per-item fields, one host round-trip, ONE undo entry. # Example ```ts const opening = await snaptrude.design.create.opening({ kind: \"window\", catalogId: windowType.id, hostWall: wall, position: await snaptrude.core.math.vec3.new(3, 0, 5), width: 1.2, height: 1.5, sillHeight: 0.9, }) ```"
|
|
4371
4419
|
},
|
|
4372
4420
|
{
|
|
4373
4421
|
"path": "design.create.referenceLines",
|
|
@@ -4469,6 +4517,21 @@
|
|
|
4469
4517
|
"argsType": "PluginStaircasePreset",
|
|
4470
4518
|
"resultType": "ComponentHandle"
|
|
4471
4519
|
},
|
|
4520
|
+
{
|
|
4521
|
+
"path": "design.create.wallRuns",
|
|
4522
|
+
"namespace": "design.create",
|
|
4523
|
+
"summary": "Create **many wall runs** in one undoable operation (bulk plural of {@linkcode walls}). Each item is one full run — a wall per curve in that item's profile chain, mitred at shared endpoints. Junctions resolve within a run, not between runs. Each item carries its own dimensions, `wallType` and `storey`, so a single call can build a whole floor plate or several storeys at once. Validate-all-or-throw; one command.",
|
|
4524
|
+
"examplePrompts": [
|
|
4525
|
+
"Draw all the walls of this floor plan at once",
|
|
4526
|
+
"Build every room's perimeter in one operation",
|
|
4527
|
+
"Bulk create wall runs from these centerlines",
|
|
4528
|
+
"Create the walls for both storeys in a single undo step",
|
|
4529
|
+
"Turn these polylines into 200mm brick walls together"
|
|
4530
|
+
],
|
|
4531
|
+
"argsType": "PluginCreateWallRunItem[]",
|
|
4532
|
+
"resultType": "ComponentHandle[][]",
|
|
4533
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry. Always prefer this over calling `design.create.walls` in a loop: build the full `items[]` array first (all profiles up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const ground = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), await v.new(8, 0, 6), ]) const upper = await snaptrude.core.geom.create.profileFromLinePoints([ await v.new(0, 0, 0), await v.new(8, 0, 0), ]) const [groundWalls, upperWalls] = await snaptrude.design.create.wallRuns([ { profile: ground, height: 3, thickness: 0.2 }, { profile: upper, height: 3, storey: 2 }, ]) console.log(groundWalls.length, \"walls on the ground floor\") ```"
|
|
4534
|
+
},
|
|
4472
4535
|
{
|
|
4473
4536
|
"path": "design.create.walls",
|
|
4474
4537
|
"namespace": "design.create",
|
|
@@ -4483,7 +4546,8 @@
|
|
|
4483
4546
|
"Build the perimeter in exposed concrete walls\n\n# Example\n```ts\nconst v = snaptrude.core.math.vec3\nconst centerlines = await snaptrude.core.geom.create.profileFromLinePoints([\nawait v.new(0, 0, 0),\nawait v.new(8, 0, 0),\nawait v.new(8, 0, 6),\n])\nconst walls = await snaptrude.design.create.walls(centerlines, 3, 0.2)\n// …built as a specific wall type (layers/material/thickness from the type):\nconst [brick] = await snaptrude.design.types.list(\"wall\")\nconst brickWalls = await snaptrude.design.create.walls(\ncenterlines, 3, undefined, brick.label,\n)\n```"
|
|
4484
4547
|
],
|
|
4485
4548
|
"argsType": "ProfileHandle",
|
|
4486
|
-
"resultType": "ComponentHandle[]"
|
|
4549
|
+
"resultType": "ComponentHandle[]",
|
|
4550
|
+
"performance": "For MORE THAN ONE run, call `design.create.wallRuns(items[])` — one host round-trip and ONE undo entry for every run in the batch. Looping this single-run creator is N round-trips and N undo entries."
|
|
4487
4551
|
},
|
|
4488
4552
|
{
|
|
4489
4553
|
"path": "design.create.window",
|
|
@@ -4498,7 +4562,23 @@
|
|
|
4498
4562
|
"Add a casement window opening toward the garden side\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ isSelected: true })\nconst [entry] = await snaptrude.design.windows.listCatalog()\nconst window = await snaptrude.design.create.window(\nentry.id,\nwall,\nawait snaptrude.core.math.vec3.new(3, 0, 5),\n{ label: \"Win-01\" },\n)\n```"
|
|
4499
4563
|
],
|
|
4500
4564
|
"argsType": "string",
|
|
4501
|
-
"resultType": "ComponentHandle"
|
|
4565
|
+
"resultType": "ComponentHandle",
|
|
4566
|
+
"performance": "For MORE THAN ONE window, call `design.create.windows(items[])` — one host round-trip and ONE undo entry, with each host wall re-cut once per opening inside that single call. Looping this single-window creator is N round-trips."
|
|
4567
|
+
},
|
|
4568
|
+
{
|
|
4569
|
+
"path": "design.create.windows",
|
|
4570
|
+
"namespace": "design.create",
|
|
4571
|
+
"summary": "Place **many windows** into host walls in one undoable operation (bulk plural of {@linkcode window}). Each item carries its own catalog id, host wall, world position, and optional `facing`, `label`, `width`, `height` and `sillHeight` — the same fields as a `\"window\"` {@linkcode PluginDesignCreateOpeningOptions}. `sillHeight` is measured from the host wall base to the BOTTOM of the window. Validate-all-or-throw; one command.",
|
|
4572
|
+
"examplePrompts": [
|
|
4573
|
+
"Add windows along this whole facade at once",
|
|
4574
|
+
"Place a window in every bedroom in one operation",
|
|
4575
|
+
"Bulk add the windows from this schedule",
|
|
4576
|
+
"Put four windows on this wall in a single undo step",
|
|
4577
|
+
"Add all the windows with a 0.9m sill height together"
|
|
4578
|
+
],
|
|
4579
|
+
"argsType": "PluginCreateWindowItem[]",
|
|
4580
|
+
"resultType": "ComponentHandle[]",
|
|
4581
|
+
"performance": "Bulk creator — the whole batch is ONE host round-trip and ONE undo entry, and each distinct catalog source loads once. Always prefer this over calling `design.create.window` in a loop: build the full `items[]` array first (all host walls and points up front), then make one call. # Example ```ts const v = snaptrude.core.math.vec3 const [wall] = await snaptrude.design.query.listWalls({ isSelected: true }) const [casement] = await snaptrude.design.windows.listCatalog() const placed = await snaptrude.design.create.windows([ { catalogId: casement.id, hostWall: wall, position: await v.new(2, 0, 5), sillHeight: 0.9 }, { catalogId: casement.id, hostWall: wall, position: await v.new(5, 0, 5), sillHeight: 0.9 }, ]) const currentWall = await snaptrude.design.query.getHost(placed[0]) ```"
|
|
4502
4582
|
},
|
|
4503
4583
|
{
|
|
4504
4584
|
"path": "design.delete.entities",
|
|
@@ -4515,6 +4595,82 @@
|
|
|
4515
4595
|
"resultType": "PluginDesignChangeResult",
|
|
4516
4596
|
"performance": "Array delete — pass every target in one call (one host round-trip). There is no per-item delete; collect the whole set and never loop this per entity. # Example ```ts // Hard-delete every furniture item on storey 2 (a single undo entry) const furniture = await snaptrude.design.query.listFurniture({ storeys: [2] }) if (furniture.length > 0) { const { affected } = await snaptrude.design.delete.entities(furniture) } ```"
|
|
4517
4597
|
},
|
|
4598
|
+
{
|
|
4599
|
+
"path": "design.dimensions.create",
|
|
4600
|
+
"namespace": "design.dimensions",
|
|
4601
|
+
"summary": "Draw one dimension line between two world points, anchored to a component.",
|
|
4602
|
+
"examplePrompts": [
|
|
4603
|
+
"Dimension every wall on level 2",
|
|
4604
|
+
"Add a dimension line along this wall",
|
|
4605
|
+
"Measure the width of this room and label it on the plan\n\n# Example\n```ts\nconst { design, core } = snaptrude\nconst v = core.math.vec3\nconst curve = core.geom.query.curve\nfor (const wall of await design.query.listWalls({ storeys: [2] })) {\nconst cl = await design.query.geometry.getCenterline(wall)\nif (!cl) continue\nconst a = await curve.getStartPoint(cl)\nconst b = await curve.getEndPoint(cl)\nawait design.dimensions.create(\nawait v.new(a.x, a.y, a.z),\nawait v.new(b.x, b.y, b.z),\nwall,\n)\n}\n```"
|
|
4606
|
+
],
|
|
4607
|
+
"argsType": "Vec3Handle",
|
|
4608
|
+
"resultType": "DimensionHandle"
|
|
4609
|
+
},
|
|
4610
|
+
{
|
|
4611
|
+
"path": "design.dimensions.delete",
|
|
4612
|
+
"namespace": "design.dimensions",
|
|
4613
|
+
"summary": "Delete dimension lines — the same hard removal as selecting them and pressing Delete. Undoable as a **single** entry for the whole batch.",
|
|
4614
|
+
"examplePrompts": [
|
|
4615
|
+
"Remove all dimension lines",
|
|
4616
|
+
"Delete the dimensions on this wall",
|
|
4617
|
+
"Clear the measurements I added to level 2"
|
|
4618
|
+
],
|
|
4619
|
+
"argsType": "DimensionHandle[]",
|
|
4620
|
+
"resultType": "PluginDimensionsChangeResult",
|
|
4621
|
+
"performance": "Array API — pass the whole set in one call (one host round-trip, one undo entry). Never loop this per dimension. # Example ```ts const dims = snaptrude.design.dimensions const onWall = await dims.list({ anchors: [wall] }) if (onWall.length > 0) await dims.delete(onWall.map((d) => d.id)) ```"
|
|
4622
|
+
},
|
|
4623
|
+
{
|
|
4624
|
+
"path": "design.dimensions.get",
|
|
4625
|
+
"namespace": "design.dimensions",
|
|
4626
|
+
"summary": "Read one dimension line by handle.",
|
|
4627
|
+
"examplePrompts": [
|
|
4628
|
+
"Read the dimension line I just created",
|
|
4629
|
+
"How long is this dimension and what does its label say?",
|
|
4630
|
+
"Check whether that dimension line still exists\n\n# Example\n```ts\nconst dim = await snaptrude.design.dimensions.get(handle)\nif (dim) console.log(dim.label, dim.length, dim.storey)\n```"
|
|
4631
|
+
],
|
|
4632
|
+
"argsType": "DimensionHandle",
|
|
4633
|
+
"resultType": "PluginDimensionLine | null"
|
|
4634
|
+
},
|
|
4635
|
+
{
|
|
4636
|
+
"path": "design.dimensions.hide",
|
|
4637
|
+
"namespace": "design.dimensions",
|
|
4638
|
+
"summary": "Hide dimension lines from the viewport — the same as the right-click \"Hide\" action (it sets the user Hide flag, `isHidden`). Undoable. Already-hidden dimensions are skipped and are not reported in `affected`.",
|
|
4639
|
+
"examplePrompts": [
|
|
4640
|
+
"Hide the dimensions on this storey",
|
|
4641
|
+
"Hide every dimension line while I present",
|
|
4642
|
+
"Temporarily hide the measurements on level 3"
|
|
4643
|
+
],
|
|
4644
|
+
"argsType": "DimensionHandle[]",
|
|
4645
|
+
"resultType": "PluginDimensionsChangeResult",
|
|
4646
|
+
"performance": "Array API — one host round-trip and one undo entry for the whole set. # Example ```ts const dims = snaptrude.design.dimensions const onLevel3 = await dims.list({ storeys: [3] }) const { affected } = await dims.hide(onLevel3.map((d) => d.id)) ```"
|
|
4647
|
+
},
|
|
4648
|
+
{
|
|
4649
|
+
"path": "design.dimensions.list",
|
|
4650
|
+
"namespace": "design.dimensions",
|
|
4651
|
+
"summary": "List the dimension lines in the project as full records.",
|
|
4652
|
+
"examplePrompts": [
|
|
4653
|
+
"List all the dimension lines in this model",
|
|
4654
|
+
"Which dimensions are on level 3?",
|
|
4655
|
+
"Flag any dimension line shorter than 600 mm"
|
|
4656
|
+
],
|
|
4657
|
+
"argsType": "{\n storeys?: number[]\n anchors?: ComponentHandle[]\n isHidden?: boolean\n }",
|
|
4658
|
+
"resultType": "PluginDimensionLine[]",
|
|
4659
|
+
"performance": "Array read — one host round-trip returns every record. Filter in one call rather than calling `get` per dimension. # Example ```ts const units = snaptrude.core.units const min = await units.convert(600, \"millimeters\", await units.getBabylonType()) const short = (await snaptrude.design.dimensions.list()).filter( (d) => d.length < min, ) console.log(short.map((d) => `${d.label} on storey ${d.storey}`)) ```"
|
|
4660
|
+
},
|
|
4661
|
+
{
|
|
4662
|
+
"path": "design.dimensions.show",
|
|
4663
|
+
"namespace": "design.dimensions",
|
|
4664
|
+
"summary": "Reveal hidden dimension lines — clear the user Hide flag, the inverse of {@linkcode PluginDesignDimensionsApi.hide}. Undoable. Already-visible dimensions are skipped and are not reported in `affected`.",
|
|
4665
|
+
"examplePrompts": [
|
|
4666
|
+
"Show the dimension lines again",
|
|
4667
|
+
"Unhide all the hidden dimensions",
|
|
4668
|
+
"Bring back the measurements I hid on this storey"
|
|
4669
|
+
],
|
|
4670
|
+
"argsType": "DimensionHandle[]",
|
|
4671
|
+
"resultType": "PluginDimensionsChangeResult",
|
|
4672
|
+
"performance": "Array API — one host round-trip and one undo entry for the whole set. # Example ```ts const dims = snaptrude.design.dimensions const hidden = await dims.list({ isHidden: true }) await dims.show(hidden.map((d) => d.id)) ```"
|
|
4673
|
+
},
|
|
4518
4674
|
{
|
|
4519
4675
|
"path": "design.doors.exists",
|
|
4520
4676
|
"namespace": "design.doors",
|
|
@@ -209,7 +209,9 @@ export declare abstract class PluginCoreIoImportApi {
|
|
|
209
209
|
* @returns the placed {@linkcode ComponentHandle}.
|
|
210
210
|
* @throws if writes are disabled, the source can't be loaded, the format is
|
|
211
211
|
* unsupported, conversion/placement fails, or the converted model cannot be
|
|
212
|
-
* found in the library after upload
|
|
212
|
+
* found in the library after upload; `PRECONDITION_FAILED`
|
|
213
|
+
* (`details.engineCode: "TOOL_ACTIVE"`) while the interactive furniture tool is
|
|
214
|
+
* active — finish or cancel it first.
|
|
213
215
|
*
|
|
214
216
|
* @examplePrompt Import this SketchUp model onto storey 1
|
|
215
217
|
* @examplePrompt Bring in this OBJ file and place it at the origin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/io/import/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAE5B;;;;GAIG;AACH,eAAO,MAAM,YAAY,aAKrB,CAAA;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,KAAK,CACnB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,GACb,eAAe,CAAC,cAAc,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;aACa,GAAG,CACjB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,GACf,eAAe,CAAC,cAAc,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;aACa,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/io/import/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAE5B;;;;GAIG;AACH,eAAO,MAAM,YAAY,aAKrB,CAAA;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,KAAK,CACnB,M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M,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;iBAE9B,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Maximum items per bulk `design.create.*` call. A bounded request keeps
|
|
4
|
+
* validation, command capture and rollback work finite; split a larger import
|
|
5
|
+
* into separate awaited batches, each with its own undo entry.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PLUGIN_CREATE_BATCH_LIMIT = 1000;
|
|
8
|
+
/**
|
|
9
|
+
* One wall run to create via {@linkcode PluginDesignCreateApi.wallRuns} — the
|
|
10
|
+
* same inputs as {@linkcode PluginDesignCreateApi.walls}, one run per item.
|
|
11
|
+
*
|
|
12
|
+
* | Property | Type | Description |
|
|
13
|
+
* |---|---|---|
|
|
14
|
+
* | `profile` | {@linkcode ProfileHandle} | Ordered curve chain (wall centerlines) |
|
|
15
|
+
* | `height` | `number`? | Wall height (Snaptrude units, > 0; default engine default) |
|
|
16
|
+
* | `thickness` | `number`? | Wall thickness (Snaptrude units, > 0; default: `wallType`'s total layer thickness when given, else engine default) |
|
|
17
|
+
* | `wallType` | `string`? | Wall type name from `design.types.list("wall")` — layers/material/thickness defaults (default generic) |
|
|
18
|
+
* | `storey` | `number`? (int) | Target storey (must exist) — the run's walls are assigned + lifted to its base in the same undo entry (default: geometry-derived) |
|
|
19
|
+
*/
|
|
20
|
+
export declare const PluginCreateWallRunItem: z.ZodObject<{
|
|
21
|
+
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
22
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
thickness: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
wallType: z.ZodOptional<z.ZodString>;
|
|
25
|
+
storey: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type PluginCreateWallRunItem = z.infer<typeof PluginCreateWallRunItem>;
|
|
28
|
+
/** The `items` array of {@linkcode PluginDesignCreateApi.wallRuns} (1…1000). */
|
|
29
|
+
export declare const PluginCreateWallRunItems: z.ZodArray<z.ZodObject<{
|
|
30
|
+
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
31
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
thickness: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
wallType: z.ZodOptional<z.ZodString>;
|
|
34
|
+
storey: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
export type PluginCreateWallRunItems = z.infer<typeof PluginCreateWallRunItems>;
|
|
37
|
+
/**
|
|
38
|
+
* One floor to create via {@linkcode PluginDesignCreateApi.floors} — the same
|
|
39
|
+
* footprint-extrude inputs as {@linkcode PluginDesignCreateApi.floor}.
|
|
40
|
+
*
|
|
41
|
+
* | Property | Type | Description |
|
|
42
|
+
* |---|---|---|
|
|
43
|
+
* | `contour` | {@linkcode ContourHandle} | Footprint (outer profile + holes) |
|
|
44
|
+
* | `thickness` | `number` | Floor thickness (Snaptrude units, > 0) |
|
|
45
|
+
* | `position` | {@linkcode Vec3Handle}? | Offset from origin (default origin) |
|
|
46
|
+
*/
|
|
47
|
+
export declare const PluginCreateFloorItem: z.ZodObject<{
|
|
48
|
+
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
|
|
49
|
+
thickness: z.ZodNumber;
|
|
50
|
+
position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type PluginCreateFloorItem = z.infer<typeof PluginCreateFloorItem>;
|
|
53
|
+
/** The `items` array of {@linkcode PluginDesignCreateApi.floors} (1…1000). */
|
|
54
|
+
export declare const PluginCreateFloorItems: z.ZodArray<z.ZodObject<{
|
|
55
|
+
contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"contour">, string>>;
|
|
56
|
+
thickness: z.ZodNumber;
|
|
57
|
+
position: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
export type PluginCreateFloorItems = z.infer<typeof PluginCreateFloorItems>;
|
|
60
|
+
/**
|
|
61
|
+
* One door to place via {@linkcode PluginDesignCreateApi.doors} — the same
|
|
62
|
+
* fields as a `"door"` {@linkcode PluginDesignCreateOpeningOptions}, so the
|
|
63
|
+
* size overrides singular {@linkcode PluginDesignCreateApi.door} lacks are
|
|
64
|
+
* available per item. `facing` is a WORLD POINT on the side of the wall the
|
|
65
|
+
* door opens into, not a direction. Rejects unknown fields.
|
|
66
|
+
*
|
|
67
|
+
* | Property | Type | Description |
|
|
68
|
+
* |---|---|---|
|
|
69
|
+
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
70
|
+
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the door |
|
|
71
|
+
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
72
|
+
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the door faces (default engine-chosen) |
|
|
73
|
+
* | `label` | `string`? | Instance name (optional) |
|
|
74
|
+
* | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
|
|
75
|
+
* | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
|
|
76
|
+
*/
|
|
77
|
+
export declare const PluginCreateDoorItem: z.ZodObject<{
|
|
78
|
+
catalogId: z.ZodString;
|
|
79
|
+
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
80
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
81
|
+
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
82
|
+
label: z.ZodOptional<z.ZodString>;
|
|
83
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
}, z.core.$strict>;
|
|
86
|
+
export type PluginCreateDoorItem = z.infer<typeof PluginCreateDoorItem>;
|
|
87
|
+
/** The `items` array of {@linkcode PluginDesignCreateApi.doors} (1…1000). */
|
|
88
|
+
export declare const PluginCreateDoorItems: z.ZodArray<z.ZodObject<{
|
|
89
|
+
catalogId: z.ZodString;
|
|
90
|
+
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
91
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
92
|
+
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
93
|
+
label: z.ZodOptional<z.ZodString>;
|
|
94
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
export type PluginCreateDoorItems = z.infer<typeof PluginCreateDoorItems>;
|
|
98
|
+
/**
|
|
99
|
+
* One window to place via {@linkcode PluginDesignCreateApi.windows} — the same
|
|
100
|
+
* fields as a `"window"` {@linkcode PluginDesignCreateOpeningOptions}.
|
|
101
|
+
* `sillHeight` is a nonnegative Snaptrude-unit distance from the host wall's
|
|
102
|
+
* base to the BOTTOM of the window, not to its center. `facing` is a WORLD
|
|
103
|
+
* POINT on the desired side of the wall, not a direction. Rejects unknown
|
|
104
|
+
* fields.
|
|
105
|
+
*
|
|
106
|
+
* | Property | Type | Description |
|
|
107
|
+
* |---|---|---|
|
|
108
|
+
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
109
|
+
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the window |
|
|
110
|
+
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
111
|
+
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the window faces (default engine-chosen) |
|
|
112
|
+
* | `label` | `string`? | Instance name (optional) |
|
|
113
|
+
* | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
|
|
114
|
+
* | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
|
|
115
|
+
* | `sillHeight` | `number`? | Wall base to window bottom (Snaptrude units, ≥ 0; default the catalog item's) |
|
|
116
|
+
*/
|
|
117
|
+
export declare const PluginCreateWindowItem: z.ZodObject<{
|
|
118
|
+
sillHeight: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
catalogId: z.ZodString;
|
|
120
|
+
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
121
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
122
|
+
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
123
|
+
label: z.ZodOptional<z.ZodString>;
|
|
124
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
export type PluginCreateWindowItem = z.infer<typeof PluginCreateWindowItem>;
|
|
128
|
+
/** The `items` array of {@linkcode PluginDesignCreateApi.windows} (1…1000). */
|
|
129
|
+
export declare const PluginCreateWindowItems: z.ZodArray<z.ZodObject<{
|
|
130
|
+
sillHeight: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
catalogId: z.ZodString;
|
|
132
|
+
hostWall: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").ComponentHandle, string>>;
|
|
133
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
134
|
+
facing: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
|
|
135
|
+
label: z.ZodOptional<z.ZodString>;
|
|
136
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
}, z.core.$strict>>;
|
|
139
|
+
export type PluginCreateWindowItems = z.infer<typeof PluginCreateWindowItems>;
|
|
140
|
+
/**
|
|
141
|
+
* One furniture instance to place via
|
|
142
|
+
* {@linkcode PluginDesignCreateApi.furnitureItems} — the same inputs as
|
|
143
|
+
* {@linkcode PluginDesignCreateApi.furniture} minus `createNewSourceMesh`: in a
|
|
144
|
+
* batch the host owns source-mesh persistence (a source is recorded once per
|
|
145
|
+
* call, however many items reuse it).
|
|
146
|
+
*
|
|
147
|
+
* `position.y` is the REST elevation: the item is grounded so its bounding-box
|
|
148
|
+
* base sits exactly at `position.y` (the same surface-flush contract as
|
|
149
|
+
* interactive drag-drop) — pass the floor/storey elevation to stand furniture
|
|
150
|
+
* on it; never add half the item's height yourself.
|
|
151
|
+
*
|
|
152
|
+
* | Property | Type | Description |
|
|
153
|
+
* |---|---|---|
|
|
154
|
+
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
155
|
+
* | `position` | {@linkcode Vec3Handle} | Absolute world placement point (`y` = rest elevation) |
|
|
156
|
+
* | `label` | `string`? | Instance name and readable label (default auto `${name}Ins${n}`) |
|
|
157
|
+
* | `angleInDegrees` | `number`? | Rotation about the vertical axis, in degrees (default unrotated) |
|
|
158
|
+
*/
|
|
159
|
+
export declare const PluginCreateFurnitureItem: z.ZodObject<{
|
|
160
|
+
catalogId: z.ZodString;
|
|
161
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
162
|
+
label: z.ZodOptional<z.ZodString>;
|
|
163
|
+
angleInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type PluginCreateFurnitureItem = z.infer<typeof PluginCreateFurnitureItem>;
|
|
166
|
+
/**
|
|
167
|
+
* The `items` array of {@linkcode PluginDesignCreateApi.furnitureItems}
|
|
168
|
+
* (1…1000).
|
|
169
|
+
*/
|
|
170
|
+
export declare const PluginCreateFurnitureItems: z.ZodArray<z.ZodObject<{
|
|
171
|
+
catalogId: z.ZodString;
|
|
172
|
+
position: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
|
|
173
|
+
label: z.ZodOptional<z.ZodString>;
|
|
174
|
+
angleInDegrees: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
}, z.core.$strip>>;
|
|
176
|
+
export type PluginCreateFurnitureItems = z.infer<typeof PluginCreateFurnitureItems>;
|
|
177
|
+
//# sourceMappingURL=bulk-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-items.d.ts","sourceRoot":"","sources":["../../../../src/api/design/create/bulk-items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAA;AAM7C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;;;;;;iBAMlC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E,gFAAgF;AAChF,eAAO,MAAM,wBAAwB;;;;;;kBAGJ,CAAA;AACjC,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAM/E;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,8EAA8E;AAC9E,eAAO,MAAM,sBAAsB;;;;kBAGF,CAAA;AACjC,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAM3E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;kBAEtB,CAAA;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEvE,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB;;;;;;;;mBAGD,CAAA;AACjC,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO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