@tinkerlandai/longplay-sdk 0.10.59 → 0.10.60
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/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/{ai-usage-DBcYB8ix.d.ts → ai-usage-DM3jAubK.d.ts} +1 -1
- package/dist/{api-1Tplv-7M.d.ts → api-KIp0I50M.d.ts} +21 -21
- package/dist/{chunk-FBNEQ2K5.js → chunk-2KM537QH.js} +1 -1
- package/dist/{chunk-6426YKPK.js → chunk-5QVMWM2X.js} +1 -1
- package/dist/chunk-6TETQL5Z.js +1 -0
- package/dist/{chunk-WUPNZGE2.js → chunk-7GIP3RNR.js} +1 -1
- package/dist/{chunk-J5K4PNII.js → chunk-IM5OXTEH.js} +1 -1
- package/dist/{chunk-725CAWOK.js → chunk-J4JJZN24.js} +1 -1
- package/dist/chunk-KBST6VBH.js +1 -0
- package/dist/{chunk-J7VGTAJ7.js → chunk-QJPH7AFI.js} +1 -1
- package/dist/chunk-QXDLOPZK.js +1 -0
- package/dist/{chunk-66W37FEV.js → chunk-RUGB7NAN.js} +1 -1
- package/dist/{chunk-U2NEVISJ.js → chunk-S24PK62Y.js} +1 -1
- package/dist/{chunk-J3RW4GMO.js → chunk-S3QZOIUO.js} +1 -1
- package/dist/{chunk-LUDTXNMH.js → chunk-S55446VK.js} +1 -1
- package/dist/chunk-TBXHEGSY.js +1 -0
- package/dist/{chunk-YB3PQ75M.js → chunk-UM5R4RNN.js} +2 -2
- package/dist/{chunk-MZ6NEOOQ.js → chunk-XZLGDFZ4.js} +1 -1
- package/dist/{configuration-sync-DeWWW5za.d.ts → configuration-sync-Dad8B5Pv.d.ts} +3 -3
- package/dist/{content-5OMLKBPP.js → content-IFXC4OBS.js} +1 -1
- package/dist/{funnel-host-purchase-53LYWG4V.js → funnel-host-purchase-NS7FJH2F.js} +1 -1
- package/dist/{funnel-host-recovery-paywall-FC3XQU2U.js → funnel-host-recovery-paywall-R4QGRGIJ.js} +1 -1
- package/dist/{funnel-local-client-Fxsyl7rh.d.ts → funnel-local-client-Cb9jJGpo.d.ts} +53 -53
- package/dist/{funnel-paywall-prerender-YCATKDAY.js → funnel-paywall-prerender-5NVQIQIV.js} +1 -1
- package/dist/{funnel-process-client-D9saqPse.d.ts → funnel-process-client-DE650LzB.d.ts} +28 -28
- package/dist/{funnel-runtime-host-LQ6X5B6R.js → funnel-runtime-host-6VL6UAF5.js} +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/native-shell.js +1 -1
- package/dist/openrouter.d.ts +3 -3
- package/dist/openrouter.js +1 -1
- package/dist/page.d.ts +2 -2
- package/dist/page.js +1 -1
- package/dist/{paywall-KQIBPACY.js → paywall-47DXK7WR.js} +1 -1
- package/dist/{paywall-content-NQXU3O4D.js → paywall-content-MNMF4QKA.js} +1 -1
- package/dist/{paywall-session-W42F6DIF.js → paywall-session-APGD7FZ5.js} +1 -1
- package/dist/popup.d.ts +23 -3
- package/dist/popup.js +1 -1
- package/dist/{presentation-loading-CjljfuJq.d.ts → presentation-loading-B8W6a9WB.d.ts} +10 -46
- package/dist/react-native.d.ts +7 -7
- package/dist/react-native.js +1 -1
- package/dist/{screen-renderer-2ZDV2WYD.js → screen-renderer-3YO6EUWD.js} +1 -1
- package/dist/server.d.ts +10 -10
- package/dist/server.js +1 -1
- package/dist/visual.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-IMFPRZUY.js +0 -1
- package/dist/chunk-O2V4MTM6.js +0 -1
- package/dist/chunk-PTNMDAND.js +0 -1
- package/dist/chunk-XY2X6YJF.js +0 -1
- package/dist/{chunk-YB3PQ75M.js.LEGAL.txt → chunk-UM5R4RNN.js.LEGAL.txt} +0 -0
- package/dist/{funnel-node-evaluation-CRRTh1je.d.ts → funnel-node-evaluation-COIh1hKs.d.ts} +3 -3
- package/dist/{screen-D2bUmJ4M.d.ts → screen-Pv_pViF6.d.ts} +21 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.60
|
|
4
|
+
|
|
5
|
+
- The loading state for a Paywall with a `loadingDocument` is plain DOM in the Paywall's dialog geometry and colors; it no longer starts a skeleton frame, so the Paywall's own frame is the only one a presentation starts
|
|
6
|
+
|
|
3
7
|
## 0.10.59
|
|
4
8
|
|
|
5
9
|
- `prerenderFunnelPurchase` keeps on the device the Paywall it last read for each entry and Customer, and the next pre-render paints it without a request: ready once painted, before the merchant's checks, Longplay's original-purchase lookup and a fresh read answer, so a click shows the complete Paywall without waiting for the network. A revealed copy is left to the click's own checks and Run; a fresh read updates plans in place
|
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ For an independent **Page, Popup or Banner resource**, import `createLongplay` a
|
|
|
97
97
|
|
|
98
98
|
The Web SDK displays a local placeholder while a Paywall, Funnel screen, Page, Popup or Banner prepares its first render. To supply a merchant placeholder, pass `loading: "host"` and use `onPresentationState`. The `loading` event provides `dismiss()`. Remove the placeholder on `ready`, `dismissed`, `skipped` or `error`. Use `ready` for the visual handoff even when the mount promise has already returned. Pass an `AbortSignal` as `signal` when the host can unmount or change Customers. Content resolved separately begins this lifecycle at `mountContent`. Preparation through `prepareContent` or `preparePopup` stays hidden until `show()`. Purchase progress and original-operation recovery continue through their existing APIs.
|
|
99
99
|
|
|
100
|
-
To
|
|
100
|
+
To size the loading state like a published Paywall, load the layout ahead of time with `configuration.paywall(paywallId)` and pass its `document` as `loadingDocument` to `showPaywall` or `showFunnelPurchase`. The SDK waits 120 ms before showing its loading UI, then draws a light status in plain DOM within that Paywall's dialog geometry and colors, with one Close button; it starts no frame of its own, so the Paywall's frame is the only one a presentation starts. Fast content appears directly; unknown layouts use a compact loading status. The bundled live renderer respects reduced motion. The live Paywall supplies the actionable content. If the original purchase outlives its Funnel Run, recovery takes over the open loading or Paywall dialog; Check status updates it in place and Continue checkout resumes the same operation. When its current page has a usable Close button, that button takes over from the SDK's Close control.
|
|
101
101
|
|
|
102
102
|
The separate [Python server SDK](../python/README.md) provides synchronous and asynchronous Customer, holdings, entitlement-check and usage clients against the same current HTTP protocol. It is distributed from `https://cdn.longplayai.com/sdk/python` (not PyPI) and is not part of this npm package.
|
|
103
103
|
|
package/README.zh-CN.md
CHANGED
|
@@ -107,7 +107,7 @@ JavaScript 与 TypeScript 共用本包,声明文件随包提供。内部 `@ind
|
|
|
107
107
|
|
|
108
108
|
Web SDK 在 Paywall、Funnel Screen、Page、Popup 或 Banner 准备首屏时展示本地骨架。宿主可传入 `loading: "host"`,通过 `onPresentationState` 接管占位。收到 `loading` 时可保存 `dismiss()` 用于关闭,收到 `ready`、`dismissed`、`skipped` 或 `error` 时撤下占位。挂载 Promise 返回后仍应等 `ready` 再交接。宿主卸载或切换 Customer 时,可通过传入的 `signal` 取消展示。单独解析的 Content 从 `mountContent` 开始加载。通过 `prepareContent` 或 `preparePopup` 预渲染的内容会保持隐藏,直到调用 `show()`。购买进度和原单恢复继续使用各自的现有 API。
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
要让加载状态与已发布 Paywall 的弹窗尺寸一致,可提前用 `configuration.paywall(paywallId)` 取布局,将返回的 `document` 作为 `loadingDocument` 传给 `showPaywall` 或 `showFunnelPurchase`。SDK 等待 120 ms 后才展示占位:在该 Paywall 的弹窗尺寸和配色里用普通 DOM 画轻量加载状态,保留一个关闭按钮,不另起 iframe,一次展示只启动 Paywall 自己的那个 iframe。快网直接展示正式内容,未知布局则使用紧凑加载提示。本地打包的正式渲染器遵循减少动效设置。可操作内容以正式 Paywall 为准。原购买仍有效而 Funnel Run 已结束时,恢复流程接管已打开的加载或 Paywall 弹窗;查询状态在原弹窗内更新,继续付款沿用同一 operation。正式页有可用的关闭按钮时,由它接管关闭操作。
|
|
111
111
|
|
|
112
112
|
独立的 [Python 服务端 SDK](../python/README.md) 使用同一当前 HTTP 协议,提供同步、异步 Customer、持仓/权益检查和用量上报。它从 `https://cdn.longplayai.com/sdk/python` 分发(不在 PyPI),不属于这个 npm 包。
|
|
113
113
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LanguageModelV4Usage, LanguageModelV4Middleware } from '@ai-sdk/provider';
|
|
2
|
-
import { F as FoundationApi, A as ApiInput } from './api-
|
|
2
|
+
import { F as FoundationApi, A as ApiInput } from './api-KIp0I50M.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const tokenCounts: z.ZodObject<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StackNode } from './screen-
|
|
1
|
+
import { S as StackNode } from './screen-Pv_pViF6.js';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
import { z as z$1 } from 'zod';
|
|
4
4
|
|
|
@@ -2197,12 +2197,12 @@ declare const apiOperations: {
|
|
|
2197
2197
|
orderId: z$1.ZodUUID;
|
|
2198
2198
|
purchaseIntentId: z$1.ZodUUID;
|
|
2199
2199
|
status: z$1.ZodEnum<{
|
|
2200
|
-
cancelled: "cancelled";
|
|
2201
2200
|
failed: "failed";
|
|
2202
2201
|
paid: "paid";
|
|
2203
2202
|
created: "created";
|
|
2204
2203
|
pending: "pending";
|
|
2205
2204
|
trialing: "trialing";
|
|
2205
|
+
cancelled: "cancelled";
|
|
2206
2206
|
}>;
|
|
2207
2207
|
currency: z$1.ZodEnum<{
|
|
2208
2208
|
USD: "USD";
|
|
@@ -2488,8 +2488,8 @@ declare const apiOperations: {
|
|
|
2488
2488
|
batchId: z$1.ZodUUID;
|
|
2489
2489
|
ready: z$1.ZodBoolean;
|
|
2490
2490
|
status: z$1.ZodEnum<{
|
|
2491
|
-
cancelled: "cancelled";
|
|
2492
2491
|
pending: "pending";
|
|
2492
|
+
cancelled: "cancelled";
|
|
2493
2493
|
prepared: "prepared";
|
|
2494
2494
|
expired: "expired";
|
|
2495
2495
|
partial: "partial";
|
|
@@ -2515,9 +2515,9 @@ declare const apiOperations: {
|
|
|
2515
2515
|
renewal: "renewal";
|
|
2516
2516
|
}>;
|
|
2517
2517
|
status: z$1.ZodEnum<{
|
|
2518
|
-
cancelled: "cancelled";
|
|
2519
2518
|
failed: "failed";
|
|
2520
2519
|
pending: "pending";
|
|
2520
|
+
cancelled: "cancelled";
|
|
2521
2521
|
prepared: "prepared";
|
|
2522
2522
|
effective: "effective";
|
|
2523
2523
|
confirmed: "confirmed";
|
|
@@ -3058,8 +3058,8 @@ declare const apiOperations: {
|
|
|
3058
3058
|
batchId: z$1.ZodUUID;
|
|
3059
3059
|
ready: z$1.ZodBoolean;
|
|
3060
3060
|
status: z$1.ZodEnum<{
|
|
3061
|
-
cancelled: "cancelled";
|
|
3062
3061
|
pending: "pending";
|
|
3062
|
+
cancelled: "cancelled";
|
|
3063
3063
|
prepared: "prepared";
|
|
3064
3064
|
expired: "expired";
|
|
3065
3065
|
partial: "partial";
|
|
@@ -3085,9 +3085,9 @@ declare const apiOperations: {
|
|
|
3085
3085
|
renewal: "renewal";
|
|
3086
3086
|
}>;
|
|
3087
3087
|
status: z$1.ZodEnum<{
|
|
3088
|
-
cancelled: "cancelled";
|
|
3089
3088
|
failed: "failed";
|
|
3090
3089
|
pending: "pending";
|
|
3090
|
+
cancelled: "cancelled";
|
|
3091
3091
|
prepared: "prepared";
|
|
3092
3092
|
effective: "effective";
|
|
3093
3093
|
confirmed: "confirmed";
|
|
@@ -3628,8 +3628,8 @@ declare const apiOperations: {
|
|
|
3628
3628
|
batchId: z$1.ZodUUID;
|
|
3629
3629
|
ready: z$1.ZodBoolean;
|
|
3630
3630
|
status: z$1.ZodEnum<{
|
|
3631
|
-
cancelled: "cancelled";
|
|
3632
3631
|
pending: "pending";
|
|
3632
|
+
cancelled: "cancelled";
|
|
3633
3633
|
prepared: "prepared";
|
|
3634
3634
|
expired: "expired";
|
|
3635
3635
|
partial: "partial";
|
|
@@ -3655,9 +3655,9 @@ declare const apiOperations: {
|
|
|
3655
3655
|
renewal: "renewal";
|
|
3656
3656
|
}>;
|
|
3657
3657
|
status: z$1.ZodEnum<{
|
|
3658
|
-
cancelled: "cancelled";
|
|
3659
3658
|
failed: "failed";
|
|
3660
3659
|
pending: "pending";
|
|
3660
|
+
cancelled: "cancelled";
|
|
3661
3661
|
prepared: "prepared";
|
|
3662
3662
|
effective: "effective";
|
|
3663
3663
|
confirmed: "confirmed";
|
|
@@ -4198,8 +4198,8 @@ declare const apiOperations: {
|
|
|
4198
4198
|
batchId: z$1.ZodUUID;
|
|
4199
4199
|
ready: z$1.ZodBoolean;
|
|
4200
4200
|
status: z$1.ZodEnum<{
|
|
4201
|
-
cancelled: "cancelled";
|
|
4202
4201
|
pending: "pending";
|
|
4202
|
+
cancelled: "cancelled";
|
|
4203
4203
|
prepared: "prepared";
|
|
4204
4204
|
expired: "expired";
|
|
4205
4205
|
partial: "partial";
|
|
@@ -4225,9 +4225,9 @@ declare const apiOperations: {
|
|
|
4225
4225
|
renewal: "renewal";
|
|
4226
4226
|
}>;
|
|
4227
4227
|
status: z$1.ZodEnum<{
|
|
4228
|
-
cancelled: "cancelled";
|
|
4229
4228
|
failed: "failed";
|
|
4230
4229
|
pending: "pending";
|
|
4230
|
+
cancelled: "cancelled";
|
|
4231
4231
|
prepared: "prepared";
|
|
4232
4232
|
effective: "effective";
|
|
4233
4233
|
confirmed: "confirmed";
|
|
@@ -5950,8 +5950,8 @@ declare const apiOperations: {
|
|
|
5950
5950
|
merchantSubscriptionId: z$1.ZodString;
|
|
5951
5951
|
revision: z$1.ZodNumber;
|
|
5952
5952
|
status: z$1.ZodEnum<{
|
|
5953
|
-
active: "active";
|
|
5954
5953
|
canceled: "canceled";
|
|
5954
|
+
active: "active";
|
|
5955
5955
|
trialing: "trialing";
|
|
5956
5956
|
past_due: "past_due";
|
|
5957
5957
|
incomplete: "incomplete";
|
|
@@ -6011,8 +6011,8 @@ declare const apiOperations: {
|
|
|
6011
6011
|
merchantSubscriptionId: z$1.ZodString;
|
|
6012
6012
|
revision: z$1.ZodNumber;
|
|
6013
6013
|
status: z$1.ZodEnum<{
|
|
6014
|
-
active: "active";
|
|
6015
6014
|
canceled: "canceled";
|
|
6015
|
+
active: "active";
|
|
6016
6016
|
trialing: "trialing";
|
|
6017
6017
|
past_due: "past_due";
|
|
6018
6018
|
incomplete: "incomplete";
|
|
@@ -6066,8 +6066,8 @@ declare const apiOperations: {
|
|
|
6066
6066
|
merchantSubscriptionId: z$1.ZodString;
|
|
6067
6067
|
revision: z$1.ZodNumber;
|
|
6068
6068
|
status: z$1.ZodEnum<{
|
|
6069
|
-
active: "active";
|
|
6070
6069
|
canceled: "canceled";
|
|
6070
|
+
active: "active";
|
|
6071
6071
|
trialing: "trialing";
|
|
6072
6072
|
past_due: "past_due";
|
|
6073
6073
|
incomplete: "incomplete";
|
|
@@ -6415,10 +6415,10 @@ declare const apiOperations: {
|
|
|
6415
6415
|
append: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
6416
6416
|
invoiceMode: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
6417
6417
|
status: z$1.ZodEnum<{
|
|
6418
|
-
cancelled: "cancelled";
|
|
6419
6418
|
failed: "failed";
|
|
6420
6419
|
complete: "complete";
|
|
6421
6420
|
pending: "pending";
|
|
6421
|
+
cancelled: "cancelled";
|
|
6422
6422
|
}>;
|
|
6423
6423
|
executor: z$1.ZodEnum<{
|
|
6424
6424
|
merchant: "merchant";
|
|
@@ -8141,10 +8141,10 @@ declare const apiOperations: {
|
|
|
8141
8141
|
append: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
8142
8142
|
invoiceMode: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
8143
8143
|
status: z$1.ZodEnum<{
|
|
8144
|
-
cancelled: "cancelled";
|
|
8145
8144
|
failed: "failed";
|
|
8146
8145
|
complete: "complete";
|
|
8147
8146
|
pending: "pending";
|
|
8147
|
+
cancelled: "cancelled";
|
|
8148
8148
|
}>;
|
|
8149
8149
|
executor: z$1.ZodEnum<{
|
|
8150
8150
|
merchant: "merchant";
|
|
@@ -10502,9 +10502,9 @@ declare const apiOperations: {
|
|
|
10502
10502
|
productVersionId: z$1.ZodUUID;
|
|
10503
10503
|
featureQuantities: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodUUID, z$1.ZodNumber>>;
|
|
10504
10504
|
status: z$1.ZodEnum<{
|
|
10505
|
-
cancelled: "cancelled";
|
|
10506
10505
|
failed: "failed";
|
|
10507
10506
|
pending: "pending";
|
|
10507
|
+
cancelled: "cancelled";
|
|
10508
10508
|
prepared: "prepared";
|
|
10509
10509
|
effective: "effective";
|
|
10510
10510
|
confirmed: "confirmed";
|
|
@@ -12040,9 +12040,9 @@ declare const apiOperations: {
|
|
|
12040
12040
|
membershipId: z$1.ZodUUID;
|
|
12041
12041
|
productVersionId: z$1.ZodUUID;
|
|
12042
12042
|
status: z$1.ZodEnum<{
|
|
12043
|
-
cancelled: "cancelled";
|
|
12044
12043
|
failed: "failed";
|
|
12045
12044
|
pending: "pending";
|
|
12045
|
+
cancelled: "cancelled";
|
|
12046
12046
|
prepared: "prepared";
|
|
12047
12047
|
effective: "effective";
|
|
12048
12048
|
}>;
|
|
@@ -12162,9 +12162,9 @@ declare const apiOperations: {
|
|
|
12162
12162
|
productVersionId: z$1.ZodUUID;
|
|
12163
12163
|
featureQuantities: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodUUID, z$1.ZodNumber>>;
|
|
12164
12164
|
status: z$1.ZodEnum<{
|
|
12165
|
-
cancelled: "cancelled";
|
|
12166
12165
|
failed: "failed";
|
|
12167
12166
|
pending: "pending";
|
|
12167
|
+
cancelled: "cancelled";
|
|
12168
12168
|
prepared: "prepared";
|
|
12169
12169
|
effective: "effective";
|
|
12170
12170
|
confirmed: "confirmed";
|
|
@@ -13700,9 +13700,9 @@ declare const apiOperations: {
|
|
|
13700
13700
|
membershipId: z$1.ZodUUID;
|
|
13701
13701
|
productVersionId: z$1.ZodUUID;
|
|
13702
13702
|
status: z$1.ZodEnum<{
|
|
13703
|
-
cancelled: "cancelled";
|
|
13704
13703
|
failed: "failed";
|
|
13705
13704
|
pending: "pending";
|
|
13705
|
+
cancelled: "cancelled";
|
|
13706
13706
|
prepared: "prepared";
|
|
13707
13707
|
effective: "effective";
|
|
13708
13708
|
}>;
|
|
@@ -21589,12 +21589,12 @@ declare const apiOperations: {
|
|
|
21589
21589
|
}, z$1.core.$strict>], "type">;
|
|
21590
21590
|
renewalAmountMinor: z$1.ZodNumber;
|
|
21591
21591
|
status: z$1.ZodEnum<{
|
|
21592
|
-
cancelled: "cancelled";
|
|
21593
21592
|
failed: "failed";
|
|
21594
21593
|
paid: "paid";
|
|
21595
21594
|
created: "created";
|
|
21596
21595
|
pending: "pending";
|
|
21597
21596
|
trialing: "trialing";
|
|
21597
|
+
cancelled: "cancelled";
|
|
21598
21598
|
}>;
|
|
21599
21599
|
url: z$1.ZodNullable<z$1.ZodURL>;
|
|
21600
21600
|
}, z$1.core.$strict>, z$1.ZodObject<{
|
|
@@ -21925,8 +21925,8 @@ declare const apiOperations: {
|
|
|
21925
21925
|
holdingStatus: z$1.ZodDefault<z$1.ZodEnum<{
|
|
21926
21926
|
"": "";
|
|
21927
21927
|
unavailable: "unavailable";
|
|
21928
|
-
active: "active";
|
|
21929
21928
|
none: "none";
|
|
21929
|
+
active: "active";
|
|
21930
21930
|
expired: "expired";
|
|
21931
21931
|
scheduled: "scheduled";
|
|
21932
21932
|
}>>;
|