@engenty/wizards-runtime 0.11.1 → 0.11.3
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/README.md +25 -6
- package/apps/runtime/dist/agents/studio-assistant.js +2 -2
- package/apps/runtime/dist/app.js +9 -0
- package/apps/runtime/dist/assistant/primer.js +2 -2
- package/apps/runtime/dist/auth/index.js +32 -7
- package/apps/runtime/dist/authoring/guide.js +19 -19
- package/apps/runtime/dist/docs/dev/index.md +1 -0
- package/apps/runtime/dist/docs/dev/licensing.md +85 -0
- package/apps/runtime/dist/docs/dev/meta.json +2 -1
- package/apps/runtime/dist/docs/dev/plugins/events.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/index.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/runners.md +2 -2
- package/apps/runtime/dist/docs/dev/plugins/space.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/studio.md +5 -4
- package/apps/runtime/dist/docs/dev/wizard-format/index.md +5 -5
- package/apps/runtime/dist/docs/dev/wizard-format/meta.json +1 -1
- package/apps/runtime/dist/docs/dev/wizard-format/motion-graphics-steps.md +55 -0
- package/apps/runtime/dist/docs/dev/wizard-format/review-and-result.md +2 -2
- package/apps/runtime/dist/docs/dev/wizard-format/themes.md +1 -1
- package/apps/runtime/dist/docs/dev/wizard-format/views-and-widgets.md +2 -2
- package/apps/runtime/dist/docs/dev/wizard-format/wizard-file.md +4 -4
- package/apps/runtime/dist/docs/user-guide/create-account.md +11 -4
- package/apps/runtime/dist/docs/user-guide/first-start.md +10 -2
- package/apps/runtime/dist/docs/user-guide/plugins.md +1 -1
- package/apps/runtime/dist/docs/user-guide/space.md +15 -7
- package/apps/runtime/dist/docs/user-guide/steps.md +17 -16
- package/apps/runtime/dist/docs/user-guide/troubleshooting.md +3 -3
- package/apps/runtime/dist/engine/requirements.js +7 -7
- package/apps/runtime/dist/engine/runner.js +8 -1
- package/apps/runtime/dist/engine/steps.js +3 -3
- package/apps/runtime/dist/files/storage.js +3 -3
- package/apps/runtime/dist/index.js +3 -0
- package/apps/runtime/dist/limits.js +16 -0
- package/apps/runtime/dist/manage.js +79 -2
- package/apps/runtime/dist/models.js +8 -8
- package/apps/runtime/dist/{film → motion-graphics}/project.js +54 -54
- package/apps/runtime/dist/{film → motion-graphics}/sounds.js +3 -3
- package/apps/runtime/dist/{film → motion-graphics}/step.js +37 -37
- package/apps/runtime/dist/{film → motion-graphics}/tools.js +1 -1
- package/apps/runtime/dist/render/downloads.js +2 -2
- package/apps/runtime/dist/render/guard.js +1 -1
- package/apps/runtime/dist/routes/delivery.js +1 -1
- package/apps/runtime/dist/routes/internal.js +1 -1
- package/apps/runtime/dist/routes/marketplace.js +29 -4
- package/apps/runtime/dist/routes/organization.js +114 -0
- package/apps/runtime/dist/routes/person.js +45 -0
- package/apps/runtime/dist/routes/reports.js +80 -0
- package/apps/runtime/dist/routes/runs.js +25 -1
- package/apps/runtime/dist/routes/studio.js +63 -7
- package/apps/runtime/dist/services/brand.js +1 -1
- package/apps/runtime/dist/services/manage-reports.js +190 -0
- package/apps/runtime/dist/services/marketplace.js +33 -1
- package/apps/runtime/dist/services/onboarding-find.js +123 -0
- package/apps/runtime/dist/services/onboarding.js +77 -16
- package/apps/runtime/dist/services/organization-context.js +40 -0
- package/apps/runtime/dist/services/pages.js +1 -1
- package/apps/runtime/dist/services/shipped-fonts.js +2 -1
- package/apps/runtime/dist/services/wizards.js +7 -0
- package/apps/runtime/dist/texts.js +12 -1
- package/apps/runtime/dist/widgets/render.js +9 -9
- package/apps/runtime/dist/widgets/runtime.js +3 -3
- package/apps/runtime/dist/widgets/step.js +20 -20
- package/apps/web/dist/assets/{AboutDialog-D2r8kBfV.js → AboutDialog-DlbfynVv.js} +1 -1
- package/apps/web/dist/assets/{ChangelogDialog-j7Z1YhNv.js → ChangelogDialog-DciD55wO.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-BTCMfVFJ.js → CodeEditor-9kXX-juf.js} +1 -1
- package/apps/web/dist/assets/EditorPage-ovstPrvJ.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-BtVgtW7P.js → FlowPreview-BY3kJO9l.js} +1 -1
- package/apps/web/dist/assets/{Harness-H4Ue1HOd.js → Harness-BqcSaPmJ.js} +2 -2
- package/apps/web/dist/assets/Marketplace-DxcNtFdJ.js +2 -0
- package/apps/web/dist/assets/{NewWizardChannels-K1HOzkXf.js → NewWizardChannels-CmeAOy0q.js} +1 -1
- package/apps/web/dist/assets/NewWizardPage-C2Ne-QFZ.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-CGEgLpx0.js +1 -0
- package/apps/web/dist/assets/PreviewPane-VnxYvrbF.js +10 -0
- package/apps/web/dist/assets/ProjectPage-CGpsFPJ4.js +1 -0
- package/apps/web/dist/assets/PublicRunner-b4vSNmVB.js +1 -0
- package/apps/web/dist/assets/{ReadOnly-Duk1YpNM.js → ReadOnly-C7Kk-1Vg.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-Cgt3zVu5.js +2 -0
- package/apps/web/dist/assets/SetupPage-DmYnhiMq.js +1 -0
- package/apps/web/dist/assets/{SharePage-DvAUwrOl.js → SharePage-DMgm31Y_.js} +1 -1
- package/apps/web/dist/assets/changelog-CJYpF3Mx.js +1 -0
- package/apps/web/dist/assets/{coins-DSvwvqtQ.js → coins-Dd9IUAaR.js} +1 -1
- package/apps/web/dist/assets/i18n-QZC6TtrB.js +55 -0
- package/apps/web/dist/assets/index-Cfn8Jnfl.js +34 -0
- package/apps/web/dist/assets/index-DQc1EITf.css +1 -0
- package/apps/web/dist/assets/{oss-credits-BLVLXRzs.js → oss-credits-C6bPkfSE.js} +1 -1
- package/apps/web/dist/assets/{phone-xIUU1ZFn.js → phone-DKeaGjd9.js} +1 -1
- package/apps/web/dist/assets/runners-D2_oJdgS.js +1 -0
- package/apps/web/dist/assets/session-DBNhp6sF.js +2 -0
- package/apps/web/dist/assets/settings-menu-B09fSEin.js +1 -0
- package/apps/web/dist/assets/theme-CdWeSjNs.js +11 -0
- package/apps/web/dist/assets/{ui-6AgUKJhQ.js → ui-BPfapiMz.js} +6 -6
- package/apps/web/dist/assets/{upload-C8WgcG1g.js → upload-DCYRRi4d.js} +1 -1
- package/apps/web/dist/assets/{useMutation-BdCg6qrc.js → useMutation-BGqWiJkl.js} +1 -1
- package/apps/web/dist/assets/{volume-2-jlgQapiz.js → volume-2-D_FTVDPk.js} +1 -1
- package/apps/web/dist/assets/{wrench-Ca_TrBQk.js → wrench-BYwez0dN.js} +1 -1
- package/apps/web/dist/index.html +9 -9
- package/apps/web/dist/mcp/flow.html +32 -32
- package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +2 -2
- package/node_modules/@engenty/wizards/dist/plugin/studio.d.ts +5 -5
- package/node_modules/@engenty/wizards-shared/dist/addresses.d.ts +17 -0
- package/node_modules/@engenty/wizards-shared/dist/addresses.js +97 -0
- package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +11 -11
- package/node_modules/@engenty/wizards-shared/dist/definition.js +24 -23
- package/node_modules/@engenty/wizards-shared/dist/engenty/data-tables/columns-value.js +1 -0
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +9 -3
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +9 -3
- package/node_modules/@engenty/wizards-shared/dist/fit.d.ts +7 -2
- package/node_modules/@engenty/wizards-shared/dist/fit.js +23 -6
- package/node_modules/@engenty/wizards-shared/dist/marketplace-entry.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/marketplace-entry.js +1 -1
- package/node_modules/@engenty/wizards-shared/dist/marketplace.d.ts +16 -7
- package/node_modules/@engenty/wizards-shared/dist/marketplace.js +7 -23
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +15 -14
- package/node_modules/@engenty/wizards-shared/dist/run.js +30 -28
- package/node_modules/@engenty/wizards-shared/dist/runners.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/runners.js +5 -5
- package/node_modules/@engenty/wizards-shared/dist/sectors.d.ts +24 -0
- package/node_modules/@engenty/wizards-shared/dist/sectors.js +319 -0
- package/node_modules/@engenty/wizards-shared/dist/store.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/store.js +1 -2
- package/node_modules/@engenty/wizards-shared/dist/theme-look.d.ts +39 -0
- package/node_modules/@engenty/wizards-shared/dist/theme-look.js +112 -0
- package/node_modules/@engenty/wizards-shared/dist/theme.d.ts +0 -38
- package/node_modules/@engenty/wizards-shared/dist/theme.js +1 -108
- package/node_modules/@engenty/wizards-shared/dist/wizard-package.js +1 -0
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/runtime/dist/docs/dev/wizard-format/film-steps.md +0 -47
- package/apps/web/dist/assets/EditorPage-mx6XuEIw.js +0 -3
- package/apps/web/dist/assets/Marketplace-YEZDpGm9.js +0 -2
- package/apps/web/dist/assets/NewWizardPage-DSHVwwnU.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-CoBNtV_1.js +0 -1
- package/apps/web/dist/assets/PreviewPane-z0-Glj7p.js +0 -10
- package/apps/web/dist/assets/ProjectPage-DFaPSeda.js +0 -1
- package/apps/web/dist/assets/PublicRunner-DgT4CApp.js +0 -1
- package/apps/web/dist/assets/SettingsPage-FimvOhQq.js +0 -2
- package/apps/web/dist/assets/SetupPage-BxEMrMtA.js +0 -1
- package/apps/web/dist/assets/changelog-CS9GmnXd.js +0 -1
- package/apps/web/dist/assets/i18n-UTsgNY5M.js +0 -55
- package/apps/web/dist/assets/index-DHIXX69l.js +0 -20
- package/apps/web/dist/assets/index-Mt1sNdPx.css +0 -1
- package/apps/web/dist/assets/runners-CrSLA6HI.js +0 -1
- package/apps/web/dist/assets/session-CbWzkHl0.js +0 -2
- package/apps/web/dist/assets/settings-menu-DoRItnPf.js +0 -1
- package/apps/web/dist/assets/theme-znovbShL.js +0 -11
- /package/apps/runtime/dist/{film → motion-graphics}/skills.js +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LANGS, pluginToolOf, } from "./definition.js";
|
|
2
|
+
import { CAPABILITY_IDS } from "./fit.js";
|
|
2
3
|
import { textOf } from "./texts.js";
|
|
3
4
|
/**
|
|
4
5
|
* The marketplace: wizards anyone can start from. What an entry is sorted by — formats, industry,
|
|
@@ -42,23 +43,6 @@ export const USE_CASE_IDS = [
|
|
|
42
43
|
"inquiries",
|
|
43
44
|
"advice",
|
|
44
45
|
];
|
|
45
|
-
/**
|
|
46
|
-
* What the models and tools behind a wizard must be able to do. `film`: a film the installed
|
|
47
|
-
* client makes, only on a computer with Claude Code, on its subscription.
|
|
48
|
-
*/
|
|
49
|
-
export const CAPABILITY_IDS = [
|
|
50
|
-
"text",
|
|
51
|
-
"web",
|
|
52
|
-
"browser",
|
|
53
|
-
"documents",
|
|
54
|
-
"image",
|
|
55
|
-
"video",
|
|
56
|
-
"speech",
|
|
57
|
-
"listening",
|
|
58
|
-
"code",
|
|
59
|
-
"connectors",
|
|
60
|
-
"film",
|
|
61
|
-
];
|
|
62
46
|
export const COST_TIER_IDS = ["low", "medium", "high"];
|
|
63
47
|
/**
|
|
64
48
|
* The plan a wizard needs. Free runs on what every runtime has; Pro needs plugins, which come
|
|
@@ -105,7 +89,7 @@ const MARKET_EN = {
|
|
|
105
89
|
"capability.listening": "Understands voice notes",
|
|
106
90
|
"capability.code": "Runs code",
|
|
107
91
|
"capability.connectors": "Connected accounts & systems",
|
|
108
|
-
"capability.
|
|
92
|
+
"capability.motion-graphics": "Motion graphics with Claude Code (on your subscription)",
|
|
109
93
|
"cost.low": "low cost",
|
|
110
94
|
"cost.medium": "medium cost",
|
|
111
95
|
"cost.high": "high cost",
|
|
@@ -157,7 +141,7 @@ const MARKET_DE = {
|
|
|
157
141
|
"capability.listening": "Sprachnotizen verstehen",
|
|
158
142
|
"capability.code": "Code ausführen",
|
|
159
143
|
"capability.connectors": "Verbundene Konten & Systeme",
|
|
160
|
-
"capability.
|
|
144
|
+
"capability.motion-graphics": "Motion-Grafik mit Claude Code (auf deinem Abo)",
|
|
161
145
|
"cost.low": "günstig",
|
|
162
146
|
"cost.medium": "mittel",
|
|
163
147
|
"cost.high": "teuer",
|
|
@@ -268,8 +252,8 @@ export function capabilitiesOf(def) {
|
|
|
268
252
|
found.add("text");
|
|
269
253
|
}
|
|
270
254
|
}
|
|
271
|
-
else if (step.type === "
|
|
272
|
-
found.add("
|
|
255
|
+
else if (step.type === "motion-graphics") {
|
|
256
|
+
found.add("motion-graphics");
|
|
273
257
|
}
|
|
274
258
|
}
|
|
275
259
|
if (def.connections?.length) {
|
|
@@ -336,8 +320,8 @@ export function effortOf(def) {
|
|
|
336
320
|
else if (step.type === "widget" && step.video) {
|
|
337
321
|
seconds += 60;
|
|
338
322
|
}
|
|
339
|
-
else if (step.type === "
|
|
340
|
-
// A client writing a
|
|
323
|
+
else if (step.type === "motion-graphics") {
|
|
324
|
+
// A client writing a video from a style kit: ten minutes to half an hour (2026-10 tests).
|
|
341
325
|
seconds += 25 * 60;
|
|
342
326
|
}
|
|
343
327
|
}
|
|
@@ -189,9 +189,9 @@ declare const NOTES_EN: {
|
|
|
189
189
|
readonly found: "{label}: {name}";
|
|
190
190
|
readonly listen: "Listening to “{label}”…";
|
|
191
191
|
readonly listenFailed: "“{label}” couldn’t be transcribed.";
|
|
192
|
-
readonly
|
|
193
|
-
readonly
|
|
194
|
-
readonly
|
|
192
|
+
readonly motionCutting: "Rendering the video – this takes about a minute.";
|
|
193
|
+
readonly motionProgress: "{pct} % rendered";
|
|
194
|
+
readonly motionError: "The video reports: {detail}";
|
|
195
195
|
readonly widgetError: "The widget reports an error: {detail}";
|
|
196
196
|
readonly mcpConnected: "Connected to {names}";
|
|
197
197
|
readonly mcpUnreachable: "MCP server unreachable: {detail}";
|
|
@@ -235,18 +235,19 @@ declare const NOTES_EN: {
|
|
|
235
235
|
readonly one: "Filing {count} file";
|
|
236
236
|
readonly other: "Filing {count} files";
|
|
237
237
|
};
|
|
238
|
-
readonly
|
|
239
|
-
readonly
|
|
240
|
-
readonly
|
|
241
|
-
readonly
|
|
242
|
-
readonly
|
|
243
|
-
readonly
|
|
238
|
+
readonly motionSetup: "Setting up the folder for the video";
|
|
239
|
+
readonly motionClient: "{client} is working on the video – this usually takes 10–40 minutes.";
|
|
240
|
+
readonly motionTask: "On the video: {task}";
|
|
241
|
+
readonly motionLooks: "Looking at frames of the video";
|
|
242
|
+
readonly motionFix: "The video didn’t render – Claude Code is fixing it";
|
|
243
|
+
readonly motionResume: "Picking the video up where it stopped";
|
|
244
244
|
readonly wizardUnavailable: "This wizard isn’t available right now.";
|
|
245
245
|
readonly translationFailed: "This wizard can’t be translated right now. It’s shown as it was written.";
|
|
246
246
|
readonly translationOff: "This wizard is only offered as it was written.";
|
|
247
247
|
readonly translationPlaceholder: "The translation of “{text}” needs every placeholder in curly brackets the original has.";
|
|
248
248
|
readonly wizardLimit: "This wizard has reached its limit for today. Try again tomorrow.";
|
|
249
249
|
readonly guestBudget: "This page has reached its limit for today. Try again tomorrow.";
|
|
250
|
+
readonly wizardPaused: "This wizard is paused for now. Try again later.";
|
|
250
251
|
readonly confirmHuman: "Confirm that you’re a person.";
|
|
251
252
|
readonly tooManyRuns: "You’ve started a lot of runs just now. Try again in an hour.";
|
|
252
253
|
readonly clientRefused: "This app may not start runs here.";
|
|
@@ -318,7 +319,7 @@ declare const NOTES_EN: {
|
|
|
318
319
|
readonly noOpenaiApiKey: "No OpenAI API key is set for voice conversations (Settings → Models).";
|
|
319
320
|
readonly modelNotAvailableAccount: "This model isn’t available with your account.";
|
|
320
321
|
readonly accountNoModelSet: "Your account has no model set up for this.";
|
|
321
|
-
readonly
|
|
322
|
+
readonly claudeCodeMakesMotion: "Claude Code makes motion graphics on this computer, using your subscription. Set it up as an AI subscription under Settings → Models.";
|
|
322
323
|
readonly macNeedsFfmpegTranscribe: "This Mac needs ffmpeg to transcribe recordings from Chrome or Firefox (WebM, Ogg). Safari and the app don’t. Install ffmpeg, e.g. with “brew install ffmpeg”.";
|
|
323
324
|
readonly fieldRequired: "Required";
|
|
324
325
|
readonly chooseAtLeast: "Choose at least {min}";
|
|
@@ -448,14 +449,14 @@ declare const NOTES_EN: {
|
|
|
448
449
|
readonly itemChangedMeantime: "This was changed elsewhere in the meantime.";
|
|
449
450
|
readonly valueNotExist: "This value doesn’t exist.";
|
|
450
451
|
readonly nothingFiledUnderValue: "Nothing is filed under this value yet.";
|
|
451
|
-
readonly
|
|
452
|
+
readonly motionNotRenderedNeeds: "The video couldn’t be rendered. It needs ffmpeg and a timeline in the widget.";
|
|
452
453
|
readonly signInRefused: "The sign-in was refused{host}. Are the address and (app) password right? Gmail and Google Workspace need an app password and IMAP turned on.{answer}";
|
|
453
454
|
readonly serverSaid: " The server said: {answer}";
|
|
454
455
|
readonly viaAccountFailed: "Connecting through your engenty account didn’t work ({code}).";
|
|
455
456
|
readonly pluginInvalidInput: "“{id}” got invalid input: {path} – {problem}";
|
|
456
|
-
readonly
|
|
457
|
-
readonly
|
|
458
|
-
readonly
|
|
457
|
+
readonly motionClientStopped: "{name} stopped working on the video: {detail}. The work is saved. A new try carries on from there.";
|
|
458
|
+
readonly motionWorkSaved: "{problem} The work is saved. A new try carries on from there.";
|
|
459
|
+
readonly motionRenderFailed: "The video couldn’t be rendered: {detail}";
|
|
459
460
|
readonly commandNotStarted: "The command couldn’t start: {detail}";
|
|
460
461
|
readonly providerKeyMissing: "{provider} is chosen for {makes}, but no API key is set.";
|
|
461
462
|
readonly noModelFor: "No model is set up for {makes}.";
|
|
@@ -24,9 +24,9 @@ const NOTES_EN = {
|
|
|
24
24
|
found: "{label}: {name}",
|
|
25
25
|
listen: "Listening to “{label}”…",
|
|
26
26
|
listenFailed: "“{label}” couldn’t be transcribed.",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
motionCutting: "Rendering the video – this takes about a minute.",
|
|
28
|
+
motionProgress: "{pct} % rendered",
|
|
29
|
+
motionError: "The video reports: {detail}",
|
|
30
30
|
widgetError: "The widget reports an error: {detail}",
|
|
31
31
|
mcpConnected: "Connected to {names}",
|
|
32
32
|
mcpUnreachable: "MCP server unreachable: {detail}",
|
|
@@ -64,18 +64,19 @@ const NOTES_EN = {
|
|
|
64
64
|
},
|
|
65
65
|
remembers: "Remembering {title}",
|
|
66
66
|
files: { one: "Filing {count} file", other: "Filing {count} files" },
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
motionSetup: "Setting up the folder for the video",
|
|
68
|
+
motionClient: "{client} is working on the video – this usually takes 10–40 minutes.",
|
|
69
|
+
motionTask: "On the video: {task}",
|
|
70
|
+
motionLooks: "Looking at frames of the video",
|
|
71
|
+
motionFix: "The video didn’t render – Claude Code is fixing it",
|
|
72
|
+
motionResume: "Picking the video up where it stopped",
|
|
73
73
|
wizardUnavailable: "This wizard isn’t available right now.",
|
|
74
74
|
translationFailed: "This wizard can’t be translated right now. It’s shown as it was written.",
|
|
75
75
|
translationOff: "This wizard is only offered as it was written.",
|
|
76
76
|
translationPlaceholder: "The translation of “{text}” needs every placeholder in curly brackets the original has.",
|
|
77
77
|
wizardLimit: "This wizard has reached its limit for today. Try again tomorrow.",
|
|
78
78
|
guestBudget: "This page has reached its limit for today. Try again tomorrow.",
|
|
79
|
+
wizardPaused: "This wizard is paused for now. Try again later.",
|
|
79
80
|
confirmHuman: "Confirm that you’re a person.",
|
|
80
81
|
tooManyRuns: "You’ve started a lot of runs just now. Try again in an hour.",
|
|
81
82
|
clientRefused: "This app may not start runs here.",
|
|
@@ -147,7 +148,7 @@ const NOTES_EN = {
|
|
|
147
148
|
noOpenaiApiKey: "No OpenAI API key is set for voice conversations (Settings → Models).",
|
|
148
149
|
modelNotAvailableAccount: "This model isn’t available with your account.",
|
|
149
150
|
accountNoModelSet: "Your account has no model set up for this.",
|
|
150
|
-
|
|
151
|
+
claudeCodeMakesMotion: "Claude Code makes motion graphics on this computer, using your subscription. Set it up as an AI subscription under Settings → Models.",
|
|
151
152
|
macNeedsFfmpegTranscribe: "This Mac needs ffmpeg to transcribe recordings from Chrome or Firefox (WebM, Ogg). Safari and the app don’t. Install ffmpeg, e.g. with “brew install ffmpeg”.",
|
|
152
153
|
fieldRequired: "Required",
|
|
153
154
|
chooseAtLeast: "Choose at least {min}",
|
|
@@ -277,14 +278,14 @@ const NOTES_EN = {
|
|
|
277
278
|
itemChangedMeantime: "This was changed elsewhere in the meantime.",
|
|
278
279
|
valueNotExist: "This value doesn’t exist.",
|
|
279
280
|
nothingFiledUnderValue: "Nothing is filed under this value yet.",
|
|
280
|
-
|
|
281
|
+
motionNotRenderedNeeds: "The video couldn’t be rendered. It needs ffmpeg and a timeline in the widget.",
|
|
281
282
|
signInRefused: "The sign-in was refused{host}. Are the address and (app) password right? Gmail and Google Workspace need an app password and IMAP turned on.{answer}",
|
|
282
283
|
serverSaid: " The server said: {answer}",
|
|
283
284
|
viaAccountFailed: "Connecting through your engenty account didn’t work ({code}).",
|
|
284
285
|
pluginInvalidInput: "“{id}” got invalid input: {path} – {problem}",
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
motionClientStopped: "{name} stopped working on the video: {detail}. The work is saved. A new try carries on from there.",
|
|
287
|
+
motionWorkSaved: "{problem} The work is saved. A new try carries on from there.",
|
|
288
|
+
motionRenderFailed: "The video couldn’t be rendered: {detail}",
|
|
288
289
|
commandNotStarted: "The command couldn’t start: {detail}",
|
|
289
290
|
providerKeyMissing: "{provider} is chosen for {makes}, but no API key is set.",
|
|
290
291
|
noModelFor: "No model is set up for {makes}.",
|
|
@@ -334,9 +335,9 @@ const NOTES_DE = {
|
|
|
334
335
|
found: "{label}: {name}",
|
|
335
336
|
listen: "Hört „{label}“ an …",
|
|
336
337
|
listenFailed: "„{label}“ konnte nicht verschriftlicht werden.",
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
motionCutting: "Das Video wird gerendert – das dauert etwa eine Minute.",
|
|
339
|
+
motionProgress: "{pct} % gerendert",
|
|
340
|
+
motionError: "Das Video meldet: {detail}",
|
|
340
341
|
widgetError: "Das Widget meldet einen Fehler: {detail}",
|
|
341
342
|
mcpConnected: "Verbunden mit {names}",
|
|
342
343
|
mcpUnreachable: "MCP-Server nicht erreichbar: {detail}",
|
|
@@ -374,18 +375,19 @@ const NOTES_DE = {
|
|
|
374
375
|
},
|
|
375
376
|
remembers: "Merkt sich {title}",
|
|
376
377
|
files: { one: "Legt {count} Datei ab", other: "Legt {count} Dateien ab" },
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
378
|
+
motionSetup: "Richtet den Arbeitsordner für das Video ein",
|
|
379
|
+
motionClient: "{client} arbeitet am Video – das dauert meist 10–40 Minuten.",
|
|
380
|
+
motionTask: "Am Video: {task}",
|
|
381
|
+
motionLooks: "Sieht sich Bilder des Videos an",
|
|
382
|
+
motionFix: "Das Video ließ sich nicht rendern – Claude Code bessert nach",
|
|
383
|
+
motionResume: "Macht dort weiter, wo das Video stehen geblieben ist",
|
|
383
384
|
wizardUnavailable: "Dieser Wizard ist gerade nicht verfügbar.",
|
|
384
385
|
translationFailed: "Dieser Wizard lässt sich gerade nicht übersetzen. Du siehst ihn so, wie er geschrieben wurde.",
|
|
385
386
|
translationOff: "Diesen Wizard gibt es nur so, wie er geschrieben wurde.",
|
|
386
387
|
translationPlaceholder: "Die Übersetzung von „{text}“ braucht jeden Platzhalter in geschweiften Klammern, den das Original hat.",
|
|
387
388
|
wizardLimit: "Für heute ist das Limit dieses Wizards erreicht. Versuch es morgen wieder.",
|
|
388
389
|
guestBudget: "Für heute ist das Limit dieser Seite erreicht. Versuch es morgen wieder.",
|
|
390
|
+
wizardPaused: "Dieser Wizard ist gerade pausiert. Versuch es später wieder.",
|
|
389
391
|
confirmHuman: "Bestätige kurz, dass du ein Mensch bist.",
|
|
390
392
|
tooManyRuns: "Du hast gerade viele Läufe gestartet. Versuch es in einer Stunde wieder.",
|
|
391
393
|
clientRefused: "Diese App darf hier keine Läufe starten.",
|
|
@@ -457,7 +459,7 @@ const NOTES_DE = {
|
|
|
457
459
|
noOpenaiApiKey: "Für Sprachgespräche ist kein OpenAI-API-Key hinterlegt (Einstellungen → Modelle).",
|
|
458
460
|
modelNotAvailableAccount: "Dieses Modell gibt es mit deinem Konto nicht.",
|
|
459
461
|
accountNoModelSet: "Dafür ist bei deinem Konto kein Modell eingerichtet.",
|
|
460
|
-
|
|
462
|
+
claudeCodeMakesMotion: "Motion-Grafik macht Claude Code auf diesem Computer mit deinem Abo. Richte es unter Einstellungen → Modelle als KI-Abo ein.",
|
|
461
463
|
macNeedsFfmpegTranscribe: "Aufnahmen aus Chrome oder Firefox (WebM, Ogg) schreibt dieser Mac erst mit ffmpeg auf. Safari und die App brauchen es nicht. Installiere ffmpeg, z. B. mit „brew install ffmpeg“.",
|
|
462
464
|
fieldRequired: "Pflichtfeld",
|
|
463
465
|
chooseAtLeast: "Wähl mindestens {min} aus",
|
|
@@ -587,14 +589,14 @@ const NOTES_DE = {
|
|
|
587
589
|
itemChangedMeantime: "Das wurde inzwischen anderswo geändert.",
|
|
588
590
|
valueNotExist: "Diesen Wert gibt es nicht.",
|
|
589
591
|
nothingFiledUnderValue: "Unter diesem Wert steht noch nichts.",
|
|
590
|
-
|
|
592
|
+
motionNotRenderedNeeds: "Das Video ließ sich nicht rendern. Dafür braucht es ffmpeg und eine Zeitleiste im Widget.",
|
|
591
593
|
signInRefused: "Anmeldung abgelehnt{host}. Stimmen Adresse und (App-)Passwort? Gmail und Google Workspace brauchen ein App-Passwort und eingeschaltetes IMAP.{answer}",
|
|
592
594
|
serverSaid: " Antwort des Servers: {answer}",
|
|
593
595
|
viaAccountFailed: "Verbinden über dein engenty-Konto hat nicht geklappt ({code}).",
|
|
594
596
|
pluginInvalidInput: "„{id}“ bekam ungültige Angaben: {path} – {problem}",
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
597
|
+
motionClientStopped: "{name} hat beim Video aufgehört: {detail}. Die Arbeit ist gespeichert. Ein neuer Versuch macht dort weiter.",
|
|
598
|
+
motionWorkSaved: "{problem} Die Arbeit ist gespeichert. Ein neuer Versuch macht dort weiter.",
|
|
599
|
+
motionRenderFailed: "Das Video ließ sich nicht rendern: {detail}",
|
|
598
600
|
commandNotStarted: "Der Befehl konnte nicht starten: {detail}",
|
|
599
601
|
providerKeyMissing: "Für {makes} ist {provider} gewählt, aber kein API-Key hinterlegt.",
|
|
600
602
|
noModelFor: "Für {makes} ist kein Modell eingerichtet.",
|
|
@@ -5,7 +5,7 @@ import { type AssetKind, type FieldKind, type Step, type WizardDefinition } from
|
|
|
5
5
|
* per wizard which runners run it fully, which hand off at some step, and which cannot.
|
|
6
6
|
*/
|
|
7
7
|
/** What a step hands on, by the shape a runner has to carry: a text, a picture, a file, a view. */
|
|
8
|
-
export type OutputKind = AssetKind | "text" | "data" | "widget" | "
|
|
8
|
+
export type OutputKind = AssetKind | "text" | "data" | "widget" | "motion-graphics" | "surface";
|
|
9
9
|
export declare const OUTPUT_KINDS: OutputKind[];
|
|
10
10
|
export interface RunnerCapabilities {
|
|
11
11
|
/** The field kinds the runner asks itself; the rest need another runner. */
|
|
@@ -8,7 +8,7 @@ export const OUTPUT_KINDS = [
|
|
|
8
8
|
"document",
|
|
9
9
|
"dashboard",
|
|
10
10
|
"widget",
|
|
11
|
-
"
|
|
11
|
+
"motion-graphics",
|
|
12
12
|
"surface",
|
|
13
13
|
];
|
|
14
14
|
export const RUNNER_ID = /^[a-z][a-z0-9-]{0,23}$/;
|
|
@@ -72,9 +72,9 @@ export function outputKindOf(step) {
|
|
|
72
72
|
case "generate":
|
|
73
73
|
return step.asset;
|
|
74
74
|
case "widget":
|
|
75
|
-
return step.video ? "
|
|
76
|
-
case "
|
|
77
|
-
return "
|
|
75
|
+
return step.video ? "motion-graphics" : "widget";
|
|
76
|
+
case "motion-graphics":
|
|
77
|
+
return "motion-graphics";
|
|
78
78
|
case "surface":
|
|
79
79
|
return "surface";
|
|
80
80
|
default:
|
|
@@ -83,7 +83,7 @@ export function outputKindOf(step) {
|
|
|
83
83
|
}
|
|
84
84
|
/** Steps that take minutes: a door that cannot wait must come back for them. */
|
|
85
85
|
function takesMinutes(step) {
|
|
86
|
-
return step.type === "agent" || step.type === "generate" || step.type === "
|
|
86
|
+
return step.type === "agent" || step.type === "generate" || step.type === "motion-graphics";
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Whether a runner runs a wizard, and where it hands off. Every step counts: since the AI can
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Industry } from "./marketplace.js";
|
|
2
|
+
/**
|
|
3
|
+
* The sectors the template catalogs are built for: “Wizards für Bäckereien”, “Wizards für
|
|
4
|
+
* Kanzleien”. The studio's first visit picks one for the organization, and the new-wizard page
|
|
5
|
+
* puts the templates of its sector first. Each belongs to one of the catalog's broad industries.
|
|
6
|
+
*/
|
|
7
|
+
export interface Sector {
|
|
8
|
+
id: string;
|
|
9
|
+
industry: Industry;
|
|
10
|
+
/** The plural, as a catalog names its people: “Bäckereien”, “Bakeries”. */
|
|
11
|
+
name: {
|
|
12
|
+
de: string;
|
|
13
|
+
en: string;
|
|
14
|
+
};
|
|
15
|
+
/** Words that point to it, lower case, in both languages: a site's text, the answers. */
|
|
16
|
+
words: string[];
|
|
17
|
+
}
|
|
18
|
+
export declare const SECTORS: Sector[];
|
|
19
|
+
export declare const sectorOf: (id: string | null | undefined) => Sector | null;
|
|
20
|
+
/**
|
|
21
|
+
* The sectors a text points to, the best first: each word of a sector found in the text counts,
|
|
22
|
+
* a longer word more. Nothing where no word is found.
|
|
23
|
+
*/
|
|
24
|
+
export declare function matchSectors(text: string, most?: number): string[];
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
export const SECTORS = [
|
|
2
|
+
{
|
|
3
|
+
id: "bakeries",
|
|
4
|
+
industry: "gastronomy",
|
|
5
|
+
name: { de: "Bäckereien", en: "Bakeries" },
|
|
6
|
+
words: [
|
|
7
|
+
"bäckerei",
|
|
8
|
+
"bäcker",
|
|
9
|
+
"backstube",
|
|
10
|
+
"brot",
|
|
11
|
+
"gebäck",
|
|
12
|
+
"konditorei",
|
|
13
|
+
"bakery",
|
|
14
|
+
"bread",
|
|
15
|
+
"pastry",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "cafes",
|
|
20
|
+
industry: "gastronomy",
|
|
21
|
+
name: { de: "Cafés", en: "Cafés" },
|
|
22
|
+
words: ["café", "cafe", "kaffeehaus", "kaffee", "coffee", "espresso"],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "restaurants",
|
|
26
|
+
industry: "gastronomy",
|
|
27
|
+
name: { de: "Restaurants", en: "Restaurants" },
|
|
28
|
+
words: [
|
|
29
|
+
"restaurant",
|
|
30
|
+
"gasthaus",
|
|
31
|
+
"gasthof",
|
|
32
|
+
"wirtshaus",
|
|
33
|
+
"pizzeria",
|
|
34
|
+
"küche",
|
|
35
|
+
"speisekarte",
|
|
36
|
+
"menu",
|
|
37
|
+
"bistro",
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "hotels",
|
|
42
|
+
industry: "hospitality",
|
|
43
|
+
name: { de: "Hotels und Pensionen", en: "Hotels and guesthouses" },
|
|
44
|
+
words: [
|
|
45
|
+
"hotel",
|
|
46
|
+
"pension",
|
|
47
|
+
"zimmer",
|
|
48
|
+
"übernachtung",
|
|
49
|
+
"ferienwohnung",
|
|
50
|
+
"guesthouse",
|
|
51
|
+
"booking",
|
|
52
|
+
"rooms",
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "architects",
|
|
57
|
+
industry: "professional",
|
|
58
|
+
name: { de: "Architekturbüros", en: "Architects" },
|
|
59
|
+
words: ["architekt", "architektur", "planung", "entwurf", "architect", "architecture"],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "lawFirms",
|
|
63
|
+
industry: "professional",
|
|
64
|
+
name: { de: "Kanzleien", en: "Law firms" },
|
|
65
|
+
words: [
|
|
66
|
+
"rechtsanwalt",
|
|
67
|
+
"anwalt",
|
|
68
|
+
"kanzlei",
|
|
69
|
+
"recht",
|
|
70
|
+
"notar",
|
|
71
|
+
"law firm",
|
|
72
|
+
"lawyer",
|
|
73
|
+
"attorney",
|
|
74
|
+
"legal",
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "taxAdvisors",
|
|
79
|
+
industry: "professional",
|
|
80
|
+
name: { de: "Steuerberatung", en: "Tax advisors" },
|
|
81
|
+
words: [
|
|
82
|
+
"steuerberatung",
|
|
83
|
+
"steuerberater",
|
|
84
|
+
"steuer",
|
|
85
|
+
"buchhaltung",
|
|
86
|
+
"lohnverrechnung",
|
|
87
|
+
"bilanz",
|
|
88
|
+
"tax",
|
|
89
|
+
"accounting",
|
|
90
|
+
"bookkeeping",
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "consultants",
|
|
95
|
+
industry: "professional",
|
|
96
|
+
name: { de: "Beratung", en: "Consultants" },
|
|
97
|
+
words: ["beratung", "berater", "consulting", "coaching", "consultant"],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "physiotherapy",
|
|
101
|
+
industry: "health",
|
|
102
|
+
name: { de: "Physiotherapie", en: "Physiotherapy" },
|
|
103
|
+
words: ["physiotherapie", "physio", "massage", "therapie", "physiotherapy"],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "practices",
|
|
107
|
+
industry: "health",
|
|
108
|
+
name: { de: "Arztpraxen", en: "Doctors’ practices" },
|
|
109
|
+
words: ["arzt", "ärztin", "praxis", "ordination", "zahnarzt", "doctor", "clinic", "dentist"],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "hairdressers",
|
|
113
|
+
industry: "retail",
|
|
114
|
+
name: { de: "Friseur und Kosmetik", en: "Hair and beauty" },
|
|
115
|
+
words: ["friseur", "frisör", "kosmetik", "nagelstudio", "beauty", "hairdresser", "salon"],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "joiners",
|
|
119
|
+
industry: "trades",
|
|
120
|
+
name: { de: "Tischlereien", en: "Joiners" },
|
|
121
|
+
words: [
|
|
122
|
+
"tischlerei",
|
|
123
|
+
"tischler",
|
|
124
|
+
"schreiner",
|
|
125
|
+
"möbel",
|
|
126
|
+
"holz",
|
|
127
|
+
"joinery",
|
|
128
|
+
"carpenter",
|
|
129
|
+
"furniture",
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "electricians",
|
|
134
|
+
industry: "trades",
|
|
135
|
+
name: { de: "Elektrotechnik", en: "Electricians" },
|
|
136
|
+
words: ["elektriker", "elektro", "elektrotechnik", "photovoltaik", "electrician", "electrical"],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: "plumbing",
|
|
140
|
+
industry: "trades",
|
|
141
|
+
name: { de: "Installateure", en: "Plumbing and heating" },
|
|
142
|
+
words: ["installateur", "sanitär", "heizung", "klima", "plumber", "plumbing", "heating"],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "windows",
|
|
146
|
+
industry: "trades",
|
|
147
|
+
name: { de: "Fensterbau", en: "Window makers" },
|
|
148
|
+
words: ["fenster", "türen", "fensterbau", "sonnenschutz", "windows", "doors"],
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: "construction",
|
|
152
|
+
industry: "trades",
|
|
153
|
+
name: { de: "Bau und Handwerk", en: "Building and trades" },
|
|
154
|
+
words: [
|
|
155
|
+
"bau",
|
|
156
|
+
"baumeister",
|
|
157
|
+
"maler",
|
|
158
|
+
"dachdecker",
|
|
159
|
+
"handwerk",
|
|
160
|
+
"construction",
|
|
161
|
+
"builder",
|
|
162
|
+
"painter",
|
|
163
|
+
"roofer",
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "realEstate",
|
|
168
|
+
industry: "realEstate",
|
|
169
|
+
name: { de: "Immobilien", en: "Real estate" },
|
|
170
|
+
words: [
|
|
171
|
+
"immobilien",
|
|
172
|
+
"makler",
|
|
173
|
+
"wohnung",
|
|
174
|
+
"miete",
|
|
175
|
+
"hausverwaltung",
|
|
176
|
+
"real estate",
|
|
177
|
+
"property",
|
|
178
|
+
"estate agent",
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: "onlineShops",
|
|
183
|
+
industry: "retail",
|
|
184
|
+
name: { de: "Online-Shops", en: "Online shops" },
|
|
185
|
+
words: [
|
|
186
|
+
"online-shop",
|
|
187
|
+
"onlineshop",
|
|
188
|
+
"shop",
|
|
189
|
+
"versand",
|
|
190
|
+
"e-commerce",
|
|
191
|
+
"webshop",
|
|
192
|
+
"online store",
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: "retail",
|
|
197
|
+
industry: "retail",
|
|
198
|
+
name: { de: "Handel", en: "Retail" },
|
|
199
|
+
words: ["geschäft", "handel", "laden", "boutique", "retail", "store"],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
id: "agencies",
|
|
203
|
+
industry: "agency",
|
|
204
|
+
name: { de: "Agenturen", en: "Agencies" },
|
|
205
|
+
words: [
|
|
206
|
+
"agentur",
|
|
207
|
+
"werbung",
|
|
208
|
+
"marketing",
|
|
209
|
+
"design",
|
|
210
|
+
"kommunikation",
|
|
211
|
+
"agency",
|
|
212
|
+
"advertising",
|
|
213
|
+
"branding",
|
|
214
|
+
],
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: "photographers",
|
|
218
|
+
industry: "agency",
|
|
219
|
+
name: { de: "Fotografie", en: "Photographers" },
|
|
220
|
+
words: ["fotograf", "fotografie", "foto", "photographer", "photography"],
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: "events",
|
|
224
|
+
industry: "events",
|
|
225
|
+
name: { de: "Veranstaltungen", en: "Events" },
|
|
226
|
+
words: ["event", "veranstaltung", "hochzeit", "catering", "konferenz", "wedding", "conference"],
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: "itServices",
|
|
230
|
+
industry: "professional",
|
|
231
|
+
name: { de: "IT-Dienstleister", en: "IT services" },
|
|
232
|
+
words: [
|
|
233
|
+
"it-dienstleister",
|
|
234
|
+
"it-service",
|
|
235
|
+
"software",
|
|
236
|
+
"webentwicklung",
|
|
237
|
+
"hosting",
|
|
238
|
+
"netzwerk",
|
|
239
|
+
"development",
|
|
240
|
+
"web design",
|
|
241
|
+
],
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
id: "cleaning",
|
|
245
|
+
industry: "trades",
|
|
246
|
+
name: { de: "Reinigung", en: "Cleaning" },
|
|
247
|
+
words: ["reinigung", "gebäudereinigung", "putz", "cleaning", "janitorial"],
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
id: "footballClubs",
|
|
251
|
+
industry: "any",
|
|
252
|
+
name: { de: "Fußballvereine", en: "Football clubs" },
|
|
253
|
+
words: ["fußball", "fussball", "fc", "sv", "kicker", "football", "soccer"],
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: "sportsClubs",
|
|
257
|
+
industry: "any",
|
|
258
|
+
name: { de: "Sportvereine", en: "Sports clubs" },
|
|
259
|
+
words: ["sportverein", "verein", "turnen", "tennis", "laufen", "sport", "club"],
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: "musicClubs",
|
|
263
|
+
industry: "events",
|
|
264
|
+
name: { de: "Musikvereine und Chöre", en: "Music clubs and choirs" },
|
|
265
|
+
words: ["musikverein", "blasmusik", "chor", "kapelle", "orchester", "band", "choir", "music"],
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: "fireBrigades",
|
|
269
|
+
industry: "publicSector",
|
|
270
|
+
name: { de: "Feuerwehren", en: "Fire brigades" },
|
|
271
|
+
words: ["feuerwehr", "rettung", "rotes kreuz", "fire brigade", "rescue"],
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
id: "schools",
|
|
275
|
+
industry: "publicSector",
|
|
276
|
+
name: { de: "Schulen und Bildung", en: "Schools and education" },
|
|
277
|
+
words: [
|
|
278
|
+
"schule",
|
|
279
|
+
"kurs",
|
|
280
|
+
"weiterbildung",
|
|
281
|
+
"akademie",
|
|
282
|
+
"nachhilfe",
|
|
283
|
+
"school",
|
|
284
|
+
"course",
|
|
285
|
+
"training",
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: "municipalities",
|
|
290
|
+
industry: "publicSector",
|
|
291
|
+
name: { de: "Gemeinden", en: "Municipalities" },
|
|
292
|
+
words: ["gemeinde", "stadt", "bürgerservice", "amt", "municipality", "council", "town"],
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
id: "associations",
|
|
296
|
+
industry: "any",
|
|
297
|
+
name: { de: "Vereine und Initiativen", en: "Associations" },
|
|
298
|
+
words: ["verein", "initiative", "ehrenamt", "verband", "association", "nonprofit", "charity"],
|
|
299
|
+
},
|
|
300
|
+
];
|
|
301
|
+
export const sectorOf = (id) => SECTORS.find((s) => s.id === id) ?? null;
|
|
302
|
+
/**
|
|
303
|
+
* The sectors a text points to, the best first: each word of a sector found in the text counts,
|
|
304
|
+
* a longer word more. Nothing where no word is found.
|
|
305
|
+
*/
|
|
306
|
+
export function matchSectors(text, most = 3) {
|
|
307
|
+
const hay = ` ${text
|
|
308
|
+
.toLowerCase()
|
|
309
|
+
.normalize("NFC")
|
|
310
|
+
.replace(/[^\p{L}\p{N}-]+/gu, " ")} `;
|
|
311
|
+
return SECTORS.map((s) => ({
|
|
312
|
+
id: s.id,
|
|
313
|
+
score: s.words.reduce((sum, w) => sum + (hay.includes(` ${w}`) ? Math.min(3, w.length / 4) : 0), 0),
|
|
314
|
+
}))
|
|
315
|
+
.filter((x) => x.score > 0)
|
|
316
|
+
.sort((a, b) => b.score - a.score)
|
|
317
|
+
.slice(0, most)
|
|
318
|
+
.map((x) => x.id);
|
|
319
|
+
}
|