@picked/client 0.0.1-dev.1787543060859 → 0.0.1-dev.1788925875333
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/api-DbMJli3H.js +22 -0
- package/dist/api-qiqq8lgz.cjs +1 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/telemetry/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/how-to/fill-and-publish-a-page.md +18 -2
- package/dist/docs/reference/dashboard/content/pages.mdx +25 -0
- package/dist/docs/reference/dashboard/fields.mdx +17 -11
- package/dist/docs/reference/delivery-api/preview-caching-crawling.md +1 -1
- package/dist/docs/reference/sdk/features.md +5 -0
- package/dist/docs/reference/sdk/fields.md +62 -16
- package/dist/docs/reference/sdk/type-generation.md +18 -7
- package/dist/docs/reference/tools/mcp.md +3 -1
- package/dist/esm/index.js +468 -439
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/plugins/responses-browser-storage/index.js +50 -16
- package/dist/esm/plugins/responses-indexeddb/index.js +1 -1
- package/dist/esm/plugins/telemetry/index.js +46 -47
- package/dist/esm/server/index.js +1 -1
- package/dist/{plugin-BcFzHPC7.cjs → plugin-BcLaCLm1.cjs} +1 -1
- package/dist/{plugin-L5y4NdFX.js → plugin-De_BJSwE.js} +3 -2
- package/dist/provider-C_9u0yGJ.cjs +1 -0
- package/dist/provider-ovM-CBX_.js +98 -0
- package/dist/types/client.d.ts +21 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/data-source/api.d.ts.map +1 -1
- package/dist/types/data-source/provider.d.ts +3 -0
- package/dist/types/data-source/provider.d.ts.map +1 -1
- package/dist/types/data-source/request-observer.d.ts +38 -22
- package/dist/types/data-source/request-observer.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +29 -4
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/field/policies.d.ts +35 -0
- package/dist/types/entities/field/policies.d.ts.map +1 -0
- package/dist/types/entities/plugin/plugin.d.ts +3 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lifecycle/lifecycle.d.ts +1 -1
- package/dist/types/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/types/picked.d.ts +9 -11
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +3 -8
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +11 -0
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +1 -1
- package/dist/types/plugins/telemetry/emit.d.ts +3 -3
- package/dist/types/plugins/telemetry/emit.d.ts.map +1 -1
- package/dist/types/plugins/telemetry/plugin.d.ts +10 -1
- package/dist/types/plugins/telemetry/plugin.d.ts.map +1 -1
- package/dist/types/utils/client-telemetry.d.ts +25 -0
- package/dist/types/utils/client-telemetry.d.ts.map +1 -0
- package/dist/types/utils/user-timing.d.ts +16 -13
- package/dist/types/utils/user-timing.d.ts.map +1 -1
- package/dist/{version-BqU6f22c.cjs → version-BvLZaTMC.cjs} +1 -1
- package/dist/{version-DAFO6eas.js → version-VvasRUfR.js} +2 -2
- package/package.json +3 -3
- package/dist/api-CahTmEWe.cjs +0 -1
- package/dist/api-DwTNwuWK.js +0 -33
- package/dist/provider-BLDm3i8g.cjs +0 -1
- package/dist/provider-Dx6VjvZg.js +0 -69
- package/dist/request-observer-BXDfOU0V.cjs +0 -1
- package/dist/request-observer-DtG0cRfz.js +0 -19
- package/dist/types/ping.d.ts +0 -11
- package/dist/types/ping.d.ts.map +0 -1
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import "./logger-DMN6TxJJ.js";
|
|
2
|
-
import { n as e, t } from "./api-DwTNwuWK.js";
|
|
3
|
-
import { r as n, t as r } from "./registry-CXZv0uLg.js";
|
|
4
|
-
//#region src/data-source/provider.ts
|
|
5
|
-
var i = "bundle", a = "api";
|
|
6
|
-
async function o() {
|
|
7
|
-
try {
|
|
8
|
-
let e = await import("virtual:picked/data");
|
|
9
|
-
return n(e) ? e : null;
|
|
10
|
-
} catch {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
function s(e) {
|
|
15
|
-
if (e === void 0 || n(e)) return e;
|
|
16
|
-
}
|
|
17
|
-
function c(n) {
|
|
18
|
-
let { apiUrl: c, projectId: l, previewToken: u, signal: d } = n, f = !!u, p = f ? a : n.mode, m = s(f ? void 0 : n.bundle), h = f ? void 0 : n.projectConfig, g = n.getContent, _ = {
|
|
19
|
-
mode: p ?? a,
|
|
20
|
-
manifest: null
|
|
21
|
-
}, v, y, b = /* @__PURE__ */ new Map();
|
|
22
|
-
function x() {
|
|
23
|
-
if (p === a) return Promise.resolve(null);
|
|
24
|
-
if (m) return Promise.resolve(m);
|
|
25
|
-
let e = r();
|
|
26
|
-
return e ? Promise.resolve(e) : (v ??= o(), v);
|
|
27
|
-
}
|
|
28
|
-
function S(e) {
|
|
29
|
-
_.mode = e ? i : a, _.manifest = e ? e.manifestMetadata : null;
|
|
30
|
-
}
|
|
31
|
-
async function C() {
|
|
32
|
-
if (h) return S(await x()), h;
|
|
33
|
-
let t = await x();
|
|
34
|
-
return S(t), t ? t.projectConfig : p === i ? null : e(c, l, {
|
|
35
|
-
...u !== void 0 && { previewToken: u },
|
|
36
|
-
...d !== void 0 && { signal: d }
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
async function w(e, n) {
|
|
40
|
-
let r = u === void 0 ? void 0 : { previewToken: u };
|
|
41
|
-
if (g) return g(e, r);
|
|
42
|
-
let a = await x();
|
|
43
|
-
if (S(a), a) try {
|
|
44
|
-
return await a.experienceContent(e, r);
|
|
45
|
-
} catch {
|
|
46
|
-
return `${e.id}`, null;
|
|
47
|
-
}
|
|
48
|
-
if (p === i) return null;
|
|
49
|
-
let o = n ?? d;
|
|
50
|
-
return t(c, l, e.id, {
|
|
51
|
-
...u !== void 0 && { previewToken: u },
|
|
52
|
-
...o !== void 0 && { signal: o }
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
return {
|
|
56
|
-
meta: _,
|
|
57
|
-
getProjectConfig: () => (y ??= C(), y),
|
|
58
|
-
getContent: (e, t) => {
|
|
59
|
-
let n = b.get(e.id);
|
|
60
|
-
if (n) return n;
|
|
61
|
-
let r = w(e, t?.signal).finally(() => {
|
|
62
|
-
b.delete(e.id);
|
|
63
|
-
});
|
|
64
|
-
return b.set(e.id, r), r;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
export { c as createPickedDataProvider };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=null;function t(t){e=t}function n(t){try{return e?.onRequest(t)??{}}catch{return{}}}function r(e,t){try{e.onSettled?.(t)}catch{}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//#region src/data-source/request-observer.ts
|
|
2
|
-
var e = null;
|
|
3
|
-
function t(t) {
|
|
4
|
-
e = t;
|
|
5
|
-
}
|
|
6
|
-
function n(t) {
|
|
7
|
-
try {
|
|
8
|
-
return e?.onRequest(t) ?? {};
|
|
9
|
-
} catch {
|
|
10
|
-
return {};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function r(e, t) {
|
|
14
|
-
try {
|
|
15
|
-
e.onSettled?.(t);
|
|
16
|
-
} catch {}
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { t as n, r, n as t };
|
package/dist/types/ping.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Picked } from './picked';
|
|
2
|
-
/**
|
|
3
|
-
* Pings the server to track the last time the library was loaded.
|
|
4
|
-
*
|
|
5
|
-
* @param {Picked} client - The active Picked client instance.
|
|
6
|
-
* @returns {Promise<boolean>} Whether the ping succeeded.
|
|
7
|
-
* @example
|
|
8
|
-
* await ping(client)
|
|
9
|
-
*/
|
|
10
|
-
export declare const ping: (client: Picked) => Promise<boolean>;
|
|
11
|
-
//# sourceMappingURL=ping.d.ts.map
|
package/dist/types/ping.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["../../src/ping.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAKtC;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,WAAkB,MAAM,KAAG,OAAO,CAAC,OAAO,CAoC1D,CAAA"}
|