Compare commits

...

62 Commits

Author SHA1 Message Date
Luccas Mateus
a1170e9239 Feature/openlayers map (#967)
* [maps][xl] - working with swc equals to minify

* [maps][xs] - fixing height
2023-07-06 21:02:19 -03:00
João Demenech
299477a717 [openspending, maps][m]: fix build for leaflet map 2023-07-06 17:13:37 -03:00
João Demenech
5e72711629 [components,maps][l]: implements Leaflet map component -- #963 2023-07-03 18:55:43 -03:00
Luccas Mateus de Medeiros Gomes
9ee4376abf [examples/ckan][sm] - fix responsiveness 2023-06-27 07:23:36 -03:00
Ola Rubaj
7ba9b5157e [site/howtos/comments][xs]: rm unneeded link 2023-06-22 11:21:48 +02:00
Ola Rubaj
6c2a1ea125 [site/howtos][m]: mv from datopian/markdownbased 2023-06-22 11:16:12 +02:00
Ola Rubaj
343faf72cf [site/content][s]: mv /howto to /howtos 2023-06-22 11:11:06 +02:00
Ola Rubaj
1eb3f7367b [site/blog][m]: add blog "Create a catalog of anything" 2023-06-22 11:02:23 +02:00
Ola Rubaj
8cdf54397f [package.json][xs]: run mddb before dev 2023-06-22 10:47:38 +02:00
Ola Rubaj
fb94cb9ce9 [site/guide/index.md][s]: adjst tutorials overview 2023-06-22 10:42:34 +02:00
Ola Rubaj
4595cd2231 [site/content/blog][xs]: change title 2023-06-22 10:28:03 +02:00
Ola Rubaj
aa2c8aac04 [site/content/blog][s]: add tutorial on creating a flowershow website
from scratch
2023-06-22 10:20:42 +02:00
Ola Rubaj
f2e5459297 [site/lib/markdown][s]: add support for obsidian style shortened paths 2023-06-22 10:20:11 +02:00
Ola Rubaj
e111adfe73 [site/components/MDXPage][xs]: pass Hero component to mdx 2023-06-22 10:05:22 +02:00
Ola Rubaj
492c21ca4e [site/package.json][xs]: use latest portaljs/core 2023-06-22 10:04:37 +02:00
Ola Rubaj
0581357df8 [site/content][s]: add /guide with home page
- moved from markdownbased repo
2023-06-22 09:57:14 +02:00
João Demenech
15ceeec035 [openspending,stories][xs]: fix typo 2023-06-21 10:10:49 -03:00
João Demenech
1caabcf6b4 [openspending][xs]: bump @portaljs/components version 2023-06-20 19:26:42 -03:00
João Demenech
b548dfd113 Merge pull request #961 from datopian/changeset-release/main
Version Packages
2023-06-20 19:13:57 -03:00
github-actions[bot]
c5ee257d48 Version Packages 2023-06-20 20:32:15 +00:00
João Demenech
8d83f3a900 Merge pull request #960 from datopian/bugfix/linechart-width
[@portaljs/components,line chart][xs]: fix linechart width
2023-06-20 17:29:13 -03:00
João Demenech
add2f6d0f3 [@portaljs/components,line chart][xs]: fix linechart width 2023-06-20 17:12:16 -03:00
github-actions[bot]
dfab6aa318 Version Packages (#959)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-20 17:37:03 +02:00
Rufus Pollock
f96fb562fe Merge pull request #958 from datopian/bespoke-hero 2023-06-20 17:32:43 +02:00
Ola Rubaj
c4bf5bd054 [core/ui/Hero][s]: create Hero component 2023-06-20 15:52:20 +02:00
Ola Rubaj
c706575ae4 Replace @flowershow/* with @portaljs/* packages in /examples (#953)
* [examples/ckan][m]: rplc @flowershow with @portaljs packages

* [examples/fivethirtyeight][m]: rplc @flowershow with @portaljs packages

* [examples/turing][m]: rplc @flowershow with @portaljs packages

* [examples/openspending][m]: rplc @flowershow with @portaljs packages

* [examples/learn][m]: rplc @flowershow with @portaljs packages

* [examples/github-backed-catalog][m]: rplc @flowershow with @portaljs packages

* [examples/github-backed-catalog][xs] - fix build

* [examples][m] - fix builds

* [examples/openspending][xs] - fix build

---------

Co-authored-by: Luccas Mateus de Medeiros Gomes <luccasmmg@gmail.com>
2023-06-16 09:13:54 -03:00
João Demenech
ed8de380a9 Merge pull request #950 from datopian/site-deps-update
Replace `@flowershow/*` with `@portaljs/*` packages in /site
2023-06-16 09:04:42 -03:00
João Demenech
33521916d6 [site,blog,#944][xs]: update titles of blog posts 2023-06-15 17:28:12 -03:00
João Demenech
04206457a4 [openspending,contributing][xs]: add link to issue tracker 2023-06-13 19:08:20 -03:00
João Demenech
8a5acb7012 Merge pull request #952 from datopian/openspending/moers-anomaly
OpenSpending: Moers Anomaly story
2023-06-13 19:03:36 -03:00
João Demenech
32493a2014 [openspending,stories][xs]: fix data url 2023-06-13 19:00:00 -03:00
Michael Polidori
b34220cac7 Merge pull request #951 from datopian/openspending/berlin-erdf-data-driven-story
OpenSpending - Berlin ERDF spendings data-driven story
2023-06-13 15:22:15 -04:00
Michael Polidori
44b37e27d9 Add Moers Anomaly story 2023-06-13 15:20:48 -04:00
João Demenech
6d3e571151 [openspending,stories][m]: fix typo 2023-06-13 12:42:01 -03:00
João Demenech
0e997f71e5 [openspending,stories][m]: add new data-driven story about Berlin 2023-06-13 12:39:02 -03:00
olayway
4a41d517ee [package.json][xs]: rm prerelease script
Handling this in projects package.json files.
2023-06-13 17:12:53 +02:00
olayway
c79b69ffe6 [site/package.json][s]: bump @portaljs packages 2023-06-13 12:33:54 +02:00
olayway
2ad6551a44 [site][s]: @flowershow/remark-wiki-link -> @portaljs/remark-wiki-link 2023-06-13 12:33:54 +02:00
olayway
5de9888c02 [site][s]: @flowershow/remark-embed -> @portaljs/remark-embed 2023-06-13 12:33:54 +02:00
olayway
5a517d714a [blog/markdowndb-basics][xs]: typo fix 2023-06-13 12:33:52 +02:00
olayway
746c77de11 [site][s]: @flowershow/markdowndb -> mddb 2023-06-13 12:32:29 +02:00
olayway
9e256b9bf1 [site][s]: @flowershow/remark-callouts -> @portaljs/remark-callouts 2023-06-13 12:32:29 +02:00
olayway
4bfcd4373b [site][s]: @flowershow/core -> @portaljs/core 2023-06-13 12:32:29 +02:00
github-actions[bot]
6649f78459 Version Packages (#949)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-13 12:14:38 +02:00
olayway
6f0da8c3a3 [packages][s]: fix public api of remark-* and core packages 2023-06-13 12:11:33 +02:00
olayway
5b1238cc27 [.gitignore][xs]: ignore .tgz files 2023-06-13 12:11:33 +02:00
João Demenech
17803f1f5d [site,blog,#944][m]: add Ola's author info, fix typo in blogs list 2023-06-12 15:17:18 -03:00
João Demenech
81f50bb9a2 Merge pull request #945 from datopian/openspending/frankfort-education
OpenSpending: Frankfurt Education story
2023-06-12 14:38:22 -03:00
João Demenech
f1aee6a93e [openspending,stories][xs]: update file references to point to storage and add authors 2023-06-12 14:34:40 -03:00
João Demenech
053005d784 [openspending,stories][xs]: update file references to point to storage and update story slug 2023-06-12 14:32:05 -03:00
github-actions[bot]
2f5dd4d0f7 Version Packages (#946)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-12 18:46:54 +02:00
olayway
fb7ce8723a [.changeset][xs]: adjst changeset message 2023-06-12 18:42:55 +02:00
olayway
7636c3d26c [package-lock][xs]: sync lock file 2023-06-12 18:35:15 +02:00
olayway
6bf6c8faf4 [core][s]: bump mdx-mermaid and mv to peers 2023-06-12 18:31:35 +02:00
Michael Polidori
095eba606e Update story 2023-06-12 11:58:26 -04:00
Michael Polidori
1097b5077d Add Frankfurt Education story 2023-06-12 11:53:55 -04:00
olayway
aa365cbb0d [blog/markdowndb-basics][xs]: rplc @flowershow/markdowndb with mddb 2023-06-12 16:42:44 +02:00
olayway
038427874a [howto/markdown][xs]: rplc @flowershow/markdowndb with mddb 2023-06-12 16:41:13 +02:00
João Demenech
bdfdb2e6a5 [openspending,drd][xs]: fix FlatUiTable error on first data-driven story 2023-06-09 19:27:45 -03:00
João Demenech
95b3fc03d3 [openspending,drd][xs]: remove sample data-driven story 2023-06-09 18:39:06 -03:00
github-actions[bot]
6aeadd71de Version Packages (#942)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-09 00:16:30 +02:00
olayway
affca05058 [remark-callouts/package.json][xs]: fix export path 2023-06-09 00:12:03 +02:00
135 changed files with 13424 additions and 7128 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@
dist dist
tmp tmp
/out-tsc /out-tsc
**/*.tgz
# dependencies # dependencies
node_modules node_modules

View File

@@ -10,6 +10,7 @@
"dependencies": { "dependencies": {
"@heroicons/react": "^2.0.17", "@heroicons/react": "^2.0.17",
"@portaljs/ckan": "^0.0.2", "@portaljs/ckan": "^0.0.2",
"@portaljs/remark-wiki-link": "^1.0.4",
"next": "13.3.1", "next": "13.3.1",
"next-seo": "^6.0.0", "next-seo": "^6.0.0",
"octokit": "^2.0.14", "octokit": "^2.0.14",
@@ -35,7 +36,6 @@
"version": "7.21.0", "version": "7.21.0",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz",
"integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==",
"dev": true,
"dependencies": { "dependencies": {
"regenerator-runtime": "^0.13.11" "regenerator-runtime": "^0.13.11"
}, },
@@ -732,6 +732,16 @@
"react-dom": "^18.2.0" "react-dom": "^18.2.0"
} }
}, },
"node_modules/@portaljs/remark-wiki-link": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@portaljs/remark-wiki-link/-/remark-wiki-link-1.0.4.tgz",
"integrity": "sha512-cp6vlssDAPawcBI0vUPRpcPdORql3RbK1Q+t1LuRvMQ+yiRb+9DnSPBUviDXKqwsBMOOXP/ePAdYohaeXGt0lQ==",
"dependencies": {
"mdast-util-to-markdown": "^1.5.0",
"mdast-util-wiki-link": "^0.0.2",
"micromark-util-symbol": "^1.0.1"
}
},
"node_modules/@rushstack/eslint-patch": { "node_modules/@rushstack/eslint-patch": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz", "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz",
@@ -1420,6 +1430,24 @@
"url": "https://github.com/sponsors/wooorm" "url": "https://github.com/sponsors/wooorm"
} }
}, },
"node_modules/character-entities-legacy": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz",
"integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/character-reference-invalid": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz",
"integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/chokidar": { "node_modules/chokidar": {
"version": "3.5.3", "version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
@@ -2888,6 +2916,28 @@
"node": ">= 0.4" "node": ">= 0.4"
} }
}, },
"node_modules/is-alphabetical": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz",
"integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/is-alphanumerical": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz",
"integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==",
"dependencies": {
"is-alphabetical": "^1.0.0",
"is-decimal": "^1.0.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/is-arguments": { "node_modules/is-arguments": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
@@ -3019,6 +3069,15 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/is-decimal": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz",
"integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/is-docker": { "node_modules/is-docker": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
@@ -3055,6 +3114,15 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/is-hexadecimal": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz",
"integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/is-map": { "node_modules/is-map": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz",
@@ -3727,6 +3795,59 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/mdast-util-wiki-link": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/mdast-util-wiki-link/-/mdast-util-wiki-link-0.0.2.tgz",
"integrity": "sha512-lSsR10/dPuYIxzjGZIGA4oYzsnEnqcsD6DTXL0pqdbBzNB9teKVZB2aIzZcUsdg31v/NoHOstkVwzbN6VrQLtw==",
"dependencies": {
"@babel/runtime": "^7.12.1",
"mdast-util-to-markdown": "^0.6.5"
}
},
"node_modules/mdast-util-wiki-link/node_modules/longest-streak": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz",
"integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/mdast-util-wiki-link/node_modules/mdast-util-to-markdown": {
"version": "0.6.5",
"resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz",
"integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==",
"dependencies": {
"@types/unist": "^2.0.0",
"longest-streak": "^2.0.0",
"mdast-util-to-string": "^2.0.0",
"parse-entities": "^2.0.0",
"repeat-string": "^1.0.0",
"zwitch": "^1.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-wiki-link/node_modules/mdast-util-to-string": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz",
"integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/mdast-util-wiki-link/node_modules/zwitch": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz",
"integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/merge2": { "node_modules/merge2": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -4714,6 +4835,32 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/parse-entities": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz",
"integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==",
"dependencies": {
"character-entities": "^1.0.0",
"character-entities-legacy": "^1.0.0",
"character-reference-invalid": "^1.0.0",
"is-alphanumerical": "^1.0.0",
"is-decimal": "^1.0.0",
"is-hexadecimal": "^1.0.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/parse-entities/node_modules/character-entities": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz",
"integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/path-exists": { "node_modules/path-exists": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -5083,8 +5230,7 @@
"node_modules/regenerator-runtime": { "node_modules/regenerator-runtime": {
"version": "0.13.11", "version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
"dev": true
}, },
"node_modules/regexp.prototype.flags": { "node_modules/regexp.prototype.flags": {
"version": "1.5.0", "version": "1.5.0",
@@ -5147,6 +5293,14 @@
"url": "https://opencollective.com/unified" "url": "https://opencollective.com/unified"
} }
}, },
"node_modules/repeat-string": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
"integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==",
"engines": {
"node": ">=0.10"
}
},
"node_modules/resolve": { "node_modules/resolve": {
"version": "1.22.2", "version": "1.22.2",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",

View File

@@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"@heroicons/react": "^2.0.17", "@heroicons/react": "^2.0.17",
"@portaljs/ckan": "^0.0.2", "@portaljs/ckan": "^0.0.2",
"@portaljs/remark-wiki-link": "^1.0.4",
"next": "13.3.1", "next": "13.3.1",
"next-seo": "^6.0.0", "next-seo": "^6.0.0",
"octokit": "^2.0.14", "octokit": "^2.0.14",

View File

@@ -1,6 +1,6 @@
import { MDXRemote } from 'next-mdx-remote'; import { MDXRemote } from 'next-mdx-remote';
import dynamic from 'next/dynamic'; import dynamic from 'next/dynamic';
import { Mermaid } from '@flowershow/core'; import { Mermaid } from '@portaljs/core';
// Custom components/renderers to pass to MDX. // Custom components/renderers to pass to MDX.
// Since the MDX files aren't loaded by webpack, they have no knowledge of how // Since the MDX files aren't loaded by webpack, they have no knowledge of how

View File

@@ -1,13 +1,13 @@
import matter from "gray-matter"; import matter from "gray-matter";
import mdxmermaid from "mdx-mermaid"; import mdxmermaid from "mdx-mermaid";
import { h } from "hastscript"; import { h } from "hastscript";
import remarkCallouts from "@flowershow/remark-callouts"; import remarkCallouts from "@portaljs/remark-callouts";
import remarkEmbed from "@flowershow/remark-embed"; import remarkEmbed from "@portaljs/remark-embed";
import remarkGfm from "remark-gfm"; import remarkGfm from "remark-gfm";
import remarkMath from "remark-math"; import remarkMath from "remark-math";
import remarkSmartypants from "remark-smartypants"; import remarkSmartypants from "remark-smartypants";
import remarkToc from "remark-toc"; import remarkToc from "remark-toc";
import remarkWikiLink from "@flowershow/remark-wiki-link"; import remarkWikiLink from "@portaljs/remark-wiki-link";
import rehypeAutolinkHeadings from "rehype-autolink-headings"; import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeKatex from "rehype-katex"; import rehypeKatex from "rehype-katex";
import rehypeSlug from "rehype-slug"; import rehypeSlug from "rehype-slug";

View File

@@ -1,4 +1,4 @@
import { MarkdownDB } from "@flowershow/markdowndb"; import { MarkdownDB } from "mddb";
const dbPath = "markdown.db"; const dbPath = "markdown.db";

File diff suppressed because it is too large Load Diff

View File

@@ -11,14 +11,14 @@
"mddb": "mddb ./content" "mddb": "mddb ./content"
}, },
"dependencies": { "dependencies": {
"@flowershow/core": "^0.4.13",
"@flowershow/markdowndb": "^0.1.5",
"@flowershow/remark-callouts": "^1.0.0",
"@flowershow/remark-embed": "^1.0.0",
"@githubocto/flat-ui": "^0.14.1", "@githubocto/flat-ui": "^0.14.1",
"@heroicons/react": "^2.0.18", "@heroicons/react": "^2.0.18",
"@portaljs/ckan": "^0.0.2", "@portaljs/ckan": "^0.0.2",
"@portaljs/components": "0.1.6", "@portaljs/components": "0.1.6",
"@portaljs/core": "^1.0.5",
"@portaljs/remark-callouts": "^1.0.5",
"@portaljs/remark-embed": "^1.0.4",
"@portaljs/remark-wiki-link": "^1.0.4",
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"@types/node": "20.2.3", "@types/node": "20.2.3",
"@types/react": "18.2.6", "@types/react": "18.2.6",
@@ -27,6 +27,7 @@
"eslint": "8.41.0", "eslint": "8.41.0",
"eslint-config-next": "13.4.3", "eslint-config-next": "13.4.3",
"isomorphic-unfetch": "^4.0.2", "isomorphic-unfetch": "^4.0.2",
"mddb": "^0.1.9",
"next": "13.4.3", "next": "13.4.3",
"next-mdx-remote": "^4.4.1", "next-mdx-remote": "^4.4.1",
"papaparse": "^5.4.1", "papaparse": "^5.4.1",

View File

@@ -40,16 +40,25 @@ export default function Home({
}); });
return ( return (
<main className="flex min-h-screen flex-col items-center p-24 bg-zinc-900"> <div>
<main className="py-12 bg-zinc-900">
<DatasetSearchForm <DatasetSearchForm
options={options} options={options}
setOptions={setOptions} setOptions={setOptions}
groups={groups} groups={groups}
orgs={orgs} orgs={orgs}
/> />
<div className="bg-white p-8 my-4 rounded-lg"> <div
<ListOfDatasets options={options} setOptions={setOptions} ckan={ckan} />{' '} className="bg-white p-8 mx-auto my-4 rounded-lg"
style={{ width: 'min(1100px, 95vw)' }}
>
<ListOfDatasets
options={options}
setOptions={setOptions}
ckan={ckan}
/>{' '}
</div> </div>
</main> </main>
</div>
); );
} }

View File

@@ -2,7 +2,7 @@
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
@import "@flowershow/remark-callouts/styles.css"; @import "@portaljs/remark-callouts/styles.css";
/* mathjax */ /* mathjax */
.math-inline > mjx-container > svg { .math-inline > mjx-container > svg {

File diff suppressed because it is too large Load Diff

View File

@@ -9,10 +9,11 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"@flowershow/core": "^0.4.13",
"@headlessui/react": "^1.7.14", "@headlessui/react": "^1.7.14",
"@heroicons/react": "^2.0.18", "@heroicons/react": "^2.0.18",
"@portaljs/components": "^0.1.8", "@portaljs/components": "^0.1.8",
"@portaljs/core": "^1.0.5",
"@portaljs/remark-wiki-link": "^1.0.4",
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"@types/node": "20.1.1", "@types/node": "20.1.1",
"@types/react": "18.2.6", "@types/react": "18.2.6",

View File

@@ -1,7 +1,7 @@
import '@/styles/globals.css'; import '@/styles/globals.css';
import '@portaljs/components/styles.css'; import '@portaljs/components/styles.css';
import { useEffect } from 'react'; import { useEffect } from 'react';
import { pageview } from '@flowershow/core'; import { pageview } from '@portaljs/core';
import Script from 'next/script'; import Script from 'next/script';
import Head from 'next/head'; import Head from 'next/head';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';

View File

@@ -1,6 +1,6 @@
import { MDXRemote } from 'next-mdx-remote'; import { MDXRemote } from 'next-mdx-remote';
import dynamic from 'next/dynamic'; import dynamic from 'next/dynamic';
import { Mermaid } from '@flowershow/core'; import { Mermaid } from '@portaljs/core';
// Custom components/renderers to pass to MDX. // Custom components/renderers to pass to MDX.
// Since the MDX files aren't loaded by webpack, they have no knowledge of how // Since the MDX files aren't loaded by webpack, they have no knowledge of how

View File

@@ -1,13 +1,13 @@
import matter from "gray-matter"; import matter from "gray-matter";
import mdxmermaid from "mdx-mermaid"; import mdxmermaid from "mdx-mermaid";
import { h } from "hastscript"; import { h } from "hastscript";
import remarkCallouts from "@flowershow/remark-callouts"; import remarkCallouts from "@portaljs/remark-callouts";
import remarkEmbed from "@flowershow/remark-embed"; import remarkEmbed from "@portaljs/remark-embed";
import remarkGfm from "remark-gfm"; import remarkGfm from "remark-gfm";
import remarkMath from "remark-math"; import remarkMath from "remark-math";
import remarkSmartypants from "remark-smartypants"; import remarkSmartypants from "remark-smartypants";
import remarkToc from "remark-toc"; import remarkToc from "remark-toc";
import remarkWikiLink from "@flowershow/remark-wiki-link"; import remarkWikiLink from "@portaljs/remark-wiki-link";
import rehypeAutolinkHeadings from "rehype-autolink-headings"; import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeKatex from "rehype-katex"; import rehypeKatex from "rehype-katex";
import rehypeSlug from "rehype-slug"; import rehypeSlug from "rehype-slug";

View File

@@ -1,4 +1,4 @@
import { MarkdownDB } from "@flowershow/markdowndb"; import { MarkdownDB } from "mddb";
const dbPath = "markdown.db"; const dbPath = "markdown.db";

View File

@@ -8,16 +8,17 @@
"name": "my-app", "name": "my-app",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@flowershow/core": "^0.4.13",
"@flowershow/markdowndb": "^0.1.5",
"@flowershow/remark-callouts": "^1.0.0",
"@flowershow/remark-embed": "^1.0.0",
"@portaljs/components": "^0.1.6", "@portaljs/components": "^0.1.6",
"@portaljs/core": "^1.0.5",
"@portaljs/remark-callouts": "^1.0.5",
"@portaljs/remark-embed": "^1.0.4",
"@portaljs/remark-wiki-link": "^1.0.4",
"@types/node": "18.16.0", "@types/node": "18.16.0",
"@types/react": "18.0.38", "@types/react": "18.0.38",
"@types/react-dom": "18.0.11", "@types/react-dom": "18.0.11",
"eslint": "8.39.0", "eslint": "8.39.0",
"eslint-config-next": "13.3.1", "eslint-config-next": "13.3.1",
"mddb": "^0.1.9",
"next": "13.4.3", "next": "13.4.3",
"next-mdx-remote": "^4.4.1", "next-mdx-remote": "^4.4.1",
"next-seo": "^6.0.0", "next-seo": "^6.0.0",
@@ -45,19 +46,31 @@
} }
}, },
"node_modules/@algolia/autocomplete-core": { "node_modules/@algolia/autocomplete-core": {
"version": "1.8.2", "version": "1.9.2",
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.8.2.tgz", "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.2.tgz",
"integrity": "sha512-mTeshsyFhAqw/ebqNsQpMtbnjr+qVOSKXArEj4K0d7sqc8It1XD0gkASwecm9mF/jlOQ4Z9RNg1HbdA8JPdRwQ==", "integrity": "sha512-hkG80c9kx9ClVAEcUJbTd2ziVC713x9Bji9Ty4XJfKXlxlsx3iXsoNhAwfeR4ulzIUg7OE5gez0UU1zVDdG7kg==",
"dependencies": { "dependencies": {
"@algolia/autocomplete-shared": "1.8.2" "@algolia/autocomplete-plugin-algolia-insights": "1.9.2",
"@algolia/autocomplete-shared": "1.9.2"
}
},
"node_modules/@algolia/autocomplete-plugin-algolia-insights": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.2.tgz",
"integrity": "sha512-2LVsf4W66hVHQ3Ua/8k15oPlxjELCztbAkQm/hP42Sw+GLkHAdY1vaVRYziaWq64+Oljfg6FKkZHCdgXH+CGIA==",
"dependencies": {
"@algolia/autocomplete-shared": "1.9.2"
},
"peerDependencies": {
"search-insights": ">= 1 < 3"
} }
}, },
"node_modules/@algolia/autocomplete-preset-algolia": { "node_modules/@algolia/autocomplete-preset-algolia": {
"version": "1.8.2", "version": "1.9.2",
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.8.2.tgz", "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.2.tgz",
"integrity": "sha512-J0oTx4me6ZM9kIKPuL3lyU3aB8DEvpVvR6xWmHVROx5rOYJGQcZsdG4ozxwcOyiiu3qxMkIbzntnV1S1VWD8yA==", "integrity": "sha512-pqgIm2GNqtCT59Y1ICctIPrYTi34+wNPiNWEclD/yDzp5uDUUsyGe5XrUjCNyQRTKonAlmYxoaEHOn8FWgmBHA==",
"dependencies": { "dependencies": {
"@algolia/autocomplete-shared": "1.8.2" "@algolia/autocomplete-shared": "1.9.2"
}, },
"peerDependencies": { "peerDependencies": {
"@algolia/client-search": ">= 4.9.1 < 6", "@algolia/client-search": ">= 4.9.1 < 6",
@@ -65,123 +78,127 @@
} }
}, },
"node_modules/@algolia/autocomplete-shared": { "node_modules/@algolia/autocomplete-shared": {
"version": "1.8.2", "version": "1.9.2",
"resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.8.2.tgz", "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.2.tgz",
"integrity": "sha512-b6Z/X4MczChMcfhk6kfRmBzPgjoPzuS9KGR4AFsiLulLNRAAqhP+xZTKtMnZGhLuc61I20d5WqlId02AZvcO6g==" "integrity": "sha512-XxX6YDn+7LG+SmdpXEOnj7fc3TjiVpQ0CbGhjLwrd2tYr6LVY2D4Iiu/iuYJ4shvVDWWnpwArSk0uIWC/8OPUA==",
"peerDependencies": {
"@algolia/client-search": ">= 4.9.1 < 6",
"algoliasearch": ">= 4.9.1 < 6"
}
}, },
"node_modules/@algolia/cache-browser-local-storage": { "node_modules/@algolia/cache-browser-local-storage": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.17.2.tgz",
"integrity": "sha512-e91Jpu93X3t3mVdQwF3ZDjSFMFIfzSc+I76G4EX8nl9RYXgqcjframoL05VTjcD2YCsI18RIHAWVCBoCXVZnrw==", "integrity": "sha512-ZkVN7K/JE+qMQbpR6h3gQOGR6yCJpmucSBCmH5YDxnrYbp2CbrVCu0Nr+FGVoWzMJNznj1waShkfQ9awERulLw==",
"dependencies": { "dependencies": {
"@algolia/cache-common": "4.17.1" "@algolia/cache-common": "4.17.2"
} }
}, },
"node_modules/@algolia/cache-common": { "node_modules/@algolia/cache-common": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.17.2.tgz",
"integrity": "sha512-fvi1WT8aSiGAKrcTw8Qg3RYgcwW8GZMHcqEm4AyDBEy72JZlFBSY80cTQ75MslINjCHXLDT+9EN8AGI9WVY7uA==" "integrity": "sha512-fojbhYIS8ovfYs6hwZpy1O4mBfVRxNgAaZRqsdVQd54hU4MxYDYFCxagYX28lOBz7btcDHld6BMoWXvjzkx6iQ=="
}, },
"node_modules/@algolia/cache-in-memory": { "node_modules/@algolia/cache-in-memory": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.17.2.tgz",
"integrity": "sha512-NbBt6eBWlsXc5geSpfPRC5dkIB/0Ptthw8r0yM5Z7D3sPlYdnTZSO9y9XWXIptRMwmZe4cM8iBMN8y0tzbcBkA==", "integrity": "sha512-UYQcMzPurNi+cPYkuPemTZkjKAjdgAS1hagC5irujKbrYnN4yscK4TkOI5tX+O8/KegtJt3kOK07OIrJ2QDAAw==",
"dependencies": { "dependencies": {
"@algolia/cache-common": "4.17.1" "@algolia/cache-common": "4.17.2"
} }
}, },
"node_modules/@algolia/client-account": { "node_modules/@algolia/client-account": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.17.2.tgz",
"integrity": "sha512-3rL/6ofJvyL+q8TiWM3qoM9tig+SY4gB1Vbsj+UeJPnJm8Khm+7OS+r+mFraqR6pTehYqN8yGYoE7x4diEn4aA==", "integrity": "sha512-doSk89pBPDpDyKJSHFADIGa2XSGrBCj3QwPvqtRJXDADpN+OjW+eTR8r4hEs/7X4GGfjfAOAES8JgDx+fZntYw==",
"dependencies": { "dependencies": {
"@algolia/client-common": "4.17.1", "@algolia/client-common": "4.17.2",
"@algolia/client-search": "4.17.1", "@algolia/client-search": "4.17.2",
"@algolia/transporter": "4.17.1" "@algolia/transporter": "4.17.2"
} }
}, },
"node_modules/@algolia/client-analytics": { "node_modules/@algolia/client-analytics": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.17.2.tgz",
"integrity": "sha512-Bepr2w249vODqeBtM7i++tPmUsQ9B81aupUGbDWmjA/FX+jzQqOdhW8w1CFO5kWViNKTbz2WBIJ9U3x8hOa4bA==", "integrity": "sha512-V+DcXbOtD/hKwAR3qGQrtlrJ3q2f9OKfx843q744o4m3xHv5ueCAvGXB1znPsdaUrVDNAImcgEgqwI9x7EJbDw==",
"dependencies": { "dependencies": {
"@algolia/client-common": "4.17.1", "@algolia/client-common": "4.17.2",
"@algolia/client-search": "4.17.1", "@algolia/client-search": "4.17.2",
"@algolia/requester-common": "4.17.1", "@algolia/requester-common": "4.17.2",
"@algolia/transporter": "4.17.1" "@algolia/transporter": "4.17.2"
} }
}, },
"node_modules/@algolia/client-common": { "node_modules/@algolia/client-common": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.17.2.tgz",
"integrity": "sha512-+r7kg4EgbFnGsDnoGSVNtXZO8xvZ0vzf1WAOV7sqV9PMf1bp6cpJP/3IuPrSk4t5w2KVl+pC8jfTM7HcFlfBEQ==", "integrity": "sha512-gKBUnjxi0ukJYIJxVREYGt1Dmj1B3RBYbfGWi0dIPp1BC1VvQm+BOuNwsIwmq/x3MPO+sGuK978eKiP3tZDvag==",
"dependencies": { "dependencies": {
"@algolia/requester-common": "4.17.1", "@algolia/requester-common": "4.17.2",
"@algolia/transporter": "4.17.1" "@algolia/transporter": "4.17.2"
} }
}, },
"node_modules/@algolia/client-personalization": { "node_modules/@algolia/client-personalization": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.17.2.tgz",
"integrity": "sha512-gJku9DG/THJpfsSlG/az0a3QIn+VVff9kKh8PG8+7ZfxOHS+C+Y5YSeZVsC+c2cfoKLPo3CuHIiJ/p86erR3bA==", "integrity": "sha512-wc4UgOWxSYWz5wpuelNmlt895jA9twjZWM2ms17Ws8qCvBHF7OVGdMGgbysPB8790YnfvvDnSsWOv3CEj26Eow==",
"dependencies": { "dependencies": {
"@algolia/client-common": "4.17.1", "@algolia/client-common": "4.17.2",
"@algolia/requester-common": "4.17.1", "@algolia/requester-common": "4.17.2",
"@algolia/transporter": "4.17.1" "@algolia/transporter": "4.17.2"
} }
}, },
"node_modules/@algolia/client-search": { "node_modules/@algolia/client-search": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.17.2.tgz",
"integrity": "sha512-Q5YfT5gVkx60PZDQBqp/zH9aUbBdC7HVvxupiHUgnCKqRQsRZjOhLest7AI6FahepuZLBZS62COrO7v+JvKY7w==", "integrity": "sha512-FUjIs+gRe0upJC++uVs4sdxMw15JxfkT86Gr/kqVwi9kcqaZhXntSbW/Fw959bIYXczjmeVQsilYvBWW4YvSZA==",
"dependencies": { "dependencies": {
"@algolia/client-common": "4.17.1", "@algolia/client-common": "4.17.2",
"@algolia/requester-common": "4.17.1", "@algolia/requester-common": "4.17.2",
"@algolia/transporter": "4.17.1" "@algolia/transporter": "4.17.2"
} }
}, },
"node_modules/@algolia/logger-common": { "node_modules/@algolia/logger-common": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.17.2.tgz",
"integrity": "sha512-Us28Ot+fLEmX9M96sa65VZ8EyEEzhYPxfhV9aQyKDjfXbUdJlJxKt6wZpoEg9RAPSdO8IjK9nmuW2P8au3rRsg==" "integrity": "sha512-EfXuweUE+1HiSMsQidaDWA5Lv4NnStYIlh7PO5pLkI+sdhbMX0e5AO5nUAMIFM1VkEANes70RA8fzhP6OqCqQQ=="
}, },
"node_modules/@algolia/logger-console": { "node_modules/@algolia/logger-console": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.17.2.tgz",
"integrity": "sha512-iKGQTpOjHiE64W3JIOu6dmDvn+AfYIElI9jf/Nt6umRPmP/JI9rK+OHUoW4pKrBtdG0DPd62ppeNXzSnLxY6/g==", "integrity": "sha512-JuG8HGVlJ+l/UEDK4h2Y8q/IEmRjQz1J0aS9tf6GPNbGYiSvMr1DDdZ+hqV3bb1XE6wU8Ypex56HisWMSpnG0A==",
"dependencies": { "dependencies": {
"@algolia/logger-common": "4.17.1" "@algolia/logger-common": "4.17.2"
} }
}, },
"node_modules/@algolia/requester-browser-xhr": { "node_modules/@algolia/requester-browser-xhr": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.17.2.tgz",
"integrity": "sha512-W5mGfGDsyfVR+r4pUFrYLGBEM18gs38+GNt5PE5uPULy4uVTSnnVSkJkWeRkmLBk9zEZ/Nld8m4zavK6dtEuYg==", "integrity": "sha512-FKI2lYWwksALfRt2OETFmGb5+P7WVc4py2Ai3H7k8FSfTLwVvs9WVVmtlx6oANQ8RFEK4B85h8DQJTJ29TDfmA==",
"dependencies": { "dependencies": {
"@algolia/requester-common": "4.17.1" "@algolia/requester-common": "4.17.2"
} }
}, },
"node_modules/@algolia/requester-common": { "node_modules/@algolia/requester-common": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.17.2.tgz",
"integrity": "sha512-HggXdjvVFQR0I5l7hM5WdHgQ1tqcRWeyXZz8apQ7zPWZhirmY2E9D6LVhDh/UnWQNEm7nBtM+eMFONJ3bZccIQ==" "integrity": "sha512-Rfim23ztAhYpE9qm+KCfCRo+YLJCjiiTG+IpDdzUjMpYPhUtirQT0A35YEd/gKn86YNyydxS9w8iRSjwKh+L0A=="
}, },
"node_modules/@algolia/requester-node-http": { "node_modules/@algolia/requester-node-http": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.17.2.tgz",
"integrity": "sha512-NzFWecXT6d0PPsQY9L+/qoK2deF74OLcpvqCH+Vh3mh+QzPsFafcBExdguAjZsAWDn1R6JEeFW7/fo/p0SE57w==", "integrity": "sha512-E0b0kyCDMvUIhQmDNd/mH4fsKJdEEX6PkMKrYJjzm6moo+rP22tqpq4Rfe7DZD8OB6/LsDD3zs3Kvd+L+M5wwQ==",
"dependencies": { "dependencies": {
"@algolia/requester-common": "4.17.1" "@algolia/requester-common": "4.17.2"
} }
}, },
"node_modules/@algolia/transporter": { "node_modules/@algolia/transporter": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.17.1.tgz", "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.17.2.tgz",
"integrity": "sha512-ZM+qhX47Vh46mWH8/U9ihvy98HdTYpYQDSlqBD7IbiUbbyoCMke+qmdSX2MGhR2FCcXBSxejsJKKVAfbpaLVgg==", "integrity": "sha512-m8pXlz5OnNzjD1rcw+duCN4jG4yEzkJBsvKYMoN22Oq6rQwy1AY5muZ+IQUs4dL+A364CYkRMLRWhvXpCZ1x+g==",
"dependencies": { "dependencies": {
"@algolia/cache-common": "4.17.1", "@algolia/cache-common": "4.17.2",
"@algolia/logger-common": "4.17.1", "@algolia/logger-common": "4.17.2",
"@algolia/requester-common": "4.17.1" "@algolia/requester-common": "4.17.2"
} }
}, },
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
@@ -353,18 +370,18 @@
"integrity": "sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg==" "integrity": "sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg=="
}, },
"node_modules/@docsearch/css": { "node_modules/@docsearch/css": {
"version": "3.4.0", "version": "3.5.0",
"resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.4.0.tgz", "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.0.tgz",
"integrity": "sha512-Hg8Xfma+rFwRi6Y/pfei4FJoQ1hdVURmmNs/XPoMTCPAImU+d5yxj+M+qdLtNjWRpfWziU4dQcqY94xgFBn2dg==" "integrity": "sha512-Ob5FQLubplcBNihAVtriR59FRBeP8u69F6mu4L4yIr60KfsPc10bOV0DoPErJw0zF9IBN2cNLW9qdmt8zWPxyg=="
}, },
"node_modules/@docsearch/react": { "node_modules/@docsearch/react": {
"version": "3.4.0", "version": "3.5.0",
"resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.4.0.tgz", "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.5.0.tgz",
"integrity": "sha512-ufrp5879XYGojgS30ZAp8H4qIMbahRHB9M85VDBP36Xgz5QjYM54i1URKj5e219F7gqTtOivfztFTij6itc0MQ==", "integrity": "sha512-3IG8mmSMzSHNGy2S1VuPyYU9tFCxFpj5Ov8SYwsSHM4yMvFsaO9oFxXocA5lSenliIELhuOuS5+BdxHa/Qlf2A==",
"dependencies": { "dependencies": {
"@algolia/autocomplete-core": "1.8.2", "@algolia/autocomplete-core": "1.9.2",
"@algolia/autocomplete-preset-algolia": "1.8.2", "@algolia/autocomplete-preset-algolia": "1.9.2",
"@docsearch/css": "3.4.0", "@docsearch/css": "3.5.0",
"algoliasearch": "^4.0.0" "algoliasearch": "^4.0.0"
}, },
"peerDependencies": { "peerDependencies": {
@@ -573,16 +590,16 @@
} }
}, },
"node_modules/@floating-ui/core": { "node_modules/@floating-ui/core": {
"version": "1.2.6", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.2.6.tgz", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.3.0.tgz",
"integrity": "sha512-EvYTiXet5XqweYGClEmpu3BoxmsQ4hkj3QaYA6qEnigCWffTP3vNRwBReTdrwDwo7OoJ3wM8Uoe9Uk4n+d4hfg==" "integrity": "sha512-vX1WVAdPjZg9DkDkC+zEx/tKtnST6/qcNpwcjeBgco3XRNHz5PUA+ivi/yr6G3o0kMR60uKBJcfOdfzOFI7PMQ=="
}, },
"node_modules/@floating-ui/dom": { "node_modules/@floating-ui/dom": {
"version": "1.2.8", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.2.8.tgz", "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.3.0.tgz",
"integrity": "sha512-XLwhYV90MxiHDq6S0rzFZj00fnDM+A1R9jhSioZoMsa7G0Q0i+Q4x40ajR8FHSdYDE1bgjG45mIWe6jtv9UPmg==", "integrity": "sha512-qIAwejE3r6NeA107u4ELDKkH8+VtgRKdXqtSPaKflL2S2V+doyN+Wt9s5oHKXPDo4E8TaVXaHT3+6BbagH31xw==",
"dependencies": { "dependencies": {
"@floating-ui/core": "^1.2.6" "@floating-ui/core": "^1.3.0"
} }
}, },
"node_modules/@floating-ui/react-dom": { "node_modules/@floating-ui/react-dom": {
@@ -612,103 +629,6 @@
"react-dom": ">=16.8.0" "react-dom": ">=16.8.0"
} }
}, },
"node_modules/@flowershow/core": {
"version": "0.4.13",
"resolved": "https://registry.npmjs.org/@flowershow/core/-/core-0.4.13.tgz",
"integrity": "sha512-UeDb70pjUGgILUXGQKFkytKL9ilwsTIM3jYsNNi55PKHXAaHEQA480Y+m2yNPgC5SzFlGj0FIP/zhH0JfBdNiw==",
"dependencies": {
"@docsearch/react": "^3.3.3",
"@floating-ui/react-dom": "^1.3.0",
"@floating-ui/react-dom-interactions": "^0.13.3",
"@giscus/react": "^2.2.6",
"@headlessui/react": "^1.7.12",
"clsx": "^1.2.1",
"disqus-react": "^1.1.5",
"framer-motion": "^10.0.1",
"kbar": "0.1.0-beta.40",
"mdx-mermaid": "2.0.0-rc7",
"mermaid": "10.0.1-rc.2",
"prop-types": "^15.8.1"
},
"peerDependencies": {
"next": "^13.2.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"node_modules/@flowershow/core/node_modules/dagre-d3-es": {
"version": "7.0.8",
"resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.8.tgz",
"integrity": "sha512-eykdoYQ4FwCJinEYS0gPL2f2w+BPbSLvnQSJ3Ye1vAoPjdkq6xIMKBv+UkICd3qZE26wBKIn3p+6n0QC7R1LyA==",
"dependencies": {
"d3": "^7.8.2",
"lodash-es": "^4.17.21"
}
},
"node_modules/@flowershow/core/node_modules/dompurify": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.3.tgz",
"integrity": "sha512-q6QaLcakcRjebxjg8/+NP+h0rPfatOgOzc46Fst9VAA3jF2ApfKBNKMzdP4DYTqtUMXSCd5pRS/8Po/OmoCHZQ=="
},
"node_modules/@flowershow/core/node_modules/mermaid": {
"version": "10.0.1-rc.2",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.0.1-rc.2.tgz",
"integrity": "sha512-THnhraO9F6pQZY9Nv91QuWv35QdmZy/UW2FpadRN/1cLuqCyihNKIEOxuVLEPrgtFawt2nL+BpUoJKC4div3UQ==",
"dependencies": {
"@braintree/sanitize-url": "^6.0.0",
"cytoscape": "^3.23.0",
"cytoscape-cose-bilkent": "^4.1.0",
"cytoscape-fcose": "^2.1.0",
"d3": "^7.4.0",
"dagre-d3-es": "7.0.8",
"dompurify": "2.4.3",
"elkjs": "^0.8.2",
"khroma": "^2.0.0",
"lodash-es": "^4.17.21",
"moment-mini": "^2.29.4",
"non-layered-tidy-tree-layout": "^2.0.2",
"stylis": "^4.1.2",
"ts-dedent": "^2.2.0",
"uuid": "^9.0.0",
"web-worker": "^1.2.0"
}
},
"node_modules/@flowershow/markdowndb": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/@flowershow/markdowndb/-/markdowndb-0.1.5.tgz",
"integrity": "sha512-AfmkvgitNb7z150bTcCn/1lqwUhPRD3IhCbIwYxE5IXtL57+WwewJUNOU3SOKXNWg6eDVlfEq0H2GICSLAC4bw==",
"dependencies": {
"@flowershow/remark-wiki-link": "^1.1.2",
"gray-matter": "^4.0.3",
"knex": "^2.4.2",
"remark-gfm": "^3.0.1",
"remark-parse": "^10.0.1",
"sqlite3": "^5.1.6",
"unist-util-select": "^4.0.3"
},
"bin": {
"mddb": "src/bin/index.js"
}
},
"node_modules/@flowershow/remark-callouts": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@flowershow/remark-callouts/-/remark-callouts-1.0.0.tgz",
"integrity": "sha512-zzHDpw1bswTTf+cbhNh2Bogf4ghpIcxAypFxYZxZ/afeGdN3NNSQwnamL8StY9uu6aQ/miq4Egbuof3xk2ksWA==",
"dependencies": {
"mdast-util-from-markdown": "^1.2.0",
"svg-parser": "^2.0.4",
"unist-util-visit": "^4.1.0"
}
},
"node_modules/@flowershow/remark-embed": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@flowershow/remark-embed/-/remark-embed-1.0.0.tgz",
"integrity": "sha512-tADovIrhbmNWJj72C+pgT921+BuApmO6xxKU3HlWciRHkD6S4KqsikLjsopalK+VJmqluoHhhST0kf0S6xUKIA==",
"dependencies": {
"unist-util-visit": "^4.1.1"
}
},
"node_modules/@flowershow/remark-wiki-link": { "node_modules/@flowershow/remark-wiki-link": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/@flowershow/remark-wiki-link/-/remark-wiki-link-1.2.0.tgz", "resolved": "https://registry.npmjs.org/@flowershow/remark-wiki-link/-/remark-wiki-link-1.2.0.tgz",
@@ -1701,9 +1621,9 @@
} }
}, },
"node_modules/@headlessui/react": { "node_modules/@headlessui/react": {
"version": "1.7.14", "version": "1.7.15",
"resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.14.tgz", "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.15.tgz",
"integrity": "sha512-znzdq9PG8rkwcu9oQ2FwIy0ZFtP9Z7ycS+BAqJ3R5EIqC/0bJGvhT7193rFf+45i9nnPsYvCQVW4V/bB9Xc+gA==", "integrity": "sha512-OTO0XtoRQ6JPB1cKNFYBZv2Q0JMqMGNhYP1CjPvcJvjz8YGokz8oAj89HIYZGN0gZzn/4kk9iUpmMF4Q21Gsqw==",
"dependencies": { "dependencies": {
"client-only": "^0.0.1" "client-only": "^0.0.1"
}, },
@@ -1807,9 +1727,9 @@
"integrity": "sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ==" "integrity": "sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ=="
}, },
"node_modules/@lit/reactive-element": { "node_modules/@lit/reactive-element": {
"version": "1.6.1", "version": "1.6.2",
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.1.tgz", "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.2.tgz",
"integrity": "sha512-va15kYZr7KZNNPZdxONGQzpUr+4sxVu7V/VG7a8mRfPPXUyhEYj5RzXCQmGrlP3tAh0L3HHm5AjBMFYRqlM9SA==", "integrity": "sha512-rDfl+QnCYjuIGf5xI2sVJWdYIi56CTCwWa+nidKYX6oIuBYwUbT/vX4qbUDlHiZKJ/3FRNQ/tWJui44p6/stSA==",
"dependencies": { "dependencies": {
"@lit-labs/ssr-dom-shim": "^1.0.0" "@lit-labs/ssr-dom-shim": "^1.0.0"
} }
@@ -2444,6 +2364,60 @@
"react-dom": "^18.2.0" "react-dom": "^18.2.0"
} }
}, },
"node_modules/@portaljs/core": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@portaljs/core/-/core-1.0.5.tgz",
"integrity": "sha512-HJ3eYjyKL7wrPlBwcEHzNd/SW2PwLu49nAsRTz8r7tgyRINDVkHTLVjZ5V6jCSYtuX7LSlxk0WMIZ9aDOocXDA==",
"dependencies": {
"@docsearch/react": "^3.3.3",
"@floating-ui/react-dom": "^1.3.0",
"@floating-ui/react-dom-interactions": "^0.13.3",
"@giscus/react": "^2.2.6",
"@headlessui/react": "^1.7.12",
"clsx": "^1.2.1",
"core-js": "^3.30.2",
"disqus-react": "^1.1.5",
"framer-motion": "^10.0.1",
"kbar": "0.1.0-beta.40",
"mermaid": "^10.2.2",
"prop-types": "^15.8.1"
},
"peerDependencies": {
"mdx-mermaid": "2.0.0-rc7",
"next": "^13.2.1",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"node_modules/@portaljs/remark-callouts": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@portaljs/remark-callouts/-/remark-callouts-1.0.5.tgz",
"integrity": "sha512-KMjr44isEvQzpNBBCP3s5/3TCmI/ce4xRvbOk6h9xicVZqE6BPTH9rhfOGvop9cchyAWgj9gmJXhQk+Bd+t5bg==",
"dependencies": {
"mdast-util-from-markdown": "^1.2.0",
"svg-parser": "^2.0.4",
"unist-util-visit": "^4.1.0"
}
},
"node_modules/@portaljs/remark-embed": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@portaljs/remark-embed/-/remark-embed-1.0.4.tgz",
"integrity": "sha512-BvRMC1iBd5M93u9WS0mvunHoBMWgQQTCR7RdqSS9sRav5pqquiNG7il12Yza4vFpFBXwLkzEG0NwIVXzzutT8w==",
"dependencies": {
"unist-util-visit": "^4.1.1"
}
},
"node_modules/@portaljs/remark-wiki-link": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@portaljs/remark-wiki-link/-/remark-wiki-link-1.0.4.tgz",
"integrity": "sha512-cp6vlssDAPawcBI0vUPRpcPdORql3RbK1Q+t1LuRvMQ+yiRb+9DnSPBUviDXKqwsBMOOXP/ePAdYohaeXGt0lQ==",
"dependencies": {
"mdast-util-to-markdown": "^1.5.0",
"mdast-util-wiki-link": "^0.0.2",
"micromark-util-symbol": "^1.0.1"
}
},
"node_modules/@primer/octicons-react": { "node_modules/@primer/octicons-react": {
"version": "12.1.0", "version": "12.1.0",
"resolved": "https://registry.npmjs.org/@primer/octicons-react/-/octicons-react-12.1.0.tgz", "resolved": "https://registry.npmjs.org/@primer/octicons-react/-/octicons-react-12.1.0.tgz",
@@ -2474,27 +2448,43 @@
"integrity": "sha512-Z8R0kdAZui8eYTuGY5oQUA0SU4jYq43m4bZW6Dw0B35fUp+U3r+pCrkj0EADJAPv1UaKNskSv/lrfRdC7719Rg==" "integrity": "sha512-Z8R0kdAZui8eYTuGY5oQUA0SU4jYq43m4bZW6Dw0B35fUp+U3r+pCrkj0EADJAPv1UaKNskSv/lrfRdC7719Rg=="
}, },
"node_modules/@radix-ui/react-compose-refs": { "node_modules/@radix-ui/react-compose-refs": {
"version": "1.0.0", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz", "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.1.tgz",
"integrity": "sha512-0KaSv6sx787/hK3eF53iOkiSLwAGlFMx5lotrqD2pTjB18KbybKoEIgkNZTKC60YECDQTKGTRcDBILwZVqVKvA==", "integrity": "sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.13.10" "@babel/runtime": "^7.13.10"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0" "react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
} }
}, },
"node_modules/@radix-ui/react-portal": { "node_modules/@radix-ui/react-portal": {
"version": "1.0.2", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.2.tgz", "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.0.3.tgz",
"integrity": "sha512-swu32idoCW7KA2VEiUZGBSu9nB6qwGdV6k6HYhUoOo3M1FFpD+VgLzUqtt3mwL1ssz7r2x8MggpLSQach2Xy/Q==", "integrity": "sha512-xLYZeHrWoPmA5mEKEfZZevoVRK/Q43GfzRXkWV6qawIWWK8t6ifIiLQdd7rmQ4Vk1bmI21XhqF9BN3jWf+phpA==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.13.10", "@babel/runtime": "^7.13.10",
"@radix-ui/react-primitive": "1.0.2" "@radix-ui/react-primitive": "1.0.3"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0", "react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0" "react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
} }
}, },
"node_modules/@radix-ui/react-presence": { "node_modules/@radix-ui/react-presence": {
@@ -2517,28 +2507,44 @@
} }
}, },
"node_modules/@radix-ui/react-primitive": { "node_modules/@radix-ui/react-primitive": {
"version": "1.0.2", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.2.tgz", "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-1.0.3.tgz",
"integrity": "sha512-zY6G5Qq4R8diFPNwtyoLRZBxzu1Z+SXMlfYpChN7Dv8gvmx9X3qhDqiLWvKseKVJMuedFeU/Sa0Sy/Ia+t06Dw==", "integrity": "sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.13.10", "@babel/runtime": "^7.13.10",
"@radix-ui/react-slot": "1.0.1" "@radix-ui/react-slot": "1.0.2"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0", "react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0" "react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
} }
}, },
"node_modules/@radix-ui/react-slot": { "node_modules/@radix-ui/react-slot": {
"version": "1.0.1", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.1.tgz", "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz",
"integrity": "sha512-avutXAFL1ehGvAXtPquu0YK5oz6ctS474iM3vNGQIkswrVhdrS52e3uoMQBzZhNRAIE0jBnUyXWNmSjGHhCFcw==", "integrity": "sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.13.10", "@babel/runtime": "^7.13.10",
"@radix-ui/react-compose-refs": "1.0.0" "@radix-ui/react-compose-refs": "1.0.1"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0" "react": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
} }
}, },
"node_modules/@radix-ui/rect": { "node_modules/@radix-ui/rect": {
@@ -2862,6 +2868,7 @@
"resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"@types/node": "*" "@types/node": "*"
} }
@@ -3078,24 +3085,24 @@
} }
}, },
"node_modules/algoliasearch": { "node_modules/algoliasearch": {
"version": "4.17.1", "version": "4.17.2",
"resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.17.1.tgz", "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.17.2.tgz",
"integrity": "sha512-4GDQ1RhP2qUR3x8PevFRbEdqZqIARNViZYjgTJmA1T7wRNtFA3W4Aqc/RsODqa1J8IO/QDla5x4tWuUS8NV8wA==", "integrity": "sha512-VFu43JJNYIW74awp7oeQcQsPcxOhd8psqBDTfyNO2Zt6L1NqnNMTVnaIdQ+8dtKqUDBqQZp0szPxECvX8CK2Fg==",
"dependencies": { "dependencies": {
"@algolia/cache-browser-local-storage": "4.17.1", "@algolia/cache-browser-local-storage": "4.17.2",
"@algolia/cache-common": "4.17.1", "@algolia/cache-common": "4.17.2",
"@algolia/cache-in-memory": "4.17.1", "@algolia/cache-in-memory": "4.17.2",
"@algolia/client-account": "4.17.1", "@algolia/client-account": "4.17.2",
"@algolia/client-analytics": "4.17.1", "@algolia/client-analytics": "4.17.2",
"@algolia/client-common": "4.17.1", "@algolia/client-common": "4.17.2",
"@algolia/client-personalization": "4.17.1", "@algolia/client-personalization": "4.17.2",
"@algolia/client-search": "4.17.1", "@algolia/client-search": "4.17.2",
"@algolia/logger-common": "4.17.1", "@algolia/logger-common": "4.17.2",
"@algolia/logger-console": "4.17.1", "@algolia/logger-console": "4.17.2",
"@algolia/requester-browser-xhr": "4.17.1", "@algolia/requester-browser-xhr": "4.17.2",
"@algolia/requester-common": "4.17.1", "@algolia/requester-common": "4.17.2",
"@algolia/requester-node-http": "4.17.1", "@algolia/requester-node-http": "4.17.2",
"@algolia/transporter": "4.17.1" "@algolia/transporter": "4.17.2"
} }
}, },
"node_modules/ansi-regex": { "node_modules/ansi-regex": {
@@ -3402,7 +3409,8 @@
"url": "https://feross.org/support" "url": "https://feross.org/support"
} }
], ],
"optional": true "optional": true,
"peer": true
}, },
"node_modules/before-after-hook": { "node_modules/before-after-hook": {
"version": "2.2.3", "version": "2.2.3",
@@ -3430,6 +3438,7 @@
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"buffer": "^5.5.0", "buffer": "^5.5.0",
"inherits": "^2.0.4", "inherits": "^2.0.4",
@@ -3532,6 +3541,7 @@
} }
], ],
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"base64-js": "^1.3.1", "base64-js": "^1.3.1",
"ieee754": "^1.1.13" "ieee754": "^1.1.13"
@@ -3542,6 +3552,7 @@
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
"optional": true, "optional": true,
"peer": true,
"engines": { "engines": {
"node": "*" "node": "*"
} }
@@ -3905,6 +3916,16 @@
"toggle-selection": "^1.0.6" "toggle-selection": "^1.0.6"
} }
}, },
"node_modules/core-js": {
"version": "3.31.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.31.0.tgz",
"integrity": "sha512-NIp2TQSGfR6ba5aalZD+ZQ1fSxGhDo/s1w0nx3RYzf2pnJxt7YynxFlFScP6eV7+GZsKO95NSjGxyJsU3DZgeQ==",
"hasInstallScript": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/core-js"
}
},
"node_modules/cose-base": { "node_modules/cose-base": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz", "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz",
@@ -3933,6 +3954,7 @@
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz",
"integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"node-fetch": "2.6.7" "node-fetch": "2.6.7"
} }
@@ -3942,6 +3964,7 @@
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"whatwg-url": "^5.0.0" "whatwg-url": "^5.0.0"
}, },
@@ -4080,9 +4103,9 @@
"integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==" "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg=="
}, },
"node_modules/d3": { "node_modules/d3": {
"version": "7.8.4", "version": "7.8.5",
"resolved": "https://registry.npmjs.org/d3/-/d3-7.8.4.tgz", "resolved": "https://registry.npmjs.org/d3/-/d3-7.8.5.tgz",
"integrity": "sha512-q2WHStdhiBtD8DMmhDPyJmXUxr6VWRngKyiJ5EfXMxPw+tqT6BhNjhJZ4w3BHsNm3QoVfZLY8Orq/qPFczwKRA==", "integrity": "sha512-JgoahDG51ncUfJu6wX/1vWQEqOflgXyl4MaHqlcSruTez7yhaRKR9i8VjjcQGeS2en/jnFivXuaIMnseMMt0XA==",
"dependencies": { "dependencies": {
"d3-array": "3", "d3-array": "3",
"d3-axis": "3", "d3-axis": "3",
@@ -4489,7 +4512,6 @@
"version": "7.0.10", "version": "7.0.10",
"resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.10.tgz", "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.10.tgz",
"integrity": "sha512-qTCQmEhcynucuaZgY5/+ti3X/rnszKZhEQH/ZdWdtP1tA/y3VoHJzcVrO9pjjJCNpigfscAtoUB5ONcd2wNn0A==", "integrity": "sha512-qTCQmEhcynucuaZgY5/+ti3X/rnszKZhEQH/ZdWdtP1tA/y3VoHJzcVrO9pjjJCNpigfscAtoUB5ONcd2wNn0A==",
"peer": true,
"dependencies": { "dependencies": {
"d3": "^7.8.2", "d3": "^7.8.2",
"lodash-es": "^4.17.21" "lodash-es": "^4.17.21"
@@ -4516,10 +4538,9 @@
} }
}, },
"node_modules/dayjs": { "node_modules/dayjs": {
"version": "1.11.7", "version": "1.11.8",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.8.tgz",
"integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==", "integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ=="
"peer": true
}, },
"node_modules/debug": { "node_modules/debug": {
"version": "4.3.4", "version": "4.3.4",
@@ -4685,7 +4706,8 @@
"version": "0.0.1045489", "version": "0.0.1045489",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz", "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1045489.tgz",
"integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==", "integrity": "sha512-D+PTmWulkuQW4D1NTiCRCFxF7pQPn0hgp4YyX4wAQ6xYXKOadSWPR3ENGDQ47MW/Ewc9v2rpC/UEEGahgBYpSQ==",
"optional": true "optional": true,
"peer": true
}, },
"node_modules/didyoumean": { "node_modules/didyoumean": {
"version": "1.2.2", "version": "1.2.2",
@@ -4739,8 +4761,7 @@
"node_modules/dompurify": { "node_modules/dompurify": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.3.tgz", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.3.tgz",
"integrity": "sha512-axQ9zieHLnAnHh0sfAamKYiqXMJAVwu+LM/alQ7WDagoWessyWvMSFyW65CqF3owufNu8HBcE4cM2Vflu7YWcQ==", "integrity": "sha512-axQ9zieHLnAnHh0sfAamKYiqXMJAVwu+LM/alQ7WDagoWessyWvMSFyW65CqF3owufNu8HBcE4cM2Vflu7YWcQ=="
"peer": true
}, },
"node_modules/downshift": { "node_modules/downshift": {
"version": "6.1.12", "version": "6.1.12",
@@ -4807,6 +4828,7 @@
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"once": "^1.4.0" "once": "^1.4.0"
} }
@@ -5521,6 +5543,7 @@
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
"integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"debug": "^4.1.1", "debug": "^4.1.1",
"get-stream": "^5.1.0", "get-stream": "^5.1.0",
@@ -5615,6 +5638,7 @@
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
"integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"pend": "~1.2.0" "pend": "~1.2.0"
} }
@@ -5749,7 +5773,8 @@
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"optional": true "optional": true,
"peer": true
}, },
"node_modules/fs-extra": { "node_modules/fs-extra": {
"version": "10.1.0", "version": "10.1.0",
@@ -5884,6 +5909,7 @@
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
"integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"pump": "^3.0.0" "pump": "^3.0.0"
}, },
@@ -6456,7 +6482,8 @@
"url": "https://feross.org/support" "url": "https://feross.org/support"
} }
], ],
"optional": true "optional": true,
"peer": true
}, },
"node_modules/ignore": { "node_modules/ignore": {
"version": "5.2.4", "version": "5.2.4",
@@ -7350,9 +7377,9 @@
} }
}, },
"node_modules/lit": { "node_modules/lit": {
"version": "2.7.4", "version": "2.7.5",
"resolved": "https://registry.npmjs.org/lit/-/lit-2.7.4.tgz", "resolved": "https://registry.npmjs.org/lit/-/lit-2.7.5.tgz",
"integrity": "sha512-cgD7xrZoYr21mbrkZIuIrj98YTMw/snJPg52deWVV4A8icLyNHI3bF70xsJeAgwTuiq5Kkd+ZR8gybSJDCPB7g==", "integrity": "sha512-i/cH7Ye6nBDUASMnfwcictBnsTN91+aBjXoTHF2xARghXScKxpD4F4WYI+VLXg9lqbMinDfvoI7VnZXjyHgdfQ==",
"dependencies": { "dependencies": {
"@lit/reactive-element": "^1.6.0", "@lit/reactive-element": "^1.6.0",
"lit-element": "^3.3.0", "lit-element": "^3.3.0",
@@ -7993,6 +8020,23 @@
"url": "https://github.com/sponsors/wooorm" "url": "https://github.com/sponsors/wooorm"
} }
}, },
"node_modules/mddb": {
"version": "0.1.9",
"resolved": "https://registry.npmjs.org/mddb/-/mddb-0.1.9.tgz",
"integrity": "sha512-d3B5zArnWDqKN1Blq6hGtfr3HTHUKK/GS95b4OZqcyDPvUP4JnYuWHDjyoJ0tSgDKH6ybB6WdnnI3tcHQvRTyw==",
"dependencies": {
"@flowershow/remark-wiki-link": "^1.1.2",
"gray-matter": "^4.0.3",
"knex": "^2.4.2",
"remark-gfm": "^3.0.1",
"remark-parse": "^10.0.1",
"sqlite3": "^5.1.6",
"unist-util-select": "^4.0.3"
},
"bin": {
"mddb": "dist/src/bin/index.js"
}
},
"node_modules/mdn-data": { "node_modules/mdn-data": {
"version": "2.0.14", "version": "2.0.14",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
@@ -8002,6 +8046,7 @@
"version": "2.0.0-rc7", "version": "2.0.0-rc7",
"resolved": "https://registry.npmjs.org/mdx-mermaid/-/mdx-mermaid-2.0.0-rc7.tgz", "resolved": "https://registry.npmjs.org/mdx-mermaid/-/mdx-mermaid-2.0.0-rc7.tgz",
"integrity": "sha512-AMy3138EsvcGwE4cGqUVytj4mLpJ3TJ2nek82+67Qi4GSOXoelAqmQudHSk26IsP091c3qX4d/4wi9CqLwFl9Q==", "integrity": "sha512-AMy3138EsvcGwE4cGqUVytj4mLpJ3TJ2nek82+67Qi4GSOXoelAqmQudHSk26IsP091c3qX4d/4wi9CqLwFl9Q==",
"peer": true,
"optionalDependencies": { "optionalDependencies": {
"estree-util-to-js": "^1.1.0", "estree-util-to-js": "^1.1.0",
"estree-util-visit": "^1.2.0", "estree-util-visit": "^1.2.0",
@@ -8032,10 +8077,9 @@
} }
}, },
"node_modules/mermaid": { "node_modules/mermaid": {
"version": "10.2.0", "version": "10.2.3",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.2.0.tgz", "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.2.3.tgz",
"integrity": "sha512-mYKXlH9ngKdMsJ87VYMdlDZXS+MXDAGKPf3XzDf2vvAPnmRoFm7GFebemOAOWYI1bWSECDyoWTGwesWe6mW1Cw==", "integrity": "sha512-cMVE5s9PlQvOwfORkyVpr5beMsLdInrycAosdr+tpZ0WFjG4RJ/bUHST7aTgHNJbujHkdBRAm+N50P3puQOfPw==",
"peer": true,
"dependencies": { "dependencies": {
"@braintree/sanitize-url": "^6.0.2", "@braintree/sanitize-url": "^6.0.2",
"cytoscape": "^3.23.0", "cytoscape": "^3.23.0",
@@ -8899,7 +8943,8 @@
"version": "0.5.3", "version": "0.5.3",
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
"optional": true "optional": true,
"peer": true
}, },
"node_modules/modern-normalize": { "node_modules/modern-normalize": {
"version": "1.1.0", "version": "1.1.0",
@@ -8912,11 +8957,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/moment-mini": {
"version": "2.29.4",
"resolved": "https://registry.npmjs.org/moment-mini/-/moment-mini-2.29.4.tgz",
"integrity": "sha512-uhXpYwHFeiTbY9KSgPPRoo1nt8OxNVdMVoTBYHfSEKeRkIkwGpO+gERmhuhBtzfaeOyTkykSrm2+noJBgqt3Hg=="
},
"node_modules/mri": { "node_modules/mri": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
@@ -9641,7 +9681,8 @@
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
"optional": true "optional": true,
"peer": true
}, },
"node_modules/periscopic": { "node_modules/periscopic": {
"version": "3.1.0", "version": "3.1.0",
@@ -9850,6 +9891,7 @@
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"optional": true, "optional": true,
"peer": true,
"engines": { "engines": {
"node": ">=0.4.0" "node": ">=0.4.0"
} }
@@ -9896,13 +9938,15 @@
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"optional": true "optional": true,
"peer": true
}, },
"node_modules/pump": { "node_modules/pump": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"end-of-stream": "^1.1.0", "end-of-stream": "^1.1.0",
"once": "^1.3.1" "once": "^1.3.1"
@@ -9923,6 +9967,7 @@
"deprecated": "< 19.4.0 is no longer supported", "deprecated": "< 19.4.0 is no longer supported",
"hasInstallScript": true, "hasInstallScript": true,
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"https-proxy-agent": "5.0.1", "https-proxy-agent": "5.0.1",
"progress": "2.0.3", "progress": "2.0.3",
@@ -9938,6 +9983,7 @@
"resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-18.2.1.tgz", "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-18.2.1.tgz",
"integrity": "sha512-MRtTAZfQTluz3U2oU/X2VqVWPcR1+94nbA2V6ZrSZRVEwLqZ8eclZ551qGFQD/vD2PYqHJwWOW/fpC721uznVw==", "integrity": "sha512-MRtTAZfQTluz3U2oU/X2VqVWPcR1+94nbA2V6ZrSZRVEwLqZ8eclZ551qGFQD/vD2PYqHJwWOW/fpC721uznVw==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"cross-fetch": "3.1.5", "cross-fetch": "3.1.5",
"debug": "4.3.4", "debug": "4.3.4",
@@ -10804,6 +10850,15 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/search-insights": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.6.0.tgz",
"integrity": "sha512-vU2/fJ+h/Mkm/DJOe+EaM5cafJv/1rRTZpGJTuFPf/Q5LjzgMDsqPdSaZsAe+GAWHHsfsu+rQSAn6c8IGtBEVw==",
"peer": true,
"engines": {
"node": ">=8.16.0"
}
},
"node_modules/section-matter": { "node_modules/section-matter": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz",
@@ -11403,6 +11458,7 @@
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"chownr": "^1.1.1", "chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2", "mkdirp-classic": "^0.5.2",
@@ -11414,13 +11470,15 @@
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
"optional": true "optional": true,
"peer": true
}, },
"node_modules/tar-stream": { "node_modules/tar-stream": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"bl": "^4.0.3", "bl": "^4.0.3",
"end-of-stream": "^1.4.1", "end-of-stream": "^1.4.1",
@@ -11484,7 +11542,8 @@
"version": "2.3.8", "version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
"optional": true "optional": true,
"peer": true
}, },
"node_modules/tildify": { "node_modules/tildify": {
"version": "2.0.0", "version": "2.0.0",
@@ -11867,6 +11926,7 @@
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
"integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"buffer": "^5.2.1", "buffer": "^5.2.1",
"through": "^2.3.8" "through": "^2.3.8"
@@ -12880,6 +12940,7 @@
"resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
"integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==", "integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
"optional": true, "optional": true,
"peer": true,
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"
}, },
@@ -12955,6 +13016,7 @@
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"buffer-crc32": "~0.2.3", "buffer-crc32": "~0.2.3",
"fd-slicer": "~1.1.0" "fd-slicer": "~1.1.0"

View File

@@ -10,16 +10,17 @@
"prettier": "prettier --write ." "prettier": "prettier --write ."
}, },
"dependencies": { "dependencies": {
"@flowershow/core": "^0.4.13",
"@flowershow/markdowndb": "^0.1.5",
"@flowershow/remark-callouts": "^1.0.0",
"@flowershow/remark-embed": "^1.0.0",
"@portaljs/components": "^0.1.6", "@portaljs/components": "^0.1.6",
"@portaljs/core": "^1.0.5",
"@portaljs/remark-callouts": "^1.0.5",
"@portaljs/remark-embed": "^1.0.4",
"@portaljs/remark-wiki-link": "^1.0.4",
"@types/node": "18.16.0", "@types/node": "18.16.0",
"@types/react": "18.0.38", "@types/react": "18.0.38",
"@types/react-dom": "18.0.11", "@types/react-dom": "18.0.11",
"eslint": "8.39.0", "eslint": "8.39.0",
"eslint-config-next": "13.3.1", "eslint-config-next": "13.3.1",
"mddb": "^0.1.9",
"next": "13.4.3", "next": "13.4.3",
"next-mdx-remote": "^4.4.1", "next-mdx-remote": "^4.4.1",
"next-seo": "^6.0.0", "next-seo": "^6.0.0",

View File

@@ -79,7 +79,7 @@ pre {
width: 100%; width: 100%;
} }
@import "@flowershow/remark-callouts/styles.css"; @import "@portaljs/remark-callouts/styles.css";
/* mathjax */ /* mathjax */
.math-inline > mjx-container > svg { .math-inline > mjx-container > svg {

View File

@@ -1,6 +1,6 @@
import { MDXRemote } from 'next-mdx-remote'; import { MDXRemote } from 'next-mdx-remote';
import dynamic from 'next/dynamic'; import dynamic from 'next/dynamic';
import { Mermaid } from '@flowershow/core'; import { Mermaid } from '@portaljs/core';
// Custom components/renderers to pass to MDX. // Custom components/renderers to pass to MDX.
// Since the MDX files aren't loaded by webpack, they have no knowledge of how // Since the MDX files aren't loaded by webpack, they have no knowledge of how

View File

@@ -1,13 +1,13 @@
import matter from "gray-matter"; import matter from "gray-matter";
import mdxmermaid from "mdx-mermaid"; import mdxmermaid from "mdx-mermaid";
import { h } from "hastscript"; import { h } from "hastscript";
import remarkCallouts from "@flowershow/remark-callouts"; import remarkCallouts from "@portaljs/remark-callouts";
import remarkEmbed from "@flowershow/remark-embed"; import remarkEmbed from "@portaljs/remark-embed";
import remarkGfm from "remark-gfm"; import remarkGfm from "remark-gfm";
import remarkMath from "remark-math"; import remarkMath from "remark-math";
import remarkSmartypants from "remark-smartypants"; import remarkSmartypants from "remark-smartypants";
import remarkToc from "remark-toc"; import remarkToc from "remark-toc";
import remarkWikiLink from "@flowershow/remark-wiki-link"; import remarkWikiLink from "@portaljs/remark-wiki-link";
import rehypeAutolinkHeadings from "rehype-autolink-headings"; import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeKatex from "rehype-katex"; import rehypeKatex from "rehype-katex";
import rehypeSlug from "rehype-slug"; import rehypeSlug from "rehype-slug";

View File

@@ -1,4 +1,4 @@
import { MarkdownDB } from "@flowershow/markdowndb"; import { MarkdownDB } from "mddb";
const dbPath = "markdown.db"; const dbPath = "markdown.db";

View File

@@ -0,0 +1,5 @@
const nextConfig = {
swcMinify: false
}
module.exports = nextConfig

File diff suppressed because it is too large Load Diff

View File

@@ -12,17 +12,28 @@
"mddb": "mddb ./content" "mddb": "mddb ./content"
}, },
"dependencies": { "dependencies": {
"@flowershow/core": "^0.4.10", "@githubocto/flat-ui": "^0.14.1",
"@flowershow/markdowndb": "^0.1.1", "@heroicons/react": "^2.0.17",
"@flowershow/remark-callouts": "^1.0.0",
"@flowershow/remark-embed": "^1.0.0",
"@flowershow/remark-wiki-link": "^1.1.2",
"@opentelemetry/api": "^1.4.0", "@opentelemetry/api": "^1.4.0",
"@portaljs/components": "^0.1.8", "@portaljs/components": "^0.1.8",
"@portaljs/core": "^1.0.5",
"@portaljs/remark-callouts": "^1.0.5",
"@portaljs/remark-embed": "^1.0.4",
"@portaljs/remark-wiki-link": "^1.0.4",
"@tanstack/react-table": "^8.8.5",
"flexsearch": "0.7.21",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"hastscript": "^7.2.0", "hastscript": "^7.2.0",
"mddb": "^0.1.9",
"mdx-mermaid": "2.0.0-rc7", "mdx-mermaid": "2.0.0-rc7",
"next": "13.2.1", "next": "13.2.1",
"next-mdx-remote": "^4.4.1",
"papaparse": "^5.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.43.9",
"react-query": "^3.39.3",
"react-vega": "^7.6.0",
"rehype-autolink-headings": "^6.1.1", "rehype-autolink-headings": "^6.1.1",
"rehype-katex": "^6.0.3", "rehype-katex": "^6.0.3",
"rehype-prism-plus": "^1.5.1", "rehype-prism-plus": "^1.5.1",
@@ -32,17 +43,6 @@
"remark-smartypants": "^2.0.0", "remark-smartypants": "^2.0.0",
"remark-toc": "^8.0.1", "remark-toc": "^8.0.1",
"typescript": "5.0.4", "typescript": "5.0.4",
"@githubocto/flat-ui": "^0.14.1",
"@heroicons/react": "^2.0.17",
"@tanstack/react-table": "^8.8.5",
"flexsearch": "0.7.21",
"next-mdx-remote": "^4.4.1",
"papaparse": "^5.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.43.9",
"react-query": "^3.39.3",
"react-vega": "^7.6.0",
"vega": "5.25.0", "vega": "5.25.0",
"vega-lite": "5.1.0" "vega-lite": "5.1.0"
}, },

View File

@@ -1,7 +1,7 @@
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
@import "@flowershow/remark-callouts/styles.css"; @import "@portaljs/remark-callouts/styles.css";
.w-5 { .w-5 {
width: 1.25rem width: 1.25rem

View File

@@ -1,6 +1,6 @@
import { MDXRemote } from 'next-mdx-remote'; import { MDXRemote } from 'next-mdx-remote';
import dynamic from 'next/dynamic'; import dynamic from 'next/dynamic';
import { Mermaid } from '@flowershow/core'; import { Mermaid } from '@portaljs/core';
// Custom components/renderers to pass to MDX. // Custom components/renderers to pass to MDX.
// Since the MDX files aren't loaded by webpack, they have no knowledge of how // Since the MDX files aren't loaded by webpack, they have no knowledge of how

View File

@@ -16,6 +16,8 @@ We welcome contributions from anyone who is interested in improving OpenSpending
The main platform for communication and collaboration for OpenSpending is Github, if you want to interact with us you can o so by submitting an issue. The main platform for communication and collaboration for OpenSpending is Github, if you want to interact with us you can o so by submitting an issue.
**Repo for issues:** [https://github.com/os-data/registry/issues](https://github.com/os-data/registry/issues)
If you want to submit a dataset for evaluation and inclusion in OpenSpending, you will need to create an issue on Github using this template: If you want to submit a dataset for evaluation and inclusion in OpenSpending, you will need to create an issue on Github using this template:
```markdown ```markdown

View File

@@ -1,37 +0,0 @@
---
title: Sample Data Story
date: 06/06/2023
---
The below chart clearly shows the steep upward trend of oil prices these are largely due to social-political factors and civil unrest:
<LineChart
data="https://raw.githubusercontent.com/datasets/oil-prices/main/data/wti-year.csv"
title="Oil Price x Year"
xAxis="Date"
yAxis="Price"
/>
But to really understand the different global factors that influence the price of a commodity like oil the long term trends as shown above is not adequate.
When considering the yearly fluctuations it is often beneficial to filter certain time periods.
One can use the below preview to filter year periods. Alternatively, if you want to consider the points in time when the price of oil was the highest the price range can also be filtered.
<FlatUiTable url="https://raw.githubusercontent.com/datasets/oil-prices/main/data/wti-year.csv" />
Careful data analysis has identified instability albeit economic or political to be the major driver of oil price flatuations
```mermaid
graph LR;
A[Socio-Political Instability]-->B[War & Civil Unrest];
A-->C[Economic Factors];
B-->D[Price Increase];
C-->D;
```
___
**To find the raw data used in this article visit https://github.com/datasets/oil-prices/**

View File

@@ -0,0 +1,192 @@
---
title: Frankfurt is Investing in Education, and Your City Should Too
date: 06/12/2023
authors: ['Michael Polidori']
---
_Note: The currency in this post has been converted to USD using an average exchange rate of 1 EUR = 1.20 USD._
Between 2008 and 2016, the population of Frankfurt, Germany grew from approximately 670k to 740k[^1], while
its spending on education climbed from \$465 million to a staggering \$814 million, a 75% increase. That's a
significant surge, bumping education to around 20% of the total budget, only second to social issues.
The stacked bar chart below (using the [City of Frankfurt Expenditure dataset](https://www.openspending.org/@os-data/city-of-frankfurt-expenditure))
helps to bring this data to life. It maps out the city's annual spending across various areas. As you can see,
the education slice has grown noticeably over the years, indicating Frankfurt's intention to prioritize this space.
The city's commitment to education is abundantly clear.
<VegaLite
spec={{
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
data: {
url: 'https://storage.openspending.org/city-of-frankfurt-expenditure/frankfurt-sums.csv',
},
transform: [
{
calculate: "format(datum.amount / 1e6 * 1.20, '$,.1f') + 'M'",
as: 'formattedAmountMillion',
},
{ calculate: 'datum.amount / 1e9 * 1.20', as: 'amountBillion' },
],
mark: 'bar',
width: 350,
height: 400,
encoding: {
x: {
field: 'date',
type: 'ordinal',
title: 'Year',
},
y: {
field: 'amount',
type: 'quantitative',
title: 'Spending (USD in billions)',
axis: {
format: '~s',
labelExpr: "format(datum.value / 1e9 * 1.20, '$,.0f') + 'B'",
},
},
color: {
field: 'label',
type: 'nominal',
title: 'Area',
scale: {
domain: [
'Building supervision and monument protection',
'Business development agency',
'Central finance economy',
'Central services',
'Culture, leisure and sport',
'Education',
'Elections and superordinate matters',
'Environment',
'Finance',
'Fire protection and emergency services',
'Geoinformation and property regulations',
'Head of the city administration',
'Health',
'Local transport and public transport',
'Order and security',
'Personnel and organization',
'Property and building management',
'Reside',
'Revision and law',
'Social issue',
'Town planning',
],
range: [
'#EF5350',
'#F06292',
'#BA68C8',
'#9575CD',
'#7986CB',
'#64B5F6',
'#4FC3F7',
'#4DD0E1',
'#4DB6AC',
'#81C784',
'#AED581',
'#DCE775',
'#FFF176',
'#FFD54F',
'#FFB74D',
'#FF8A65',
'#A1887F',
'#90A4AE',
'#78909C',
'#546E7A',
'#455A64',
],
},
},
tooltip: [
{ field: 'label', type: 'nominal', title: 'Area' },
{
field: 'formattedAmountMillion',
type: 'ordinal',
title: 'Spending (USD in millions)',
},
{ field: 'date', type: 'ordinal', title: 'Year' },
],
},
}}
/>
Now, let's look at a line chart that traces only the trajectory of education spending through these eight
years (using the same dataset). It's not just a line; it's a testament to Frankfurt's growing conviction that investing in education is
the key to a prosperous future.
<VegaLite
spec={{
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
description: 'Frankfurt Education Spending.',
data: {
url: 'https://storage.openspending.org/city-of-frankfurt-expenditure/frankfurt-sums.csv',
},
transform: [
{ filter: "datum.label==='Education'" },
{
calculate: "format(datum.amount / 1e6 * 1.20, '$,.1f') + 'M'",
as: 'formattedAmountMillion',
},
],
mark: {
type: 'area',
line: true,
point: true,
},
width: 400,
height: 400,
encoding: {
x: {
field: 'date',
type: 'ordinal',
title: 'Year',
},
y: {
field: 'amount',
type: 'quantitative',
title: 'Spending (USD in millions)',
axis: {
format: '~s',
labelExpr: "format(datum.value / 1e6 * 1.20, '$,.0f') + 'M'",
},
},
color: {
title: '',
field: 'label',
scale: {
domain: ["Education"],
range: ['#64b5f6']
},
},
tooltip: [
{ field: 'label', type: 'nominal', title: 'Area' },
{
field: 'formattedAmountMillion',
type: 'ordinal',
title: 'Spending (USD in millions)',
},
{ field: 'date', type: 'ordinal', title: 'Year' },
],
},
}}
/>
Despite Frankfurt's population experiencing an increase of less than 100k during this period, the significant
investment in education tells a different story. It sends a clear message: education isn't merely a line item
in their budget—it's their future.
During this period, it's likely that schools underwent major overhauls, more teachers got hired, new educational
programs launched, etc., to give every child in Frankfurt a chance to have an impactful and quality education.
The beauty of good data is that it's not just numbers—it's narratives. And the narrative here is that Frankfurt
is leveraging the power of long-term investment in education for a better, brighter future. This investment in
education is not just about the dollars and cents. It's about recognizing the value of quality education to drive
social and economic progress.
Frankfurt is a city that's recognized the power of education, and it's using that power to redefine its future.
One can only hope that more cities follow suit.
[^1]: https://worldpopulationreview.com/world-cities/frankfurt-population

View File

@@ -0,0 +1,284 @@
---
title: An Exploration of Moers' 2016 Budget Anomaly
date: 06/13/2023
---
_Note: The currency in this post has been converted to USD using an average exchange rate of 1 EUR = 1.20 USD.
Additionally, the text values for account groups have been loosely translated to English. You can find the
original dataset here: [Moers budget dataset](https://www.openspending.org/@os-data/moers-all)_
In the fiscal landscape of Moers, Germany, 2016 stands out as an anomaly. An examination of the budget allocations
for this particular year shows a significant surge in spending across various areas. After this anomalous
spike, spending patterns then seemed to resume their previous trajectory of a slow, steady climb in the
following years. While it's tempting to dismiss this as an irregularity, it's worth exploring the potential
underlying causes of this fiscal fluctuation.
<VegaLite
spec={{
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
title: 'Spending by Account Group',
description: 'Spending by Account Group',
data: {
url: 'https://storage.openspending.org/moers-all/moers-sums.csv',
},
transform: [
{
calculate: "format(datum.amount / 1e6 * 1.20, '$,.1f') + 'M'",
as: 'formattedAmountMillion',
},
{ calculate: 'datum.amount / 1e9 * 1.20', as: 'amountBillion' },
],
mark: 'bar',
height: 400,
width: 350,
encoding: {
x: {
field: 'date',
type: 'temporal',
timeUnit: 'utcyear',
title: 'Year',
},
y: {
field: 'amount',
type: 'quantitative',
title: 'Spending (USD in millions)',
axis: {
format: '~s',
labelExpr: "format(datum.value / 1e6 * 1.20, '$,.0f') + 'M'",
},
},
color: {
field: 'account group',
type: 'nominal',
title: 'Account Group',
scale: {
domain: [
'Activated Own Work',
'Balance Expenses',
'Care Expenses',
'Donations And General Levies',
'Expenses For Material And Services',
'Extraordinary Expenses',
'Extraordinary Income',
'Other Ordinary Expenses',
'Other Ordinary Income',
'Other Transfer Income',
'Personnel Expenses',
'Private Law Performance Fees',
'Public-Service Performance Fees',
'Taxes And Similar Charges',
'Transfer Expenses',
],
range: [
'#EF5350',
'#F06292',
'#BA68C8',
'#9575CD',
'#7986CB',
'#64B5F6',
'#4FC3F7',
'#4DD0E1',
'#4DB6AC',
'#81C784',
'#AED581',
'#DCE775',
'#FFF176',
'#FFD54F',
'#FFB74D',
],
},
},
tooltip: [
{ field: 'account group', type: 'nominal', title: 'Account Group' },
{
field: 'formattedAmountMillion',
type: 'ordinal',
title: 'Spending (USD)',
},
{ field: 'date', type: 'temporal', title: 'Year', format: '%Y' }
],
},
}}
/>
## Why?
One possible explanation could be the global refugee crisis that was unfolding around this time, particularly
in Germany. While we can't assert this connection definitively due to the lack of specific data, it's an angle
worth examining to better understand the budget anomaly of 2016.
For instance, the "Donations and General Levies" account group saw a distinct increase in 2016. This could be
reflective of Moers' attempts to provide immediate support to incoming refugees, although we can only speculate
at this point.
<VegaLite
spec={{
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
title: 'Donations and General Levies',
description: 'Donations and General Levies',
data: {
url: 'https://storage.openspending.org/moers-all/moers-sums.csv',
},
transform: [
{ filter: "datum['account group']==='Donations And General Levies'" },
{
calculate: "format(datum.amount / 1e6 * 1.20, '$,.1f') + 'M'",
as: 'formattedAmountMillion',
},
],
mark: {
type: 'area',
line: true,
point: true,
},
width: 400,
height: 400,
encoding: {
x: {
field: 'date',
type: 'temporal',
timeUnit: 'utcyear',
title: 'Year',
},
y: {
field: 'amount',
type: 'quantitative',
title: 'Spending (USD in millions)',
axis: {
format: '~s',
labelExpr: "format(datum.value / 1e6 * 1.20, '$,.0f') + 'M'",
},
},
color: {
title: 'Account Group',
field: 'account group',
scale: {
domain: ['Donations And General Levies'],
range: ['#9575CD'],
},
},
tooltip: [
{ field: 'account group', type: 'nominal', title: 'Area' },
{
field: 'formattedAmountMillion',
type: 'ordinal',
title: 'Spending (USD in millions)',
},
{ field: 'date', type: 'temporal', title: 'Year', format: '%Y' }
],
},
}}
/>
Similarly, "Expenses for Material and Services" also experienced an upswing. This could suggest
that the town was working to establish necessary infrastructure and resources for the newcomers. It's plausible
that procurement of essential supplies and services to aid the refugees was a factor contributing to this budget
increase.
The rise in "Personnel Expenses" may suggest an expansion of the town's workforce during this period. Additional
staffing in areas like interpretation, social work, healthcare, and administration would be necessary to handle
the influx of refugees.
The two account groups that experienced the most substantial raw monetary increases were "Taxes and Similar Charges"
and "Transfer Expenses". Both these categories more than doubled in size during the year, a significant surge
especially considering their already high baseline spending. This could be for a variety of reasons.
For "Taxes and Similar Charges", the hike could indicate the town adjusting local taxation to meet the additional
expenditures, or it could reflect an increase in income from other sources falling under this group. The influx
of refugees and the resulting uptick in economic activity may have also led to a rise in the collection of certain
local taxes or fees.
Concurrently, the "Transfer Expenses" spike could be an indication of heightened social welfare payments, costs
associated with refugee integration, and funds transferred to other entities managing the crisis. These financial
escalations are a testament to the extensive and multifaceted financial impact the refugee crisis had on the town's
budget.
<VegaLite
spec={{
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
title: 'Largest Spending by Account Group',
description: 'Largest Spending by Account Group',
data: {
url: 'https://storage.openspending.org/moers-all/moers-sums.csv',
},
transform: [
{
filter: {
field: 'account group',
oneOf: [
'Donations And General Levies',
'Expenses For Material And Services',
'Personnel Expenses',
'Taxes And Similar Charges',
'Transfer Expenses'
]
}
},
{
calculate: "format(datum.amount / 1e6 * 1.20, '$,.1f') + 'M'",
as: 'formattedAmountMillion',
}
],
mark: {
type: 'line',
point: true,
},
width: 400,
height: 400,
encoding: {
x: {
field: 'date',
type: 'temporal',
timeUnit: 'utcyear',
title: 'Year'
},
y: {
field: 'amount',
type: 'quantitative',
title: 'Spending (USD in millions)',
axis: {
format: '~s',
labelExpr: "format(datum.value / 1e6 * 1.20, '$,.0f') + 'M'",
}
},
color: {
field: 'account group',
type: 'nominal',
title: 'Account Group',
scale: {
domain: [
'Donations And General Levies',
'Expenses For Material And Services',
'Personnel Expenses',
'Taxes And Similar Charges',
'Transfer Expenses'
],
range: [
'#9575CD',
'#7986CB',
'#AED581',
'#FFD54F',
'#FFB74D'
],
},
},
tooltip: [
{ field: 'account group', type: 'nominal', title: 'Area' },
{
field: 'formattedAmountMillion',
type: 'ordinal',
title: 'Spending (USD in millions)',
},
{ field: 'date', type: 'temporal', title: 'Year', format: '%Y' }
],
},
}}
/>
By 2017, these budget items returned to their pre-2016 levels, which may suggest that the town had successfully
adapted to the new circumstances, perhaps by implementing more cost-effective strategies.
While this exploration offers a compelling perspective, it's important to note that these are theories derived
from the available budget data and the concurrent global events of the time. It underscores how global crises,
like the refugee crisis, may potentially impact not just national budgets, but also the fiscal management of
smaller towns like Moers.

View File

@@ -0,0 +1,105 @@
---
title: Where does Berlin spend its ERDF benefits?
date: 2023-06-12
authors: ['João Demenech']
---
In this data-driven story, let's analyze how the city of Berlin benefited from ERDF from 2008 to 2015.
## What is ERDF?
If you're not familiar with ERDF, it's the European Regional Development Fund. According to its [official website](https://ec.europa.eu/regional_policy/funding/erdf_en):
> The European Regional Development Fund (ERDF) aims to strengthen economic, social, and territorial cohesion in the European Union by correcting imbalances between its regions. In 2021-2027 it will enable investments in a smarter, greener, more connected, and more social Europe that is closer to its citizens.
## A look into the data
The dataset that will be used is this one: https://www.openspending.org/@os-data/de3-berlin-2007-2013-erdf (if you're looking for ERDF data for other cities/regions, take a look at the data catalog).
Here's a sample of this data:
<FlatUiTable url="https://storage.openspending.org/de3-berlin-2007-2013-erdf/concat.csv" />
Note that we will only use the rows where the "amount_kind" column is set to "total_amount".
## How has the total amount changed over the years?
The line chart below shows the sum of the total amount of EUR that was approved for each year:
<LineChart data="https://storage.openspending.org/de3-berlin-2007-2013-erdf/berlin-erdf-2007-2013-total-amount-apporved-per-year.csv" xAxis="approval_year" yAxis="total_amount" />
As you can see, the total increased significantly from 2007 to 2010, later fluctuating between €7 million and €9 million per year.
## Who were the top beneficiaries for each year?
Now, let's try to understand who were the top beneficiaries each year. To do that, let's filter the data to show only the two top beneficiaries for each year:
<FlatUiTable url="https://storage.openspending.org/de3-berlin-2007-2013-erdf/berlin-erdf-2007-2013-total-amount-approved-per-year-per-beneficiary--top-2.csv" />
Since there are many years in this range, let's split this analysis into two ranges: one for 2008-2010 and the other for 2011-2015.
<VegaLite spec={{
"data": { "url": "https://storage.openspending.org/de3-berlin-2007-2013-erdf/berlin-erdf-2007-2013-total-amount-approved-per-year-per-beneficiary--top-2.csv"},
"transform": [
{"filter": "datum.approval_year <= 2010"},
],
"title": "Total Amount (EUR) x Approval Year (2007-2010)",
"width": "container",
"mark": {"type": "bar", "tooltip": true },
"encoding": {
"y": {
"aggregate": "sum",
"field": "total_amount",
"title": "Total Amount (EUR)",
"stack": null
},
"x": {"field": "approval_year", "title": "Approval Year"},
"color": {
"type": "nominal",
"field": "beneficiary_name",
}
}
}} />
<VegaLite spec={{
"title": "Total Amount (EUR) x Approval Year (2011-2013)",
"data": { "url": "https://storage.openspending.org/de3-berlin-2007-2013-erdf/berlin-erdf-2007-2013-total-amount-approved-per-year-per-beneficiary--top-2.csv"},
"transform": [
{"filter": "datum.approval_year > 2010"},
],
"width": "container",
"mark": {"type": "bar", "tooltip": true },
"encoding": {
"y": {
"aggregate": "sum",
"field": "total_amount",
"title": "Total Amount (EUR)",
"stack": null
},
"x": {"field": "approval_year", "title": "Approval Year"},
"color": {
"type": "nominal",
"field": "beneficiary_name",
}
}
}} />
It's easy to spot some repeating colors. Now, let's see to which sector the top beneficiaries belong to:
<Table csv="
Beneficiary,Sector
D & B,Education
Stiftung Sozialpädagogisches Institut Berlin (SPI),Education/Social work
IB e.V.,Social work
gsub-Projektegesellschaft mbH,Consulting
BBW Berufsvorbereitungs-u.Ausbildungsgesellschaft,Education
Arbeit und Bildung e.V.,Consulting
Gesellschaft für soziale Unternehmensberatung GSUB,Consulting
SPI Consult GmbH,Consulting
Beuth Hochschule für Technik Berlin,Education
TU Berlin, Fakultät II,Education
Hochschule für Technik und Wirtschaft Berlin,Education
WeTeK gGmbH,Education
" />
Based on the sectors of the top beneficiaries, it's clear that education and professional training have been a major focus of ERDF investment in Berlin during that period of time.

View File

@@ -29,35 +29,7 @@ Quick observations:
So let's convert all currencies to ~EUR but only include 'eu_cofinancing_amount' values as we will use it for comparison: So let's convert all currencies to ~EUR but only include 'eu_cofinancing_amount' values as we will use it for comparison:
<FlatUiTable rawCsv="beneficiary_country_code,eu_cofinancing_amount <FlatUiTable url="https://storage.openspending.org/eu-esif-funds-beneficiaries-2007-2020--country-code-confinancing-amount.csv" />
AT,0.0
BE,858388537.42
BG,0.0
CY,0.0
CZ,115591108113
DE,912803359.21
DK,492017672
EE,5419641772.0
EL,0.0
ES,0.0
FI,2858282488.0
FR,15027864492.94
HR,0.0
HU,0.0
IE,0.0
IT,34860253672.98
LT,6750675528.74
LU,30852529.89
LV,0.0
MT,0.0
NL,0.0
PL,67537688711
PT,23800568868.02
RO,19970864938.12
SE,0.0
SI,4576151396.24
SK,12295960193.92
UK,12829255012.10" />
With this data table we can easily see top countries by funding. Note that you can use the table component above to sort values by values in 'eu_cofinancing_amount' column which helps you to quickly see top countries. Let's build a quick visualization to make it even more obvious: With this data table we can easily see top countries by funding. Note that you can use the table component above to sort values by values in 'eu_cofinancing_amount' column which helps you to quickly see top countries. Let's build a quick visualization to make it even more obvious:

View File

@@ -2,7 +2,7 @@
import { remark } from "remark"; import { remark } from "remark";
import stripMarkdown, { Options } from "strip-markdown"; import stripMarkdown, { Options } from "strip-markdown";
import { defaultConfig as siteConfig } from '@flowershow/core' import { defaultConfig as siteConfig } from '@portaljs/core'
// TODO return type // TODO return type
const sluggify = (urlPath: string) => { const sluggify = (urlPath: string) => {

View File

@@ -1,13 +1,13 @@
import matter from "gray-matter"; import matter from "gray-matter";
import mdxmermaid from "mdx-mermaid"; import mdxmermaid from "mdx-mermaid";
import { h } from "hastscript"; import { h } from "hastscript";
import remarkCallouts from "@flowershow/remark-callouts"; import remarkCallouts from "@portaljs/remark-callouts";
import remarkEmbed from "@flowershow/remark-embed"; import remarkEmbed from "@portaljs/remark-embed";
import remarkGfm from "remark-gfm"; import remarkGfm from "remark-gfm";
import remarkMath from "remark-math"; import remarkMath from "remark-math";
import remarkSmartypants from "remark-smartypants"; import remarkSmartypants from "remark-smartypants";
import remarkToc from "remark-toc"; import remarkToc from "remark-toc";
import remarkWikiLink from "@flowershow/remark-wiki-link"; import remarkWikiLink from "@portaljs/remark-wiki-link";
import rehypeAutolinkHeadings from "rehype-autolink-headings"; import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeKatex from "rehype-katex"; import rehypeKatex from "rehype-katex";
import rehypeSlug from "rehype-slug"; import rehypeSlug from "rehype-slug";

View File

@@ -1,4 +1,4 @@
import { MarkdownDB } from "@flowershow/markdowndb"; import { MarkdownDB } from "mddb";
// import config from "./markdowndb.config.js"; // import config from "./markdowndb.config.js";
// TODO get this path from markdowndb.config.js or something // TODO get this path from markdowndb.config.js or something

File diff suppressed because it is too large Load Diff

View File

@@ -12,53 +12,55 @@
"test": "vitest" "test": "vitest"
}, },
"dependencies": { "dependencies": {
"@octokit/plugin-throttling": "^5.2.2", "@flowershow/markdowndb": "^0.1.8",
"@types/flexsearch": "^0.7.3",
"@vitejs/plugin-react": "^4.0.0",
"clsx": "^1.2.1",
"datapackage": "^1.1.10",
"flexsearch": "0.7.21",
"next-seo": "^6.0.0",
"octokit": "^2.0.14",
"prettier": "^2.8.8",
"react-hook-form": "^7.43.9",
"react-markdown": "^8.0.7",
"react-timeago": "^7.1.0",
"rehype-raw": "^6.1.1",
"remark": "^14.0.3",
"remark-gfm": "^3.0.1",
"strip-markdown": "^5.0.1",
"@flowershow/core": "^0.4.13",
"@flowershow/markdowndb": "^0.1.5",
"@flowershow/remark-callouts": "^1.0.0",
"@flowershow/remark-embed": "^1.0.0",
"@githubocto/flat-ui": "^0.14.1", "@githubocto/flat-ui": "^0.14.1",
"@headlessui/react": "^1.7.14", "@headlessui/react": "^1.7.14",
"@heroicons/react": "^2.0.18", "@heroicons/react": "^2.0.18",
"@octokit/plugin-throttling": "^5.2.2",
"@portaljs/ckan": "^0.0.2", "@portaljs/ckan": "^0.0.2",
"@portaljs/components": "^0.1.8", "@portaljs/components": "^0.1.12",
"@portaljs/core": "^1.0.5",
"@portaljs/remark-callouts": "^1.0.5",
"@portaljs/remark-embed": "^1.0.4",
"@portaljs/remark-wiki-link": "^1.0.4",
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"@types/flexsearch": "^0.7.3",
"@types/node": "20.2.3", "@types/node": "20.2.3",
"@types/react": "18.2.6", "@types/react": "18.2.6",
"@types/react-dom": "18.2.4", "@types/react-dom": "18.2.4",
"@vitejs/plugin-react": "^4.0.0",
"autoprefixer": "10.4.14", "autoprefixer": "10.4.14",
"clsx": "^1.2.1",
"datapackage": "^1.1.10",
"eslint": "8.41.0", "eslint": "8.41.0",
"eslint-config-next": "13.4.3", "eslint-config-next": "13.4.3",
"flexsearch": "0.7.21",
"isomorphic-unfetch": "^4.0.2", "isomorphic-unfetch": "^4.0.2",
"mddb": "^0.1.9",
"next": "13.4.3", "next": "13.4.3",
"next-mdx-remote": "^4.4.1", "next-mdx-remote": "^4.4.1",
"next-seo": "^6.0.0",
"octokit": "^2.0.14",
"papaparse": "^5.4.1", "papaparse": "^5.4.1",
"postcss": "8.4.23", "postcss": "8.4.23",
"prettier": "^2.8.8",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-hook-form": "^7.43.9",
"react-markdown": "^8.0.7",
"react-query": "^3.39.3", "react-query": "^3.39.3",
"react-timeago": "^7.1.0",
"rehype-autolink-headings": "^6.1.1", "rehype-autolink-headings": "^6.1.1",
"rehype-katex": "^6.0.3", "rehype-katex": "^6.0.3",
"rehype-prism-plus": "^1.5.1", "rehype-prism-plus": "^1.5.1",
"rehype-raw": "^6.1.1",
"rehype-slug": "^5.1.0", "rehype-slug": "^5.1.0",
"remark": "^14.0.3",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1", "remark-math": "^5.1.1",
"remark-smartypants": "^2.0.0", "remark-smartypants": "^2.0.0",
"remark-toc": "^8.0.1", "remark-toc": "^8.0.1",
"strip-markdown": "^5.0.1",
"tailwindcss": "3.3.2", "tailwindcss": "3.3.2",
"typescript": "5.0.4" "typescript": "5.0.4"
}, },

View File

@@ -13,7 +13,7 @@ import {
ThemeProvider, ThemeProvider,
NavItem, NavItem,
NavGroup, NavGroup,
} from '@flowershow/core'; } from '@portaljs/core';
export interface CustomAppProps { export interface CustomAppProps {
meta: { meta: {

View File

@@ -1,7 +1,7 @@
import fs from 'fs'; import fs from 'fs';
import React from 'react'; import React from 'react';
import { GetStaticProps } from 'next'; import { GetStaticProps } from 'next';
import { BlogsList, SimpleLayout } from '@flowershow/core'; import { BlogsList, SimpleLayout } from '@portaljs/core';
import clientPromise from '../lib/mddb'; import clientPromise from '../lib/mddb';
import type { CustomAppProps } from './_app'; import type { CustomAppProps } from './_app';
import Layout from '@/components/_shared/Layout'; import Layout from '@/components/_shared/Layout';

View File

@@ -1,7 +1,7 @@
import fs from 'fs'; import fs from 'fs';
import React from 'react'; import React from 'react';
import { GetStaticProps } from 'next'; import { GetStaticProps } from 'next';
import { BlogsList, SimpleLayout } from '@flowershow/core'; import { BlogsList, SimpleLayout } from '@portaljs/core';
import clientPromise from '../../lib/mddb'; import clientPromise from '../../lib/mddb';
import type { CustomAppProps } from '../_app'; import type { CustomAppProps } from '../_app';
import Layout from '@/components/_shared/Layout'; import Layout from '@/components/_shared/Layout';

View File

@@ -86,7 +86,7 @@ pre {
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
@import "@flowershow/remark-callouts/styles.css"; @import "@portaljs/remark-callouts/styles.css";
.w-5 { .w-5 {
width: 1.25rem width: 1.25rem

View File

@@ -4,8 +4,8 @@ module.exports = {
"./app/**/*.{js,ts,jsx,tsx,mdx}", "./app/**/*.{js,ts,jsx,tsx,mdx}",
"./pages/**/*.{js,ts,jsx,tsx,mdx}", "./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}", "./components/**/*.{js,ts,jsx,tsx,mdx}",
"./node_modules/@flowershow/core/dist/*.js", "./node_modules/@portaljs/core/dist/*.js",
"./node_modules/@flowershow/core/*.js", "./node_modules/@portaljs/core/*.js",
], ],
darkMode: "class", darkMode: "class",
theme: { theme: {

View File

@@ -1,13 +1,13 @@
import matter from "gray-matter"; import matter from "gray-matter";
import mdxmermaid from "mdx-mermaid"; import mdxmermaid from "mdx-mermaid";
import { h } from "hastscript"; import { h } from "hastscript";
import remarkCallouts from "@flowershow/remark-callouts"; import remarkCallouts from "@portaljs/remark-callouts";
import remarkEmbed from "@flowershow/remark-embed"; import remarkEmbed from "@portaljs/remark-embed";
import remarkGfm from "remark-gfm"; import remarkGfm from "remark-gfm";
import remarkMath from "remark-math"; import remarkMath from "remark-math";
import remarkSmartypants from "remark-smartypants"; import remarkSmartypants from "remark-smartypants";
import remarkToc from "remark-toc"; import remarkToc from "remark-toc";
import remarkWikiLink from "@flowershow/remark-wiki-link"; import remarkWikiLink from "@portaljs/remark-wiki-link";
import rehypeAutolinkHeadings from "rehype-autolink-headings"; import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeKatex from "rehype-katex"; import rehypeKatex from "rehype-katex";
import rehypeSlug from "rehype-slug"; import rehypeSlug from "rehype-slug";

View File

@@ -1,4 +1,4 @@
import { MarkdownDB } from "@flowershow/markdowndb"; import { MarkdownDB } from "mddb";
const dbPath = "markdown.db"; const dbPath = "markdown.db";

File diff suppressed because it is too large Load Diff

View File

@@ -12,11 +12,6 @@
}, },
"browserslist": "defaults, not ie <= 11", "browserslist": "defaults, not ie <= 11",
"dependencies": { "dependencies": {
"@flowershow/core": "^0.4.10",
"@flowershow/markdowndb": "^0.1.1",
"@flowershow/remark-callouts": "^1.0.0",
"@flowershow/remark-embed": "^1.0.0",
"@flowershow/remark-wiki-link": "^1.1.2",
"@headlessui/react": "^1.7.13", "@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.17", "@heroicons/react": "^2.0.17",
"@mapbox/rehype-prism": "^0.8.0", "@mapbox/rehype-prism": "^0.8.0",
@@ -24,6 +19,10 @@
"@mdx-js/react": "^2.1.5", "@mdx-js/react": "^2.1.5",
"@next/mdx": "^13.0.2", "@next/mdx": "^13.0.2",
"@opentelemetry/api": "^1.4.0", "@opentelemetry/api": "^1.4.0",
"@portaljs/core": "^1.0.5",
"@portaljs/remark-callouts": "^1.0.5",
"@portaljs/remark-embed": "^1.0.4",
"@portaljs/remark-wiki-link": "^1.0.4",
"@tailwindcss/forms": "^0.5.3", "@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.4", "@tailwindcss/typography": "^0.5.4",
"@tanstack/react-table": "^8.8.5", "@tanstack/react-table": "^8.8.5",
@@ -35,6 +34,7 @@
"focus-visible": "^5.2.0", "focus-visible": "^5.2.0",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"hastscript": "^7.2.0", "hastscript": "^7.2.0",
"mddb": "^0.1.9",
"mdx-mermaid": "^2.0.0-rc7", "mdx-mermaid": "^2.0.0-rc7",
"mermaid": "^10.1.0", "mermaid": "^10.1.0",
"next": "13.2.1", "next": "13.2.1",
@@ -60,12 +60,12 @@
"tailwindcss": "^3.3.0" "tailwindcss": "^3.3.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "18.16.0",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0",
"eslint": "8.26.0", "eslint": "8.26.0",
"eslint-config-next": "13.0.2", "eslint-config-next": "13.0.2",
"prettier": "^2.8.7", "prettier": "^2.8.7",
"prettier-plugin-tailwindcss": "^0.2.6", "prettier-plugin-tailwindcss": "^0.2.6"
"@types/node": "18.16.0",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.0"
} }
} }

View File

@@ -5,7 +5,7 @@ import { MDXRemote } from 'next-mdx-remote'
import { Card } from '../components/Card' import { Card } from '../components/Card'
import Head from 'next/head' import Head from 'next/head'
import parse from '../lib/markdown' import parse from '../lib/markdown'
import { Mermaid } from '@flowershow/core'; import { Mermaid } from '@portaljs/core';
export const getStaticProps = async ({ params }) => { export const getStaticProps = async ({ params }) => {
const urlPath = params.slug ? params.slug.join('/') : '' const urlPath = params.slug ? params.slug.join('/') : ''

532
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,6 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"changeset": "changeset", "changeset": "changeset",
"prerelease": "nx run-many --targets=lint,test,build --projects=tag:test",
"release": "changeset publish" "release": "changeset publish"
}, },
"private": true, "private": true,

View File

@@ -0,0 +1,10 @@
<!--
This is necessary for Leaflet maps to work.
-->
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""
/>

View File

@@ -1,6 +1,7 @@
import 'tailwindcss/tailwind.css' import 'tailwindcss/tailwind.css'
import '../src/index.css' import '../src/index.css'
import type { Preview } from '@storybook/react'; import type { Preview } from '@storybook/react';
const preview: Preview = { const preview: Preview = {

View File

@@ -1,5 +1,11 @@
# @portaljs/components # @portaljs/components
## 0.1.12
### Patch Changes
- [#960](https://github.com/datopian/portaljs/pull/960) [`add2f6d0`](https://github.com/datopian/portaljs/commit/add2f6d0f372434eb996d59d6faf5cd06530c932) Thanks [@demenech](https://github.com/demenech)! - Fix width of the <LineChart /> component
## 0.1.11 ## 0.1.11
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@portaljs/components", "name": "@portaljs/components",
"version": "0.1.11", "version": "0.1.12",
"type": "module", "type": "module",
"description": "https://portaljs.org", "description": "https://portaljs.org",
"keywords": [ "keywords": [
@@ -12,12 +12,14 @@
], ],
"scripts": { "scripts": {
"dev": "npm run storybook", "dev": "npm run storybook",
"build": "tsc && vite build && npm run build-tailwind", "example": "vite",
"build": "tsc && vite build && npm run build-tailwind && npm run fix-leaflet",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"storybook": "storybook dev -p 6006", "storybook": "storybook dev -p 6006",
"build-storybook": "storybook build", "build-storybook": "storybook build",
"build-tailwind": "NODE_ENV=production npx tailwindcss -o ./dist/styles.css --minify", "build-tailwind": "NODE_ENV=production npx tailwindcss --postcss -c tailwind.config.js -i src/index.css -o ./dist/styles.css --minify",
"prepare": "npm run build" "prepare": "npm run build",
"fix-leaflet": "node ./scripts/fix-leaflet.cjs"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^18.2.0", "react": "^18.2.0",
@@ -26,16 +28,20 @@
"dependencies": { "dependencies": {
"@githubocto/flat-ui": "^0.14.1", "@githubocto/flat-ui": "^0.14.1",
"@heroicons/react": "^2.0.17", "@heroicons/react": "^2.0.17",
"@planet/maps": "^8.1.0",
"@tanstack/react-table": "^8.8.5", "@tanstack/react-table": "^8.8.5",
"chroma-js": "^2.4.2",
"flexsearch": "0.7.21", "flexsearch": "0.7.21",
"leaflet": "^1.9.4",
"next-mdx-remote": "^4.4.1", "next-mdx-remote": "^4.4.1",
"ol": "^7.4.0",
"papaparse": "^5.4.1", "papaparse": "^5.4.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-hook-form": "^7.43.9", "react-hook-form": "^7.43.9",
"react-leaflet": "^4.2.1",
"react-query": "^3.39.3", "react-query": "^3.39.3",
"react-vega": "^7.6.0", "react-vega": "^7.6.0",
"rollup-plugin-re": "^1.0.7",
"vega": "5.25.0", "vega": "5.25.0",
"vega-lite": "5.1.0", "vega-lite": "5.1.0",
"vitest": "^0.31.4" "vitest": "^0.31.4"
@@ -48,13 +54,16 @@
"@storybook/react": "^7.0.7", "@storybook/react": "^7.0.7",
"@storybook/react-vite": "^7.0.7", "@storybook/react-vite": "^7.0.7",
"@storybook/testing-library": "^0.0.14-next.2", "@storybook/testing-library": "^0.0.14-next.2",
"@swc/core": "^1.3.68",
"@types/flexsearch": "^0.7.3", "@types/flexsearch": "^0.7.3",
"@types/leaflet": "^1.9.3",
"@types/papaparse": "^5.3.7", "@types/papaparse": "^5.3.7",
"@types/react": "^18.0.28", "@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11", "@types/react-dom": "^18.0.11",
"@typescript-eslint/eslint-plugin": "^5.57.1", "@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1", "@typescript-eslint/parser": "^5.57.1",
"@vitejs/plugin-react": "^4.0.0", "@vitejs/plugin-react": "^4.0.0",
"@vitejs/plugin-react-swc": "^3.3.2",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"eslint": "^8.38.0", "eslint": "^8.38.0",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
@@ -62,12 +71,15 @@
"eslint-plugin-storybook": "^0.6.11", "eslint-plugin-storybook": "^0.6.11",
"json": "^11.0.0", "json": "^11.0.0",
"postcss": "^8.4.23", "postcss": "^8.4.23",
"postcss-import": "^15.1.0",
"postcss-import-url": "^7.2.0",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"storybook": "^7.0.7", "storybook": "^7.0.7",
"tailwindcss": "^3.3.2", "tailwindcss": "^3.3.2",
"typescript": "^5.0.2", "typescript": "^5.0.2",
"vite": "^4.3.2", "vite": "^4.3.2",
"vite-plugin-dts": "^2.3.0" "vite-plugin-dts": "^2.3.0",
"vite-plugin-swc-only": "^0.1.18"
}, },
"files": [ "files": [
"dist" "dist"

View File

@@ -1,6 +1,9 @@
console.log('PostCSS')
export default { export default {
plugins: { plugins: {
'postcss-import': {},
tailwindcss: {}, tailwindcss: {},
autoprefixer: {}, autoprefixer: {},
}, },
} };

View File

@@ -0,0 +1,6 @@
const fs = require('fs');
const path = require('path');
const leafletPath = path.join(require.resolve('leaflet'), '../')
fs.cpSync(`${leafletPath}images`,'./dist/images', { recursive: true });

View File

@@ -35,7 +35,7 @@ export function LineChart({
const spec = { const spec = {
$schema: 'https://vega.github.io/schema/vega-lite/v5.json', $schema: 'https://vega.github.io/schema/vega-lite/v5.json',
title, title,
width: 600, width: 'container',
height: 300, height: 300,
mark: { mark: {
type: 'line', type: 'line',

View File

@@ -0,0 +1,139 @@
import { useEffect, useState } from 'react';
import LoadingSpinner from './LoadingSpinner';
import loadData from '../lib/loadData';
import chroma from 'chroma-js';
import {
MapContainer,
TileLayer,
GeoJSON as GeoJSONLayer,
} from 'react-leaflet';
import * as L from 'leaflet';
export type MapProps = {
data: string | GeoJSON.GeoJSON;
title?: string;
colorScale?: {
starting: string;
ending: string;
};
center?: { latitude: number | undefined; longitude: number | undefined };
zoom?: number;
tooltip?: {
prop: string;
};
};
export function Map({
data,
title = '',
colorScale = { starting: 'blue', ending: 'red' },
center = { latitude: 45, longitude: 45 },
zoom = 2,
tooltip = {
prop: '',
},
}: MapProps) {
const [isLoading, setIsLoading] = useState<boolean>(false);
// By default, assumes data is an Array...
const [geoJsonData, setGeoJsonData] = useState<any>(null);
useEffect(() => {
// If data is string, assume it's a URL
if (typeof data === 'string') {
setIsLoading(true);
loadData(data).then((res: any) => {
const geoJsonObject = JSON.parse(res);
const colorScaleAr = chroma
.scale([colorScale.starting, colorScale.ending])
.mode('lch')
.colors(geoJsonObject.features.length);
geoJsonObject.features.forEach((feature, i) => {
if (feature.color === undefined) {
feature.color = colorScaleAr[i];
}
});
setGeoJsonData(geoJsonObject);
setIsLoading(false);
});
} else {
setGeoJsonData(data);
}
}, []);
const onEachFeature = (feature, layer) => {
const geometryType = feature.type;
if (tooltip.prop)
layer.bindTooltip(feature.properties[tooltip.prop], {
direction: 'center',
});
layer.on({
mouseover: (event) => {
if (['Polygon', 'MultiPolygon'].includes(geometryType)) {
event.target.setStyle({
fillColor: '#B85042',
});
}
},
mouseout: (event) => {
if (['Polygon', 'MultiPolygon'].includes(geometryType)) {
event.target.setStyle({
fillColor: '#A7BEAE',
});
}
},
});
};
return isLoading || !geoJsonData ? (
<div className="w-full flex items-center justify-center w-[600px] h-[300px]">
<LoadingSpinner />
</div>
) : (
<MapContainer
center={[center.latitude, center.longitude]}
zoom={zoom}
scrollWheelZoom={false}
className="h-80 w-full"
// @ts-ignore
whenReady={(map: any) => {
map.target.scrollWheelZoom.enable();
var info = new L.Control() as any;
info.onAdd = function () {
this._div = L.DomUtil.create('div', 'info');
this.update();
return this._div;
};
info.update = function () {
this._div.innerHTML = `<h4 style="font-weight: 600; background: #f9f9f9; padding: 5px; border-radius: 5px; color: #464646;">${title}</h4>`;
};
if (title) info.addTo(map.target);
setTimeout(() => map.target.invalidateSize(), 5000);
}}
>
<GeoJSONLayer
data={geoJsonData}
style={(geoJsonFeature: any) => {
return { color: geoJsonFeature?.color };
}}
onEachFeature={onEachFeature}
/>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
</MapContainer>
);
}

View File

@@ -0,0 +1,84 @@
import React, { useContext, useEffect, useState } from 'react';
export const Controls = ({ children }) => {
return <div>{children}</div>;
};
import { FullScreen, Zoom } from 'ol/control';
import { MapContext } from './Map';
export const FullScreenControl = () => {
const { map } = useContext(MapContext);
useEffect(() => {
if (!map) return;
let fullScreenControl = new FullScreen({
className: 'ml-1 flex flex-col w-8 items-center mt-2',
activeClassName:
'w-full inline-flex justify-center items-center rounded-t-md bg-white px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 text-sm',
inactiveClassName:
'inline-flex w-full justify-center items-center rounded-t-md bg-white px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 text-sm',
});
let zoomControl = new Zoom({
className: 'ml-1 flex flex-col w-8 items-center',
zoomInClassName:
'inline-flex w-full justify-center items-center bg-white px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 text-sm',
zoomOutClassName:
'inline-flex w-full justify-center items-center rounded-b-md bg-white px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 text-sm',
});
map.controls.push(fullScreenControl);
map.controls.push(zoomControl);
return () => {
map.controls.remove(zoomControl);
map.controls.remove(fullScreenControl);
};
}, [map]);
return null;
};
//build a list of checkboxes in react
export const ListOfCheckboxes = ({ layers, shownLayers, setShownLayers }) => {
//layers is an array of url and name
function addLayer(layer) {
setShownLayers([...shownLayers, layer.url]);
}
function removeLayer(layer) {
setShownLayers(shownLayers.filter((l) => l !== layer.url));
}
return (
<div>
<h3 className="mb-4 font-semibold text-gray-900 ">Layers</h3>
<ul className="w-48 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg ">
{layers.map((layer, index) => (
<li
key={index}
className="w-full border-b border-gray-200 rounded-t-lg "
>
<div className="flex items-center pl-3">
<input
id={layer.name}
type="checkbox"
defaultChecked={shownLayers.includes(layer.url)}
onClick={() =>
shownLayers.includes(layer.url)
? removeLayer(layer)
: addLayer(layer)
}
value={true}
className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 focus:ring-2 "
></input>
<label
htmlFor={layer.name}
className="w-full py-3 ml-2 text-sm font-medium text-gray-90"
>
{layer.name}
</label>
</div>
</li>
))}
</ul>
</div>
);
};

View File

@@ -0,0 +1,29 @@
import { useContext, useEffect, useState } from 'react';
import HeatMap from 'ol/layer/Heatmap';
import { MapContext } from './Map';
const HeatMapLayer = ({ source, style, zIndex = 0 }) => {
const { map } = useContext(MapContext);
const [heatMapLayer, setHeatMapLayer] = useState(null);
useEffect(() => {
if (!map) return;
let heatMapLayer = new HeatMap({
source,
style,
blur: parseInt(5, 10),
radius: parseInt(5, 10),
});
map.addLayer(heatMapLayer);
setHeatMapLayer(heatMapLayer);
heatMapLayer.setZIndex(zIndex);
return () => {
if (map) {
map.removeLayer(heatMapLayer);
}
};
}, [map]);
useEffect(() => {
heatMapLayer && heatMapLayer.setZIndex(zIndex);
}, [zIndex]);
return null;
};
export default HeatMapLayer;

View File

@@ -0,0 +1,4 @@
import React from 'react';
export const Layers = ({ children }) => {
return <div>{children}</div>;
};

View File

@@ -0,0 +1,50 @@
import React, { useRef, useState, useEffect } from 'react';
import * as ol from 'ol';
export const MapContext = new React.createContext();
const Map = ({ children, zoom, center, setSelected }) => {
const mapRef = useRef();
const [map, setMap] = useState(null);
// on component mount
useEffect(() => {
let options = {
view: new ol.View({ zoom, center }),
layers: [],
controls: [],
overlays: [],
};
let mapObject = new ol.Map(options);
mapObject.setTarget(mapRef.current);
setMap(mapObject);
return () => mapObject.setTarget(undefined);
}, []);
useEffect(() => {
if (map) {
if (setSelected !== null) {
let selected = null;
map.on('pointermove', function (e) {
map.forEachFeatureAtPixel(e.pixel, function (f) {
selected = f;
return true;
});
if (selected) {
setSelected(selected);
} else {
setSelected(null);
}
});
}
}
}, [map]);
return (
<MapContext.Provider value={{ map }}>
<div ref={mapRef} className="w-full" style={{height: '500px'}}>
{children}
</div>
</MapContext.Provider>
);
};
export default Map;

View File

@@ -0,0 +1,136 @@
import { useEffect, useState } from 'react';
import Map from './Map';
import { Layers } from './Layers';
import { Fill, Icon, Style } from 'ol/style';
import * as olSource from 'ol/source';
import TileLayer from './TileLayer';
import { fromLonLat } from 'ol/proj';
import VectorLayer from './VectorLayer';
import { Vector as VectorSource } from 'ol/source';
import GeoJSON from 'ol/format/GeoJSON';
import KML from 'ol/format/KML';
import { colors } from './colors';
import { FullScreenControl, Controls, ListOfCheckboxes } from './Controls';
import HeatMapLayer from './HeatMapLayer';
function osm() {
return new olSource.OSM();
}
const formats = {
geojson: new GeoJSON(),
kml: new KML(),
};
interface OpenLayersProps {
layers: {
url: string;
name?: string;
format?: string;
heatmap?: boolean;
}[];
center?: [number, number];
zoom?: number;
popup?: (selected: any) => JSX.Element;
}
export function OpenLayers({
layers,
center = [0, 0],
zoom = 1,
popup,
}: OpenLayersProps) {
const [shownLayers, setShownLayers] = useState(
layers.map((layer) => layer.url)
);
const [selected, setSelected] = useState(null);
const [style, setStyle] = useState(null);
useEffect(() => {
const style = new Style({
fill: new Fill({
color: '#eeeeee',
}),
image: new Icon({
anchor: [0.5, 46],
anchorXUnits: 'fraction',
anchorYUnits: 'pixels',
width: 18,
height: 28,
src: 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Google_Maps_icon_%282020%29.svg/418px-Google_Maps_icon_%282020%29.svg.png?20200218211225',
}),
});
setStyle(style);
}, []);
return (
<div className="relative">
<Map
center={fromLonLat(center)}
zoom={zoom}
setSelected={popup ? setSelected : null}
>
<Layers>
<TileLayer source={osm()} zIndex={0} />
{layers.map((layer, index) =>
!layer.heatmap ? (
<VectorLayer
key={index}
zIndex={shownLayers.includes(layer.url) ? 1 : -1}
source={
new VectorSource({
url: layer.url,
format: layer.format
? formats[layer.format]
: new GeoJSON(),
})
}
style={function (feature) {
const id = feature.getId();
const color = feature.get('COLOR') || colors[id % 1302].hex;
style.getFill().setColor(color);
return style;
}}
/>
) : (
<HeatMapLayer
key={index}
zIndex={shownLayers.includes(layer.url) ? 1 : -1}
source={
new VectorSource({
url: layer.url,
format: layer.format
? formats[layer.format]
: new GeoJSON(),
})
}
style={function (feature) {
const color =
feature.get('COLOR') || colors[feature.ol_uid % 1302].hex;
style.getFill().setColor(color);
return style;
}}
/>
)
)}
</Layers>
{/* add a floating pane that will output the ListOfCheckboxes component using tailwind*/}
<div className="absolute bottom-0 right-0 m-4 p-4 z-50 bg-white rounded-lg shadow-xl">
<ListOfCheckboxes
layers={layers}
shownLayers={shownLayers}
setShownLayers={setShownLayers}
/>
</div>
{popup && selected && (
<div className="absolute bottom-0 left-0 m-4 p-4 z-50 bg-white rounded-lg shadow-xl">
{popup(selected)}
</div>
)}
<Controls>
<FullScreenControl />
</Controls>
</Map>
</div>
);
}

View File

@@ -0,0 +1,23 @@
import { useContext, useEffect } from 'react';
import OLTileLayer from 'ol/layer/Tile';
import { MapContext } from './Map';
const TileLayer = ({ source, zIndex = 0 }) => {
const { map } = useContext(MapContext);
useEffect(() => {
if (!map) return;
let tileLayer = new OLTileLayer({
source,
zIndex,
});
map.addLayer(tileLayer);
tileLayer.setZIndex(zIndex);
return () => {
if (map) {
map.removeLayer(tileLayer);
}
};
}, [map]);
return null;
};
export default TileLayer;

View File

@@ -0,0 +1,33 @@
import { useContext, useEffect, useState } from 'react';
import OLVectorLayer from 'ol/layer/Vector';
import { MapContext } from './Map';
const VectorLayer = ({ source, style, zIndex = 0 }) => {
const { map } = useContext(MapContext);
const [vectorLayer, setVectorLayer] = useState(null);
useEffect(() => {
if (!map) return;
let vectorLayer = new OLVectorLayer({
source,
style,
});
const vectorSource = vectorLayer.getSource();
vectorSource.on('featuresloadend', function () {
vectorSource.getFeatures().forEach((feature, index) => {
feature.setId(index);
});
});
map.addLayer(vectorLayer);
setVectorLayer(vectorLayer);
vectorLayer.setZIndex(zIndex);
return () => {
if (map) {
map.removeLayer(vectorLayer);
}
};
}, [map]);
useEffect(() => {
vectorLayer && vectorLayer.setZIndex(zIndex);
}, [zIndex]);
return null;
};
export default VectorLayer;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
/* Temporary fix for a size issue with FlatUiTable loading indicator on Firefox */
@layer base {
svg[tw^='animate-pulse w-12'] {
max-width: 100px;
}
}

View File

@@ -1,10 +1,7 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
/* Temporary fix for a size issue with FlatUiTable loading indicator on Firefox */ @import "tailwindcss/base";
@layer base { @import "tailwindcss/components";
svg[tw^='animate-pulse w-12'] { @import "leaflet";
max-width: 100px; @import "include";
} @import "tailwindcss/utilities";
}

View File

@@ -4,3 +4,5 @@ export * from "./components/LineChart";
export * from "./components/Vega"; export * from "./components/Vega";
export * from "./components/VegaLite"; export * from "./components/VegaLite";
export * from "./components/FlatUiTable"; export * from "./components/FlatUiTable";
export * from './components/OpenLayers/OpenLayers';
export * from "./components/Map";

View File

@@ -0,0 +1,171 @@
/**
* Typescript types for the GeoJSON RFC7946 specification. This is not fully RFC-compliant due to lack of support for
* ranged number data types.
*
* See https://tools.ietf.org/html/rfc7946
*/
export declare namespace GeoJSON {
/**
* Inside this document, the term "geometry type" refers to seven case-sensitive strings: "Point", "MultiPoint",
* "LineString", "MultiLineString", "Polygon", "MultiPolygon", and "GeometryCollection".
*/
export type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon
| GeometryCollection;
export type GeometryType = Geometry["type"];
/**
* ...the term "GeoJSON types" refers to nine case-sensitive strings: "Feature", "FeatureCollection", and the
* geometry types listed above.
*/
export type GeoJson = Geometry | Feature | FeatureCollection;
export type GeoJsonType = GeoJson["type"];
// types
/**
* A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and
* latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY
* be included as an optional third element.
*
* Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are
* unspecified and ambiguous.
*/
export type Position = [longitude: number, latitude: number, elevation?: number]
export type Record = { [key in string | number]: unknown };
/**
* Properties inherit to all GeoJSON types
*/
export interface GeometryBase extends Record {
/**
* A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its
* Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n
* where n is the number of dimensions represented in the contained geometries, with all axes of the most
* southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows
* the axes order of geometries.
*/
bbox?: number[];
/**
* A GeoJSON object MAY have other members.
*
* Members not described in this specification ("foreign members") MAY be used in a GeoJSON document. Note that
* support for foreign members can vary across implementations, and no normative processing model for foreign
* members is defined.
*/
}
// geometry types
export interface Point extends GeometryBase {
type: "Point";
/**
* For type "Point", the "coordinates" member is a single position.
*/
coordinates: Position;
}
export interface MultiPoint extends GeometryBase {
type: "MultiPoint";
/**
* For type "MultiPoint", the "coordinates" member is an array of positions.
*/
coordinates: Position[];
}
export interface LineString extends GeometryBase {
type: "LineString";
/**
* For type "LineString", the "coordinates" member is an array of two or more positions.
*/
coordinates: { 0: Position, 1: Position } & Position[]
}
export interface MultiLineString extends GeometryBase {
type: "MultiLineString";
/**
* For type "MultiLineString", the "coordinates" member is an array of LineString coordinate arrays.
*/
coordinates: LineString["coordinates"][];
}
/**
* To specify a constraint specific to Polygons, it is useful to introduce the concept of a linear ring:
* - A linear ring is a closed LineString with four or more positions.
* - The first and last positions are equivalent, and they MUST contain identical values; their representation
* SHOULD also be identical.
* - A linear ring is the boundary of a surface or the boundary of a hole in a surface.
* - A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are
* counterclockwise, and holes are clockwise.
*/
export type LinearRing = { 0: Position, 1: Position, 2: Position, 3: Position } & Position[];
export interface Polygon extends GeometryBase {
type: "Polygon";
/**
* For type "Polygon", the "coordinates" member MUST be an array of linear ring coordinate arrays.
*
* For Polygons with more than one of these rings, the first MUST be the exterior ring, and any others MUST be
* interior rings. The exterior ring bounds the surface, and the interior rings (if present) bound holes within
* the surface.
*/
coordinates: LinearRing[];
}
export interface MultiPolygon extends GeometryBase {
type: "MultiPolygon";
/**
* For type "MultiPolygon", the "coordinates" member is an array of Polygon coordinate arrays.
*/
coordinates: Polygon["coordinates"][];
}
export interface GeometryCollection {
/**
* A GeoJSON object with type "GeometryCollection" is a Geometry object.
*/
type: "GeometryCollection";
/**
* A GeometryCollection has a member with the name "geometries". The value of "geometries" is an array. Each
* element of this array is a GeoJSON Geometry object. It is possible for this array to be empty.
*/
geometries: Geometry[];
}
// GeoJSON types
export interface Feature {
/**
* A Feature object has a "type" member with the value "Feature".
*/
type: "Feature";
/**
* If a Feature has a commonly used identifier, that identifier SHOULD be included as a member of the Feature object
* with the name "id", and the value of this member is either a JSON string or number.
*/
id?: string | number;
/**
* A Feature object has a member with the name "geometry". The value of the geometry member SHALL be either a
* Geometry object as defined above or, in the case that the Feature is unlocated, a JSON null value.
*/
geometry: Geometry | null;
/**
* A Feature object has a member with the name "properties". The value of the properties member is an object
* (any JSON object or a JSON null value).
*/
properties: Record | null;
}
export interface FeatureCollection {
/**
* A GeoJSON object with the type "FeatureCollection" is a FeatureCollection object.
*/
type: "FeatureCollection";
/**
* A FeatureCollection object has a member with the name "features". The value of "features" is a JSON array. Each
* element of the array is a Feature object as defined above. It is possible for this array to be empty.
*/
features: Feature[];
}
}

View File

@@ -0,0 +1,55 @@
import type { Meta, StoryObj } from '@storybook/react';
import { Map, MapProps } from '../src/components/Map';
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta = {
title: 'Components/Map',
component: Map,
tags: ['autodocs'],
argTypes: {
data: {
description:
'Data to be displayed.\n\n GeoJSON Object \n\nOR\n\n URL to GeoJSON Object',
},
title: {
description: 'Title to display on the map. Optional.',
},
center: {
description: 'Initial coordinates of the center of the map',
},
zoom: {
description: 'Zoom level',
},
tooltip: {
description: 'Tooltip settings'
}
},
};
export default meta;
type Story = StoryObj<MapProps>;
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const GeoJSONPolygons: Story = {
name: 'GeoJSON polygons map',
args: {
data: 'https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_10m_geography_marine_polys.geojson',
title: 'Seas and Oceans Map',
center: { latitude: 45, longitude: 0 },
zoom: 2,
tooltip: { prop: 'name' },
},
};
export const GeoJSONPoints: Story = {
name: 'GeoJSON points map',
args: {
data: 'https://opendata.arcgis.com/datasets/9c58741995174fbcb017cf46c8a42f4b_25.geojson',
title: 'Roads in York',
center: { latitude: 53.9614, longitude: -1.0739 },
zoom: 12,
tooltip: { prop: 'Location' },
},
};

View File

@@ -0,0 +1,136 @@
import type { Meta, StoryObj } from '@storybook/react';
import React from 'react';
import { OpenLayers } from '../src/components/OpenLayers/OpenLayers';
const meta: Meta = {
title: 'Components/OpenLayers',
component: OpenLayers,
argTypes: {
layers: {
description: 'Layers to be added to the map',
control: {
type: 'array',
},
},
center: {
description: 'Center of the map',
defaultValue: [0, 0],
control: {
type: 'array',
},
},
zoom: {
description: 'Zoom level of the map',
defaultValue: 1,
control: {
type: 'number',
},
},
},
};
export default meta;
type Story = StoryObj<any>;
export const Secondary: Story = {
name: 'Map with OpenLayers',
args: {
layers: [
{
url: 'https://openlayers.org/data/vector/ecoregions.json',
name: 'Ecoregions',
},
],
},
};
export const Primary: Story = {
name: 'Map with OpenLayers 2',
args: {
layers: [
{
url: 'https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_10m_geography_marine_polys.geojson',
name: 'Marine regions',
},
],
},
};
export const MapWithPopover: Story = {
name: 'Map with popup',
args: {
layers: [
{
url: 'https://openlayers.org/data/vector/ecoregions.json',
name: 'Ecoregions',
},
],
popup: (feature: any) => {
return (
<div className="flex flex-col gap-y-1" style={{ color: 'red' }}>
<span className="font-bold">Biome name</span>
<span className="text-sm">{feature.values_.BIOME_NAME}</span>
</div>
);
},
},
};
export const Third: Story = {
name: 'Map with two layers',
args: {
layers: [
{
url: 'https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_10m_geography_marine_polys.geojson',
name: 'Marine regions',
},
{
url: 'https://openlayers.org/data/vector/ecoregions.json',
name: 'Ecoregions',
},
],
},
};
export const CustomCenter: Story = {
name: 'Map with custom center and zoom',
args: {
layers: [
{
url: 'https://openlayers.org/data/vector/ecoregions.json',
name: 'Ecoregions',
},
],
center: [-15, 20],
zoom: 4,
},
};
export const PointsOnMap: Story = {
name: 'Map with points on',
args: {
layers: [
{
url: 'https://opendata.arcgis.com/datasets/9c58741995174fbcb017cf46c8a42f4b_25.geojson',
name: 'E-Scooter Parking Bays',
},
],
center: [-1.055429957881787, 53.963900188025301],
zoom: 12,
},
};
export const KMLFile: Story = {
name: 'Map with KML File',
args: {
layers: [
{
url: 'https://openlayers.org/en/latest/examples/data/kml/2012_Earthquakes_Mag5.kml',
name: '2012 Earthquakes M5+',
format: 'kml',
heatmap: true,
},
],
},
};

View File

@@ -1,8 +1,6 @@
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
export default { export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: { theme: {},
extend: {},
},
plugins: [], plugins: [],
}; };

View File

@@ -1,29 +1,15 @@
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react-swc';
import path from 'node:path' import path from 'node:path';
import { defineConfig } from 'vitest/config' import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts' import dts from 'vite-plugin-dts';
import tailwindcss from 'tailwindcss' import tailwindcss from 'tailwindcss';
import { UserConfigExport } from 'vite' import { UserConfigExport } from 'vite';
import replace from "rollup-plugin-re" import replace from 'rollup-plugin-re';
const app = async (): Promise<UserConfigExport> => { const app = async (): Promise<UserConfigExport> => {
return defineConfig({ return defineConfig({
plugins: [ plugins: [
react(), react(),
replace({
patterns: [
{
match: /js-sha256/,
test: `eval("require('crypto')")`,
replace: `require('crypto')`,
},
{
match: /js-sha256/,
test: `eval("require('buffer').Buffer")`,
replace: `require('buffer').Buffer`,
},
],
}),
dts({ dts({
insertTypesEntry: true, insertTypesEntry: true,
}), }),
@@ -34,6 +20,7 @@ const app = async (): Promise<UserConfigExport> => {
}, },
}, },
build: { build: {
target: 'es2020',
lib: { lib: {
entry: path.resolve(__dirname, 'src/index.ts'), entry: path.resolve(__dirname, 'src/index.ts'),
name: 'components', name: 'components',
@@ -41,12 +28,27 @@ const app = async (): Promise<UserConfigExport> => {
fileName: (format) => `components.${format}.js`, fileName: (format) => `components.${format}.js`,
}, },
rollupOptions: { rollupOptions: {
external: ['react', 'react-dom', 'tailwindcss', 'vega-lite', 'vega', 'react-vega'], external: [
'react',
'ol-mapbox-style',
'react-dom',
'tailwindcss',
'vega-lite',
'vega',
'react-vega',
'ol',
'leaflet'
],
output: { output: {
manualChunks: undefined,
globals: { globals: {
react: 'React', react: 'React',
ol: 'ol',
'ol-mapbox-style': 'ol-mapbox-style',
'react-vega': 'react-vega',
'react-dom': 'ReactDOM', 'react-dom': 'ReactDOM',
tailwindcss: 'tailwindcss', tailwindcss: 'tailwindcss',
leaflet: 'leaflet'
}, },
}, },
}, },
@@ -55,7 +57,7 @@ const app = async (): Promise<UserConfigExport> => {
globals: true, globals: true,
environment: 'jsdom', environment: 'jsdom',
}, },
}) });
} };
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default app export default app;

View File

@@ -0,0 +1,64 @@
// vite.config.ts
import react from "file:///home/urutu-branco/Projetos/portaljs/node_modules/@vitejs/plugin-react-swc/index.mjs";
import path from "node:path";
import { defineConfig } from "file:///home/urutu-branco/Projetos/portaljs/node_modules/vitest/dist/config.js";
import dts from "file:///home/urutu-branco/Projetos/portaljs/node_modules/vite-plugin-dts/dist/index.mjs";
import tailwindcss from "file:///home/urutu-branco/Projetos/portaljs/node_modules/tailwindcss/lib/index.js";
var __vite_injected_original_dirname = "/home/urutu-branco/Projetos/portaljs/packages/components";
var app = async () => {
return defineConfig({
plugins: [
react(),
dts({
insertTypesEntry: true
})
],
css: {
postcss: {
plugins: [tailwindcss]
}
},
build: {
target: "es2020",
lib: {
entry: path.resolve(__vite_injected_original_dirname, "src/index.ts"),
name: "components",
formats: ["es", "umd"],
fileName: (format) => `components.${format}.js`
},
rollupOptions: {
external: [
"react",
"ol-mapbox-style",
"react-dom",
"tailwindcss",
"vega-lite",
"vega",
"react-vega",
"ol",
"ol/dom.js"
],
output: {
manualChunks: void 0,
globals: {
react: "React",
ol: "ol",
"ol/dom.js": "ol/dom.js",
"react-vega": "react-vega",
"react-dom": "ReactDOM",
tailwindcss: "tailwindcss"
}
}
}
},
test: {
globals: true,
environment: "jsdom"
}
});
};
var vite_config_default = app;
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvaG9tZS91cnV0dS1icmFuY28vUHJvamV0b3MvcG9ydGFsanMvcGFja2FnZXMvY29tcG9uZW50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiL2hvbWUvdXJ1dHUtYnJhbmNvL1Byb2pldG9zL3BvcnRhbGpzL3BhY2thZ2VzL2NvbXBvbmVudHMvdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL2hvbWUvdXJ1dHUtYnJhbmNvL1Byb2pldG9zL3BvcnRhbGpzL3BhY2thZ2VzL2NvbXBvbmVudHMvdml0ZS5jb25maWcudHNcIjtpbXBvcnQgcmVhY3QgZnJvbSAnQHZpdGVqcy9wbHVnaW4tcmVhY3Qtc3djJztcbmltcG9ydCBwYXRoIGZyb20gJ25vZGU6cGF0aCc7XG5pbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tICd2aXRlc3QvY29uZmlnJztcbmltcG9ydCBkdHMgZnJvbSAndml0ZS1wbHVnaW4tZHRzJztcbmltcG9ydCB0YWlsd2luZGNzcyBmcm9tICd0YWlsd2luZGNzcyc7XG5pbXBvcnQgeyBVc2VyQ29uZmlnRXhwb3J0IH0gZnJvbSAndml0ZSc7XG5pbXBvcnQgcmVwbGFjZSBmcm9tICdyb2xsdXAtcGx1Z2luLXJlJztcblxuY29uc3QgYXBwID0gYXN5bmMgKCk6IFByb21pc2U8VXNlckNvbmZpZ0V4cG9ydD4gPT4ge1xuICByZXR1cm4gZGVmaW5lQ29uZmlnKHtcbiAgICBwbHVnaW5zOiBbXG4gICAgICByZWFjdCgpLFxuICAgICAgZHRzKHtcbiAgICAgICAgaW5zZXJ0VHlwZXNFbnRyeTogdHJ1ZSxcbiAgICAgIH0pLFxuICAgIF0sXG4gICAgY3NzOiB7XG4gICAgICBwb3N0Y3NzOiB7XG4gICAgICAgIHBsdWdpbnM6IFt0YWlsd2luZGNzc10sXG4gICAgICB9LFxuICAgIH0sXG4gICAgYnVpbGQ6IHtcbiAgICAgIHRhcmdldDogJ2VzMjAyMCcsXG4gICAgICBsaWI6IHtcbiAgICAgICAgZW50cnk6IHBhdGgucmVzb2x2ZShfX2Rpcm5hbWUsICdzcmMvaW5kZXgudHMnKSxcbiAgICAgICAgbmFtZTogJ2NvbXBvbmVudHMnLFxuICAgICAgICBmb3JtYXRzOiBbJ2VzJywgJ3VtZCddLFxuICAgICAgICBmaWxlTmFtZTogKGZvcm1hdCkgPT4gYGNvbXBvbmVudHMuJHtmb3JtYXR9LmpzYCxcbiAgICAgIH0sXG4gICAgICByb2xsdXBPcHRpb25zOiB7XG4gICAgICAgIGV4dGVybmFsOiBbXG4gICAgICAgICAgJ3JlYWN0JyxcbiAgICAgICAgICAnb2wtbWFwYm94LXN0eWxlJyxcbiAgICAgICAgICAncmVhY3QtZG9tJyxcbiAgICAgICAgICAndGFpbHdpbmRjc3MnLFxuICAgICAgICAgICd2ZWdhLWxpdGUnLFxuICAgICAgICAgICd2ZWdhJyxcbiAgICAgICAgICAncmVhY3QtdmVnYScsXG4gICAgICAgICAgJ29sJyxcbiAgICAgICAgICAnb2wvZG9tLmpzJyxcbiAgICAgICAgXSxcbiAgICAgICAgb3V0cHV0OiB7XG4gICAgICAgICAgbWFudWFsQ2h1bmtzOiB1bmRlZmluZWQsXG4gICAgICAgICAgZ2xvYmFsczoge1xuICAgICAgICAgICAgcmVhY3Q6ICdSZWFjdCcsXG4gICAgICAgICAgICBvbDogJ29sJyxcbiAgICAgICAgICAgICdvbC9kb20uanMnOiAnb2wvZG9tLmpzJyxcbiAgICAgICAgICAgICdyZWFjdC12ZWdhJzogJ3JlYWN0LXZlZ2EnLFxuICAgICAgICAgICAgJ3JlYWN0LWRvbSc6ICdSZWFjdERPTScsXG4gICAgICAgICAgICB0YWlsd2luZGNzczogJ3RhaWx3aW5kY3NzJyxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICB9LFxuICAgIHRlc3Q6IHtcbiAgICAgIGdsb2JhbHM6IHRydWUsXG4gICAgICBlbnZpcm9ubWVudDogJ2pzZG9tJyxcbiAgICB9LFxuICB9KTtcbn07XG4vLyBodHRwczovL3ZpdGVqcy5kZXYvY29uZmlnL1xuZXhwb3J0IGRlZmF1bHQgYXBwO1xuIl0sCiAgIm1hcHBpbmdzIjogIjtBQUEwVixPQUFPLFdBQVc7QUFDNVcsT0FBTyxVQUFVO0FBQ2pCLFNBQVMsb0JBQW9CO0FBQzdCLE9BQU8sU0FBUztBQUNoQixPQUFPLGlCQUFpQjtBQUp4QixJQUFNLG1DQUFtQztBQVF6QyxJQUFNLE1BQU0sWUFBdUM7QUFDakQsU0FBTyxhQUFhO0FBQUEsSUFDbEIsU0FBUztBQUFBLE1BQ1AsTUFBTTtBQUFBLE1BQ04sSUFBSTtBQUFBLFFBQ0Ysa0JBQWtCO0FBQUEsTUFDcEIsQ0FBQztBQUFBLElBQ0g7QUFBQSxJQUNBLEtBQUs7QUFBQSxNQUNILFNBQVM7QUFBQSxRQUNQLFNBQVMsQ0FBQyxXQUFXO0FBQUEsTUFDdkI7QUFBQSxJQUNGO0FBQUEsSUFDQSxPQUFPO0FBQUEsTUFDTCxRQUFRO0FBQUEsTUFDUixLQUFLO0FBQUEsUUFDSCxPQUFPLEtBQUssUUFBUSxrQ0FBVyxjQUFjO0FBQUEsUUFDN0MsTUFBTTtBQUFBLFFBQ04sU0FBUyxDQUFDLE1BQU0sS0FBSztBQUFBLFFBQ3JCLFVBQVUsQ0FBQyxXQUFXLGNBQWM7QUFBQSxNQUN0QztBQUFBLE1BQ0EsZUFBZTtBQUFBLFFBQ2IsVUFBVTtBQUFBLFVBQ1I7QUFBQSxVQUNBO0FBQUEsVUFDQTtBQUFBLFVBQ0E7QUFBQSxVQUNBO0FBQUEsVUFDQTtBQUFBLFVBQ0E7QUFBQSxVQUNBO0FBQUEsVUFDQTtBQUFBLFFBQ0Y7QUFBQSxRQUNBLFFBQVE7QUFBQSxVQUNOLGNBQWM7QUFBQSxVQUNkLFNBQVM7QUFBQSxZQUNQLE9BQU87QUFBQSxZQUNQLElBQUk7QUFBQSxZQUNKLGFBQWE7QUFBQSxZQUNiLGNBQWM7QUFBQSxZQUNkLGFBQWE7QUFBQSxZQUNiLGFBQWE7QUFBQSxVQUNmO0FBQUEsUUFDRjtBQUFBLE1BQ0Y7QUFBQSxJQUNGO0FBQUEsSUFDQSxNQUFNO0FBQUEsTUFDSixTQUFTO0FBQUEsTUFDVCxhQUFhO0FBQUEsSUFDZjtBQUFBLEVBQ0YsQ0FBQztBQUNIO0FBRUEsSUFBTyxzQkFBUTsiLAogICJuYW1lcyI6IFtdCn0K

View File

@@ -1,5 +1,23 @@
# @portaljs/core # @portaljs/core
## 1.0.6
### Patch Changes
- [#958](https://github.com/datopian/portaljs/pull/958) [`c4bf5bd0`](https://github.com/datopian/portaljs/commit/c4bf5bd05401982125750e61a27ed31f9bb14a4d) Thanks [@olayway](https://github.com/olayway)! - Add basic Hero component.
## 1.0.5
### Patch Changes
- [`6f0da8c3`](https://github.com/datopian/portaljs/commit/6f0da8c3a3cde4dc7512c6529eb662de6f4fe56a) Thanks [@olayway](https://github.com/olayway)! - Fix public API (`exports`, `types`, and `main` fields in `package.json`).
## 1.0.4
### Patch Changes
- [`6bf6c8fa`](https://github.com/datopian/portaljs/commit/6bf6c8faf4eefc2b0a7f309d83ba8aac19141bb7) Thanks [@olayway](https://github.com/olayway)! - Bump mdx-mermaid to v2.0.0-rc7 as a workaround for [mermaid import tag showing at the top of pages as plain text](https://github.com/sjwall/mdx-mermaid/issues/88), and move it to peer-dependencies.
## 1.0.3 ## 1.0.3
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@portaljs/core", "name": "@portaljs/core",
"version": "1.0.3", "version": "1.0.6",
"description": "Core Portal.JS components, configs and utils.", "description": "Core Portal.JS components, configs and utils.",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -23,7 +23,14 @@
"dist" "dist"
], ],
"type": "module", "type": "module",
"main": "./dist/index.js", "module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"import": "./dist/index.js"
}
},
"dependencies": { "dependencies": {
"@docsearch/react": "^3.3.3", "@docsearch/react": "^3.3.3",
"@floating-ui/react-dom": "^1.3.0", "@floating-ui/react-dom": "^1.3.0",
@@ -35,7 +42,6 @@
"disqus-react": "^1.1.5", "disqus-react": "^1.1.5",
"framer-motion": "^10.0.1", "framer-motion": "^10.0.1",
"kbar": "0.1.0-beta.40", "kbar": "0.1.0-beta.40",
"mdx-mermaid": "^1.3.2",
"mermaid": "^10.2.2", "mermaid": "^10.2.2",
"prop-types": "^15.8.1" "prop-types": "^15.8.1"
}, },
@@ -43,6 +49,7 @@
"next": "^13.2.1", "next": "^13.2.1",
"next-themes": "^0.2.1", "next-themes": "^0.2.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0",
"mdx-mermaid": "2.0.0-rc7"
} }
} }

View File

@@ -0,0 +1,90 @@
interface Button {
title: string;
href: string;
type: 'filled' | 'text'
}
export interface HeroProps {
title: string;
subtitle?: string;
announcement?: {
title: string;
href?: string;
};
buttons?: Array<Button>
}
const buttonStyle = {
'filled': "rounded-md bg-secondary px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-secondary/90 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",
'text': "text-sm font-semibold leading-6"
}
export const Hero: React.FC<HeroProps> = ({ title, subtitle, announcement, buttons }) => {
return (
<div className="text-primary dark:text-primary-dark">
<div className="relative isolate px-6 pt-14 lg:px-8">
{/* <div
className="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true"
>
<div
className="relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 rotate-[30deg] bg-gradient-to-tr from-[#38bdf8] to-[#89a8fc] opacity-30 sm:left-[calc(50%-30rem)] sm:w-[72.1875rem]"
style={{
clipPath:
'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',
}}
/>
</div> */}
<div className="mx-auto max-w-2xl py-16 sm:py-32 lg:py-40">
{announcement && (
<div className="hidden sm:mb-8 sm:flex sm:justify-center">
<div className="relative rounded-full px-3 py-1 text-sm leading-6 ring-1 ring-primary/20 hover:ring-primary/30 dark:ring-primary-dark/30 dark:hover:ring-primary-dark/40">
{announcement.title}{' '}
<a href="#" className="font-semibold text-secondary">
<span className="absolute inset-0" aria-hidden="true" />
Read more <span aria-hidden="true">&rarr;</span>
</a>
</div>
</div>
)}
<div className="text-center">
<h1 className="text-4xl font-bold tracking-tight sm:text-6xl">
{title}
</h1>
{subtitle && (
<p className="mt-6 text-lg leading-8 text-primary/90 dark:text-primary-dark/80">
{subtitle}
</p>
)}
{buttons && buttons.length && (
<div className="mt-10 flex items-center justify-center gap-x-6">
{buttons.map((b) => (
<a
href={b.href}
className={buttonStyle[b.type]}
>
{b.title}
</a>
))}
</div>
)}
</div>
</div>
{/* <div
className="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
aria-hidden="true"
>
<div
className="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-[#89a8fc] to-[#38bdf8] opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
style={{
clipPath:
'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',
}}
/>
</div> */}
</div>
</div>
)
}

View File

@@ -0,0 +1 @@
export { Hero } from "./Hero"

View File

@@ -18,5 +18,5 @@ export { BlogLayout } from "./BlogLayout";
export { Mermaid } from "./Mermaid"; export { Mermaid } from "./Mermaid";
export { SiteToc, NavItem, NavGroup } from "./SiteToc"; export { SiteToc, NavItem, NavGroup } from "./SiteToc";
export { Comments, CommentsConfig } from "./Comments"; export { Comments, CommentsConfig } from "./Comments";
export { AuthorConfig } from "./types"; export { AuthorConfig } from "./types";
export { Hero } from "./Hero";

View File

@@ -1,5 +1,17 @@
# @portaljs/remark-callouts # @portaljs/remark-callouts
## 1.0.5
### Patch Changes
- [`6f0da8c3`](https://github.com/datopian/portaljs/commit/6f0da8c3a3cde4dc7512c6529eb662de6f4fe56a) Thanks [@olayway](https://github.com/olayway)! - Fix public API (`exports`, `types`, and `main` fields in `package.json`).
## 1.0.4
### Patch Changes
- [`affca05`](https://github.com/datopian/portaljs/commit/affca0505851a87a4295045b60a78926d34eef78) Thanks [@olayway](https://github.com/olayway)! - Fix: incorrect path to styles.css in package.json exports field.
## 1.0.3 ## 1.0.3
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@portaljs/remark-callouts", "name": "@portaljs/remark-callouts",
"version": "1.0.3", "version": "1.0.5",
"description": "Remark plugin to add support for blockquote-based admonitions/callouts", "description": "Remark plugin to add support for blockquote-based admonitions/callouts",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -36,12 +36,15 @@
"unist-util-visit": "^4.1.0" "unist-util-visit": "^4.1.0"
}, },
"type": "module", "type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": { "exports": {
".": { ".": {
"types": "./dist/index.d.ts", "types": "./dist/src/index.d.ts",
"import": "./dist/index.js", "import": "./dist/index.js",
"require": "./dist/index.cjs" "require": "./dist/index.cjs"
}, },
"./styles.css": "./styles.css" "./styles.css": "./dist/styles.css"
} }
} }

View File

@@ -1,5 +1,11 @@
# @portaljs/remark-embed # @portaljs/remark-embed
## 1.0.4
### Patch Changes
- [`6f0da8c3`](https://github.com/datopian/portaljs/commit/6f0da8c3a3cde4dc7512c6529eb662de6f4fe56a) Thanks [@olayway](https://github.com/olayway)! - Fix public API (`exports`, `types`, and `main` fields in `package.json`).
## 1.0.3 ## 1.0.3
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@portaljs/remark-embed", "name": "@portaljs/remark-embed",
"version": "1.0.3", "version": "1.0.4",
"description": "Converts youtube link in mdx to an iframe embed", "description": "Converts youtube link in mdx to an iframe embed",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -32,9 +32,12 @@
"unist-util-visit": "^4.1.1" "unist-util-visit": "^4.1.1"
}, },
"type": "module", "type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": { "exports": {
".": { ".": {
"types": "./dist/index.d.ts", "types": "./dist/src/index.d.ts",
"import": "./dist/index.js", "import": "./dist/index.js",
"require": "./dist/index.cjs" "require": "./dist/index.cjs"
} }

View File

@@ -1,5 +1,11 @@
# @portaljs/remark-wiki-link # @portaljs/remark-wiki-link
## 1.0.4
### Patch Changes
- [`6f0da8c3`](https://github.com/datopian/portaljs/commit/6f0da8c3a3cde4dc7512c6529eb662de6f4fe56a) Thanks [@olayway](https://github.com/olayway)! - Fix public API (`exports`, `types`, and `main` fields in `package.json`).
## 1.0.3 ## 1.0.3
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@portaljs/remark-wiki-link", "name": "@portaljs/remark-wiki-link",
"version": "1.0.3", "version": "1.0.4",
"description": "Parse and render wiki-style links in markdown especially Obsidian style links.", "description": "Parse and render wiki-style links in markdown especially Obsidian style links.",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -35,9 +35,12 @@
"micromark-util-symbol": "^1.0.1" "micromark-util-symbol": "^1.0.1"
}, },
"type": "module", "type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/src/index.d.ts",
"exports": { "exports": {
".": { ".": {
"types": "./dist/index.d.ts", "types": "./dist/src/index.d.ts",
"import": "./dist/index.js", "import": "./dist/index.js",
"require": "./dist/index.cjs" "require": "./dist/index.cjs"
} }

View File

@@ -3,8 +3,9 @@
"compilerOptions": { "compilerOptions": {
"types": ["node"], "types": ["node"],
"outDir": "dist", "outDir": "dist",
"forceConsistentCasingInFileNames": true "forceConsistentCasingInFileNames": true,
"declaration": true
}, },
"exclude": ["**/*.spec.ts"], "exclude": ["**/*.spec.ts"],
"include": ["**/*.ts", "**/*.js"] "include": ["src/**/*.ts"]
} }

View File

@@ -1,7 +1,8 @@
import { MDXRemote } from 'next-mdx-remote'; import { MDXRemote } from 'next-mdx-remote';
import { NextSeo } from 'next-seo';
import layouts from 'layouts'; import layouts from 'layouts';
import DocsPagination from './DocsPagination'; import DocsPagination from './DocsPagination';
import { NextSeo } from 'next-seo'; import { Hero } from "@portaljs/core";
export default function MDXPage({ source, frontMatter }) { export default function MDXPage({ source, frontMatter }) {
const Layout = ({ children }) => { const Layout = ({ children }) => {
@@ -14,7 +15,7 @@ export default function MDXPage({ source, frontMatter }) {
return ( return (
<Layout> <Layout>
<MDXRemote {...source} components={{ DocsPagination, NextSeo }} /> <MDXRemote {...source} components={{ DocsPagination, NextSeo, Hero }} />
</Layout> </Layout>
); );
} }

View File

@@ -1,4 +1,4 @@
import { defaultConfig } from "@flowershow/core"; import { defaultConfig } from "@portaljs/core";
import userConfig from "../content/config"; import userConfig from "../content/config";
export const siteConfig: any = { export const siteConfig: any = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 KiB

View File

@@ -0,0 +1,201 @@
---
title: Create a catalog of anything using Markdown files in Obsidian
date: 2023-05-30
authors: ['Ola Rubaj']
filetype: 'blog'
---
![[dataview.gif]]
Have you ever wanted to create a catalog of stuff? Maybe it's a list of personal projects, maybe favourite books or movies, or perhaps the options for the next smartphone you'll buy. But you've found yourself deterred by expensive software, lack of flexibility in capturing and modifying the structure of the data, or lack of control over it?
Markdown files, with their unique combination of 1) rich content, including text, images, links, and more, with 2) structured metadata allowing for data retrieval, are an excellent tool for this task. These features, coupled with the user-friendly interface of Obsidian and the analytical power of the Dataview plugin, make creating a data catalog an easy task. And it's free!
This tutorial will provide you with an easy yet extendable approach to creating your personal data catalogs using Markdown, in Obsidian.
## What are we going to build?
In this tutorial, we're going to create a catalog of characters from the Harry Potter series. Each character will have their own markdown file containing some unstructured data like character's quotes, as well as structured metadata, such as the character's name, house, creature they own, and status (alive or dead).
## Step 1: Setup
Here are the steps to get you started:
1. Download and install Obsidian from their [official website](https://obsidian.md/).
2. Create a new Obsidian vault.
1. Open the app.
2. Click the "New" button to create a new vault.
3. Choose a name and a location for your vault. For this tutorial, you might name it "Harry Potter Characters".
4. Click "Create" to create the vault.
3. Install the ["Dataview" plugin](https://github.com/blacksmithgu/obsidian-dataview) from Obsidian's community plugins.
1. Open the newly created vault in Obsidian.
2. Click on the settings icon ⚙️ in the left-hand pane to open the Settings view.
3. In the Settings view, find the "Community plugins" section and click on it.
4. Click on the button "Turn on community plugins".
5. Click on "Browse" and search for "Dataview" in the plugin browser.
6. Click on "Install" to install the Dataview plugin.
7. After the plugin is installed, click on "Enable" to enable the plugin in your vault.
## Step 2: Add some data about the characters
Let's start by creating a subfolder in our Obsidian vault, that will store all the markdown files with our characters data. Let's name it e.g. `/characters`. Then, we're going to create three markdown files in it for data about Harry Potter, Hermione, and Malfoy.
Here's an example file for Harry Potter:
```md
---
name: Harry Potter
house: Gryffindor
status: Alive
---
## Quotes
"I solemnly swear I am up to no good."
```
Here's an example file for Hermione:
```md
---
name: Hermione Granger
house: Gryffindor
status: Alive
---
## Quotes
"Books! And cleverness! There are more important things - friendship and bravery."
```
Here's an example file for Malfoy:
```md
---
name: Draco Malfoy
house: Slytherin
status: Alive
---
Draco Malfoy is Harry's rival and a member of Slytherin House.
## Quotes
"My father will hear about this!"
```
By the end of this step you should end up with the following folder structure:
```
Harry Potter Characters
└── characters
├── Harry Potter.md
├── Hermione.md
└── Malfoy.md
```
## Step 3: Create a data catalog
Now let's create a data catalog of our Harry Potter characters!
In the root of our vault, let's create a file called `Catalog` (but you can name it whatever you want) that's going to display a table with all our characters and their metadata. Inside it, we're going to write the following code block with a simple Dataview query:
````md
```dataview
table name, house, status
from "characters"
sort name asc
```
````
Let's break it down:
- `table name, house, status`: This line instructs Dataview to create a table that includes columns for "name", "house", and "status". These are fields that you should have defined in your markdown files' frontmatter, but you don't have to. For any missing field Dataview will just display `-`.
- `from "characters"`: This tells Dataview to pull the data from all markdown files located in the `/characters` folder in your Obsidian vault.
- `sort name asc`: This command sorts the data based on the "name" field, in ascending order.
After you click somewhere outside of this code block, you should see the following table:
![[table1.png]]
## Step 4: Add more metadata about characters
We can continue to add more information about our characters. For example, let's add creatures each character owns:
```md=
---
name: Harry Potter
...
creature: Hedwig (Owl)
---
...
---
name: Hermione Granger
...
creature: Crookshanks (Cat)
---
...
```
Now, if we want to show this field in our Dataview table, we need to add it to the first line of our dataview code block:
````md
```dataview
table name, house, status, creature
from "characters"
sort name asc
```
````
After clicking somewhere outside the code block, you should see an updated table that includes the column `creature`.
![[table2.png]]
## Step 5: Enrich content with images and links
To enhance your catalog, you can add images of characters, and links to other characters in your markdown content.
#### Add images
To add an image of a character, right-click on the image you want to embed and copy it to clipboard - you can use the image below - and paste it directly in your markdown file.
![[harry_original.png]]
Obsidian will automatically save the file to the root of your vault and create a link to it in your content, so you'll end up with a link similar to this one:
```md
![[Pasted image 20230525212302.png]]
```
Which will render as:
![[harry.png]]
#### Add links to other pages
Obsidian allows you to create links between different notes (or in this case, characters). To add a link to another character, use the double bracket `[[]]` syntax.
For example, if you're writing about Harry Potter and want to mention that he is friends with Hermione, you can link to Hermione's markdown file like this:
```md
He is a friend of [[Hermione]].
```
When you click on Hermione's name in the rendered link, Obsidian will take you to Hermione's file in your vault. If you hover over it, you'll see a preview of Hermione's file:
![[link-preview.png]]
## Summary
And there you have it! We've walked through the process of creating a personal data catalog using markdown files, the Obsidian application, and its Dataview plugin. We've transformed scattered data into a well-organized, easy-to-navigate, and visually pleasing catalog. Whether you've used our example of a Harry Potter character catalog or applied these steps to a different topic of your choosing, we hope you've found this tutorial helpful and empowering.
Happy data cataloging!
---
You can find the [vault created in this tutorial here](https://github.com/datopian/markdowndb/tree/main/examples/obsidian-dataview).

View File

@@ -0,0 +1,190 @@
---
title: 'Tutorial 1: Create a website from scratch using Markdown and PortalJS'
date: 2023-06-20
authors: ['Ola Rubaj']
filetype: 'blog'
---
In this tutorial we will walk you through creating an elegant, fully functional website written in simple markdown and published with PortalJS.
By the end of this tutorial you will:
- have a working markdown-based website powered by PortalJS.
- be able to edit the text and add pages, all from an online interface without installing anything.
Below is a screenshot of how the final website will look like:
![[tutorial-1-result.png]]
## Prerequisites
- A [GitHub](https://github.com/) account.
- A [Vercel](https://vercel.com/) account. You can set it up using your GitHub account.
## Setting up a sandbox website
### 1. Navigate to the [datopian/flowershow repository](https://github.com/datopian/flowershow).
### 2. Scroll down and click on the "Deploy" button
After clicking on it, you'll be redirected to Vercel's "Create Git Repository" page.
![Step 2 screenshot](https://images.tango.us/workflows/9bef984b-9dd1-4c07-ae32-88bb426c306e/steps/35cb9df6-d93e-4ce6-9741-54be744cf9e7/55ca0e14-6780-40e3-9ecc-148a7fa7c08e.png?crop=focalpoint&fit=crop&fp-x=0.0945&fp-y=0.4783&fp-z=2.5970&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=162&mark-y=440&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0yNjUmaD03MiZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
### 3. Select your GitHub account in "Git Scope"
Click on "Select Git Scope" dropdown and select your GitHub account name from the list if it's there.
![Step 3 screenshot](https://images.tango.us/workflows/9bef984b-9dd1-4c07-ae32-88bb426c306e/steps/bdd61961-e1fe-4282-abec-75ae66bfeaa5/85df39b9-51a8-410a-a83b-93f2d2d6256c.png?crop=focalpoint&fit=crop&fp-x=0.2455&fp-y=0.4226&fp-z=1.4615&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=94&mark-y=427&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz02NzQmaD05OSZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
If your GitHub account is not available in the dropdown list, click on "Add GitHub Account"...
![Step 3 screenshot](https://images.tango.us/workflows/9bef984b-9dd1-4c07-ae32-88bb426c306e/steps/879ebed5-fec7-443e-8be9-66b73a4ec044/583f8a42-fc35-43d8-b791-70e22976ed46.png?crop=focalpoint&fit=crop&fp-x=0.2455&fp-y=0.5030&fp-z=1.5031&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=113&mark-y=429&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz02NTkmaD05NCZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
...and authorize Vercel to access your GitHub repositories by clicking "Install".
![Step 3 screenshot](https://images.tango.us/workflows/9bef984b-9dd1-4c07-ae32-88bb426c306e/steps/61441f7d-ccc4-45ca-b52d-4ccc0573d787/ff97c393-2fff-407e-abe2-bc96c18562cc.png?crop=focalpoint&fit=crop&fp-x=0.2922&fp-y=0.7621&fp-z=2.4427&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=440&mark-y=385&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0zMjEmaD0xMjgmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
Now you can select your GitHub account.
![Step 3 screenshot](https://images.tango.us/workflows/9bef984b-9dd1-4c07-ae32-88bb426c306e/steps/d2382391-f4bc-4ffe-b8e8-e22b9f6550ad/f4817109-ae2e-49f9-98ad-2f8dfe9a5b3b.png?crop=focalpoint&fit=crop&fp-x=0.2455&fp-y=0.5833&fp-z=1.5031&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=113&mark-y=429&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz02NTkmaD05NCZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
### 4. Give your repository a name
A good practice is to use lowercase and dashes.
![Step 4 screenshot](https://images.tango.us/workflows/9bef984b-9dd1-4c07-ae32-88bb426c306e/steps/a9b6af4c-4645-4b93-9c28-75d23e7f48a3/55dcaf47-8851-4808-ab9e-6fe6c4d552aa.png?crop=focalpoint&fit=crop&fp-x=0.6919&fp-y=0.4929&fp-z=1.7767&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=57&mark-y=416&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0xMDg2Jmg9MTIxJmZpdD1jcm9wJmNvcm5lci1yYWRpdXM9MTA%3D)
### 5. Click on "Create" and wait until the site deploys
After you click "Create", Vercel will create a new repository on your GitHub account, using the `datopian/flowershow` repository as a template. Then, it will immediately start buidling the initial version of your website. This may take about 1-2 minutes.
![Step 5 screenshot](https://images.tango.us/workflows/9bef984b-9dd1-4c07-ae32-88bb426c306e/steps/ae740310-736d-48e5-9fbf-cf567a2ff966/2bc653a7-0e6c-4eaa-a11b-85a2a4d4c1d3.png?crop=focalpoint&fit=crop&fp-x=0.5007&fp-y=0.5152&fp-z=1.0564&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=33&mark-y=379&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0xMTM0Jmg9MTk1JmZpdD1jcm9wJmNvcm5lci1yYWRpdXM9MTA%3D)
### 6. See your published website!
And voila! Your site is up and running. Once on the "Congratulations" screen, navigate to the project dashboard...
![Step 6 screenshot](https://images.tango.us/workflows/9bef984b-9dd1-4c07-ae32-88bb426c306e/steps/1df8967e-2bcf-43ec-b3d0-a9d638d21ff7/af6d363d-2872-4a45-b5e5-16ca754e4702.png?crop=focalpoint&fit=crop&fp-x=0.5005&fp-y=0.3351&fp-z=1.8197&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=328&mark-y=414&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz01NDUmaD0xMjQmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
... and click on "Visit" to see your published website!
![Step 6 screenshot](https://images.tango.us/workflows/9bef984b-9dd1-4c07-ae32-88bb426c306e/steps/319f8eef-5007-4885-a3d6-6dc7fd7472ea/80b34413-f7da-4765-90d6-89a93fb4eab5.png?crop=focalpoint&fit=crop&fp-x=0.0697&fp-y=0.3482&fp-z=2.5500&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=72&mark-y=390&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0yODImaD0xNzQmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
## Editing a page on your website
Once your site is up and running, the next step is to customize it to your liking. Let's start by editing our home page.
### 1. Navigate to the repository of your website on GitHub
You can get there by going to GitHub, clicking on your profile icon, and going to "Your repositories".
![Step 1 screenshot](https://images.tango.us/workflows/5b5166f4-2965-4a91-9bec-47108fe34234/steps/adecdf18-e46a-4003-984e-1dc1945963df/6792cf00-20fc-4e24-88ca-8d35a41aadab.png?crop=focalpoint&fit=crop&fp-x=0.9589&fp-y=0.0345&fp-z=3.0108&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=992&mark-y=53&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0xMjAmaD05MiZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
![Step 1 screenshot](https://images.tango.us/workflows/5b5166f4-2965-4a91-9bec-47108fe34234/steps/8578ff07-5dc9-4908-bc81-197293970344/9b01a3fb-47fe-48ed-a7bc-c9910e9e42ef.png?crop=focalpoint&fit=crop&fp-x=0.8963&fp-y=0.1997&fp-z=2.9422&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=553&mark-y=420&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz01NjImaD0xMTImZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
Or, you can navigate to [your Vercel dashboard](https://vercel.com/dashboard), select your project in the "Overview" tab...
![Step 1 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/b7f96b7d-28b1-4366-b889-681b327b5f40/a0d2bffd-2e81-4878-854b-0766cf710339.png?crop=focalpoint&fit=crop&fp-x=0.2578&fp-y=0.4408&fp-z=1.3063&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=39&mark-y=274&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz03MzAmaD00MDQmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
...and click on "Git Repository". You'll be redirected to the repository of your website on GitHub.
![Step 1 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/2cfbda16-23dc-45b2-9be9-a4b5b3a255d1/da2be1ca-da13-4257-a830-3ece2b89ff51.png?crop=focalpoint&fit=crop&fp-x=0.4560&fp-y=0.4590&fp-z=1.1707&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=321&mark-y=313&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0yMjYmaD04MCZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
### 2. Navigate to the "content" folder
This is where all the Markdown-based pages live in a Flowershow-based project.
![Step 2 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/4ce5b74e-40e5-4c3f-a3ce-be7fa8959489/25b9ddc8-c1df-44f8-bf3e-7d08960f0592.png?crop=focalpoint&fit=crop&fp-x=0.0900&fp-y=0.4574&fp-z=2.8680&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=226&mark-y=441&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0xNjgmaD03MCZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
### 3. Edit the "index.md" file
The homepage on your website is built with the "index.md" file in the root of the "content" folder. Click on it to open.
![Step 3 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/b14c059d-89e4-419b-8ac4-0e219ed195af/4d86a32a-b5f8-48d1-bccd-ddbfd140fe5a.png?crop=focalpoint&fit=crop&fp-x=0.0754&fp-y=0.4711&fp-z=2.7997&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=157&mark-y=442&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0xOTImaD02OCZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
Then, click on the "Edit this file" icon...
![Step 3 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/e4d28cd5-3863-46e3-813d-5304ec0d769f/ce2bf765-9bef-4d96-8354-0eed3aa88c03.png?crop=focalpoint&fit=crop&fp-x=0.9435&fp-y=0.3449&fp-z=2.9525&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=945&mark-y=422&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0xMDkmaD0xMDkmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
... and add some content.
![Step 3 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/daad6528-db93-426c-8b8b-ae67d0a28189/a5767c01-a16e-4c4b-b4a0-5595663b175d.png?crop=focalpoint&fit=crop&fp-x=0.5170&fp-y=0.3762&fp-z=1.0470&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=7&mark-y=300&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0xMTg2Jmg9MTUwJmZpdD1jcm9wJmNvcm5lci1yYWRpdXM9MTA%3D)
### 4. Save your changes
To see your changes live, you need to "commit" them. Click on "Commit changes..." buttom in the top-tight corner.
![Step 4 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/74159a33-2897-4ffb-af3d-ce2fa109e570/0e96f7a4-b4ff-418e-9b44-73573a4354d1.png?crop=focalpoint&fit=crop&fp-x=0.9227&fp-y=0.2208&fp-z=2.9167&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=696&mark-y=417&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz00NjgmaD0xMTkmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
In the "Commit message" field add a concise description of your changes. Optionally, if the commit message is not enough, you can add more info in the "Extended description" field.
![Step 4 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/09130863-221f-436e-bab0-a46bea2fd5c4/bdbd1458-3b5c-4352-a8fb-5921132ee3e4.png?crop=focalpoint&fit=crop&fp-x=0.4998&fp-y=0.3476&fp-z=1.4555&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=262&mark-y=447&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz02NzYmaD01OCZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
Leave "Commit directly to `main` branch" selected and click on "Commit changes". Doing that will trigger rebuilding of your site on Vercel.
![Step 4 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/40bf87e4-a2b1-4a99-97da-5e87530d0622/88a19d05-ce63-4da0-9e85-e427b063245e.png?crop=focalpoint&fit=crop&fp-x=0.5545&fp-y=0.5989&fp-z=1.3207&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=612&mark-y=616&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0yMDcmaD01NSZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
### 5. See your site getting rebuild
If you want to see the current progress of rebuilding your website after you've commited the changes, click on the dot next to your commit message.
> [!note]
> It will be either a dot (if the site is currently being rebuilt after your changes), a check mark (if the site has finished building) or a cross (if something went wrong when rebuilding it).
![Step 5 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/0d273173-d852-47e4-b41e-418b9196e0fd/fbf1afe6-7af3-4b06-8ab0-d3c41d2923ce.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n)
Click on "Details" to see your project's deployment status on Vercel.
![Step 5 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/94b4e4ab-458c-4be9-b7a9-e34c7b4185b9/645687a4-b91d-4870-a935-48403b8ce33c.png?crop=focalpoint&fit=crop&fp-x=0.5000&fp-y=0.5000&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n)
### 6. Preview your site after changes
Once the site has been rebuilt, click the preview to see your changes live.
![Step 6 screenshot](https://images.tango.us/workflows/4aa9bd80-6829-415e-b3a8-6136bfb176eb/steps/a1294580-7d0d-492c-a880-32040b4bee48/5e7ddd43-03e3-4545-b1b3-cd631da401d8.png?crop=focalpoint&fit=crop&fp-x=0.2207&fp-y=0.3824&fp-z=1.4465&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=43&mark-y=261&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz02NzkmaD00MzEmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
## Add a single Markdown-based page
### 1. Navigate to the "content" folder in your website's repository
See how to find it in the previous section.
### 2. Create new file
Click on "Add file"...
![Step 2 screenshot](https://images.tango.us/workflows/c14ae6dc-9e15-49f5-af87-b513daa701ba/steps/1708e4fa-8234-4393-a8e9-cd972afce770/b986ab26-d53f-4b57-8520-fb87782dfb22.png?crop=focalpoint&fit=crop&fp-x=0.9119&fp-y=0.2208&fp-z=2.9167&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=737&mark-y=417&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0zMDkmaD0xMTkmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
...and "Create new file".
![Step 2 screenshot](https://images.tango.us/workflows/c14ae6dc-9e15-49f5-af87-b513daa701ba/steps/e79d32ef-9385-4903-8ca1-408f78752633/7006ac1c-796c-4bb6-95ef-dd4d9969c9b6.png?crop=focalpoint&fit=crop&fp-x=0.8712&fp-y=0.2679&fp-z=2.9167&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=476&mark-y=417&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz01NDcmaD0xMTkmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
### 3. Type the name of the new file you want to create
![Step 3 screenshot](https://images.tango.us/workflows/c14ae6dc-9e15-49f5-af87-b513daa701ba/steps/54c786cb-15d6-4abe-8893-fa95dff3ed0a/c39152b2-f446-4e39-a2f3-9b3cf0e7c193.png?crop=focalpoint&fit=crop&fp-x=0.3476&fp-y=0.2214&fp-z=2.1864&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=394&mark-y=418&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz00MTMmaD04NyZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
### 4. Write the content of the file
![Step 4 screenshot](https://images.tango.us/workflows/c14ae6dc-9e15-49f5-af87-b513daa701ba/steps/8ffe1e8c-45f9-42b7-8053-bc8bc61b098c/56489034-d5a9-495e-8fb7-1fbfff62d7f3.png?crop=focalpoint&fit=crop&fp-x=0.5170&fp-y=0.3440&fp-z=1.0470&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=7&mark-y=300&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0xMTg2Jmg9ODYmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
### 5. Save your changes
To see your changes live, you need to "commit" them. Click on "Commit changes..." buttom in the top-tight corner.
![Step 5 screenshot](https://images.tango.us/workflows/c14ae6dc-9e15-49f5-af87-b513daa701ba/steps/382d133d-19f3-4aee-a0fa-535fcb361090/fe7b1fc6-c8f0-4f3f-958a-204c4fc65cf8.png?crop=focalpoint&fit=crop&fp-x=0.9227&fp-y=0.2208&fp-z=2.9167&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=696&mark-y=417&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz00NjgmaD0xMTkmZml0PWNyb3AmY29ybmVyLXJhZGl1cz0xMA%3D%3D)
In the "Commit message" field add a concise description of your changes. Optionally, if the commit message is not enough, you can add more info in the "Extended description" field.
![Step 5 screenshot](https://images.tango.us/workflows/c14ae6dc-9e15-49f5-af87-b513daa701ba/steps/13c5873d-4071-4ae2-b641-d6202631076c/53029856-5543-4681-919a-092ed2dacb02.png?crop=focalpoint&fit=crop&fp-x=0.4998&fp-y=0.3476&fp-z=1.4555&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=262&mark-y=447&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz02NzYmaD01OCZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
Leave "Commit directly to `main` branch" selected and click on "Commit changes". Doing that will trigger rebuilding of your site on Vercel.
![Step 5 screenshot](https://images.tango.us/workflows/c14ae6dc-9e15-49f5-af87-b513daa701ba/steps/68002c21-451a-4536-89b6-8a0d01d327eb/bb71cbb3-7a79-45f3-a71e-2500a380556c.png?crop=focalpoint&fit=crop&fp-x=0.6278&fp-y=0.7315&fp-z=2.3207&w=1200&border=2%2CF4F2F7&border-radius=8%2C8%2C8%2C8&border-radius-inner=8%2C8%2C8%2C8&blend-align=bottom&blend-mode=normal&blend-x=0&blend-w=1200&blend64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL21hZGUtd2l0aC10YW5nby13YXRlcm1hcmstdjIucG5n&mark-x=418&mark-y=428&m64=aHR0cHM6Ly9pbWFnZXMudGFuZ28udXMvc3RhdGljL2JsYW5rLnBuZz9tYXNrPWNvcm5lcnMmYm9yZGVyPTYlMkNGRjc0NDImdz0zNjUmaD05NyZmaXQ9Y3JvcCZjb3JuZXItcmFkaXVzPTEw)
### 6. Preview your site after changes
As you already know, Vercel will now start rebuilding your website. When it's done, you can navigate to `/about` url on your website to see the new file we've just added.
## What's next?
While editing on GitHub UI is acceptable, it has its limitations it doesn't support working offline, adding multiple files simultaneously, or previewing many markdown syntax elements supported by Flowershow-based websites. We'll delve into these issues and solutions to overcome them in our next tutorial. Stay tuned!

View File

@@ -1,5 +1,5 @@
--- ---
title: "PortalJS example 1: Create a full-featured custom data portal frontend for CKAN with PortalJS" title: "Setup Guide: How to create a full-featured custom data portal frontend for CKAN with PortalJS"
authors: ['Luccas Mateus'] authors: ['Luccas Mateus']
date: 2021-04-20 date: 2021-04-20
--- ---

View File

@@ -2,7 +2,8 @@
title: Learn how to use MarkdownDB with our First Tutorial! title: Learn how to use MarkdownDB with our First Tutorial!
description: We've just released our first tutorial that covers the fundamentals of MarkdownDB - our new package for treating markdown files as a database. If you've been curious about how to manage your markdown files more effectively, check it out! description: We've just released our first tutorial that covers the fundamentals of MarkdownDB - our new package for treating markdown files as a database. If you've been curious about how to manage your markdown files more effectively, check it out!
date: 2023-05-26 date: 2023-05-26
author: Ola Rubaj authors: ['Ola Rubaj']
filetype: 'blog'
--- ---
We've just released our first tutorial that covers the fundamentals of [MarkdownDB](https://github.com/datopian/markdowndb) - our new package for treating markdown files as a database. If you've been curious about how to manage your markdown files more effectively, this tutorial is an excellent starting point! We've just released our first tutorial that covers the fundamentals of [MarkdownDB](https://github.com/datopian/markdowndb) - our new package for treating markdown files as a database. If you've been curious about how to manage your markdown files more effectively, this tutorial is an excellent starting point!
@@ -45,8 +46,8 @@ MarkdownDB is a javascript library for treating markdown files as a database --
Once we have prepared our markdown files, we can store them (or more precisely - their metadata) in a database, so that we can then query it later for specific project files. Once we have prepared our markdown files, we can store them (or more precisely - their metadata) in a database, so that we can then query it later for specific project files.
```bash ```bash
# npx @flowershow/markdowndb <path-to-folder-with-md-files> # npx mddb <path-to-folder-with-md-files>
npx @flowershow/markdowndb ./projects npx mddb ./projects
``` ```
The above command will output a `markdown.db` file in the directory where it was executed. So, in our case, the folder structure will look like this: The above command will output a `markdown.db` file in the directory where it was executed. So, in our case, the folder structure will look like this:
@@ -108,16 +109,16 @@ cd projects-list
npm init -y npm init -y
``` ```
Then, let's install the `@flowershow/markdowndb` package: Then, let's install the `mddb` package:
```bash ```bash
npm install @flowershow/markdowndb npm install mddb
``` ```
Now, let's create a new file `index.js` and add the following code: Now, let's create a new file `index.js` and add the following code:
```js ```js
import { MarkdownDB } from '@flowershow/markdowndb'; import { MarkdownDB } from 'mddb';
// change this to the path to your markdown.db file // change this to the path to your markdown.db file
const dbPath = 'markdown.db'; const dbPath = 'markdown.db';
@@ -141,7 +142,7 @@ process.exit(0);
Since we're using ES6 modules, we also need to add `"type": "module"` to our `package.json` file. Since we're using ES6 modules, we also need to add `"type": "module"` to our `package.json` file.
Before we run the above script, we need to make sure that the `dbPath` variable is pointing to our `markdown.db` file. If you want to store the database outside of your project folder, you can update the `dbPath` variable to point to the correct location. If you want to have it inside your project folder, you can copy it there, or simply re-run the `npx @flowershow/markdowndb <path-to-markdown-folder>` command from within your project folder. Before we run the above script, we need to make sure that the `dbPath` variable is pointing to our `markdown.db` file. If you want to store the database outside of your project folder, you can update the `dbPath` variable to point to the correct location. If you want to have it inside your project folder, you can copy it there, or simply re-run the `npx mddb <path-to-markdown-folder>` command from within your project folder.
Now, let's run the script: Now, let's run the script:
@@ -181,7 +182,7 @@ forks: 0
After adding the metadata, we need to re-index our markdown files into the database: After adding the metadata, we need to re-index our markdown files into the database:
```bash ```bash
npx @flowershow/markdowndb ../projects npx mddb ../projects
``` ```
Now, if we run our script again, we'll see that the `metadata` field in the output contains the metadata we've added to our project files: Now, if we run our script again, we'll see that the `metadata` field in the output contains the metadata we've added to our project files:
@@ -215,7 +216,7 @@ npm install columnify
And then we'll update our `index.js` file: And then we'll update our `index.js` file:
```js {2,16-38} ```js {2,16-38}
import { MarkdownDB } from '@flowershow/markdowndb'; import { MarkdownDB } from 'mddb';
import columnify from 'columnify'; import columnify from 'columnify';
const dbPath = 'markdown.db'; const dbPath = 'markdown.db';

Some files were not shown because too many files have changed in this diff Show More