@lockerverse/sdk 0.2.160 → 0.2.162

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/MIGRATIONS.md ADDED
@@ -0,0 +1,147 @@
1
+ # SDK migrations
2
+
3
+ This file ships in both @lockerverse/sdk and @lockerverse/react. Use the copy in
4
+ the target installed release. This is an agent-run procedure, not an install
5
+ script. Installing a package does not edit host code or guarantee these steps ran.
6
+
7
+ ## Upgrade procedure
8
+
9
+ 1. Before installation, record the resolved installed version of each package
10
+ from the lockfile or package manager, the host framework, and the features in
11
+ use. Do not use a dependency range as proof of the installed version.
12
+ 2. Select a published matching stable SDK/React pair. A copy-prompt version is a
13
+ minimum, not a request to downgrade. Preserve a newer matching stable pair.
14
+ Core-only consumers do not need to add React. Use the existing package manager
15
+ and update the real lockfile. Follow peer requirements in the target manifests.
16
+ 3. After installation, read this target file and SDK_RULES.md. React consumers
17
+ must also read guides/integration.md and each applicable resource guide.
18
+ 4. For each affected package, apply all entries where old version < entry version
19
+ <= target version, from oldest to newest. Include releases skipped by the
20
+ upgrade. Use semantic version comparison, not string comparison. An Unreleased
21
+ section is not a published migration and must not be applied to a stable host.
22
+ 5. Apply required steps. Apply recommended steps when the feature and host support
23
+ them and they fit the task. Keep deliberate host choices. For every skipped
24
+ step, state why it does not apply or what prevents it. Do not silently count it
25
+ as complete. Do not replace a framework, change payment mode, or publish a site
26
+ merely because a migration recommends a capability.
27
+ 6. Run the host's relevant existing build and checks. Inspect initial HTML when
28
+ SSR applies and the browser behavior for the changed feature. Do not create
29
+ live transactions. Report old/new versions, applied entries, automatic changes,
30
+ skipped actions and reasons, check results, and any remaining work.
31
+
32
+ If the old version is unknown, identify it from the prior lockfile or Git history.
33
+ If it cannot be found, report that limit and use the baseline review below. Do not
34
+ claim that every historical migration was applied. Read this file even if the
35
+ version already matches: a previous upgrade may have missed host adoption steps.
36
+
37
+ ## Existing integration baseline through 0.2.161
38
+
39
+ This guide starts with the current integration baseline. It is not a complete
40
+ record of older breaking changes. For an integration created before this guide,
41
+ review this section once, including when its version already matches the target.
42
+ The feature guide and public types in the target package define the exact API.
43
+
44
+ ### Required when applicable
45
+
46
+ - **Hosts that use both React and Core:** keep installed versions matched and use public entry points.
47
+ Read the installed contract instead of an old copied integration prompt.
48
+ - **Auction media proxy:** if using mediaBaseUrl, pass the full loaded auction
49
+ snapshot to components and initialAuction. Forward w and f query parameters
50
+ unchanged. Check that a resized response has the expected dimensions and type.
51
+ - **Public route identity:** keep configured community and auction identity fixed.
52
+ Use real item and return links. Handle missing items without selecting another
53
+ item silently. Follow the host router's missing-page behavior.
54
+ - **Checkout and recovery:** preserve supported recovery state and private data
55
+ handling. Never restart an uncertain transaction to recover from a load error.
56
+
57
+ ### Recommended host adoption
58
+
59
+ - **Existing SSR hosts:** load public data on the server and seed
60
+ useLockerverseAuction with initialAuction or useLockerverseAuctions with
61
+ initialAuctions. Keep public content outside client-only payment boundaries.
62
+ Keep that content visible during silent refresh. Verify it in the raw response.
63
+ - **Dedicated auction item pages:** set itemHeadingLevel={1}; avoid a competing
64
+ page title heading. Embedded item views can keep the default level 2.
65
+ - **Gallery:** set galleryImageSizes when the host differs from the default
66
+ full-width mobile / 45vw desktop layout. Check the first image before hydration
67
+ and selected photos after interaction. Keep full-screen sizing separate.
68
+ - **Import boundaries:** use feature entry points such as
69
+ @lockerverse/react/auction-item and @lockerverse/react/auction-data. Remove host
70
+ imports that eagerly load payment UI when the page does not yet need it.
71
+ - **Host metadata and assets:** check offer descriptions against current prices.
72
+ Keep local fonts, responsive photos, and background videos within the host's
73
+ performance budget. These are host tasks, not automatic SDK transformations.
74
+
75
+ ### Automatic SDK behavior in the baseline
76
+
77
+ Supported auction media paths use responsive sizes through the configured proxy.
78
+ The gallery gives the first photo high priority and uses eager/lazy loading for
79
+ selected/other photos. Transaction headings follow the item heading level.
80
+ Auction checkout code is deferred until payment or recovery needs it. These
81
+ benefits require the supported components and data paths; custom host UI must
82
+ adopt the corresponding APIs itself. The SDK cannot remove the host's own eager
83
+ imports or server-render a browser-only website.
84
+
85
+ ## Versioned changes
86
+
87
+ ### 0.2.161 — Deferred auction checkout code
88
+
89
+ Affected: @lockerverse/react auction item and transaction UI.
90
+
91
+ - **Automatic:** the supported auction UI loads checkout code when payment or
92
+ recovery needs it. No public prop change is required.
93
+ - **Recommended:** use the narrow auction imports and remove unused eager payment
94
+ imports from the host. Do not remove payment peers required by the chosen flow.
95
+ - **Check:** compare initial page requests with checkout requests. Public item
96
+ content must remain available before checkout loads; recovery must keep its
97
+ existing state. Do not expect the total size of every reachable chunk to shrink.
98
+
99
+ ### 0.2.160 — Transaction heading hierarchy
100
+
101
+ Affected: @lockerverse/react auction item UI.
102
+
103
+ - **Automatic:** transaction and status headings follow the item heading level.
104
+ - **Recommended:** dedicated pages should use itemHeadingLevel={1}. Embedded
105
+ views should retain the level that fits their surrounding page.
106
+ - **Check:** inspect the rendered heading order, including transaction states.
107
+ This change must not require a new host CSS workaround or a widget remount.
108
+
109
+ ### 0.2.159 — Gallery loading and item heading controls
110
+
111
+ Affected: @lockerverse/react auction item UI.
112
+
113
+ - **Automatic:** selected photos load eagerly and other photos load lazily. The
114
+ first photo has high fetch priority; lazy photos can use automatic image sizing.
115
+ - **Recommended:** set galleryImageSizes for a custom host container and use
116
+ itemHeadingLevel={1} on a dedicated item page. Read guides/auctions.md for the
117
+ supported props. Embedded views can keep the defaults.
118
+ - **Check:** inspect the first response, image request sizes, and heading order.
119
+ Check gallery selection and full-screen viewing without changing image quality.
120
+
121
+ ### 0.2.158 — Responsive images through a configured proxy
122
+
123
+ Affected: @lockerverse/react auction images and @lockerverse/sdk auction data.
124
+
125
+ - **Automatic:** supported auction images retain responsive resize URLs through
126
+ the configured mediaBaseUrl instead of losing resizing on that proxy path.
127
+ - **Required when using a proxy:** pass the full loaded snapshot to the UI and
128
+ server seed. Configure the host rewrite to forward w and f unchanged to the
129
+ media service. Do not reconstruct the snapshot and discard mediaBaseUrl.
130
+ - **Check:** confirm resized response dimensions and content type through the
131
+ actual proxy. Signed, external, and unsupported URLs must keep their original
132
+ behavior. Hosts without a custom proxy do not need a proxy configuration change.
133
+
134
+ ## Entry format for future releases
135
+
136
+ Add new version entries above older entries. Before publication, replace any
137
+ Unreleased heading with the actual release version. Keep prior entries intact.
138
+ Each entry must state:
139
+
140
+ - Version and affected packages/features.
141
+ - Required changes, with the old and new API or behavior for breaking changes.
142
+ - Recommended host changes and the conditions where they apply.
143
+ - Automatic improvements and cases that need no host edit.
144
+ - Completion checks and any limits or manual follow-up.
145
+
146
+ For a new installation, use the current feature guides and baseline instead of
147
+ reproducing old APIs from migration examples.
package/README.md CHANGED
@@ -12,6 +12,11 @@ Online documentation can describe a newer release. Import public package entry
12
12
  points, not private `dist` files. For ready-made React UI, use the README shipped
13
13
  with `@lockerverse/react`.
14
14
 
15
+ Read [SDK quality rules](SDK_RULES.md) before integration changes. For every
16
+ upgrade, read [MIGRATIONS.md](MIGRATIONS.md) from the target package and apply
17
+ all applicable steps, including skipped releases. A version bump alone does not
18
+ complete an upgrade. Record the old installed versions before installation.
19
+
15
20
  ## Usage guide
16
21
 
17
22
  - [Checkout and payment recovery](#checkout)
package/SDK_RULES.md ADDED
@@ -0,0 +1,84 @@
1
+ # SDK quality rules
2
+
3
+ These rules apply to SDK maintenance and host integration. Read the installed
4
+ package README, public types, resource guide, and MIGRATIONS.md with this file.
5
+ Use the instructions from the target release. Do not copy APIs from newer docs.
6
+
7
+ ## Public content and search
8
+
9
+ - In an existing server-rendered host, load public auction data in its server
10
+ loader. Pass the complete snapshot through the supported initial-data API.
11
+ Keep text, images, status, and real links in the first HTML response. Do not
12
+ put the whole auction in a client-only boundary to protect payment code.
13
+ - Keep browser storage, Stripe, and browser globals outside server rendering.
14
+ Retain the seed or last good snapshot during refresh. Refresh silently; do
15
+ not add an “Updating auction” banner or replace ready content with a loader.
16
+ Show initial loading only when no data exists. Keep useful failure feedback.
17
+ - Use real href links for item and return navigation. Preserve direct entry,
18
+ reload, Back, Forward, and opening in a new tab. The host must handle unknown
19
+ item URLs; do not silently show the first item for an invalid identity.
20
+ - On a dedicated item page, use itemHeadingLevel={1}. Keep transaction headings
21
+ below the item heading. Embedded items normally use the default level 2.
22
+ Use public props, not DOM patches or private CSS selectors.
23
+ - The host owns titles, descriptions, canonicals, robots rules, sitemap, HTTP
24
+ status codes, and structured data. Keep price and availability claims aligned
25
+ with current public data. Do not hard-code a second copy of an offer.
26
+ - A browser-only app does not gain server rendering from an SDK update. Explain
27
+ this limit. Do not replace its framework or add a server without task scope.
28
+
29
+ ## Images, fonts, and initial download
30
+
31
+ - Use supported responsive image URLs and sizes. A proxy URL alone does not
32
+ prove resizing. Check the returned dimensions, content type, and transfer size.
33
+ - With mediaBaseUrl, preserve the complete auction snapshot and forward w and f
34
+ query parameters to the configured media service. Use only the supported
35
+ public media path. Preserve signed, private, external, and unsupported image
36
+ URLs and the existing original-image fallback.
37
+ - Match galleryImageSizes to the host layout. Reserve image space to prevent
38
+ layout shifts. Load the first visible image eagerly with high priority; load
39
+ off-screen images lazily. Keep selected and full-screen photos clear at their
40
+ rendered size and device pixel ratio. Do not lower quality only for a score.
41
+ - Import the narrow public entry point for the feature. Keep payment code and
42
+ optional Stripe peers out of unrelated catalog, event, and signup imports.
43
+ Defer auction checkout code until payment or recovery needs it.
44
+ - Keep required first-screen styles available. Scope widget styles and inherit
45
+ host fonts where supported. Do not add remote fonts or global font rules to
46
+ widgets. The host owns font compression, preload choices, background video,
47
+ and page-wide CSS. Avoid preloading every font or media file.
48
+ - Inspect the actual initial bundle and network requests when changing import
49
+ boundaries. A smaller entry file alone does not prove a smaller first load.
50
+
51
+ ## State, failures, and logging
52
+
53
+ - Keep resource identity stable. Do not remount a widget for background refresh,
54
+ metadata changes, or styling changes. Preserve contact and checkout state.
55
+ - Never reset or retry an uncertain bid or payment as a new transaction. Preserve
56
+ the supported recovery flow. Do not add automatic page reloads to unresolved
57
+ payment recovery. A failed dynamic import needs useful failure feedback;
58
+ repeating the same import is not a reliable recovery method in every browser.
59
+ - Use the existing failure-only telemetry contract. Do not add routine request,
60
+ polling, success, or render logs. Report only the safe fields allowed by that
61
+ contract; do not serialize request bodies or arbitrary error objects.
62
+ - Keep contact data, payment tokens, secrets, and recovery credentials out of
63
+ URLs, public loader data, metadata, analytics, console output, and logs.
64
+ Public configuration and public resource identity are not credentials.
65
+ - Use the selected environment and supported public APIs. Do not introduce an
66
+ unrelated payment backend or change saved resource settings during an upgrade.
67
+
68
+ ## Maintainer completion rules
69
+
70
+ - For every release, review MIGRATIONS.md. Add an entry for a changed public
71
+ contract, default, or host adoption step. Include useful optional improvements,
72
+ not only breaking changes. State when a change needs no host edit.
73
+ - Include affected packages/features, required and recommended actions, unchanged
74
+ cases, and a way to check completion. Do not call a version bump a migration.
75
+ - Use a concrete release version for dated entries. If the release version is
76
+ not yet known, put steps in an Unreleased section, then assign the actual
77
+ version before publication. Do not publish pending steps as completed history.
78
+ - These two root Markdown files are the maintained source. The package builds
79
+ copy them into both npm packages. Do not edit generated package copies.
80
+ - Use focused existing checks and inspect packed files for documentation changes.
81
+ Do not create tests just because a file changed. Do not use real bids, payments,
82
+ or signups for an integration check. Report checks not run and remaining limits.
83
+ - Do not promise a Lighthouse score, indexing, or search rank. Package rules help
84
+ prevent regressions; website content, hosting, and external services also matter.
package/dist/types.js CHANGED
@@ -1,2 +1,2 @@
1
- const e=`0.2.160`;var t=class extends Error{code;operation;reportable;recoveryRecommended;sdkVersion;serverCode;status;constructor({code:t,message:n,operation:r,reportable:i,recoveryRecommended:a=!1,serverCode:o,status:s}){super(n),this.name=`LockerverseSdkError`,this.code=t,this.operation=r,this.reportable=i,this.recoveryRecommended=a,this.sdkVersion=e,this.serverCode=o,this.status=s}};export{t as n,e as t};
1
+ const e=`0.2.162`;var t=class extends Error{code;operation;reportable;recoveryRecommended;sdkVersion;serverCode;status;constructor({code:t,message:n,operation:r,reportable:i,recoveryRecommended:a=!1,serverCode:o,status:s}){super(n),this.name=`LockerverseSdkError`,this.code=t,this.operation=r,this.reportable=i,this.recoveryRecommended=a,this.sdkVersion=e,this.serverCode=o,this.status=s}};export{t as n,e as t};
2
2
  //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lockerverse/sdk",
3
- "version": "0.2.160",
3
+ "version": "0.2.162",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Lockerverse/lockerverse-sdk.git",
@@ -39,7 +39,9 @@
39
39
  "types": "./dist/index.d.ts",
40
40
  "files": [
41
41
  "dist",
42
- "README.md"
42
+ "README.md",
43
+ "SDK_RULES.md",
44
+ "MIGRATIONS.md"
43
45
  ],
44
46
  "dependencies": {
45
47
  "valibot": "1.4.2"
@@ -93,7 +95,7 @@
93
95
  }
94
96
  ],
95
97
  "scripts": {
96
- "build": "tsdown",
98
+ "build": "node ../../scripts/copy-package-instructions.mjs sdk && tsdown",
97
99
  "contract:backend": "node test/contract/verify-backend-contract.mjs",
98
100
  "contract:check": "node test/contract/generate-public-api.mjs check",
99
101
  "contract:generate": "node test/contract/generate-public-api.mjs generate",