@contractspec/lib.contracts-library 1.57.0 → 1.58.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/.turbo/turbo-build.log +32 -15
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +13 -0
- package/dist/browser/index.js +160 -0
- package/dist/browser/templates/index.js +160 -0
- package/dist/browser/templates/messaging.js +58 -0
- package/dist/browser/templates/recipes.js +46 -0
- package/dist/browser/templates/todos.js +58 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +161 -0
- package/dist/node/index.js +160 -0
- package/dist/node/templates/index.js +160 -0
- package/dist/node/templates/messaging.js +58 -0
- package/dist/node/templates/recipes.js +46 -0
- package/dist/node/templates/todos.js +58 -0
- package/dist/templates/index.d.ts +4 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +161 -0
- package/dist/templates/messaging.d.ts +2 -0
- package/dist/templates/messaging.d.ts.map +1 -0
- package/dist/templates/messaging.js +59 -0
- package/dist/templates/recipes.d.ts +2 -0
- package/dist/templates/recipes.d.ts.map +1 -0
- package/dist/templates/recipes.js +47 -0
- package/dist/templates/todos.d.ts +2 -0
- package/dist/templates/todos.d.ts.map +1 -0
- package/dist/templates/todos.js +59 -0
- package/package.json +63 -15
- package/.turbo/turbo-build$colon$bundle.log +0 -14
- package/dist/index.d.mts +0 -13
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -182
- package/dist/index.mjs.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
|
-
$ bun
|
|
2
|
-
$
|
|
3
|
-
$
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
$ contractspec-bun-build prebuild
|
|
2
|
+
$ bun run prebuild && bun run build:bundle && bun run build:types
|
|
3
|
+
$ contractspec-bun-build prebuild
|
|
4
|
+
$ contractspec-bun-build transpile
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=5
|
|
6
|
+
Bundled 5 modules in 5ms
|
|
7
|
+
|
|
8
|
+
./index.js 5.0 KB (entry point)
|
|
9
|
+
templates/index.js 5.0 KB (entry point)
|
|
10
|
+
templates/messaging.js 1.88 KB (entry point)
|
|
11
|
+
templates/recipes.js 1.43 KB (entry point)
|
|
12
|
+
templates/todos.js 1.69 KB (entry point)
|
|
13
|
+
|
|
14
|
+
[contractspec-bun-build] transpile target=node root=src entries=5
|
|
15
|
+
Bundled 5 modules in 13ms
|
|
16
|
+
|
|
17
|
+
./index.js 5.0 KB (entry point)
|
|
18
|
+
templates/index.js 5.0 KB (entry point)
|
|
19
|
+
templates/messaging.js 1.87 KB (entry point)
|
|
20
|
+
templates/recipes.js 1.43 KB (entry point)
|
|
21
|
+
templates/todos.js 1.68 KB (entry point)
|
|
22
|
+
|
|
23
|
+
[contractspec-bun-build] transpile target=browser root=src entries=5
|
|
24
|
+
Bundled 5 modules in 16ms
|
|
25
|
+
|
|
26
|
+
./index.js 5.0 KB (entry point)
|
|
27
|
+
templates/index.js 5.0 KB (entry point)
|
|
28
|
+
templates/messaging.js 1.87 KB (entry point)
|
|
29
|
+
templates/recipes.js 1.43 KB (entry point)
|
|
30
|
+
templates/todos.js 1.68 KB (entry point)
|
|
31
|
+
|
|
32
|
+
$ contractspec-bun-build types
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ contractspec-bun-build prebuild
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @contractspec/lib.contracts-library
|
|
2
2
|
|
|
3
|
+
## 1.58.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d1f0fd0: chore: Migrate non-app package builds from tsdown to shared Bun tooling, add `@contractspec/tool.bun`, and standardize `prebuild`/`build`/`typecheck` with platform-aware exports and `tsc` declaration emission into `dist`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [d1f0fd0]
|
|
12
|
+
- Updated dependencies [4355a9e]
|
|
13
|
+
- @contractspec/lib.contracts@1.58.0
|
|
14
|
+
- @contractspec/lib.schema@1.58.0
|
|
15
|
+
|
|
3
16
|
## 1.57.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// src/templates/recipes.ts
|
|
2
|
+
import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
|
|
3
|
+
var OWNERS = ["platform.contractspec-studio"];
|
|
4
|
+
var RecipeCapability = defineCapability({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "template.recipes.browse",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
kind: "api",
|
|
9
|
+
title: "Template Recipe Browser",
|
|
10
|
+
description: "Internationalized recipe browsing, search, and detail operations for template applications.",
|
|
11
|
+
domain: "templates",
|
|
12
|
+
owners: [...OWNERS],
|
|
13
|
+
tags: ["templates", "recipes", "i18n", "content"],
|
|
14
|
+
stability: StabilityEnum.Stable
|
|
15
|
+
},
|
|
16
|
+
provides: [
|
|
17
|
+
{
|
|
18
|
+
surface: "operation",
|
|
19
|
+
key: "template.recipe.list",
|
|
20
|
+
version: "1.0.0",
|
|
21
|
+
description: "List recipes with category, difficulty, and locale filters."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
surface: "operation",
|
|
25
|
+
key: "template.recipe.get",
|
|
26
|
+
version: "1.0.0",
|
|
27
|
+
description: "Fetch a recipe detail view including localized content."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
surface: "operation",
|
|
31
|
+
key: "template.recipe.search",
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
description: "Search recipes by ingredient, tag, or free text with i18n support."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
surface: "operation",
|
|
37
|
+
key: "template.recipe.favorite",
|
|
38
|
+
version: "1.0.0",
|
|
39
|
+
description: "Toggle recipe favorites for showcasing personalization patterns."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
requires: [{ key: "studio.project", version: "1.0.0" }]
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// src/templates/todos.ts
|
|
46
|
+
import { defineCapability as defineCapability2, StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts";
|
|
47
|
+
var OWNERS2 = ["platform.contractspec-studio"];
|
|
48
|
+
var TaskCrudCapability = defineCapability2({
|
|
49
|
+
meta: {
|
|
50
|
+
key: "template.todos.crud",
|
|
51
|
+
version: "1.0.0",
|
|
52
|
+
kind: "api",
|
|
53
|
+
title: "Template Tasks CRUD",
|
|
54
|
+
description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
|
|
55
|
+
domain: "templates",
|
|
56
|
+
owners: [...OWNERS2],
|
|
57
|
+
tags: ["templates", "todos", "productivity"],
|
|
58
|
+
stability: StabilityEnum2.Stable
|
|
59
|
+
},
|
|
60
|
+
provides: [
|
|
61
|
+
{
|
|
62
|
+
surface: "operation",
|
|
63
|
+
key: "template.task.create",
|
|
64
|
+
version: "1.0.0",
|
|
65
|
+
description: "Create a new task for a Studio project template."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
surface: "operation",
|
|
69
|
+
key: "template.task.update",
|
|
70
|
+
version: "1.0.0",
|
|
71
|
+
description: "Update task metadata such as title, due date, or category."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
surface: "operation",
|
|
75
|
+
key: "template.task.delete",
|
|
76
|
+
version: "1.0.0",
|
|
77
|
+
description: "Delete or archive a task from a template project."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
surface: "operation",
|
|
81
|
+
key: "template.task.toggle",
|
|
82
|
+
version: "1.0.0",
|
|
83
|
+
description: "Mark a task as completed or active."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
surface: "operation",
|
|
87
|
+
key: "template.task.list",
|
|
88
|
+
version: "1.0.0",
|
|
89
|
+
description: "List tasks with filtering, search, and sorting."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
surface: "operation",
|
|
93
|
+
key: "template.task.category",
|
|
94
|
+
version: "1.0.0",
|
|
95
|
+
description: "Manage categories and tags for tasks."
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
requires: [{ key: "studio.project", version: "1.0.0" }]
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// src/templates/messaging.ts
|
|
102
|
+
import { defineCapability as defineCapability3, StabilityEnum as StabilityEnum3 } from "@contractspec/lib.contracts";
|
|
103
|
+
var OWNERS3 = ["platform.contractspec-studio"];
|
|
104
|
+
var MessagingCapability = defineCapability3({
|
|
105
|
+
meta: {
|
|
106
|
+
key: "template.messaging.core",
|
|
107
|
+
version: "1.0.0",
|
|
108
|
+
kind: "api",
|
|
109
|
+
title: "Template Messaging Core",
|
|
110
|
+
description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
|
|
111
|
+
domain: "templates",
|
|
112
|
+
owners: [...OWNERS3],
|
|
113
|
+
tags: ["templates", "messaging", "realtime"],
|
|
114
|
+
stability: StabilityEnum3.Experimental
|
|
115
|
+
},
|
|
116
|
+
provides: [
|
|
117
|
+
{
|
|
118
|
+
surface: "operation",
|
|
119
|
+
key: "template.messaging.conversation.create",
|
|
120
|
+
version: "1.0.0",
|
|
121
|
+
description: "Create a direct or group conversation scoped to a Studio project."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
surface: "operation",
|
|
125
|
+
key: "template.messaging.conversation.list",
|
|
126
|
+
version: "1.0.0",
|
|
127
|
+
description: "List conversations with pagination, unread counts, and filters."
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
surface: "operation",
|
|
131
|
+
key: "template.messaging.message.send",
|
|
132
|
+
version: "1.0.0",
|
|
133
|
+
description: "Send a message with attachments and optimistic delivery state."
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
surface: "operation",
|
|
137
|
+
key: "template.messaging.message.read",
|
|
138
|
+
version: "1.0.0",
|
|
139
|
+
description: "Mark messages as read and update participant cursors."
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
surface: "event",
|
|
143
|
+
key: "template.messaging.message.received",
|
|
144
|
+
version: "1.0.0",
|
|
145
|
+
description: "Emitted when a participant receives a new message."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
surface: "event",
|
|
149
|
+
key: "template.messaging.typing",
|
|
150
|
+
version: "1.0.0",
|
|
151
|
+
description: "Emitted when a participant is typing in a conversation."
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
requires: [{ key: "studio.project", version: "1.0.0" }]
|
|
155
|
+
});
|
|
156
|
+
export {
|
|
157
|
+
TaskCrudCapability,
|
|
158
|
+
RecipeCapability,
|
|
159
|
+
MessagingCapability
|
|
160
|
+
};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// src/templates/recipes.ts
|
|
2
|
+
import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
|
|
3
|
+
var OWNERS = ["platform.contractspec-studio"];
|
|
4
|
+
var RecipeCapability = defineCapability({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "template.recipes.browse",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
kind: "api",
|
|
9
|
+
title: "Template Recipe Browser",
|
|
10
|
+
description: "Internationalized recipe browsing, search, and detail operations for template applications.",
|
|
11
|
+
domain: "templates",
|
|
12
|
+
owners: [...OWNERS],
|
|
13
|
+
tags: ["templates", "recipes", "i18n", "content"],
|
|
14
|
+
stability: StabilityEnum.Stable
|
|
15
|
+
},
|
|
16
|
+
provides: [
|
|
17
|
+
{
|
|
18
|
+
surface: "operation",
|
|
19
|
+
key: "template.recipe.list",
|
|
20
|
+
version: "1.0.0",
|
|
21
|
+
description: "List recipes with category, difficulty, and locale filters."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
surface: "operation",
|
|
25
|
+
key: "template.recipe.get",
|
|
26
|
+
version: "1.0.0",
|
|
27
|
+
description: "Fetch a recipe detail view including localized content."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
surface: "operation",
|
|
31
|
+
key: "template.recipe.search",
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
description: "Search recipes by ingredient, tag, or free text with i18n support."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
surface: "operation",
|
|
37
|
+
key: "template.recipe.favorite",
|
|
38
|
+
version: "1.0.0",
|
|
39
|
+
description: "Toggle recipe favorites for showcasing personalization patterns."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
requires: [{ key: "studio.project", version: "1.0.0" }]
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// src/templates/todos.ts
|
|
46
|
+
import { defineCapability as defineCapability2, StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts";
|
|
47
|
+
var OWNERS2 = ["platform.contractspec-studio"];
|
|
48
|
+
var TaskCrudCapability = defineCapability2({
|
|
49
|
+
meta: {
|
|
50
|
+
key: "template.todos.crud",
|
|
51
|
+
version: "1.0.0",
|
|
52
|
+
kind: "api",
|
|
53
|
+
title: "Template Tasks CRUD",
|
|
54
|
+
description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
|
|
55
|
+
domain: "templates",
|
|
56
|
+
owners: [...OWNERS2],
|
|
57
|
+
tags: ["templates", "todos", "productivity"],
|
|
58
|
+
stability: StabilityEnum2.Stable
|
|
59
|
+
},
|
|
60
|
+
provides: [
|
|
61
|
+
{
|
|
62
|
+
surface: "operation",
|
|
63
|
+
key: "template.task.create",
|
|
64
|
+
version: "1.0.0",
|
|
65
|
+
description: "Create a new task for a Studio project template."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
surface: "operation",
|
|
69
|
+
key: "template.task.update",
|
|
70
|
+
version: "1.0.0",
|
|
71
|
+
description: "Update task metadata such as title, due date, or category."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
surface: "operation",
|
|
75
|
+
key: "template.task.delete",
|
|
76
|
+
version: "1.0.0",
|
|
77
|
+
description: "Delete or archive a task from a template project."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
surface: "operation",
|
|
81
|
+
key: "template.task.toggle",
|
|
82
|
+
version: "1.0.0",
|
|
83
|
+
description: "Mark a task as completed or active."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
surface: "operation",
|
|
87
|
+
key: "template.task.list",
|
|
88
|
+
version: "1.0.0",
|
|
89
|
+
description: "List tasks with filtering, search, and sorting."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
surface: "operation",
|
|
93
|
+
key: "template.task.category",
|
|
94
|
+
version: "1.0.0",
|
|
95
|
+
description: "Manage categories and tags for tasks."
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
requires: [{ key: "studio.project", version: "1.0.0" }]
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// src/templates/messaging.ts
|
|
102
|
+
import { defineCapability as defineCapability3, StabilityEnum as StabilityEnum3 } from "@contractspec/lib.contracts";
|
|
103
|
+
var OWNERS3 = ["platform.contractspec-studio"];
|
|
104
|
+
var MessagingCapability = defineCapability3({
|
|
105
|
+
meta: {
|
|
106
|
+
key: "template.messaging.core",
|
|
107
|
+
version: "1.0.0",
|
|
108
|
+
kind: "api",
|
|
109
|
+
title: "Template Messaging Core",
|
|
110
|
+
description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
|
|
111
|
+
domain: "templates",
|
|
112
|
+
owners: [...OWNERS3],
|
|
113
|
+
tags: ["templates", "messaging", "realtime"],
|
|
114
|
+
stability: StabilityEnum3.Experimental
|
|
115
|
+
},
|
|
116
|
+
provides: [
|
|
117
|
+
{
|
|
118
|
+
surface: "operation",
|
|
119
|
+
key: "template.messaging.conversation.create",
|
|
120
|
+
version: "1.0.0",
|
|
121
|
+
description: "Create a direct or group conversation scoped to a Studio project."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
surface: "operation",
|
|
125
|
+
key: "template.messaging.conversation.list",
|
|
126
|
+
version: "1.0.0",
|
|
127
|
+
description: "List conversations with pagination, unread counts, and filters."
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
surface: "operation",
|
|
131
|
+
key: "template.messaging.message.send",
|
|
132
|
+
version: "1.0.0",
|
|
133
|
+
description: "Send a message with attachments and optimistic delivery state."
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
surface: "operation",
|
|
137
|
+
key: "template.messaging.message.read",
|
|
138
|
+
version: "1.0.0",
|
|
139
|
+
description: "Mark messages as read and update participant cursors."
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
surface: "event",
|
|
143
|
+
key: "template.messaging.message.received",
|
|
144
|
+
version: "1.0.0",
|
|
145
|
+
description: "Emitted when a participant receives a new message."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
surface: "event",
|
|
149
|
+
key: "template.messaging.typing",
|
|
150
|
+
version: "1.0.0",
|
|
151
|
+
description: "Emitted when a participant is typing in a conversation."
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
requires: [{ key: "studio.project", version: "1.0.0" }]
|
|
155
|
+
});
|
|
156
|
+
export {
|
|
157
|
+
TaskCrudCapability,
|
|
158
|
+
RecipeCapability,
|
|
159
|
+
MessagingCapability
|
|
160
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/templates/messaging.ts
|
|
2
|
+
import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
|
|
3
|
+
var OWNERS = ["platform.contractspec-studio"];
|
|
4
|
+
var MessagingCapability = defineCapability({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "template.messaging.core",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
kind: "api",
|
|
9
|
+
title: "Template Messaging Core",
|
|
10
|
+
description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
|
|
11
|
+
domain: "templates",
|
|
12
|
+
owners: [...OWNERS],
|
|
13
|
+
tags: ["templates", "messaging", "realtime"],
|
|
14
|
+
stability: StabilityEnum.Experimental
|
|
15
|
+
},
|
|
16
|
+
provides: [
|
|
17
|
+
{
|
|
18
|
+
surface: "operation",
|
|
19
|
+
key: "template.messaging.conversation.create",
|
|
20
|
+
version: "1.0.0",
|
|
21
|
+
description: "Create a direct or group conversation scoped to a Studio project."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
surface: "operation",
|
|
25
|
+
key: "template.messaging.conversation.list",
|
|
26
|
+
version: "1.0.0",
|
|
27
|
+
description: "List conversations with pagination, unread counts, and filters."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
surface: "operation",
|
|
31
|
+
key: "template.messaging.message.send",
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
description: "Send a message with attachments and optimistic delivery state."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
surface: "operation",
|
|
37
|
+
key: "template.messaging.message.read",
|
|
38
|
+
version: "1.0.0",
|
|
39
|
+
description: "Mark messages as read and update participant cursors."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
surface: "event",
|
|
43
|
+
key: "template.messaging.message.received",
|
|
44
|
+
version: "1.0.0",
|
|
45
|
+
description: "Emitted when a participant receives a new message."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
surface: "event",
|
|
49
|
+
key: "template.messaging.typing",
|
|
50
|
+
version: "1.0.0",
|
|
51
|
+
description: "Emitted when a participant is typing in a conversation."
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
requires: [{ key: "studio.project", version: "1.0.0" }]
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
MessagingCapability
|
|
58
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// src/templates/recipes.ts
|
|
2
|
+
import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
|
|
3
|
+
var OWNERS = ["platform.contractspec-studio"];
|
|
4
|
+
var RecipeCapability = defineCapability({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "template.recipes.browse",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
kind: "api",
|
|
9
|
+
title: "Template Recipe Browser",
|
|
10
|
+
description: "Internationalized recipe browsing, search, and detail operations for template applications.",
|
|
11
|
+
domain: "templates",
|
|
12
|
+
owners: [...OWNERS],
|
|
13
|
+
tags: ["templates", "recipes", "i18n", "content"],
|
|
14
|
+
stability: StabilityEnum.Stable
|
|
15
|
+
},
|
|
16
|
+
provides: [
|
|
17
|
+
{
|
|
18
|
+
surface: "operation",
|
|
19
|
+
key: "template.recipe.list",
|
|
20
|
+
version: "1.0.0",
|
|
21
|
+
description: "List recipes with category, difficulty, and locale filters."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
surface: "operation",
|
|
25
|
+
key: "template.recipe.get",
|
|
26
|
+
version: "1.0.0",
|
|
27
|
+
description: "Fetch a recipe detail view including localized content."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
surface: "operation",
|
|
31
|
+
key: "template.recipe.search",
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
description: "Search recipes by ingredient, tag, or free text with i18n support."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
surface: "operation",
|
|
37
|
+
key: "template.recipe.favorite",
|
|
38
|
+
version: "1.0.0",
|
|
39
|
+
description: "Toggle recipe favorites for showcasing personalization patterns."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
requires: [{ key: "studio.project", version: "1.0.0" }]
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
RecipeCapability
|
|
46
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/templates/todos.ts
|
|
2
|
+
import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
|
|
3
|
+
var OWNERS = ["platform.contractspec-studio"];
|
|
4
|
+
var TaskCrudCapability = defineCapability({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "template.todos.crud",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
kind: "api",
|
|
9
|
+
title: "Template Tasks CRUD",
|
|
10
|
+
description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
|
|
11
|
+
domain: "templates",
|
|
12
|
+
owners: [...OWNERS],
|
|
13
|
+
tags: ["templates", "todos", "productivity"],
|
|
14
|
+
stability: StabilityEnum.Stable
|
|
15
|
+
},
|
|
16
|
+
provides: [
|
|
17
|
+
{
|
|
18
|
+
surface: "operation",
|
|
19
|
+
key: "template.task.create",
|
|
20
|
+
version: "1.0.0",
|
|
21
|
+
description: "Create a new task for a Studio project template."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
surface: "operation",
|
|
25
|
+
key: "template.task.update",
|
|
26
|
+
version: "1.0.0",
|
|
27
|
+
description: "Update task metadata such as title, due date, or category."
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
surface: "operation",
|
|
31
|
+
key: "template.task.delete",
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
description: "Delete or archive a task from a template project."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
surface: "operation",
|
|
37
|
+
key: "template.task.toggle",
|
|
38
|
+
version: "1.0.0",
|
|
39
|
+
description: "Mark a task as completed or active."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
surface: "operation",
|
|
43
|
+
key: "template.task.list",
|
|
44
|
+
version: "1.0.0",
|
|
45
|
+
description: "List tasks with filtering, search, and sorting."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
surface: "operation",
|
|
49
|
+
key: "template.task.category",
|
|
50
|
+
version: "1.0.0",
|
|
51
|
+
description: "Manage categories and tags for tasks."
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
requires: [{ key: "studio.project", version: "1.0.0" }]
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
TaskCrudCapability
|
|
58
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|