@snaptrude/plugin-core 0.6.0 → 0.7.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 +21 -0
- package/api-manifest.full.json +511 -10
- package/api-manifest.json +529 -4
- package/dist/api/core/index.d.ts +5 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/proposals/index.d.ts +475 -0
- package/dist/api/core/proposals/index.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +209 -0
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +159 -0
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/furniture/index.d.ts +34 -5
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +83 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/lock.d.ts +26 -0
- package/dist/api/design/lock.d.ts.map +1 -1
- package/dist/api/design/materials/index.d.ts +159 -2
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +115 -5
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/selection/index.d.ts +2 -2
- package/dist/api/design/transform/index.d.ts +83 -2
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +168 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +113 -2
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +101 -7
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/presentation/import.d.ts +49 -4
- package/dist/api/presentation/import.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +210 -5
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/program/areas.d.ts +42 -12
- package/dist/api/program/areas.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +3 -11
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/layout.d.ts +186 -11
- package/dist/api/program/layout.d.ts.map +1 -1
- package/dist/errors/codes.d.ts +34 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/envelope.d.ts +56 -0
- package/dist/errors/envelope.d.ts.map +1 -0
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/plugin-error.d.ts +69 -0
- package/dist/errors/plugin-error.d.ts.map +1 -0
- package/dist/host-utils.d.ts +4 -0
- package/dist/host-utils.d.ts.map +1 -1
- package/dist/index.cjs +1624 -1028
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1546 -1025
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/scripts/generate-manifest.test.mjs +77 -0
- package/src/api/core/index.ts +5 -0
- package/src/api/core/proposals/index.ts +509 -0
- package/src/api/design/create/index.ts +249 -0
- package/src/api/design/doors/index.ts +168 -0
- package/src/api/design/furniture/index.ts +36 -5
- package/src/api/design/index.ts +87 -0
- package/src/api/design/lock.ts +27 -0
- package/src/api/design/materials/index.ts +182 -2
- package/src/api/design/query/index.ts +81 -0
- package/src/api/design/transform/index.ts +74 -2
- package/src/api/design/update/index.ts +167 -0
- package/src/api/design/windows/index.ts +128 -2
- package/src/api/entity/story.ts +105 -7
- package/src/api/presentation/import.ts +45 -4
- package/src/api/presentation/views.ts +221 -5
- package/src/api/program/areas.ts +34 -12
- package/src/api/program/index.ts +3 -11
- package/src/api/program/layout.ts +195 -11
- package/src/errors/codes.ts +136 -0
- package/src/errors/envelope.ts +75 -0
- package/src/errors/index.ts +21 -0
- package/src/errors/plugin-error.ts +134 -0
- package/src/host-utils.ts +4 -0
- package/src/index.ts +1 -0
- package/test/errors.test.mjs +184 -0
package/api-manifest.full.json
CHANGED
|
@@ -3038,6 +3038,114 @@
|
|
|
3038
3038
|
"argsType": "number",
|
|
3039
3039
|
"resultType": "boolean"
|
|
3040
3040
|
},
|
|
3041
|
+
{
|
|
3042
|
+
"path": "core.proposals.create",
|
|
3043
|
+
"namespace": "core.proposals",
|
|
3044
|
+
"summary": "Create a new design option (proposal).",
|
|
3045
|
+
"examplePrompts": [
|
|
3046
|
+
"Create a design option called Scheme B",
|
|
3047
|
+
"Add a new proposal named Option 2",
|
|
3048
|
+
"Make a fresh design variant to explore\n\n# Example\n```ts\nconst { id } = await snaptrude.core.proposals.create(\"Scheme B\")\n```"
|
|
3049
|
+
],
|
|
3050
|
+
"argsType": "string",
|
|
3051
|
+
"resultType": "PluginCoreProposalsCreateResult"
|
|
3052
|
+
},
|
|
3053
|
+
{
|
|
3054
|
+
"path": "core.proposals.delete",
|
|
3055
|
+
"namespace": "core.proposals",
|
|
3056
|
+
"summary": "Delete a proposal.",
|
|
3057
|
+
"examplePrompts": [
|
|
3058
|
+
"Delete proposal prop_2",
|
|
3059
|
+
"Remove this design option and everything in it",
|
|
3060
|
+
"Merge prop_2's layers into prop_1 and delete prop_2\n\n# Example\n```ts\nawait snaptrude.core.proposals.delete(\"prop_2\", { deleteObjects: true })\n```"
|
|
3061
|
+
],
|
|
3062
|
+
"argsType": "string",
|
|
3063
|
+
"resultType": "PluginCoreProposalsDeleteResult"
|
|
3064
|
+
},
|
|
3065
|
+
{
|
|
3066
|
+
"path": "core.proposals.get",
|
|
3067
|
+
"namespace": "core.proposals",
|
|
3068
|
+
"summary": "Get a single proposal by id.",
|
|
3069
|
+
"examplePrompts": [
|
|
3070
|
+
"Get the proposal with id prop_1",
|
|
3071
|
+
"Look up a single design option by its id",
|
|
3072
|
+
"Which buckets belong to proposal prop_2?\n\n# Example\n```ts\nconst proposal = await snaptrude.core.proposals.get(\"prop_1\")\nif (proposal) console.log(proposal.name, proposal.bucketIds)\n```"
|
|
3073
|
+
],
|
|
3074
|
+
"argsType": "string",
|
|
3075
|
+
"resultType": "PluginCoreProposalsGetResult"
|
|
3076
|
+
},
|
|
3077
|
+
{
|
|
3078
|
+
"path": "core.proposals.getActive",
|
|
3079
|
+
"namespace": "core.proposals",
|
|
3080
|
+
"summary": "Get the active proposal.",
|
|
3081
|
+
"examplePrompts": [
|
|
3082
|
+
"Which design option is active?",
|
|
3083
|
+
"Get the current proposal",
|
|
3084
|
+
"What proposal am I working in?\n\n# Example\n```ts\nconst active = await snaptrude.core.proposals.getActive()\nif (active) console.log(active.id, active.name)\n```"
|
|
3085
|
+
],
|
|
3086
|
+
"argsType": null,
|
|
3087
|
+
"resultType": "PluginCoreProposalsGetActiveResult"
|
|
3088
|
+
},
|
|
3089
|
+
{
|
|
3090
|
+
"path": "core.proposals.isActive",
|
|
3091
|
+
"namespace": "core.proposals",
|
|
3092
|
+
"summary": "Test whether a proposal is the active one.",
|
|
3093
|
+
"examplePrompts": [
|
|
3094
|
+
"Is proposal prop_2 the active one?",
|
|
3095
|
+
"Check whether this design option is currently shown",
|
|
3096
|
+
"Am I working in proposal prop_1?\n\n# Example\n```ts\nif (await snaptrude.core.proposals.isActive(\"prop_1\")) {\nconsole.log(\"prop_1 is active\")\n}\n```"
|
|
3097
|
+
],
|
|
3098
|
+
"argsType": "string",
|
|
3099
|
+
"resultType": "boolean"
|
|
3100
|
+
},
|
|
3101
|
+
{
|
|
3102
|
+
"path": "core.proposals.list",
|
|
3103
|
+
"namespace": "core.proposals",
|
|
3104
|
+
"summary": "List the design options (proposals) in the active project.",
|
|
3105
|
+
"examplePrompts": [
|
|
3106
|
+
"List all the design options in this project",
|
|
3107
|
+
"How many proposals does this project have?",
|
|
3108
|
+
"Show every design variant with its name\n\n# Example\n```ts\nconst { proposals } = await snaptrude.core.proposals.list()\nfor (const p of proposals) console.log(p.id, p.name, p.isActive)\n```"
|
|
3109
|
+
],
|
|
3110
|
+
"argsType": null,
|
|
3111
|
+
"resultType": "PluginCoreProposalsListResult"
|
|
3112
|
+
},
|
|
3113
|
+
{
|
|
3114
|
+
"path": "core.proposals.listForComponent",
|
|
3115
|
+
"namespace": "core.proposals",
|
|
3116
|
+
"summary": "List the proposals a component belongs to.",
|
|
3117
|
+
"examplePrompts": [
|
|
3118
|
+
"Which design options is this component part of?",
|
|
3119
|
+
"List the proposals that contain this wall",
|
|
3120
|
+
"Is this element shared across multiple design variants?\n\n# Example\n```ts\nconst { proposals } = await snaptrude.core.proposals.listForComponent(wall)\nconsole.log(`shared across ${proposals.length} proposals`)\n```"
|
|
3121
|
+
],
|
|
3122
|
+
"argsType": "ComponentHandle",
|
|
3123
|
+
"resultType": "PluginCoreProposalsListForComponentResult"
|
|
3124
|
+
},
|
|
3125
|
+
{
|
|
3126
|
+
"path": "core.proposals.rename",
|
|
3127
|
+
"namespace": "core.proposals",
|
|
3128
|
+
"summary": "Rename a proposal.",
|
|
3129
|
+
"examplePrompts": [
|
|
3130
|
+
"Rename proposal prop_1 to Final Scheme",
|
|
3131
|
+
"Change the name of this design option",
|
|
3132
|
+
"Call proposal prop_2 \"Option A\"\n\n# Example\n```ts\nconst proposal = await snaptrude.core.proposals.rename(\"prop_1\", \"Final Scheme\")\n```"
|
|
3133
|
+
],
|
|
3134
|
+
"argsType": "string",
|
|
3135
|
+
"resultType": "PluginCoreProposalsRenameResult"
|
|
3136
|
+
},
|
|
3137
|
+
{
|
|
3138
|
+
"path": "core.proposals.setActive",
|
|
3139
|
+
"namespace": "core.proposals",
|
|
3140
|
+
"summary": "Switch the active proposal.",
|
|
3141
|
+
"examplePrompts": [
|
|
3142
|
+
"Switch to proposal prop_2",
|
|
3143
|
+
"Make Scheme B the active design option",
|
|
3144
|
+
"Show me the other proposal\n\n# Example\n```ts\nawait snaptrude.core.proposals.setActive(\"prop_2\")\n```"
|
|
3145
|
+
],
|
|
3146
|
+
"argsType": "string",
|
|
3147
|
+
"resultType": "PluginCoreProposalsSetActiveResult"
|
|
3148
|
+
},
|
|
3041
3149
|
{
|
|
3042
3150
|
"path": "core.tags.assign",
|
|
3043
3151
|
"namespace": "core.tags",
|
|
@@ -3392,6 +3500,20 @@
|
|
|
3392
3500
|
"argsType": "ComponentHandle[]",
|
|
3393
3501
|
"resultType": "ComponentHandle[]"
|
|
3394
3502
|
},
|
|
3503
|
+
{
|
|
3504
|
+
"path": "design.create.door",
|
|
3505
|
+
"namespace": "design.create",
|
|
3506
|
+
"summary": "Place a **door** from the catalog into a host wall.",
|
|
3507
|
+
"examplePrompts": [
|
|
3508
|
+
"Add a door to this wall here",
|
|
3509
|
+
"Place a sliding door on the selected wall",
|
|
3510
|
+
"Put a door from the catalog at this point on the wall",
|
|
3511
|
+
"Insert the entrance door into this wall",
|
|
3512
|
+
"Add a door to the wall and call it Entry-01\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```"
|
|
3513
|
+
],
|
|
3514
|
+
"argsType": "string",
|
|
3515
|
+
"resultType": "ComponentHandle"
|
|
3516
|
+
},
|
|
3395
3517
|
{
|
|
3396
3518
|
"path": "design.create.floor",
|
|
3397
3519
|
"namespace": "design.create",
|
|
@@ -3473,6 +3595,20 @@
|
|
|
3473
3595
|
"argsType": "ContourHandle",
|
|
3474
3596
|
"resultType": "ComponentHandle"
|
|
3475
3597
|
},
|
|
3598
|
+
{
|
|
3599
|
+
"path": "design.create.smartLayout",
|
|
3600
|
+
"namespace": "design.create",
|
|
3601
|
+
"summary": "Place a **smart layout** — clone an in-scene template cluster (walls, furniture, doors, windows, floors) into one or more target ROOM/DEPARTMENT spaces, adapting orientation and fit to each target.",
|
|
3602
|
+
"examplePrompts": [
|
|
3603
|
+
"Copy this room's layout into the selected rooms",
|
|
3604
|
+
"Apply this furniture arrangement to the other offices",
|
|
3605
|
+
"Replicate this template into these two spaces",
|
|
3606
|
+
"Place this desk cluster into every meeting room",
|
|
3607
|
+
"Use this room as a template for the rooms I selected but keep them visible\n\n# Example\n```ts\nconst [templateRoom, ...targets] = await snaptrude.design.query.listSpaces({ isSelected: true })\nconst result = await snaptrude.design.create.smartLayout({\ntemplateComponents: [templateRoom],\ntargets,\n})\nconsole.log(\"placed walls:\", result.created.walls.length, \"skipped:\", result.skippedWalls)\n```"
|
|
3608
|
+
],
|
|
3609
|
+
"argsType": "PluginSmartLayoutArgs",
|
|
3610
|
+
"resultType": "PluginSmartLayoutResult"
|
|
3611
|
+
},
|
|
3476
3612
|
{
|
|
3477
3613
|
"path": "design.create.space",
|
|
3478
3614
|
"namespace": "design.create",
|
|
@@ -3528,6 +3664,20 @@
|
|
|
3528
3664
|
"argsType": "ProfileHandle",
|
|
3529
3665
|
"resultType": "ComponentHandle[]"
|
|
3530
3666
|
},
|
|
3667
|
+
{
|
|
3668
|
+
"path": "design.create.window",
|
|
3669
|
+
"namespace": "design.create",
|
|
3670
|
+
"summary": "Place a **window** from the catalog into a host wall.",
|
|
3671
|
+
"examplePrompts": [
|
|
3672
|
+
"Add a window to this wall here",
|
|
3673
|
+
"Place a casement window on the selected wall",
|
|
3674
|
+
"Put a window from the catalog at this point on the wall",
|
|
3675
|
+
"Insert a window into the living room wall",
|
|
3676
|
+
"Add a window to the wall and name it Win-01\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```"
|
|
3677
|
+
],
|
|
3678
|
+
"argsType": "string",
|
|
3679
|
+
"resultType": "ComponentHandle"
|
|
3680
|
+
},
|
|
3531
3681
|
{
|
|
3532
3682
|
"path": "design.delete.entities",
|
|
3533
3683
|
"namespace": "design.delete",
|
|
@@ -3542,6 +3692,32 @@
|
|
|
3542
3692
|
"argsType": "ComponentHandle[]",
|
|
3543
3693
|
"resultType": "PluginDesignChangeResult"
|
|
3544
3694
|
},
|
|
3695
|
+
{
|
|
3696
|
+
"path": "design.doors.exists",
|
|
3697
|
+
"namespace": "design.doors",
|
|
3698
|
+
"summary": "Test whether a door catalog item exists for the given library id.",
|
|
3699
|
+
"examplePrompts": [
|
|
3700
|
+
"Is this door still in the library?",
|
|
3701
|
+
"Check whether a door catalog item with this id exists",
|
|
3702
|
+
"Does my team library have this door?",
|
|
3703
|
+
"Verify the door is available before placing it\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst stillAvailable = await snaptrude.design.doors.exists(entry.id)\nconsole.log(stillAvailable ? \"safe to place\" : \"removed from library\")\n```"
|
|
3704
|
+
],
|
|
3705
|
+
"argsType": "string",
|
|
3706
|
+
"resultType": "boolean"
|
|
3707
|
+
},
|
|
3708
|
+
{
|
|
3709
|
+
"path": "design.doors.getCatalogItem",
|
|
3710
|
+
"namespace": "design.doors",
|
|
3711
|
+
"summary": "Get a single door catalog item by its library id.",
|
|
3712
|
+
"examplePrompts": [
|
|
3713
|
+
"Get the details of this door from the library",
|
|
3714
|
+
"Look up the catalog entry for this door id",
|
|
3715
|
+
"What is the cost of this door item?",
|
|
3716
|
+
"Show me the family name of this door in the catalog\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.doors.listCatalog()\nconst item = await snaptrude.design.doors.getCatalogItem(entry.id)\nif (item) console.log(item.name, item.source, item.dbType)\n```"
|
|
3717
|
+
],
|
|
3718
|
+
"argsType": "string",
|
|
3719
|
+
"resultType": "PluginObjectCatalogItem | null"
|
|
3720
|
+
},
|
|
3545
3721
|
{
|
|
3546
3722
|
"path": "design.doors.getFamily",
|
|
3547
3723
|
"namespace": "design.doors",
|
|
@@ -3620,6 +3796,32 @@
|
|
|
3620
3796
|
"argsType": "ComponentHandle",
|
|
3621
3797
|
"resultType": "number | null"
|
|
3622
3798
|
},
|
|
3799
|
+
{
|
|
3800
|
+
"path": "design.doors.listCatalog",
|
|
3801
|
+
"namespace": "design.doors",
|
|
3802
|
+
"summary": "List the placeable door catalog (team + general libraries), optionally restricted to one group by its `dbType` token.",
|
|
3803
|
+
"examplePrompts": [
|
|
3804
|
+
"What doors can I place in this project?",
|
|
3805
|
+
"List every door in the library",
|
|
3806
|
+
"Show me the sliding doors I can add",
|
|
3807
|
+
"Browse the door catalog\n\n# Example\n```ts\nconst [group] = await snaptrude.design.doors.listCatalogGroups()\nconst items = await snaptrude.design.doors.listCatalog(group?.dbType)\nfor (const item of items) console.log(item.id, item.name, item.thumbnailUrl)\n```"
|
|
3808
|
+
],
|
|
3809
|
+
"argsType": "string",
|
|
3810
|
+
"resultType": "PluginObjectCatalogItem[]"
|
|
3811
|
+
},
|
|
3812
|
+
{
|
|
3813
|
+
"path": "design.doors.listCatalogGroups",
|
|
3814
|
+
"namespace": "design.doors",
|
|
3815
|
+
"summary": "List the door catalog **groups** — the placement families (Swing, Sliding, Folding, Pivot, …), built-in groups merged with any team-custom types.",
|
|
3816
|
+
"examplePrompts": [
|
|
3817
|
+
"What kinds of doors can I place?",
|
|
3818
|
+
"List the door groups in the catalog",
|
|
3819
|
+
"Show me the door families available in this project",
|
|
3820
|
+
"Which door types does this project support?\n\n# Example\n```ts\nconst groups = await snaptrude.design.doors.listCatalogGroups()\nfor (const g of groups) console.log(g.dbType, g.label, g.source)\n```"
|
|
3821
|
+
],
|
|
3822
|
+
"argsType": null,
|
|
3823
|
+
"resultType": "PluginObjectCatalogGroup[]"
|
|
3824
|
+
},
|
|
3623
3825
|
{
|
|
3624
3826
|
"path": "design.doors.mirror",
|
|
3625
3827
|
"namespace": "design.doors",
|
|
@@ -3730,17 +3932,42 @@
|
|
|
3730
3932
|
{
|
|
3731
3933
|
"path": "design.furniture.listCatalog",
|
|
3732
3934
|
"namespace": "design.furniture",
|
|
3733
|
-
"summary": "List the placeable furniture catalog (team + general libraries)
|
|
3935
|
+
"summary": "List the placeable furniture catalog (team + general libraries), optionally filtered by library `source` and/or `category`.",
|
|
3734
3936
|
"examplePrompts": [
|
|
3735
3937
|
"What furniture can I place in this project?",
|
|
3736
3938
|
"Show me all the furniture available in the library",
|
|
3737
3939
|
"List the chairs and tables I can add to the model",
|
|
3738
3940
|
"Which furniture items are in my team's library?",
|
|
3739
|
-
"
|
|
3941
|
+
"Show me the bedroom furniture I can place\n\n# Example\n```ts\nconst bedroom = await snaptrude.design.furniture.listCatalog(\"team\", \"bedroom\")\nfor (const item of bedroom) console.log(item.id, item.name, item.thumbnailUrl)\n```"
|
|
3740
3942
|
],
|
|
3741
3943
|
"argsType": "\"team\" | \"general\"",
|
|
3742
3944
|
"resultType": "PluginFurnitureCatalogItem[]"
|
|
3743
3945
|
},
|
|
3946
|
+
{
|
|
3947
|
+
"path": "design.furniture.listCategories",
|
|
3948
|
+
"namespace": "design.furniture",
|
|
3949
|
+
"summary": "List the categories (Living, Bedroom, Kitchen, …) that organize the furniture catalog — the picker taxonomy, merged from built-in categories, team types, and backend user types. Pass a value to {@linkcode PluginDesignFurnitureApi.listCatalog}'s `category` filter.",
|
|
3950
|
+
"examplePrompts": [
|
|
3951
|
+
"What furniture categories are available?",
|
|
3952
|
+
"List the furniture categories",
|
|
3953
|
+
"Show me the furniture groups like living and bedroom",
|
|
3954
|
+
"Which furniture categories can I filter by?\n\n# Example\n```ts\nconst categories = await snaptrude.design.furniture.listCategories()\nconst [first] = categories\nconst items = await snaptrude.design.furniture.listCatalog(undefined, first)\nconsole.log(first, \"→\", items.length, \"items\")\n```"
|
|
3955
|
+
],
|
|
3956
|
+
"argsType": null,
|
|
3957
|
+
"resultType": "string[]"
|
|
3958
|
+
},
|
|
3959
|
+
{
|
|
3960
|
+
"path": "design.isAreaLocked",
|
|
3961
|
+
"namespace": "design",
|
|
3962
|
+
"summary": "Test whether a space's footprint area is locked. A read — never throws; returns `false` for non-space handles and when the `area_lock` feature is off.",
|
|
3963
|
+
"examplePrompts": [
|
|
3964
|
+
"Is the area of this room locked?",
|
|
3965
|
+
"Check whether this department's footprint is pinned",
|
|
3966
|
+
"Tell me if the selected space has its area locked\n\n# Example\n```ts\nconst [room] = await snaptrude.design.selection.get()\nconst locked = await snaptrude.design.isAreaLocked(room)\nconsole.log(locked ? \"area is locked\" : \"area is free\")\n```"
|
|
3967
|
+
],
|
|
3968
|
+
"argsType": "ComponentHandle",
|
|
3969
|
+
"resultType": "boolean"
|
|
3970
|
+
},
|
|
3744
3971
|
{
|
|
3745
3972
|
"path": "design.isLocked",
|
|
3746
3973
|
"namespace": "design",
|
|
@@ -3754,6 +3981,18 @@
|
|
|
3754
3981
|
"argsType": "ComponentHandle",
|
|
3755
3982
|
"resultType": "boolean"
|
|
3756
3983
|
},
|
|
3984
|
+
{
|
|
3985
|
+
"path": "design.listAreaLocked",
|
|
3986
|
+
"namespace": "design",
|
|
3987
|
+
"summary": "List the spaces whose footprint area is locked. A read — never throws; returns `[]` when the `area_lock` feature is off.",
|
|
3988
|
+
"examplePrompts": [
|
|
3989
|
+
"Which spaces have their area locked?",
|
|
3990
|
+
"List every room with a locked footprint",
|
|
3991
|
+
"Show me all the area-locked departments\n\n# Example\n```ts\nconst locked = await snaptrude.design.listAreaLocked()\nconsole.log(locked.length, \"area-locked spaces\")\n```"
|
|
3992
|
+
],
|
|
3993
|
+
"argsType": null,
|
|
3994
|
+
"resultType": "ComponentHandle[]"
|
|
3995
|
+
},
|
|
3757
3996
|
{
|
|
3758
3997
|
"path": "design.listLocked",
|
|
3759
3998
|
"namespace": "design",
|
|
@@ -3780,6 +4019,19 @@
|
|
|
3780
4019
|
"argsType": "ComponentHandle[]",
|
|
3781
4020
|
"resultType": "PluginDesignChangeResult"
|
|
3782
4021
|
},
|
|
4022
|
+
{
|
|
4023
|
+
"path": "design.lockArea",
|
|
4024
|
+
"namespace": "design",
|
|
4025
|
+
"summary": "Lock the **footprint area** of one or more Room / Department mass spaces — geometry edits that would change the bottom-face area are then refused or auto-resized to preserve it. Distinct from {@linkcode PluginDesignApi.lock} (which freezes the whole object): this locks only the area. Cascades to the space's instances and its source mass. Undoable.",
|
|
4026
|
+
"examplePrompts": [
|
|
4027
|
+
"Lock the floor area of the selected rooms",
|
|
4028
|
+
"Freeze the footprint area of this department so its size can't drift",
|
|
4029
|
+
"Area-lock every room on this storey",
|
|
4030
|
+
"Pin the area of this space while I edit its walls\n\n# Example\n```ts\nconst rooms = await snaptrude.design.selection.get()\nconst { affected } = await snaptrude.design.lockArea(rooms)\nconsole.log(\"area-locked\", affected.length, \"spaces\")\n```"
|
|
4031
|
+
],
|
|
4032
|
+
"argsType": "ComponentHandle[]",
|
|
4033
|
+
"resultType": "PluginDesignChangeResult"
|
|
4034
|
+
},
|
|
3783
4035
|
{
|
|
3784
4036
|
"path": "design.materials.apply",
|
|
3785
4037
|
"namespace": "design.materials",
|
|
@@ -3794,6 +4046,19 @@
|
|
|
3794
4046
|
"argsType": "ComponentHandle[]",
|
|
3795
4047
|
"resultType": "PluginMaterialResult"
|
|
3796
4048
|
},
|
|
4049
|
+
{
|
|
4050
|
+
"path": "design.materials.applyToFaces",
|
|
4051
|
+
"namespace": "design.materials",
|
|
4052
|
+
"summary": "Paint specific **BREP faces** of a component with a material — an existing project material by handle, or a new one described inline as a {@linkcode PluginMaterialSpec}. Faces are addressed by **durable BREP face index** (their 0-based position in the component's BREP face list). Undoable when `save` is true (the default).",
|
|
4053
|
+
"examplePrompts": [
|
|
4054
|
+
"Paint the top face of this slab red",
|
|
4055
|
+
"Apply the brick material to faces 0 and 2 of this wall",
|
|
4056
|
+
"Put a wood finish on just the front face of this column",
|
|
4057
|
+
"Colour face 4 of the selected mass with #ff8800\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ storeys: [1] })\n// faces are addressed by durable 0-based BREP face index\nconst { count } = await snaptrude.design.materials.applyToFaces(wall, [0, 1], { name: \"Accent\", color: \"#b04a3a\" })\nconsole.log(\"painted\", count, \"faces\")\n```"
|
|
4058
|
+
],
|
|
4059
|
+
"argsType": "ComponentHandle",
|
|
4060
|
+
"resultType": "PluginMaterialResult"
|
|
4061
|
+
},
|
|
3797
4062
|
{
|
|
3798
4063
|
"path": "design.materials.create",
|
|
3799
4064
|
"namespace": "design.materials",
|
|
@@ -3807,6 +4072,18 @@
|
|
|
3807
4072
|
"argsType": "PluginMaterialSpec",
|
|
3808
4073
|
"resultType": "MaterialHandle"
|
|
3809
4074
|
},
|
|
4075
|
+
{
|
|
4076
|
+
"path": "design.materials.getByFace",
|
|
4077
|
+
"namespace": "design.materials",
|
|
4078
|
+
"summary": "Read the material applied to a single BREP face.",
|
|
4079
|
+
"examplePrompts": [
|
|
4080
|
+
"What material is on the top face of this slab?",
|
|
4081
|
+
"Get the finish applied to face 2 of this wall",
|
|
4082
|
+
"Which material is painted on the front face of this column?\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst material = await snaptrude.design.materials.getByFace(wall, 0)\nif (material) console.log(await snaptrude.design.materials.getInfo(material))\n```"
|
|
4083
|
+
],
|
|
4084
|
+
"argsType": "ComponentHandle",
|
|
4085
|
+
"resultType": "MaterialHandle | null"
|
|
4086
|
+
},
|
|
3810
4087
|
{
|
|
3811
4088
|
"path": "design.materials.getDefault",
|
|
3812
4089
|
"namespace": "design.materials",
|
|
@@ -3886,6 +4163,18 @@
|
|
|
3886
4163
|
"argsType": "\"project\" | \"preset\"",
|
|
3887
4164
|
"resultType": "MaterialHandle[]"
|
|
3888
4165
|
},
|
|
4166
|
+
{
|
|
4167
|
+
"path": "design.materials.listByFace",
|
|
4168
|
+
"namespace": "design.materials",
|
|
4169
|
+
"summary": "List the per-face materials of a component — one entry per BREP face, in face index order. A face carrying no explicit per-face material reports `null`.",
|
|
4170
|
+
"examplePrompts": [
|
|
4171
|
+
"List the material on every face of this wall",
|
|
4172
|
+
"Show me which faces of this slab are painted and with what",
|
|
4173
|
+
"Break down the per-face finishes of the selected mass\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls()\nconst faces = await snaptrude.design.materials.listByFace(wall)\nfor (const f of faces) console.log(f.faceIndex, f.material ?? \"(default)\")\n```"
|
|
4174
|
+
],
|
|
4175
|
+
"argsType": "ComponentHandle",
|
|
4176
|
+
"resultType": "PluginFaceMaterial[]"
|
|
4177
|
+
},
|
|
3889
4178
|
{
|
|
3890
4179
|
"path": "design.materials.reset",
|
|
3891
4180
|
"namespace": "design.materials",
|
|
@@ -3899,6 +4188,18 @@
|
|
|
3899
4188
|
"argsType": "ComponentHandle[]",
|
|
3900
4189
|
"resultType": "PluginMaterialResult"
|
|
3901
4190
|
},
|
|
4191
|
+
{
|
|
4192
|
+
"path": "design.materials.resetFaces",
|
|
4193
|
+
"namespace": "design.materials",
|
|
4194
|
+
"summary": "Reset specific BREP faces of a component back to the component/type default, removing any per-face finish. The inverse of {@linkcode PluginDesignMaterialsApi.applyToFaces}; undoable when `save` is true (the default). BREP-only (see `applyToFaces`).",
|
|
4195
|
+
"examplePrompts": [
|
|
4196
|
+
"Remove the paint from the top face of this slab",
|
|
4197
|
+
"Reset faces 0 and 2 of this wall to their default material",
|
|
4198
|
+
"Clear the custom finish on the front face of this column\n\n# Example\n```ts\nconst [wall] = await snaptrude.design.query.listWalls({ storeys: [1] })\nconst { count } = await snaptrude.design.materials.resetFaces(wall, [0, 1])\nconsole.log(\"reset\", count, \"faces\")\n```"
|
|
4199
|
+
],
|
|
4200
|
+
"argsType": "ComponentHandle",
|
|
4201
|
+
"resultType": "PluginMaterialResult"
|
|
4202
|
+
},
|
|
3902
4203
|
{
|
|
3903
4204
|
"path": "design.query.exists",
|
|
3904
4205
|
"namespace": "design.query",
|
|
@@ -4044,6 +4345,19 @@
|
|
|
4044
4345
|
"argsType": "ComponentHandle",
|
|
4045
4346
|
"resultType": "PluginEntityProperties"
|
|
4046
4347
|
},
|
|
4348
|
+
{
|
|
4349
|
+
"path": "design.query.getStaircaseParams",
|
|
4350
|
+
"namespace": "design.query",
|
|
4351
|
+
"summary": "Read a staircase's parametric properties — its preset, dimensions, step count, base offset, and height-lock state — as a {@linkcode PluginStaircaseParams} record. The paired write is `design.update.staircase`.",
|
|
4352
|
+
"examplePrompts": [
|
|
4353
|
+
"What's the riser height of this staircase?",
|
|
4354
|
+
"How many steps does the selected stair have?",
|
|
4355
|
+
"Show me the tread and width of this staircase",
|
|
4356
|
+
"Read all the parameters of the stairs on level 1\n\n# Example\n```ts\nconst [stair] = await snaptrude.design.query.listStaircases({ isSelected: true })\nconst params = stair ? await snaptrude.design.query.getStaircaseParams(stair) : null\nif (params) console.log(params.steps, params.riser, params.tread)\n```"
|
|
4357
|
+
],
|
|
4358
|
+
"argsType": "ComponentHandle",
|
|
4359
|
+
"resultType": "PluginStaircaseParams | null"
|
|
4360
|
+
},
|
|
4047
4361
|
{
|
|
4048
4362
|
"path": "design.query.listBeams",
|
|
4049
4363
|
"namespace": "design.query",
|
|
@@ -4403,6 +4717,20 @@
|
|
|
4403
4717
|
"argsType": "PluginSelectionFilter",
|
|
4404
4718
|
"resultType": "PluginDesignChangeResult"
|
|
4405
4719
|
},
|
|
4720
|
+
{
|
|
4721
|
+
"path": "design.transform.align",
|
|
4722
|
+
"namespace": "design.transform",
|
|
4723
|
+
"summary": "Align a set of components by snapping one bounding-box edge to a common value — the classic Left/Center/Right/Top/Middle/Bottom align. Purely **world-axis** (deterministic and headless — the UI's camera-relative remap is bypassed):",
|
|
4724
|
+
"examplePrompts": [
|
|
4725
|
+
"Align the selected rooms to the left",
|
|
4726
|
+
"Line up these masses along their top edges",
|
|
4727
|
+
"Center these columns horizontally",
|
|
4728
|
+
"Align all the walls to the left edge of this reference wall",
|
|
4729
|
+
"Snap the bottom edges of these spaces together\n\n# Example\n```ts\nconst rooms = await snaptrude.design.selection.get()\n// align every room's left (world -X) edge to a common minimum\nawait snaptrude.design.transform.align(rooms, \"left\")\n// …or align them to a fixed reference component's left edge\nconst [anchor] = await snaptrude.design.query.listWalls({ storeys: [1] })\nawait snaptrude.design.transform.align(rooms, \"left\", { reference: anchor })\n```"
|
|
4730
|
+
],
|
|
4731
|
+
"argsType": "ComponentHandle[]",
|
|
4732
|
+
"resultType": "PluginDesignChangeResult"
|
|
4733
|
+
},
|
|
4406
4734
|
{
|
|
4407
4735
|
"path": "design.transform.move",
|
|
4408
4736
|
"namespace": "design.transform",
|
|
@@ -4443,6 +4771,32 @@
|
|
|
4443
4771
|
"argsType": "ComponentHandle[]",
|
|
4444
4772
|
"resultType": "PluginDesignChangeResult"
|
|
4445
4773
|
},
|
|
4774
|
+
{
|
|
4775
|
+
"path": "design.unlockArea",
|
|
4776
|
+
"namespace": "design",
|
|
4777
|
+
"summary": "Unlock the footprint area of previously area-locked spaces so their area can change again. Paired with {@linkcode PluginDesignApi.lockArea}; cascades to instances + source; undoable. Requires the `area_lock` feature (throws if off).",
|
|
4778
|
+
"examplePrompts": [
|
|
4779
|
+
"Unlock the area of the selected rooms",
|
|
4780
|
+
"Remove the footprint-area lock from this department",
|
|
4781
|
+
"Let me resize this space again by unlocking its area",
|
|
4782
|
+
"Area-unlock everything I locked earlier\n\n# Example\n```ts\nconst locked = await snaptrude.design.listAreaLocked()\nconst { affected } = await snaptrude.design.unlockArea(locked)\n```"
|
|
4783
|
+
],
|
|
4784
|
+
"argsType": "ComponentHandle[]",
|
|
4785
|
+
"resultType": "PluginDesignChangeResult"
|
|
4786
|
+
},
|
|
4787
|
+
{
|
|
4788
|
+
"path": "design.update.setLabel",
|
|
4789
|
+
"namespace": "design.update",
|
|
4790
|
+
"summary": "Set a component's **Label** — the same editable Label field the properties panel shows (doors, windows, furniture, spaces, and every other labelled component). The paired read is `design.query.getLabel`. Undoable; the canvas label text updates immediately.",
|
|
4791
|
+
"examplePrompts": [
|
|
4792
|
+
"Rename this door to D-101",
|
|
4793
|
+
"Number all doors on storey 2 with a D-2-XX tag",
|
|
4794
|
+
"Set the selected window's label to W-04",
|
|
4795
|
+
"Tag every door with its fire rating\n\n# Example\n```ts\n// Door tag numbering: label every door as D-<storey>-<n>, numbered per storey\nawait snaptrude.design.selection.setByFilter({ types: [\"door\"] })\nconst doors = await snaptrude.design.selection.get()\nconst counts = {}\nfor (const door of doors) {\nconst { storey = 0 } = await snaptrude.design.query.getProperties(door)\ncounts[storey] = (counts[storey] ?? 0) + 1\nawait snaptrude.design.update.setLabel(door, `D-${storey}-${String(counts[storey]).padStart(2, \"0\")}`)\n}\n```"
|
|
4796
|
+
],
|
|
4797
|
+
"argsType": "ComponentHandle",
|
|
4798
|
+
"resultType": "boolean"
|
|
4799
|
+
},
|
|
4446
4800
|
{
|
|
4447
4801
|
"path": "design.update.space",
|
|
4448
4802
|
"namespace": "design.update",
|
|
@@ -4471,6 +4825,46 @@
|
|
|
4471
4825
|
"argsType": "PluginUpdateSpaceItem[]",
|
|
4472
4826
|
"resultType": "PluginSpaceUpdateResult[]"
|
|
4473
4827
|
},
|
|
4828
|
+
{
|
|
4829
|
+
"path": "design.update.staircase",
|
|
4830
|
+
"namespace": "design.update",
|
|
4831
|
+
"summary": "Update the parameters of one or more staircases — riser, tread, width, depth, step count, total height, well size, landing depth, base offset, and the two height locks — in one undoable operation. Sparse: only the fields you provide change. The paired read is `design.query.getStaircaseParams`.",
|
|
4832
|
+
"examplePrompts": [
|
|
4833
|
+
"Set the riser of this staircase to 165mm",
|
|
4834
|
+
"Change all the stairs to 14 steps",
|
|
4835
|
+
"Make the selected staircase 1200 wide with a 280 tread",
|
|
4836
|
+
"Widen every staircase on level 1 to 1 metre",
|
|
4837
|
+
"Unlock the height and set this stair to 3200 tall\n\n# Example\n```ts\n// Give every ground-floor staircase a common riser + tread (engine units)\nconst stairs = await snaptrude.design.query.listStaircases({ storeys: [1] })\nconst { affected } = await snaptrude.design.update.staircase(stairs, {\nriser: 165,\ntread: 280,\n})\nconsole.log(\"updated\", affected.length, \"staircases\")\n```"
|
|
4838
|
+
],
|
|
4839
|
+
"argsType": "ComponentHandle[]",
|
|
4840
|
+
"resultType": "PluginDesignChangeResult"
|
|
4841
|
+
},
|
|
4842
|
+
{
|
|
4843
|
+
"path": "design.windows.exists",
|
|
4844
|
+
"namespace": "design.windows",
|
|
4845
|
+
"summary": "Test whether a window catalog item exists for the given library id.",
|
|
4846
|
+
"examplePrompts": [
|
|
4847
|
+
"Is this window still in the library?",
|
|
4848
|
+
"Check whether a window catalog item with this id exists",
|
|
4849
|
+
"Does my team library have this window?",
|
|
4850
|
+
"Verify the window is available before placing it\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.windows.listCatalog()\nconst stillAvailable = await snaptrude.design.windows.exists(entry.id)\nconsole.log(stillAvailable ? \"safe to place\" : \"removed from library\")\n```"
|
|
4851
|
+
],
|
|
4852
|
+
"argsType": "string",
|
|
4853
|
+
"resultType": "boolean"
|
|
4854
|
+
},
|
|
4855
|
+
{
|
|
4856
|
+
"path": "design.windows.getCatalogItem",
|
|
4857
|
+
"namespace": "design.windows",
|
|
4858
|
+
"summary": "Get a single window catalog item by its library id.",
|
|
4859
|
+
"examplePrompts": [
|
|
4860
|
+
"Get the details of this window from the library",
|
|
4861
|
+
"Look up the catalog entry for this window id",
|
|
4862
|
+
"What is the cost of this window item?",
|
|
4863
|
+
"Show me the family name of this window in the catalog\n\n# Example\n```ts\nconst [entry] = await snaptrude.design.windows.listCatalog()\nconst item = await snaptrude.design.windows.getCatalogItem(entry.id)\nif (item) console.log(item.name, item.source, item.dbType)\n```"
|
|
4864
|
+
],
|
|
4865
|
+
"argsType": "string",
|
|
4866
|
+
"resultType": "PluginObjectCatalogItem | null"
|
|
4867
|
+
},
|
|
4474
4868
|
{
|
|
4475
4869
|
"path": "design.windows.getDimensions",
|
|
4476
4870
|
"namespace": "design.windows",
|
|
@@ -4524,6 +4918,32 @@
|
|
|
4524
4918
|
"argsType": "ComponentHandle",
|
|
4525
4919
|
"resultType": "number | null"
|
|
4526
4920
|
},
|
|
4921
|
+
{
|
|
4922
|
+
"path": "design.windows.listCatalog",
|
|
4923
|
+
"namespace": "design.windows",
|
|
4924
|
+
"summary": "List the placeable window catalog (team + general libraries), optionally restricted to one group by its `dbType` token.",
|
|
4925
|
+
"examplePrompts": [
|
|
4926
|
+
"What windows can I place in this project?",
|
|
4927
|
+
"List every window in the library",
|
|
4928
|
+
"Show me the casement windows I can add",
|
|
4929
|
+
"Browse the window catalog\n\n# Example\n```ts\nconst [group] = await snaptrude.design.windows.listCatalogGroups()\nconst items = await snaptrude.design.windows.listCatalog(group?.dbType)\nfor (const item of items) console.log(item.id, item.name, item.thumbnailUrl)\n```"
|
|
4930
|
+
],
|
|
4931
|
+
"argsType": "string",
|
|
4932
|
+
"resultType": "PluginObjectCatalogItem[]"
|
|
4933
|
+
},
|
|
4934
|
+
{
|
|
4935
|
+
"path": "design.windows.listCatalogGroups",
|
|
4936
|
+
"namespace": "design.windows",
|
|
4937
|
+
"summary": "List the window catalog **groups** — the placement families (Fixed, Casement, Sliding, Folding, …), built-in groups merged with any team-custom types.",
|
|
4938
|
+
"examplePrompts": [
|
|
4939
|
+
"What kinds of windows can I place?",
|
|
4940
|
+
"List the window groups in the catalog",
|
|
4941
|
+
"Show me the window families available in this project",
|
|
4942
|
+
"Which window types does this project support?\n\n# Example\n```ts\nconst groups = await snaptrude.design.windows.listCatalogGroups()\nfor (const g of groups) console.log(g.dbType, g.label, g.source)\n```"
|
|
4943
|
+
],
|
|
4944
|
+
"argsType": null,
|
|
4945
|
+
"resultType": "PluginObjectCatalogGroup[]"
|
|
4946
|
+
},
|
|
4527
4947
|
{
|
|
4528
4948
|
"path": "design.windows.setHeight",
|
|
4529
4949
|
"namespace": "design.windows",
|
|
@@ -4645,6 +5065,19 @@
|
|
|
4645
5065
|
"argsType": "number",
|
|
4646
5066
|
"resultType": "PluginStoryCreateResult"
|
|
4647
5067
|
},
|
|
5068
|
+
{
|
|
5069
|
+
"path": "entity.story.duplicate",
|
|
5070
|
+
"namespace": "entity.story",
|
|
5071
|
+
"summary": "Duplicate a story into the adjacent level, up or down.",
|
|
5072
|
+
"examplePrompts": [
|
|
5073
|
+
"Duplicate this floor to the storey above",
|
|
5074
|
+
"Copy the ground floor down into a new basement",
|
|
5075
|
+
"Repeat this level upwards with its own independent geometry",
|
|
5076
|
+
"Duplicate just the selected walls onto the next floor up\n\n# Example\n```ts\n// Duplicate the whole active story one level up (instanced copies).\nconst { targetStories, created, skipped } =\nawait snaptrude.entity.story.duplicate(\"up\")\nconsole.log(`Copied ${created.length} elements onto story ${targetStories}`)\nif (skipped) console.log(`${skipped} elements were skipped`)\n```"
|
|
5077
|
+
],
|
|
5078
|
+
"argsType": "\"up\" | \"down\"",
|
|
5079
|
+
"resultType": "PluginStoryDuplicateResult"
|
|
5080
|
+
},
|
|
4648
5081
|
{
|
|
4649
5082
|
"path": "entity.story.get",
|
|
4650
5083
|
"namespace": "entity.story",
|
|
@@ -4675,12 +5108,12 @@
|
|
|
4675
5108
|
{
|
|
4676
5109
|
"path": "entity.story.update",
|
|
4677
5110
|
"namespace": "entity.story",
|
|
4678
|
-
"summary": "Update a story's height.",
|
|
5111
|
+
"summary": "Update a story's floor-to-floor height, cascading the full geometry change.",
|
|
4679
5112
|
"examplePrompts": [
|
|
4680
5113
|
"Change the ground floor height to 3.5 metres",
|
|
4681
5114
|
"Make the second storey taller",
|
|
4682
5115
|
"Set the floor-to-floor height of level 1",
|
|
4683
|
-
"Increase the height of the third floor\n\n# Example\n```ts\n// Set ground floor height to 5 Babylon units\nconst result = await snaptrude.entity.story.update(1, 5)\n```"
|
|
5116
|
+
"Increase the height of the third floor\n\n# Example\n```ts\n// Set ground floor height to 5 Babylon units — walls stretch and the\n// floors above move up to match, all in a single undo step.\nconst result = await snaptrude.entity.story.update(1, 5)\n```"
|
|
4684
5117
|
],
|
|
4685
5118
|
"argsType": "number",
|
|
4686
5119
|
"resultType": "PluginStoryUpdateResult"
|
|
@@ -4773,6 +5206,19 @@
|
|
|
4773
5206
|
"argsType": "{ url?: string; dataUrl?: string }",
|
|
4774
5207
|
"resultType": "PluginPresentationImportResult"
|
|
4775
5208
|
},
|
|
5209
|
+
{
|
|
5210
|
+
"path": "presentation.import.svg",
|
|
5211
|
+
"namespace": "presentation.import",
|
|
5212
|
+
"summary": "Import an SVG onto the current Present sheet as a true vector asset.",
|
|
5213
|
+
"examplePrompts": [
|
|
5214
|
+
"Import this SVG diagram onto the present canvas",
|
|
5215
|
+
"Add a vector logo to my presentation board",
|
|
5216
|
+
"Place this SVG floor plan on the current sheet as vectors",
|
|
5217
|
+
"Bring a crisp vector graphic into Present mode\n\n# Example\n```ts\nconst { shapeIds } = await snaptrude.presentation.import.svg({\nurl: \"https://example.com/diagram.svg\",\n})\n```"
|
|
5218
|
+
],
|
|
5219
|
+
"argsType": "{ url?: string; dataUrl?: string }",
|
|
5220
|
+
"resultType": "PluginPresentationImportResult"
|
|
5221
|
+
},
|
|
4776
5222
|
{
|
|
4777
5223
|
"path": "presentation.sheets.create",
|
|
4778
5224
|
"namespace": "presentation.sheets",
|
|
@@ -4873,6 +5319,19 @@
|
|
|
4873
5319
|
"argsType": null,
|
|
4874
5320
|
"resultType": "PluginPresentationViewsGetResult"
|
|
4875
5321
|
},
|
|
5322
|
+
{
|
|
5323
|
+
"path": "presentation.views.getSettings",
|
|
5324
|
+
"namespace": "presentation.views",
|
|
5325
|
+
"summary": "Read a saved view's display settings (background, color mode, axis, edges, labels).",
|
|
5326
|
+
"examplePrompts": [
|
|
5327
|
+
"What color mode is the Ground Floor view using?",
|
|
5328
|
+
"Get the display settings for this view",
|
|
5329
|
+
"Does the site plan view show axes and labels?",
|
|
5330
|
+
"Read the background color of the active view\n\n# Example\n```ts\nconst settings = await snaptrude.presentation.views.getSettings(\"view_123\")\nif (settings) console.log(settings.colorMode, settings.backgroundColor)\n```"
|
|
5331
|
+
],
|
|
5332
|
+
"argsType": "string",
|
|
5333
|
+
"resultType": "PluginPresentationViewsGetSettingsResult"
|
|
5334
|
+
},
|
|
4876
5335
|
{
|
|
4877
5336
|
"path": "presentation.views.list",
|
|
4878
5337
|
"namespace": "presentation.views",
|
|
@@ -4900,6 +5359,20 @@
|
|
|
4900
5359
|
"argsType": "string",
|
|
4901
5360
|
"resultType": "PluginPresentationViewsSetActiveResult"
|
|
4902
5361
|
},
|
|
5362
|
+
{
|
|
5363
|
+
"path": "presentation.views.updateSettings",
|
|
5364
|
+
"namespace": "presentation.views",
|
|
5365
|
+
"summary": "Update a saved view's display settings (partial patch — only the fields you pass change).",
|
|
5366
|
+
"examplePrompts": [
|
|
5367
|
+
"Switch this view to monochrome color mode",
|
|
5368
|
+
"Turn off the axis in the Ground Floor view",
|
|
5369
|
+
"Set the background of the active view to white",
|
|
5370
|
+
"Show area labels on this view",
|
|
5371
|
+
"Enable hidden-line mode for the section view\n\n# Example\n```ts\nawait snaptrude.presentation.views.updateSettings(\"view_123\", {\ncolorMode: \"monochrome\",\nshowAxis: false,\n})\n```"
|
|
5372
|
+
],
|
|
5373
|
+
"argsType": "string",
|
|
5374
|
+
"resultType": "PluginPresentationViewsUpdateSettingsResult"
|
|
5375
|
+
},
|
|
4903
5376
|
{
|
|
4904
5377
|
"path": "program.adjacency.compute",
|
|
4905
5378
|
"namespace": "program.adjacency",
|
|
@@ -4933,6 +5406,8 @@
|
|
|
4933
5406
|
"examplePrompts": [
|
|
4934
5407
|
"What's my FAR right now?",
|
|
4935
5408
|
"Give me the program area summary",
|
|
5409
|
+
"What is my net internal area vs gross external area?",
|
|
5410
|
+
"How much net and gross area do I have?",
|
|
4936
5411
|
"How much built-up area have I used against the site area?",
|
|
4937
5412
|
"Am I within my FAR target?\n\n# Example\n```ts\nconst s = await snaptrude.program.areas.get()\nconsole.log(s.builtUp, s.siteArea, s.achievedFar, s.targetFar, s.areaUnit)\n```"
|
|
4938
5413
|
],
|
|
@@ -4945,6 +5420,7 @@
|
|
|
4945
5420
|
"summary": "List the program area rollup grouped by a facet.",
|
|
4946
5421
|
"examplePrompts": [
|
|
4947
5422
|
"Break down the area by storey",
|
|
5423
|
+
"Break down net vs gross area by storey",
|
|
4948
5424
|
"Show the area rollup per department",
|
|
4949
5425
|
"Group the built-up area by building\n\n# Example\n```ts\nconst { groups } = await snaptrude.program.areas.list(\"storeys\")\nfor (const g of groups) console.log(g.name, g.builtUp, g.count)\n```"
|
|
4950
5426
|
],
|
|
@@ -4957,6 +5433,7 @@
|
|
|
4957
5433
|
"summary": "List the spaces that make up one area group.",
|
|
4958
5434
|
"examplePrompts": [
|
|
4959
5435
|
"List the spaces on this storey with their areas",
|
|
5436
|
+
"Which spaces are net and which are gross on this storey?",
|
|
4960
5437
|
"What rooms are in the Bedrooms department bucket?",
|
|
4961
5438
|
"Break the storey area down into individual spaces\n\n# Example\n```ts\nconst { members } = await snaptrude.program.areas.listMembers(\"storeys\", \"st_2\")\nfor (const m of members) console.log(m.label, m.carpet)\n```"
|
|
4962
5439
|
],
|
|
@@ -5144,25 +5621,49 @@
|
|
|
5144
5621
|
{
|
|
5145
5622
|
"path": "program.layout.arrange",
|
|
5146
5623
|
"namespace": "program.layout",
|
|
5147
|
-
"summary": "Arrange the spaces inside the envelope using the computed adjacency data.
|
|
5624
|
+
"summary": "Arrange the spaces inside the envelope using the computed adjacency data.",
|
|
5148
5625
|
"examplePrompts": [
|
|
5149
5626
|
"Arrange the rooms in the envelope",
|
|
5150
5627
|
"Lay out the departments inside the building envelope",
|
|
5151
|
-
"Auto-arrange the program spaces\n\n# Example\n```ts\nconst { success, error } = await snaptrude.program.layout.arrange()\nif (!success)
|
|
5628
|
+
"Auto-arrange the program spaces\n\n# Example\n```ts\nconst { success, error } = await snaptrude.program.layout.arrange()\nif (!success) throw new Error(error)\n// poll until the layout is applied\nlet job = await snaptrude.program.layout.getState()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.program.layout.getState()\n}\n```"
|
|
5152
5629
|
],
|
|
5153
|
-
"argsType":
|
|
5630
|
+
"argsType": "PluginProgramLayoutRunArgs",
|
|
5154
5631
|
"resultType": "PluginProgramLayoutRunResult"
|
|
5155
5632
|
},
|
|
5633
|
+
{
|
|
5634
|
+
"path": "program.layout.cancel",
|
|
5635
|
+
"namespace": "program.layout",
|
|
5636
|
+
"summary": "Cancel the in-flight layout run.",
|
|
5637
|
+
"examplePrompts": [
|
|
5638
|
+
"Cancel the arrange",
|
|
5639
|
+
"Stop the running layout job",
|
|
5640
|
+
"Abort the pack in envelope\n\n# Example\n```ts\nawait snaptrude.program.layout.cancel()\n```"
|
|
5641
|
+
],
|
|
5642
|
+
"argsType": null,
|
|
5643
|
+
"resultType": "boolean"
|
|
5644
|
+
},
|
|
5645
|
+
{
|
|
5646
|
+
"path": "program.layout.getState",
|
|
5647
|
+
"namespace": "program.layout",
|
|
5648
|
+
"summary": "Get the state of the layout run.",
|
|
5649
|
+
"examplePrompts": [
|
|
5650
|
+
"Is the arrange done?",
|
|
5651
|
+
"Check the status of the layout run",
|
|
5652
|
+
"Did the pack finish?\n\n# Example\n```ts\nconst job = await snaptrude.program.layout.getState()\nif (job?.status === \"active\") console.log(\"layout applied\")\n```"
|
|
5653
|
+
],
|
|
5654
|
+
"argsType": null,
|
|
5655
|
+
"resultType": "PluginProgramLayoutStateResult"
|
|
5656
|
+
},
|
|
5156
5657
|
{
|
|
5157
5658
|
"path": "program.layout.pack",
|
|
5158
5659
|
"namespace": "program.layout",
|
|
5159
|
-
"summary": "Pack the spaces into the envelope (a tighter fit than arrange).
|
|
5660
|
+
"summary": "Pack the spaces into the envelope (a tighter fit than arrange).",
|
|
5160
5661
|
"examplePrompts": [
|
|
5161
5662
|
"Pack the rooms into the envelope",
|
|
5162
5663
|
"Fit the program spaces tightly into the building",
|
|
5163
|
-
"Run pack-in-envelope on this storey\n\n# Example\n```ts\nconst { success
|
|
5664
|
+
"Run pack-in-envelope on this storey\n\n# Example\n```ts\nconst { success } = await snaptrude.program.layout.pack({ envelopeId: \"be_...\" })\nlet job = await snaptrude.program.layout.getState()\nwhile (job?.status === \"running\") {\nawait new Promise((r) => setTimeout(r, 5000))\njob = await snaptrude.program.layout.getState()\n}\n```"
|
|
5164
5665
|
],
|
|
5165
|
-
"argsType":
|
|
5666
|
+
"argsType": "PluginProgramLayoutRunArgs",
|
|
5166
5667
|
"resultType": "PluginProgramLayoutRunResult"
|
|
5167
5668
|
},
|
|
5168
5669
|
{
|