File tree Expand file tree Collapse file tree 3 files changed +65
-4
lines changed Expand file tree Collapse file tree 3 files changed +65
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ export default {
2323 // react-notion tester: 2e22de6b770e4166be301490f6ffd420
2424 // equation tester: 2a1d5226d68246deba627012081693f9
2525 // todo tester: 235057194b954a60ace89c052a65d102
26- this .blockMap = await getPageBlocks (" 2e22de6b770e4166be301490f6ffd420" );
26+ // this.blockMap = await getPageBlocks("2e22de6b770e4166be301490f6ffd420"); // Original
27+ this .blockMap = await getPageBlocks (" 4bdce11cd93544e5b96e5b1857cea6dc" ); // Sync block
28+ console .log (" blockMap" , this .blockMap );
2729 },
2830};
2931 </script >
Original file line number Diff line number Diff line change 1+ <template >
2+ <div >
3+ just a test {{ referencePointerId }}
4+ <!-- <NotionRenderer2 name="uniquerenderer" :blockMap="testMap" /> -->
5+ </div >
6+ </template >
7+
8+ <script >
9+ import Blockable , { blockComputed } from " @/lib/blockable" ;
10+ // import NotionRenderer2 from "@/components/notion-renderer";
11+ export default {
12+ extends: Blockable,
13+ name: " NotionSyncPointer" ,
14+ components: {
15+ // NotionRenderer2,
16+ },
17+ computed: {
18+ ... blockComputed,
19+ referencePointerId () {
20+ return this .format ? .transclusion_reference_pointer ? .id ;
21+ },
22+ testMap () {
23+ return {
24+ " 619b49d9-6b25-489d-88ae-8bd47545ec09" : {
25+ role: " reader" ,
26+ value: {
27+ id: " 619b49d9-6b25-489d-88ae-8bd47545ec09" ,
28+ version: 53 ,
29+ type: " header" ,
30+ properties: {
31+ title: [[" New origin sync block" ]],
32+ },
33+ created_time: 1647109620000 ,
34+ last_edited_time: 1647109620000 ,
35+ parent_id: " 4bdce11c-d935-44e5-b96e-5b1857cea6dc" ,
36+ parent_table: " block" ,
37+ alive: true ,
38+ created_by_table: " notion_user" ,
39+ created_by_id: " f0199428-7aba-473e-86b9-eb9f78d896c6" ,
40+ last_edited_by_table: " notion_user" ,
41+ last_edited_by_id: " f0199428-7aba-473e-86b9-eb9f78d896c6" ,
42+ space_id: " a61a30bd-677b-4bab-b5c8-1863fec1f096" ,
43+ },
44+ },
45+ };
46+ },
47+ },
48+ };
49+ < / script>
50+
51+ < style>
52+ < / style>
Original file line number Diff line number Diff line change 3535 v-bind =" pass"
3636 />
3737 <NotionTable v-else-if =" isType('table')" v-bind =" pass" />
38+ <NotionSyncPointer
39+ v-else-if =" isType('transclusion_reference')"
40+ v-bind =" pass"
41+ />
3842 <hr v-else-if =" isType('divider')" class =" notion-hr" />
3943 <div v-else-if =" todo && visible" >
4044 todo: {{ type }}
45+
4146 <slot />
4247 </div >
4348 <!-- todo: maybe add message on !production if block type unsupported -->
@@ -59,11 +64,12 @@ import NotionToggle from "@/blocks/toggle";
5964import NotionQuote from " @/blocks/quote" ;
6065import NotionEquation from " @/blocks/equation" ;
6166import NotionTodo from " @/blocks/todo" ;
62- import NotionTable from ' @/blocks/table'
67+ import NotionTable from " @/blocks/table" ;
68+ import NotionSyncPointer from " @/blocks/sync-pointer" ;
6369
6470export default {
6571 extends: Blockable,
66- name: ' NotionBlock' ,
72+ name: " NotionBlock" ,
6773 components: {
6874 NotionBookmark,
6975 NotionCallout,
@@ -78,7 +84,8 @@ export default {
7884 NotionQuote,
7985 NotionTable,
8086 NotionEquation,
87+ NotionSyncPointer,
8188 NotionTodo,
8289 },
83- }
90+ };
8491 </script >
You can’t perform that action at this time.
0 commit comments