@fluid-app/portal-sdk 0.1.11

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 (35) hide show
  1. package/README.md +415 -0
  2. package/dist/ContactsScreen-CB6l0Lf1.mjs +24 -0
  3. package/dist/ContactsScreen-CB6l0Lf1.mjs.map +1 -0
  4. package/dist/ContactsScreen-Cqyrl4AQ.cjs +41 -0
  5. package/dist/ContactsScreen-Cqyrl4AQ.cjs.map +1 -0
  6. package/dist/CoreScreenPlaceholder-CA2-2V5o.cjs +38 -0
  7. package/dist/CoreScreenPlaceholder-CA2-2V5o.cjs.map +1 -0
  8. package/dist/CoreScreenPlaceholder-D93ZYKt2.mjs +32 -0
  9. package/dist/CoreScreenPlaceholder-D93ZYKt2.mjs.map +1 -0
  10. package/dist/CustomersScreen-BEar6Leg.mjs +24 -0
  11. package/dist/CustomersScreen-BEar6Leg.mjs.map +1 -0
  12. package/dist/CustomersScreen-gFgOzBox.cjs +41 -0
  13. package/dist/CustomersScreen-gFgOzBox.cjs.map +1 -0
  14. package/dist/MessagingScreen-BklF48Fn.mjs +1281 -0
  15. package/dist/MessagingScreen-BklF48Fn.mjs.map +1 -0
  16. package/dist/MessagingScreen-CHb-scHD.cjs +1454 -0
  17. package/dist/MessagingScreen-CHb-scHD.cjs.map +1 -0
  18. package/dist/OrdersScreen-CPGDYvEd.cjs +41 -0
  19. package/dist/OrdersScreen-CPGDYvEd.cjs.map +1 -0
  20. package/dist/OrdersScreen-DB1v051q.mjs +24 -0
  21. package/dist/OrdersScreen-DB1v051q.mjs.map +1 -0
  22. package/dist/ProductsScreen-B1tlIth6.cjs +41 -0
  23. package/dist/ProductsScreen-B1tlIth6.cjs.map +1 -0
  24. package/dist/ProductsScreen-nVDsY6kf.mjs +24 -0
  25. package/dist/ProductsScreen-nVDsY6kf.mjs.map +1 -0
  26. package/dist/chunk-D1SwGrFN.mjs +27 -0
  27. package/dist/index.cjs +3610 -0
  28. package/dist/index.cjs.map +1 -0
  29. package/dist/index.d.cts +2500 -0
  30. package/dist/index.d.cts.map +1 -0
  31. package/dist/index.d.mts +2498 -0
  32. package/dist/index.d.mts.map +1 -0
  33. package/dist/index.mjs +2921 -0
  34. package/dist/index.mjs.map +1 -0
  35. package/package.json +76 -0
package/README.md ADDED
@@ -0,0 +1,415 @@
1
+ # @fluid-app/portal-sdk
2
+
3
+ SDK for building custom Fluid portals. Provides React hooks, providers, and an API client for integrating with the Fluid Commerce platform.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @fluid-app/portal-sdk
9
+ # or
10
+ pnpm add @fluid-app/portal-sdk
11
+ # or
12
+ bun add @fluid-app/portal-sdk
13
+ ```
14
+
15
+ ### Peer Dependencies
16
+
17
+ This package requires the following peer dependencies:
18
+
19
+ ```json
20
+ {
21
+ "react": ">=18.0.0",
22
+ "@tanstack/react-query": ">=5.0.0"
23
+ }
24
+ ```
25
+
26
+ ## Quick Start
27
+
28
+ Wrap your application with `FluidProvider`:
29
+
30
+ ```tsx
31
+ import { FluidProvider } from "@fluid-app/portal-sdk";
32
+
33
+ function App() {
34
+ return (
35
+ <FluidProvider
36
+ config={{
37
+ baseUrl: "https://api.fluid.app/api",
38
+ getAuthToken: () => localStorage.getItem("fluid_token"),
39
+ onAuthError: () => {
40
+ // Handle 401 errors (e.g., redirect to login)
41
+ window.location.href = "/login";
42
+ },
43
+ }}
44
+ >
45
+ <YourApp />
46
+ </FluidProvider>
47
+ );
48
+ }
49
+ ```
50
+
51
+ ## Hooks
52
+
53
+ ### useFluidApi
54
+
55
+ Access the API client for making requests:
56
+
57
+ ```tsx
58
+ import { useFluidApi } from "@fluid-app/portal-sdk";
59
+ import { useQuery } from "@tanstack/react-query";
60
+
61
+ function ProductList() {
62
+ const api = useFluidApi();
63
+
64
+ const { data: products, isLoading } = useQuery({
65
+ queryKey: ["products"],
66
+ queryFn: () => api.products.list({ active: true }),
67
+ });
68
+
69
+ if (isLoading) return <Spinner />;
70
+
71
+ return (
72
+ <ul>
73
+ {products?.map((product) => (
74
+ <li key={product.id}>{product.name}</li>
75
+ ))}
76
+ </ul>
77
+ );
78
+ }
79
+ ```
80
+
81
+ ### useCurrentRep
82
+
83
+ Fetch the currently authenticated rep's profile:
84
+
85
+ ```tsx
86
+ import { useCurrentRep } from "@fluid-app/portal-sdk";
87
+
88
+ function RepHeader() {
89
+ const { data: rep, isLoading } = useCurrentRep();
90
+
91
+ if (isLoading) return <Skeleton />;
92
+
93
+ return (
94
+ <div>
95
+ <Avatar src={rep?.avatar_url} />
96
+ <span>
97
+ {rep?.first_name} {rep?.last_name}
98
+ </span>
99
+ </div>
100
+ );
101
+ }
102
+ ```
103
+
104
+ ### useFluidProfile
105
+
106
+ Fetch the portal profile (themes, navigation, screens):
107
+
108
+ ```tsx
109
+ import { useFluidProfile } from "@fluid-app/portal-sdk";
110
+
111
+ function Navigation() {
112
+ const { data: profile, isLoading } = useFluidProfile();
113
+
114
+ if (isLoading) return <Spinner />;
115
+
116
+ return (
117
+ <nav>
118
+ {profile?.navigation.navigation_items.map((item) => (
119
+ <NavItem key={item.id} item={item} />
120
+ ))}
121
+ </nav>
122
+ );
123
+ }
124
+ ```
125
+
126
+ ### useFluidPermissions
127
+
128
+ Check user permissions with a convenient `can()` helper:
129
+
130
+ ```tsx
131
+ import { useFluidPermissions } from "@fluid-app/portal-sdk";
132
+
133
+ function TeamSettings() {
134
+ const { can, isSuperAdmin } = useFluidPermissions();
135
+
136
+ // Check if user can manage team
137
+ if (!can("team", "manage")) {
138
+ return <AccessDenied />;
139
+ }
140
+
141
+ return (
142
+ <div>
143
+ <h1>Team Settings</h1>
144
+ {/* Only show delete button if user has delete permission */}
145
+ {can("team", "delete") && <DeleteTeamButton />}
146
+ </div>
147
+ );
148
+ }
149
+ ```
150
+
151
+ Available permission actions: `"view"`, `"create"`, `"update"`, `"delete"`, `"settings"`, `"add"`, `"manage"`, `"send"`
152
+
153
+ ### useFluidTheme
154
+
155
+ Control theme settings:
156
+
157
+ ```tsx
158
+ import { useFluidTheme } from "@fluid-app/portal-sdk";
159
+ import type { Theme } from "@fluid-app/portal-sdk";
160
+
161
+ function ThemeSwitcher({ themes }: { themes: Theme[] }) {
162
+ const { currentTheme, setTheme, setThemeMode, mode } = useFluidTheme();
163
+
164
+ return (
165
+ <div>
166
+ <select
167
+ value={currentTheme?.name}
168
+ onChange={(e) => {
169
+ const theme = themes.find((t) => t.name === e.target.value);
170
+ if (theme) setTheme(theme);
171
+ }}
172
+ >
173
+ {themes.map((theme) => (
174
+ <option key={theme.name} value={theme.name}>
175
+ {theme.name}
176
+ </option>
177
+ ))}
178
+ </select>
179
+
180
+ <button onClick={() => setThemeMode(mode === "dark" ? "light" : "dark")}>
181
+ Toggle {mode === "dark" ? "Light" : "Dark"} Mode
182
+ </button>
183
+ </div>
184
+ );
185
+ }
186
+ ```
187
+
188
+ ## API Client
189
+
190
+ The SDK provides a typed API client with methods for common operations:
191
+
192
+ ### Products
193
+
194
+ ```tsx
195
+ const api = useFluidApi();
196
+
197
+ // List products with optional filters
198
+ const products = await api.products.list({
199
+ active: true,
200
+ page: 1,
201
+ per_page: 20,
202
+ });
203
+
204
+ // Get a single product
205
+ const product = await api.products.get("product-id");
206
+
207
+ // Search products
208
+ const results = await api.products.search("query");
209
+ ```
210
+
211
+ ### Orders
212
+
213
+ ```tsx
214
+ const api = useFluidApi();
215
+
216
+ // List orders
217
+ const orders = await api.orders.list({
218
+ status: "pending",
219
+ date_from: "2024-01-01",
220
+ });
221
+
222
+ // Get a single order
223
+ const order = await api.orders.get("order-id");
224
+
225
+ // Create an order
226
+ const newOrder = await api.orders.create({
227
+ customer_id: "customer-id",
228
+ line_items: [{ product_id: "product-id", quantity: 2 }],
229
+ });
230
+ ```
231
+
232
+ ### Reps
233
+
234
+ ```tsx
235
+ const api = useFluidApi();
236
+
237
+ // Get current rep profile
238
+ const rep = await api.reps.current();
239
+
240
+ // Update profile
241
+ const updated = await api.reps.updateProfile({
242
+ first_name: "John",
243
+ last_name: "Doe",
244
+ });
245
+ ```
246
+
247
+ ### Analytics
248
+
249
+ ```tsx
250
+ const api = useFluidApi();
251
+
252
+ // Get dashboard data
253
+ const dashboard = await api.analytics.dashboard();
254
+
255
+ // Get sales data
256
+ const sales = await api.analytics.sales({
257
+ date_from: "2024-01-01",
258
+ date_to: "2024-12-31",
259
+ group_by: "month",
260
+ });
261
+ ```
262
+
263
+ ### Custom Requests
264
+
265
+ For endpoints not covered by the typed methods:
266
+
267
+ ```tsx
268
+ const api = useFluidApi();
269
+
270
+ // Generic GET request
271
+ const data = await api.get<MyType>("/custom/endpoint", { param: "value" });
272
+
273
+ // Generic POST request
274
+ const result = await api.post<MyType>("/custom/endpoint", { body: "data" });
275
+ ```
276
+
277
+ ## Providers
278
+
279
+ ### FluidProvider
280
+
281
+ The main provider that sets up the SDK. It wraps:
282
+
283
+ - `QueryClientProvider` (TanStack Query)
284
+ - `FluidThemeProvider` (theme management)
285
+
286
+ ```tsx
287
+ import { FluidProvider } from "@fluid-app/portal-sdk";
288
+ import { QueryClient } from "@tanstack/react-query";
289
+
290
+ // Optional: provide your own QueryClient
291
+ const queryClient = new QueryClient({
292
+ defaultOptions: {
293
+ queries: { staleTime: 5 * 60 * 1000 },
294
+ },
295
+ });
296
+
297
+ function App() {
298
+ return (
299
+ <FluidProvider
300
+ config={{
301
+ baseUrl: "https://api.fluid.app/api",
302
+ getAuthToken: () => getToken(),
303
+ }}
304
+ queryClient={queryClient}
305
+ initialTheme={defaultTheme}
306
+ >
307
+ <YourApp />
308
+ </FluidProvider>
309
+ );
310
+ }
311
+ ```
312
+
313
+ ### FluidThemeProvider
314
+
315
+ Can be used standalone if you need theme management without the full SDK:
316
+
317
+ ```tsx
318
+ import { FluidThemeProvider, useFluidTheme } from "@fluid-app/portal-sdk";
319
+
320
+ function App() {
321
+ return (
322
+ <FluidThemeProvider initialTheme={myTheme}>
323
+ <ThemedContent />
324
+ </FluidThemeProvider>
325
+ );
326
+ }
327
+ ```
328
+
329
+ Theme CSS variables are applied to the document root (or a custom container) with the `--fluid-` prefix.
330
+
331
+ ## Types
332
+
333
+ All types are exported for use in your application:
334
+
335
+ ```tsx
336
+ import type {
337
+ // Core types
338
+ Profile,
339
+ Theme,
340
+ ThemeConfig,
341
+ Navigation,
342
+ NavigationItem,
343
+ ScreenDefinition,
344
+
345
+ // Permissions
346
+ UserPermissions,
347
+ Permissions,
348
+ PermissionAction,
349
+ ResourcePermissions,
350
+
351
+ // Rep
352
+ Rep,
353
+ UpdateRepData,
354
+
355
+ // API types
356
+ Product,
357
+ ProductListParams,
358
+ Order,
359
+ OrderListParams,
360
+ CreateOrderData,
361
+ DashboardData,
362
+ SalesData,
363
+ SalesParams,
364
+
365
+ // Client types
366
+ FluidSDKConfig,
367
+ FluidClient,
368
+ RequestOptions,
369
+ } from "@fluid-app/portal-sdk";
370
+ ```
371
+
372
+ ## Query Keys
373
+
374
+ Query keys are exported for cache invalidation and prefetching:
375
+
376
+ ```tsx
377
+ import {
378
+ PROFILE_QUERY_KEY,
379
+ PERMISSIONS_QUERY_KEY,
380
+ CURRENT_REP_QUERY_KEY,
381
+ } from "@fluid-app/portal-sdk";
382
+ import { useQueryClient } from "@tanstack/react-query";
383
+
384
+ function RefreshButton() {
385
+ const queryClient = useQueryClient();
386
+
387
+ const handleRefresh = () => {
388
+ queryClient.invalidateQueries({ queryKey: PROFILE_QUERY_KEY });
389
+ };
390
+
391
+ return <button onClick={handleRefresh}>Refresh Profile</button>;
392
+ }
393
+ ```
394
+
395
+ ## Error Handling
396
+
397
+ The SDK provides an `ApiError` class for structured error handling:
398
+
399
+ ```tsx
400
+ import { ApiError, isApiError } from "@fluid-app/portal-sdk";
401
+
402
+ try {
403
+ await api.orders.create(orderData);
404
+ } catch (error) {
405
+ if (isApiError(error)) {
406
+ console.log("Status:", error.status);
407
+ console.log("Message:", error.message);
408
+ console.log("Data:", error.data); // Server error details
409
+ }
410
+ }
411
+ ```
412
+
413
+ ## License
414
+
415
+ Private - Fluid Commerce
@@ -0,0 +1,24 @@
1
+ import { t as __exportAll } from "./chunk-D1SwGrFN.mjs";
2
+ import { t as CoreScreenPlaceholder } from "./CoreScreenPlaceholder-D93ZYKt2.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/screens/ContactsScreen.tsx
5
+ var ContactsScreen_exports = /* @__PURE__ */ __exportAll({
6
+ ContactsScreen: () => ContactsScreen,
7
+ contactsScreenPropertySchema: () => contactsScreenPropertySchema
8
+ });
9
+ function ContactsScreen(_props) {
10
+ return /* @__PURE__ */ jsx(CoreScreenPlaceholder, { name: "Contacts" });
11
+ }
12
+ const contactsScreenPropertySchema = {
13
+ widgetType: "ContactsScreen",
14
+ displayName: "Contacts Screen",
15
+ tabsConfig: [{
16
+ id: "styling",
17
+ label: "Styling"
18
+ }],
19
+ fields: []
20
+ };
21
+ //#endregion
22
+ export { ContactsScreen_exports as n, contactsScreenPropertySchema as r, ContactsScreen as t };
23
+
24
+ //# sourceMappingURL=ContactsScreen-CB6l0Lf1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactsScreen-CB6l0Lf1.mjs","names":[],"sources":["../src/screens/ContactsScreen.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { CoreScreenPlaceholder } from \"./CoreScreenPlaceholder\";\n\ntype ContactsScreenProps = ComponentProps<\"div\"> & {\n // Styling\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n\n // Display\n defaultViewMode?: \"list\" | \"grid\";\n\n // Callbacks\n onContactSelect?: (contactId: string) => void;\n onCreateContact?: () => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function ContactsScreen(_props: ContactsScreenProps): React.JSX.Element {\n return <CoreScreenPlaceholder name=\"Contacts\" />;\n}\n\nexport const contactsScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ContactsScreen\",\n displayName: \"Contacts Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;AA2BA,SAAgB,eAAe,QAAgD;AAC7E,QAAO,oBAAC,uBAAD,EAAuB,MAAK,YAAa,CAAA;;AAGlD,MAAa,+BAAqD;CAChE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
@@ -0,0 +1,41 @@
1
+ const require_MessagingScreen = require("./MessagingScreen-CHb-scHD.cjs");
2
+ const require_CoreScreenPlaceholder = require("./CoreScreenPlaceholder-CA2-2V5o.cjs");
3
+ let react_jsx_runtime = require("react/jsx-runtime");
4
+ //#region src/screens/ContactsScreen.tsx
5
+ var ContactsScreen_exports = /* @__PURE__ */ require_MessagingScreen.__exportAll({
6
+ ContactsScreen: () => ContactsScreen,
7
+ contactsScreenPropertySchema: () => contactsScreenPropertySchema
8
+ });
9
+ function ContactsScreen(_props) {
10
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CoreScreenPlaceholder.CoreScreenPlaceholder, { name: "Contacts" });
11
+ }
12
+ const contactsScreenPropertySchema = {
13
+ widgetType: "ContactsScreen",
14
+ displayName: "Contacts Screen",
15
+ tabsConfig: [{
16
+ id: "styling",
17
+ label: "Styling"
18
+ }],
19
+ fields: []
20
+ };
21
+ //#endregion
22
+ Object.defineProperty(exports, "ContactsScreen", {
23
+ enumerable: true,
24
+ get: function() {
25
+ return ContactsScreen;
26
+ }
27
+ });
28
+ Object.defineProperty(exports, "ContactsScreen_exports", {
29
+ enumerable: true,
30
+ get: function() {
31
+ return ContactsScreen_exports;
32
+ }
33
+ });
34
+ Object.defineProperty(exports, "contactsScreenPropertySchema", {
35
+ enumerable: true,
36
+ get: function() {
37
+ return contactsScreenPropertySchema;
38
+ }
39
+ });
40
+
41
+ //# sourceMappingURL=ContactsScreen-Cqyrl4AQ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactsScreen-Cqyrl4AQ.cjs","names":["CoreScreenPlaceholder"],"sources":["../src/screens/ContactsScreen.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { CoreScreenPlaceholder } from \"./CoreScreenPlaceholder\";\n\ntype ContactsScreenProps = ComponentProps<\"div\"> & {\n // Styling\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n\n // Display\n defaultViewMode?: \"list\" | \"grid\";\n\n // Callbacks\n onContactSelect?: (contactId: string) => void;\n onCreateContact?: () => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function ContactsScreen(_props: ContactsScreenProps): React.JSX.Element {\n return <CoreScreenPlaceholder name=\"Contacts\" />;\n}\n\nexport const contactsScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ContactsScreen\",\n displayName: \"Contacts Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;AA2BA,SAAgB,eAAe,QAAgD;AAC7E,QAAO,iBAAA,GAAA,kBAAA,KAACA,8BAAAA,uBAAD,EAAuB,MAAK,YAAa,CAAA;;AAGlD,MAAa,+BAAqD;CAChE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
@@ -0,0 +1,38 @@
1
+ require("./MessagingScreen-CHb-scHD.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/screens/CoreScreenPlaceholder.tsx
4
+ /**
5
+ * Internal placeholder component for core screens provided by Fluid Commerce.
6
+ * This is NOT exported from the SDK — it's shared between core screen files.
7
+ */
8
+ function CoreScreenPlaceholder({ name }) {
9
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
10
+ className: "flex min-h-[400px] items-center justify-center",
11
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12
+ className: "border-border max-w-sm rounded-lg border border-dashed p-8 text-center",
13
+ children: [
14
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
15
+ className: "text-foreground text-xl font-semibold",
16
+ children: name
17
+ }),
18
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
19
+ className: "text-muted-foreground mt-2",
20
+ children: "This screen is provided by Fluid Commerce"
21
+ }),
22
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
23
+ className: "text-muted-foreground mt-1 text-sm",
24
+ children: "Connect to the Fluid platform to enable this feature"
25
+ })
26
+ ]
27
+ })
28
+ });
29
+ }
30
+ //#endregion
31
+ Object.defineProperty(exports, "CoreScreenPlaceholder", {
32
+ enumerable: true,
33
+ get: function() {
34
+ return CoreScreenPlaceholder;
35
+ }
36
+ });
37
+
38
+ //# sourceMappingURL=CoreScreenPlaceholder-CA2-2V5o.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreScreenPlaceholder-CA2-2V5o.cjs","names":[],"sources":["../src/screens/CoreScreenPlaceholder.tsx"],"sourcesContent":["/**\n * Internal placeholder component for core screens provided by Fluid Commerce.\n * This is NOT exported from the SDK — it's shared between core screen files.\n */\nexport function CoreScreenPlaceholder({\n name,\n}: {\n readonly name: string;\n}): React.JSX.Element {\n return (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <div className=\"border-border max-w-sm rounded-lg border border-dashed p-8 text-center\">\n <h2 className=\"text-foreground text-xl font-semibold\">{name}</h2>\n <p className=\"text-muted-foreground mt-2\">\n This screen is provided by Fluid Commerce\n </p>\n <p className=\"text-muted-foreground mt-1 text-sm\">\n Connect to the Fluid platform to enable this feature\n </p>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AAIA,SAAgB,sBAAsB,EACpC,QAGoB;AACpB,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,WAAU;YACb,iBAAA,GAAA,kBAAA,MAAC,OAAD;GAAK,WAAU;aAAf;IACE,iBAAA,GAAA,kBAAA,KAAC,MAAD;KAAI,WAAU;eAAyC;KAAU,CAAA;IACjE,iBAAA,GAAA,kBAAA,KAAC,KAAD;KAAG,WAAU;eAA6B;KAEtC,CAAA;IACJ,iBAAA,GAAA,kBAAA,KAAC,KAAD;KAAG,WAAU;eAAqC;KAE9C,CAAA;IACA;;EACF,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ //#region src/screens/CoreScreenPlaceholder.tsx
3
+ /**
4
+ * Internal placeholder component for core screens provided by Fluid Commerce.
5
+ * This is NOT exported from the SDK — it's shared between core screen files.
6
+ */
7
+ function CoreScreenPlaceholder({ name }) {
8
+ return /* @__PURE__ */ jsx("div", {
9
+ className: "flex min-h-[400px] items-center justify-center",
10
+ children: /* @__PURE__ */ jsxs("div", {
11
+ className: "border-border max-w-sm rounded-lg border border-dashed p-8 text-center",
12
+ children: [
13
+ /* @__PURE__ */ jsx("h2", {
14
+ className: "text-foreground text-xl font-semibold",
15
+ children: name
16
+ }),
17
+ /* @__PURE__ */ jsx("p", {
18
+ className: "text-muted-foreground mt-2",
19
+ children: "This screen is provided by Fluid Commerce"
20
+ }),
21
+ /* @__PURE__ */ jsx("p", {
22
+ className: "text-muted-foreground mt-1 text-sm",
23
+ children: "Connect to the Fluid platform to enable this feature"
24
+ })
25
+ ]
26
+ })
27
+ });
28
+ }
29
+ //#endregion
30
+ export { CoreScreenPlaceholder as t };
31
+
32
+ //# sourceMappingURL=CoreScreenPlaceholder-D93ZYKt2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreScreenPlaceholder-D93ZYKt2.mjs","names":[],"sources":["../src/screens/CoreScreenPlaceholder.tsx"],"sourcesContent":["/**\n * Internal placeholder component for core screens provided by Fluid Commerce.\n * This is NOT exported from the SDK — it's shared between core screen files.\n */\nexport function CoreScreenPlaceholder({\n name,\n}: {\n readonly name: string;\n}): React.JSX.Element {\n return (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <div className=\"border-border max-w-sm rounded-lg border border-dashed p-8 text-center\">\n <h2 className=\"text-foreground text-xl font-semibold\">{name}</h2>\n <p className=\"text-muted-foreground mt-2\">\n This screen is provided by Fluid Commerce\n </p>\n <p className=\"text-muted-foreground mt-1 text-sm\">\n Connect to the Fluid platform to enable this feature\n </p>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;AAIA,SAAgB,sBAAsB,EACpC,QAGoB;AACpB,QACE,oBAAC,OAAD;EAAK,WAAU;YACb,qBAAC,OAAD;GAAK,WAAU;aAAf;IACE,oBAAC,MAAD;KAAI,WAAU;eAAyC;KAAU,CAAA;IACjE,oBAAC,KAAD;KAAG,WAAU;eAA6B;KAEtC,CAAA;IACJ,oBAAC,KAAD;KAAG,WAAU;eAAqC;KAE9C,CAAA;IACA;;EACF,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { t as __exportAll } from "./chunk-D1SwGrFN.mjs";
2
+ import { t as CoreScreenPlaceholder } from "./CoreScreenPlaceholder-D93ZYKt2.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/screens/CustomersScreen.tsx
5
+ var CustomersScreen_exports = /* @__PURE__ */ __exportAll({
6
+ CustomersScreen: () => CustomersScreen,
7
+ customersScreenPropertySchema: () => customersScreenPropertySchema
8
+ });
9
+ function CustomersScreen(_props) {
10
+ return /* @__PURE__ */ jsx(CoreScreenPlaceholder, { name: "Customers" });
11
+ }
12
+ const customersScreenPropertySchema = {
13
+ widgetType: "CustomersScreen",
14
+ displayName: "Customers Screen",
15
+ tabsConfig: [{
16
+ id: "styling",
17
+ label: "Styling"
18
+ }],
19
+ fields: []
20
+ };
21
+ //#endregion
22
+ export { CustomersScreen_exports as n, customersScreenPropertySchema as r, CustomersScreen as t };
23
+
24
+ //# sourceMappingURL=CustomersScreen-BEar6Leg.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomersScreen-BEar6Leg.mjs","names":[],"sources":["../src/screens/CustomersScreen.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { CoreScreenPlaceholder } from \"./CoreScreenPlaceholder\";\n\ntype CustomersScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function CustomersScreen(\n _props: CustomersScreenProps,\n): React.JSX.Element {\n return <CoreScreenPlaceholder name=\"Customers\" />;\n}\n\nexport const customersScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"CustomersScreen\",\n displayName: \"Customers Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;AAmBA,SAAgB,gBACd,QACmB;AACnB,QAAO,oBAAC,uBAAD,EAAuB,MAAK,aAAc,CAAA;;AAGnD,MAAa,gCAAsD;CACjE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
@@ -0,0 +1,41 @@
1
+ const require_MessagingScreen = require("./MessagingScreen-CHb-scHD.cjs");
2
+ const require_CoreScreenPlaceholder = require("./CoreScreenPlaceholder-CA2-2V5o.cjs");
3
+ let react_jsx_runtime = require("react/jsx-runtime");
4
+ //#region src/screens/CustomersScreen.tsx
5
+ var CustomersScreen_exports = /* @__PURE__ */ require_MessagingScreen.__exportAll({
6
+ CustomersScreen: () => CustomersScreen,
7
+ customersScreenPropertySchema: () => customersScreenPropertySchema
8
+ });
9
+ function CustomersScreen(_props) {
10
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CoreScreenPlaceholder.CoreScreenPlaceholder, { name: "Customers" });
11
+ }
12
+ const customersScreenPropertySchema = {
13
+ widgetType: "CustomersScreen",
14
+ displayName: "Customers Screen",
15
+ tabsConfig: [{
16
+ id: "styling",
17
+ label: "Styling"
18
+ }],
19
+ fields: []
20
+ };
21
+ //#endregion
22
+ Object.defineProperty(exports, "CustomersScreen", {
23
+ enumerable: true,
24
+ get: function() {
25
+ return CustomersScreen;
26
+ }
27
+ });
28
+ Object.defineProperty(exports, "CustomersScreen_exports", {
29
+ enumerable: true,
30
+ get: function() {
31
+ return CustomersScreen_exports;
32
+ }
33
+ });
34
+ Object.defineProperty(exports, "customersScreenPropertySchema", {
35
+ enumerable: true,
36
+ get: function() {
37
+ return customersScreenPropertySchema;
38
+ }
39
+ });
40
+
41
+ //# sourceMappingURL=CustomersScreen-gFgOzBox.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomersScreen-gFgOzBox.cjs","names":["CoreScreenPlaceholder"],"sources":["../src/screens/CustomersScreen.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { CoreScreenPlaceholder } from \"./CoreScreenPlaceholder\";\n\ntype CustomersScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function CustomersScreen(\n _props: CustomersScreenProps,\n): React.JSX.Element {\n return <CoreScreenPlaceholder name=\"Customers\" />;\n}\n\nexport const customersScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"CustomersScreen\",\n displayName: \"Customers Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;AAmBA,SAAgB,gBACd,QACmB;AACnB,QAAO,iBAAA,GAAA,kBAAA,KAACA,8BAAAA,uBAAD,EAAuB,MAAK,aAAc,CAAA;;AAGnD,MAAa,gCAAsD;CACjE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}