@picked/svelte 0.0.1-dev.1783393641770 → 0.0.1-dev.1783575114714

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.
@@ -1,13 +1,25 @@
1
1
  import { Picked, ExperienceInstance } from '@picked/client';
2
2
  /**
3
- * Retrieves the Picked Client for the Experience Instance
3
+ * Retrieves the Picked Client for the Experience Instance.
4
4
  *
5
- * @returns The Picked client instance that provides access to experiences, steps, and other Picked functionality
5
+ * @returns The Picked client instance that provides access to experiences, steps, and other Picked functionality.
6
+ * @example
7
+ * const client = getPicked()
6
8
  */
7
9
  export declare function getPicked(): Picked;
8
10
  /**
9
- * Retrieves the Experience Store for the current Experience Instance
11
+ * Retrieves the Experience Store for the current Experience Instance.
10
12
  *
11
- * @returns The Experience store instance that provides access to experience configuration and state
13
+ * The returned instance exposes `restart` and `isResumableStore` for SDK-native
14
+ * resume/restart flows: call `instance.restart()` to clear this instance's history and
15
+ * the experience's owned responses, and subscribe to `instance.isResumableStore` (via the
16
+ * `$` prefix) to render a "continue / start over" prompt once the user has progressed past
17
+ * the first step (it stays `false` on the first step, even with a saved answer).
18
+ *
19
+ * @returns The Experience store instance that provides access to experience configuration and state.
20
+ * @example
21
+ * const experience = getExperience()
22
+ * const canResume = experience.isResumableStore
23
+ * // in markup: {#if $canResume}…{/if}
12
24
  */
13
25
  export declare function getExperience(): ExperienceInstance;
@@ -244,7 +244,7 @@
244
244
  const g = svg.append('g').attr('transform', `translate(${margin.left},${margin.top})`)
245
245
 
246
246
  const linkGenerator = d3
247
- .linkHorizontal<d3.HierarchyPointLink<ProcessedNode>, d3.HierarchyPointNode<ProcessedNode>>()
247
+ .linkHorizontal<d3.HierarchyPointLink<ProcessedNode>, ProcessedNode>()
248
248
  .x((d) => d.y)
249
249
  .y((d) => d.x)
250
250
 
@@ -1,12 +1,13 @@
1
- <script lang="ts">
1
+ <script lang="ts">/** @file Devtools table that lists history entries for the current Picked client. */
2
2
  import type { HistoryEntry } from '@picked/client'
3
- import HistoryEntryListItem from './HistoryEntryListItem.svelte'
4
3
  import { Card, DataTable, EmptyState, Stack } from '../../ui'
4
+ import HistoryEntryListItem from './HistoryEntryListItem.svelte'
5
5
 
6
6
  export let historyEntries: HistoryEntry[]
7
7
 
8
8
  const columns = [
9
9
  { key: 'id', header: 'ID' },
10
+ { key: 'instanceId', header: 'Instance ID' },
10
11
  { key: 'experienceId', header: 'Experience ID' },
11
12
  { key: 'nodeId', header: 'Node ID' },
12
13
  { key: 'nodeType', header: 'Node Type' },
@@ -1,5 +1,4 @@
1
- <script lang="ts">
2
- /** @file List item row displaying a navigation history entry in the devtools history screen. */
1
+ <script lang="ts">/** @file List item row displaying a navigation history entry in the devtools history screen. */
3
2
  import type { HistoryEntry } from '@picked/client'
4
3
  import { getPicked } from '../../../../hooks'
5
4
 
@@ -12,6 +11,7 @@
12
11
 
13
12
  <tr>
14
13
  <td>{historyEntry.id}</td>
14
+ <td>{historyEntry.instanceId}</td>
15
15
  <td>{experienceName}</td>
16
16
  <td>{historyEntry.node.id}</td>
17
17
  <td>{historyEntry.node.type}</td>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picked/svelte",
3
- "version": "0.0.1-dev.1783393641770",
3
+ "version": "0.0.1-dev.1783575114714",
4
4
  "dependencies": {
5
5
  "d3": "^7.9.0"
6
6
  },
@@ -106,7 +106,7 @@
106
106
  },
107
107
  "module": "./dist/index.js",
108
108
  "peerDependencies": {
109
- "@picked/client": "0.0.1-dev.1783393641770",
109
+ "@picked/client": "0.0.1-dev.1783575114714",
110
110
  "effector": "^23.3.0",
111
111
  "svelte": "^5.46.4"
112
112
  },