@asteby/metacore-marketplace 113.0.0 → 115.0.0
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.
|
@@ -19,5 +19,5 @@ export interface InstallConfirmModalProps {
|
|
|
19
19
|
error?: string | null;
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
22
|
-
export declare function InstallConfirmModal({ open, onClose, title, next, current, onConfirm, busy, error, className, }: InstallConfirmModalProps): import("react").
|
|
22
|
+
export declare function InstallConfirmModal({ open, onClose, title, next, current, onConfirm, busy, error, className, }: InstallConfirmModalProps): import("react").ReactPortal | null;
|
|
23
23
|
//# sourceMappingURL=InstallConfirmModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstallConfirmModal.d.ts","sourceRoot":"","sources":["../../src/components/InstallConfirmModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InstallConfirmModal.d.ts","sourceRoot":"","sources":["../../src/components/InstallConfirmModal.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAM3D,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,IAAI,EAAE,QAAQ,CAAA;IACd,4EAA4E;IAC5E,OAAO,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAA;IACzB,qCAAqC;IACrC,SAAS,EAAE,CAAC,KAAK,EAAE;QACjB,oBAAoB,EAAE,UAAU,EAAE,CAAA;QAClC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAC1C,KAAK,IAAI,CAAA;IACV,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,KAAK,EACL,IAAI,EACJ,OAAc,EACd,SAAS,EACT,IAAY,EACZ,KAAK,EACL,SAAS,GACV,EAAE,wBAAwB,sCAoI1B"}
|
|
@@ -12,6 +12,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
12
12
|
* Dialog, headless-ui, etc.) or render it inline.
|
|
13
13
|
*/
|
|
14
14
|
import { useMemo, useState } from 'react';
|
|
15
|
+
import { createPortal } from 'react-dom';
|
|
15
16
|
import { diffRequiresConsent, diffPermissions } from '../client/manifest';
|
|
16
17
|
import { useMarketplaceLabels } from '../providers/MarketplaceProvider';
|
|
17
18
|
import { PermissionsDiff } from './PermissionsDiff';
|
|
@@ -37,6 +38,8 @@ export function InstallConfirmModal({ open, onClose, title, next, current = null
|
|
|
37
38
|
acceptedConsents: consentState,
|
|
38
39
|
});
|
|
39
40
|
};
|
|
40
|
-
|
|
41
|
+
// In <body>: inside a glass panel (backdrop-filter) a fixed overlay would
|
|
42
|
+
// cover and center on that panel, not the viewport.
|
|
43
|
+
return createPortal(_jsx("div", { role: "dialog", "aria-modal": "true", "aria-busy": busy, "data-testid": "install-confirm-modal", className: cn('fixed inset-0 z-50 flex items-center justify-center bg-background/80 p-4 backdrop-blur-sm', className), children: _jsxs("div", { className: "flex max-h-[90vh] w-full max-w-lg flex-col gap-4 overflow-y-auto rounded-lg border border-border bg-card p-5 shadow-lg", children: [_jsxs("header", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-base font-semibold", children: title ?? next.name }), _jsxs("p", { className: "text-xs text-muted-foreground", children: ["v", next.version, next.apiVersion ? ` · API v${next.apiVersion}` : ''] })] }), _jsx("button", { type: "button", onClick: onClose, disabled: busy, className: "rounded-md p-1 text-muted-foreground hover:bg-muted", "aria-label": labels.cancel, children: "\u00D7" })] }), _jsxs("section", { children: [_jsx("h4", { className: "mb-2 text-sm font-medium", children: labels.permissionsTitle }), next.permissions.length === 0 && diff.length === 0 ? (_jsx("p", { className: "text-sm text-muted-foreground", children: labels.permissionsNone })) : current ? (_jsxs(_Fragment, { children: [requiresConsent ? (_jsx("p", { className: "mb-2 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300", children: labels.permissionsConsentRequired })) : null, _jsx(PermissionsDiff, { current: current, next: next, hideUnchanged: true })] })) : (_jsx(PermissionsDiff, { current: null, next: next, hideUnchanged: true }))] }), next.consents.length > 0 ? (_jsxs("section", { children: [_jsx("h4", { className: "mb-2 text-sm font-medium", children: "Optional consents" }), _jsx("ul", { className: "flex flex-col gap-2", children: next.consents.map((c) => (_jsxs("li", { className: "flex items-start gap-2 text-sm", children: [_jsx("input", { id: `consent-${c.key}`, type: "checkbox", checked: consentState[c.key] ?? false, onChange: (e) => setConsentState((s) => ({ ...s, [c.key]: e.target.checked })), disabled: busy, className: "mt-1" }), _jsx("label", { htmlFor: `consent-${c.key}`, className: "leading-snug", children: c.label })] }, c.key))) })] })) : null, error ? (_jsx("p", { role: "alert", className: "rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-sm text-destructive", children: error })) : null, _jsxs("footer", { className: "flex items-center justify-end gap-2", children: [_jsx("button", { type: "button", onClick: onClose, disabled: busy, className: "rounded-md border border-border px-3 py-1.5 text-sm hover:bg-muted disabled:opacity-60", children: labels.cancel }), _jsx("button", { type: "button", onClick: handleConfirm, disabled: busy, "data-testid": "install-confirm-button", className: "rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-60", children: busy ? labels.installInProgress : labels.confirm })] })] }) }), document.body);
|
|
41
44
|
}
|
|
42
45
|
//# sourceMappingURL=InstallConfirmModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstallConfirmModal.js","sourceRoot":"","sources":["../../src/components/InstallConfirmModal.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"InstallConfirmModal.js","sourceRoot":"","sources":["../../src/components/InstallConfirmModal.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAuB5B,MAAM,UAAU,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,KAAK,EACL,IAAI,EACJ,OAAO,GAAG,IAAI,EACd,SAAS,EACT,IAAI,GAAG,KAAK,EACZ,KAAK,EACL,SAAS,GACgB;IACzB,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAA;IAErC,iEAAiE;IACjE,+DAA+D;IAC/D,6DAA6D;IAC7D,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAA0B,GAAG,EAAE;QAC7E,MAAM,OAAO,GAA4B,EAAE,CAAA;QAC3C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,IAAI,KAAK,CAAA;QAClE,OAAO,OAAO,CAAA;IAChB,CAAC,CAAC,CAAA;IAEF,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,O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C,CAAC,CAAC,IAAI,EAEP,KAAK,CAAC,CAAC,CAAC,CACP,YACE,IAAI,EAAC,OAAO,EACZ,SAAS,EAAC,6FAA6F,YAEtG,KAAK,GACJ,CACL,CAAC,CAAC,CAAC,IAAI,EAER,kBAAQ,SAAS,EAAC,qCAAqC,aACrD,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,IAAI,EACd,SAAS,EAAC,wFAAwF,YAEjG,MAAM,CAAC,MAAM,GACP,EACT,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,IAAI,iBACF,wBAAwB,EACpC,SAAS,EAAC,uHAAuH,YAEhI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,GAC1C,IACF,IACL,GACF,EACN,QAAQ,CAAC,IAAI,CACd,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asteby/metacore-marketplace",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "115.0.0",
|
|
4
4
|
"description": "Metacore marketplace SDK — Hub catalog + Ops install/upgrade client, React hooks, and headless UI primitives shared across host apps (Ops, link).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": ">=18",
|
|
42
42
|
"react-dom": ">=18",
|
|
43
43
|
"@tanstack/react-query": ">=5",
|
|
44
|
-
"@asteby/metacore-app-providers": "^
|
|
44
|
+
"@asteby/metacore-app-providers": "^117.0.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"@asteby/metacore-app-providers": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@asteby/metacore-app-providers": "
|
|
52
|
+
"@asteby/metacore-app-providers": "117.0.0",
|
|
53
53
|
"@tanstack/react-query": "^5.95.0",
|
|
54
54
|
"@types/react": "^19.0.0",
|
|
55
55
|
"@types/react-dom": "^19.0.0",
|