@widgetic/workflows 0.2.14 → 0.2.16
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 +117 -3
- package/dist/api/types.d.ts +17 -0
- package/dist/api/workflowsApi.d.ts +12 -1
- package/dist/api/workflowsApi.js +37 -0
- package/dist/assistant/assistantEvents.d.ts +44 -2
- package/dist/assistant/assistantEvents.js +58 -2
- package/dist/assistant/assistantReferences.d.ts +66 -0
- package/dist/assistant/assistantReferences.js +109 -0
- package/dist/assistant/assistantSaveMode.d.ts +15 -3
- package/dist/assistant/assistantSaveMode.js +16 -2
- package/dist/assistant/assistantSeed.d.ts +55 -0
- package/dist/assistant/assistantSeed.js +90 -0
- package/dist/assistant/assistantStream.js +81 -3
- package/dist/assistant/assistantSuggest.d.ts +18 -0
- package/dist/assistant/assistantSuggest.js +21 -0
- package/dist/assistant/assistantTurns.d.ts +75 -0
- package/dist/assistant/assistantTurns.js +56 -0
- package/dist/assistant/attachmentUploads.d.ts +42 -0
- package/dist/assistant/attachmentUploads.js +69 -0
- package/dist/assistant/canvasLink.d.ts +30 -0
- package/dist/assistant/canvasLink.js +51 -0
- package/dist/assistant/compositionMention.d.ts +18 -0
- package/dist/assistant/compositionMention.js +47 -0
- package/dist/assistant/liveData.d.ts +150 -0
- package/dist/assistant/liveData.js +286 -0
- package/dist/assistant/mcpMention.d.ts +20 -0
- package/dist/assistant/mcpMention.js +30 -0
- package/dist/assistant/mentionEntries.d.ts +39 -0
- package/dist/assistant/mentionEntries.js +69 -0
- package/dist/assistant/planFlow.d.ts +26 -0
- package/dist/assistant/planFlow.js +57 -0
- package/dist/assistant/templateDestinations.d.ts +37 -0
- package/dist/assistant/templateDestinations.js +64 -0
- package/dist/assistant/types.d.ts +99 -2
- package/dist/assistant/workflowPlanViewModel.d.ts +13 -2
- package/dist/assistant/workflowPlanViewModel.js +9 -1
- package/dist/components/Workflows.svelte +7 -1
- package/dist/components/WorkflowsWorkspace.svelte +29 -1
- package/dist/components/WorkflowsWorkspace.svelte.d.ts +3 -0
- package/dist/components/assistant/AssistantPlanStepRow.svelte +56 -0
- package/dist/components/assistant/AssistantPlanStepRow.svelte.d.ts +9 -0
- package/dist/components/assistant/CompositionMentionMenu.svelte +135 -0
- package/dist/components/assistant/CompositionMentionMenu.svelte.d.ts +9 -0
- package/dist/components/assistant/DataPreviewCard.svelte +108 -0
- package/dist/components/assistant/DataPreviewCard.svelte.d.ts +7 -0
- package/dist/components/assistant/PlanBindingsBlock.svelte +200 -0
- package/dist/components/assistant/PlanBindingsBlock.svelte.d.ts +14 -0
- package/dist/components/assistant/TemplateProjectCard.svelte +81 -0
- package/dist/components/assistant/TemplateProjectCard.svelte.d.ts +14 -0
- package/dist/components/assistant/WorkflowAssistantPanel.svelte +1045 -147
- package/dist/components/assistant/WorkflowAssistantPanel.svelte.d.ts +5 -0
- package/dist/components/canvas/CanvasContextMenu.svelte +199 -0
- package/dist/components/canvas/CanvasContextMenu.svelte.d.ts +16 -0
- package/dist/components/canvas/CompositionNodeView.svelte +7 -2
- package/dist/components/canvas/ConditionNodeView.svelte +5 -1
- package/dist/components/canvas/HandlePoint.svelte +25 -3
- package/dist/components/canvas/WorkflowCanvas.svelte +351 -12
- package/dist/components/canvas/WorkflowCanvas.svelte.d.ts +12 -1
- package/dist/components/canvas/altDragDuplicateController.d.ts +29 -0
- package/dist/components/canvas/altDragDuplicateController.js +92 -0
- package/dist/components/canvas/connectionSnapController.d.ts +29 -0
- package/dist/components/canvas/connectionSnapController.js +182 -0
- package/dist/components/canvas/spacePanController.d.ts +16 -0
- package/dist/components/canvas/spacePanController.js +103 -0
- package/dist/components/editor/EditorCanvasArea.svelte +98 -4
- package/dist/components/editor/EditorCanvasArea.svelte.d.ts +5 -0
- package/dist/components/editor/EditorLoadFailure.svelte +53 -0
- package/dist/components/editor/EditorLoadFailure.svelte.d.ts +7 -0
- package/dist/components/editor/EditorTopBar.svelte +53 -42
- package/dist/components/editor/WorkflowEditor.svelte +74 -50
- package/dist/components/editor/WorkflowEditor.svelte.d.ts +5 -0
- package/dist/components/editor/WorkflowNameControl.svelte +9 -8
- package/dist/components/editor/WorkflowNameControl.svelte.d.ts +3 -1
- package/dist/components/list/WorkflowList.svelte +43 -41
- package/dist/components/list/WorkflowList.svelte.d.ts +5 -0
- package/dist/components/panel/CompositionForm.svelte +3 -2
- package/dist/components/panel/CompositionPicker.svelte +25 -23
- package/dist/components/panel/CompositionPicker.svelte.d.ts +2 -2
- package/dist/components/panel/CompositionSelect.svelte +4 -4
- package/dist/components/panel/CompositionSelect.svelte.d.ts +2 -2
- package/dist/components/ui/ErrorState.svelte +43 -0
- package/dist/components/ui/ErrorState.svelte.d.ts +13 -0
- package/dist/components/ui/icons.d.ts +8 -0
- package/dist/components/ui/icons.js +24 -1
- package/dist/editor/apiErrorText.d.ts +2 -0
- package/dist/editor/apiErrorText.js +15 -0
- package/dist/editor/autoLayout.d.ts +38 -0
- package/dist/editor/autoLayout.js +403 -0
- package/dist/editor/blockClipboard.svelte.d.ts +9 -0
- package/dist/editor/blockClipboard.svelte.js +24 -0
- package/dist/editor/blockCopy.d.ts +39 -0
- package/dist/editor/blockCopy.js +137 -0
- package/dist/editor/canvasMenu.d.ts +45 -0
- package/dist/editor/canvasMenu.js +68 -0
- package/dist/editor/connectionSnap.d.ts +90 -0
- package/dist/editor/connectionSnap.js +98 -0
- package/dist/editor/editorState.svelte.d.ts +122 -13
- package/dist/editor/editorState.svelte.js +262 -22
- package/dist/editor/graphIssues.d.ts +5 -0
- package/dist/editor/graphIssues.js +18 -0
- package/dist/editor/graphModel.d.ts +6 -1
- package/dist/editor/graphModel.js +8 -1
- package/dist/editor/keyHints.d.ts +21 -0
- package/dist/editor/keyHints.js +30 -0
- package/dist/editor/listState.svelte.d.ts +4 -4
- package/dist/editor/listState.svelte.js +3 -1
- package/dist/editor/staleGuard.d.ts +111 -0
- package/dist/editor/staleGuard.js +279 -0
- package/dist/i18n/language.d.ts +3 -3
- package/dist/i18n/messages.d.ts +85 -1
- package/dist/i18n/messages.js +99 -4
- package/dist/index.d.ts +1 -0
- package/dist/types/index.d.ts +19 -2
- package/package.json +10 -10
package/dist/i18n/messages.js
CHANGED
|
@@ -33,6 +33,8 @@ export const WORKFLOWS_MESSAGES = {
|
|
|
33
33
|
'workflows.error.title': 'Workflows could not be shown',
|
|
34
34
|
'workflows.error.hint': 'Something went wrong while this screen was being drawn.',
|
|
35
35
|
'workflows.error.retry': 'Try again',
|
|
36
|
+
// The title of the open workflow's error state (Figma "Error State"); the line under it is the reason, one of the messages below.
|
|
37
|
+
'workflows.error.openTitle': 'This workflow could not be opened',
|
|
36
38
|
'workflows.error.generic': 'Something went wrong. Try again.',
|
|
37
39
|
'workflows.error.network': 'You seem to be offline. Check your connection and try again.',
|
|
38
40
|
'workflows.error.timeout': 'The request took too long. Try again.',
|
|
@@ -57,6 +59,10 @@ export const WORKFLOWS_MESSAGES = {
|
|
|
57
59
|
'workflows.list.newWorkflow': 'New workflow',
|
|
58
60
|
'workflows.list.searchLabel': 'Search workflows',
|
|
59
61
|
'workflows.list.searchPlaceholder': 'Search by name',
|
|
62
|
+
/** The button that empties the search field (it shows once there are words in it). */
|
|
63
|
+
'workflows.list.clearSearch': 'Clear search',
|
|
64
|
+
'workflows.list.recentSearches': 'Recent searches',
|
|
65
|
+
'workflows.list.clearRecentSearches': 'Clear',
|
|
60
66
|
'workflows.list.filterLabel': 'Show',
|
|
61
67
|
'workflows.list.filterAll': 'All',
|
|
62
68
|
/** On a narrow screen, the select that picks the same status tabs as on a wide screen. */
|
|
@@ -165,6 +171,10 @@ export const WORKFLOWS_MESSAGES = {
|
|
|
165
171
|
'workflows.editor.discarded': 'Changes discarded. The draft matches the live version again.',
|
|
166
172
|
'workflows.editor.restored': 'Version {number} was copied into the draft. Publish to make it live.',
|
|
167
173
|
'workflows.editor.reloaded': 'Loaded the latest version.',
|
|
174
|
+
/** The overlay over the editor while a tab that came back takes the draft that was saved somewhere else (assistant, MCP, another tab). */
|
|
175
|
+
'workflows.stale.updating': 'Updating to the latest version…',
|
|
176
|
+
'workflows.stale.updatingDescription': 'This workflow was changed somewhere else.',
|
|
177
|
+
'workflows.editor.assistantChanged': 'The assistant changed the draft. Undo takes it back. Nothing is live until you publish.',
|
|
168
178
|
'workflows.editor.paused': 'The workflow is paused.',
|
|
169
179
|
'workflows.editor.resumed': 'The workflow is live again.',
|
|
170
180
|
'workflows.editor.archived': 'The workflow is archived.',
|
|
@@ -172,6 +182,7 @@ export const WORKFLOWS_MESSAGES = {
|
|
|
172
182
|
'workflows.editor.saveFirst': 'Wait until your changes are saved, then try again.',
|
|
173
183
|
'workflows.editor.fixProblems': '{count, plural, one {Fix # problem before publishing.} other {Fix # problems before publishing.}}',
|
|
174
184
|
'workflows.editor.blockLimit': 'A workflow can have at most {max} blocks.',
|
|
185
|
+
'workflows.editor.connectionLimit': 'A workflow can have at most {max} connections.',
|
|
175
186
|
'workflows.publish.firstTitle': 'Publish this workflow?',
|
|
176
187
|
'workflows.publish.firstMessage': 'Embeds that use it start moving visitors between your compositions.',
|
|
177
188
|
'workflows.publish.changesTitle': 'Publish your changes?',
|
|
@@ -183,6 +194,18 @@ export const WORKFLOWS_MESSAGES = {
|
|
|
183
194
|
'workflows.canvas.label': 'Workflow canvas',
|
|
184
195
|
'workflows.canvas.pointIn': 'Incoming connection point',
|
|
185
196
|
'workflows.canvas.pointOut': 'Outgoing connection point',
|
|
197
|
+
// The menu a right click opens on the canvas (the same rows as the Widgetic canvas has, plus the two for the lines)
|
|
198
|
+
'workflows.canvasMenu.label': 'Canvas actions',
|
|
199
|
+
'workflows.canvasMenu.cut': 'Cut',
|
|
200
|
+
'workflows.canvasMenu.copy': 'Copy',
|
|
201
|
+
'workflows.canvasMenu.paste': 'Paste',
|
|
202
|
+
'workflows.canvasMenu.duplicate': 'Duplicate',
|
|
203
|
+
'workflows.canvasMenu.selectAll': 'Select all',
|
|
204
|
+
'workflows.canvasMenu.delete': 'Delete',
|
|
205
|
+
'workflows.canvasMenu.organise': 'Organise',
|
|
206
|
+
'workflows.canvasMenu.disconnect': 'Disconnect',
|
|
207
|
+
/** The word for the shortcut key on Windows and Linux; a Mac's menu says Cmd. */
|
|
208
|
+
'workflows.key.ctrl': 'Ctrl',
|
|
186
209
|
'workflows.toolbar.label': 'Canvas tools',
|
|
187
210
|
'workflows.toolbar.addBlock': 'Add block',
|
|
188
211
|
'workflows.toolbar.undo': 'Undo',
|
|
@@ -475,7 +498,9 @@ export const WORKFLOWS_MESSAGES = {
|
|
|
475
498
|
'workflows.issue.noStart': 'Choose the composition that starts the workflow.',
|
|
476
499
|
'workflows.issue.manyStarts': 'Only one composition can start the workflow.',
|
|
477
500
|
'workflows.issue.compositionMissingId': '{block} has no composition chosen.',
|
|
478
|
-
|
|
501
|
+
// The engine no longer reports this (the same composition may sit on several blocks; `graphIssues.ts` leaves it out
|
|
502
|
+
// for an engine that still does). The sentence stays so that the mapping of every code of the engine is complete.
|
|
503
|
+
'workflows.issue.duplicateComposition': '{block} shows a composition that another block shows too.',
|
|
479
504
|
'workflows.issue.compositionNotAvailable': '{block} is not available. It may have been deleted or is not published.',
|
|
480
505
|
'workflows.issue.compositionWebsiteMismatch': '{block} is not allowed on the website where the embed is shown. Check its allowed websites.',
|
|
481
506
|
'workflows.issue.unreachableBlock': '{block} cannot be reached from the start.',
|
|
@@ -519,7 +544,8 @@ export const WORKFLOWS_MESSAGES = {
|
|
|
519
544
|
'workflows.assistant.emptyCanvas': 'Describe what you want to build, or ask for ideas.',
|
|
520
545
|
'workflows.assistant.openAssistant': 'Open assistant',
|
|
521
546
|
'workflows.assistant.toolbarButton': 'Assistant',
|
|
522
|
-
'workflows.assistant.planNote': '
|
|
547
|
+
'workflows.assistant.planNote': 'The new widgets are added to this workflow and what is already here stays. If they cannot be added, I make a new workflow and leave this one as it is.',
|
|
548
|
+
'workflows.assistant.planFlow': 'The widgets of the workflow, in the order a visitor meets them',
|
|
523
549
|
'workflows.assistant.chipIdeas': 'Give me ideas',
|
|
524
550
|
'workflows.assistant.chipLeads': 'Capture leads',
|
|
525
551
|
'workflows.assistant.submit': 'Submit',
|
|
@@ -527,20 +553,89 @@ export const WORKFLOWS_MESSAGES = {
|
|
|
527
553
|
'workflows.assistant.createWorkflow': 'Create workflow',
|
|
528
554
|
'workflows.assistant.notNow': 'Not now',
|
|
529
555
|
'workflows.assistant.ready': 'Your workflow is ready.',
|
|
556
|
+
'workflows.assistant.updatedOpen': 'The new widgets are in your workflow, next to what was already there. Nothing is live until you publish.',
|
|
530
557
|
'workflows.assistant.createdNew': 'I created a new workflow so your current one stays untouched.',
|
|
531
|
-
'workflows.assistant.openInEditor': 'Open in editor',
|
|
532
558
|
'workflows.assistant.attachFiles': 'Attach files',
|
|
533
559
|
'workflows.assistant.libraryHint': 'Attached files are saved to your file library.',
|
|
560
|
+
'workflows.assistant.removeAttachment': 'Remove {name}',
|
|
561
|
+
'workflows.assistant.uploadProgress': 'Uploading, {percent}%',
|
|
562
|
+
'workflows.assistant.attachmentFailed': 'Could not be uploaded',
|
|
534
563
|
'workflows.assistant.composerPlaceholder': 'Describe the workflow you want',
|
|
564
|
+
'workflows.assistant.mentionMenuLabel': 'Compositions and Open MCPs to mention',
|
|
565
|
+
'workflows.assistant.compositionReferencesLabel': 'Referenced compositions',
|
|
566
|
+
'workflows.assistant.removeCompositionReference': 'Remove {name}',
|
|
535
567
|
'workflows.assistant.send': 'Send',
|
|
568
|
+
'workflows.assistant.working': 'Working…',
|
|
536
569
|
'workflows.assistant.answerSent': 'My answer',
|
|
537
570
|
'workflows.assistant.stepWaiting': 'Waiting',
|
|
538
571
|
'workflows.assistant.stepCreating': 'Creating',
|
|
539
572
|
'workflows.assistant.stepDone': 'Done',
|
|
540
573
|
'workflows.assistant.stepFailed': 'Failed',
|
|
574
|
+
'workflows.assistant.watchBuild': 'Watch it being built',
|
|
575
|
+
'workflows.assistant.openBuilt': 'Open it',
|
|
576
|
+
'workflows.assistant.watchNote': 'Open a widget to watch it being built. You can take over from there.',
|
|
541
577
|
'workflows.assistant.retry': 'Retry',
|
|
542
578
|
'workflows.assistant.retryMessage': 'Some steps did not finish. Please plan this again and reuse what was already built.',
|
|
543
579
|
'workflows.assistant.buildNote': 'New widgets take a few minutes to build. Keep this panel open until the workflow is ready.',
|
|
580
|
+
// The card that asks where the copies of a plan's template widgets go (shown when the person has more than one project).
|
|
581
|
+
'workflows.assistant.templateProjectTitle': 'Where should the templates go?',
|
|
582
|
+
'workflows.assistant.templateProjectHint': 'The templates of this plan are copied into the project you choose.',
|
|
583
|
+
'workflows.assistant.templateProjectUnnamed': 'Untitled project',
|
|
544
584
|
'workflows.assistant.errorRateLimited': 'That was a lot of messages at once. Try again in a minute.',
|
|
545
|
-
'workflows.assistant.errorNotAvailable': 'The assistant is not available right now.'
|
|
585
|
+
'workflows.assistant.errorNotAvailable': 'The assistant is not available right now.',
|
|
586
|
+
// ===== Live data from the person's Open MCPs: the @ menu, what a call would show, the block of the plan card =====
|
|
587
|
+
// The @ menu has two groups when the person has Open MCPs. A server that cannot be used yet says why, in place of its address.
|
|
588
|
+
'workflows.assistant.mentionGroupMcps': 'Open MCPs',
|
|
589
|
+
'workflows.assistant.mentionGroupCompositions': 'Compositions',
|
|
590
|
+
'workflows.assistant.mentionNone': 'Nothing matches.',
|
|
591
|
+
'workflows.assistant.mentionMcpNeedsSignIn': 'Needs you to sign in again',
|
|
592
|
+
'workflows.assistant.mentionMcpNotReachable': 'Could not be reached',
|
|
593
|
+
'workflows.assistant.mentionMcpNotChecked': 'Not checked yet',
|
|
594
|
+
'workflows.assistant.mentionMcpNoTools': 'No tools switched on',
|
|
595
|
+
'workflows.assistant.mentionHint': 'Type @ to mention a composition or one of your Open MCPs. Mention both to give the composition live data.',
|
|
596
|
+
'workflows.assistant.mcpReferencesLabel': 'Referenced Open MCPs',
|
|
597
|
+
'workflows.assistant.removeMcpReference': 'Remove {name}',
|
|
598
|
+
// What one call would show. These are the person's own values, on their screen only.
|
|
599
|
+
'workflows.assistant.previewTitle': 'What {name} would show',
|
|
600
|
+
'workflows.assistant.previewSource': '{tool} on {server}',
|
|
601
|
+
'workflows.assistant.previewPrivate': 'Only you see these values. The assistant is told which fields were filled, never what is in them.',
|
|
602
|
+
'workflows.assistant.previewTableLabel': 'The first rows of {name}',
|
|
603
|
+
'workflows.assistant.previewRowsInAll': '{count, plural, one {# row in all} other {# rows in all}}',
|
|
604
|
+
'workflows.assistant.previewRowsLeftOut': '{count, plural, one {# more row does not fit the list.} other {# more rows do not fit the list.}}',
|
|
605
|
+
'workflows.assistant.previewDropped': '{count, plural, one {# value could not be used and was left out.} other {# values could not be used and were left out.}}',
|
|
606
|
+
'workflows.assistant.previewAdjusted': '{count, plural, one {# value was cut or rounded to fit its field.} other {# values were cut or rounded to fit their fields.}}',
|
|
607
|
+
'workflows.assistant.previewEmpty': 'The call gave nothing for these fields.',
|
|
608
|
+
// The plan card's block: the exact call, where each value goes, and the person's yes.
|
|
609
|
+
'workflows.assistant.liveDataTitle': 'Live data',
|
|
610
|
+
'workflows.assistant.liveDataIntro': 'Visitors see current data from your Open MCPs in place of the saved content. The design stays as it is.',
|
|
611
|
+
'workflows.assistant.bindingCall': 'Calls {tool} on {server} ({host})',
|
|
612
|
+
'workflows.assistant.bindingReadOnly': 'The server says this tool only reads data.',
|
|
613
|
+
'workflows.assistant.bindingMayChange': 'The server says this tool can change data. It would be called every time the data refreshes.',
|
|
614
|
+
'workflows.assistant.bindingReadOnlyUnknown': 'The server does not say whether this tool only reads data.',
|
|
615
|
+
'workflows.assistant.bindingRefresh': 'Fetched again at most every {count, plural, one {# second} other {# seconds}}.',
|
|
616
|
+
'workflows.assistant.bindingCallDetails': 'The call',
|
|
617
|
+
'workflows.assistant.bindingNoArguments': 'No arguments.',
|
|
618
|
+
'workflows.assistant.bindingMappingDetails': 'Where each value comes from',
|
|
619
|
+
'workflows.assistant.bindingFieldHeading': 'Field',
|
|
620
|
+
'workflows.assistant.bindingSourceHeading': 'Taken from',
|
|
621
|
+
'workflows.assistant.bindingRowsHeading': 'The rows of the list',
|
|
622
|
+
'workflows.assistant.bindingWholeAnswer': 'The whole answer',
|
|
623
|
+
'workflows.assistant.bindingWholeRow': 'The whole row',
|
|
624
|
+
'workflows.assistant.bindingWaiting': 'Waiting',
|
|
625
|
+
'workflows.assistant.bindingBinding': 'Checking the call',
|
|
626
|
+
'workflows.assistant.bindingDone': 'Turned on',
|
|
627
|
+
'workflows.assistant.bindingDoneRows': 'Turned on, {count, plural, one {# row} other {# rows}} from the call',
|
|
628
|
+
'workflows.assistant.bindingFailed': 'Failed',
|
|
629
|
+
'workflows.assistant.exposureConsent': 'I understand that anyone who opens these embeds sees this data, signed in or not.',
|
|
630
|
+
'workflows.assistant.exposureNeeded': 'Confirm above to turn on live data.',
|
|
631
|
+
'workflows.assistant.turnOnLiveData': 'Turn on live data',
|
|
632
|
+
'workflows.assistant.liveDataReady': 'Live data is on. These compositions show current data each time they load.',
|
|
633
|
+
// The grey suggestion after what the person has typed: the hint beside the box while it shows, and what a screen reader hears.
|
|
634
|
+
'workflows.assistant.suggestionTabKey': 'Tab',
|
|
635
|
+
'workflows.assistant.suggestionTabHint': 'to accept',
|
|
636
|
+
'workflows.assistant.suggestionAnnouncement': 'Suggestion: {text}. Press Tab to accept.',
|
|
637
|
+
// Naming an attached file in the message with a `#`: the line under the box, the name of the list of files, and the X of a badge.
|
|
638
|
+
'workflows.assistant.referenceHint': 'Type # to reference an attached file',
|
|
639
|
+
'workflows.assistant.referenceMenuLabel': 'Attached files',
|
|
640
|
+
'workflows.assistant.referenceRemove': 'Remove {name}'
|
|
546
641
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Workflows } from './components/index.js';
|
|
2
2
|
export { WORKFLOWS_MESSAGES, checkWorkflowsMessages, provideWorkflowsLanguage, useWorkflowsLanguage, type WorkflowsMessageKey } from './i18n/index.js';
|
|
3
3
|
export type { WorkflowsError, WorkflowsErrorCode, WorkflowsProps } from './types/index.js';
|
|
4
|
+
export type { WorkflowAssistantCompositionReference, WorkflowAssistantSeed } from './types/index.js';
|
|
4
5
|
export type { AccessTokenFunction } from './api/types.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TextDirection } from '@widgetic/design-system/i18n';
|
|
2
2
|
import type { AccessTokenFunction, WorkflowListItem } from '../api/types.js';
|
|
3
|
-
import type { WorkflowAssistantConfig } from '../assistant/types.js';
|
|
4
|
-
export type { WorkflowAssistantConfig } from '../assistant/types.js';
|
|
3
|
+
import type { WorkflowAssistantConfig, WorkflowAssistantSeed } from '../assistant/types.js';
|
|
4
|
+
export type { WorkflowAssistantCompositionReference, WorkflowAssistantConfig, WorkflowAssistantSeed } from '../assistant/types.js';
|
|
5
5
|
/** Why `onError` was called. */
|
|
6
6
|
export type WorkflowsErrorCode =
|
|
7
7
|
/** A part of the screen threw while it was being drawn. The screen shows "Try again" in its place. */
|
|
@@ -79,6 +79,18 @@ export interface WorkflowsProps {
|
|
|
79
79
|
onError?: (error: WorkflowsError) => void;
|
|
80
80
|
/** Optional workflows assistant endpoints and upload wiring; omitted disables the panel. */
|
|
81
81
|
assistant?: WorkflowAssistantConfig | null;
|
|
82
|
+
/**
|
|
83
|
+
* A first message that waits in the assistant's composer for the workflow it is for (see {@link WorkflowAssistantSeed}): the page
|
|
84
|
+
* that sent the person here with an idea in mind. It needs `assistant` and the workflow to be open (`workflowId`). It is read when
|
|
85
|
+
* that workflow is opened (give it no later than the `workflowId`), written when its assistant is first drawn, and used once;
|
|
86
|
+
* left out, the composer starts empty as it always did.
|
|
87
|
+
*/
|
|
88
|
+
assistantSeed?: WorkflowAssistantSeed | null;
|
|
89
|
+
/**
|
|
90
|
+
* The assistant of a workflow took the seed in (or left it alone because the person had already started typing or talking), so
|
|
91
|
+
* the page can stop holding it. Called once per seed, with the workflow's id.
|
|
92
|
+
*/
|
|
93
|
+
onAssistantSeedApplied?: (workflowId: string) => void;
|
|
82
94
|
/** For tests and previews: the `fetch` the screen asks the API with. The page's own `fetch` when left out. */
|
|
83
95
|
fetchImplementation?: typeof fetch;
|
|
84
96
|
/**
|
|
@@ -89,4 +101,9 @@ export interface WorkflowsProps {
|
|
|
89
101
|
items: readonly WorkflowListItem[];
|
|
90
102
|
total: number;
|
|
91
103
|
} | null;
|
|
104
|
+
/**
|
|
105
|
+
* Host-built localStorage key for recent workflow searches on the list screen. Empty string disables the recents panel
|
|
106
|
+
* under the search field.
|
|
107
|
+
*/
|
|
108
|
+
recentSearchesKey?: string;
|
|
92
109
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widgetic/workflows",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"description": "Workflows for Widgetic: chain compositions together with filters that decide which composition an embed shows. One Svelte package that the Widgetic site, partners and Shopify all load.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -51,21 +51,19 @@
|
|
|
51
51
|
"format": "prettier --write ."
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@widgetic/workflows-engine": "^0.1.
|
|
54
|
+
"@widgetic/workflows-engine": "^0.1.2",
|
|
55
55
|
"kaykay": "0.3.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
+
"@widgetic/brand": "^0.1.1",
|
|
58
59
|
"@widgetic/cache-layer": ">=0.1.0",
|
|
59
|
-
"@widgetic/chat": ">=0.1.
|
|
60
|
-
"@widgetic/design-system": ">=0.5.
|
|
60
|
+
"@widgetic/chat": ">=0.1.43",
|
|
61
|
+
"@widgetic/design-system": ">=0.5.41",
|
|
61
62
|
"svelte": "^5.25.6"
|
|
62
63
|
},
|
|
63
64
|
"peerDependenciesMeta": {
|
|
64
65
|
"@widgetic/cache-layer": {
|
|
65
66
|
"optional": true
|
|
66
|
-
},
|
|
67
|
-
"@widgetic/chat": {
|
|
68
|
-
"optional": true
|
|
69
67
|
}
|
|
70
68
|
},
|
|
71
69
|
"devDependencies": {
|
|
@@ -76,10 +74,11 @@
|
|
|
76
74
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
77
75
|
"@tailwindcss/postcss": "^4.1.4",
|
|
78
76
|
"@types/node": "^26.4.1",
|
|
77
|
+
"@widgetic/brand": "^0.1.1",
|
|
79
78
|
"@widgetic/cache-layer": "^0.1.6",
|
|
80
|
-
"@widgetic/chat": "^0.1.
|
|
81
|
-
"@widgetic/design-system": "^0.5.
|
|
82
|
-
"@widgetic/dev-tools": "^0.3.
|
|
79
|
+
"@widgetic/chat": "^0.1.43",
|
|
80
|
+
"@widgetic/design-system": "^0.5.41",
|
|
81
|
+
"@widgetic/dev-tools": "^0.3.11",
|
|
83
82
|
"eslint": "^9.0.0",
|
|
84
83
|
"eslint-config-prettier": "^9.1.0",
|
|
85
84
|
"eslint-plugin-svelte": "^3.0.0",
|
|
@@ -90,6 +89,7 @@
|
|
|
90
89
|
"svelte": "^5.25.6",
|
|
91
90
|
"svelte-check": "^4.0.0",
|
|
92
91
|
"tailwindcss": "^4.1.4",
|
|
92
|
+
"three": "^0.174.0",
|
|
93
93
|
"typescript": "^5.8.3",
|
|
94
94
|
"typescript-eslint": "^8.0.0",
|
|
95
95
|
"vite": "^6.2.6"
|