@attraccess/plugin-matter 0.4.0-nightly.1188.1 → 0.5.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.
- package/dist/index.js +1080 -1381
- package/frontend/{__federation_expose_Plugin-C8YKt0vo.js → __federation_expose_Plugin-BhusgEmE.js} +102 -147
- package/frontend/remoteEntry.js +1 -1
- package/frontend/style.css +0 -47
- package/package.json +10 -11
- package/dist/migrations.js +0 -328
package/frontend/{__federation_expose_Plugin-C8YKt0vo.js → __federation_expose_Plugin-BhusgEmE.js}
RENAMED
|
@@ -231,7 +231,7 @@ function createPluginApiClient(basePath = "") {
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
// ../../../libs/plugins-frontend-sdk/src/lib/frontend.license.ts
|
|
234
|
-
var { useCallback: useCallback$5, useEffect: useEffect$3, useState: useState$
|
|
234
|
+
var { useCallback: useCallback$5, useEffect: useEffect$3, useState: useState$7 } = await importShared("react");
|
|
235
235
|
// ../../../node_modules/.pnpm/react@19.3.1/node_modules/react/cjs/react-jsx-runtime.production.js
|
|
236
236
|
/**
|
|
237
237
|
* @license React
|
|
@@ -560,7 +560,7 @@ function useErrorText() {
|
|
|
560
560
|
// frontend/src/fabric-backup/FabricStatusCard.tsx
|
|
561
561
|
var { Button: Button$5, StatusAlert: StatusAlert$8 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
562
562
|
var { Card: Card$3, Chip: Chip$2 } = await importShared("@heroui/react");
|
|
563
|
-
var { useState: useState$
|
|
563
|
+
var { useState: useState$6 } = await importShared("react");
|
|
564
564
|
/** The leading and trailing hex digits are enough to tell certificates apart; the whole value is one click away. */
|
|
565
565
|
var shortFingerprint = (value) => value.length > 28 ? `${value.slice(0, 16)}…${value.slice(-8)}` : value;
|
|
566
566
|
function stateChip(status) {
|
|
@@ -588,7 +588,7 @@ function stateChip(status) {
|
|
|
588
588
|
/** The shortened fingerprint, with the whole value as tooltip and behind a toggle (keyboard and touch reachable). */
|
|
589
589
|
function Fingerprint({ value }) {
|
|
590
590
|
const { t } = useMatterTranslations();
|
|
591
|
-
const [full, setFull] = useState$
|
|
591
|
+
const [full, setFull] = useState$6(false);
|
|
592
592
|
const short = shortFingerprint(value);
|
|
593
593
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
594
594
|
className: "mt:flex mt:flex-wrap mt:items-center mt:gap-2",
|
|
@@ -731,10 +731,10 @@ function FabricStatusCard(props) {
|
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
733
|
// frontend/src/fabric-backup/KeyCard.tsx
|
|
734
|
-
var { Button: Button$4, StatusAlert: StatusAlert$7 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
734
|
+
var { Button: Button$4, ConfirmableButton: ConfirmableButton$2, StatusAlert: StatusAlert$7 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
735
735
|
var { Card: Card$2 } = await importShared("@heroui/react");
|
|
736
736
|
/** The recovery key's ID and state (never the key itself), with generate or rotate. */
|
|
737
|
-
function KeyCard({ status, busy, generating, onGenerateKey, onRotate, canManage, formatDateTime }) {
|
|
737
|
+
function KeyCard({ status, busy, generating, rotating, onGenerateKey, onRotate, canManage, formatDateTime }) {
|
|
738
738
|
const { t } = useMatterTranslations();
|
|
739
739
|
const { sidecar, recovery, recoveryKey } = status;
|
|
740
740
|
const initialized = sidecar.reachable && sidecar.state === "initialized";
|
|
@@ -765,12 +765,20 @@ function KeyCard({ status, busy, generating, onGenerateKey, onRotate, canManage,
|
|
|
765
765
|
"data-cy": "matter-key-unacknowledged",
|
|
766
766
|
children: t(canManage ? "fabric.key.unacknowledgedText" : "fabric.key.unacknowledgedTextReadOnly")
|
|
767
767
|
}),
|
|
768
|
-
canManage && !recovery.required && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: recoveryKey.present ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
769
|
-
|
|
768
|
+
canManage && !recovery.required && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: recoveryKey.present ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmableButton$2, {
|
|
769
|
+
label: t("fabric.key.rotate"),
|
|
770
|
+
status: "warning",
|
|
770
771
|
isDisabled: busy || !initialized,
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
772
|
+
isPending: rotating,
|
|
773
|
+
onConfirm: onRotate,
|
|
774
|
+
confirm: {
|
|
775
|
+
title: t("fabric.key.rotateTitle"),
|
|
776
|
+
message: t("fabric.key.rotateText"),
|
|
777
|
+
confirmLabel: t("fabric.key.rotateConfirm"),
|
|
778
|
+
"data-cy": "matter-rotate-dialog",
|
|
779
|
+
confirmDataCy: "matter-rotate-confirm"
|
|
780
|
+
},
|
|
781
|
+
"data-cy": "matter-key-rotate"
|
|
774
782
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$4, {
|
|
775
783
|
isDisabled: busy || !initialized,
|
|
776
784
|
isPending: generating,
|
|
@@ -785,7 +793,7 @@ function KeyCard({ status, busy, generating, onGenerateKey, onRotate, canManage,
|
|
|
785
793
|
// frontend/src/fabric-backup/RecoveryKeyModal.tsx
|
|
786
794
|
var { Button: Button$3, StandardModal: StandardModal$1, StatusAlert: StatusAlert$6 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
787
795
|
var { Checkbox, ModalBody: ModalBody$1, ModalFooter: ModalFooter$1, ModalHeader: ModalHeader$1, ModalHeading: ModalHeading$1 } = await importShared("@heroui/react");
|
|
788
|
-
var { useState: useState$
|
|
796
|
+
var { useState: useState$5 } = await importShared("react");
|
|
789
797
|
/**
|
|
790
798
|
* The one and only place the recovery key is visible. It cannot be dismissed (no close button, no Escape, no
|
|
791
799
|
* backdrop click) until the administrator confirms they stored the key; only then is the key forgotten.
|
|
@@ -793,10 +801,10 @@ var { useState: useState$6 } = await importShared("react");
|
|
|
793
801
|
function RecoveryKeyModal({ reveal, onAcknowledge, onDone }) {
|
|
794
802
|
const { t } = useMatterTranslations();
|
|
795
803
|
const errorText = useErrorText();
|
|
796
|
-
const [confirmed, setConfirmed] = useState$
|
|
797
|
-
const [copied, setCopied] = useState$
|
|
798
|
-
const [busy, setBusy] = useState$
|
|
799
|
-
const [error, setError] = useState$
|
|
804
|
+
const [confirmed, setConfirmed] = useState$5(false);
|
|
805
|
+
const [copied, setCopied] = useState$5(false);
|
|
806
|
+
const [busy, setBusy] = useState$5(false);
|
|
807
|
+
const [error, setError] = useState$5(null);
|
|
800
808
|
const copy = async () => {
|
|
801
809
|
try {
|
|
802
810
|
await navigator.clipboard.writeText(reveal.key);
|
|
@@ -900,102 +908,79 @@ function RecoveryKeyModal({ reveal, onAcknowledge, onDone }) {
|
|
|
900
908
|
});
|
|
901
909
|
}
|
|
902
910
|
// frontend/src/fabric-backup/RecoveryPanel.tsx
|
|
903
|
-
var { Button: Button$2,
|
|
911
|
+
var { Button: Button$2, ConfirmableButton: ConfirmableButton$1, StatusAlert: StatusAlert$5 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
904
912
|
var { Card: Card$1 } = await importShared("@heroui/react");
|
|
905
|
-
var { useState: useState$5 } = await importShared("react");
|
|
906
913
|
/**
|
|
907
914
|
* Recovery options for a plugin in `recovery_required`. Each option is admin-confirmed; none runs automatically.
|
|
908
915
|
* An option the current sidecar state does not allow stays visible but disabled, with the reason.
|
|
909
916
|
*/
|
|
910
917
|
function RecoveryPanel({ status, pending, onRestore, onAcceptSidecar, onStartNew }) {
|
|
911
918
|
const { t } = useMatterTranslations();
|
|
912
|
-
const [confirm, setConfirm] = useState$5(null);
|
|
913
919
|
const canAccept = status.actions.canAcceptSidecar && status.sidecar.state === "initialized";
|
|
914
920
|
const canStartNew = status.actions.canStartNew && status.sidecar.state === "uninitialized";
|
|
915
921
|
const restoreBlocked = restoreBlocker(status);
|
|
916
922
|
const busy = pending !== null;
|
|
917
|
-
const run = async (action) => {
|
|
918
|
-
try {
|
|
919
|
-
await action();
|
|
920
|
-
} finally {
|
|
921
|
-
setConfirm(null);
|
|
922
|
-
}
|
|
923
|
-
};
|
|
924
923
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card$1, {
|
|
925
924
|
"data-cy": "matter-recovery-panel",
|
|
926
|
-
children: [
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
"data-cy": "matter-recovery-restore",
|
|
943
|
-
children: t("fabric.recovery.restoreAction")
|
|
944
|
-
})
|
|
945
|
-
}),
|
|
946
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, {
|
|
947
|
-
title: t("fabric.recovery.acceptTitle"),
|
|
948
|
-
text: canAccept ? t("fabric.recovery.acceptText") : t("fabric.recovery.acceptUnavailable"),
|
|
949
|
-
action: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$2, {
|
|
950
|
-
variant: "secondary",
|
|
951
|
-
isDisabled: busy || !canAccept,
|
|
952
|
-
onPress: () => setConfirm("accept"),
|
|
953
|
-
"data-cy": "matter-recovery-accept",
|
|
954
|
-
children: t("fabric.recovery.acceptAction")
|
|
955
|
-
})
|
|
956
|
-
}),
|
|
957
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, {
|
|
958
|
-
title: t("fabric.recovery.newTitle"),
|
|
959
|
-
text: canStartNew ? t("fabric.recovery.newText") : t("fabric.recovery.newUnavailable"),
|
|
960
|
-
action: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$2, {
|
|
961
|
-
variant: "danger-soft",
|
|
962
|
-
isDisabled: busy || !canStartNew,
|
|
963
|
-
onPress: () => setConfirm("start-new"),
|
|
964
|
-
"data-cy": "matter-recovery-new",
|
|
965
|
-
children: t("fabric.recovery.newAction")
|
|
966
|
-
})
|
|
925
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card$1.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card$1.Title, { children: t("fabric.recovery.title") }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Card$1.Content, {
|
|
926
|
+
className: "mt:flex mt:flex-col mt:gap-4",
|
|
927
|
+
children: [
|
|
928
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusAlert$5, {
|
|
929
|
+
status: "danger",
|
|
930
|
+
title: t("fabric.recovery.blocked"),
|
|
931
|
+
children: t("fabric.recovery.blockedText")
|
|
932
|
+
}),
|
|
933
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, {
|
|
934
|
+
title: t("fabric.recovery.restoreTitle"),
|
|
935
|
+
text: restoreBlocked ? t(`fabric.blocked.${restoreBlocked}`) : t("fabric.recovery.restoreText"),
|
|
936
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$2, {
|
|
937
|
+
isDisabled: busy || restoreBlocked !== null,
|
|
938
|
+
onPress: onRestore,
|
|
939
|
+
"data-cy": "matter-recovery-restore",
|
|
940
|
+
children: t("fabric.recovery.restoreAction")
|
|
967
941
|
})
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
942
|
+
}),
|
|
943
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, {
|
|
944
|
+
title: t("fabric.recovery.acceptTitle"),
|
|
945
|
+
text: canAccept ? t("fabric.recovery.acceptText") : t("fabric.recovery.acceptUnavailable"),
|
|
946
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmableButton$1, {
|
|
947
|
+
label: t("fabric.recovery.acceptAction"),
|
|
948
|
+
status: "warning",
|
|
949
|
+
isDisabled: busy || !canAccept,
|
|
950
|
+
isPending: pending === "accept",
|
|
951
|
+
onConfirm: onAcceptSidecar,
|
|
952
|
+
confirm: {
|
|
953
|
+
title: t("fabric.recovery.acceptConfirmTitle"),
|
|
954
|
+
message: t("fabric.recovery.acceptConfirmText"),
|
|
955
|
+
confirmLabel: t("fabric.recovery.acceptConfirm"),
|
|
956
|
+
"data-cy": "matter-recovery-accept-dialog",
|
|
957
|
+
confirmDataCy: "matter-recovery-accept-confirm"
|
|
958
|
+
},
|
|
959
|
+
"data-cy": "matter-recovery-accept"
|
|
960
|
+
})
|
|
961
|
+
}),
|
|
962
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, {
|
|
963
|
+
title: t("fabric.recovery.newTitle"),
|
|
964
|
+
text: canStartNew ? t("fabric.recovery.newText") : t("fabric.recovery.newUnavailable"),
|
|
965
|
+
action: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmableButton$1, {
|
|
966
|
+
label: t("fabric.recovery.newAction"),
|
|
967
|
+
status: "error",
|
|
968
|
+
buttonProps: { variant: "danger-soft" },
|
|
969
|
+
isDisabled: busy || !canStartNew,
|
|
970
|
+
isPending: pending === "startNew",
|
|
971
|
+
onConfirm: onStartNew,
|
|
972
|
+
confirm: {
|
|
973
|
+
title: t("fabric.recovery.newConfirmTitle"),
|
|
974
|
+
message: t("fabric.recovery.newConfirmText"),
|
|
975
|
+
confirmLabel: t("fabric.recovery.newConfirm"),
|
|
976
|
+
"data-cy": "matter-recovery-new-dialog",
|
|
977
|
+
confirmDataCy: "matter-recovery-new-confirm"
|
|
978
|
+
},
|
|
979
|
+
"data-cy": "matter-recovery-new"
|
|
980
|
+
})
|
|
981
|
+
})
|
|
982
|
+
]
|
|
983
|
+
})]
|
|
999
984
|
});
|
|
1000
985
|
}
|
|
1001
986
|
function Option({ title, text, action }) {
|
|
@@ -1014,7 +999,7 @@ function Option({ title, text, action }) {
|
|
|
1014
999
|
});
|
|
1015
1000
|
}
|
|
1016
1001
|
// frontend/src/fabric-backup/RestoreSourceStep.tsx
|
|
1017
|
-
var { PasswordInput: PasswordInput$1, StatusAlert: StatusAlert$4, useDateTimeFormatter: useDateTimeFormatter$4 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1002
|
+
var { FileInput, PasswordInput: PasswordInput$1, StatusAlert: StatusAlert$4, useDateTimeFormatter: useDateTimeFormatter$4 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1018
1003
|
var { Description: Description$1, Label: Label$2, Radio, RadioGroup } = await importShared("@heroui/react");
|
|
1019
1004
|
/** Codes after which the backup has to be validated again: the wizard returns here with source and key kept. */
|
|
1020
1005
|
var RETRY_CODES = /* @__PURE__ */ new Set([
|
|
@@ -1079,10 +1064,8 @@ function RestoreSourceStep(props) {
|
|
|
1079
1064
|
onBackupId: props.onBackupId
|
|
1080
1065
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
|
|
1081
1066
|
className: "mt:flex mt:flex-col mt:gap-1 mt:text-sm",
|
|
1082
|
-
children: [t("fabric.restore.file"), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1083
|
-
type: "file",
|
|
1067
|
+
children: [t("fabric.restore.file"), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FileInput, {
|
|
1084
1068
|
accept: ".attraccess-matter-backup,application/octet-stream",
|
|
1085
|
-
className: "mt:block mt:w-full mt:cursor-pointer mt:text-sm mt:file:mr-3 mt:file:cursor-pointer mt:file:rounded-lg mt:file:border-0 mt:file:bg-default mt:file:px-3 mt:file:py-1.5 mt:file:text-sm mt:file:font-medium mt:file:text-foreground",
|
|
1086
1069
|
onChange: (event) => props.onFile(event.target.files?.[0] ?? null),
|
|
1087
1070
|
"data-cy": "matter-restore-file"
|
|
1088
1071
|
})]
|
|
@@ -1461,7 +1444,6 @@ function FabricBackupSection({ canManage }) {
|
|
|
1461
1444
|
const [pending, setPending] = useState$2(null);
|
|
1462
1445
|
const [notice, setNotice] = useState$2(null);
|
|
1463
1446
|
const [restoring, setRestoring] = useState$2(false);
|
|
1464
|
-
const [rotating, setRotating] = useState$2(false);
|
|
1465
1447
|
const act = async (name, title, action, keyOf) => {
|
|
1466
1448
|
setPending(name);
|
|
1467
1449
|
try {
|
|
@@ -1487,12 +1469,8 @@ function FabricBackupSection({ canManage }) {
|
|
|
1487
1469
|
await refresh();
|
|
1488
1470
|
});
|
|
1489
1471
|
const rotate = () => act("rotate", t("fabric.key.rotateError"), async () => {
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
} finally {
|
|
1493
|
-
setRotating(false);
|
|
1494
|
-
}
|
|
1495
|
-
await refresh();
|
|
1472
|
+
showKey(await rotateRecoveryKey());
|
|
1473
|
+
refresh();
|
|
1496
1474
|
});
|
|
1497
1475
|
const backup = () => act("backup", t("fabric.backups.error"), async () => {
|
|
1498
1476
|
await backUpNow();
|
|
@@ -1529,9 +1507,10 @@ function FabricBackupSection({ canManage }) {
|
|
|
1529
1507
|
status,
|
|
1530
1508
|
busy,
|
|
1531
1509
|
generating: pending === "generateKey",
|
|
1510
|
+
rotating: pending === "rotate",
|
|
1532
1511
|
canManage,
|
|
1533
1512
|
onGenerateKey: () => void generateKey(),
|
|
1534
|
-
onRotate:
|
|
1513
|
+
onRotate: rotate,
|
|
1535
1514
|
formatDateTime
|
|
1536
1515
|
}),
|
|
1537
1516
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BackupsCard, {
|
|
@@ -1572,20 +1551,6 @@ function FabricBackupSection({ canManage }) {
|
|
|
1572
1551
|
},
|
|
1573
1552
|
onRestored: setStatus
|
|
1574
1553
|
}),
|
|
1575
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusDialog$1, {
|
|
1576
|
-
isOpen: rotating,
|
|
1577
|
-
status: "warning",
|
|
1578
|
-
title: t("fabric.key.rotateTitle"),
|
|
1579
|
-
onClose: () => setRotating(false),
|
|
1580
|
-
action: {
|
|
1581
|
-
label: t("fabric.key.rotateConfirm"),
|
|
1582
|
-
isPending: pending === "rotate",
|
|
1583
|
-
onPress: rotate,
|
|
1584
|
-
"data-cy": "matter-rotate-confirm"
|
|
1585
|
-
},
|
|
1586
|
-
"data-cy": "matter-rotate-dialog",
|
|
1587
|
-
children: t("fabric.key.rotateText")
|
|
1588
|
-
}),
|
|
1589
1554
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusDialog$1, {
|
|
1590
1555
|
isOpen: notice !== null,
|
|
1591
1556
|
status: "error",
|
|
@@ -1619,7 +1584,7 @@ function useMatterPermissions() {
|
|
|
1619
1584
|
};
|
|
1620
1585
|
}
|
|
1621
1586
|
// frontend/src/SettingsForm.tsx
|
|
1622
|
-
var { Button, PasswordInput, StatusDialog, useDateTimeFormatter: useDateTimeFormatter$1 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1587
|
+
var { Button, ConfirmableButton, PasswordInput, StatusDialog, useDateTimeFormatter: useDateTimeFormatter$1 } = await importShared("@attraccess/plugins-frontend-ui");
|
|
1623
1588
|
var { Description, Form, Input, Label, TextArea, TextField } = await importShared("@heroui/react");
|
|
1624
1589
|
var { useState: useState$1 } = await importShared("react");
|
|
1625
1590
|
var messageOf$1 = (error) => error instanceof Error ? error.message : String(error);
|
|
@@ -1781,12 +1746,18 @@ function SettingsForm({ settings, onSave, onRemove }) {
|
|
|
1781
1746
|
isPending: busy,
|
|
1782
1747
|
"data-cy": "matter-save",
|
|
1783
1748
|
children: t("form.save")
|
|
1784
|
-
}), settings.url !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1785
|
-
|
|
1749
|
+
}), settings.url !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfirmableButton, {
|
|
1750
|
+
label: t("form.remove"),
|
|
1751
|
+
status: "error",
|
|
1786
1752
|
isDisabled: busy,
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1753
|
+
onConfirm: remove,
|
|
1754
|
+
confirm: {
|
|
1755
|
+
title: t("form.removeTitle"),
|
|
1756
|
+
message: t("form.removeText"),
|
|
1757
|
+
confirmLabel: t("form.removeConfirm"),
|
|
1758
|
+
"data-cy": "matter-remove-dialog"
|
|
1759
|
+
},
|
|
1760
|
+
"data-cy": "matter-remove"
|
|
1790
1761
|
})]
|
|
1791
1762
|
})
|
|
1792
1763
|
]
|
|
@@ -1806,22 +1777,6 @@ function SettingsForm({ settings, onSave, onRemove }) {
|
|
|
1806
1777
|
onClose: () => setNotice(null),
|
|
1807
1778
|
"data-cy": "matter-error-dialog",
|
|
1808
1779
|
children: notice?.kind === "error" ? notice.message : ""
|
|
1809
|
-
}),
|
|
1810
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatusDialog, {
|
|
1811
|
-
isOpen: notice?.kind === "remove",
|
|
1812
|
-
status: "warning",
|
|
1813
|
-
title: t("form.removeTitle"),
|
|
1814
|
-
onClose: () => setNotice(null),
|
|
1815
|
-
action: {
|
|
1816
|
-
label: t("form.removeConfirm"),
|
|
1817
|
-
isPending: busy,
|
|
1818
|
-
onPress: async () => {
|
|
1819
|
-
setNotice(null);
|
|
1820
|
-
await remove();
|
|
1821
|
-
}
|
|
1822
|
-
},
|
|
1823
|
-
"data-cy": "matter-remove-dialog",
|
|
1824
|
-
children: t("form.removeText")
|
|
1825
1780
|
})
|
|
1826
1781
|
]
|
|
1827
1782
|
});
|
|
@@ -1873,7 +1828,7 @@ function baseHintKey(status) {
|
|
|
1873
1828
|
if (status.reasonDetail === "host version unavailable") return "hint.hostVersion";
|
|
1874
1829
|
return `hint.${status.reason ?? "unavailable"}`;
|
|
1875
1830
|
}
|
|
1876
|
-
/** The lowest Attraccess version of the first supported combination, e.g. `
|
|
1831
|
+
/** The lowest Attraccess version of the first supported combination, e.g. `2.0.0` for `^2.0.0`. */
|
|
1877
1832
|
function minimumAttraccess(status) {
|
|
1878
1833
|
const range = status.supported[0]?.attraccess ?? "";
|
|
1879
1834
|
return range.match(/\d+\.\d+\.\d+/)?.[0] ?? range;
|
|
@@ -2161,7 +2116,7 @@ function MatterPage() {
|
|
|
2161
2116
|
var { CableIcon } = await importShared("lucide-react");
|
|
2162
2117
|
var MatterPlugin = class {
|
|
2163
2118
|
getPluginName() {
|
|
2164
|
-
return "matter-plugin@0.
|
|
2119
|
+
return "matter-plugin@0.5.0";
|
|
2165
2120
|
}
|
|
2166
2121
|
getDependencies() {
|
|
2167
2122
|
return [];
|
package/frontend/remoteEntry.js
CHANGED
|
@@ -8,7 +8,7 @@ var exportSet = /* @__PURE__ */ new Set([
|
|
|
8
8
|
]);
|
|
9
9
|
var moduleMap = { "./plugin": () => {
|
|
10
10
|
dynamicLoadingCss(["style.css"], false, "./plugin");
|
|
11
|
-
return __federation_import("./__federation_expose_Plugin-
|
|
11
|
+
return __federation_import("./__federation_expose_Plugin-BhusgEmE.js").then((module) => Object.keys(module).every((item) => exportSet.has(item)) ? () => module.default : () => module);
|
|
12
12
|
} };
|
|
13
13
|
var seen = {};
|
|
14
14
|
var dynamicLoadingCss = (cssFilePaths, dontAppendStylesToHead, exposeItemName) => {
|
package/frontend/style.css
CHANGED
|
@@ -90,10 +90,6 @@
|
|
|
90
90
|
flex-shrink: 0;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.mt\:cursor-pointer {
|
|
94
|
-
cursor: pointer;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
93
|
.mt\:list-disc {
|
|
98
94
|
list-style-type: disc;
|
|
99
95
|
}
|
|
@@ -233,49 +229,6 @@
|
|
|
233
229
|
user-select: all;
|
|
234
230
|
}
|
|
235
231
|
|
|
236
|
-
.mt\:file\:mr-3::file-selector-button {
|
|
237
|
-
margin-right: calc(var(--mt-spacing) * 3);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.mt\:file\:cursor-pointer::file-selector-button {
|
|
241
|
-
cursor: pointer;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.mt\:file\:rounded-lg::file-selector-button {
|
|
245
|
-
border-radius: calc(var(--radius) * 1);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.mt\:file\:border-0::file-selector-button {
|
|
249
|
-
border-style: var(--tw-border-style);
|
|
250
|
-
border-width: 0;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.mt\:file\:bg-default::file-selector-button {
|
|
254
|
-
background-color: var(--default);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.mt\:file\:px-3::file-selector-button {
|
|
258
|
-
padding-inline: calc(var(--mt-spacing) * 3);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.mt\:file\:py-1\.5::file-selector-button {
|
|
262
|
-
padding-block: calc(var(--mt-spacing) * 1.5);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.mt\:file\:text-sm::file-selector-button {
|
|
266
|
-
font-size: var(--mt-text-sm);
|
|
267
|
-
line-height: var(--tw-leading, var(--mt-text-sm--line-height));
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.mt\:file\:font-medium::file-selector-button {
|
|
271
|
-
--tw-font-weight: var(--mt-font-weight-medium);
|
|
272
|
-
font-weight: var(--mt-font-weight-medium);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.mt\:file\:text-foreground::file-selector-button {
|
|
276
|
-
color: var(--foreground);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
232
|
@media (min-width: 40rem) {
|
|
280
233
|
.mt\:sm\:grid-cols-2 {
|
|
281
234
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attraccess/plugin-matter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Official Attraccess integration for Matter devices. Connects to the Matter sidecar; no device features yet.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"repository": {
|
|
@@ -22,30 +22,29 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@attraccess/plugins-backend-sdk": "^
|
|
26
|
-
"@attraccess/plugins-frontend-sdk": "^
|
|
27
|
-
"@attraccess/plugins-frontend-ui": "^
|
|
25
|
+
"@attraccess/plugins-backend-sdk": "^2.0.0-0",
|
|
26
|
+
"@attraccess/plugins-frontend-sdk": "^2.0.0-0",
|
|
27
|
+
"@attraccess/plugins-frontend-ui": "^2.0.0-0"
|
|
28
28
|
},
|
|
29
29
|
"attraccess": {
|
|
30
30
|
"displayName": "Matter",
|
|
31
31
|
"description": "Matter device support for Attraccess. Secure connection to the Matter sidecar; device features follow.",
|
|
32
|
-
"host": "^
|
|
32
|
+
"host": "^2.0.0-0",
|
|
33
33
|
"backend": "dist/index.js",
|
|
34
34
|
"frontend": "frontend/remoteEntry.js",
|
|
35
|
-
"migrations": "dist/migrations.js",
|
|
36
35
|
"styles": "frontend/style.css",
|
|
37
36
|
"dashboardPaths": [
|
|
38
37
|
"/matter"
|
|
39
38
|
],
|
|
40
39
|
"permissions": [
|
|
41
|
-
"
|
|
40
|
+
"PLUGIN_STORAGE",
|
|
42
41
|
"MANAGE_SECRETS"
|
|
43
42
|
],
|
|
44
43
|
"sdk": {
|
|
45
|
-
"backend": "^
|
|
46
|
-
"frontend": "^
|
|
44
|
+
"backend": "^2.0.0-0",
|
|
45
|
+
"frontend": "^2.0.0-0"
|
|
47
46
|
},
|
|
48
|
-
"publishedCommit": "
|
|
47
|
+
"publishedCommit": "aba5a1a9b7e143c00bc771d59018684546f0f336"
|
|
49
48
|
},
|
|
50
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "aba5a1a9b7e143c00bc771d59018684546f0f336"
|
|
51
50
|
}
|