@happyvertical/smrt-content 0.37.2 → 0.37.4
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/dist/body-format.js +334 -515
- package/dist/body-format.js.map +1 -1
- package/dist/chunks/content-transparency-OvUNs-bU.js +587 -0
- package/dist/chunks/content-transparency-OvUNs-bU.js.map +1 -0
- package/dist/content-editor-assistant.js +76 -84
- package/dist/content-editor-assistant.js.map +1 -1
- package/dist/index.js +11156 -11547
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +2 -2
- package/dist/mock-smrt-client.js +300 -382
- package/dist/mock-smrt-client.js.map +1 -1
- package/dist/playground.js +364 -428
- package/dist/playground.js.map +1 -1
- package/dist/publish-readiness.js +49 -70
- package/dist/publish-readiness.js.map +1 -1
- package/dist/smrt-knowledge.json +15 -15
- package/dist/ui.js +48 -40
- package/dist/ui.js.map +1 -1
- package/package.json +34 -34
package/dist/playground.js
CHANGED
|
@@ -1,454 +1,390 @@
|
|
|
1
1
|
import { CONTENT_MODULE_META } from "./ui.js";
|
|
2
|
-
|
|
2
|
+
//#region src/svelte/playground.ts
|
|
3
|
+
var DEFAULT_CONTENT_PLAYGROUND_API_BASE_URL = "/api/v1";
|
|
3
4
|
function resolveContentPlaygroundApiBaseUrl() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
);
|
|
13
|
-
if (configuredViaQuery) {
|
|
14
|
-
return configuredViaQuery;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return DEFAULT_CONTENT_PLAYGROUND_API_BASE_URL;
|
|
5
|
+
const configuredViaGlobal = globalThis.__SMRT_CONTENT_PLAYGROUND_API_BASE_URL__;
|
|
6
|
+
if (configuredViaGlobal) return configuredViaGlobal;
|
|
7
|
+
const browserLocation = globalThis.location;
|
|
8
|
+
if (browserLocation) {
|
|
9
|
+
const configuredViaQuery = new URLSearchParams(browserLocation.search).get("smrtContentApiBaseUrl");
|
|
10
|
+
if (configuredViaQuery) return configuredViaQuery;
|
|
11
|
+
}
|
|
12
|
+
return DEFAULT_CONTENT_PLAYGROUND_API_BASE_URL;
|
|
18
13
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
assignments: [
|
|
161
|
-
{
|
|
162
|
-
id: "assignment-article",
|
|
163
|
-
key: "article",
|
|
164
|
-
label: "Articles",
|
|
165
|
-
contentType: "article",
|
|
166
|
-
contentVariant: null,
|
|
167
|
-
enabled: true,
|
|
168
|
-
factLinkingEnabled: true,
|
|
169
|
-
transparencyEnabled: true,
|
|
170
|
-
publicationProfileKey: "publication",
|
|
171
|
-
correctionProfileKey: null,
|
|
172
|
-
enforcePublishReadiness: true,
|
|
173
|
-
defaultFactRelationship: "supports"
|
|
174
|
-
}
|
|
175
|
-
]
|
|
176
|
-
}
|
|
14
|
+
var sampleArticles = [{
|
|
15
|
+
id: "article-aurora-kitchen",
|
|
16
|
+
slug: "aurora-kitchen-notes",
|
|
17
|
+
title: "Aurora Kitchen Notes",
|
|
18
|
+
description: "A reference article card preview showing how editorial metadata lands in the package playground.",
|
|
19
|
+
publish_date: "2026-03-14T12:00:00.000Z",
|
|
20
|
+
author: "Editorial Systems",
|
|
21
|
+
tags: [
|
|
22
|
+
"release",
|
|
23
|
+
"editorial",
|
|
24
|
+
"qa"
|
|
25
|
+
]
|
|
26
|
+
}, {
|
|
27
|
+
id: "article-governance-habits",
|
|
28
|
+
slug: "governance-habits",
|
|
29
|
+
title: "Governance Habits That Scale",
|
|
30
|
+
description: "Teams can move fast when quality gates are visible, lightweight, and shared with contributors.",
|
|
31
|
+
publish_date: "2026-03-19T09:30:00.000Z",
|
|
32
|
+
author: "Content Ops",
|
|
33
|
+
tags: [
|
|
34
|
+
"governance",
|
|
35
|
+
"quality",
|
|
36
|
+
"workflows"
|
|
37
|
+
]
|
|
38
|
+
}];
|
|
39
|
+
var sampleContributions = [{
|
|
40
|
+
id: "contribution-1",
|
|
41
|
+
title: "Spring buyer guide",
|
|
42
|
+
contributionTypeKey: "article",
|
|
43
|
+
status: "needs_changes",
|
|
44
|
+
revisionCount: 2,
|
|
45
|
+
editorNotes: "Please tighten the sourcing notes in the opening section.",
|
|
46
|
+
contributorName: "Taylor Rowan",
|
|
47
|
+
contributorEmail: "taylor@example.com",
|
|
48
|
+
intakeDecision: "needs_changes",
|
|
49
|
+
body: "The spring buyer guide draft is attached, with sourcing notes for the opening section and the product comparison appendix.",
|
|
50
|
+
updatedAt: "2026-03-20T15:18:00.000Z"
|
|
51
|
+
}, {
|
|
52
|
+
id: "contribution-2",
|
|
53
|
+
title: "Field report: Pacific logistics",
|
|
54
|
+
contributionTypeKey: "report",
|
|
55
|
+
status: "submitted",
|
|
56
|
+
revisionCount: 1,
|
|
57
|
+
contributorName: "Jordan Lee",
|
|
58
|
+
contributorEmail: "jordan@example.com",
|
|
59
|
+
intakeDecision: "submitted",
|
|
60
|
+
body: "Field notes from the Pacific corridor include updated shipping windows, route constraints, and operator interviews.",
|
|
61
|
+
updatedAt: "2026-03-18T10:40:00.000Z"
|
|
62
|
+
}];
|
|
63
|
+
var sampleGovernanceDefinitions = {
|
|
64
|
+
effective: {
|
|
65
|
+
policies: [{
|
|
66
|
+
id: "policy-facts",
|
|
67
|
+
key: "facts",
|
|
68
|
+
label: "Facts review",
|
|
69
|
+
kind: "facts",
|
|
70
|
+
instructions: "Compare claims against linked facts before publication.",
|
|
71
|
+
enabled: true
|
|
72
|
+
}, {
|
|
73
|
+
id: "policy-style",
|
|
74
|
+
key: "style",
|
|
75
|
+
label: "Style review",
|
|
76
|
+
kind: "custom",
|
|
77
|
+
instructions: "Apply newsroom tone, structure, and clarity guidelines.",
|
|
78
|
+
enabled: true
|
|
79
|
+
}],
|
|
80
|
+
profiles: [{
|
|
81
|
+
id: "profile-publication",
|
|
82
|
+
key: "publication",
|
|
83
|
+
label: "Publication",
|
|
84
|
+
description: "Required before governed content can be published.",
|
|
85
|
+
enabled: true,
|
|
86
|
+
requirements: [{
|
|
87
|
+
policyKey: "facts",
|
|
88
|
+
label: "Facts review",
|
|
89
|
+
blocking: true,
|
|
90
|
+
acceptedStatuses: ["passed"]
|
|
91
|
+
}, {
|
|
92
|
+
policyKey: "style",
|
|
93
|
+
label: "Style review",
|
|
94
|
+
blocking: false,
|
|
95
|
+
acceptedStatuses: ["passed", "warning"]
|
|
96
|
+
}]
|
|
97
|
+
}],
|
|
98
|
+
assignments: [{
|
|
99
|
+
id: "assignment-article",
|
|
100
|
+
key: "article",
|
|
101
|
+
label: "Articles",
|
|
102
|
+
contentType: "article",
|
|
103
|
+
contentVariant: null,
|
|
104
|
+
enabled: true,
|
|
105
|
+
factLinkingEnabled: true,
|
|
106
|
+
transparencyEnabled: true,
|
|
107
|
+
publicationProfileKey: "publication",
|
|
108
|
+
correctionProfileKey: null,
|
|
109
|
+
enforcePublishReadiness: true,
|
|
110
|
+
defaultFactRelationship: "supports"
|
|
111
|
+
}]
|
|
112
|
+
},
|
|
113
|
+
persisted: {
|
|
114
|
+
policies: [{
|
|
115
|
+
id: "policy-style",
|
|
116
|
+
key: "style",
|
|
117
|
+
label: "Style review",
|
|
118
|
+
kind: "custom",
|
|
119
|
+
instructions: "Apply newsroom tone, structure, and clarity guidelines.",
|
|
120
|
+
enabled: true
|
|
121
|
+
}],
|
|
122
|
+
profiles: [{
|
|
123
|
+
id: "profile-publication",
|
|
124
|
+
key: "publication",
|
|
125
|
+
label: "Publication",
|
|
126
|
+
description: "Required before governed content can be published.",
|
|
127
|
+
enabled: true,
|
|
128
|
+
requirements: [{
|
|
129
|
+
policyKey: "facts",
|
|
130
|
+
label: "Facts review",
|
|
131
|
+
blocking: true,
|
|
132
|
+
acceptedStatuses: ["passed"]
|
|
133
|
+
}, {
|
|
134
|
+
policyKey: "style",
|
|
135
|
+
label: "Style review",
|
|
136
|
+
blocking: false,
|
|
137
|
+
acceptedStatuses: ["passed", "warning"]
|
|
138
|
+
}]
|
|
139
|
+
}],
|
|
140
|
+
assignments: [{
|
|
141
|
+
id: "assignment-article",
|
|
142
|
+
key: "article",
|
|
143
|
+
label: "Articles",
|
|
144
|
+
contentType: "article",
|
|
145
|
+
contentVariant: null,
|
|
146
|
+
enabled: true,
|
|
147
|
+
factLinkingEnabled: true,
|
|
148
|
+
transparencyEnabled: true,
|
|
149
|
+
publicationProfileKey: "publication",
|
|
150
|
+
correctionProfileKey: null,
|
|
151
|
+
enforcePublishReadiness: true,
|
|
152
|
+
defaultFactRelationship: "supports"
|
|
153
|
+
}]
|
|
154
|
+
}
|
|
177
155
|
};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
156
|
+
var sampleEditorContent = {
|
|
157
|
+
id: "content-playground-editor",
|
|
158
|
+
slug: "playground-editor-reference",
|
|
159
|
+
title: "Reference editorial draft",
|
|
160
|
+
description: "A working editor preview with copy, references, and assets already populated.",
|
|
161
|
+
body: `# Editorial Draft
|
|
184
162
|
|
|
185
163
|
This preview is meant to feel like a real authoring surface.
|
|
186
164
|
|
|
187
165
|
- tighten the lede
|
|
188
166
|
- verify product claims
|
|
189
167
|
- attach supporting references`,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
};
|
|
200
|
-
const noop = () => {
|
|
168
|
+
author: "Editorial Systems",
|
|
169
|
+
type: "article",
|
|
170
|
+
status: "draft",
|
|
171
|
+
state: "active",
|
|
172
|
+
source: "manual",
|
|
173
|
+
tags: ["editorial", "playground"],
|
|
174
|
+
referenceIds: ["fact-aurora", "source-governance"],
|
|
175
|
+
assetIds: [],
|
|
176
|
+
assets: []
|
|
201
177
|
};
|
|
178
|
+
var noop = () => {};
|
|
202
179
|
function cloneValue(value) {
|
|
203
|
-
|
|
180
|
+
return JSON.parse(JSON.stringify(value));
|
|
204
181
|
}
|
|
205
182
|
function buildPlaygroundResponse(data) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
183
|
+
return {
|
|
184
|
+
data,
|
|
185
|
+
success: true
|
|
186
|
+
};
|
|
210
187
|
}
|
|
211
188
|
function upsertByIdOrKey(items, value, prefix) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
...nextItems[index],
|
|
226
|
-
...nextValue
|
|
227
|
-
};
|
|
228
|
-
return nextItems;
|
|
189
|
+
const id = value.id || `${prefix}-${value.key || items.length + 1}`;
|
|
190
|
+
const nextValue = {
|
|
191
|
+
...value,
|
|
192
|
+
id
|
|
193
|
+
};
|
|
194
|
+
const index = items.findIndex((item) => item.id === id || !!value.key && item.key === value.key);
|
|
195
|
+
if (index === -1) return [...items, nextValue];
|
|
196
|
+
const nextItems = [...items];
|
|
197
|
+
nextItems[index] = {
|
|
198
|
+
...nextItems[index],
|
|
199
|
+
...nextValue
|
|
200
|
+
};
|
|
201
|
+
return nextItems;
|
|
229
202
|
}
|
|
230
203
|
function createGovernancePlaygroundClient(seed = sampleGovernanceDefinitions) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
};
|
|
204
|
+
let policies = cloneValue(seed.effective.policies);
|
|
205
|
+
let profiles = cloneValue(seed.effective.profiles);
|
|
206
|
+
let assignments = cloneValue(seed.effective.assignments);
|
|
207
|
+
const getDefinitions = () => ({
|
|
208
|
+
effective: {
|
|
209
|
+
policies: cloneValue(policies),
|
|
210
|
+
profiles: cloneValue(profiles),
|
|
211
|
+
assignments: cloneValue(assignments)
|
|
212
|
+
},
|
|
213
|
+
persisted: {
|
|
214
|
+
policies: cloneValue(policies),
|
|
215
|
+
profiles: cloneValue(profiles),
|
|
216
|
+
assignments: cloneValue(assignments)
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
return {
|
|
220
|
+
contents: { getGovernanceDefinitions: async () => buildPlaygroundResponse(getDefinitions()) },
|
|
221
|
+
contentGovernancePolicies: {
|
|
222
|
+
create: async (policy) => {
|
|
223
|
+
policies = upsertByIdOrKey(policies, policy, "policy");
|
|
224
|
+
return buildPlaygroundResponse(policies[policies.length - 1]);
|
|
225
|
+
},
|
|
226
|
+
update: async (id, policy) => {
|
|
227
|
+
policies = upsertByIdOrKey(policies, {
|
|
228
|
+
...policy,
|
|
229
|
+
id
|
|
230
|
+
}, "policy");
|
|
231
|
+
return buildPlaygroundResponse(policies.find((item) => item.id === id));
|
|
232
|
+
},
|
|
233
|
+
delete: async (id) => {
|
|
234
|
+
policies = policies.filter((item) => item.id !== id);
|
|
235
|
+
return buildPlaygroundResponse(void 0);
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
contentGovernanceProfiles: {
|
|
239
|
+
create: async (profile) => {
|
|
240
|
+
profiles = upsertByIdOrKey(profiles, profile, "profile");
|
|
241
|
+
return buildPlaygroundResponse(profiles[profiles.length - 1]);
|
|
242
|
+
},
|
|
243
|
+
update: async (id, profile) => {
|
|
244
|
+
profiles = upsertByIdOrKey(profiles, {
|
|
245
|
+
...profile,
|
|
246
|
+
id
|
|
247
|
+
}, "profile");
|
|
248
|
+
return buildPlaygroundResponse(profiles.find((item) => item.id === id));
|
|
249
|
+
},
|
|
250
|
+
delete: async (id) => {
|
|
251
|
+
profiles = profiles.filter((item) => item.id !== id);
|
|
252
|
+
return buildPlaygroundResponse(void 0);
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
contentGovernanceAssignments: {
|
|
256
|
+
create: async (assignment) => {
|
|
257
|
+
assignments = upsertByIdOrKey(assignments, assignment, "assignment");
|
|
258
|
+
return buildPlaygroundResponse(assignments[assignments.length - 1]);
|
|
259
|
+
},
|
|
260
|
+
update: async (id, assignment) => {
|
|
261
|
+
assignments = upsertByIdOrKey(assignments, {
|
|
262
|
+
...assignment,
|
|
263
|
+
id
|
|
264
|
+
}, "assignment");
|
|
265
|
+
return buildPlaygroundResponse(assignments.find((item) => item.id === id));
|
|
266
|
+
},
|
|
267
|
+
delete: async (id) => {
|
|
268
|
+
assignments = assignments.filter((item) => item.id !== id);
|
|
269
|
+
return buildPlaygroundResponse(void 0);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
};
|
|
303
273
|
}
|
|
304
|
-
|
|
274
|
+
var markdownExample = `# Content Playground
|
|
305
275
|
|
|
306
276
|
This preview module lives in \`src/svelte/playground.ts\`.
|
|
307
277
|
|
|
308
278
|
- Package-owned previews stay close to the real components
|
|
309
279
|
- The shared host simply discovers and renders them
|
|
310
280
|
- Live entries can still point at the package's generated API routes`;
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
order: 6,
|
|
417
|
-
props: {
|
|
418
|
-
contributions: sampleContributions
|
|
419
|
-
},
|
|
420
|
-
modes: {
|
|
421
|
-
mock: {
|
|
422
|
-
label: "Mock"
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
id: "governance-manager",
|
|
428
|
-
title: "Governance Manager",
|
|
429
|
-
description: "Administrative view with in-memory mock data and optional live package routes.",
|
|
430
|
-
loadComponent: loadContentGovernanceManager,
|
|
431
|
-
order: 7,
|
|
432
|
-
modes: {
|
|
433
|
-
mock: {
|
|
434
|
-
label: "Mock",
|
|
435
|
-
description: "Uses an in-memory governance client so the shared playground works without a package-local dev server.",
|
|
436
|
-
props: {
|
|
437
|
-
client: governancePlaygroundClient
|
|
438
|
-
}
|
|
439
|
-
},
|
|
440
|
-
live: {
|
|
441
|
-
label: "Live",
|
|
442
|
-
description: "Requires the content package dev server and generated routes. Override the base URL with ?smrtContentApiBaseUrl=... or window.__SMRT_CONTENT_PLAYGROUND_API_BASE_URL__ when needed.",
|
|
443
|
-
props: {
|
|
444
|
-
apiBaseUrl: resolveContentPlaygroundApiBaseUrl()
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
]
|
|
450
|
-
};
|
|
451
|
-
export {
|
|
452
|
-
playground as default
|
|
281
|
+
var loadArticleCard = () => import("./svelte/components/ArticleCard.svelte");
|
|
282
|
+
var loadArticleList = () => import("./svelte/components/ArticleList.svelte");
|
|
283
|
+
var loadContentEditor = () => import("./svelte/components/ContentEditor.svelte");
|
|
284
|
+
var loadContentContributionInbox = () => import("./svelte/components/ContentContributionInbox.svelte");
|
|
285
|
+
var loadContentContributionPortal = () => import("./svelte/components/ContentContributionPortal.svelte");
|
|
286
|
+
var loadContentGovernanceManager = () => import("./svelte/components/ContentGovernanceManager.svelte");
|
|
287
|
+
var loadMarkdown = () => import("./svelte/components/Markdown.svelte");
|
|
288
|
+
var governancePlaygroundClient = createGovernancePlaygroundClient();
|
|
289
|
+
var playground_default = {
|
|
290
|
+
packageName: "@happyvertical/smrt-content",
|
|
291
|
+
displayName: "Content",
|
|
292
|
+
description: CONTENT_MODULE_META.description,
|
|
293
|
+
moduleMeta: CONTENT_MODULE_META,
|
|
294
|
+
entries: [
|
|
295
|
+
{
|
|
296
|
+
id: "article-card",
|
|
297
|
+
slotId: "article-card",
|
|
298
|
+
title: "Article Card",
|
|
299
|
+
description: "Editorial teaser card with tags and metadata.",
|
|
300
|
+
loadComponent: loadArticleCard,
|
|
301
|
+
order: 1,
|
|
302
|
+
props: {
|
|
303
|
+
article: sampleArticles[0],
|
|
304
|
+
showTags: true
|
|
305
|
+
},
|
|
306
|
+
modes: { mock: { label: "Mock" } }
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
id: "article-list",
|
|
310
|
+
slotId: "article-list",
|
|
311
|
+
title: "Article List",
|
|
312
|
+
description: "Reference list/grid layout for published content.",
|
|
313
|
+
loadComponent: loadArticleList,
|
|
314
|
+
order: 2,
|
|
315
|
+
props: {
|
|
316
|
+
articles: sampleArticles,
|
|
317
|
+
showTags: true
|
|
318
|
+
},
|
|
319
|
+
modes: { mock: { label: "Mock" } }
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
id: "markdown",
|
|
323
|
+
slotId: "markdown",
|
|
324
|
+
title: "Markdown Renderer",
|
|
325
|
+
description: "Safe markdown rendering with a small editorial snippet.",
|
|
326
|
+
loadComponent: loadMarkdown,
|
|
327
|
+
order: 3,
|
|
328
|
+
props: { content: markdownExample },
|
|
329
|
+
modes: { mock: { label: "Mock" } }
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: "content-editor",
|
|
333
|
+
title: "Content Editor",
|
|
334
|
+
description: "Authoring surface for body copy, references, and media.",
|
|
335
|
+
loadComponent: loadContentEditor,
|
|
336
|
+
order: 4,
|
|
337
|
+
props: {
|
|
338
|
+
apiBaseUrl: resolveContentPlaygroundApiBaseUrl(),
|
|
339
|
+
content: sampleEditorContent,
|
|
340
|
+
contentId: sampleEditorContent.id,
|
|
341
|
+
agentChatEnabled: false,
|
|
342
|
+
agentChatNotice: "The shared playground keeps the editor preview local. Run the content package app when you want the live agent chat routes too.",
|
|
343
|
+
onSave: noop,
|
|
344
|
+
onCancel: noop
|
|
345
|
+
},
|
|
346
|
+
modes: { mock: { label: "Mock" } }
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
id: "contribution-portal",
|
|
350
|
+
title: "Contribution Portal",
|
|
351
|
+
description: "Contributor-facing inbox and submission status view.",
|
|
352
|
+
loadComponent: loadContentContributionPortal,
|
|
353
|
+
order: 5,
|
|
354
|
+
props: { contributions: sampleContributions },
|
|
355
|
+
modes: { mock: { label: "Mock" } }
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
id: "contribution-inbox",
|
|
359
|
+
title: "Contribution Inbox",
|
|
360
|
+
description: "Editorial review queue for approving, rejecting, or requesting changes.",
|
|
361
|
+
loadComponent: loadContentContributionInbox,
|
|
362
|
+
order: 6,
|
|
363
|
+
props: { contributions: sampleContributions },
|
|
364
|
+
modes: { mock: { label: "Mock" } }
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
id: "governance-manager",
|
|
368
|
+
title: "Governance Manager",
|
|
369
|
+
description: "Administrative view with in-memory mock data and optional live package routes.",
|
|
370
|
+
loadComponent: loadContentGovernanceManager,
|
|
371
|
+
order: 7,
|
|
372
|
+
modes: {
|
|
373
|
+
mock: {
|
|
374
|
+
label: "Mock",
|
|
375
|
+
description: "Uses an in-memory governance client so the shared playground works without a package-local dev server.",
|
|
376
|
+
props: { client: governancePlaygroundClient }
|
|
377
|
+
},
|
|
378
|
+
live: {
|
|
379
|
+
label: "Live",
|
|
380
|
+
description: "Requires the content package dev server and generated routes. Override the base URL with ?smrtContentApiBaseUrl=... or window.__SMRT_CONTENT_PLAYGROUND_API_BASE_URL__ when needed.",
|
|
381
|
+
props: { apiBaseUrl: resolveContentPlaygroundApiBaseUrl() }
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
]
|
|
453
386
|
};
|
|
454
|
-
//#
|
|
387
|
+
//#endregion
|
|
388
|
+
export { playground_default as default };
|
|
389
|
+
|
|
390
|
+
//# sourceMappingURL=playground.js.map
|