@molecule/app-react 1.0.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 (131) hide show
  1. package/LICENSE +115 -0
  2. package/README.md +2645 -0
  3. package/dist/agent-identity.d.ts +40 -0
  4. package/dist/agent-identity.d.ts.map +1 -0
  5. package/dist/agent-identity.js +31 -0
  6. package/dist/agent-identity.js.map +1 -0
  7. package/dist/contexts.d.ts +69 -0
  8. package/dist/contexts.d.ts.map +1 -0
  9. package/dist/contexts.js +70 -0
  10. package/dist/contexts.js.map +1 -0
  11. package/dist/hooks/index.d.ts +32 -0
  12. package/dist/hooks/index.d.ts.map +1 -0
  13. package/dist/hooks/index.js +32 -0
  14. package/dist/hooks/index.js.map +1 -0
  15. package/dist/hooks/useAIModels.d.ts +48 -0
  16. package/dist/hooks/useAIModels.d.ts.map +1 -0
  17. package/dist/hooks/useAIModels.js +145 -0
  18. package/dist/hooks/useAIModels.js.map +1 -0
  19. package/dist/hooks/useAsyncState.d.ts +41 -0
  20. package/dist/hooks/useAsyncState.d.ts.map +1 -0
  21. package/dist/hooks/useAsyncState.js +77 -0
  22. package/dist/hooks/useAsyncState.js.map +1 -0
  23. package/dist/hooks/useAuth.d.ts +43 -0
  24. package/dist/hooks/useAuth.d.ts.map +1 -0
  25. package/dist/hooks/useAuth.js +106 -0
  26. package/dist/hooks/useAuth.js.map +1 -0
  27. package/dist/hooks/useCapacitorApp.d.ts +35 -0
  28. package/dist/hooks/useCapacitorApp.d.ts.map +1 -0
  29. package/dist/hooks/useCapacitorApp.js +61 -0
  30. package/dist/hooks/useCapacitorApp.js.map +1 -0
  31. package/dist/hooks/useChangePassword.d.ts +34 -0
  32. package/dist/hooks/useChangePassword.d.ts.map +1 -0
  33. package/dist/hooks/useChangePassword.js +37 -0
  34. package/dist/hooks/useChangePassword.js.map +1 -0
  35. package/dist/hooks/useChat.d.ts +30 -0
  36. package/dist/hooks/useChat.d.ts.map +1 -0
  37. package/dist/hooks/useChat.js +1510 -0
  38. package/dist/hooks/useChat.js.map +1 -0
  39. package/dist/hooks/useDevice.d.ts +39 -0
  40. package/dist/hooks/useDevice.d.ts.map +1 -0
  41. package/dist/hooks/useDevice.js +41 -0
  42. package/dist/hooks/useDevice.js.map +1 -0
  43. package/dist/hooks/useEditor.d.ts +20 -0
  44. package/dist/hooks/useEditor.d.ts.map +1 -0
  45. package/dist/hooks/useEditor.js +98 -0
  46. package/dist/hooks/useEditor.js.map +1 -0
  47. package/dist/hooks/useForm.d.ts +87 -0
  48. package/dist/hooks/useForm.d.ts.map +1 -0
  49. package/dist/hooks/useForm.js +148 -0
  50. package/dist/hooks/useForm.js.map +1 -0
  51. package/dist/hooks/useHttp.d.ts +103 -0
  52. package/dist/hooks/useHttp.d.ts.map +1 -0
  53. package/dist/hooks/useHttp.js +161 -0
  54. package/dist/hooks/useHttp.js.map +1 -0
  55. package/dist/hooks/useLogger.d.ts +68 -0
  56. package/dist/hooks/useLogger.d.ts.map +1 -0
  57. package/dist/hooks/useLogger.js +95 -0
  58. package/dist/hooks/useLogger.js.map +1 -0
  59. package/dist/hooks/useLogin.d.ts +35 -0
  60. package/dist/hooks/useLogin.d.ts.map +1 -0
  61. package/dist/hooks/useLogin.js +37 -0
  62. package/dist/hooks/useLogin.js.map +1 -0
  63. package/dist/hooks/useOAuth.d.ts +83 -0
  64. package/dist/hooks/useOAuth.d.ts.map +1 -0
  65. package/dist/hooks/useOAuth.js +348 -0
  66. package/dist/hooks/useOAuth.js.map +1 -0
  67. package/dist/hooks/usePasswordReset.d.ts +43 -0
  68. package/dist/hooks/usePasswordReset.d.ts.map +1 -0
  69. package/dist/hooks/usePasswordReset.js +50 -0
  70. package/dist/hooks/usePasswordReset.js.map +1 -0
  71. package/dist/hooks/usePlatform.d.ts +38 -0
  72. package/dist/hooks/usePlatform.d.ts.map +1 -0
  73. package/dist/hooks/usePlatform.js +40 -0
  74. package/dist/hooks/usePlatform.js.map +1 -0
  75. package/dist/hooks/usePreview.d.ts +20 -0
  76. package/dist/hooks/usePreview.d.ts.map +1 -0
  77. package/dist/hooks/usePreview.js +62 -0
  78. package/dist/hooks/usePreview.js.map +1 -0
  79. package/dist/hooks/usePromise.d.ts +39 -0
  80. package/dist/hooks/usePromise.d.ts.map +1 -0
  81. package/dist/hooks/usePromise.js +92 -0
  82. package/dist/hooks/usePromise.js.map +1 -0
  83. package/dist/hooks/usePush.d.ts +50 -0
  84. package/dist/hooks/usePush.d.ts.map +1 -0
  85. package/dist/hooks/usePush.js +89 -0
  86. package/dist/hooks/usePush.js.map +1 -0
  87. package/dist/hooks/useRouter.d.ts +65 -0
  88. package/dist/hooks/useRouter.d.ts.map +1 -0
  89. package/dist/hooks/useRouter.js +120 -0
  90. package/dist/hooks/useRouter.js.map +1 -0
  91. package/dist/hooks/useSignup.d.ts +35 -0
  92. package/dist/hooks/useSignup.d.ts.map +1 -0
  93. package/dist/hooks/useSignup.js +37 -0
  94. package/dist/hooks/useSignup.js.map +1 -0
  95. package/dist/hooks/useStorage.d.ts +72 -0
  96. package/dist/hooks/useStorage.d.ts.map +1 -0
  97. package/dist/hooks/useStorage.js +144 -0
  98. package/dist/hooks/useStorage.js.map +1 -0
  99. package/dist/hooks/useStore.d.ts +51 -0
  100. package/dist/hooks/useStore.d.ts.map +1 -0
  101. package/dist/hooks/useStore.js +86 -0
  102. package/dist/hooks/useStore.js.map +1 -0
  103. package/dist/hooks/useTheme.d.ts +50 -0
  104. package/dist/hooks/useTheme.d.ts.map +1 -0
  105. package/dist/hooks/useTheme.js +135 -0
  106. package/dist/hooks/useTheme.js.map +1 -0
  107. package/dist/hooks/useTranslation.d.ts +69 -0
  108. package/dist/hooks/useTranslation.d.ts.map +1 -0
  109. package/dist/hooks/useTranslation.js +131 -0
  110. package/dist/hooks/useTranslation.js.map +1 -0
  111. package/dist/hooks/useVersion.d.ts +41 -0
  112. package/dist/hooks/useVersion.d.ts.map +1 -0
  113. package/dist/hooks/useVersion.js +73 -0
  114. package/dist/hooks/useVersion.js.map +1 -0
  115. package/dist/hooks/useWorkspace.d.ts +18 -0
  116. package/dist/hooks/useWorkspace.d.ts.map +1 -0
  117. package/dist/hooks/useWorkspace.js +67 -0
  118. package/dist/hooks/useWorkspace.js.map +1 -0
  119. package/dist/index.d.ts +80 -0
  120. package/dist/index.d.ts.map +1 -0
  121. package/dist/index.js +80 -0
  122. package/dist/index.js.map +1 -0
  123. package/dist/providers.d.ts +189 -0
  124. package/dist/providers.d.ts.map +1 -0
  125. package/dist/providers.js +248 -0
  126. package/dist/providers.js.map +1 -0
  127. package/dist/types.d.ts +381 -0
  128. package/dist/types.d.ts.map +1 -0
  129. package/dist/types.js +7 -0
  130. package/dist/types.js.map +1 -0
  131. package/package.json +82 -0
@@ -0,0 +1,381 @@
1
+ /**
2
+ * React-specific types for the Molecule framework bindings.
3
+ *
4
+ * @module
5
+ */
6
+ import type { ReactNode } from 'react';
7
+ import type { ChatAttachment, ChatMessage, ChatProvider, ChatStreamEvent } from '@molecule/app-ai-chat';
8
+ import type { AuthClient, AuthState } from '@molecule/app-auth';
9
+ import type { DiffFile, EditorFile, EditorProvider, EditorTab, FixWithAIRequest } from '@molecule/app-code-editor';
10
+ import type { FormController, FormOptions } from '@molecule/app-forms';
11
+ import type { HttpClient } from '@molecule/app-http';
12
+ import type { I18nProvider } from '@molecule/app-i18n';
13
+ import type { PanelId, WorkspaceLayout, WorkspaceProvider } from '@molecule/app-ide';
14
+ import type { DeviceFrame, PreviewProvider, PreviewState } from '@molecule/app-live-preview';
15
+ import type { LoggerProvider } from '@molecule/app-logger';
16
+ import type { QueryParams, Router, RouterConfig } from '@molecule/app-routing';
17
+ import type { StateProvider, Store, StoreConfig } from '@molecule/app-state';
18
+ import type { StorageProvider } from '@molecule/app-storage';
19
+ import type { Theme, ThemeProvider } from '@molecule/app-theme';
20
+ /**
21
+ * Props for provider components.
22
+ */
23
+ export interface ProviderProps {
24
+ children: ReactNode;
25
+ }
26
+ /**
27
+ * Props for state provider component.
28
+ */
29
+ export interface StateProviderProps extends ProviderProps {
30
+ provider: StateProvider;
31
+ }
32
+ /**
33
+ * Props for auth provider component.
34
+ */
35
+ export interface AuthProviderProps<T = unknown> extends ProviderProps {
36
+ client: AuthClient<T>;
37
+ }
38
+ /**
39
+ * Props for theme provider component.
40
+ */
41
+ export interface ThemeProviderProps extends ProviderProps {
42
+ provider: ThemeProvider;
43
+ initialTheme?: string;
44
+ }
45
+ /**
46
+ * Props for router provider component.
47
+ */
48
+ export interface RouterProviderProps extends ProviderProps {
49
+ router: Router;
50
+ }
51
+ /**
52
+ * Props for i18n provider component.
53
+ */
54
+ export interface I18nProviderProps extends ProviderProps {
55
+ provider: I18nProvider;
56
+ }
57
+ /**
58
+ * Props for http provider component.
59
+ */
60
+ export interface HttpProviderProps extends ProviderProps {
61
+ client: HttpClient;
62
+ }
63
+ /**
64
+ * Props for storage provider component.
65
+ */
66
+ export interface StorageProviderProps extends ProviderProps {
67
+ provider: StorageProvider;
68
+ }
69
+ /**
70
+ * Props for logger provider component.
71
+ */
72
+ export interface LoggerProviderProps extends ProviderProps {
73
+ provider: LoggerProvider;
74
+ }
75
+ /**
76
+ * Props for the ChatProvider React component.
77
+ */
78
+ export interface ChatProviderProps extends ProviderProps {
79
+ provider: ChatProvider;
80
+ }
81
+ /**
82
+ * Props for workspace provider component.
83
+ */
84
+ export interface WorkspaceProviderProps extends ProviderProps {
85
+ provider: WorkspaceProvider;
86
+ }
87
+ /**
88
+ * Props for editor provider component.
89
+ */
90
+ export interface EditorProviderProps extends ProviderProps {
91
+ provider: EditorProvider;
92
+ }
93
+ /**
94
+ * Props for preview provider component.
95
+ */
96
+ export interface PreviewProviderProps extends ProviderProps {
97
+ provider: PreviewProvider;
98
+ }
99
+ /**
100
+ * Properties for molecule provider.
101
+ */
102
+ export interface MoleculeProviderProps extends ProviderProps {
103
+ state?: StateProvider;
104
+ auth?: AuthClient<unknown>;
105
+ theme?: ThemeProvider;
106
+ router?: Router;
107
+ i18n?: I18nProvider;
108
+ http?: HttpClient;
109
+ storage?: StorageProvider;
110
+ logger?: LoggerProvider;
111
+ chat?: ChatProvider;
112
+ workspace?: WorkspaceProvider;
113
+ editor?: EditorProvider;
114
+ preview?: PreviewProvider;
115
+ }
116
+ /**
117
+ * Hook options for useStore.
118
+ */
119
+ export interface UseStoreOptions<T, S> {
120
+ selector?: (state: T) => S;
121
+ equalityFn?: (a: S, b: S) => boolean;
122
+ }
123
+ /**
124
+ * Hook options for useAuth.
125
+ */
126
+ export interface UseAuthOptions {
127
+ /**
128
+ * Whether to automatically refresh the token on mount.
129
+ */
130
+ autoRefresh?: boolean;
131
+ }
132
+ /**
133
+ * Hook result for useAuth.
134
+ */
135
+ export interface UseAuthResult<T = unknown> {
136
+ state: AuthState<T>;
137
+ login: AuthClient<T>['login'];
138
+ logout: AuthClient<T>['logout'];
139
+ register: AuthClient<T>['register'];
140
+ refresh: AuthClient<T>['refresh'];
141
+ setUser: AuthClient<T>['setUser'];
142
+ isAuthenticated: boolean;
143
+ isLoading: boolean;
144
+ user: T | null;
145
+ }
146
+ /**
147
+ * Hook result for useTheme.
148
+ */
149
+ export interface UseThemeResult {
150
+ theme: Theme;
151
+ themeName: string;
152
+ setTheme: (name: string) => void;
153
+ toggleTheme: () => void;
154
+ mode: 'light' | 'dark';
155
+ }
156
+ /**
157
+ * Hook result for useRouter.
158
+ */
159
+ export interface UseRouterResult {
160
+ location: Router['getLocation'] extends () => infer R ? R : never;
161
+ params: Record<string, string>;
162
+ query: QueryParams;
163
+ navigate: Router['navigate'];
164
+ navigateTo: Router['navigateTo'];
165
+ back: Router['back'];
166
+ forward: Router['forward'];
167
+ isActive: Router['isActive'];
168
+ }
169
+ /**
170
+ * Hook result for useTranslation.
171
+ */
172
+ export interface UseTranslationResult {
173
+ t: I18nProvider['t'];
174
+ locale: string;
175
+ setLocale: I18nProvider['setLocale'];
176
+ locales: ReturnType<I18nProvider['getLocales']>;
177
+ formatNumber: I18nProvider['formatNumber'];
178
+ formatDate: I18nProvider['formatDate'];
179
+ direction: 'ltr' | 'rtl';
180
+ }
181
+ /**
182
+ * Hook options for useChat.
183
+ */
184
+ export interface UseChatOptions {
185
+ /** Chat endpoint (e.g., '/projects/123/chat'). */
186
+ endpoint: string;
187
+ /** Project ID for context. */
188
+ projectId?: string;
189
+ /**
190
+ * Display name of the AI coding agent, interpolated into user-facing chat
191
+ * copy (e.g. the stalled-stream notice). The host passes its own agent brand
192
+ * name; defaults to the neutral `DEFAULT_AGENT_NAME` so the shared hook never
193
+ * names a specific product.
194
+ */
195
+ agentName?: string;
196
+ /** Load history on mount. */
197
+ loadOnMount?: boolean;
198
+ /** Called when a file is created or modified by a tool call (path + new content). */
199
+ onFileChange?: (path: string, content: string) => void;
200
+ /** Called when the AI switches between plan and execute modes. */
201
+ onModeChange?: (mode: 'plan' | 'execute') => void;
202
+ /** Called when the backend assigns or confirms a conversation ID. */
203
+ onConversationId?: (id: string) => void;
204
+ /** Called for every streaming event — useful for notifications, sounds, etc. */
205
+ onStreamEvent?: (event: ChatStreamEvent) => void;
206
+ }
207
+ /**
208
+ * Options for {@link UseChatResult.sendMessage}.
209
+ */
210
+ export interface SendMessageOptions {
211
+ /**
212
+ * Skip the optimistic local user-message bubble. The text is still sent to
213
+ * the server. Used for ask_user responses: the answer is folded into the
214
+ * ask_user tool card (a checkmark on the chosen option, or the custom text
215
+ * shown in-card) rather than echoed as a separate message below it.
216
+ */
217
+ suppressUserMessage?: boolean;
218
+ /**
219
+ * Mark this send as issued automatically on the user's behalf (e.g. an
220
+ * auto-fix prompt). The optimistic local bubble and the persisted message are
221
+ * flagged `automatic` so the chat renders it in the distinct auto-sent style
222
+ * (agent avatar + accent border) instead of looking like the user typed it.
223
+ */
224
+ automatic?: boolean;
225
+ /**
226
+ * Mark this send as the answer to the pending `ask_user` question. The most
227
+ * recent unanswered `ask_user` tool call in the store is resolved in place —
228
+ * its `output` is set to this answer — so the chosen option stays checked
229
+ * across remounts (e.g. the discovery→IDE transition) instead of relying on
230
+ * ephemeral component state that the answer's selection would otherwise lose.
231
+ * Distinct from {@link suppressUserMessage} (which the post-boot kickoff also
232
+ * sets) so resolving never misfires on a non-ask_user suppressed send.
233
+ */
234
+ askUserAnswer?: boolean;
235
+ /**
236
+ * Mark an {@link automatic} send as directly requested by the user (e.g. the
237
+ * editor's "Fix with AI" action, the broken-preview overlay's "Fix with AI"
238
+ * button) rather than dispatched autonomously by the platform. A user Stop
239
+ * suppresses autonomous automatic sends until the user re-engages; a
240
+ * user-initiated one IS that re-engagement — it clears the stop and sends.
241
+ */
242
+ userInitiated?: boolean;
243
+ }
244
+ /**
245
+ * Hook result for useChat.
246
+ */
247
+ export interface UseChatResult {
248
+ messages: ChatMessage[];
249
+ isLoading: boolean;
250
+ /**
251
+ * True while a backend turn for this conversation streams WITHOUT this client
252
+ * owning the request — a turn started in another tab, by a teammate, or any
253
+ * server-side continuation. Detected from pushed (broadcast) chat events and
254
+ * confirmed/cleared against the server's `streaming` history flag, so the Stop
255
+ * control can stay visible and functional whenever ANY backend turn is live —
256
+ * not only for sends this hook instance made.
257
+ */
258
+ isRemoteStreaming: boolean;
259
+ /**
260
+ * Tell the hook a pushed (broadcast) chat event arrived for this conversation.
261
+ * The host (ChatPanel) calls this from its push-channel handler; the hook then
262
+ * confirms against the server's `streaming` flag and, while a remote turn is
263
+ * live, keeps `isRemoteStreaming` true until the server reports it finished.
264
+ */
265
+ noteRemoteStreamEvent: () => void;
266
+ error: string | null;
267
+ /** Metadata about a limit-related error (for contextual upgrade CTAs). */
268
+ errorMeta: {
269
+ limitType?: string;
270
+ requiresSignup?: boolean;
271
+ } | null;
272
+ /** Current agent mode — plan (read-only research) or execute (full access). */
273
+ mode: 'plan' | 'execute';
274
+ /**
275
+ * Whether the conversation runs at the provider's fast/priority speed tier
276
+ * (server-persisted per conversation; hydrated from the history load's
277
+ * `fastMode` meta field, when the server provides one). Only meaningful for
278
+ * models that support a fast tier — the server ignores it otherwise.
279
+ */
280
+ fastMode: boolean;
281
+ /**
282
+ * Transient label for a background phase (e.g. the post-response verification
283
+ * pass — "Type-checking the API", "Linting"), set by `status` stream events.
284
+ * The UI shows it in place of the spinner's generic rotating messages; `null`
285
+ * when no such phase is active.
286
+ */
287
+ streamingStatus: string | null;
288
+ /**
289
+ * Active 5XX backoff-retry countdown, or `null` when none is pending. After a
290
+ * backend server error (HTTP 5XX) the hook does NOT surface a terminal error —
291
+ * it shows this cancelable countdown and, when it elapses, auto-resumes the
292
+ * turn where the user left off (`resume:true`). `secondsRemaining` ticks down
293
+ * once per second; `attempt` is the 1-based retry number (capped at 3). 4XX,
294
+ * limit/quota, and signup-required errors never auto-retry.
295
+ */
296
+ retryCountdown: {
297
+ secondsRemaining: number;
298
+ attempt: number;
299
+ } | null;
300
+ /** Update the local mode state (for instant mode toggle without an AI turn). */
301
+ setMode: (mode: 'plan' | 'execute') => void;
302
+ /** Update the local fast-mode state (for instant toggle without an AI turn). */
303
+ setFastMode: (fastMode: boolean) => void;
304
+ sendMessage: (message: string, attachments?: ChatAttachment[], options?: SendMessageOptions) => Promise<void>;
305
+ abort: () => void;
306
+ /**
307
+ * Cancel a pending 5XX auto-retry. Clears the countdown and surfaces the
308
+ * original error (via `error`) so the user sees why the turn failed.
309
+ */
310
+ cancelRetry: () => void;
311
+ clearHistory: () => Promise<void>;
312
+ /** Edit the content of a queued (not yet sent) message. */
313
+ editQueuedMessage: (msgId: string, newContent: string) => void;
314
+ /** Remove a queued (not yet sent) message from the queue. */
315
+ deleteQueuedMessage: (msgId: string) => void;
316
+ /** Remove queued auto-fix messages whose content references the given file path. */
317
+ clearQueuedForFile: (filePath: string) => void;
318
+ /**
319
+ * Append an inline transcript card (model / mode / skills / custom notice) as a
320
+ * `role:'system'` card-message in the ONE message store. Used by the host (ChatPanel)
321
+ * to render a TEAMMATE's broadcast `card` event live — this client's OWN cards arrive
322
+ * through the stream and are appended internally. De-duped by the server-assigned id.
323
+ */
324
+ appendCardMessage: (id: string, timestamp: number, card: NonNullable<ChatMessage['cardEvent']>) => void;
325
+ }
326
+ /**
327
+ * Hook result for useWorkspace.
328
+ */
329
+ export interface UseWorkspaceResult {
330
+ layout: WorkspaceLayout;
331
+ activePanel: PanelId | null;
332
+ collapsedPanels: Set<PanelId>;
333
+ togglePanel: (panelId: PanelId) => void;
334
+ resizePanel: (panelId: PanelId, size: number) => void;
335
+ setActivePanel: (panelId: PanelId) => void;
336
+ resetLayout: () => void;
337
+ }
338
+ /**
339
+ * Hook result for useEditor.
340
+ */
341
+ export interface UseEditorResult {
342
+ tabs: EditorTab[];
343
+ activeFile: string | null;
344
+ openFile: (file: EditorFile) => void;
345
+ closeFile: (path: string) => void;
346
+ getContent: () => string | null;
347
+ setContent: (path: string, content: string) => void;
348
+ setActiveTab: (path: string) => void;
349
+ mount: EditorProvider['mount'];
350
+ dispose: () => void;
351
+ focus: () => void;
352
+ openDiff: (file: DiffFile) => void;
353
+ closeDiff: () => void;
354
+ pinTab: (path: string) => void;
355
+ addExtraLib: (content: string, filePath: string) => void;
356
+ onFixWithAI: (callback: (request: FixWithAIRequest) => void) => () => void;
357
+ }
358
+ /**
359
+ * Hook result for usePreview.
360
+ */
361
+ export interface UsePreviewResult {
362
+ state: PreviewState;
363
+ setUrl: (url: string) => void;
364
+ refresh: () => void;
365
+ setDevice: (device: DeviceFrame) => void;
366
+ openExternal: () => void;
367
+ /**
368
+ * Records a navigation the running preview reported via its `molecule:navigate`
369
+ * message — updates the displayed current location without reloading the iframe.
370
+ * Pass `isReplace` when the preview REPLACED its current history entry (a
371
+ * `replaceState` redirect/canonicalization) so the forward stack is preserved
372
+ * instead of truncated (a `pushState`, the default, truncates forward).
373
+ */
374
+ recordNavigation: (url: string, isReplace?: boolean) => void;
375
+ /** Navigates the preview to the previous navigation-history entry (Back). */
376
+ back: () => void;
377
+ /** Navigates the preview to the next navigation-history entry (Forward). */
378
+ forward: () => void;
379
+ }
380
+ export type { AuthClient, AuthState, FormController, FormOptions, HttpClient, Router, RouterConfig,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Y,CAAA;IACnB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAA;IACxC,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB;;;;;;OAMG;IACH,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5D,6EAA6E;IAC7E,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAMD,YAAY,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,WAAW,EACX,UAAU,EACV,MAAM,EACN,YAAY,EACZ,KAAK,EACL,WAAW,EACX,KAAK,GACN,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * React-specific types for the Molecule framework bindings.
3
+ *
4
+ * @module
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "@molecule/app-react",
3
+ "version": "1.0.0",
4
+ "description": "React framework bindings for molecule.dev",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "README.md"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "dev": "tsc --watch",
15
+ "test": "vitest run",
16
+ "test:watch": "vitest"
17
+ },
18
+ "author": "Molecule Dev, Inc. (https://molecule.dev)",
19
+ "license": "Apache-2.0",
20
+ "engines": {
21
+ "node": ">=20"
22
+ },
23
+ "peerDependencies": {
24
+ "@molecule/app-auth": "^1.0.0",
25
+ "@molecule/app-ai-models": "^1.0.0",
26
+ "@molecule/app-forms": "^1.0.0",
27
+ "@molecule/app-utilities": "^1.0.0",
28
+ "@molecule/app-http": "^1.0.0",
29
+ "@molecule/app-i18n": "^1.0.0",
30
+ "@molecule/app-logger": "^1.0.0",
31
+ "@molecule/app-routing": "^1.0.0",
32
+ "@molecule/app-state": "^1.0.0",
33
+ "@molecule/app-storage": "^1.0.0",
34
+ "@molecule/app-theme": "^1.0.0",
35
+ "@molecule/app-ui": "^1.0.0",
36
+ "@molecule/app-version": "^1.0.0",
37
+ "@molecule/app-device": "^1.0.0",
38
+ "@molecule/app-platform": "^1.0.0",
39
+ "@molecule/app-push": "^1.0.0",
40
+ "@molecule/app-ai-chat": "^1.0.0",
41
+ "@molecule/app-ide": "^1.0.0",
42
+ "@molecule/app-code-editor": "^1.0.0",
43
+ "@molecule/app-live-preview": "^1.0.0",
44
+ "react": "^18.0.0 || ^19.0.0"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "@molecule/app-ai-chat": {
48
+ "optional": true
49
+ },
50
+ "@molecule/app-ide": {
51
+ "optional": true
52
+ },
53
+ "@molecule/app-code-editor": {
54
+ "optional": true
55
+ },
56
+ "@molecule/app-live-preview": {
57
+ "optional": true
58
+ }
59
+ },
60
+ "devDependencies": {
61
+ "@molecule/app-ai-models": "1.0.0",
62
+ "@molecule/app-i18n": "1.0.0",
63
+ "@testing-library/dom": "10.4.1",
64
+ "@testing-library/react": "16.3.2",
65
+ "@types/node": "26.1.2",
66
+ "@types/react": "19.2.17",
67
+ "react": "19.2.8",
68
+ "react-dom": "19.2.8",
69
+ "typescript": "6.0.3",
70
+ "vitest": "4.1.10"
71
+ },
72
+ "repository": {
73
+ "type": "git",
74
+ "url": "https://github.com/molecule-dev/molecule.git",
75
+ "directory": "packages/app/frameworks/react"
76
+ },
77
+ "homepage": "https://github.com/molecule-dev/molecule/tree/main/packages/app/frameworks/react",
78
+ "bugs": "https://github.com/molecule-dev/molecule/issues",
79
+ "publishConfig": {
80
+ "access": "public"
81
+ }
82
+ }