@cobaltcore-dev/aurora 0.18.0 → 0.19.1

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.
Files changed (119) hide show
  1. package/dist/client/App.d.ts +12 -0
  2. package/dist/client/{BucketToastNotifications-D2Cq2VrV.mjs → BucketToastNotifications-BGd2wVmh.mjs} +2 -2
  3. package/dist/client/{BucketToastNotifications-D2Cq2VrV.mjs.map → BucketToastNotifications-BGd2wVmh.mjs.map} +1 -1
  4. package/dist/client/DeletePcaModal-BU6kbKsw.mjs +80 -0
  5. package/dist/client/DeletePcaModal-BU6kbKsw.mjs.map +1 -0
  6. package/dist/client/DetailsInfo-BUyuYpJj.mjs +52 -0
  7. package/dist/client/DetailsInfo-BUyuYpJj.mjs.map +1 -0
  8. package/dist/client/{FloatingIpActionModals-sJlSFIsK.mjs → FloatingIpActionModals-DAtZoYGS.mjs} +22 -22
  9. package/dist/client/{FloatingIpActionModals-sJlSFIsK.mjs.map → FloatingIpActionModals-DAtZoYGS.mjs.map} +1 -1
  10. package/dist/client/{ImageToastNotifications-CISH3c_d.mjs → ImageToastNotifications-BhjU1bfT.mjs} +7 -7
  11. package/dist/client/{ImageToastNotifications-CISH3c_d.mjs.map → ImageToastNotifications-BhjU1bfT.mjs.map} +1 -1
  12. package/dist/client/{_flavorId-Cx5tf2KQ.mjs → _flavorId-BQY7YhNx.mjs} +2 -2
  13. package/dist/client/{_flavorId-Cx5tf2KQ.mjs.map → _flavorId-BQY7YhNx.mjs.map} +1 -1
  14. package/dist/client/{_flavorId-C6RJfhh8.mjs → _flavorId-sS1sg_DZ.mjs} +3 -3
  15. package/dist/client/{_flavorId-C6RJfhh8.mjs.map → _flavorId-sS1sg_DZ.mjs.map} +1 -1
  16. package/dist/client/{_floatingIpId-C4Sa8tMa.mjs → _floatingIpId-BHZGh8U8.mjs} +2 -2
  17. package/dist/client/{_floatingIpId-C4Sa8tMa.mjs.map → _floatingIpId-BHZGh8U8.mjs.map} +1 -1
  18. package/dist/client/{_floatingIpId-CAUBZ5WD2.mjs → _floatingIpId-CR3aD38l2.mjs} +5 -5
  19. package/dist/client/{_floatingIpId-CAUBZ5WD2.mjs.map → _floatingIpId-CR3aD38l2.mjs.map} +1 -1
  20. package/dist/client/{_imageId-DpXNAIbD.mjs → _imageId-Cf-Xdksv.mjs} +3 -3
  21. package/dist/client/{_imageId-DpXNAIbD.mjs.map → _imageId-Cf-Xdksv.mjs.map} +1 -1
  22. package/dist/client/_pcaId-B7j0sXnY.mjs +545 -0
  23. package/dist/client/_pcaId-B7j0sXnY.mjs.map +1 -0
  24. package/dist/client/{_projectId-fEA6fnFQ.mjs → _projectId-Cq9JnhRj.mjs} +3 -3
  25. package/dist/client/{_projectId-fEA6fnFQ.mjs.map → _projectId-Cq9JnhRj.mjs.map} +1 -1
  26. package/dist/client/{_projectId-w-tZz0FI.mjs → _projectId-D8FHe0gr.mjs} +2 -2
  27. package/dist/client/{_projectId-w-tZz0FI.mjs.map → _projectId-D8FHe0gr.mjs.map} +1 -1
  28. package/dist/client/{_projectId-qvINx3Dx.mjs → _projectId-Ig3QqYzt.mjs} +2 -2
  29. package/dist/client/{_projectId-qvINx3Dx.mjs.map → _projectId-Ig3QqYzt.mjs.map} +1 -1
  30. package/dist/client/{_projectId-BOaPmCuz.mjs → _projectId-b4NGeECR.mjs} +3 -3
  31. package/dist/client/{_projectId-BOaPmCuz.mjs.map → _projectId-b4NGeECR.mjs.map} +1 -1
  32. package/dist/client/{_securityGroupId-B6_lD8ry.mjs → _securityGroupId-BVSsCus9.mjs} +2 -2
  33. package/dist/client/{_securityGroupId-B6_lD8ry.mjs.map → _securityGroupId-BVSsCus9.mjs.map} +1 -1
  34. package/dist/client/{_securityGroupId-D9FHSkNU.mjs → _securityGroupId-gwV4eB0s.mjs} +16 -16
  35. package/dist/client/{_securityGroupId-D9FHSkNU.mjs.map → _securityGroupId-gwV4eB0s.mjs.map} +1 -1
  36. package/dist/client/{_storageType-ZFnIALny.mjs → _storageType-CH2khFcZ.mjs} +2 -2
  37. package/dist/client/{_storageType-ZFnIALny.mjs.map → _storageType-CH2khFcZ.mjs.map} +1 -1
  38. package/dist/client/{_storageType-MgntkZb6.mjs → _storageType-D-1H6SX1.mjs} +856 -856
  39. package/dist/client/{_storageType-MgntkZb6.mjs.map → _storageType-D-1H6SX1.mjs.map} +1 -1
  40. package/dist/client/analytics/setupRouterAnalytics.d.ts +20 -0
  41. package/dist/client/assets/__mocks__/svgMock.d.ts +3 -0
  42. package/dist/client/build-DgeVmENN.mjs.map +1 -1
  43. package/dist/client/components/Auth/SessionExpirationTimer.d.ts +4 -0
  44. package/dist/client/components/ClipboardText.d.ts +10 -0
  45. package/dist/client/components/ContentHeader/ContentHeader.d.ts +10 -0
  46. package/dist/client/components/Error/RouteError.d.ts +9 -0
  47. package/dist/client/components/Error/StatusError.d.ts +11 -0
  48. package/dist/client/components/JsonEditor.d.ts +39 -0
  49. package/dist/client/components/ListToolbar/FiltersInput.d.ts +6 -0
  50. package/dist/client/components/ListToolbar/SelectedFilters.d.ts +24 -0
  51. package/dist/client/components/ListToolbar/SortInput.d.ts +11 -0
  52. package/dist/client/components/ListToolbar/index.d.ts +26 -0
  53. package/dist/client/components/ListToolbar/types.d.ts +116 -0
  54. package/dist/client/components/ProjectView/ProjectInfoBox.d.ts +12 -0
  55. package/dist/client/components/Slot.d.ts +7 -0
  56. package/dist/client/components/navigation/LanguageSelect.d.ts +3 -0
  57. package/dist/client/components/navigation/MainNavigation.d.ts +10 -0
  58. package/dist/client/components/navigation/UserMenu.d.ts +1 -0
  59. package/dist/client/components/navigation/types.d.ts +4 -0
  60. package/dist/client/{floatingips-DOGKGGkC.mjs → floatingips-DyBEotB8.mjs} +10 -10
  61. package/dist/client/{floatingips-DOGKGGkC.mjs.map → floatingips-DyBEotB8.mjs.map} +1 -1
  62. package/dist/client/hooks/index.d.ts +15 -0
  63. package/dist/client/hooks/useDomainId.d.ts +21 -0
  64. package/dist/client/hooks/useModalTracking.d.ts +33 -0
  65. package/dist/client/hooks/useProjectId.d.ts +22 -0
  66. package/dist/client/hooks-iGiEkLTp.mjs +12 -0
  67. package/dist/client/hooks-iGiEkLTp.mjs.map +1 -0
  68. package/dist/client/{images-B1wqMKYw.mjs → images-BklbSacK.mjs} +2 -2
  69. package/dist/client/{images-B1wqMKYw.mjs.map → images-BklbSacK.mjs.map} +1 -1
  70. package/dist/client/{images-D5UsQi8i.mjs → images-C3voJ3B1.mjs} +259 -259
  71. package/dist/client/{images-D5UsQi8i.mjs.map → images-C3voJ3B1.mjs.map} +1 -1
  72. package/dist/client/index.d.ts +2 -0
  73. package/dist/client/index.js +337 -344
  74. package/dist/client/index.js.map +1 -1
  75. package/dist/client/md-CyCflQee.mjs.map +1 -1
  76. package/dist/client/{objects-DpgXMFrG.mjs → objects-B3Z8h4RU.mjs} +2 -2
  77. package/dist/client/{objects-DpgXMFrG.mjs.map → objects-B3Z8h4RU.mjs.map} +1 -1
  78. package/dist/client/{objects-Deo1Ic1A.mjs → objects-CGOfO00N.mjs} +499 -475
  79. package/dist/client/objects-CGOfO00N.mjs.map +1 -0
  80. package/dist/client/{pca-DztTIs18.mjs → pca-72YR_Pk0.mjs} +3 -3
  81. package/dist/client/pca-72YR_Pk0.mjs.map +1 -0
  82. package/dist/client/pca-CsBx_IDO.mjs +251 -0
  83. package/dist/client/pca-CsBx_IDO.mjs.map +1 -0
  84. package/dist/client/pcaAccess-Br4kVjLQ.mjs +9 -0
  85. package/dist/client/pcaAccess-Br4kVjLQ.mjs.map +1 -0
  86. package/dist/client/router.d.ts +7 -0
  87. package/dist/client/{securitygroups-BRtHaTLm.mjs → securitygroups-8vRbXmBL.mjs} +3 -3
  88. package/dist/client/{securitygroups-BRtHaTLm.mjs.map → securitygroups-8vRbXmBL.mjs.map} +1 -1
  89. package/dist/client/store/AuthProvider.d.ts +23 -0
  90. package/dist/client/trpcClient-BxcNKnhv.mjs +65 -0
  91. package/dist/client/trpcClient-BxcNKnhv.mjs.map +1 -0
  92. package/dist/client/trpcClient.d.ts +56 -49
  93. package/dist/client/utils/buildFilterParams.d.ts +5 -0
  94. package/dist/client/utils/cn.d.ts +27 -0
  95. package/dist/client/utils/formatBytes.d.ts +40 -0
  96. package/dist/client/utils/formatFloatingIpStatus.d.ts +6 -0
  97. package/dist/client/utils/languageDetection.d.ts +11 -0
  98. package/dist/client/utils/trpcErrors.d.ts +13 -0
  99. package/dist/client/utils/useErrorTranslation.d.ts +4 -0
  100. package/dist/client/utils/useListWithFiltering.d.ts +84 -0
  101. package/dist/client/utils/useModal.d.ts +3 -0
  102. package/dist/server/index.d.ts +51 -49
  103. package/dist/server/index.js +53 -23
  104. package/package.json +4 -2
  105. package/dist/client/_pcaId-DY9GPV7t.mjs +0 -479
  106. package/dist/client/_pcaId-DY9GPV7t.mjs.map +0 -1
  107. package/dist/client/_pcaId-ldtkXsbp.mjs +0 -36
  108. package/dist/client/_pcaId-ldtkXsbp.mjs.map +0 -1
  109. package/dist/client/constants-COPE2ktv.mjs +0 -153
  110. package/dist/client/constants-COPE2ktv.mjs.map +0 -1
  111. package/dist/client/hooks-DvdvErNv.mjs +0 -2
  112. package/dist/client/objects-Deo1Ic1A.mjs.map +0 -1
  113. package/dist/client/pca-B7WldCGw.mjs +0 -202
  114. package/dist/client/pca-B7WldCGw.mjs.map +0 -1
  115. package/dist/client/pca-DztTIs18.mjs.map +0 -1
  116. package/dist/client/pcaAccess-BYUY700H.mjs +0 -9
  117. package/dist/client/pcaAccess-BYUY700H.mjs.map +0 -1
  118. package/dist/client/trpcClient-Dy_MP_Pv.mjs +0 -57
  119. package/dist/client/trpcClient-Dy_MP_Pv.mjs.map +0 -1
@@ -0,0 +1,33 @@
1
+ interface UseModalTrackingOptions {
2
+ isOpen: boolean;
3
+ actionPrefix: string;
4
+ }
5
+ interface UseModalTrackingReturn {
6
+ trackClose: () => void;
7
+ markSubmitted: () => void;
8
+ resetTracking: () => void;
9
+ }
10
+ /**
11
+ * Custom hook to handle modal open/close analytics tracking.
12
+ *
13
+ * Tracks:
14
+ * - `.open` event when modal opens (once per modal open)
15
+ * - `.close` event when modal closes without submission (cancelled)
16
+ *
17
+ * @example
18
+ * const { trackClose, markSubmitted, resetTracking } = useModalTracking({
19
+ * isOpen,
20
+ * actionPrefix: "storage.ceph.bucket.create"
21
+ * })
22
+ *
23
+ * // In handleClose:
24
+ * trackClose()
25
+ *
26
+ * // In handleSubmit:
27
+ * markSubmitted()
28
+ *
29
+ * // In cleanup/reset:
30
+ * resetTracking()
31
+ */
32
+ export declare const useModalTracking: ({ isOpen, actionPrefix }: UseModalTrackingOptions) => UseModalTrackingReturn;
33
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Extract projectId from the current URL.
3
+ *
4
+ * This hook works with both old and new route structures:
5
+ * - Old: /accounts/:accountId/projects/:projectId/...
6
+ * - New: /projects/:projectId/...
7
+ *
8
+ * @throws {Error} If used outside of a project route context
9
+ * @returns {string} The current project ID from URL params
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * function SecurityGroupsList() {
14
+ * const projectId = useProjectId()
15
+ *
16
+ * const { data } = trpc.network.securityGroup.list.useQuery({
17
+ * project_id: projectId
18
+ * })
19
+ * }
20
+ * ```
21
+ */
22
+ export declare function useProjectId(): string;
@@ -0,0 +1,12 @@
1
+ import { n as e } from "./AuthProvider-Cj_Btfnc.mjs";
2
+ import "./useProjectId-DBc5lpoU.mjs";
3
+ //#region src/client/hooks/useDomainId.ts
4
+ function t() {
5
+ let { user: t } = e(), n = t?.domain?.id;
6
+ if (!n) throw Error("useDomainId() requires an authenticated user with a domain. This is likely an authentication error. Ensure the user is logged in and has a domain assigned.");
7
+ return n;
8
+ }
9
+ //#endregion
10
+ export { t };
11
+
12
+ //# sourceMappingURL=hooks-iGiEkLTp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks-iGiEkLTp.mjs","names":["useAuth","useDomainId","user","domainId","domain","id","Error"],"sources":["../../src/client/hooks/useDomainId.ts"],"sourcesContent":["import { useAuth } from \"@/client/store/AuthProvider\"\n\n/**\n * Get the current user's domain ID from the authentication context.\n *\n * This hook provides access to the domain ID of the currently authenticated user.\n * The domain ID is obtained from the user's session, not from URL parameters.\n *\n * @throws {Error} If user is not authenticated or domain ID is not available\n * @returns {string} The current domain ID from the user's session\n *\n * @example\n * ```tsx\n * function UsersList() {\n * const domainId = useDomainId()\n *\n * const { data } = trpc.identity.users.list.useQuery({\n * domain_id: domainId\n * })\n * }\n * ```\n */\nexport function useDomainId(): string {\n const { user } = useAuth()\n\n const domainId = user?.domain?.id\n\n if (!domainId) {\n throw new Error(\n \"useDomainId() requires an authenticated user with a domain. \" +\n \"This is likely an authentication error. \" +\n \"Ensure the user is logged in and has a domain assigned.\"\n )\n }\n\n return domainId\n}\n"],"mappings":";;;AAsBA,SAAgBC,IAAAA;CACd,IAAM,EAAEC,YAASF,EAAAA,GAEXG,IAAWD,GAAME,QAAQC;CAE/B,IAAI,CAACF,GACH,MAAUG,MACR,6JAEE;CAIN,OAAOH;AACT"}
@@ -9,9 +9,9 @@ var r = e("/_auth/projects/$projectId/compute/images/")({
9
9
  crumb: { labelKey: "Images" }
10
10
  },
11
11
  head: () => ({ meta: [{ title: n._({ id: "an5hVd" }) }] }),
12
- component: t(() => import("./images-D5UsQi8i.mjs"), "component")
12
+ component: t(() => import("./images-C3voJ3B1.mjs"), "component")
13
13
  });
14
14
  //#endregion
15
15
  export { r as t };
16
16
 
17
- //# sourceMappingURL=images-B1wqMKYw.mjs.map
17
+ //# sourceMappingURL=images-BklbSacK.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"images-B1wqMKYw.mjs","names":["createFileRoute","t","Route","staticData","section","service","analytics","name","sectionCrumb","labelKey","crumb","RouteInfo","head","meta","title","component","lazyRouteComponent","$$splitComponentImporter"],"sources":["../../src/client/routes/_auth/projects/$projectId/compute/images/index.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\"\nimport { t } from \"@lingui/core/macro\"\nimport { useLingui } from \"@lingui/react/macro\"\nimport { Images } from \"../-components/Images/List\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\nimport { ContentHeader } from \"@/client/components/ContentHeader/ContentHeader\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/compute/images/\")({\n staticData: {\n section: \"compute\",\n service: \"images\",\n analytics: {\n name: \"compute.images.list\",\n },\n sectionCrumb: { labelKey: \"Compute\" },\n crumb: { labelKey: \"Images\" },\n } satisfies RouteInfo,\n head: () => ({ meta: [{ title: t`Images` }] }),\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n const { t } = useLingui()\n const { projectId } = Route.useParams()\n const { trpcClient } = Route.useRouteContext()\n\n if (!trpcClient) {\n throw new Error(\"trpcClient is not available in route context\")\n }\n\n return (\n <>\n <ContentHeader title={t`Images`} projectId={projectId} />\n <Images client={trpcClient} project={projectId} />\n </>\n )\n}\n"],"mappings":";;AAOA,IAAaE,IAAQF,EAAgB,4CAAA,EAA8C;CACjFG,YAAY;EACVC,SAAS;EACTC,SAAS;EACTC,WAAW,EACTC,MAAM,sBACR;EACAC,cAAc,EAAEC,UAAU,UAAU;EACpCC,OAAO,EAAED,UAAU,SAAS;CAC9B;CACAG,aAAa,EAAEC,MAAM,CAAC,EAAEC,OAAOb,EAAAA,EAAC,EAAA,IAAA,SAAA,CAAA,EAAS,CAAA,EAAG;CAC5Cc,WAASC,yCAAA,WAAA;AACX,CAAA"}
1
+ {"version":3,"file":"images-BklbSacK.mjs","names":["createFileRoute","t","Route","staticData","section","service","analytics","name","sectionCrumb","labelKey","crumb","RouteInfo","head","meta","title","component","lazyRouteComponent","$$splitComponentImporter"],"sources":["../../src/client/routes/_auth/projects/$projectId/compute/images/index.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\"\nimport { t } from \"@lingui/core/macro\"\nimport { useLingui } from \"@lingui/react/macro\"\nimport { Images } from \"../-components/Images/List\"\nimport type { RouteInfo } from \"@/client/routes/routeInfo\"\nimport { ContentHeader } from \"@/client/components/ContentHeader/ContentHeader\"\n\nexport const Route = createFileRoute(\"/_auth/projects/$projectId/compute/images/\")({\n staticData: {\n section: \"compute\",\n service: \"images\",\n analytics: {\n name: \"compute.images.list\",\n },\n sectionCrumb: { labelKey: \"Compute\" },\n crumb: { labelKey: \"Images\" },\n } satisfies RouteInfo,\n head: () => ({ meta: [{ title: t`Images` }] }),\n component: RouteComponent,\n})\n\nfunction RouteComponent() {\n const { t } = useLingui()\n const { projectId } = Route.useParams()\n const { trpcClient } = Route.useRouteContext()\n\n if (!trpcClient) {\n throw new Error(\"trpcClient is not available in route context\")\n }\n\n return (\n <>\n <ContentHeader title={t`Images`} projectId={projectId} />\n <Images client={trpcClient} project={projectId} />\n </>\n )\n}\n"],"mappings":";;AAOA,IAAaE,IAAQF,EAAgB,4CAAA,EAA8C;CACjFG,YAAY;EACVC,SAAS;EACTC,SAAS;EACTC,WAAW,EACTC,MAAM,sBACR;EACAC,cAAc,EAAEC,UAAU,UAAU;EACpCC,OAAO,EAAED,UAAU,SAAS;CAC9B;CACAG,aAAa,EAAEC,MAAM,CAAC,EAAEC,OAAOb,EAAAA,EAAC,EAAA,IAAA,SAAA,CAAA,EAAS,CAAA,EAAG;CAC5Cc,WAASC,yCAAA,WAAA;AACX,CAAA"}