create-ncblock 0.0.33 → 0.0.34

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ncblock",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "Create a Notion custom view block project.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,7 +14,7 @@ That writes `custom_blocks.json`, `.notion/target.json`, and PATCHes any blocks
14
14
 
15
15
  ## Talking to the host
16
16
 
17
- - Always use the React hooks from `ncblock`. Never call `window.parent.postMessage` directly — the SDK owns the protocol.
17
+ - Always use the React hooks from `ncblock/react`. Never call `window.parent.postMessage` directly — the SDK owns the protocol.
18
18
  - Render app code inside `<NotionCustomBlock>` so the handshake completes before hooks run.
19
19
  - `<NotionCustomBlock>` runs `useCustomBlockAutoResize` for you by default — no extra wiring needed. Pass `autoResize={false}` for full-bleed views.
20
20
 
package/sdk-version.json CHANGED
@@ -1 +1 @@
1
- {"version":"0.0.31"}
1
+ {"version":"0.0.32"}
@@ -1,16 +1,18 @@
1
1
  import {
2
2
  type NotionCreatePagePosition,
3
- NotionCustomBlock,
4
3
  type NotionCustomBlockContext,
5
4
  type NotionDataSourceId,
6
5
  type NotionPage,
7
6
  type NotionPageId,
8
7
  pages,
8
+ } from "ncblock"
9
+ import {
10
+ NotionCustomBlock,
9
11
  useCurrentUser,
10
12
  useCustomBlockContext,
11
13
  useManifest,
12
14
  useTheme,
13
- } from "ncblock"
15
+ } from "ncblock/react"
14
16
  import React, {
15
17
  Component,
16
18
  useCallback,
@@ -1,4 +1,4 @@
1
- import { NotionCustomBlock } from "ncblock"
1
+ import { NotionCustomBlock } from "ncblock/react"
2
2
  import ReactDOM from "react-dom/client"
3
3
  import "./index.css"
4
4
 
@@ -1,11 +1,10 @@
1
+ import type { NotionDataSourcePage, NotionPageId } from "ncblock"
1
2
  import {
2
3
  NotionCustomBlock,
3
- type NotionDataSourcePage,
4
- type NotionPageId,
5
4
  useDataSource,
6
5
  useManifest,
7
6
  useTheme,
8
- } from "ncblock"
7
+ } from "ncblock/react"
9
8
  import React from "react"
10
9
  import ReactDOM from "react-dom/client"
11
10
 
@@ -7,15 +7,17 @@ import {
7
7
  useReactTable,
8
8
  } from "@tanstack/react-table"
9
9
  import {
10
- NotionCustomBlock,
11
10
  type NotionPagePropertyInputMap,
12
11
  type NotionPagePropertyInputValue,
13
12
  type NotionPropertySchema,
14
13
  pages,
14
+ } from "ncblock"
15
+ import {
16
+ NotionCustomBlock,
15
17
  useDataSource,
16
18
  useManifest,
17
19
  useTheme,
18
- } from "ncblock"
20
+ } from "ncblock/react"
19
21
  import React from "react"
20
22
  import ReactDOM from "react-dom/client"
21
23