@01.software/sdk 0.2.9-dev.260311.926a6d4 → 0.2.9-dev.260311.bb95a4e

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 (48) hide show
  1. package/README.md +14 -14
  2. package/dist/index.cjs +5 -17
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +5 -25
  5. package/dist/index.d.ts +5 -25
  6. package/dist/index.js +5 -17
  7. package/dist/index.js.map +1 -1
  8. package/dist/{components → ui}/code-block.cjs +3 -3
  9. package/dist/ui/code-block.cjs.map +1 -0
  10. package/dist/{components → ui}/code-block.js +3 -3
  11. package/dist/ui/code-block.js.map +1 -0
  12. package/dist/{components → ui}/flow.cjs +9 -9
  13. package/dist/ui/flow.cjs.map +1 -0
  14. package/dist/{components → ui}/flow.js +6 -6
  15. package/dist/ui/flow.js.map +1 -0
  16. package/dist/{components → ui}/form.cjs +6 -6
  17. package/dist/ui/form.cjs.map +1 -0
  18. package/dist/{components → ui}/form.js +3 -3
  19. package/dist/ui/form.js.map +1 -0
  20. package/dist/{components → ui}/image.cjs +2 -2
  21. package/dist/ui/image.cjs.map +1 -0
  22. package/dist/{components → ui}/image.js +2 -2
  23. package/dist/ui/image.js.map +1 -0
  24. package/dist/{components → ui}/rich-text.cjs +6 -6
  25. package/dist/ui/rich-text.cjs.map +1 -0
  26. package/dist/{components → ui}/rich-text.js +3 -3
  27. package/dist/ui/rich-text.js.map +1 -0
  28. package/package.json +27 -26
  29. package/dist/components/code-block.cjs.map +0 -1
  30. package/dist/components/code-block.js.map +0 -1
  31. package/dist/components/flow.cjs.map +0 -1
  32. package/dist/components/flow.js.map +0 -1
  33. package/dist/components/form.cjs.map +0 -1
  34. package/dist/components/form.js.map +0 -1
  35. package/dist/components/image.cjs.map +0 -1
  36. package/dist/components/image.js.map +0 -1
  37. package/dist/components/rich-text.cjs.map +0 -1
  38. package/dist/components/rich-text.js.map +0 -1
  39. /package/dist/{components → ui}/code-block.d.cts +0 -0
  40. /package/dist/{components → ui}/code-block.d.ts +0 -0
  41. /package/dist/{components → ui}/flow.d.cts +0 -0
  42. /package/dist/{components → ui}/flow.d.ts +0 -0
  43. /package/dist/{components → ui}/form.d.cts +0 -0
  44. /package/dist/{components → ui}/form.d.ts +0 -0
  45. /package/dist/{components → ui}/image.d.cts +0 -0
  46. /package/dist/{components → ui}/image.d.ts +0 -0
  47. /package/dist/{components → ui}/rich-text.d.cts +0 -0
  48. /package/dist/{components → ui}/rich-text.d.ts +0 -0
package/README.md CHANGED
@@ -35,11 +35,11 @@ import { createServerToken, verifyServerToken, createApiKey } from '@01.software
35
35
  import { handleWebhook, createTypedWebhookHandler } from '@01.software/sdk/webhook'
36
36
 
37
37
  // Components - sub-path imports per domain
38
- import { RichTextContent } from '@01.software/sdk/components/rich-text'
39
- import { Image } from '@01.software/sdk/components/image'
40
- import { FormRenderer } from '@01.software/sdk/components/form'
41
- import { CodeBlock } from '@01.software/sdk/components/code-block'
42
- import { FlowRenderer } from '@01.software/sdk/components/flow'
38
+ import { RichTextContent } from '@01.software/sdk/ui/rich-text'
39
+ import { Image } from '@01.software/sdk/ui/image'
40
+ import { FormRenderer } from '@01.software/sdk/ui/form'
41
+ import { CodeBlock } from '@01.software/sdk/ui/code-block'
42
+ import { FlowRenderer } from '@01.software/sdk/ui/flow'
43
43
 
44
44
  ```
45
45
 
@@ -95,17 +95,17 @@ await client.query.prefetchQuery({
95
95
  ```typescript
96
96
  const client = createBrowserClient({
97
97
  clientKey: string, // Required
98
- environment?: Environment, // 'local' | 'development' | 'staging' | 'production'
99
- baseUrl?: string, // Custom API URL (overrides environment)
100
98
  })
101
99
  ```
102
100
 
103
- | Option | Type | Description |
104
- | ------------- | ------------- | ---------------------------- |
105
- | `clientKey` | `string` | API client key |
106
- | `secretKey` | `string` | API secret key (server only) |
107
- | `environment` | `Environment` | API environment |
108
- | `baseUrl` | `string` | Custom API URL |
101
+ | Option | Type | Description |
102
+ | ----------- | -------- | ---------------------------- |
103
+ | `clientKey` | `string` | API client key |
104
+ | `secretKey` | `string` | API secret key (server only) |
105
+
106
+ API URL은 환경변수로 오버라이드 가능합니다:
107
+ - `SOFTWARE_API_URL` (서버용) 또는 `NEXT_PUBLIC_SOFTWARE_API_URL` (브라우저용)
108
+ - 미설정 시: dev 빌드(`@dev` 태그)는 `api-dev.01.software`, 정식 릴리즈는 `api.01.software`
109
109
 
110
110
  ### Query Builder
111
111
 
@@ -438,7 +438,7 @@ React component for rendering Payload CMS Lexical rich text. Two variants:
438
438
  - **`StyledRichTextContent`** — Headless component with slot-based customization (`components` prop)
439
439
 
440
440
  ```tsx
441
- import { RichTextContent, StyledRichTextContent } from '@01.software/sdk/components/rich-text'
441
+ import { RichTextContent, StyledRichTextContent } from '@01.software/sdk/ui/rich-text'
442
442
 
443
443
  // Base: full converter control
444
444
  <RichTextContent
package/dist/index.cjs CHANGED
@@ -331,24 +331,12 @@ var createTimeoutError = (message, details, userMessage, suggestion) => new Time
331
331
  var createUsageLimitError = (message, usage, details, userMessage, suggestion) => new UsageLimitError(message, usage, details, userMessage, suggestion);
332
332
 
333
333
  // src/core/client/types.ts
334
- var API_URLS = {
335
- local: "http://localhost:3000",
336
- development: "https://api-dev.01.software",
337
- staging: "https://api-stg.01.software",
338
- production: "https://api.01.software"
339
- };
340
- function resolveApiUrl(config) {
341
- if (config == null ? void 0 : config.baseUrl) {
342
- return config.baseUrl.replace(/\/$/, "");
343
- }
334
+ function resolveApiUrl() {
344
335
  const envUrl = process.env.SOFTWARE_API_URL || process.env.NEXT_PUBLIC_SOFTWARE_API_URL;
345
336
  if (envUrl) {
346
337
  return envUrl.replace(/\/$/, "");
347
338
  }
348
- if (config == null ? void 0 : config.environment) {
349
- return API_URLS[config.environment];
350
- }
351
- return API_URLS.production;
339
+ return "http://localhost:3000";
352
340
  }
353
341
 
354
342
  // src/core/internal/utils/http.ts
@@ -385,7 +373,7 @@ function httpFetch(url, options) {
385
373
  secretKey,
386
374
  customerToken,
387
375
  timeout = DEFAULT_TIMEOUT,
388
- baseUrl = API_URLS.production,
376
+ baseUrl = resolveApiUrl(),
389
377
  debug,
390
378
  retry,
391
379
  onUnauthorized
@@ -1937,7 +1925,7 @@ var BrowserClient = class {
1937
1925
  throw createConfigError("clientKey is required.");
1938
1926
  }
1939
1927
  this.config = __spreadValues({}, options);
1940
- this.baseUrl = resolveApiUrl(options);
1928
+ this.baseUrl = resolveApiUrl();
1941
1929
  const metadata = {
1942
1930
  timestamp: Date.now(),
1943
1931
  userAgent: typeof window !== "undefined" ? (_a = window.navigator) == null ? void 0 : _a.userAgent : "Node.js"
@@ -1998,7 +1986,7 @@ var ServerClient = class {
1998
1986
  throw createConfigError("secretKey is required.");
1999
1987
  }
2000
1988
  this.config = __spreadValues({}, options);
2001
- this.baseUrl = resolveApiUrl(options);
1989
+ this.baseUrl = resolveApiUrl();
2002
1990
  const metadata = {
2003
1991
  timestamp: Date.now(),
2004
1992
  userAgent: "Node.js"