@allbluecn/shared 0.3.13 → 0.4.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 (198) hide show
  1. package/dist/config-CcbSbJoC.js +6344 -0
  2. package/dist/constants/perf.d.ts +6 -0
  3. package/dist/constants/perf.js +6 -0
  4. package/dist/constants-C3hGP_ru.d.ts +33 -0
  5. package/dist/i18n/client.d.ts +5 -0
  6. package/dist/i18n/client.js +34 -0
  7. package/dist/i18n/config.d.ts +6270 -0
  8. package/dist/i18n/config.js +2 -0
  9. package/dist/i18n/detect.d.ts +5 -0
  10. package/dist/i18n/detect.js +35 -0
  11. package/dist/i18n/server.d.ts +6 -0
  12. package/dist/i18n/server.js +19 -0
  13. package/dist/i18n/types.d.ts +3 -0
  14. package/dist/i18n/types.js +0 -0
  15. package/dist/index.d.ts +18 -0
  16. package/dist/index.js +14 -0
  17. package/dist/infrastructure/ai/adapter.d.ts +8 -0
  18. package/dist/infrastructure/ai/adapter.js +32 -0
  19. package/dist/infrastructure/ai/cli-detector.d.ts +6 -0
  20. package/dist/infrastructure/ai/cli-detector.js +121 -0
  21. package/dist/infrastructure/ip-location.d.ts +9 -0
  22. package/dist/infrastructure/ip-location.js +48 -0
  23. package/dist/infrastructure/references/engine.d.ts +7 -0
  24. package/dist/infrastructure/references/engine.js +64 -0
  25. package/dist/infrastructure/ua-parser.d.ts +20 -0
  26. package/dist/infrastructure/ua-parser.js +69 -0
  27. package/dist/interfaces/ai.d.ts +27 -0
  28. package/dist/interfaces/ai.js +0 -0
  29. package/dist/interfaces/avatar.d.ts +6 -0
  30. package/dist/interfaces/avatar.js +0 -0
  31. package/dist/interfaces/module.d.ts +45 -0
  32. package/dist/interfaces/module.js +0 -0
  33. package/dist/interfaces/references.d.ts +27 -0
  34. package/dist/interfaces/references.js +0 -0
  35. package/dist/interfaces/transport.d.ts +11 -0
  36. package/dist/interfaces/transport.js +0 -0
  37. package/dist/lib/annotation-template.d.ts +9 -0
  38. package/dist/lib/annotation-template.js +14 -0
  39. package/dist/lib/comment-utils.d.ts +7 -0
  40. package/dist/lib/comment-utils.js +27 -0
  41. package/dist/lib/datetime.d.ts +25 -0
  42. package/dist/lib/datetime.js +73 -0
  43. package/dist/lib/desktop-detect.d.ts +13 -0
  44. package/dist/lib/desktop-detect.js +23 -0
  45. package/dist/lib/outline-utils.d.ts +6 -0
  46. package/dist/lib/outline-utils.js +46 -0
  47. package/dist/lib/pacer.d.ts +45 -0
  48. package/dist/lib/pacer.js +70 -0
  49. package/dist/lib/prd/stack-layout.d.ts +18 -0
  50. package/dist/lib/prd/stack-layout.js +24 -0
  51. package/dist/lib/prd-tree-utils.d.ts +21 -0
  52. package/dist/lib/prd-tree-utils.js +62 -0
  53. package/dist/lib/prototype-registry.d.ts +2 -0
  54. package/dist/lib/prototype-registry.js +2 -0
  55. package/dist/lib/query-client-seam.d.ts +6 -0
  56. package/dist/lib/query-client-seam.js +11 -0
  57. package/dist/lib/share-events.d.ts +7 -0
  58. package/dist/lib/share-events.js +47 -0
  59. package/dist/lib/sidebar-utils.d.ts +4 -0
  60. package/dist/lib/sidebar-utils.js +7 -0
  61. package/dist/lib/stores/prd-canvas-store.d.ts +16 -0
  62. package/dist/lib/stores/prd-canvas-store.js +42 -0
  63. package/dist/lib/tag-colors.d.ts +12 -0
  64. package/dist/lib/tag-colors.js +74 -0
  65. package/dist/lib/time-format.d.ts +4 -0
  66. package/dist/lib/time-format.js +20 -0
  67. package/dist/modules/ai-providers/constants.d.ts +2 -0
  68. package/dist/modules/ai-providers/constants.js +125 -0
  69. package/dist/modules/ai-providers/index.d.ts +4 -0
  70. package/dist/modules/ai-providers/index.js +4 -0
  71. package/dist/modules/ai-providers/seed-data.d.ts +2 -0
  72. package/dist/modules/ai-providers/seed-data.js +408 -0
  73. package/dist/modules/ai-providers/types.d.ts +2 -0
  74. package/dist/modules/ai-providers/types.js +10 -0
  75. package/dist/modules/billing/feature-registry.d.ts +72 -0
  76. package/dist/modules/billing/feature-registry.js +67 -0
  77. package/dist/modules/billing/plan-features-schema.d.ts +6 -0
  78. package/dist/modules/billing/plan-features-schema.js +6 -0
  79. package/dist/modules/billing/resource-registry.d.ts +59 -0
  80. package/dist/modules/billing/resource-registry.js +47 -0
  81. package/dist/modules/definitions/plugin.module.d.ts +5 -0
  82. package/dist/modules/definitions/plugin.module.js +24 -0
  83. package/dist/modules/definitions/prd.module.d.ts +5 -0
  84. package/dist/modules/definitions/prd.module.js +26 -0
  85. package/dist/modules/definitions/prototype.module.d.ts +5 -0
  86. package/dist/modules/definitions/prototype.module.js +20 -0
  87. package/dist/modules/dependencies/index.d.ts +92 -0
  88. package/dist/modules/dependencies/index.js +334 -0
  89. package/dist/modules/register-defaults.d.ts +4 -0
  90. package/dist/modules/register-defaults.js +12 -0
  91. package/dist/modules/registry.d.ts +17 -0
  92. package/dist/modules/registry.js +27 -0
  93. package/dist/seed-data-BK0cl93n.d.ts +6 -0
  94. package/dist/server-seam.d.ts +19 -0
  95. package/dist/server-seam.js +11 -0
  96. package/dist/types/outline.d.ts +10 -0
  97. package/dist/types/outline.js +0 -0
  98. package/dist/types/prd.d.ts +48 -0
  99. package/dist/types/prd.js +37 -0
  100. package/dist/types/prototype.d.ts +2 -0
  101. package/dist/types/prototype.js +2 -0
  102. package/dist/types-dopOMFRC.d.ts +61 -0
  103. package/dist/virtual.d.ts +1 -0
  104. package/package.json +133 -37
  105. package/src/constants/perf.ts +0 -21
  106. package/src/i18n/client.ts +0 -32
  107. package/src/i18n/config.ts +0 -104
  108. package/src/i18n/detect.ts +0 -43
  109. package/src/i18n/locales/en/agents.json +0 -134
  110. package/src/i18n/locales/en/apps.json +0 -6
  111. package/src/i18n/locales/en/auth.json +0 -88
  112. package/src/i18n/locales/en/billing.json +0 -78
  113. package/src/i18n/locales/en/chat.json +0 -194
  114. package/src/i18n/locales/en/common.json +0 -203
  115. package/src/i18n/locales/en/dashboard.json +0 -38
  116. package/src/i18n/locales/en/design.json +0 -70
  117. package/src/i18n/locales/en/desktop.json +0 -35
  118. package/src/i18n/locales/en/display.json +0 -37
  119. package/src/i18n/locales/en/editor.json +0 -304
  120. package/src/i18n/locales/en/enterprise.json +0 -1
  121. package/src/i18n/locales/en/invite.json +0 -11
  122. package/src/i18n/locales/en/knowledge.json +0 -451
  123. package/src/i18n/locales/en/mindmap.json +0 -28
  124. package/src/i18n/locales/en/prd.json +0 -43
  125. package/src/i18n/locales/en/projects.json +0 -133
  126. package/src/i18n/locales/en/settings.json +0 -375
  127. package/src/i18n/locales/en/share.json +0 -20
  128. package/src/i18n/locales/en/story.json +0 -785
  129. package/src/i18n/locales/en/tags.json +0 -42
  130. package/src/i18n/locales/en/workspace.json +0 -90
  131. package/src/i18n/locales/zh/agents.json +0 -134
  132. package/src/i18n/locales/zh/apps.json +0 -6
  133. package/src/i18n/locales/zh/auth.json +0 -88
  134. package/src/i18n/locales/zh/billing.json +0 -78
  135. package/src/i18n/locales/zh/chat.json +0 -194
  136. package/src/i18n/locales/zh/common.json +0 -203
  137. package/src/i18n/locales/zh/dashboard.json +0 -38
  138. package/src/i18n/locales/zh/design.json +0 -70
  139. package/src/i18n/locales/zh/desktop.json +0 -35
  140. package/src/i18n/locales/zh/display.json +0 -37
  141. package/src/i18n/locales/zh/editor.json +0 -304
  142. package/src/i18n/locales/zh/enterprise.json +0 -1
  143. package/src/i18n/locales/zh/invite.json +0 -11
  144. package/src/i18n/locales/zh/knowledge.json +0 -451
  145. package/src/i18n/locales/zh/mindmap.json +0 -28
  146. package/src/i18n/locales/zh/prd.json +0 -43
  147. package/src/i18n/locales/zh/projects.json +0 -133
  148. package/src/i18n/locales/zh/settings.json +0 -375
  149. package/src/i18n/locales/zh/share.json +0 -20
  150. package/src/i18n/locales/zh/story.json +0 -785
  151. package/src/i18n/locales/zh/tags.json +0 -42
  152. package/src/i18n/locales/zh/workspace.json +0 -90
  153. package/src/i18n/server.ts +0 -18
  154. package/src/i18n/types.ts +0 -5
  155. package/src/index.ts +0 -90
  156. package/src/infrastructure/ai/adapter.ts +0 -59
  157. package/src/infrastructure/ai/cli-detector.ts +0 -64
  158. package/src/infrastructure/ip-location.ts +0 -76
  159. package/src/infrastructure/references/engine.ts +0 -104
  160. package/src/infrastructure/ua-parser.ts +0 -107
  161. package/src/interfaces/ai.ts +0 -38
  162. package/src/interfaces/avatar.ts +0 -22
  163. package/src/interfaces/module.ts +0 -60
  164. package/src/interfaces/references.ts +0 -44
  165. package/src/interfaces/transport.ts +0 -26
  166. package/src/lib/annotation-template.ts +0 -33
  167. package/src/lib/comment-utils.ts +0 -47
  168. package/src/lib/datetime.ts +0 -115
  169. package/src/lib/desktop-detect.ts +0 -27
  170. package/src/lib/outline-utils.ts +0 -57
  171. package/src/lib/pacer.ts +0 -96
  172. package/src/lib/prd/stack-layout.ts +0 -53
  173. package/src/lib/prd-tree-utils.ts +0 -94
  174. package/src/lib/prototype-registry.ts +0 -24
  175. package/src/lib/query-client-seam.ts +0 -14
  176. package/src/lib/share-events.ts +0 -78
  177. package/src/lib/sidebar-utils.ts +0 -21
  178. package/src/lib/stores/prd-canvas-store.ts +0 -69
  179. package/src/lib/tag-colors.ts +0 -35
  180. package/src/lib/time-format.ts +0 -50
  181. package/src/modules/ai-providers/constants.ts +0 -79
  182. package/src/modules/ai-providers/index.ts +0 -21
  183. package/src/modules/ai-providers/seed-data.ts +0 -222
  184. package/src/modules/ai-providers/types.ts +0 -95
  185. package/src/modules/billing/feature-registry.ts +0 -63
  186. package/src/modules/billing/plan-features-schema.ts +0 -11
  187. package/src/modules/billing/resource-registry.ts +0 -80
  188. package/src/modules/definitions/plugin.module.ts +0 -38
  189. package/src/modules/definitions/prd.module.ts +0 -45
  190. package/src/modules/definitions/prototype.module.ts +0 -38
  191. package/src/modules/dependencies/index.ts +0 -186
  192. package/src/modules/register-defaults.ts +0 -27
  193. package/src/modules/registry.ts +0 -53
  194. package/src/server-seam.ts +0 -51
  195. package/src/types/outline.ts +0 -26
  196. package/src/types/prd.ts +0 -90
  197. package/src/types/prototype.ts +0 -12
  198. package/src/virtual.d.ts +0 -4
@@ -0,0 +1,6 @@
1
+ //#region src/constants/perf.d.ts
2
+ declare const VIRTUALIZE_THRESHOLD = 250;
3
+ declare const LOAD_MORE_STEP = 200;
4
+ declare const DND_STICKY_THRESHOLD = 500;
5
+ //#endregion
6
+ export { DND_STICKY_THRESHOLD, LOAD_MORE_STEP, VIRTUALIZE_THRESHOLD };
@@ -0,0 +1,6 @@
1
+ //#region src/constants/perf.ts
2
+ const VIRTUALIZE_THRESHOLD = 250;
3
+ const LOAD_MORE_STEP = 200;
4
+ const DND_STICKY_THRESHOLD = 500;
5
+ //#endregion
6
+ export { DND_STICKY_THRESHOLD, LOAD_MORE_STEP, VIRTUALIZE_THRESHOLD };
@@ -0,0 +1,33 @@
1
+ import { a as ModelCapability, s as ProviderCategory, t as AdapterKind } from "./types-dopOMFRC.js";
2
+ //#region src/modules/ai-providers/constants.d.ts
3
+ declare const ADAPTER_KINDS: Array<{
4
+ value: AdapterKind;
5
+ label: string;
6
+ description: string;
7
+ }>;
8
+ declare const PROVIDER_CATEGORIES: Array<{
9
+ value: ProviderCategory;
10
+ label: string;
11
+ }>;
12
+ declare const ADAPTER_KIND_VALUES: AdapterKind[];
13
+ declare const PROVIDER_CATEGORY_VALUES: ProviderCategory[];
14
+ declare const MODEL_CAPABILITY_OPTIONS: Array<{
15
+ value: ModelCapability;
16
+ label: string;
17
+ }>;
18
+ /**
19
+ * 模型管理 tabs 筛选项(参考 lobehub)。
20
+ * value 对应 ModelCapability,'all' 为全部,'video' 暂预留(无对应 capability)。
21
+ */
22
+ type ModelTab = 'all' | 'text' | 'reasoning' | 'tools' | 'vision' | 'video';
23
+ declare const MODEL_TABS: Array<{
24
+ value: ModelTab;
25
+ label: string;
26
+ }>;
27
+ /**
28
+ * our providerId → @lobehub/icons PascalCase 导出名
29
+ * 未知 providerId 返回 null,调用方 fallback 到首字母
30
+ */
31
+ declare const LOBE_ICON_MAP: Record<string, string>;
32
+ //#endregion
33
+ export { MODEL_TABS as a, PROVIDER_CATEGORY_VALUES as c, MODEL_CAPABILITY_OPTIONS as i, ADAPTER_KIND_VALUES as n, ModelTab as o, LOBE_ICON_MAP as r, PROVIDER_CATEGORIES as s, ADAPTER_KINDS as t };
@@ -0,0 +1,5 @@
1
+ import { i18n } from "i18next";
2
+ //#region src/i18n/client.d.ts
3
+ declare function getClientI18n(): i18n;
4
+ //#endregion
5
+ export { getClientI18n };
@@ -0,0 +1,34 @@
1
+ import { a as resources, o as supportedLngs, t as defaultNs } from "../config-CcbSbJoC.js";
2
+ import i18next from "i18next";
3
+ import { initReactI18next } from "react-i18next";
4
+ import LanguageDetector from "i18next-browser-languagedetector";
5
+ //#region src/i18n/client.ts
6
+ let clientI18n = null;
7
+ function getClientI18n() {
8
+ if (!clientI18n) {
9
+ clientI18n = i18next.createInstance();
10
+ clientI18n.use(initReactI18next).use(LanguageDetector).init({
11
+ fallbackLng: "zh",
12
+ defaultNS: defaultNs,
13
+ supportedLngs: [...supportedLngs],
14
+ resources,
15
+ interpolation: { escapeValue: false },
16
+ react: { useSuspense: false },
17
+ detection: {
18
+ order: [
19
+ "querystring",
20
+ "cookie",
21
+ "localStorage",
22
+ "navigator"
23
+ ],
24
+ lookupQuerystring: "lng",
25
+ lookupCookie: "lng",
26
+ lookupLocalStorage: "lng",
27
+ caches: ["cookie", "localStorage"]
28
+ }
29
+ });
30
+ }
31
+ return clientI18n;
32
+ }
33
+ //#endregion
34
+ export { getClientI18n };