@avocadostudio-ai/site-sdk 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 (63) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +145 -0
  3. package/dist/cli/register.d.ts +33 -0
  4. package/dist/cli/register.js +315 -0
  5. package/dist/create-site-page.d.ts +95 -0
  6. package/dist/create-site-page.js +127 -0
  7. package/dist/draft-common.d.ts +4 -0
  8. package/dist/draft-common.js +17 -0
  9. package/dist/draft-context-core.d.ts +11 -0
  10. package/dist/draft-context-core.js +26 -0
  11. package/dist/draft-context.d.ts +8 -0
  12. package/dist/draft-context.js +14 -0
  13. package/dist/draft-fetch.d.ts +14 -0
  14. package/dist/draft-fetch.js +115 -0
  15. package/dist/draft-routes-core.d.ts +11 -0
  16. package/dist/draft-routes-core.js +41 -0
  17. package/dist/draft-routes.d.ts +2 -0
  18. package/dist/draft-routes.js +27 -0
  19. package/dist/draft.d.ts +3 -0
  20. package/dist/draft.js +6 -0
  21. package/dist/editor-api-handler.d.ts +59 -0
  22. package/dist/editor-api-handler.js +89 -0
  23. package/dist/editor-cors.d.ts +3 -0
  24. package/dist/editor-cors.js +31 -0
  25. package/dist/editor-manifest.d.ts +3 -0
  26. package/dist/editor-manifest.js +65 -0
  27. package/dist/editor-overlay-inner.d.ts +5 -0
  28. package/dist/editor-overlay-inner.js +7 -0
  29. package/dist/editor-overlay.d.ts +4 -0
  30. package/dist/editor-overlay.js +14 -0
  31. package/dist/editor-query.d.ts +2 -0
  32. package/dist/editor-query.js +16 -0
  33. package/dist/editor-routes.d.ts +35 -0
  34. package/dist/editor-routes.js +66 -0
  35. package/dist/editor.d.ts +20 -0
  36. package/dist/editor.js +22 -0
  37. package/dist/index.d.ts +5 -0
  38. package/dist/index.js +5 -0
  39. package/dist/integration-check.d.ts +5 -0
  40. package/dist/integration-check.js +29 -0
  41. package/dist/live-preview-blocks.d.ts +5 -0
  42. package/dist/live-preview-blocks.js +30 -0
  43. package/dist/manifest-utils.d.ts +17 -0
  44. package/dist/manifest-utils.js +44 -0
  45. package/dist/middleware.d.ts +37 -0
  46. package/dist/middleware.js +34 -0
  47. package/dist/navigation.d.ts +48 -0
  48. package/dist/navigation.js +95 -0
  49. package/dist/publish-handlers/json-file.d.ts +24 -0
  50. package/dist/publish-handlers/json-file.js +40 -0
  51. package/dist/publish-utils.d.ts +28 -0
  52. package/dist/publish-utils.js +92 -0
  53. package/dist/render-blocks.d.ts +4 -0
  54. package/dist/render-blocks.js +26 -0
  55. package/dist/revalidate-handler.d.ts +42 -0
  56. package/dist/revalidate-handler.js +77 -0
  57. package/dist/routes.d.ts +10 -0
  58. package/dist/routes.js +12 -0
  59. package/dist/server/orchestrator.d.ts +117 -0
  60. package/dist/server/orchestrator.js +733 -0
  61. package/dist/types.d.ts +8 -0
  62. package/dist/types.js +1 -0
  63. package/package.json +104 -0
@@ -0,0 +1,8 @@
1
+ export type { PageDoc, PageMeta, BlockInstance } from "@avocadostudio-ai/shared";
2
+ export { pageDocSchema } from "@avocadostudio-ai/shared";
3
+ export type DraftContext = {
4
+ session: string;
5
+ siteId: string;
6
+ editorOrigin: string;
7
+ };
8
+ export type SearchParamsRecord = Record<string, string | string[] | undefined>;
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export { pageDocSchema } from "@avocadostudio-ai/shared";
package/package.json ADDED
@@ -0,0 +1,104 @@
1
+ {
2
+ "name": "@avocadostudio-ai/site-sdk",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ "./package.json": "./package.json",
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ },
13
+ "./draft": {
14
+ "import": "./dist/draft.js",
15
+ "types": "./dist/draft.d.ts"
16
+ },
17
+ "./editor": {
18
+ "import": "./dist/editor.js",
19
+ "types": "./dist/editor.d.ts"
20
+ },
21
+ "./routes": {
22
+ "import": "./dist/routes.js",
23
+ "types": "./dist/routes.d.ts"
24
+ },
25
+ "./editor-manifest": {
26
+ "import": "./dist/editor-manifest.js",
27
+ "types": "./dist/editor-manifest.d.ts"
28
+ },
29
+ "./draft/core": {
30
+ "import": "./dist/draft-context-core.js",
31
+ "types": "./dist/draft-context-core.d.ts"
32
+ },
33
+ "./routes/core": {
34
+ "import": "./dist/draft-routes-core.js",
35
+ "types": "./dist/draft-routes-core.d.ts"
36
+ },
37
+ "./publish-handlers/json-file": {
38
+ "import": "./dist/publish-handlers/json-file.js",
39
+ "types": "./dist/publish-handlers/json-file.d.ts"
40
+ },
41
+ "./middleware": {
42
+ "import": "./dist/middleware.js",
43
+ "types": "./dist/middleware.d.ts"
44
+ },
45
+ "./navigation": {
46
+ "import": "./dist/navigation.js",
47
+ "types": "./dist/navigation.d.ts"
48
+ },
49
+ "./page": {
50
+ "import": "./dist/create-site-page.js",
51
+ "types": "./dist/create-site-page.d.ts"
52
+ },
53
+ "./server": {
54
+ "import": "./dist/server/orchestrator.js",
55
+ "types": "./dist/server/orchestrator.d.ts"
56
+ }
57
+ },
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "https://github.com/avocadostudio-ai/avocado.git",
61
+ "directory": "packages/site-sdk"
62
+ },
63
+ "publishConfig": {
64
+ "registry": "https://registry.npmjs.org",
65
+ "access": "public"
66
+ },
67
+ "files": [
68
+ "dist"
69
+ ],
70
+ "dependencies": {
71
+ "zod": "^4.3.6",
72
+ "@avocadostudio-ai/blocks": "0.1.0",
73
+ "@avocadostudio-ai/preview-adapter": "0.1.0",
74
+ "@avocadostudio-ai/shared": "0.1.0"
75
+ },
76
+ "peerDependencies": {
77
+ "next": ">=15.0.0",
78
+ "react": ">=19.0.0",
79
+ "react-dom": ">=19.0.0",
80
+ "@avocadostudio-ai/orchestrator-core": "^0.1.0"
81
+ },
82
+ "peerDependenciesMeta": {
83
+ "@avocadostudio-ai/orchestrator-core": {
84
+ "optional": true
85
+ }
86
+ },
87
+ "devDependencies": {
88
+ "@types/react": "^19.0.10",
89
+ "typescript": "^5.7.3"
90
+ },
91
+ "description": "SDK for adding Avocado Studio AI editing and live preview to a Next.js site",
92
+ "license": "Apache-2.0",
93
+ "homepage": "https://github.com/avocadostudio-ai/avocado/tree/main/packages/site-sdk#readme",
94
+ "bugs": {
95
+ "url": "https://github.com/avocadostudio-ai/avocado/issues"
96
+ },
97
+ "scripts": {
98
+ "build": "tsc -p tsconfig.build.json",
99
+ "typecheck": "tsc --noEmit"
100
+ },
101
+ "bin": {
102
+ "avocado-register": "./dist/cli/register.js"
103
+ }
104
+ }