@ai-matrx/sharing 0.1.11 → 0.1.12
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/dist/react.cjs +6 -6
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +2 -2
- package/dist/react.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.12
|
|
4
|
+
|
|
5
|
+
- **`/react` no longer pulls the whole Vault** (build-cost lane, 2026-10-22). The share sheet's secure-link gate imported `createSupabaseIdentity`, `IdentityGate`, `useConfirmed` and `wasCancelled` from the `@ai-matrx/vault` root, so every host that mounts the share sheet (the web app does, in its root providers) compiled every Vault screen and `@zip.js/zip.js`. It now imports them from `@ai-matrx/vault/identity`. Needs `@ai-matrx/vault` with the `/identity` entry (published in the same release train, lower DAG level). Consumer action: none.
|
|
6
|
+
|
|
3
7
|
## 0.1.11
|
|
4
8
|
|
|
5
9
|
- **One manual-copy dialog: `useShare` asks the host (2026-10-22, summon adoption X11).** A refused clipboard no longer opens a `ClipboardFallbackDialog` that `useShare` mounted itself; it calls the share sheet's new `manualCopy` port (`configureShareSheetUi({ manualCopy })`, also exported as `manualCopy` from the sheet host), whose default is kit `openClipboardFallback`, i.e. the host's ONE manual-copy dialog (the web app's summon overlay through its kit bridge, `<ClipboardFallbackHost />` anywhere else). `copy`/`share` still resolve `"manual"` and never flip `copied`. `UseShareResult.fallbackDialog` is now always `null` and `@deprecated`; `ShareLinkPanel` no longer renders it. Sharing's bundle no longer imports `ClipboardFallbackDialog`. Test: `src/react/__tests__/manual-copy-goes-through-the-host.test.tsx` (port, kit default, no-own-dialog scan; red on the old `useShare`). **Consumer action:** remove `{fallbackDialog}` from JSX when convenient (it renders nothing now; removal of the field comes later). A host must have a manual-copy host registered (the web app's `ClipboardFallbackBridge`, or `<ClipboardFallbackHost />`), or pass `manualCopy`. matrx-frontend: `features/sharing/hooks/__tests__/useShare.test.tsx` and `scripts/__tests__/clipboard-success-gating.behavior.test.ts` ("useShare copy fallback") assert the old hand-mounted dialog and must be updated (builder-X11.md).
|
package/dist/react.cjs
CHANGED
|
@@ -78,7 +78,7 @@ var import_confirm_opener = require("@ai-matrx/kit/confirm-opener");
|
|
|
78
78
|
var import_clipboard_fallback_opener = require("@ai-matrx/kit/clipboard-fallback-opener");
|
|
79
79
|
var import_core = require("@ai-matrx/sharing/core");
|
|
80
80
|
var import_core2 = require("@ai-matrx/sharing/core");
|
|
81
|
-
var
|
|
81
|
+
var import_identity = require("@ai-matrx/vault/identity");
|
|
82
82
|
var import_core3 = require("@ai-matrx/sharing/core");
|
|
83
83
|
var import_core4 = require("@ai-matrx/sharing/core");
|
|
84
84
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -298,7 +298,7 @@ var vaultIdentity = () => {
|
|
|
298
298
|
if (ui.vaultIdentity) return ui.vaultIdentity;
|
|
299
299
|
announceStandIn("vaultIdentity");
|
|
300
300
|
if (!defaultIdentity) {
|
|
301
|
-
defaultIdentity = (0,
|
|
301
|
+
defaultIdentity = (0, import_identity.createSupabaseIdentity)((0, import_core2.shareClient)().auth, {
|
|
302
302
|
redirectTo: () => window.location.href,
|
|
303
303
|
onDifferentPerson: async (message) => {
|
|
304
304
|
window.alert(message);
|
|
@@ -4043,7 +4043,7 @@ var import_design_system21 = require("@ai-matrx/design-system");
|
|
|
4043
4043
|
var import_controls18 = require("@ai-matrx/design-system/controls");
|
|
4044
4044
|
var import_design_system22 = require("@ai-matrx/design-system");
|
|
4045
4045
|
var import_design_system23 = require("@ai-matrx/design-system");
|
|
4046
|
-
var
|
|
4046
|
+
var import_identity2 = require("@ai-matrx/vault/identity");
|
|
4047
4047
|
var import_core33 = require("@ai-matrx/sharing/core");
|
|
4048
4048
|
var import_format3 = require("@ai-matrx/kit/format");
|
|
4049
4049
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
@@ -4061,11 +4061,11 @@ function when(iso) {
|
|
|
4061
4061
|
return Number.isNaN(d.getTime()) ? "" : d.toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" });
|
|
4062
4062
|
}
|
|
4063
4063
|
function SecureLinkPanel(props) {
|
|
4064
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_identity2.IdentityGate, { identity: vaultIdentity(), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SecureLinkForm, { ...props }) });
|
|
4065
4065
|
}
|
|
4066
4066
|
function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
4067
4067
|
const dispatch = useAppDispatch();
|
|
4068
|
-
const confirmed = (0,
|
|
4068
|
+
const confirmed = (0, import_identity2.useConfirmed)();
|
|
4069
4069
|
const [options, setOptions] = (0, import_react16.useState)(null);
|
|
4070
4070
|
const [optionsError, setOptionsError] = (0, import_react16.useState)(null);
|
|
4071
4071
|
const [email, setEmail] = (0, import_react16.useState)("");
|
|
@@ -4149,7 +4149,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
|
|
|
4149
4149
|
setFields([]);
|
|
4150
4150
|
refreshSent();
|
|
4151
4151
|
} catch (err) {
|
|
4152
|
-
if ((0,
|
|
4152
|
+
if ((0, import_identity2.wasCancelled)(err)) {
|
|
4153
4153
|
setResult({ tone: "warn", text: "Not sent: it was not confirmed." });
|
|
4154
4154
|
} else if (err instanceof import_core33.SecureDeliveryRefusal) {
|
|
4155
4155
|
setResult({ tone: "error", text: err.message, remedy: err.remedy });
|