@stapel/workspaces-react 0.1.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.
Files changed (111) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/LICENSE +21 -0
  3. package/MODULE.md +54 -0
  4. package/README.md +73 -0
  5. package/dist/api/extensions.d.ts +8 -0
  6. package/dist/api/extensions.d.ts.map +1 -0
  7. package/dist/api/extensions.js +8 -0
  8. package/dist/api/extensions.js.map +1 -0
  9. package/dist/api/types.d.ts +51 -0
  10. package/dist/api/types.d.ts.map +1 -0
  11. package/dist/api/types.js +2 -0
  12. package/dist/api/types.js.map +1 -0
  13. package/dist/api/workspacesApi.d.ts +43 -0
  14. package/dist/api/workspacesApi.d.ts.map +1 -0
  15. package/dist/api/workspacesApi.js +31 -0
  16. package/dist/api/workspacesApi.js.map +1 -0
  17. package/dist/flows/errors.d.ts +12 -0
  18. package/dist/flows/errors.d.ts.map +1 -0
  19. package/dist/flows/errors.js +13 -0
  20. package/dist/flows/errors.js.map +1 -0
  21. package/dist/flows/generated/flows.gen.d.ts +19 -0
  22. package/dist/flows/generated/flows.gen.d.ts.map +1 -0
  23. package/dist/flows/generated/flows.gen.js +23 -0
  24. package/dist/flows/generated/flows.gen.js.map +1 -0
  25. package/dist/headless/AcceptInvitation.d.ts +39 -0
  26. package/dist/headless/AcceptInvitation.d.ts.map +1 -0
  27. package/dist/headless/AcceptInvitation.js +27 -0
  28. package/dist/headless/AcceptInvitation.js.map +1 -0
  29. package/dist/headless/Members.d.ts +47 -0
  30. package/dist/headless/Members.d.ts.map +1 -0
  31. package/dist/headless/Members.js +50 -0
  32. package/dist/headless/Members.js.map +1 -0
  33. package/dist/headless/WorkspaceList.d.ts +38 -0
  34. package/dist/headless/WorkspaceList.d.ts.map +1 -0
  35. package/dist/headless/WorkspaceList.js +33 -0
  36. package/dist/headless/WorkspaceList.js.map +1 -0
  37. package/dist/headless/WorkspacesProvider.d.ts +18 -0
  38. package/dist/headless/WorkspacesProvider.d.ts.map +1 -0
  39. package/dist/headless/WorkspacesProvider.js +17 -0
  40. package/dist/headless/WorkspacesProvider.js.map +1 -0
  41. package/dist/i18n/errorsMap.d.ts +10 -0
  42. package/dist/i18n/errorsMap.d.ts.map +1 -0
  43. package/dist/i18n/errorsMap.js +20 -0
  44. package/dist/i18n/errorsMap.js.map +1 -0
  45. package/dist/i18n/generated/errors.gen.d.ts +347 -0
  46. package/dist/i18n/generated/errors.gen.d.ts.map +1 -0
  47. package/dist/i18n/generated/errors.gen.js +177 -0
  48. package/dist/i18n/generated/errors.gen.js.map +1 -0
  49. package/dist/i18n/generated/errors.ru.gen.d.ts +9 -0
  50. package/dist/i18n/generated/errors.ru.gen.d.ts.map +1 -0
  51. package/dist/i18n/generated/errors.ru.gen.js +61 -0
  52. package/dist/i18n/generated/errors.ru.gen.js.map +1 -0
  53. package/dist/i18n/keys.d.ts +55 -0
  54. package/dist/i18n/keys.d.ts.map +1 -0
  55. package/dist/i18n/keys.js +76 -0
  56. package/dist/i18n/keys.js.map +1 -0
  57. package/dist/i18n/ru.d.ts +28 -0
  58. package/dist/i18n/ru.d.ts.map +1 -0
  59. package/dist/i18n/ru.js +49 -0
  60. package/dist/i18n/ru.js.map +1 -0
  61. package/dist/index.d.ts +38 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.js +36 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/model/context.d.ts +14 -0
  66. package/dist/model/context.d.ts.map +1 -0
  67. package/dist/model/context.js +21 -0
  68. package/dist/model/context.js.map +1 -0
  69. package/dist/model/mutations.d.ts +55 -0
  70. package/dist/model/mutations.d.ts.map +1 -0
  71. package/dist/model/mutations.js +138 -0
  72. package/dist/model/mutations.js.map +1 -0
  73. package/dist/model/queries.d.ts +21 -0
  74. package/dist/model/queries.d.ts.map +1 -0
  75. package/dist/model/queries.js +41 -0
  76. package/dist/model/queries.js.map +1 -0
  77. package/dist/model/queryKeys.d.ts +7 -0
  78. package/dist/model/queryKeys.d.ts.map +1 -0
  79. package/dist/model/queryKeys.js +15 -0
  80. package/dist/model/queryKeys.js.map +1 -0
  81. package/dist/model/runtime.d.ts +26 -0
  82. package/dist/model/runtime.d.ts.map +1 -0
  83. package/dist/model/runtime.js +18 -0
  84. package/dist/model/runtime.js.map +1 -0
  85. package/llms.txt +95 -0
  86. package/manifest.json +705 -0
  87. package/package.json +85 -0
  88. package/src/analytics/generated/events.json +7 -0
  89. package/src/api/extensions.ts +7 -0
  90. package/src/api/types.ts +58 -0
  91. package/src/api/workspacesApi.ts +139 -0
  92. package/src/flows/errors.ts +16 -0
  93. package/src/flows/generated/flows.gen.ts +38 -0
  94. package/src/flows/generated/flows.json +1 -0
  95. package/src/headless/AcceptInvitation.tsx +53 -0
  96. package/src/headless/Members.tsx +89 -0
  97. package/src/headless/WorkspaceList.tsx +58 -0
  98. package/src/headless/WorkspacesProvider.tsx +25 -0
  99. package/src/i18n/errorsMap.ts +31 -0
  100. package/src/i18n/generated/errors.gen.ts +208 -0
  101. package/src/i18n/generated/errors.json +394 -0
  102. package/src/i18n/generated/errors.ru.gen.ts +67 -0
  103. package/src/i18n/keys.ts +83 -0
  104. package/src/i18n/ru.ts +53 -0
  105. package/src/index.ts +113 -0
  106. package/src/model/context.tsx +29 -0
  107. package/src/model/mutations.ts +196 -0
  108. package/src/model/queries.ts +51 -0
  109. package/src/model/queryKeys.ts +20 -0
  110. package/src/model/runtime.ts +46 -0
  111. package/tsconfig.json +26 -0
@@ -0,0 +1,177 @@
1
+ // AUTO-GENERATED by scripts/gen-errors.mjs — do not edit by hand.
2
+ // Source: stapel-auth canonical errors.json (backend codegen artifact).
3
+ // Regenerate: pnpm gen:errors · Drift gate: pnpm gen:errors:check
4
+ /**
5
+ * The WORKSPACES_ERRORS map — every `error.*` key stapel-auth can raise, keyed by its
6
+ * canonical code. The single source of truth behind the en fallback bundle, the
7
+ * remediation lookup, and the manifest `errors` block.
8
+ */
9
+ export const WORKSPACES_ERRORS = {
10
+ "error.400.already_workspace_member": { status: 400, params: [], remediation: "fix_input", en: "User is already a member of this workspace" },
11
+ "error.400.bad_request": { status: 400, params: [], remediation: "fix_input", en: "Bad request" },
12
+ "error.400.captcha_invalid": { status: 400, params: [], remediation: "retry", en: "Captcha verification failed. Please try again." },
13
+ "error.400.captcha_required": { status: 400, params: [], remediation: "retry", en: "Captcha token is required." },
14
+ "error.400.expected_list": { status: 400, params: [], remediation: "fix_input", en: "Expected a list of items" },
15
+ "error.400.field.blank": { status: 400, params: ["field"], remediation: "fix_input", en: "{field} may not be blank" },
16
+ "error.400.field.does_not_exist": { status: 400, params: ["field"], remediation: "fix_input", en: "{field} does not exist" },
17
+ "error.400.field.invalid": { status: 400, params: ["field"], remediation: "fix_input", en: "{field} is invalid" },
18
+ "error.400.field.invalid_choice": { status: 400, params: ["field"], remediation: "fix_input", en: "{field} is not a valid choice" },
19
+ "error.400.field.max_length": { status: 400, params: ["field", "max_length"], remediation: "fix_input", en: "{field} must be at most {max_length} characters" },
20
+ "error.400.field.max_value": { status: 400, params: ["field", "max_value"], remediation: "fix_input", en: "{field} must be at most {max_value}" },
21
+ "error.400.field.min_length": { status: 400, params: ["field", "min_length"], remediation: "fix_input", en: "{field} must be at least {min_length} characters" },
22
+ "error.400.field.min_value": { status: 400, params: ["field", "min_value"], remediation: "fix_input", en: "{field} must be at least {min_value}" },
23
+ "error.400.field.null": { status: 400, params: ["field"], remediation: "fix_input", en: "{field} may not be null" },
24
+ "error.400.field.required": { status: 400, params: ["field"], remediation: "fix_input", en: "{field} is required" },
25
+ "error.400.field.unique": { status: 400, params: ["field"], remediation: "fix_input", en: "{field} must be unique" },
26
+ "error.400.invalid_ad_id": { status: 400, params: [], remediation: "fix_input", en: "Invalid advertisement ID" },
27
+ "error.400.invalid_role": { status: 400, params: [], remediation: "fix_input", en: "Invalid role" },
28
+ "error.400.invitation_already_used": { status: 400, params: [], remediation: "fix_input", en: "Invitation has already been used" },
29
+ "error.400.invitation_expired": { status: 400, params: [], remediation: "contact_support", en: "Invitation has expired" },
30
+ "error.400.invitation_revoked": { status: 400, params: [], remediation: "contact_support", en: "Invitation has been revoked" },
31
+ "error.400.validation_error": { status: 400, params: [], remediation: "fix_input", en: "Validation error" },
32
+ "error.400.verification_failed": { status: 400, params: [], remediation: "verify", en: "Verification failed" },
33
+ "error.400.verification_invalid_factor": { status: 400, params: [], remediation: "verify", en: "This verification factor is not available" },
34
+ "error.400.workspace_slug_taken": { status: 400, params: [], remediation: "fix_input", en: "Workspace slug is already taken" },
35
+ "error.401.unauthorized": { status: 401, params: [], remediation: "reauthenticate", en: "Authentication required" },
36
+ "error.402.payment_required": { status: 402, params: [], remediation: "retry", en: "Payment required" },
37
+ "error.403.forbidden": { status: 403, params: [], remediation: "retry", en: "You do not have permission to perform this action" },
38
+ "error.403.forbidden_workspace": { status: 403, params: [], remediation: "contact_support", en: "You do not have access to this workspace" },
39
+ "error.403.last_owner_cannot_be_removed": { status: 403, params: [], remediation: "fix_input", en: "The last owner cannot be removed; transfer ownership first" },
40
+ "error.403.network_blocked": { status: 403, params: [], remediation: "contact_support", en: "Requests from this network are not allowed" },
41
+ "error.403.verification_enrollment_required": { status: 403, params: [], remediation: "verify", en: "Verification factor enrollment required" },
42
+ "error.403.verification_required": { status: 403, params: [], remediation: "verify", en: "Additional verification required" },
43
+ "error.404.ad_not_found": { status: 404, params: [], remediation: "retry", en: "Listing not found" },
44
+ "error.404.invitation_not_found": { status: 404, params: [], remediation: "fix_input", en: "Invitation not found" },
45
+ "error.404.member_not_found": { status: 404, params: [], remediation: "fix_input", en: "Member not found in this workspace" },
46
+ "error.404.not_found": { status: 404, params: [], remediation: "retry", en: "Requested resource not found" },
47
+ "error.404.verification_challenge_not_found": { status: 404, params: [], remediation: "verify", en: "Verification challenge not found or expired" },
48
+ "error.404.workspace_not_found": { status: 404, params: [], remediation: "fix_input", en: "Workspace not found" },
49
+ "error.405.method_not_allowed": { status: 405, params: [], remediation: "retry", en: "Method not allowed" },
50
+ "error.406.not_acceptable": { status: 406, params: [], remediation: "retry", en: "Not acceptable" },
51
+ "error.408.request_timeout": { status: 408, params: [], remediation: "retry", en: "Request timeout" },
52
+ "error.409.conflict": { status: 409, params: [], remediation: "fix_input", en: "Resource already exists" },
53
+ "error.410.gone": { status: 410, params: [], remediation: "retry", en: "Resource has been permanently removed" },
54
+ "error.413.payload_too_large": { status: 413, params: [], remediation: "retry", en: "Request body is too large" },
55
+ "error.415.unsupported_media_type": { status: 415, params: [], remediation: "retry", en: "Unsupported media type" },
56
+ "error.422.unprocessable_entity": { status: 422, params: [], remediation: "wait_and_retry", en: "Unprocessable entity" },
57
+ "error.423.locked": { status: 423, params: [], remediation: "wait_and_retry", en: "Resource is locked" },
58
+ "error.423.verification_locked": { status: 423, params: [], remediation: "wait_and_retry", en: "Too many failed attempts — verification locked" },
59
+ "error.429.rate_limit": { status: 429, params: ["retry_after_minutes"], remediation: "wait_and_retry", en: "Too many attempts. Try again in {retry_after_minutes} minutes." },
60
+ "error.429.too_many_requests": { status: 429, params: [], remediation: "wait_and_retry", en: "Too many requests. Please try again later." },
61
+ "error.500.internal": { status: 500, params: [], remediation: "contact_support", en: "Something went wrong" },
62
+ };
63
+ /** Every backend error code this module can surface, sorted. */
64
+ export const WORKSPACES_ERROR_CODES = [
65
+ "error.400.already_workspace_member",
66
+ "error.400.bad_request",
67
+ "error.400.captcha_invalid",
68
+ "error.400.captcha_required",
69
+ "error.400.expected_list",
70
+ "error.400.field.blank",
71
+ "error.400.field.does_not_exist",
72
+ "error.400.field.invalid",
73
+ "error.400.field.invalid_choice",
74
+ "error.400.field.max_length",
75
+ "error.400.field.max_value",
76
+ "error.400.field.min_length",
77
+ "error.400.field.min_value",
78
+ "error.400.field.null",
79
+ "error.400.field.required",
80
+ "error.400.field.unique",
81
+ "error.400.invalid_ad_id",
82
+ "error.400.invalid_role",
83
+ "error.400.invitation_already_used",
84
+ "error.400.invitation_expired",
85
+ "error.400.invitation_revoked",
86
+ "error.400.validation_error",
87
+ "error.400.verification_failed",
88
+ "error.400.verification_invalid_factor",
89
+ "error.400.workspace_slug_taken",
90
+ "error.401.unauthorized",
91
+ "error.402.payment_required",
92
+ "error.403.forbidden",
93
+ "error.403.forbidden_workspace",
94
+ "error.403.last_owner_cannot_be_removed",
95
+ "error.403.network_blocked",
96
+ "error.403.verification_enrollment_required",
97
+ "error.403.verification_required",
98
+ "error.404.ad_not_found",
99
+ "error.404.invitation_not_found",
100
+ "error.404.member_not_found",
101
+ "error.404.not_found",
102
+ "error.404.verification_challenge_not_found",
103
+ "error.404.workspace_not_found",
104
+ "error.405.method_not_allowed",
105
+ "error.406.not_acceptable",
106
+ "error.408.request_timeout",
107
+ "error.409.conflict",
108
+ "error.410.gone",
109
+ "error.413.payload_too_large",
110
+ "error.415.unsupported_media_type",
111
+ "error.422.unprocessable_entity",
112
+ "error.423.locked",
113
+ "error.423.verification_locked",
114
+ "error.429.rate_limit",
115
+ "error.429.too_many_requests",
116
+ "error.500.internal",
117
+ ];
118
+ /**
119
+ * English fallback bundle — one string per backend key, so a `StapelApiError.code`
120
+ * never renders as a raw key. Merged UNDER the hand-polished UI copy in
121
+ * {@link authI18nBundleEn} (polish wins; this guarantees coverage).
122
+ */
123
+ export const workspacesErrorBundleEn = {
124
+ "error.400.already_workspace_member": "User is already a member of this workspace",
125
+ "error.400.bad_request": "Bad request",
126
+ "error.400.captcha_invalid": "Captcha verification failed. Please try again.",
127
+ "error.400.captcha_required": "Captcha token is required.",
128
+ "error.400.expected_list": "Expected a list of items",
129
+ "error.400.field.blank": "{field} may not be blank",
130
+ "error.400.field.does_not_exist": "{field} does not exist",
131
+ "error.400.field.invalid": "{field} is invalid",
132
+ "error.400.field.invalid_choice": "{field} is not a valid choice",
133
+ "error.400.field.max_length": "{field} must be at most {max_length} characters",
134
+ "error.400.field.max_value": "{field} must be at most {max_value}",
135
+ "error.400.field.min_length": "{field} must be at least {min_length} characters",
136
+ "error.400.field.min_value": "{field} must be at least {min_value}",
137
+ "error.400.field.null": "{field} may not be null",
138
+ "error.400.field.required": "{field} is required",
139
+ "error.400.field.unique": "{field} must be unique",
140
+ "error.400.invalid_ad_id": "Invalid advertisement ID",
141
+ "error.400.invalid_role": "Invalid role",
142
+ "error.400.invitation_already_used": "Invitation has already been used",
143
+ "error.400.invitation_expired": "Invitation has expired",
144
+ "error.400.invitation_revoked": "Invitation has been revoked",
145
+ "error.400.validation_error": "Validation error",
146
+ "error.400.verification_failed": "Verification failed",
147
+ "error.400.verification_invalid_factor": "This verification factor is not available",
148
+ "error.400.workspace_slug_taken": "Workspace slug is already taken",
149
+ "error.401.unauthorized": "Authentication required",
150
+ "error.402.payment_required": "Payment required",
151
+ "error.403.forbidden": "You do not have permission to perform this action",
152
+ "error.403.forbidden_workspace": "You do not have access to this workspace",
153
+ "error.403.last_owner_cannot_be_removed": "The last owner cannot be removed; transfer ownership first",
154
+ "error.403.network_blocked": "Requests from this network are not allowed",
155
+ "error.403.verification_enrollment_required": "Verification factor enrollment required",
156
+ "error.403.verification_required": "Additional verification required",
157
+ "error.404.ad_not_found": "Listing not found",
158
+ "error.404.invitation_not_found": "Invitation not found",
159
+ "error.404.member_not_found": "Member not found in this workspace",
160
+ "error.404.not_found": "Requested resource not found",
161
+ "error.404.verification_challenge_not_found": "Verification challenge not found or expired",
162
+ "error.404.workspace_not_found": "Workspace not found",
163
+ "error.405.method_not_allowed": "Method not allowed",
164
+ "error.406.not_acceptable": "Not acceptable",
165
+ "error.408.request_timeout": "Request timeout",
166
+ "error.409.conflict": "Resource already exists",
167
+ "error.410.gone": "Resource has been permanently removed",
168
+ "error.413.payload_too_large": "Request body is too large",
169
+ "error.415.unsupported_media_type": "Unsupported media type",
170
+ "error.422.unprocessable_entity": "Unprocessable entity",
171
+ "error.423.locked": "Resource is locked",
172
+ "error.423.verification_locked": "Too many failed attempts — verification locked",
173
+ "error.429.rate_limit": "Too many attempts. Try again in {retry_after_minutes} minutes.",
174
+ "error.429.too_many_requests": "Too many requests. Please try again later.",
175
+ "error.500.internal": "Something went wrong",
176
+ };
177
+ //# sourceMappingURL=errors.gen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.gen.js","sourceRoot":"","sources":["../../../src/i18n/generated/errors.gen.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,wEAAwE;AACxE,sEAAsE;AA6BtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,oCAAoC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,4CAA4C,EAAE;IAC7I,uBAAuB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,aAAa,EAAE;IACjG,2BAA2B,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,gDAAgD,EAAE;IACpI,4BAA4B,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,4BAA4B,EAAE;IACjH,yBAAyB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,0BAA0B,EAAE;IAChH,uBAAuB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,0BAA0B,EAAE;IACrH,gCAAgC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE,wBAAwB,EAAE;IAC5H,yBAAyB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,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E,2CAA2C;IACpF,gCAAgC,EAAE,iCAAiC;IACnE,wBAAwB,EAAE,yBAAyB;IACnD,4BAA4B,EAAE,kBAAkB;IAChD,qBAAqB,EAAE,mDAAmD;IAC1E,+BAA+B,EAAE,0CAA0C;IAC3E,wCAAwC,EAAE,4DAA4D;IACtG,2BAA2B,EAAE,4CAA4C;IACzE,4CAA4C,EAAE,yCAAyC;IACvF,iCAAiC,EAAE,kCAAkC;IACrE,wBAAwB,EAAE,mBAAmB;IAC7C,gCAAgC,EAAE,sBAAsB;IACxD,4BAA4B,EAAE,oCAAoC;IAClE,qBAAqB,EAAE,8BAA8B;IACrD,4CAA4C,EAAE,6CAA6C;IAC3F,+BAA+B,EAAE,qBAAqB;IACtD,8BAA8B,EAAE,oBAAoB;IACpD,0BAA0B,EAAE,gBAAgB;IAC5C,2BAA2B,EAAE,iBAAiB;IAC9C,oBAAoB,EAAE,yBAAyB;IAC/C,gBAAgB,EAAE,uCAAuC;IACzD,6BAA6B,EAAE,2BAA2B;IAC1D,kCAAkC,EAAE,wBAAwB;IAC5D,gCAAgC,EAAE,sBAAsB;IACxD,kBAAkB,EAAE,oBAAoB;IACxC,+BAA+B,EAAE,gDAAgD;IACjF,sBAAsB,EAAE,gEAAgE;IACxF,6BAA6B,EAAE,4CAA4C;IAC3E,oBAAoB,EAAE,sBAAsB;CAC7C,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { WorkspacesErrorCode } from "./errors.gen.js";
2
+ /**
3
+ * `ru` texts for every backend error code — complete over the registry by
4
+ * construction (the generator fails on a gap; the Record type fails compilation
5
+ * on drift). Import from the pair's `./i18n/ru` subpath, NOT the main
6
+ * entry, so the locale stays out of hosts that don't ship it.
7
+ */
8
+ export declare const workspacesErrorBundleRu: Record<WorkspacesErrorCode, string>;
9
+ //# sourceMappingURL=errors.ru.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.ru.gen.d.ts","sourceRoot":"","sources":["../../../src/i18n/generated/errors.ru.gen.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAqDvE,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * `ru` texts for every backend error code — complete over the registry by
3
+ * construction (the generator fails on a gap; the Record type fails compilation
4
+ * on drift). Import from the pair's `./i18n/ru` subpath, NOT the main
5
+ * entry, so the locale stays out of hosts that don't ship it.
6
+ */
7
+ export const workspacesErrorBundleRu = {
8
+ "error.400.already_workspace_member": "Пользователь уже является участником этого рабочего пространства",
9
+ "error.400.bad_request": "Некорректный запрос",
10
+ "error.400.captcha_invalid": "Проверка капчи не пройдена. Пожалуйста, попробуйте ещё раз.",
11
+ "error.400.captcha_required": "Требуется токен капчи.",
12
+ "error.400.expected_list": "Ожидался список элементов",
13
+ "error.400.field.blank": "Поле «{field}» не может быть пустым",
14
+ "error.400.field.does_not_exist": "«{field}» не существует",
15
+ "error.400.field.invalid": "Поле «{field}» содержит недопустимое значение",
16
+ "error.400.field.invalid_choice": "Недопустимый вариант для поля «{field}»",
17
+ "error.400.field.max_length": "Поле «{field}» должно содержать не более {max_length} символов",
18
+ "error.400.field.max_value": "Значение поля «{field}» должно быть не больше {max_value}",
19
+ "error.400.field.min_length": "Поле «{field}» должно содержать не менее {min_length} символов",
20
+ "error.400.field.min_value": "Значение поля «{field}» должно быть не меньше {min_value}",
21
+ "error.400.field.null": "Поле «{field}» не может быть null",
22
+ "error.400.field.required": "Поле «{field}» обязательно",
23
+ "error.400.field.unique": "Значение поля «{field}» должно быть уникальным",
24
+ "error.400.invalid_ad_id": "Недопустимый идентификатор объявления",
25
+ "error.400.invalid_role": "Недопустимая роль",
26
+ "error.400.invitation_already_used": "Приглашение уже было использовано",
27
+ "error.400.invitation_expired": "Срок действия приглашения истёк",
28
+ "error.400.invitation_revoked": "Приглашение было отозвано",
29
+ "error.400.validation_error": "Ошибка валидации",
30
+ "error.400.verification_failed": "Проверка не пройдена",
31
+ "error.400.verification_invalid_factor": "Этот способ подтверждения недоступен",
32
+ "error.400.workspace_slug_taken": "Slug рабочего пространства уже занят",
33
+ "error.401.unauthorized": "Требуется аутентификация",
34
+ "error.402.payment_required": "Требуется оплата",
35
+ "error.403.forbidden": "У вас нет прав для выполнения этого действия",
36
+ "error.403.forbidden_workspace": "У вас нет доступа к этому рабочему пространству",
37
+ "error.403.last_owner_cannot_be_removed": "Нельзя удалить последнего владельца; сначала передайте права владения",
38
+ "error.403.network_blocked": "Запросы из этой сети не разрешены.",
39
+ "error.403.verification_enrollment_required": "Требуется регистрация фактора подтверждения.",
40
+ "error.403.verification_required": "Требуется дополнительная проверка",
41
+ "error.404.ad_not_found": "Объявление не найдено",
42
+ "error.404.invitation_not_found": "Приглашение не найдено",
43
+ "error.404.member_not_found": "Участник не найден в этом рабочем пространстве",
44
+ "error.404.not_found": "Запрошенный ресурс не найден",
45
+ "error.404.verification_challenge_not_found": "Запрос на подтверждение не найден или истёк",
46
+ "error.404.workspace_not_found": "Рабочее пространство не найдено",
47
+ "error.405.method_not_allowed": "Метод не разрешён",
48
+ "error.406.not_acceptable": "Недопустимый формат ответа",
49
+ "error.408.request_timeout": "Время ожидания запроса истекло",
50
+ "error.409.conflict": "Ресурс уже существует",
51
+ "error.410.gone": "Ресурс был безвозвратно удалён",
52
+ "error.413.payload_too_large": "Тело запроса слишком большое",
53
+ "error.415.unsupported_media_type": "Неподдерживаемый тип данных",
54
+ "error.422.unprocessable_entity": "Невозможно обработать данные запроса",
55
+ "error.423.locked": "Ресурс заблокирован",
56
+ "error.423.verification_locked": "Слишком много неудачных попыток — подтверждение заблокировано",
57
+ "error.429.rate_limit": "Слишком много попыток. Повторите попытку через {retry_after_minutes} мин.",
58
+ "error.429.too_many_requests": "Слишком много запросов. Пожалуйста, повторите попытку позже.",
59
+ "error.500.internal": "Что-то пошло не так",
60
+ };
61
+ //# sourceMappingURL=errors.ru.gen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.ru.gen.js","sourceRoot":"","sources":["../../../src/i18n/generated/errors.ru.gen.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAwC;IAC1E,oCAAoC,EAAE,kEAAkE;IACxG,uBAAuB,EAAE,qBAAqB;IAC9C,2BAA2B,EAAE,6DAA6D;IAC1F,4BAA4B,EAAE,wBAAwB;IACtD,yBAAyB,EAAE,2BAA2B;IACtD,uBAAuB,EAAE,qCAAqC;IAC9D,gCAAgC,EAAE,yBAAyB;IAC3D,yBAAyB,EAAE,+CAA+C;IAC1E,gCAAgC,EAAE,yCAAyC;IAC3E,4BAA4B,EAAE,gEAAgE;IAC9F,2BAA2B,EAAE,2DAA2D;IACxF,4BAA4B,EAAE,gEAAgE;IAC9F,2BAA2B,EAAE,2DAA2D;IACxF,sBAAsB,EAAE,mCAAmC;IAC3D,0BAA0B,EAAE,4BAA4B;IACxD,wBAAwB,EAAE,gDAAgD;IAC1E,yBAAyB,EAAE,uCAAuC;IAClE,wBAAwB,EAAE,mBAAmB;IAC7C,mCAAmC,EAAE,mCAAmC;IACxE,8BAA8B,EAAE,iCAAiC;IACjE,8BAA8B,EAAE,2BAA2B;IAC3D,4BAA4B,EAAE,kBAAkB;IAChD,+BAA+B,EAAE,sBAAsB;IACvD,uCAAuC,EAAE,sCAAsC;IAC/E,gCAAgC,EAAE,sCAAsC;IACxE,wBAAwB,EAAE,0BAA0B;IACpD,4BAA4B,EAAE,kBAAkB;IAChD,qBAAqB,EAAE,8CAA8C;IACrE,+BAA+B,EAAE,iDAAiD;IAClF,wCAAwC,EAAE,uEAAuE;IACjH,2BAA2B,EAAE,oCAAoC;IACjE,4CAA4C,EAAE,8CAA8C;IAC5F,iCAAiC,EAAE,mCAAmC;IACtE,wBAAwB,EAAE,uBAAuB;IACjD,gCAAgC,EAAE,wBAAwB;IAC1D,4BAA4B,EAAE,gDAAgD;IAC9E,qBAAqB,EAAE,8BAA8B;IACrD,4CAA4C,EAAE,6CAA6C;IAC3F,+BAA+B,EAAE,iCAAiC;IAClE,8BAA8B,EAAE,mBAAmB;IACnD,0BAA0B,EAAE,4BAA4B;IACxD,2BAA2B,EAAE,gCAAgC;IAC7D,oBAAoB,EAAE,uBAAuB;IAC7C,gBAAgB,EAAE,gCAAgC;IAClD,6BAA6B,EAAE,8BAA8B;IAC7D,kCAAkC,EAAE,6BAA6B;IACjE,gCAAgC,EAAE,sCAAsC;IACxE,kBAAkB,EAAE,qBAAqB;IACzC,+BAA+B,EAAE,+DAA+D;IAChG,sBAAsB,EAAE,2EAA2E;IACnG,6BAA6B,EAAE,8DAA8D;IAC7F,oBAAoB,EAAE,qBAAqB;CAC5C,CAAC"}
@@ -0,0 +1,55 @@
1
+ import type { I18nDictionary, I18nEngine } from "@stapel/core";
2
+ /**
3
+ * workspaces-react's own translation KEYS (frontend-standard §4.2): headless
4
+ * components never render literal strings — hosts resolve these via core's i18n
5
+ * engine (`useT`). Backend error codes flow through the SAME contour: a
6
+ * `StapelApiError.code` is already a key, so the default bundle below ships
7
+ * English fallbacks for both the backend error codes (generated) and the
8
+ * pair's own UI keys. Point core's `loadLocale` at stapel-translate to override
9
+ * per locale. Add UI keys under the `workspaces.` namespace as you build flows.
10
+ */
11
+ export declare const WORKSPACES_I18N_KEYS: {
12
+ readonly unknownError: "workspaces.error.unknown";
13
+ readonly listLoading: "workspaces.list.loading";
14
+ readonly listEmpty: "workspaces.list.empty";
15
+ readonly listCreate: "workspaces.list.create";
16
+ readonly listCreating: "workspaces.list.creating";
17
+ readonly membersLoading: "workspaces.members.loading";
18
+ readonly membersInvite: "workspaces.members.invite";
19
+ readonly membersInviting: "workspaces.members.inviting";
20
+ readonly membersUpdateRole: "workspaces.members.update_role";
21
+ readonly membersRemove: "workspaces.members.remove";
22
+ readonly acceptAccept: "workspaces.accept.accept";
23
+ readonly acceptAccepting: "workspaces.accept.accepting";
24
+ readonly acceptAccepted: "workspaces.accept.accepted";
25
+ };
26
+ export type WorkspacesI18nKey = (typeof WORKSPACES_I18N_KEYS)[keyof typeof WORKSPACES_I18N_KEYS];
27
+ /**
28
+ * English fallback bundle for workspaces-react UI keys + backend error codes.
29
+ * The generated `workspacesErrorBundleEn` (from stapel-workspaces's error registry,
30
+ * `pnpm gen:errors`) is spread FIRST so every backend `error.*` key has a
31
+ * fallback — a `StapelApiError.code` never renders as a raw key. Hand-polished
32
+ * copy below then OVERRIDES the generated English for the keys users see most.
33
+ */
34
+ export declare const workspacesI18nBundleEn: I18nDictionary;
35
+ /**
36
+ * Register workspaces-react's key bundle into a core i18n engine (call once at
37
+ * startup). Registers under the given locale (default `"en"`); a later
38
+ * `loadLocale` from stapel-translate can layer localized overrides.
39
+ *
40
+ * MERGE-PRIORITY CONVENTION (pair checklist rule; i18n-shipping.md §3 — every
41
+ * `@stapel/*-react` pair follows it): registration order IS override
42
+ * priority, later wins per key. Within a locale, layers register bottom-up:
43
+ *
44
+ * 1. generated en floor (`WorkspacesErrorBundleEn` — coverage by construction),
45
+ * 2. the pair's polish / UI copy (this bundle spreads 1 then overrides),
46
+ * 3. the pair's locale bundle from the `./i18n/<locale>` subpath
47
+ * (e.g. `registerWorkspacesI18nRu` — registers the en floor UNDER the
48
+ * locale texts so a missing key degrades to English, never a raw key),
49
+ * 4. the HOST's own bundle — always registered LAST, so a host overrides any
50
+ * pair text without a fork.
51
+ *
52
+ * Dynamic overrides (stapel-translate `loadLocale`) layer on top at runtime.
53
+ */
54
+ export declare function registerWorkspacesI18n(engine: I18nEngine, locale?: string): void;
55
+ //# sourceMappingURL=keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/i18n/keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/D;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;CAiBvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAkBpC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,SAAO,GAAG,IAAI,CAE9E"}
@@ -0,0 +1,76 @@
1
+ import { workspacesErrorBundleEn } from "./generated/errors.gen.js";
2
+ /**
3
+ * workspaces-react's own translation KEYS (frontend-standard §4.2): headless
4
+ * components never render literal strings — hosts resolve these via core's i18n
5
+ * engine (`useT`). Backend error codes flow through the SAME contour: a
6
+ * `StapelApiError.code` is already a key, so the default bundle below ships
7
+ * English fallbacks for both the backend error codes (generated) and the
8
+ * pair's own UI keys. Point core's `loadLocale` at stapel-translate to override
9
+ * per locale. Add UI keys under the `workspaces.` namespace as you build flows.
10
+ */
11
+ export const WORKSPACES_I18N_KEYS = {
12
+ unknownError: "workspaces.error.unknown",
13
+ // Workspace list (WorkspaceList headless)
14
+ listLoading: "workspaces.list.loading",
15
+ listEmpty: "workspaces.list.empty",
16
+ listCreate: "workspaces.list.create",
17
+ listCreating: "workspaces.list.creating",
18
+ // Members (Members headless)
19
+ membersLoading: "workspaces.members.loading",
20
+ membersInvite: "workspaces.members.invite",
21
+ membersInviting: "workspaces.members.inviting",
22
+ membersUpdateRole: "workspaces.members.update_role",
23
+ membersRemove: "workspaces.members.remove",
24
+ // Accept invitation (AcceptInvitation headless)
25
+ acceptAccept: "workspaces.accept.accept",
26
+ acceptAccepting: "workspaces.accept.accepting",
27
+ acceptAccepted: "workspaces.accept.accepted",
28
+ };
29
+ /**
30
+ * English fallback bundle for workspaces-react UI keys + backend error codes.
31
+ * The generated `workspacesErrorBundleEn` (from stapel-workspaces's error registry,
32
+ * `pnpm gen:errors`) is spread FIRST so every backend `error.*` key has a
33
+ * fallback — a `StapelApiError.code` never renders as a raw key. Hand-polished
34
+ * copy below then OVERRIDES the generated English for the keys users see most.
35
+ */
36
+ export const workspacesI18nBundleEn = {
37
+ // Backend error codes — generated en fallbacks (coverage by construction).
38
+ ...workspacesErrorBundleEn,
39
+ // workspaces-react UI
40
+ "workspaces.error.unknown": "Something went wrong. Please try again.",
41
+ "workspaces.list.loading": "Loading workspaces…",
42
+ "workspaces.list.empty": "No workspaces yet.",
43
+ "workspaces.list.create": "Create workspace",
44
+ "workspaces.list.creating": "Creating…",
45
+ "workspaces.members.loading": "Loading members…",
46
+ "workspaces.members.invite": "Invite",
47
+ "workspaces.members.inviting": "Inviting…",
48
+ "workspaces.members.update_role": "Change role",
49
+ "workspaces.members.remove": "Remove",
50
+ "workspaces.accept.accept": "Accept invitation",
51
+ "workspaces.accept.accepting": "Accepting…",
52
+ "workspaces.accept.accepted": "You've joined the workspace.",
53
+ };
54
+ /**
55
+ * Register workspaces-react's key bundle into a core i18n engine (call once at
56
+ * startup). Registers under the given locale (default `"en"`); a later
57
+ * `loadLocale` from stapel-translate can layer localized overrides.
58
+ *
59
+ * MERGE-PRIORITY CONVENTION (pair checklist rule; i18n-shipping.md §3 — every
60
+ * `@stapel/*-react` pair follows it): registration order IS override
61
+ * priority, later wins per key. Within a locale, layers register bottom-up:
62
+ *
63
+ * 1. generated en floor (`WorkspacesErrorBundleEn` — coverage by construction),
64
+ * 2. the pair's polish / UI copy (this bundle spreads 1 then overrides),
65
+ * 3. the pair's locale bundle from the `./i18n/<locale>` subpath
66
+ * (e.g. `registerWorkspacesI18nRu` — registers the en floor UNDER the
67
+ * locale texts so a missing key degrades to English, never a raw key),
68
+ * 4. the HOST's own bundle — always registered LAST, so a host overrides any
69
+ * pair text without a fork.
70
+ *
71
+ * Dynamic overrides (stapel-translate `loadLocale`) layer on top at runtime.
72
+ */
73
+ export function registerWorkspacesI18n(engine, locale = "en") {
74
+ engine.registerBundle(locale, workspacesI18nBundleEn);
75
+ }
76
+ //# sourceMappingURL=keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/i18n/keys.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,YAAY,EAAE,0BAA0B;IACxC,0CAA0C;IAC1C,WAAW,EAAE,yBAAyB;IACtC,SAAS,EAAE,uBAAuB;IAClC,UAAU,EAAE,wBAAwB;IACpC,YAAY,EAAE,0BAA0B;IACxC,6BAA6B;IAC7B,cAAc,EAAE,4BAA4B;IAC5C,aAAa,EAAE,2BAA2B;IAC1C,eAAe,EAAE,6BAA6B;IAC9C,iBAAiB,EAAE,gCAAgC;IACnD,aAAa,EAAE,2BAA2B;IAC1C,gDAAgD;IAChD,YAAY,EAAE,0BAA0B;IACxC,eAAe,EAAE,6BAA6B;IAC9C,cAAc,EAAE,4BAA4B;CACpC,CAAC;AAKX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAmB;IACpD,2EAA2E;IAC3E,GAAG,uBAAuB;IAE1B,sBAAsB;IACtB,0BAA0B,EAAE,yCAAyC;IACrE,yBAAyB,EAAE,qBAAqB;IAChD,uBAAuB,EAAE,oBAAoB;IAC7C,wBAAwB,EAAE,kBAAkB;IAC5C,0BAA0B,EAAE,WAAW;IACvC,4BAA4B,EAAE,kBAAkB;IAChD,2BAA2B,EAAE,QAAQ;IACrC,6BAA6B,EAAE,WAAW;IAC1C,gCAAgC,EAAE,aAAa;IAC/C,2BAA2B,EAAE,QAAQ;IACrC,0BAA0B,EAAE,mBAAmB;IAC/C,6BAA6B,EAAE,YAAY;IAC3C,4BAA4B,EAAE,8BAA8B;CAC7D,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAkB,EAAE,MAAM,GAAG,IAAI;IACtE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { I18nDictionary, I18nEngine } from "@stapel/core";
2
+ export { workspacesErrorBundleRu } from "./generated/errors.ru.gen.js";
3
+ /**
4
+ * Russian bundle for workspaces-react — the pair's `ru` locale, shipped as
5
+ * the `@stapel/workspaces-react/i18n/ru` subpath (i18n-shipping.md §2) so
6
+ * the locale is opt-in: hosts that don't register it never carry these
7
+ * strings (the main entry does not import this module — gated by size-limit
8
+ * + the bundle-purity test).
9
+ *
10
+ * Composition mirrors {@link workspacesI18nBundleEn}: the GENERATED backend
11
+ * error texts (from stapel-workspaces's `translations/errors.ru.json`
12
+ * catalog, seeded from the curated stapel-translate corpus — `pnpm
13
+ * gen:errors`) are spread first for coverage by construction; the
14
+ * hand-written ru UI copy for the pair-owned {@link WORKSPACES_I18N_KEYS}
15
+ * follows. Override any key by registering a host bundle AFTER this one
16
+ * (merge-priority convention — see keys.ts).
17
+ */
18
+ export declare const workspacesI18nBundleRu: I18nDictionary;
19
+ /**
20
+ * Register the pair's `ru` locale into a core i18n engine (call once at
21
+ * startup, after {@link registerWorkspacesI18n}). Layers per the
22
+ * merge-priority convention (i18n-shipping.md §3): the en floor is registered
23
+ * UNDER the ru texts inside the `ru` locale, so a key the ru bundle ever
24
+ * misses degrades to its English text — never to a raw key. A host bundle
25
+ * registered after this call overrides both.
26
+ */
27
+ export declare function registerWorkspacesI18nRu(engine: I18nEngine): void;
28
+ //# sourceMappingURL=ru.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../src/i18n/ru.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAkBpC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAGjE"}
@@ -0,0 +1,49 @@
1
+ import { workspacesI18nBundleEn } from "./keys.js";
2
+ import { workspacesErrorBundleRu } from "./generated/errors.ru.gen.js";
3
+ export { workspacesErrorBundleRu } from "./generated/errors.ru.gen.js";
4
+ /**
5
+ * Russian bundle for workspaces-react — the pair's `ru` locale, shipped as
6
+ * the `@stapel/workspaces-react/i18n/ru` subpath (i18n-shipping.md §2) so
7
+ * the locale is opt-in: hosts that don't register it never carry these
8
+ * strings (the main entry does not import this module — gated by size-limit
9
+ * + the bundle-purity test).
10
+ *
11
+ * Composition mirrors {@link workspacesI18nBundleEn}: the GENERATED backend
12
+ * error texts (from stapel-workspaces's `translations/errors.ru.json`
13
+ * catalog, seeded from the curated stapel-translate corpus — `pnpm
14
+ * gen:errors`) are spread first for coverage by construction; the
15
+ * hand-written ru UI copy for the pair-owned {@link WORKSPACES_I18N_KEYS}
16
+ * follows. Override any key by registering a host bundle AFTER this one
17
+ * (merge-priority convention — see keys.ts).
18
+ */
19
+ export const workspacesI18nBundleRu = {
20
+ // Backend error codes — generated ru texts (coverage by construction).
21
+ ...workspacesErrorBundleRu,
22
+ // workspaces-react UI (hand-written ru mirror of the en copy in keys.ts)
23
+ "workspaces.error.unknown": "Что-то пошло не так. Попробуйте ещё раз.",
24
+ "workspaces.list.loading": "Загрузка рабочих пространств…",
25
+ "workspaces.list.empty": "Пока нет рабочих пространств.",
26
+ "workspaces.list.create": "Создать рабочее пространство",
27
+ "workspaces.list.creating": "Создание…",
28
+ "workspaces.members.loading": "Загрузка участников…",
29
+ "workspaces.members.invite": "Пригласить",
30
+ "workspaces.members.inviting": "Приглашение…",
31
+ "workspaces.members.update_role": "Изменить роль",
32
+ "workspaces.members.remove": "Удалить",
33
+ "workspaces.accept.accept": "Принять приглашение",
34
+ "workspaces.accept.accepting": "Принятие…",
35
+ "workspaces.accept.accepted": "Вы присоединились к рабочему пространству.",
36
+ };
37
+ /**
38
+ * Register the pair's `ru` locale into a core i18n engine (call once at
39
+ * startup, after {@link registerWorkspacesI18n}). Layers per the
40
+ * merge-priority convention (i18n-shipping.md §3): the en floor is registered
41
+ * UNDER the ru texts inside the `ru` locale, so a key the ru bundle ever
42
+ * misses degrades to its English text — never to a raw key. A host bundle
43
+ * registered after this call overrides both.
44
+ */
45
+ export function registerWorkspacesI18nRu(engine) {
46
+ engine.registerBundle("ru", workspacesI18nBundleEn);
47
+ engine.registerBundle("ru", workspacesI18nBundleRu);
48
+ }
49
+ //# sourceMappingURL=ru.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru.js","sourceRoot":"","sources":["../../src/i18n/ru.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAmB;IACpD,uEAAuE;IACvE,GAAG,uBAAuB;IAE1B,yEAAyE;IACzE,0BAA0B,EAAE,0CAA0C;IACtE,yBAAyB,EAAE,+BAA+B;IAC1D,uBAAuB,EAAE,+BAA+B;IACxD,wBAAwB,EAAE,8BAA8B;IACxD,0BAA0B,EAAE,WAAW;IACvC,4BAA4B,EAAE,sBAAsB;IACpD,2BAA2B,EAAE,YAAY;IACzC,6BAA6B,EAAE,cAAc;IAC7C,gCAAgC,EAAE,eAAe;IACjD,2BAA2B,EAAE,SAAS;IACtC,0BAA0B,EAAE,qBAAqB;IACjD,6BAA6B,EAAE,WAAW;IAC1C,4BAA4B,EAAE,4CAA4C;CAC3E,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAkB;IACzD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;IACpD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * `@stapel/workspaces-react` — the headless React flow pair for stapel-workspaces
3
+ * (frontend-standard §2). Business + state only, zero visual opinion. Built on
4
+ * `@stapel/core`'s StapelClient (verification-403 interception, token refresh,
5
+ * i18n, analytics, query layer).
6
+ *
7
+ * Scaffolded by `stapel-new-react-lib`. Layers: api → model → flows → headless
8
+ * → i18n. Generated surfaces (flows registry, error map, manifest, llms.txt)
9
+ * are produced by the monorepo `gen:*` drivers and stand under drift gates.
10
+ */
11
+ export { createWorkspacesApi } from "./api/workspacesApi.js";
12
+ export type { WorkspacesApi } from "./api/workspacesApi.js";
13
+ export type { Schemas } from "./api/types.js";
14
+ export { createFlowMachine, useFlow, isErrorCode } from "@stapel/core";
15
+ export type { FlowMachine, FlowMachineOptions, FlowStateBase, FlowError, } from "@stapel/core";
16
+ export { toFlowError } from "./flows/errors.js";
17
+ export { WORKSPACES_FLOWS, flowEndpoints } from "./flows/generated/flows.gen.js";
18
+ export type { WorkspacesFlowId, WorkspacesFlowSpec, FlowEndpoint, } from "./flows/generated/flows.gen.js";
19
+ export { createWorkspacesRuntime } from "./model/runtime.js";
20
+ export type { WorkspacesRuntime, CreateWorkspacesRuntimeOptions, } from "./model/runtime.js";
21
+ export { WorkspacesRuntimeContext, useWorkspacesRuntime, useWorkspacesApi, useWorkspacesAnalytics, } from "./model/context.js";
22
+ export { workspacesQueryKeys } from "./model/queryKeys.js";
23
+ export { useWorkspaces, useWorkspace, useMembers, } from "./model/queries.js";
24
+ export { useCreateWorkspace, useUpdateWorkspace, useDeleteWorkspace, useInviteMembers, useUpdateMemberRole, useRemoveMember, useAcceptInvitation, } from "./model/mutations.js";
25
+ export type { MemberRoleChange } from "./model/mutations.js";
26
+ export type { Workspace as WorkspaceData, WorkspaceList as WorkspaceListData, WorkspaceCreate, WorkspaceUpdate, Member as MemberData, MemberList as MemberListData, MemberInvite, MemberInviteResult, MemberRoleUpdate, Invitation, InvitationAccept, WorkspaceRole, WorkspaceKind, } from "./api/types.js";
27
+ export { WorkspacesProvider } from "./headless/WorkspacesProvider.js";
28
+ export { WorkspaceList } from "./headless/WorkspaceList.js";
29
+ export type { WorkspaceListBag } from "./headless/WorkspaceList.js";
30
+ export { Members } from "./headless/Members.js";
31
+ export type { MembersBag } from "./headless/Members.js";
32
+ export { AcceptInvitation } from "./headless/AcceptInvitation.js";
33
+ export type { AcceptInvitationBag } from "./headless/AcceptInvitation.js";
34
+ export { WORKSPACES_I18N_KEYS, workspacesI18nBundleEn, registerWorkspacesI18n, } from "./i18n/keys.js";
35
+ export type { WorkspacesI18nKey } from "./i18n/keys.js";
36
+ export { WORKSPACES_ERRORS, WORKSPACES_ERROR_CODES, workspacesErrorBundleEn, explainWorkspacesError, } from "./i18n/errorsMap.js";
37
+ export type { WorkspacesErrorCode, WorkspacesErrorSpec, Remediation, } from "./i18n/errorsMap.js";
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAK9C,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvE,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,aAAa,E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MAAM,gCAAgC,CAAC;AAG1E,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,GACZ,MAAM,qBAAqB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,36 @@
1
+ /**
2
+ * `@stapel/workspaces-react` — the headless React flow pair for stapel-workspaces
3
+ * (frontend-standard §2). Business + state only, zero visual opinion. Built on
4
+ * `@stapel/core`'s StapelClient (verification-403 interception, token refresh,
5
+ * i18n, analytics, query layer).
6
+ *
7
+ * Scaffolded by `stapel-new-react-lib`. Layers: api → model → flows → headless
8
+ * → i18n. Generated surfaces (flows registry, error map, manifest, llms.txt)
9
+ * are produced by the monorepo `gen:*` drivers and stand under drift gates.
10
+ */
11
+ // ── api ──────────────────────────────────────────────────────────────────────
12
+ export { createWorkspacesApi } from "./api/workspacesApi.js";
13
+ // ── flows ────────────────────────────────────────────────────────────────────
14
+ // The flow-machine primitive lives in `@stapel/core` (one reviewed copy for
15
+ // every pair — frontend-core-architecture §4b). Re-exported for ergonomics.
16
+ export { createFlowMachine, useFlow, isErrorCode } from "@stapel/core";
17
+ export { toFlowError } from "./flows/errors.js";
18
+ export { WORKSPACES_FLOWS, flowEndpoints } from "./flows/generated/flows.gen.js";
19
+ // ── model (runtime wiring, query keys, context) ──────────────────────────────
20
+ export { createWorkspacesRuntime } from "./model/runtime.js";
21
+ export { WorkspacesRuntimeContext, useWorkspacesRuntime, useWorkspacesApi, useWorkspacesAnalytics, } from "./model/context.js";
22
+ export { workspacesQueryKeys } from "./model/queryKeys.js";
23
+ // ── model (read hooks) ───────────────────────────────────────────────────────
24
+ export { useWorkspaces, useWorkspace, useMembers, } from "./model/queries.js";
25
+ // ── model (write hooks) ──────────────────────────────────────────────────────
26
+ export { useCreateWorkspace, useUpdateWorkspace, useDeleteWorkspace, useInviteMembers, useUpdateMemberRole, useRemoveMember, useAcceptInvitation, } from "./model/mutations.js";
27
+ // ── headless (renderless components) ─────────────────────────────────────────
28
+ export { WorkspacesProvider } from "./headless/WorkspacesProvider.js";
29
+ export { WorkspaceList } from "./headless/WorkspaceList.js";
30
+ export { Members } from "./headless/Members.js";
31
+ export { AcceptInvitation } from "./headless/AcceptInvitation.js";
32
+ // ── i18n ─────────────────────────────────────────────────────────────────────
33
+ export { WORKSPACES_I18N_KEYS, workspacesI18nBundleEn, registerWorkspacesI18n, } from "./i18n/keys.js";
34
+ // ── errors map (code → status/params/remediation/en; generated) ──────────────
35
+ export { WORKSPACES_ERRORS, WORKSPACES_ERROR_CODES, workspacesErrorBundleEn, explainWorkspacesError, } from "./i18n/errorsMap.js";
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAI7D,gFAAgF;AAChF,4EAA4E;AAC5E,4EAA4E;AAC5E,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAOvE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAOjF,gFAAgF;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAK7D,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,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