@forgecharts/sdk 1.5.69 → 1.5.71
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/core/Chart.d.ts +2 -0
- package/dist/core/Chart.d.ts.map +1 -1
- package/dist/core/__tests__/cursorTime.test.d.ts +2 -0
- package/dist/core/__tests__/cursorTime.test.d.ts.map +1 -0
- package/dist/core/cursorTime.d.ts +27 -0
- package/dist/core/cursorTime.d.ts.map +1 -0
- package/dist/index.js +84 -16
- package/dist/index.js.map +1 -1
- package/dist/internal.js +84 -16
- package/dist/internal.js.map +1 -1
- package/dist/pixi/PixiChart.d.ts +2 -0
- package/dist/pixi/PixiChart.d.ts.map +1 -1
- package/dist/pixi/PixiCrosshairRenderer.d.ts +9 -1
- package/dist/pixi/PixiCrosshairRenderer.d.ts.map +1 -1
- package/dist/react/canvas/ChartCanvas.d.ts +6 -0
- package/dist/react/canvas/ChartCanvas.d.ts.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +111 -18
- package/dist/react/index.js.map +1 -1
- package/dist/react/internal.js +111 -18
- package/dist/react/internal.js.map +1 -1
- package/dist/react/persistence/kitPreferencesApi.d.ts +23 -0
- package/dist/react/persistence/kitPreferencesApi.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PreferencesAPI backed by the Kit's own per-user store.
|
|
3
|
+
*
|
|
4
|
+
* The ManagedAppShell has always taken a `preferences: PreferencesAPI` prop
|
|
5
|
+
* and left the host to supply one; Kit-managed apps back it with the api's
|
|
6
|
+
* GET/PUT /api/preferences (a per-user JSON blob keyed by the Kit user, so
|
|
7
|
+
* state follows the ACCOUNT — another machine, another browser, cleared site
|
|
8
|
+
* data). Unmanaged hosts had no ready-made client and each grew its own
|
|
9
|
+
* storage — one host kept chart preferences in its own database, which put
|
|
10
|
+
* ForgeCharts state outside ForgeCharts.
|
|
11
|
+
*
|
|
12
|
+
* This factory is that client. Anything holding a Kit api URL and a user
|
|
13
|
+
* token gets the same persistence the shell uses, pointed at the same store.
|
|
14
|
+
*/
|
|
15
|
+
import type { PreferencesAPI } from '../shell/ManagedAppShell';
|
|
16
|
+
export interface KitPreferencesConfig {
|
|
17
|
+
/** Kit api origin, e.g. https://kit.example.com (no trailing /api). */
|
|
18
|
+
apiUrl: string;
|
|
19
|
+
/** Returns the current Kit user JWT. */
|
|
20
|
+
getAuthToken: () => string | Promise<string>;
|
|
21
|
+
}
|
|
22
|
+
export declare function createKitPreferencesApi(cfg: KitPreferencesConfig): PreferencesAPI;
|
|
23
|
+
//# sourceMappingURL=kitPreferencesApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kitPreferencesApi.d.ts","sourceRoot":"","sources":["../../../src/react/persistence/kitPreferencesApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,YAAY,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,oBAAoB,GAAG,cAAc,CAyBjF"}
|