ncblock 0.0.1

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 (113) hide show
  1. package/README.md +286 -0
  2. package/dist/bridge/context.d.ts +44 -0
  3. package/dist/bridge/context.d.ts.map +1 -0
  4. package/dist/bridge/context.js +42 -0
  5. package/dist/bridge/dataSources/dataSource.d.ts +732 -0
  6. package/dist/bridge/dataSources/dataSource.d.ts.map +1 -0
  7. package/dist/bridge/dataSources/dataSource.js +37 -0
  8. package/dist/bridge/dataSources/dataSourcePage.d.ts +117 -0
  9. package/dist/bridge/dataSources/dataSourcePage.d.ts.map +1 -0
  10. package/dist/bridge/dataSources/dataSourcePage.js +13 -0
  11. package/dist/bridge/dataSources/dataSourceValue.d.ts +67 -0
  12. package/dist/bridge/dataSources/dataSourceValue.d.ts.map +1 -0
  13. package/dist/bridge/dataSources/dataSourceValue.js +14 -0
  14. package/dist/bridge/dataSources/dateValue.d.ts +158 -0
  15. package/dist/bridge/dataSources/dateValue.d.ts.map +1 -0
  16. package/dist/bridge/dataSources/dateValue.js +59 -0
  17. package/dist/bridge/dataSources/propertySchema.d.ts +191 -0
  18. package/dist/bridge/dataSources/propertySchema.d.ts.map +1 -0
  19. package/dist/bridge/dataSources/propertySchema.js +148 -0
  20. package/dist/bridge/dataSources/recordPointer.d.ts +10 -0
  21. package/dist/bridge/dataSources/recordPointer.d.ts.map +1 -0
  22. package/dist/bridge/dataSources/recordPointer.js +8 -0
  23. package/dist/bridge/ids.d.ts +21 -0
  24. package/dist/bridge/ids.d.ts.map +1 -0
  25. package/dist/bridge/ids.js +3 -0
  26. package/dist/bridge/incomingType.d.ts +10 -0
  27. package/dist/bridge/incomingType.d.ts.map +1 -0
  28. package/dist/bridge/incomingType.js +17 -0
  29. package/dist/bridge/manifest.d.ts +66 -0
  30. package/dist/bridge/manifest.d.ts.map +1 -0
  31. package/dist/bridge/manifest.js +40 -0
  32. package/dist/bridge/messages/contextChanged.d.ts +20 -0
  33. package/dist/bridge/messages/contextChanged.d.ts.map +1 -0
  34. package/dist/bridge/messages/contextChanged.js +10 -0
  35. package/dist/bridge/messages/createPage.d.ts +233 -0
  36. package/dist/bridge/messages/createPage.d.ts.map +1 -0
  37. package/dist/bridge/messages/createPage.js +45 -0
  38. package/dist/bridge/messages/createPageResult.d.ts +198 -0
  39. package/dist/bridge/messages/createPageResult.d.ts.map +1 -0
  40. package/dist/bridge/messages/createPageResult.js +20 -0
  41. package/dist/bridge/messages/dataSourcesChanged.d.ts +158 -0
  42. package/dist/bridge/messages/dataSourcesChanged.d.ts.map +1 -0
  43. package/dist/bridge/messages/dataSourcesChanged.js +13 -0
  44. package/dist/bridge/messages/getPage.d.ts +203 -0
  45. package/dist/bridge/messages/getPage.d.ts.map +1 -0
  46. package/dist/bridge/messages/getPage.js +24 -0
  47. package/dist/bridge/messages/hostToSandbox.d.ts +974 -0
  48. package/dist/bridge/messages/hostToSandbox.d.ts.map +1 -0
  49. package/dist/bridge/messages/hostToSandbox.js +24 -0
  50. package/dist/bridge/messages/init.d.ts +169 -0
  51. package/dist/bridge/messages/init.d.ts.map +1 -0
  52. package/dist/bridge/messages/init.js +17 -0
  53. package/dist/bridge/messages/invalidHostMessage.d.ts +15 -0
  54. package/dist/bridge/messages/invalidHostMessage.d.ts.map +1 -0
  55. package/dist/bridge/messages/invalidHostMessage.js +13 -0
  56. package/dist/bridge/messages/invalidSandboxMessage.d.ts +15 -0
  57. package/dist/bridge/messages/invalidSandboxMessage.d.ts.map +1 -0
  58. package/dist/bridge/messages/invalidSandboxMessage.js +13 -0
  59. package/dist/bridge/messages/queryDataSource.d.ts +13 -0
  60. package/dist/bridge/messages/queryDataSource.d.ts.map +1 -0
  61. package/dist/bridge/messages/queryDataSource.js +11 -0
  62. package/dist/bridge/messages/queryDataSourceResult.d.ts +77 -0
  63. package/dist/bridge/messages/queryDataSourceResult.d.ts.map +1 -0
  64. package/dist/bridge/messages/queryDataSourceResult.js +13 -0
  65. package/dist/bridge/messages/ready.d.ts +41 -0
  66. package/dist/bridge/messages/ready.d.ts.map +1 -0
  67. package/dist/bridge/messages/ready.js +22 -0
  68. package/dist/bridge/messages/resize.d.ts +12 -0
  69. package/dist/bridge/messages/resize.d.ts.map +1 -0
  70. package/dist/bridge/messages/resize.js +10 -0
  71. package/dist/bridge/messages/sandboxToHost.d.ts +389 -0
  72. package/dist/bridge/messages/sandboxToHost.d.ts.map +1 -0
  73. package/dist/bridge/messages/sandboxToHost.js +21 -0
  74. package/dist/bridge/messages/themeChanged.d.ts +11 -0
  75. package/dist/bridge/messages/themeChanged.d.ts.map +1 -0
  76. package/dist/bridge/messages/themeChanged.js +10 -0
  77. package/dist/bridge/messages/updatePage.d.ts +171 -0
  78. package/dist/bridge/messages/updatePage.d.ts.map +1 -0
  79. package/dist/bridge/messages/updatePage.js +14 -0
  80. package/dist/bridge/messages/updatePageResult.d.ts +197 -0
  81. package/dist/bridge/messages/updatePageResult.d.ts.map +1 -0
  82. package/dist/bridge/messages/updatePageResult.js +19 -0
  83. package/dist/bridge/pages/page.d.ts +651 -0
  84. package/dist/bridge/pages/page.d.ts.map +1 -0
  85. package/dist/bridge/pages/page.js +229 -0
  86. package/dist/bridge/pendingRequests.d.ts +14 -0
  87. package/dist/bridge/pendingRequests.d.ts.map +1 -0
  88. package/dist/bridge/pendingRequests.js +27 -0
  89. package/dist/bridge/theme.d.ts +4 -0
  90. package/dist/bridge/theme.d.ts.map +1 -0
  91. package/dist/bridge/theme.js +2 -0
  92. package/dist/host.d.ts +52 -0
  93. package/dist/host.d.ts.map +1 -0
  94. package/dist/host.js +32 -0
  95. package/dist/index.d.ts +27 -0
  96. package/dist/index.d.ts.map +1 -0
  97. package/dist/index.js +14 -0
  98. package/dist/notion.d.ts +113 -0
  99. package/dist/notion.d.ts.map +1 -0
  100. package/dist/notion.js +773 -0
  101. package/dist/pages.d.ts +23 -0
  102. package/dist/pages.d.ts.map +1 -0
  103. package/dist/pages.js +30 -0
  104. package/dist/react.d.ts +171 -0
  105. package/dist/react.d.ts.map +1 -0
  106. package/dist/react.js +284 -0
  107. package/dist/types.d.ts +124 -0
  108. package/dist/types.d.ts.map +1 -0
  109. package/dist/types.js +1 -0
  110. package/dist/utils.d.ts +9 -0
  111. package/dist/utils.d.ts.map +1 -0
  112. package/dist/utils.js +10 -0
  113. package/package.json +48 -0
@@ -0,0 +1,229 @@
1
+ /**
2
+ * Notion page shapes exchanged over the custom block bridge.
3
+ *
4
+ * These mirror a narrow subset of Notion's public `POST /v1/pages` API, since that's the bridge
5
+ * shape the host delivers for messages like `createPageResult`.
6
+ */
7
+ import * as v from "valibot";
8
+ /**
9
+ * Parent reference accepted by `pages.create` / `pages.update` inputs.
10
+ *
11
+ * Mirrors the parent shape Notion's public `POST /v1/pages` API accepts: `page_id` for a
12
+ * page-parented child, `data_source_id` for a database row. `data_source_id` is the internal
13
+ * collection ID.
14
+ */
15
+ export const notionPageParentInputSchema = v.variant("type", [
16
+ v.object({ type: v.literal("page_id"), page_id: v.string() }),
17
+ v.object({
18
+ type: v.literal("data_source_id"),
19
+ data_source_id: v.string(),
20
+ }),
21
+ ]);
22
+ /**
23
+ * Parent reference returned on a `Page` object from the host.
24
+ *
25
+ * Wider than the input shape: in addition to `page_id` / `data_source_id`, this includes
26
+ * `workspace` (for top-level/team-rooted pages) and `block_id` (for pages nested under a
27
+ * non-page block, e.g. a column or toggle). This mirrors the parent variants the public API
28
+ * surfaces on `Page` responses.
29
+ */
30
+ export const notionPageParentSchema = v.variant("type", [
31
+ v.object({ type: v.literal("page_id"), page_id: v.string() }),
32
+ v.object({
33
+ type: v.literal("data_source_id"),
34
+ data_source_id: v.string(),
35
+ }),
36
+ v.object({ type: v.literal("workspace"), workspace: v.literal(true) }),
37
+ v.object({ type: v.literal("block_id"), block_id: v.string() }),
38
+ ]);
39
+ export const notionEmojiIconSchema = v.object({
40
+ type: v.literal("emoji"),
41
+ emoji: v.string(),
42
+ });
43
+ export const notionCustomEmojiIconSchema = v.object({
44
+ type: v.literal("custom_emoji"),
45
+ custom_emoji: v.object({
46
+ id: v.string(),
47
+ name: v.optional(v.string()),
48
+ url: v.optional(v.string()),
49
+ }),
50
+ });
51
+ export const notionExternalFileSchema = v.object({
52
+ type: v.literal("external"),
53
+ external: v.object({ url: v.string() }),
54
+ });
55
+ export const notionHostedFileSchema = v.object({
56
+ type: v.literal("file"),
57
+ file: v.object({
58
+ url: v.string(),
59
+ expiry_time: v.optional(v.string()),
60
+ }),
61
+ });
62
+ // TODO: Add file upload support.
63
+ export const notionPageIconSchema = v.variant("type", [
64
+ notionEmojiIconSchema,
65
+ notionCustomEmojiIconSchema,
66
+ notionExternalFileSchema,
67
+ notionHostedFileSchema,
68
+ ]);
69
+ export const notionPageCoverSchema = v.variant("type", [
70
+ notionExternalFileSchema,
71
+ notionHostedFileSchema,
72
+ ]);
73
+ const nullableStringSchema = v.nullable(v.string());
74
+ const notionRichTextItemSchema = v.record(v.string(), v.unknown());
75
+ const notionSelectOptionInputSchema = v.union([
76
+ v.object({
77
+ id: v.string(),
78
+ name: v.optional(v.string()),
79
+ color: v.optional(v.string()),
80
+ description: v.optional(nullableStringSchema),
81
+ }),
82
+ v.object({
83
+ name: v.string(),
84
+ id: v.optional(v.string()),
85
+ color: v.optional(v.string()),
86
+ description: v.optional(nullableStringSchema),
87
+ }),
88
+ ]);
89
+ const notionDateInputSchema = v.object({
90
+ start: v.string(),
91
+ end: v.optional(nullableStringSchema),
92
+ time_zone: v.optional(nullableStringSchema),
93
+ });
94
+ const notionUserInputSchema = v.union([
95
+ v.object({
96
+ object: v.optional(v.literal("user")),
97
+ id: v.string(),
98
+ }),
99
+ v.object({
100
+ object: v.literal("group"),
101
+ id: v.string(),
102
+ name: v.optional(nullableStringSchema),
103
+ }),
104
+ ]);
105
+ const notionRelationInputSchema = v.object({ id: v.string() });
106
+ const notionFileInputSchema = v.union([
107
+ v.object({
108
+ type: v.literal("external"),
109
+ name: v.string(),
110
+ external: v.object({ url: v.string() }),
111
+ }),
112
+ v.object({
113
+ type: v.literal("file"),
114
+ name: v.string(),
115
+ file: v.object({
116
+ url: v.string(),
117
+ expiry_time: v.optional(v.string()),
118
+ }),
119
+ }),
120
+ ]);
121
+ const notionPlaceInputSchema = v.object({
122
+ lat: v.number(),
123
+ lon: v.number(),
124
+ name: v.optional(nullableStringSchema),
125
+ address: v.optional(nullableStringSchema),
126
+ aws_place_id: v.optional(nullableStringSchema),
127
+ google_place_id: v.optional(nullableStringSchema),
128
+ });
129
+ const pagePropertyBaseSchema = {
130
+ id: v.string(),
131
+ };
132
+ /**
133
+ * A page property value.
134
+ */
135
+ export const notionPagePropertyValueSchema = v.variant("type", [
136
+ v.object({
137
+ ...pagePropertyBaseSchema,
138
+ type: v.literal("title"),
139
+ title: v.array(notionRichTextItemSchema),
140
+ }),
141
+ v.object({
142
+ ...pagePropertyBaseSchema,
143
+ type: v.literal("rich_text"),
144
+ rich_text: v.array(notionRichTextItemSchema),
145
+ }),
146
+ v.object({
147
+ ...pagePropertyBaseSchema,
148
+ type: v.literal("number"),
149
+ number: v.nullable(v.number()),
150
+ }),
151
+ v.object({
152
+ ...pagePropertyBaseSchema,
153
+ type: v.literal("url"),
154
+ url: nullableStringSchema,
155
+ }),
156
+ v.object({
157
+ ...pagePropertyBaseSchema,
158
+ type: v.literal("email"),
159
+ email: nullableStringSchema,
160
+ }),
161
+ v.object({
162
+ ...pagePropertyBaseSchema,
163
+ type: v.literal("phone_number"),
164
+ phone_number: nullableStringSchema,
165
+ }),
166
+ v.object({
167
+ ...pagePropertyBaseSchema,
168
+ type: v.literal("checkbox"),
169
+ checkbox: v.boolean(),
170
+ }),
171
+ v.object({
172
+ ...pagePropertyBaseSchema,
173
+ type: v.literal("select"),
174
+ select: v.nullable(notionSelectOptionInputSchema),
175
+ }),
176
+ v.object({
177
+ ...pagePropertyBaseSchema,
178
+ type: v.literal("status"),
179
+ status: v.nullable(notionSelectOptionInputSchema),
180
+ }),
181
+ v.object({
182
+ ...pagePropertyBaseSchema,
183
+ type: v.literal("multi_select"),
184
+ multi_select: v.array(notionSelectOptionInputSchema),
185
+ }),
186
+ v.object({
187
+ ...pagePropertyBaseSchema,
188
+ type: v.literal("date"),
189
+ date: v.nullable(notionDateInputSchema),
190
+ }),
191
+ v.object({
192
+ ...pagePropertyBaseSchema,
193
+ type: v.literal("people"),
194
+ people: v.array(notionUserInputSchema),
195
+ }),
196
+ v.object({
197
+ ...pagePropertyBaseSchema,
198
+ type: v.literal("relation"),
199
+ has_more: v.optional(v.boolean()),
200
+ relation: v.array(notionRelationInputSchema),
201
+ }),
202
+ v.object({
203
+ ...pagePropertyBaseSchema,
204
+ type: v.literal("files"),
205
+ files: v.array(notionFileInputSchema),
206
+ }),
207
+ v.object({
208
+ ...pagePropertyBaseSchema,
209
+ type: v.literal("place"),
210
+ place: v.nullable(notionPlaceInputSchema),
211
+ }),
212
+ ]);
213
+ export const notionPagePropertyWriteMapSchema = v.record(v.string(), notionPagePropertyValueSchema);
214
+ /**
215
+ * The `Page` object returned in `createPageResult` messages.
216
+ */
217
+ export const notionPageSchema = v.object({
218
+ object: v.literal("page"),
219
+ id: v.string(),
220
+ parent: notionPageParentSchema,
221
+ properties: notionPagePropertyWriteMapSchema,
222
+ created_time: v.optional(v.string()),
223
+ last_edited_time: v.optional(v.string()),
224
+ icon: v.optional(notionPageIconSchema),
225
+ cover: v.optional(notionPageCoverSchema),
226
+ url: v.optional(v.string()),
227
+ public_url: v.optional(v.string()),
228
+ in_trash: v.optional(v.boolean()),
229
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Tracks one-shot request/response pairs over the `postMessage` bridge. Each `allocate` reserves a
3
+ * unique `requestId` and stores its resolver. `resolve` finds the pending resolver by `requestId`
4
+ * and calls it, then removes the entry so the same `requestId` cannot be resolved twice.
5
+ */
6
+ export declare class PendingRequests<T> {
7
+ private readonly prefix;
8
+ private nextId;
9
+ private readonly entries;
10
+ constructor(prefix: string);
11
+ allocate(resolver: (value: T) => void): string;
12
+ resolve(requestId: string, value: T): boolean;
13
+ }
14
+ //# sourceMappingURL=pendingRequests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pendingRequests.d.ts","sourceRoot":"","sources":["../../bridge/pendingRequests.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,eAAe,CAAC,CAAC;IAIjB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,OAAO,CAAC,MAAM,CAAI;IAClB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwC;gBAEnC,MAAM,EAAE,MAAM;IAE3C,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM;IAO9C,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO;CAS7C"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Tracks one-shot request/response pairs over the `postMessage` bridge. Each `allocate` reserves a
3
+ * unique `requestId` and stores its resolver. `resolve` finds the pending resolver by `requestId`
4
+ * and calls it, then removes the entry so the same `requestId` cannot be resolved twice.
5
+ */
6
+ export class PendingRequests {
7
+ constructor(prefix) {
8
+ this.prefix = prefix;
9
+ this.nextId = 1;
10
+ this.entries = new Map();
11
+ }
12
+ allocate(resolver) {
13
+ const requestId = `${this.prefix}-${this.nextId}`;
14
+ this.nextId += 1;
15
+ this.entries.set(requestId, resolver);
16
+ return requestId;
17
+ }
18
+ resolve(requestId, value) {
19
+ const resolver = this.entries.get(requestId);
20
+ if (resolver === undefined) {
21
+ return false;
22
+ }
23
+ this.entries.delete(requestId);
24
+ resolver(value);
25
+ return true;
26
+ }
27
+ }
@@ -0,0 +1,4 @@
1
+ import * as v from "valibot";
2
+ export declare const notionThemeSchema: v.PicklistSchema<["light", "dark"], undefined>;
3
+ export type NotionTheme = v.InferOutput<typeof notionThemeSchema>;
4
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../bridge/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,iBAAiB,gDAAgC,CAAA;AAE9D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ import * as v from "valibot";
2
+ export const notionThemeSchema = v.picklist(["light", "dark"]);
package/dist/host.d.ts ADDED
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Host-side entrypoint for `ncblock/host`.
3
+ *
4
+ * Re-exports the bridge valibot schemas, data-source binding types, and the
5
+ * context parser so anything implementing the host side of the bridge — the
6
+ * dev shell today, anything else later — can validate inbound sandbox traffic
7
+ * and shape outbound traffic without reaching into private `bridge/*` paths.
8
+ *
9
+ * Nothing here is intended for use inside a sandboxed custom block; that
10
+ * surface lives in the default `ncblock` entrypoint.
11
+ */
12
+ export { notionCustomBlockContextSchema, parseNotionCustomBlockContext, } from "./bridge/context";
13
+ export type { NotionDataSourceBinding, NotionDataSourceBindings, } from "./bridge/dataSources/dataSource";
14
+ export { notionDataSourceBindingSchema, notionDataSourceBindingsSchema, } from "./bridge/dataSources/dataSource";
15
+ export type { NotionDataSourcePageBridge } from "./bridge/dataSources/dataSourcePage";
16
+ export { notionDataSourcePageBridgeSchema } from "./bridge/dataSources/dataSourcePage";
17
+ export { readIncomingType } from "./bridge/incomingType";
18
+ export type { ContextChangedMessage } from "./bridge/messages/contextChanged";
19
+ export { contextChangedMessageSchema } from "./bridge/messages/contextChanged";
20
+ export type { CreatePageMessage } from "./bridge/messages/createPage";
21
+ export { createPageMessageSchema } from "./bridge/messages/createPage";
22
+ export type { CreatePageResultMessage } from "./bridge/messages/createPageResult";
23
+ export { createPageResultMessageSchema } from "./bridge/messages/createPageResult";
24
+ export type { DataSourcesChangedMessage } from "./bridge/messages/dataSourcesChanged";
25
+ export { dataSourcesChangedMessageSchema } from "./bridge/messages/dataSourcesChanged";
26
+ export type { GetPageMessage, GetPageResultMessage, } from "./bridge/messages/getPage";
27
+ export { getPageMessageSchema, getPageResultMessageSchema, } from "./bridge/messages/getPage";
28
+ export type { HostToSandboxMessage } from "./bridge/messages/hostToSandbox";
29
+ export { hostToSandboxMessageSchema } from "./bridge/messages/hostToSandbox";
30
+ export type { InitMessage } from "./bridge/messages/init";
31
+ export { initMessageSchema } from "./bridge/messages/init";
32
+ export type { InvalidHostMessage } from "./bridge/messages/invalidHostMessage";
33
+ export { invalidHostMessageSchema } from "./bridge/messages/invalidHostMessage";
34
+ export type { InvalidSandboxMessage } from "./bridge/messages/invalidSandboxMessage";
35
+ export { invalidSandboxMessageSchema } from "./bridge/messages/invalidSandboxMessage";
36
+ export type { QueryDataSourceMessage } from "./bridge/messages/queryDataSource";
37
+ export { queryDataSourceMessageSchema } from "./bridge/messages/queryDataSource";
38
+ export type { QueryDataSourceResultMessage } from "./bridge/messages/queryDataSourceResult";
39
+ export { queryDataSourceResultMessageSchema } from "./bridge/messages/queryDataSourceResult";
40
+ export type { ReadyMessage } from "./bridge/messages/ready";
41
+ export { readyMessageSchema } from "./bridge/messages/ready";
42
+ export type { ResizeMessage } from "./bridge/messages/resize";
43
+ export { resizeMessageSchema } from "./bridge/messages/resize";
44
+ export type { SandboxToHostMessage } from "./bridge/messages/sandboxToHost";
45
+ export { sandboxToHostMessageSchema } from "./bridge/messages/sandboxToHost";
46
+ export type { ThemeChangedMessage } from "./bridge/messages/themeChanged";
47
+ export { themeChangedMessageSchema } from "./bridge/messages/themeChanged";
48
+ export type { UpdatePageMessage } from "./bridge/messages/updatePage";
49
+ export { updatePageMessageSchema } from "./bridge/messages/updatePage";
50
+ export type { UpdatePageResultMessage } from "./bridge/messages/updatePageResult";
51
+ export { updatePageResultMessageSchema } from "./bridge/messages/updatePageResult";
52
+ //# sourceMappingURL=host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.d.ts","sourceRoot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AAA;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAA;AAC/E,YAAY,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAA;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAA;AACrF,YAAY,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAA;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAChF,YAAY,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAA;AAC3F,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAA;AAC5F,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,YAAY,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAC5E,YAAY,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,YAAY,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAA"}
package/dist/host.js ADDED
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Host-side entrypoint for `ncblock/host`.
3
+ *
4
+ * Re-exports the bridge valibot schemas, data-source binding types, and the
5
+ * context parser so anything implementing the host side of the bridge — the
6
+ * dev shell today, anything else later — can validate inbound sandbox traffic
7
+ * and shape outbound traffic without reaching into private `bridge/*` paths.
8
+ *
9
+ * Nothing here is intended for use inside a sandboxed custom block; that
10
+ * surface lives in the default `ncblock` entrypoint.
11
+ */
12
+ export { notionCustomBlockContextSchema, parseNotionCustomBlockContext, } from "./bridge/context";
13
+ export { notionDataSourceBindingSchema, notionDataSourceBindingsSchema, } from "./bridge/dataSources/dataSource";
14
+ export { notionDataSourcePageBridgeSchema } from "./bridge/dataSources/dataSourcePage";
15
+ export { readIncomingType } from "./bridge/incomingType";
16
+ export { contextChangedMessageSchema } from "./bridge/messages/contextChanged";
17
+ export { createPageMessageSchema } from "./bridge/messages/createPage";
18
+ export { createPageResultMessageSchema } from "./bridge/messages/createPageResult";
19
+ export { dataSourcesChangedMessageSchema } from "./bridge/messages/dataSourcesChanged";
20
+ export { getPageMessageSchema, getPageResultMessageSchema, } from "./bridge/messages/getPage";
21
+ export { hostToSandboxMessageSchema } from "./bridge/messages/hostToSandbox";
22
+ export { initMessageSchema } from "./bridge/messages/init";
23
+ export { invalidHostMessageSchema } from "./bridge/messages/invalidHostMessage";
24
+ export { invalidSandboxMessageSchema } from "./bridge/messages/invalidSandboxMessage";
25
+ export { queryDataSourceMessageSchema } from "./bridge/messages/queryDataSource";
26
+ export { queryDataSourceResultMessageSchema } from "./bridge/messages/queryDataSourceResult";
27
+ export { readyMessageSchema } from "./bridge/messages/ready";
28
+ export { resizeMessageSchema } from "./bridge/messages/resize";
29
+ export { sandboxToHostMessageSchema } from "./bridge/messages/sandboxToHost";
30
+ export { themeChangedMessageSchema } from "./bridge/messages/themeChanged";
31
+ export { updatePageMessageSchema } from "./bridge/messages/updatePage";
32
+ export { updatePageResultMessageSchema } from "./bridge/messages/updatePageResult";
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Public entrypoint for `ncblock`.
3
+ *
4
+ * Everything re-exported here is part of the SDK's public API. Anything not
5
+ * re-exported is internal and may change without notice. Consumers should
6
+ * import exclusively from `ncblock`, never from deeper paths,
7
+ * so internal files (e.g. `./bridge/*`) can be refactored without breaking
8
+ * downstream code.
9
+ */
10
+ export type { NotionCustomBlockContext } from "./bridge/context";
11
+ export type { NotionCollectionSchema, NotionDataSource, } from "./bridge/dataSources/dataSource";
12
+ export type { NotionDataSourcePage, NotionDataSourcePageUpdateInput, NotionDataSourcePageUpdateResult, } from "./bridge/dataSources/dataSourcePage";
13
+ export type { NotionDataSourceValue } from "./bridge/dataSources/dataSourceValue";
14
+ export type { NotionDate, NotionDateRange, NotionDateReminder, NotionDateTime, NotionDateTimeRange, NotionDateTimeReminder, NotionDateValue, NotionNoReminder, NotionTimeReminder, } from "./bridge/dataSources/dateValue";
15
+ export type { NotionBuiltinPropertyId, NotionDualProperty, NotionPropertyColor, NotionPropertyOption, NotionPropertySchema, NotionPropertyType, NotionStatusGroup, } from "./bridge/dataSources/propertySchema";
16
+ export { NOTION_BUILTIN_PROPERTY_IDS, NOTION_PROPERTY_TYPES, } from "./bridge/dataSources/propertySchema";
17
+ export type { NotionRecordPointer } from "./bridge/dataSources/recordPointer";
18
+ export type { NotionDataSourceId, NotionSpaceId } from "./bridge/ids";
19
+ export type { CustomBlockManifest, ManifestDataSource, ManifestIcon, ManifestProperty, } from "./bridge/manifest";
20
+ export type { NotionCreatePagePosition } from "./bridge/messages/createPage";
21
+ export type { NotionPage, NotionPageCover, NotionPageIcon, NotionPageId, NotionPageParent, NotionPagePropertyInputMap, NotionPagePropertyInputValue, NotionPagePropertyValue, NotionPagePropertyWriteMap, } from "./bridge/pages/page";
22
+ export type { NotionTheme } from "./bridge/theme";
23
+ export { type CustomBlockInitial, type InitCustomBlockOptions, initCustomBlock, NotInIframeError, } from "./notion";
24
+ export { pages } from "./pages";
25
+ export { NotionCustomBlock, type NotionCustomBlockProps, type UseCustomBlockInitResult, useCustomBlockAutoResize, useCustomBlockContext, useCustomBlockInit, useDataSource, useDataSourceDefinitions, useTheme, } from "./react";
26
+ export * from "./types";
27
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.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ChB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EACN,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,wBAAwB,EACxB,QAAQ,GACR,MAAM,SAAS,CAAA;AAChB,cAAc,SAAS,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Public entrypoint for `ncblock`.
3
+ *
4
+ * Everything re-exported here is part of the SDK's public API. Anything not
5
+ * re-exported is internal and may change without notice. Consumers should
6
+ * import exclusively from `ncblock`, never from deeper paths,
7
+ * so internal files (e.g. `./bridge/*`) can be refactored without breaking
8
+ * downstream code.
9
+ */
10
+ export { NOTION_BUILTIN_PROPERTY_IDS, NOTION_PROPERTY_TYPES, } from "./bridge/dataSources/propertySchema";
11
+ export { initCustomBlock, NotInIframeError, } from "./notion";
12
+ export { pages } from "./pages";
13
+ export { NotionCustomBlock, useCustomBlockAutoResize, useCustomBlockContext, useCustomBlockInit, useDataSource, useDataSourceDefinitions, useTheme, } from "./react";
14
+ export * from "./types";
@@ -0,0 +1,113 @@
1
+ import type { NotionCustomBlockContext } from "./bridge/context";
2
+ import type { NotionDataSource } from "./bridge/dataSources/dataSource";
3
+ import type { NotionDataSourcePage, NotionDataSourcePageBridge } from "./bridge/dataSources/dataSourcePage";
4
+ import type { NotionPropertySchema } from "./bridge/dataSources/propertySchema";
5
+ import type { InitMessage } from "./bridge/messages/init";
6
+ import type { NotionTheme } from "./bridge/theme";
7
+ import type { CreatePageInput, CreatePageResult, GetPageResult, NotionPageId, UpdatePageInput, UpdatePageResult } from "./types";
8
+ type DataSourceQueryState = {
9
+ /** Latest pages from the host as parsed from the bridge. `propertiesByKey` is derived lazily. */
10
+ items: NotionDataSourcePageBridge[];
11
+ isLoading: boolean;
12
+ hasMore: boolean;
13
+ error?: string;
14
+ latestRequestId?: string;
15
+ };
16
+ export type CustomBlockHostState = UninitializedHostState | InitializedHostState;
17
+ type UninitializedHostState = {
18
+ status: "uninitialized";
19
+ theme: NotionTheme;
20
+ };
21
+ type InitializedHostState = {
22
+ status: "initialized";
23
+ theme: NotionTheme;
24
+ context: NotionCustomBlockContext;
25
+ dataSources: NotionDataSource[];
26
+ dataSourceState: Record<string, DataSourceQueryState>;
27
+ };
28
+ export declare function subscribeToCustomBlockHost(listener: () => void): () => boolean;
29
+ export declare function getCustomBlockHostState(): CustomBlockHostState;
30
+ export declare function queryCustomBlockDataSource(key: string, limit: number): void;
31
+ /**
32
+ * Apply an `init` payload to the bridge directly, bypassing the postMessage
33
+ * handshake. Used by the React provider when it needs to seed placeholder
34
+ * state (e.g. the standalone preview fallback when not embedded in Notion).
35
+ * The bridge applies the payload through the same code path as a real host.
36
+ */
37
+ export declare function setMockCustomBlockState(message: InitMessage): void;
38
+ /**
39
+ * Resolved value of {@link initCustomBlock} — the host's first `init` payload.
40
+ * `theme`, `context`, and `dataSources` are live values at the moment of init;
41
+ * subscribe via the React hooks (or `subscribeToCustomBlockHost`) to stay
42
+ * updated as the host pushes `themeChanged` / `contextChanged` /
43
+ * `dataSourcesChanged` messages.
44
+ */
45
+ export type CustomBlockInitial = {
46
+ theme: NotionTheme;
47
+ context: NotionCustomBlockContext;
48
+ dataSources: NotionDataSource[];
49
+ };
50
+ /**
51
+ * Thrown by {@link initCustomBlock} when the SDK is loaded in a top-level
52
+ * window (no parent frame) — `postMessage` would just hit the same window and
53
+ * the handshake can never complete. `<NotionCustomBlock>` catches this
54
+ * specifically and falls back to a standalone preview with a warning banner;
55
+ * direct callers can `instanceof` it to apply their own policy.
56
+ */
57
+ export declare class NotInIframeError extends Error {
58
+ constructor(message?: string);
59
+ }
60
+ /**
61
+ * Options for {@link initCustomBlock}.
62
+ */
63
+ export type InitCustomBlockOptions = {
64
+ /**
65
+ * How long to wait for the host's `init` response before rejecting with a
66
+ * `TimeoutError` DOMException. Defaults to 2000 ms — short enough that a
67
+ * misconfigured embed surfaces quickly, long enough to absorb a real host's
68
+ * worst-case init latency.
69
+ */
70
+ timeoutMs?: number;
71
+ };
72
+ /**
73
+ * Performs the SDK ↔ host handshake: loads `custom_blocks.json`, posts
74
+ * `ready`, then awaits the host's first `init` message. Resolves with that
75
+ * payload; rejects with a
76
+ * `TimeoutError` if the host doesn't respond inside `timeoutMs`.
77
+ *
78
+ * Idempotent: subsequent calls return the same promise as the first and
79
+ * ignore any new options. Mount your React tree (or call any SDK hook /
80
+ * `subscribeToCustomBlockHost`) only after the returned promise resolves.
81
+ *
82
+ * @example
83
+ * // src/index.tsx
84
+ * const initial = await initCustomBlock()
85
+ * console.log(initial.theme, initial.context.customBlockId)
86
+ * ReactDOM.createRoot(root).render(<App />)
87
+ */
88
+ export declare function initCustomBlock(opts?: InitCustomBlockOptions): Promise<CustomBlockInitial>;
89
+ /**
90
+ * Resolved page + schema views for a single data source, keyed by raw property
91
+ * ID and by user-defined key. Re-derived from `propertyIdsByKey` on every read so
92
+ * renames don't require a re-query.
93
+ */
94
+ export type DataSourceQueryView = {
95
+ items: NotionDataSourcePage[];
96
+ collectionSchema?: NotionDataSource["collectionSchema"];
97
+ propertySchemasById: {
98
+ [propertyId: string]: NotionPropertySchema;
99
+ };
100
+ propertySchemasByKey: {
101
+ [key: string]: NotionPropertySchema | undefined;
102
+ };
103
+ isLoading: boolean;
104
+ hasMore: boolean;
105
+ error?: string;
106
+ };
107
+ export declare function getDataSourceQueryView(hostState: CustomBlockHostState, key: string): DataSourceQueryView;
108
+ export declare function createPage(input: CreatePageInput): Promise<CreatePageResult>;
109
+ export declare function getPage(pageId: NotionPageId): Promise<GetPageResult>;
110
+ export declare function updatePage(input: UpdatePageInput): Promise<UpdatePageResult>;
111
+ export declare function postCustomBlockResize(height: number): void;
112
+ export {};
113
+ //# sourceMappingURL=notion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notion.d.ts","sourceRoot":"","sources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