@ultrst-armada/floks 1.14.0 → 1.14.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 (26) hide show
  1. package/.krusbl-release-attestation.json +3 -3
  2. package/index.d.ts +3 -3
  3. package/package.json +10 -8
  4. package/packages/canvas-ui/dist/index.js +9 -9
  5. package/packages/canvas-ui/dist/predictive/PredictiveGhostNodeCard.d.ts +2 -2
  6. package/packages/canvas-ui/package.json +1 -1
  7. package/packages/ui/dist/{chunk-YQL4AGPU.js → chunk-OMNGRMJY.js} +59 -136
  8. package/packages/ui/dist/components/workspace/WorkspaceCreateDialog.d.ts +15 -18
  9. package/packages/ui/dist/components/workspace/WorkspaceTilesMenu.d.ts +3 -5
  10. package/packages/ui/dist/components/workspace/index.js +1 -1
  11. package/packages/ui/dist/index.js +1 -1
  12. package/packages/ui/dist/palette/ThemeContext.d.ts +1 -1
  13. package/packages/ui/dist/palette/domThemeInjector.d.ts +1 -1
  14. package/packages/ui/dist/palette/index.d.ts +4 -4
  15. package/packages/ui/dist/palette/palettes.d.ts +1 -1
  16. package/packages/ui/dist/palette/palettesBase.d.ts +1 -1
  17. package/packages/ui/dist/palette/palettesExtended.d.ts +1 -1
  18. package/packages/ui/dist/runtime-entrypoint.test.d.ts +1 -0
  19. package/packages/ui/dist/theme/packs/docustack-cyberpunk-neon/index.d.ts +1 -1
  20. package/packages/ui/dist/theme/packs/docustack-cyberpunk-neon/manifest.json +8 -0
  21. package/packages/ui/dist/theme/packs/docustack-dark-gold/index.d.ts +1 -1
  22. package/packages/ui/dist/theme/packs/docustack-dark-gold/manifest.json +8 -0
  23. package/packages/ui/dist/theme/packs/docustack-warm-coffee/index.d.ts +1 -1
  24. package/packages/ui/dist/theme/packs/docustack-warm-coffee/manifest.json +8 -0
  25. package/packages/ui/package.json +2 -2
  26. package/scripts/normalize-package-declarations.mjs +67 -0
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "packageName": "@ultrst-armada/floks",
4
- "version": "1.14.0",
5
- "sourceCommit": "6645f259f2a8c2710df1fc5c60f21ad718c34581",
4
+ "version": "1.14.1",
5
+ "sourceCommit": "3fe6a7110210c8ac204a764c5979f0ed31de0777",
6
6
  "releaseWorkflow": "npm Release",
7
- "workflowRunId": "42669473376"
7
+ "workflowRunId": "42817498795"
8
8
  }
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './packages/ui/dist/index.d.ts';
2
- export * from './packages/canvas-ui/dist/index.d.ts';
3
- export * from './packages/contracts/dist/index.d.ts';
1
+ export * from './packages/ui/dist/index.js';
2
+ export * from './packages/canvas-ui/dist/index.js';
3
+ export * from './packages/contracts/dist/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultrst-armada/floks",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -19,7 +19,8 @@
19
19
  "packages/*/src/styles/**",
20
20
  "packages/*/package.json",
21
21
  "packages/*/floks.manifest.json",
22
- ".krusbl-release-attestation.json"
22
+ ".krusbl-release-attestation.json",
23
+ "scripts/normalize-package-declarations.mjs"
23
24
  ],
24
25
  "exports": {
25
26
  ".": {
@@ -82,8 +83,8 @@
82
83
  }
83
84
  },
84
85
  "scripts": {
85
- "build": "NODE_OPTIONS=--max-old-space-size=4096 pnpm -r --workspace-concurrency=1 run build && NODE_OPTIONS=--max-old-space-size=4096 pnpm --filter @floks/ui run build:types && NODE_OPTIONS=--max-old-space-size=4096 pnpm --filter @floks/canvas-ui run build:types",
86
- "postbuild": "node -e \"import('fs').then(fs => { for (const pkg of fs.readdirSync('packages')) { const d = 'packages/' + pkg + '/dist'; if (!fs.existsSync(d)) continue; for (const f of fs.readdirSync(d, { recursive: true })) { const p = d + '/' + f; if (fs.statSync(p).isFile() && (p.endsWith('.js') || p.endsWith('.d.ts'))) { const c = fs.readFileSync(p, 'utf8'); const n = c.replaceAll('@kloks/', '@ultrst-armada/kloks/').replaceAll('@floks/', '@ultrst-armada/floks/').replaceAll('@ultrst/kloks/', '@ultrst-armada/kloks/').replaceAll('@ultrst/floks/', '@ultrst-armada/floks/').replaceAll('\\\"kloks/', '\\\"@ultrst-armada/kloks/').replaceAll('\\'kloks/', '\\'@ultrst-armada/kloks/').replaceAll('\\\"floks/', '\\\"@ultrst-armada/floks/').replaceAll('\\'floks/', '\\'@ultrst-armada/floks/'); if (c !== n) fs.writeFileSync(p, n); } } } })\"",
86
+ "build": "NODE_OPTIONS=--max-old-space-size=4096 pnpm -r --workspace-concurrency=1 run build && NODE_OPTIONS=--max-old-space-size=4096 pnpm --filter @floks/ui run build:types && NODE_OPTIONS=--max-old-space-size=4096 pnpm --filter @floks/canvas-ui run build:types && node scripts/normalize-package-declarations.mjs",
87
+ "postbuild": "node scripts/normalize-package-declarations.mjs",
87
88
  "test": "vitest run",
88
89
  "typecheck": "pnpm -r run typecheck",
89
90
  "clean": "pnpm -r run clean",
@@ -92,17 +93,18 @@
92
93
  "boundary:relative": "node scripts/relative-package-boundary.mjs"
93
94
  },
94
95
  "dependencies": {
95
- "@ultrst-armada/frnlts": "^0.5.7",
96
+ "@ultrst-armada/frnlts": "^0.5.10",
96
97
  "@xyflow/react": "^12.8.6",
97
98
  "d3-force": "^3.0.0",
98
99
  "zod": "^3.24.1",
99
100
  "zustand": "^5.0.3",
100
- "@dinilmusick/gutts": "^2.0.2"
101
+ "@dinilmusick/gutts": "^2.0.3"
101
102
  },
102
103
  "peerDependencies": {
103
104
  "lucide-react": ">=0.300.0",
104
105
  "react": "^18.0.0 || ^19.0.0",
105
- "react-dom": "^18.0.0 || ^19.0.0"
106
+ "react-dom": "^18.0.0 || ^19.0.0",
107
+ "@types/react": "^18.0.0 || ^19.0.0"
106
108
  },
107
109
  "devDependencies": {
108
110
  "@testing-library/jest-dom": "^7.0.1",
@@ -110,7 +112,7 @@
110
112
  "@types/node": "^22.0.0",
111
113
  "@types/react": "^19.0.0",
112
114
  "@types/react-dom": "^19.0.0",
113
- "@ultrst-armada/frnlts": "^0.5.7",
115
+ "@ultrst-armada/frnlts": "^0.5.10",
114
116
  "happy-dom": "^21.0.3",
115
117
  "lucide-react": "^1.55.0",
116
118
  "react": "^19.0.1",
@@ -20,6 +20,12 @@ import {
20
20
  useCanvas2DCoordinates,
21
21
  useCanvas2DMagnetic
22
22
  } from "./chunk-ZDADZVQ2.js";
23
+ import {
24
+ Tile,
25
+ TileCreateButton,
26
+ TileGrid,
27
+ useTileMenu
28
+ } from "./chunk-SA3JADUG.js";
23
29
  import {
24
30
  PredictiveGhostNodeCard,
25
31
  PredictiveHudToolbar,
@@ -29,12 +35,6 @@ import {
29
35
  getSocketLocalOffset,
30
36
  getSocketScreenPosition
31
37
  } from "./chunk-FPRATI44.js";
32
- import {
33
- Tile,
34
- TileCreateButton,
35
- TileGrid,
36
- useTileMenu
37
- } from "./chunk-SA3JADUG.js";
38
38
  import {
39
39
  AikoModule
40
40
  } from "./chunk-OHAFLB3O.js";
@@ -59,15 +59,15 @@ import {
59
59
  skipoDarkTheme,
60
60
  useMonaco
61
61
  } from "./chunk-KAKAFGVH.js";
62
- import {
63
- FodModule
64
- } from "./chunk-TKOMIUCU.js";
65
62
  import {
66
63
  CanvasViewport,
67
64
  InfiniteCanvas,
68
65
  MiniMap,
69
66
  useCanvas
70
67
  } from "./chunk-34YRDZPJ.js";
68
+ import {
69
+ FodModule
70
+ } from "./chunk-TKOMIUCU.js";
71
71
  import {
72
72
  CanvasContextMenu,
73
73
  CompatibleNodePicker,
@@ -1,2 +1,2 @@
1
- export * from './PredictiveGhostNodeCard/PredictiveGhostNodeCard';
2
- export * from './PredictiveGhostNodeCard/types';
1
+ export * from './PredictiveGhostNodeCard/PredictiveGhostNodeCard.js';
2
+ export * from './PredictiveGhostNodeCard/types.js';
@@ -76,7 +76,7 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@floks/ui": "workspace:*",
79
- "@ultrst-armada/frnlts": "^0.5.7",
79
+ "@ultrst-armada/frnlts": "^0.5.10",
80
80
  "@floks/contracts": "workspace:*"
81
81
  },
82
82
  "peerDependencies": {
@@ -638,6 +638,11 @@ var LOCAL_STORAGE_OPTION = {
638
638
  provider: "local_fs",
639
639
  label: "Local Folder"
640
640
  };
641
+ var NO_STORAGE_OPTION = {
642
+ id: "",
643
+ provider: "__none__",
644
+ label: "No storage provider enabled"
645
+ };
641
646
  var PROVIDER_LABELS = {
642
647
  local_fs: "Local Folder",
643
648
  backblaze_b2: "Backblaze B2",
@@ -660,31 +665,30 @@ function buildWorkspaceCreateInput(name, description, option) {
660
665
  const connectionId = option.id && option.id !== "local_fs" ? option.id : void 0;
661
666
  const localFolderName = provider === "local_fs" ? option.localFolderName || name.trim() : void 0;
662
667
  const b2BucketName = option.b2BucketName || option.bucketName;
663
- const b2Endpoint = option.b2Endpoint || option.endpoint;
664
- const b2Region = option.b2Region || option.region;
665
668
  const storage = {
666
669
  provider,
667
670
  connectionId,
668
671
  localFolderName,
669
672
  localFolderKey: provider === "local_fs" ? option.localFolderKey : void 0,
670
673
  b2BucketName,
671
- b2Endpoint,
672
- b2Region,
673
674
  googleEmail: option.googleEmail,
674
675
  googleRootFolderId: option.googleRootFolderId,
675
676
  googleRootFolderName: option.googleRootFolderName
676
677
  };
677
- const storageConnection = !connectionId ? void 0 : provider === "google_drive" ? {
678
+ const storageConnection = !connectionId ? void 0 : {
678
679
  id: option.id,
679
680
  provider,
680
681
  label: option.label,
681
682
  name: option.name,
682
683
  role: option.role,
683
684
  enabled: option.enabled,
684
- googleEmail: option.googleEmail,
685
- googleRootFolderId: option.googleRootFolderId,
686
- googleRootFolderName: option.googleRootFolderName
687
- } : option;
685
+ ...provider === "backblaze_b2" && b2BucketName ? { b2BucketName } : {},
686
+ ...provider === "google_drive" ? {
687
+ googleEmail: option.googleEmail,
688
+ googleRootFolderId: option.googleRootFolderId,
689
+ googleRootFolderName: option.googleRootFolderName
690
+ } : {}
691
+ };
688
692
  return {
689
693
  name: name.trim(),
690
694
  description: description.trim() || void 0,
@@ -694,77 +698,13 @@ function buildWorkspaceCreateInput(name, description, option) {
694
698
  localFolderName,
695
699
  localFolderKey: storage.localFolderKey,
696
700
  b2BucketName,
697
- b2Endpoint,
698
- b2Region,
699
701
  googleEmail: option.googleEmail,
700
702
  googleRootFolderId: option.googleRootFolderId,
701
703
  googleRootFolderName: option.googleRootFolderName,
702
704
  storageConnection
703
705
  };
704
706
  }
705
- async function fetchStorageConnections(userId) {
706
- const headers = new Headers({ "Content-Type": "application/json", "X-User-Id": userId });
707
- for (const endpoint of ["/api/auth/storage/connections", "/api/storage/connections"]) {
708
- try {
709
- const response = await fetch(endpoint, { headers, credentials: "include" });
710
- if (!response.ok) continue;
711
- const data = await response.json();
712
- const connections = Array.isArray(data?.connections) ? data.connections : Array.isArray(data?.storage_connections) ? data.storage_connections : [];
713
- if (connections.length > 0) {
714
- return connections.filter((item) => item && typeof item.id === "string" && typeof item.provider === "string");
715
- }
716
- } catch {
717
- }
718
- }
719
- return [];
720
- }
721
- async function fetchBackblazeAccounts(userId) {
722
- try {
723
- const response = await fetch("/api/storage/backblaze/accounts?userId=" + encodeURIComponent(userId));
724
- const data = await response.json().catch(() => ({}));
725
- return Array.isArray(data?.accounts) ? data.accounts : [];
726
- } catch {
727
- return [];
728
- }
729
- }
730
- async function fetchBackblazeBuckets(accountId, userId) {
731
- try {
732
- const response = await fetch("/api/storage/backblaze/buckets", {
733
- method: "POST",
734
- headers: { "Content-Type": "application/json" },
735
- body: JSON.stringify({ accountId, userId })
736
- });
737
- const data = await response.json().catch(() => ({}));
738
- return Array.isArray(data?.buckets) ? data.buckets : [];
739
- } catch {
740
- return [];
741
- }
742
- }
743
- async function fetchDefaultStorageOptions(userId) {
744
- const stored = await fetchStorageConnections(userId);
745
- if (stored.length > 0) return stored;
746
- const backblaze = await fetchBackblazeAccounts(userId);
747
- return backblaze.map((account) => {
748
- const credentials = account.credentials || {};
749
- const value = (key, alternate) => {
750
- const item = credentials[key] ?? (alternate ? credentials[alternate] : void 0);
751
- return typeof item === "string" && item.length > 0 ? item : void 0;
752
- };
753
- return {
754
- id: String(account.id),
755
- provider: String(account.provider || account.serviceId || "backblaze_b2"),
756
- label: String(account.label || account.name || account.id),
757
- b2BucketName: value("bucketName", "b2BucketName"),
758
- b2Endpoint: value("endpoint", "b2Endpoint"),
759
- b2Region: value("region", "b2Region")
760
- };
761
- });
762
- }
763
- var defaultWorkspaceStorageService = {
764
- listStorageConnections: fetchDefaultStorageOptions,
765
- listBackblazeAccounts: fetchBackblazeAccounts,
766
- listBackblazeBuckets: fetchBackblazeBuckets
767
- };
707
+ var defaultWorkspaceStorageService = Object.freeze({});
768
708
  function createKloksWorkspaceStorageService(invoker, googleDrive) {
769
709
  const mapStorageConnection = (connection) => {
770
710
  if (!connection || typeof connection.id !== "string" || typeof connection.provider !== "string") return null;
@@ -775,11 +715,7 @@ function createKloksWorkspaceStorageService(invoker, googleDrive) {
775
715
  role: connection.role,
776
716
  enabled: connection.enabled,
777
717
  localFolderName: connection.localFolderName,
778
- localFolderKey: connection.localFolderKey,
779
- localFolderPathHint: connection.localFolderPathHint,
780
718
  b2BucketName: connection.b2BucketName,
781
- b2Endpoint: connection.b2Endpoint,
782
- b2Region: connection.b2Region,
783
719
  googleEmail: connection.googleEmail,
784
720
  googleRootFolderId: connection.googleRootFolderId,
785
721
  googleRootFolderName: connection.googleRootFolderName
@@ -805,7 +741,6 @@ function WorkspaceCreateDialog({
805
741
  storageOptions,
806
742
  storageService = defaultWorkspaceStorageService,
807
743
  visibility,
808
- onManageStorage,
809
744
  onClose,
810
745
  onSubmit
811
746
  }) {
@@ -868,25 +803,27 @@ function WorkspaceCreateDialog({
868
803
  }, [open, effectiveUserId, storageOptions, storageService]);
869
804
  const availableOptions = useMemo(() => {
870
805
  const supplied = storageOptions ?? loadedOptions;
871
- const providers = visibility?.availableStorageProviders;
806
+ const providerOrder = visibility?.storagePolicy?.providers ?? visibility?.availableStorageProviders ?? [];
872
807
  const hidden = new Set(visibility?.hiddenStorageProviders || []);
873
- const isVisible = (provider) => !hidden.has(provider) && (!providers || providers.includes(provider));
874
808
  const enabled = supplied.filter(
875
- (option) => option && option.enabled !== false && typeof option.id === "string" && isVisible(option.provider)
809
+ (option) => option && option.enabled !== false && typeof option.id === "string" && !hidden.has(option.provider)
876
810
  );
877
- const local = enabled.find((option) => option.provider === "local_fs");
878
- const external = enabled.filter((option) => option.provider !== "local_fs");
879
- const driveConnections = [
880
- ...external.filter((option) => option.provider === "google_drive"),
881
- ...connectedDriveOption && connectedDriveOption.enabled !== false ? [connectedDriveOption] : []
882
- ].filter((option, index, items) => items.findIndex((candidate) => candidate.id === option.id) === index);
883
- const connectDriveOption = isVisible("google_drive") && !driveConnections.some((option) => option.id === "google_drive") ? [{ id: "google_drive", provider: "google_drive", label: driveConnections.length ? "Connect another account" : "Connect Google Drive" }] : [];
884
- return [
885
- ...local ? [local] : isVisible("local_fs") ? [LOCAL_STORAGE_OPTION] : [],
886
- ...external.filter((option) => option.provider !== "google_drive"),
887
- ...driveConnections,
888
- ...connectDriveOption
889
- ];
811
+ const forProvider = (provider) => enabled.filter((option) => option.provider === provider);
812
+ return providerOrder.filter((provider, index) => providerOrder.indexOf(provider) === index && !hidden.has(provider)).flatMap((provider) => {
813
+ if (provider === "local_fs") return [forProvider(provider)[0] || LOCAL_STORAGE_OPTION];
814
+ if (provider === "google_drive") {
815
+ const connections = [
816
+ ...forProvider(provider),
817
+ ...connectedDriveOption && connectedDriveOption.enabled !== false ? [connectedDriveOption] : []
818
+ ].filter((option, index, items) => items.findIndex((candidate) => candidate.id === option.id) === index);
819
+ return connections.length > 0 ? connections : [{ id: "google_drive", provider: "google_drive", label: "Connect Google Drive" }];
820
+ }
821
+ if (provider === "backblaze_b2") {
822
+ const connections = forProvider(provider);
823
+ return connections.length > 0 ? connections : [{ id: "backblaze_external", provider: "backblaze_b2", label: "Choose Backblaze account and bucket" }];
824
+ }
825
+ return forProvider(provider);
826
+ });
890
827
  }, [storageOptions, loadedOptions, connectedDriveOption, visibility]);
891
828
  useEffect4(() => {
892
829
  if (!open || loadingStorage || defaultStorageApplied) return;
@@ -904,7 +841,7 @@ function WorkspaceCreateDialog({
904
841
  }
905
842
  }, [open, availableOptions, selectedStorageId, backblazeMode]);
906
843
  if (!open) return null;
907
- const selectedOption = availableOptions.find((option) => option.id === selectedStorageId) || availableOptions[0] || LOCAL_STORAGE_OPTION;
844
+ const selectedOption = availableOptions.find((option) => option.id === selectedStorageId) || availableOptions[0] || NO_STORAGE_OPTION;
908
845
  const googleDriveConnection = selectedOption.provider === "google_drive" && selectedOption.id !== "google_drive" ? selectedOption : void 0;
909
846
  const hiddenFields = new Set(visibility?.hiddenFields || []);
910
847
  const userName = currentUser?.username || currentUser?.name || currentUser?.email?.split("@")[0] || "user";
@@ -973,11 +910,7 @@ function WorkspaceCreateDialog({
973
910
  provider: "backblaze_b2",
974
911
  label: backblazeAccount?.name || "Backblaze B2",
975
912
  b2BucketName: backblazeBucketName,
976
- bucketName: backblazeBucketName,
977
- b2Endpoint: backblazeAccount?.credentials?.endpoint,
978
- endpoint: backblazeAccount?.credentials?.endpoint,
979
- b2Region: backblazeAccount?.credentials?.region,
980
- region: backblazeAccount?.credentials?.region
913
+ bucketName: backblazeBucketName
981
914
  } : selectedOption.provider === "local_fs" ? { ...selectedOption, localFolderName: localFolderName.trim() || selectedOption.localFolderName || name.trim() } : selectedOption.provider === "google_drive" && googleDriveFolder ? {
982
915
  ...selectedOption,
983
916
  googleRootFolderId: googleDriveFolder.id,
@@ -1046,37 +979,27 @@ function WorkspaceCreateDialog({
1046
979
  ] }),
1047
980
  /* @__PURE__ */ jsxs7("div", { className: "space-y-1", children: [
1048
981
  /* @__PURE__ */ jsx7("label", { htmlFor: "floks-workspace-storage", className: "block text-[10px] font-black uppercase", children: "Persistent Storage" }),
1049
- /* @__PURE__ */ jsxs7("div", { className: "flex gap-2", children: [
1050
- /* @__PURE__ */ jsx7(
1051
- "select",
1052
- {
1053
- id: "floks-workspace-storage",
1054
- "aria-label": "Workspace storage",
1055
- value: selectedStorageId,
1056
- onChange: (event) => {
1057
- setBackblazeMode(false);
1058
- setSelectedStorageId(event.target.value);
1059
- },
1060
- disabled: loadingStorage || submitting,
1061
- className: "h-10 min-w-0 flex-1 border px-2 text-xs",
1062
- style: { backgroundColor: background, borderColor: border },
1063
- children: availableOptions.map((option) => /* @__PURE__ */ jsx7("option", { value: option.id, children: providerLabel(option) + " \u2014 " + (option.label || option.name || option.id) }, option.id))
1064
- }
1065
- ),
1066
- !hiddenFields.has("backblaze") && /* @__PURE__ */ jsx7(
1067
- "button",
1068
- {
1069
- type: "button",
1070
- onClick: handleSelectBackblaze,
1071
- disabled: submitting || loadingBackblazeAccounts,
1072
- "aria-pressed": backblazeMode,
1073
- className: "shrink-0 border px-3 text-[10px] font-black uppercase disabled:opacity-50",
1074
- style: { borderColor: backblazeMode ? accent : border, color: backblazeMode ? accent : void 0 },
1075
- children: "Backblaze B2"
1076
- }
1077
- ),
1078
- !hiddenFields.has("manageStorage") && onManageStorage && /* @__PURE__ */ jsx7("button", { type: "button", onClick: onManageStorage, className: "shrink-0 border px-3 text-[10px] font-black uppercase", style: { borderColor: border }, children: "Manage" })
1079
- ] }),
982
+ /* @__PURE__ */ jsx7("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx7(
983
+ "select",
984
+ {
985
+ id: "floks-workspace-storage",
986
+ "aria-label": "Workspace storage",
987
+ value: selectedStorageId,
988
+ onChange: (event) => {
989
+ const nextId = event.target.value;
990
+ if (nextId === "backblaze_external") {
991
+ void handleSelectBackblaze();
992
+ return;
993
+ }
994
+ setBackblazeMode(false);
995
+ setSelectedStorageId(nextId);
996
+ },
997
+ disabled: loadingStorage || submitting,
998
+ className: "h-10 min-w-0 flex-1 border px-2 text-xs",
999
+ style: { backgroundColor: background, borderColor: border },
1000
+ children: availableOptions.map((option) => /* @__PURE__ */ jsx7("option", { value: option.id, children: providerLabel(option) + " \u2014 " + (option.label || option.name || option.id) }, option.id))
1001
+ }
1002
+ ) }),
1080
1003
  !hiddenFields.has("backblaze") && backblazeMode && /* @__PURE__ */ jsxs7("div", { className: "mt-3 space-y-2 border-t pt-3", style: { borderColor: border }, children: [
1081
1004
  /* @__PURE__ */ jsxs7("label", { className: "block space-y-1", children: [
1082
1005
  /* @__PURE__ */ jsx7("span", { className: "text-[10px] font-black uppercase", children: "Backblaze account" }),
@@ -1123,7 +1046,7 @@ function WorkspaceCreateDialog({
1123
1046
  loadingStorage ? /* @__PURE__ */ jsxs7("p", { className: "flex items-center gap-2 text-[10px]", style: { color: muted }, children: [
1124
1047
  /* @__PURE__ */ jsx7(Loader2, { size: 12, className: "animate-spin" }),
1125
1048
  " Loading storage connections\u2026"
1126
- ] }) : availableOptions.length === 1 && availableOptions[0].provider === "local_fs" ? /* @__PURE__ */ jsx7("p", { className: "text-[10px]", style: { color: muted }, children: "No external storage connection is available yet. Connect an external provider or choose an available connection." }) : /* @__PURE__ */ jsx7("p", { className: "text-[10px]", style: { color: muted }, children: "Cloud storage is selected from connections already authorized for this account." })
1049
+ ] }) : availableOptions.length === 0 ? /* @__PURE__ */ jsx7("p", { className: "text-[10px]", style: { color: muted }, children: "This application has not enabled a workspace storage provider." }) : /* @__PURE__ */ jsx7("p", { className: "text-[10px]", style: { color: muted }, children: "Choose from the storage providers explicitly enabled by this application." })
1127
1050
  ] }),
1128
1051
  selectedOption.provider === "google_drive" && /* @__PURE__ */ jsx7(
1129
1052
  GoogleDriveWorkspacePicker,
@@ -1170,7 +1093,7 @@ function WorkspaceCreateDialog({
1170
1093
  ] }),
1171
1094
  /* @__PURE__ */ jsxs7("div", { className: "mt-5 flex justify-end gap-2 border-t pt-3", style: { borderColor: border }, children: [
1172
1095
  /* @__PURE__ */ jsx7("button", { type: "button", onClick: onClose, disabled: submitting, className: "h-9 border px-3 text-xs", style: { borderColor: border }, children: "Cancel" }),
1173
- /* @__PURE__ */ jsx7("button", { type: "submit", disabled: submitting || loadingStorage || loadingBackblazeAccounts || loadingBackblazeBuckets || !name.trim(), className: "h-9 px-4 text-xs font-black uppercase text-black disabled:opacity-50", style: { backgroundColor: accent }, children: submitting ? "Creating\u2026" : "Create Workspace" })
1096
+ /* @__PURE__ */ jsx7("button", { type: "submit", disabled: submitting || loadingStorage || loadingBackblazeAccounts || loadingBackblazeBuckets || !availableOptions.length || !name.trim(), className: "h-9 px-4 text-xs font-black uppercase text-black disabled:opacity-50", style: { backgroundColor: accent }, children: submitting ? "Creating\u2026" : "Create Workspace" })
1174
1097
  ] })
1175
1098
  ]
1176
1099
  }
@@ -1197,7 +1120,7 @@ function WorkspaceTilesMenu({
1197
1120
  userId,
1198
1121
  currentUser,
1199
1122
  storageOptions,
1200
- onManageStorage,
1123
+ visibility,
1201
1124
  activeWorkspaceId = null,
1202
1125
  appName = "Workspaces",
1203
1126
  storageService = defaultWorkspaceStorageService,
@@ -1257,7 +1180,7 @@ function WorkspaceTilesMenu({
1257
1180
  ] })
1258
1181
  }
1259
1182
  ),
1260
- /* @__PURE__ */ jsx8(WorkspaceCreateDialog, { open: creating, userId: effectiveUserId, currentUser, appName, storageOptions, storageService, onManageStorage, onClose: () => setCreating(false), onSubmit: onCreateWorkspace })
1183
+ /* @__PURE__ */ jsx8(WorkspaceCreateDialog, { open: creating, userId: effectiveUserId, currentUser, appName, storageOptions, storageService, visibility, onClose: () => setCreating(false), onSubmit: onCreateWorkspace })
1261
1184
  ] });
1262
1185
  }
1263
1186
 
@@ -8,14 +8,10 @@ export interface BackblazeBucket {
8
8
  bucketName?: string;
9
9
  }
10
10
  export interface BackblazeAccount {
11
+ /** Opaque account/connection identifier; provider credentials remain server-side. */
11
12
  id: string;
12
13
  name: string;
13
14
  provider?: string;
14
- credentials?: {
15
- region?: string;
16
- endpoint?: string;
17
- [key: string]: unknown;
18
- };
19
15
  }
20
16
  export interface WorkspaceStorageOption {
21
17
  id: string;
@@ -29,14 +25,9 @@ export interface WorkspaceStorageOption {
29
25
  localFolderPathHint?: string;
30
26
  bucketName?: string;
31
27
  b2BucketName?: string;
32
- b2Endpoint?: string;
33
- b2Region?: string;
34
- endpoint?: string;
35
- region?: string;
36
28
  googleEmail?: string;
37
29
  googleRootFolderId?: string;
38
30
  googleRootFolderName?: string;
39
- credentials?: Record<string, unknown>;
40
31
  }
41
32
  export interface WorkspaceStorageSelection {
42
33
  provider: WorkspaceStorageProvider;
@@ -44,8 +35,6 @@ export interface WorkspaceStorageSelection {
44
35
  localFolderName?: string;
45
36
  localFolderKey?: string;
46
37
  b2BucketName?: string;
47
- b2Endpoint?: string;
48
- b2Region?: string;
49
38
  googleEmail?: string;
50
39
  googleRootFolderId?: string;
51
40
  googleRootFolderName?: string;
@@ -59,8 +48,6 @@ export interface WorkspaceCreateInput {
59
48
  localFolderName?: string;
60
49
  localFolderKey?: string;
61
50
  b2BucketName?: string;
62
- b2Endpoint?: string;
63
- b2Region?: string;
64
51
  googleEmail?: string;
65
52
  googleRootFolderId?: string;
66
53
  googleRootFolderName?: string;
@@ -73,9 +60,15 @@ export interface WorkspaceStorageService {
73
60
  connectGoogleDrive?: (userId: string) => Promise<WorkspaceStorageOption>;
74
61
  listGoogleDriveFolders?: (connectionId: string, parentFolderId?: string) => Promise<GoogleDriveFolder[]>;
75
62
  }
76
- export type WorkspaceCreateDialogHiddenField = 'description' | 'localFolderName' | 'manageStorage' | 'backblaze' | 'canonicalFolderPreview';
63
+ export type WorkspaceCreateDialogHiddenField = 'description' | 'localFolderName' | 'backblaze' | 'canonicalFolderPreview';
64
+ export interface WorkspaceStoragePolicy {
65
+ /** Ordered allow-list declared by the consuming application. No implicit providers are enabled. */
66
+ providers: WorkspaceStorageProvider[];
67
+ }
77
68
  export interface WorkspaceCreateDialogVisibility {
78
- /** Whitelist of storage providers to render. Unspecified means all providers. */
69
+ /** Canonical application-level storage policy. */
70
+ storagePolicy?: WorkspaceStoragePolicy;
71
+ /** Backwards-compatible explicit allow-list. Prefer storagePolicy.providers. */
79
72
  availableStorageProviders?: WorkspaceStorageProvider[];
80
73
  /** Providers hidden even when included in availableStorageProviders. */
81
74
  hiddenStorageProviders?: WorkspaceStorageProvider[];
@@ -95,12 +88,16 @@ export interface WorkspaceCreateDialogProps {
95
88
  storageOptions?: WorkspaceStorageOption[];
96
89
  storageService?: WorkspaceStorageService;
97
90
  visibility?: WorkspaceCreateDialogVisibility;
98
- onManageStorage?: () => void;
99
91
  onClose: () => void;
100
92
  onSubmit: (input: WorkspaceCreateInput) => Promise<void> | void;
101
93
  }
102
94
  export declare function formatWorkspaceFolderPreview(appName: string, userName: string, workspaceName: string): string;
103
95
  export declare function buildWorkspaceCreateInput(name: string, description: string, option: WorkspaceStorageOption): WorkspaceCreateInput;
96
+ /**
97
+ * Floks is a browser UI boundary, not an application backend.
98
+ * Consumers inject a browser-safe Kloks client/service adapter.
99
+ * This compatibility default is intentionally inert and performs no network I/O.
100
+ */
104
101
  export declare const defaultWorkspaceStorageService: WorkspaceStorageService;
105
102
  export interface KloksServiceInvoker {
106
103
  invoke: (serviceId: string, operation: string, input: Record<string, unknown>) => Promise<unknown>;
@@ -114,4 +111,4 @@ export interface KloksGoogleDriveWorkspaceApi {
114
111
  listGoogleDriveFolders: (connectionId: string, parentFolderId?: string) => Promise<GoogleDriveFolder[]>;
115
112
  }
116
113
  export declare function createKloksWorkspaceStorageService(invoker: KloksServiceInvoker, googleDrive?: KloksGoogleDriveWorkspaceApi): WorkspaceStorageService;
117
- export declare function WorkspaceCreateDialog({ open, userId, currentUser, appName, storageOptions, storageService, visibility, onManageStorage, onClose, onSubmit, }: WorkspaceCreateDialogProps): React.JSX.Element;
114
+ export declare function WorkspaceCreateDialog({ open, userId, currentUser, appName, storageOptions, storageService, visibility, onClose, onSubmit, }: WorkspaceCreateDialogProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type WorkspaceCreateInput, type WorkspaceStorageService, type WorkspaceStorageOption } from './WorkspaceCreateDialog.js';
2
+ import { type WorkspaceCreateInput, type WorkspaceStorageService, type WorkspaceCreateDialogVisibility, type WorkspaceStorageOption } from './WorkspaceCreateDialog.js';
3
3
  export declare const WORKSPACE_TILES_MENU_REQUIRED_SERVICES: readonly ["auth", "workspace", "storage", "srkl"];
4
4
  export interface WorkspaceRecord {
5
5
  id: string;
@@ -10,8 +10,6 @@ export interface WorkspaceRecord {
10
10
  storageProvider?: string;
11
11
  storageConnectionId?: string;
12
12
  b2BucketName?: string;
13
- b2Endpoint?: string;
14
- b2Region?: string;
15
13
  localFolderName?: string;
16
14
  metadata?: React.ReactNode;
17
15
  }
@@ -25,7 +23,7 @@ export interface WorkspaceTilesMenuProps {
25
23
  username?: string;
26
24
  } | null;
27
25
  storageOptions?: WorkspaceStorageOption[];
28
- onManageStorage?: () => void;
26
+ visibility?: WorkspaceCreateDialogVisibility;
29
27
  activeWorkspaceId?: string | null;
30
28
  appName?: string;
31
29
  storageService?: WorkspaceStorageService;
@@ -93,4 +91,4 @@ export declare const workspaceTilesMenuDefinition: {
93
91
  };
94
92
  };
95
93
  };
96
- export declare function WorkspaceTilesMenu({ workspaces, userId, currentUser, storageOptions, onManageStorage, activeWorkspaceId, appName, storageService, onSelectWorkspace, onCreateWorkspace, onUpdateWorkspace: _onUpdateWorkspace, onDeleteWorkspace: _onDeleteWorkspace, onLogout, loading, error, }: WorkspaceTilesMenuProps): React.JSX.Element;
94
+ export declare function WorkspaceTilesMenu({ workspaces, userId, currentUser, storageOptions, visibility, activeWorkspaceId, appName, storageService, onSelectWorkspace, onCreateWorkspace, onUpdateWorkspace: _onUpdateWorkspace, onDeleteWorkspace: _onDeleteWorkspace, onLogout, loading, error, }: WorkspaceTilesMenuProps): React.JSX.Element;
@@ -15,7 +15,7 @@ import {
15
15
  describeGoogleDriveError,
16
16
  formatWorkspaceFolderPreview,
17
17
  workspaceTilesMenuDefinition
18
- } from "../../chunk-YQL4AGPU.js";
18
+ } from "../../chunk-OMNGRMJY.js";
19
19
  import "../../chunk-DZTJJOLR.js";
20
20
  import "../../chunk-B4XTM5TI.js";
21
21
  export {
@@ -23,7 +23,7 @@ import {
23
23
  describeGoogleDriveError,
24
24
  formatWorkspaceFolderPreview,
25
25
  workspaceTilesMenuDefinition
26
- } from "./chunk-YQL4AGPU.js";
26
+ } from "./chunk-OMNGRMJY.js";
27
27
  import {
28
28
  AUTH_PAGE_REQUIRED_SERVICES,
29
29
  AuthLoadingScreen,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ColorPalette } from './types';
2
+ import { ColorPalette } from './types.js';
3
3
  export declare const THEME_STORAGE_KEY = "floks_color_palette_v1";
4
4
  export declare const DEFAULT_PALETTE_ID = "black_and_gold";
5
5
  export declare function getActivePalette(): ColorPalette;
@@ -1,4 +1,4 @@
1
- import { ColorPalette } from './types';
1
+ import { ColorPalette } from './types.js';
2
2
  import type { SkipoThemePack } from '../theme/index.js';
3
3
  export declare function paletteToSkipoThemePack(palette: ColorPalette): SkipoThemePack;
4
4
  export declare function applyPaletteToDocument(palette: ColorPalette): void;
@@ -1,4 +1,4 @@
1
- export * from './types';
2
- export * from './palettes';
3
- export * from './domThemeInjector';
4
- export * from './ThemeContext';
1
+ export * from './types.js';
2
+ export * from './palettes.js';
3
+ export * from './domThemeInjector.js';
4
+ export * from './ThemeContext.js';
@@ -1,2 +1,2 @@
1
- import { ColorPalette } from "./types";
1
+ import { ColorPalette } from "./types.js";
2
2
  export declare const BUILTIN_PALETTES: Record<string, ColorPalette>;
@@ -1,2 +1,2 @@
1
- import { ColorPalette } from "./types";
1
+ import { ColorPalette } from "./types.js";
2
2
  export declare const BASE_PALETTES: Record<string, ColorPalette>;
@@ -1,2 +1,2 @@
1
- import { ColorPalette } from "./types";
1
+ import { ColorPalette } from "./types.js";
2
2
  export declare const EXTENDED_PALETTES: Record<string, ColorPalette>;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { type ModularThemePack } from '../../schema/themePack.schema.js';
2
- import manifest from './manifest.json';
2
+ import manifest from "./manifest.json" with { type: "json" };
3
3
  export declare const DOCUSTACK_CYBERPUNK_PACK: ModularThemePack;
4
4
  export * from './tokens.js';
5
5
  export * from './typography.js';
@@ -0,0 +1,8 @@
1
+ {
2
+ "id": "docustack-cyberpunk-neon",
3
+ "name": "DocuStack Cyberpunk Neon",
4
+ "version": "1.0.0",
5
+ "mode": "dark",
6
+ "author": "DocuStack Team",
7
+ "description": "High-contrast cyberpunk cyan and magenta dual-variant glow."
8
+ }
@@ -1,5 +1,5 @@
1
1
  import { type ModularThemePack } from '../../schema/themePack.schema.js';
2
- import manifest from './manifest.json';
2
+ import manifest from "./manifest.json" with { type: "json" };
3
3
  export declare const DOCUSTACK_DARK_GOLD_PACK: ModularThemePack;
4
4
  export * from './tokens.js';
5
5
  export * from './typography.js';
@@ -0,0 +1,8 @@
1
+ {
2
+ "id": "docustack-dark-gold",
3
+ "name": "DocuStack Vault (Dark & Gold)",
4
+ "version": "1.0.0",
5
+ "mode": "dark",
6
+ "author": "DocuStack Team",
7
+ "description": "Canonical 2.5D Neo-Brutalist Dark Vault theme with gold accents."
8
+ }
@@ -1,5 +1,5 @@
1
1
  import { type ModularThemePack } from '../../schema/themePack.schema.js';
2
- import manifest from './manifest.json';
2
+ import manifest from "./manifest.json" with { type: "json" };
3
3
  export declare const DOCUSTACK_WARM_COFFEE_PACK: ModularThemePack;
4
4
  export * from './tokens.js';
5
5
  export * from './typography.js';
@@ -0,0 +1,8 @@
1
+ {
2
+ "id": "docustack-warm-coffee",
3
+ "name": "DocuStack Warm Coffee",
4
+ "version": "1.0.0",
5
+ "mode": "light",
6
+ "author": "DocuStack Team",
7
+ "description": "Warm espresso and caramel dual-variant palette."
8
+ }
@@ -114,11 +114,11 @@
114
114
  },
115
115
  "dependencies": {
116
116
  "zod": "^3.24.1",
117
- "@ultrst-armada/frnlts": "^0.5.7",
117
+ "@ultrst-armada/frnlts": "^0.5.10",
118
118
  "zustand": "^5.0.3",
119
119
  "@xyflow/react": "^12.8.6",
120
120
  "d3-force": "^3.0.0",
121
- "@dinilmusick/gutts": "^2.0.2"
121
+ "@dinilmusick/gutts": "^2.0.3"
122
122
  },
123
123
  "peerDependencies": {
124
124
  "lucide-react": ">=0.300.0",
@@ -0,0 +1,67 @@
1
+ import { readdir, readFile, writeFile, stat, copyFile, mkdir } from "node:fs/promises";
2
+ import path from "node:path";
3
+
4
+ async function walk(directory) {
5
+ const result = [];
6
+ for (const entry of await readdir(directory, { withFileTypes: true })) {
7
+ const fullPath = path.join(directory, entry.name);
8
+ if (entry.isDirectory()) result.push(...await walk(fullPath));
9
+ else if (entry.isFile()) result.push(fullPath);
10
+ }
11
+ return result;
12
+ }
13
+
14
+ const packagesDirectory = path.resolve("packages");
15
+ for (const packageName of await readdir(packagesDirectory)) {
16
+ const packageDirectory = path.join(packagesDirectory, packageName);
17
+ if (!(await stat(packageDirectory)).isDirectory()) continue;
18
+ const distDirectory = path.join(packageDirectory, "dist");
19
+ const sourceDirectory = path.join(packageDirectory, "src");
20
+ try {
21
+ await stat(sourceDirectory);
22
+ for (const sourceFile of await walk(sourceDirectory)) {
23
+ if (path.extname(sourceFile) !== ".json") continue;
24
+ const targetFile = path.join(distDirectory, path.relative(sourceDirectory, sourceFile));
25
+ await mkdir(path.dirname(targetFile), { recursive: true });
26
+ await copyFile(sourceFile, targetFile);
27
+ }
28
+ } catch {
29
+ // Workspace package has no source directory or JSON assets.
30
+ }
31
+ try {
32
+ await stat(distDirectory);
33
+ } catch {
34
+ continue;
35
+ }
36
+
37
+ for (const filePath of await walk(distDirectory)) {
38
+ if (!filePath.endsWith(".js") && !filePath.endsWith(".d.ts")) continue;
39
+ const original = await readFile(filePath, "utf8");
40
+ let normalized = original
41
+ .replaceAll("@kloks/", "@ultrst-armada/kloks/")
42
+ .replaceAll("@floks/", "@ultrst-armada/floks/")
43
+ .replaceAll("@ultrst/kloks/", "@ultrst-armada/kloks/")
44
+ .replaceAll("@ultrst/floks/", "@ultrst-armada/floks/")
45
+ .replaceAll('"kloks/', '"@ultrst-armada/kloks/')
46
+ .replaceAll("'kloks/", "'@ultrst-armada/kloks/")
47
+ .replaceAll('"floks/', '"@ultrst-armada/floks/')
48
+ .replaceAll("'floks/", "'@ultrst-armada/floks/");
49
+
50
+ if (filePath.endsWith(".d.ts")) {
51
+ normalized = normalized.replace(
52
+ /(from[ ]+|import[ ]*[(][ ]*)(["'])([.]{1,2}[/][^"']+)\2/g,
53
+ (match, prefix, quote, specifier) => {
54
+ if (path.extname(specifier)) return match;
55
+ return prefix + quote + specifier + ".js" + quote;
56
+ }
57
+ );
58
+ normalized = normalized
59
+ .replace(/from '([.]{1,2}[/][^']+[.]json)'(?![ ]+with)/g, 'from "$1" with { type: "json" }')
60
+ .replace(/from "([.]{1,2}[/][^"]+[.]json)"(?![ ]+with)/g, 'from "$1" with { type: "json" }');
61
+ }
62
+
63
+ if (normalized !== original) await writeFile(filePath, normalized);
64
+ }
65
+ }
66
+
67
+ console.log("Normalized published package aliases and NodeNext declaration specifiers.");