@picked/svelte 0.0.1-dev.1793772853474 → 0.0.1-dev.1793776638554
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/.tsbuildinfo +1 -1
- package/dist/plugins/devtools/DevToolsExperience.svelte +46 -13
- package/dist/plugins/devtools/components/AdaptedToolHost.svelte +9 -3
- package/dist/plugins/devtools/customTools.d.ts +16 -7
- package/dist/plugins/devtools/customTools.js +1 -1
- package/dist/plugins/devtools/derive/answer-display/answer-display.d.ts +1 -1
- package/dist/plugins/devtools/derive/answer-display/answer-display.js +1 -1
- package/dist/plugins/devtools/derive/guide-sections/guide-sections.js +1 -1
- package/dist/plugins/devtools/derive/journey-outline/journey-outline.js +1 -1
- package/dist/plugins/devtools/derive/journey-tree/journey-tree.js +1 -1
- package/dist/plugins/devtools/derive/persona-builder/persona-builder.js +1 -1
- package/dist/plugins/devtools/derive/personas/personas.d.ts +1 -1
- package/dist/plugins/devtools/derive/personas/personas.js +1 -1
- package/dist/plugins/devtools/derive/plain-language/plain-language.d.ts +20 -23
- package/dist/plugins/devtools/derive/plain-language/plain-language.js +1 -1
- package/dist/plugins/devtools/derive/plain-logic/plain-logic.d.ts +1 -1
- package/dist/plugins/devtools/derive/plain-logic/plain-logic.js +1 -1
- package/dist/plugins/devtools/derive/safety-posture/safety-posture.js +1 -1
- package/dist/plugins/devtools/options.d.ts +22 -21
- package/dist/plugins/devtools/options.js +1 -1
- package/dist/plugins/devtools/review/answers/AnswersPanel.svelte +14 -14
- package/dist/plugins/devtools/review/guide/GuidePanel.svelte +1 -1
- package/dist/plugins/devtools/review/index.d.ts +2 -2
- package/dist/plugins/devtools/review/journey/JourneyMap.svelte +16 -14
- package/dist/plugins/devtools/review/journey/JourneyPanel.svelte +20 -20
- package/dist/plugins/devtools/review/journey/JourneyTimeline.svelte +22 -21
- package/dist/plugins/devtools/review/personas/PersonaBuilder.svelte +12 -12
- package/dist/plugins/devtools/review/personas/PersonaCard.svelte +1 -1
- package/dist/plugins/devtools/review/personas/PersonasPanel.svelte +25 -9
- package/dist/plugins/devtools/review/personas/load-persona.d.ts +2 -2
- package/dist/plugins/devtools/review/personas/load-persona.js +1 -1
- package/dist/plugins/devtools/review/session/SessionPanel.svelte +11 -11
- package/dist/plugins/devtools/review/variations/VariationsPanel.svelte +12 -13
- package/dist/plugins/devtools/screens/custom-tools/CustomToolsScreen.svelte +11 -25
- package/dist/plugins/devtools/screens/experiences/ExperienceDetailsScreen.svelte +2 -2
- package/dist/plugins/devtools/screens/features/FeaturesListScreen.svelte +3 -3
- package/dist/plugins/devtools/sidebar/Sidebar.svelte +38 -4
- package/dist/plugins/devtools/sidebar/nav.d.ts +32 -8
- package/dist/plugins/devtools/sidebar/nav.js +1 -1
- package/package.json +2 -2
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import type { CustomToolIcon } from '../customTools';
|
|
3
3
|
import type { StorageGetter } from '../launcher/launcher';
|
|
4
4
|
/**
|
|
5
|
-
* What a sidebar entry opens: a review tab, a
|
|
6
|
-
*
|
|
5
|
+
* What a sidebar entry opens: a review tab, a custom tool, the Custom Tools page shown while no tool
|
|
6
|
+
* sits in that group, or a developer screen.
|
|
7
7
|
*/
|
|
8
8
|
export type NavKind = 'review' | 'tool' | 'custom-tools' | 'developer';
|
|
9
9
|
/** One entry of the sidebar: a row, or an icon at its foot. */
|
|
@@ -15,9 +15,13 @@ export interface NavItem {
|
|
|
15
15
|
/** The glyph of an icon at the sidebar's foot. */
|
|
16
16
|
icon?: CustomToolIcon;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* The sidebar's entries: the top-level tabs, the Custom Tools group's tools, the Developer group's
|
|
20
|
+
* screens, and the foot's icons.
|
|
21
|
+
*/
|
|
19
22
|
export interface NavModel {
|
|
20
23
|
primary: readonly NavItem[];
|
|
24
|
+
custom: readonly NavItem[];
|
|
21
25
|
developer: readonly NavItem[];
|
|
22
26
|
footer: readonly NavItem[];
|
|
23
27
|
}
|
|
@@ -25,17 +29,23 @@ export interface NavModel {
|
|
|
25
29
|
export declare const TAB_STORAGE_KEY = "picked-devtools-tab";
|
|
26
30
|
/** `sessionStorage` key holding `'true'` while the Developer group is open. */
|
|
27
31
|
export declare const DEVELOPER_OPEN_STORAGE_KEY = "picked-devtools-developer-open";
|
|
32
|
+
/** `sessionStorage` key holding `'false'` while the Custom Tools group is folded. */
|
|
33
|
+
export declare const CUSTOM_TOOLS_OPEN_STORAGE_KEY = "picked-devtools-custom-tools-open";
|
|
34
|
+
/** The label of the Custom Tools row and group. */
|
|
35
|
+
export declare const CUSTOM_TOOLS_LABEL = "Custom Tools";
|
|
28
36
|
/** The tab a first open lands on, and where a vanished tab falls back to. */
|
|
29
37
|
export declare const DEFAULT_TAB = "guide";
|
|
30
|
-
/** The id of the Custom Tools
|
|
38
|
+
/** The id of the Custom Tools row listed while no tool sits in that group; it links the how-to page. */
|
|
31
39
|
export declare const CUSTOM_TOOLS_TAB = "custom-tools";
|
|
40
|
+
/** The id of the row that folds the Custom Tools group. */
|
|
41
|
+
export declare const CUSTOM_TOOLS_GROUP = "custom-tools-group";
|
|
32
42
|
/** The developer screens, in the order the Developer group lists them. */
|
|
33
43
|
export declare const DEVELOPER_SCREENS: readonly {
|
|
34
44
|
id: string;
|
|
35
45
|
label: string;
|
|
36
46
|
}[];
|
|
37
47
|
/**
|
|
38
|
-
* The sidebar id of a
|
|
48
|
+
* The sidebar id of a custom tool.
|
|
39
49
|
*
|
|
40
50
|
* @param {string} toolId - The tool's registered id.
|
|
41
51
|
* @returns {string} Its tab id, prefixed so it never collides with a review tab.
|
|
@@ -52,13 +62,18 @@ export declare function toolTabId(toolId: string): string;
|
|
|
52
62
|
export declare function developerTabId(screenId: string): string;
|
|
53
63
|
/** What decides the sidebar's rows. */
|
|
54
64
|
export interface NavInput {
|
|
55
|
-
/** Whether the workspace publishes a feature, which lists
|
|
65
|
+
/** Whether the workspace publishes a feature, which lists Feature flags. */
|
|
56
66
|
variations: boolean;
|
|
57
67
|
/** The review-placed custom tools, in registration order, each a tab of its own. */
|
|
58
68
|
tools: readonly {
|
|
59
69
|
id: string;
|
|
60
70
|
label: string;
|
|
61
71
|
}[];
|
|
72
|
+
/** The unplaced custom tools, in registration order, each a row of the Custom Tools group. */
|
|
73
|
+
customTools: readonly {
|
|
74
|
+
id: string;
|
|
75
|
+
label: string;
|
|
76
|
+
}[];
|
|
62
77
|
/** The footer-placed custom tools, in registration order, each an icon at the sidebar's foot. */
|
|
63
78
|
footerTools: readonly {
|
|
64
79
|
id: string;
|
|
@@ -70,8 +85,8 @@ export interface NavInput {
|
|
|
70
85
|
* Builds the sidebar's entries.
|
|
71
86
|
*
|
|
72
87
|
* @param {NavInput} input - What this session lists.
|
|
73
|
-
* @returns {NavModel} The top-level tabs, the Developer
|
|
74
|
-
* @example buildNav({ variations: true, tools: [], footerTools: [] })
|
|
88
|
+
* @returns {NavModel} The top-level tabs, the Custom Tools and Developer groups' rows, and the foot's icons.
|
|
89
|
+
* @example buildNav({ variations: true, tools: [], customTools: [], footerTools: [] })
|
|
75
90
|
*/
|
|
76
91
|
export declare function buildNav(input: NavInput): NavModel;
|
|
77
92
|
/**
|
|
@@ -83,6 +98,15 @@ export declare function buildNav(input: NavInput): NavModel;
|
|
|
83
98
|
* @example resolveTab('journey', nav) // 'journey'
|
|
84
99
|
*/
|
|
85
100
|
export declare function resolveTab(stored: string | null, nav: NavModel): string;
|
|
101
|
+
/**
|
|
102
|
+
* Whether a tab sits inside the Custom Tools group.
|
|
103
|
+
*
|
|
104
|
+
* @param {string} tab - A tab id.
|
|
105
|
+
* @param {NavModel} nav - The sidebar's rows.
|
|
106
|
+
* @returns {boolean} `true` for an unplaced custom tool.
|
|
107
|
+
* @example isInCustomTools('tool:simulator', nav) // true
|
|
108
|
+
*/
|
|
109
|
+
export declare function isInCustomTools(tab: string, nav: NavModel): boolean;
|
|
86
110
|
/**
|
|
87
111
|
* Whether a tab sits inside the Developer group.
|
|
88
112
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TAB_LABELS as e}from"../derive/plain-language/plain-language.js";var t=`picked-devtools-tab`,n=`picked-devtools-developer-open`,r=`
|
|
1
|
+
import{TAB_LABELS as e}from"../derive/plain-language/plain-language.js";var t=`picked-devtools-tab`,n=`picked-devtools-developer-open`,r=`picked-devtools-custom-tools-open`,i=`Custom Tools`,a=`guide`,o=`custom-tools`,s=`custom-tools-group`,c=[{id:`project`,label:`Project`},{id:`components`,label:`Components`},{id:`config`,label:`Config`},{id:`content`,label:`Content`},{id:`events`,label:`Events`},{id:`experience-instances`,label:`Experience Instances`},{id:`experiences`,label:`Experiences`},{id:`features`,label:`Feature flags`},{id:`fields`,label:`Fields`},{id:`frameworks`,label:`Frameworks`},{id:`history`,label:`History`},{id:`identity`,label:`Identity`},{id:`predicates`,label:`Predicates`},{id:`responses`,label:`Responses`}];function l(e){return`tool:${e}`}function u(e){return`dev:${e}`}function d(t){let n=[{id:`guide`,label:e.guide,kind:`review`},{id:`session`,label:e.session,kind:`review`},{id:`answers`,label:e.answers,kind:`review`},{id:`journey`,label:e.journey,kind:`review`},{id:`personas`,label:e.personas,kind:`review`}];t.variations&&n.push({id:`variations`,label:e.variations,kind:`review`});let r=e=>({id:l(e.id),label:e.label,kind:`tool`}),a=t.tools.map(r),s=t.customTools.map(r),d=c.map(e=>({id:u(e.id),label:e.label,kind:`developer`})),f=s.length===0?[{id:o,label:i,kind:`custom-tools`}]:[],p=t.footerTools.map(e=>({id:l(e.id),label:e.label,kind:`tool`,icon:e.icon??`wrench`}));return{primary:[...n,...a,...f],custom:s,developer:d,footer:p}}function f(e,t){return e===null?a:[...t.primary,...t.custom,...t.developer,...t.footer].some(t=>t.id===e)?e:a}function p(e,t){return t.custom.some(t=>t.id===e)}function m(e,t){return t.developer.some(t=>t.id===e)}function h(e,t,n){let r=Math.max(0,n-1);switch(e){case`ArrowDown`:return Math.min(t+1,r);case`ArrowUp`:return Math.max(t-1,0);case`Home`:return 0;case`End`:return r;default:return null}}function g(e,t){try{return e().getItem(t)}catch{return null}}function _(e,t,n){try{e().setItem(t,n)}catch{}}export{s as CUSTOM_TOOLS_GROUP,i as CUSTOM_TOOLS_LABEL,r as CUSTOM_TOOLS_OPEN_STORAGE_KEY,o as CUSTOM_TOOLS_TAB,a as DEFAULT_TAB,n as DEVELOPER_OPEN_STORAGE_KEY,c as DEVELOPER_SCREENS,t as TAB_STORAGE_KEY,d as buildNav,u as developerTabId,p as isInCustomTools,m as isInDeveloper,h as nextFocusIndex,g as readStored,f as resolveTab,l as toolTabId,_ as writeStored};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/svelte",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.1793776638554",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"d3": "^7.9.0"
|
|
6
6
|
},
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"license": "SEE LICENSE IN LICENSE",
|
|
114
114
|
"module": "./dist/index.js",
|
|
115
115
|
"peerDependencies": {
|
|
116
|
-
"@picked/client": "0.0.1-dev.
|
|
116
|
+
"@picked/client": "0.0.1-dev.1793776638554",
|
|
117
117
|
"effector": "^23.4.4",
|
|
118
118
|
"svelte": "^5.55.7"
|
|
119
119
|
},
|