customBlocks[name][mode.value];
+ const getBlock = (name: string) => customBlocks[name]?.[mode.value];
return {
mode,
diff --git a/packages/core/package.json b/packages/core/package.json
index 8db1ec7..5cfa4c5 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -23,8 +23,5 @@
"dependencies": {
"vue": "^3.0.4",
"lodash-es": "^4.17.20"
- },
- "peerDependencies": {
- "vue": "3"
}
}
diff --git a/packages/heading/package-lock.json b/packages/heading/package-lock.json
index eaea5c1..df998fb 100644
--- a/packages/heading/package-lock.json
+++ b/packages/heading/package-lock.json
@@ -4,19 +4,112 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
- "undefined": {
- "version": "file:../blocks",
+ "@babel/helper-validator-identifier": {
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
+ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw=="
+ },
+ "@babel/parser": {
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
+ "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg=="
+ },
+ "@babel/types": {
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
+ "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"requires": {
- "undefined": "file:../blocks"
- },
- "dependencies": {
- "undefined": {
- "version": "file:../blocks",
- "dev": true,
- "requires": {
- "undefined": "file:../blocks"
- }
- }
+ "@babel/helper-validator-identifier": "^7.12.11",
+ "lodash": "^4.17.19",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "@vue/compiler-core": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.4.tgz",
+ "integrity": "sha512-snpMICsbWTZqBFnPB03qr4DtiSxVYfDF3DvbDSkN9Z9NTM8Chl8E/lYhKBSsvauq91DAWAh8PU3lr9vrLyQsug==",
+ "requires": {
+ "@babel/parser": "^7.12.0",
+ "@babel/types": "^7.12.0",
+ "@vue/shared": "3.0.4",
+ "estree-walker": "^2.0.1",
+ "source-map": "^0.6.1"
+ }
+ },
+ "@vue/compiler-dom": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.4.tgz",
+ "integrity": "sha512-FOxbHBIkkGjYQeTz1DlXQjS1Ms8EPXQWsdTdTPeohoS0KzCz6RiOjiAG+jLtMi6Nr5GX2h0TlCvcnI8mcsicFQ==",
+ "requires": {
+ "@vue/compiler-core": "3.0.4",
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/reactivity": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.4.tgz",
+ "integrity": "sha512-AFTABrLhUYZY2on3ea9FxeXal7w3f6qIp9gT+/oG93H7dFTL5LvVnxygCopv7tvkIl/GSGQb/yK1D1gmXx1Pww==",
+ "requires": {
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/runtime-core": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.4.tgz",
+ "integrity": "sha512-qH9e4kqU7b3u1JewvLmGmoAGY+mnuBqz7aEKb2mhpEgwa1yFv496BRuUfMXXMCix3+TndUVMJ8jt41FSdNppwg==",
+ "requires": {
+ "@vue/reactivity": "3.0.4",
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/runtime-dom": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.4.tgz",
+ "integrity": "sha512-BGIoiTSESzWUhN0Ofi2X/q+HN8f6IUFmUEyyBGKbmx7DTAJNZhFfjqsepfXQrM5IGeTfJLB1ZEVyroDQJNXq3g==",
+ "requires": {
+ "@vue/runtime-core": "3.0.4",
+ "@vue/shared": "3.0.4",
+ "csstype": "^2.6.8"
+ }
+ },
+ "@vue/shared": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.4.tgz",
+ "integrity": "sha512-Swfbz31AaMX48CpFl+YmIrqOH9MgJMTrltG9e26A4ZxYx9LjGuMV+41WnxFzS3Bc9nbrc6sDPM37G6nIT8NJSg=="
+ },
+ "csstype": {
+ "version": "2.6.14",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.14.tgz",
+ "integrity": "sha512-2mSc+VEpGPblzAxyeR+vZhJKgYg0Og0nnRi7pmRXFYYxSfnOnW8A5wwQb4n4cE2nIOzqKOAzLCaEX6aBmNEv8A=="
+ },
+ "estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+ },
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
+ },
+ "vue": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.4.tgz",
+ "integrity": "sha512-2o+AiQF8sAupyhbyl3oxVCl3WCwC/n5NI7VMM+gVQ231qvSB8eI7sCBloloqDJK6yA367EEtmRSeSCf4sxCC+A==",
+ "requires": {
+ "@vue/compiler-dom": "3.0.4",
+ "@vue/runtime-dom": "3.0.4",
+ "@vue/shared": "3.0.4"
}
}
}
diff --git a/packages/heading/package.json b/packages/heading/package.json
index 7d90724..428ac8c 100644
--- a/packages/heading/package.json
+++ b/packages/heading/package.json
@@ -24,9 +24,7 @@
"test": "echo \"Error: run tests from root\" && exit 1"
},
"dependencies": {
- "@schlechtenburg/core": "^0.0.0"
- },
- "peerDependencies": {
- "vue": "3"
+ "@schlechtenburg/core": "^0.0.0",
+ "vue": "^3.0.4"
}
}
diff --git a/packages/image/package-lock.json b/packages/image/package-lock.json
index 415285b..46d141a 100644
--- a/packages/image/package-lock.json
+++ b/packages/image/package-lock.json
@@ -4,10 +4,112 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
- "undefined": {
- "version": "file:../blocks",
+ "@babel/helper-validator-identifier": {
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
+ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw=="
+ },
+ "@babel/parser": {
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
+ "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg=="
+ },
+ "@babel/types": {
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
+ "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"requires": {
- "undefined": "file:../blocks"
+ "@babel/helper-validator-identifier": "^7.12.11",
+ "lodash": "^4.17.19",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "@vue/compiler-core": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.4.tgz",
+ "integrity": "sha512-snpMICsbWTZqBFnPB03qr4DtiSxVYfDF3DvbDSkN9Z9NTM8Chl8E/lYhKBSsvauq91DAWAh8PU3lr9vrLyQsug==",
+ "requires": {
+ "@babel/parser": "^7.12.0",
+ "@babel/types": "^7.12.0",
+ "@vue/shared": "3.0.4",
+ "estree-walker": "^2.0.1",
+ "source-map": "^0.6.1"
+ }
+ },
+ "@vue/compiler-dom": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.4.tgz",
+ "integrity": "sha512-FOxbHBIkkGjYQeTz1DlXQjS1Ms8EPXQWsdTdTPeohoS0KzCz6RiOjiAG+jLtMi6Nr5GX2h0TlCvcnI8mcsicFQ==",
+ "requires": {
+ "@vue/compiler-core": "3.0.4",
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/reactivity": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.4.tgz",
+ "integrity": "sha512-AFTABrLhUYZY2on3ea9FxeXal7w3f6qIp9gT+/oG93H7dFTL5LvVnxygCopv7tvkIl/GSGQb/yK1D1gmXx1Pww==",
+ "requires": {
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/runtime-core": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.4.tgz",
+ "integrity": "sha512-qH9e4kqU7b3u1JewvLmGmoAGY+mnuBqz7aEKb2mhpEgwa1yFv496BRuUfMXXMCix3+TndUVMJ8jt41FSdNppwg==",
+ "requires": {
+ "@vue/reactivity": "3.0.4",
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/runtime-dom": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.4.tgz",
+ "integrity": "sha512-BGIoiTSESzWUhN0Ofi2X/q+HN8f6IUFmUEyyBGKbmx7DTAJNZhFfjqsepfXQrM5IGeTfJLB1ZEVyroDQJNXq3g==",
+ "requires": {
+ "@vue/runtime-core": "3.0.4",
+ "@vue/shared": "3.0.4",
+ "csstype": "^2.6.8"
+ }
+ },
+ "@vue/shared": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.4.tgz",
+ "integrity": "sha512-Swfbz31AaMX48CpFl+YmIrqOH9MgJMTrltG9e26A4ZxYx9LjGuMV+41WnxFzS3Bc9nbrc6sDPM37G6nIT8NJSg=="
+ },
+ "csstype": {
+ "version": "2.6.14",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.14.tgz",
+ "integrity": "sha512-2mSc+VEpGPblzAxyeR+vZhJKgYg0Og0nnRi7pmRXFYYxSfnOnW8A5wwQb4n4cE2nIOzqKOAzLCaEX6aBmNEv8A=="
+ },
+ "estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+ },
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
+ },
+ "vue": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.4.tgz",
+ "integrity": "sha512-2o+AiQF8sAupyhbyl3oxVCl3WCwC/n5NI7VMM+gVQ231qvSB8eI7sCBloloqDJK6yA367EEtmRSeSCf4sxCC+A==",
+ "requires": {
+ "@vue/compiler-dom": "3.0.4",
+ "@vue/runtime-dom": "3.0.4",
+ "@vue/shared": "3.0.4"
}
}
}
diff --git a/packages/image/package.json b/packages/image/package.json
index e8331d9..9b2732d 100644
--- a/packages/image/package.json
+++ b/packages/image/package.json
@@ -25,9 +25,7 @@
},
"dependencies": {
"@schlechtenburg/core": "^0.0.0",
- "@schlechtenburg/paragraph": "^0.0.0"
- },
- "peerDependencies": {
- "vue": "3"
+ "@schlechtenburg/paragraph": "^0.0.0",
+ "vue": "^3.0.4"
}
}
diff --git a/packages/layout/package-lock.json b/packages/layout/package-lock.json
index b16504e..8d8f4e1 100644
--- a/packages/layout/package-lock.json
+++ b/packages/layout/package-lock.json
@@ -4,19 +4,112 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
- "undefined": {
- "version": "file:../blocks",
+ "@babel/helper-validator-identifier": {
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
+ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw=="
+ },
+ "@babel/parser": {
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
+ "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg=="
+ },
+ "@babel/types": {
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
+ "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"requires": {
- "undefined": "file:../blocks"
- },
- "dependencies": {
- "undefined": {
- "version": "file:../blocks",
- "dev": true,
- "requires": {
- "undefined": "file:../blocks"
- }
- }
+ "@babel/helper-validator-identifier": "^7.12.11",
+ "lodash": "^4.17.19",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "@vue/compiler-core": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.4.tgz",
+ "integrity": "sha512-snpMICsbWTZqBFnPB03qr4DtiSxVYfDF3DvbDSkN9Z9NTM8Chl8E/lYhKBSsvauq91DAWAh8PU3lr9vrLyQsug==",
+ "requires": {
+ "@babel/parser": "^7.12.0",
+ "@babel/types": "^7.12.0",
+ "@vue/shared": "3.0.4",
+ "estree-walker": "^2.0.1",
+ "source-map": "^0.6.1"
+ }
+ },
+ "@vue/compiler-dom": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.4.tgz",
+ "integrity": "sha512-FOxbHBIkkGjYQeTz1DlXQjS1Ms8EPXQWsdTdTPeohoS0KzCz6RiOjiAG+jLtMi6Nr5GX2h0TlCvcnI8mcsicFQ==",
+ "requires": {
+ "@vue/compiler-core": "3.0.4",
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/reactivity": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.4.tgz",
+ "integrity": "sha512-AFTABrLhUYZY2on3ea9FxeXal7w3f6qIp9gT+/oG93H7dFTL5LvVnxygCopv7tvkIl/GSGQb/yK1D1gmXx1Pww==",
+ "requires": {
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/runtime-core": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.4.tgz",
+ "integrity": "sha512-qH9e4kqU7b3u1JewvLmGmoAGY+mnuBqz7aEKb2mhpEgwa1yFv496BRuUfMXXMCix3+TndUVMJ8jt41FSdNppwg==",
+ "requires": {
+ "@vue/reactivity": "3.0.4",
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/runtime-dom": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.4.tgz",
+ "integrity": "sha512-BGIoiTSESzWUhN0Ofi2X/q+HN8f6IUFmUEyyBGKbmx7DTAJNZhFfjqsepfXQrM5IGeTfJLB1ZEVyroDQJNXq3g==",
+ "requires": {
+ "@vue/runtime-core": "3.0.4",
+ "@vue/shared": "3.0.4",
+ "csstype": "^2.6.8"
+ }
+ },
+ "@vue/shared": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.4.tgz",
+ "integrity": "sha512-Swfbz31AaMX48CpFl+YmIrqOH9MgJMTrltG9e26A4ZxYx9LjGuMV+41WnxFzS3Bc9nbrc6sDPM37G6nIT8NJSg=="
+ },
+ "csstype": {
+ "version": "2.6.14",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.14.tgz",
+ "integrity": "sha512-2mSc+VEpGPblzAxyeR+vZhJKgYg0Og0nnRi7pmRXFYYxSfnOnW8A5wwQb4n4cE2nIOzqKOAzLCaEX6aBmNEv8A=="
+ },
+ "estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+ },
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
+ },
+ "vue": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.4.tgz",
+ "integrity": "sha512-2o+AiQF8sAupyhbyl3oxVCl3WCwC/n5NI7VMM+gVQ231qvSB8eI7sCBloloqDJK6yA367EEtmRSeSCf4sxCC+A==",
+ "requires": {
+ "@vue/compiler-dom": "3.0.4",
+ "@vue/runtime-dom": "3.0.4",
+ "@vue/shared": "3.0.4"
}
}
}
diff --git a/packages/layout/package.json b/packages/layout/package.json
index 005df17..e9f08fe 100644
--- a/packages/layout/package.json
+++ b/packages/layout/package.json
@@ -24,9 +24,7 @@
"test": "echo \"Error: run tests from root\" && exit 1"
},
"dependencies": {
- "@schlechtenburg/core": "^0.0.0"
- },
- "peerDependencies": {
- "vue": "3"
+ "@schlechtenburg/core": "^0.0.0",
+ "vue": "^3.0.4"
}
}
diff --git a/packages/paragraph/lib/index.ts b/packages/paragraph/lib/index.ts
index c6c7728..6b29c3e 100644
--- a/packages/paragraph/lib/index.ts
+++ b/packages/paragraph/lib/index.ts
@@ -1,6 +1,8 @@
import { defineAsyncComponent } from 'vue';
import { getDefaultData } from './util';
+export * from './util';
+
export default {
name: 'sb-paragraph',
getDefaultData,
diff --git a/packages/paragraph/package-lock.json b/packages/paragraph/package-lock.json
index 1f12c13..96e33cf 100644
--- a/packages/paragraph/package-lock.json
+++ b/packages/paragraph/package-lock.json
@@ -4,19 +4,112 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
- "undefined": {
- "version": "file:../blocks",
+ "@babel/helper-validator-identifier": {
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
+ "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw=="
+ },
+ "@babel/parser": {
+ "version": "7.12.11",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz",
+ "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg=="
+ },
+ "@babel/types": {
+ "version": "7.12.12",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz",
+ "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==",
"requires": {
- "undefined": "file:../blocks"
- },
- "dependencies": {
- "undefined": {
- "version": "file:../blocks",
- "dev": true,
- "requires": {
- "undefined": "file:../blocks"
- }
- }
+ "@babel/helper-validator-identifier": "^7.12.11",
+ "lodash": "^4.17.19",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "@vue/compiler-core": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.4.tgz",
+ "integrity": "sha512-snpMICsbWTZqBFnPB03qr4DtiSxVYfDF3DvbDSkN9Z9NTM8Chl8E/lYhKBSsvauq91DAWAh8PU3lr9vrLyQsug==",
+ "requires": {
+ "@babel/parser": "^7.12.0",
+ "@babel/types": "^7.12.0",
+ "@vue/shared": "3.0.4",
+ "estree-walker": "^2.0.1",
+ "source-map": "^0.6.1"
+ }
+ },
+ "@vue/compiler-dom": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.4.tgz",
+ "integrity": "sha512-FOxbHBIkkGjYQeTz1DlXQjS1Ms8EPXQWsdTdTPeohoS0KzCz6RiOjiAG+jLtMi6Nr5GX2h0TlCvcnI8mcsicFQ==",
+ "requires": {
+ "@vue/compiler-core": "3.0.4",
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/reactivity": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.4.tgz",
+ "integrity": "sha512-AFTABrLhUYZY2on3ea9FxeXal7w3f6qIp9gT+/oG93H7dFTL5LvVnxygCopv7tvkIl/GSGQb/yK1D1gmXx1Pww==",
+ "requires": {
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/runtime-core": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.4.tgz",
+ "integrity": "sha512-qH9e4kqU7b3u1JewvLmGmoAGY+mnuBqz7aEKb2mhpEgwa1yFv496BRuUfMXXMCix3+TndUVMJ8jt41FSdNppwg==",
+ "requires": {
+ "@vue/reactivity": "3.0.4",
+ "@vue/shared": "3.0.4"
+ }
+ },
+ "@vue/runtime-dom": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.4.tgz",
+ "integrity": "sha512-BGIoiTSESzWUhN0Ofi2X/q+HN8f6IUFmUEyyBGKbmx7DTAJNZhFfjqsepfXQrM5IGeTfJLB1ZEVyroDQJNXq3g==",
+ "requires": {
+ "@vue/runtime-core": "3.0.4",
+ "@vue/shared": "3.0.4",
+ "csstype": "^2.6.8"
+ }
+ },
+ "@vue/shared": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.4.tgz",
+ "integrity": "sha512-Swfbz31AaMX48CpFl+YmIrqOH9MgJMTrltG9e26A4ZxYx9LjGuMV+41WnxFzS3Bc9nbrc6sDPM37G6nIT8NJSg=="
+ },
+ "csstype": {
+ "version": "2.6.14",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.14.tgz",
+ "integrity": "sha512-2mSc+VEpGPblzAxyeR+vZhJKgYg0Og0nnRi7pmRXFYYxSfnOnW8A5wwQb4n4cE2nIOzqKOAzLCaEX6aBmNEv8A=="
+ },
+ "estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
+ },
+ "lodash": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+ },
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
+ },
+ "vue": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.4.tgz",
+ "integrity": "sha512-2o+AiQF8sAupyhbyl3oxVCl3WCwC/n5NI7VMM+gVQ231qvSB8eI7sCBloloqDJK6yA367EEtmRSeSCf4sxCC+A==",
+ "requires": {
+ "@vue/compiler-dom": "3.0.4",
+ "@vue/runtime-dom": "3.0.4",
+ "@vue/shared": "3.0.4"
}
}
}
diff --git a/packages/paragraph/package.json b/packages/paragraph/package.json
index fd92f73..f8f14e4 100644
--- a/packages/paragraph/package.json
+++ b/packages/paragraph/package.json
@@ -24,9 +24,7 @@
"test": "echo \"Error: run tests from root\" && exit 1"
},
"dependencies": {
- "@schlechtenburg/core": "^0.0.0"
- },
- "peerDependencies": {
- "vue": "3"
+ "@schlechtenburg/core": "^0.0.0",
+ "vue": "^3.0.4"
}
}
diff --git a/public/initial-data.json b/public/initial-data.json
index 58e44f2..c9a9281 100644
--- a/public/initial-data.json
+++ b/public/initial-data.json
@@ -71,4 +71,4 @@
}
]
}
-};
+}
diff --git a/src/App.tsx b/src/App.tsx
index 81622c7..0f31c02 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,11 +1,19 @@
-import { defineComponent, reactive, ref } from 'vue';
+import {
+ onBeforeMount,
+ computed,
+ defineComponent,
+ reactive,
+ ref,
+} from 'vue';
import { Schlechtenburg, Block, SbMode } from '../packages/core/lib';
-import SbParagraph from '../packages/paragraph/lib';
+/*
import SbHeading from '../packages/heading/lib';
-import SbLayout from '../packages/layout/lib';
+import SbParagraph from '../packages/paragraph/lib';
import SbImage from '../packages/image/lib';
+ */
+import SbLayout from '../packages/layout/lib';
import './App.scss';
@@ -14,18 +22,53 @@ export default defineComponent({
setup() {
const activeTab = ref('edit');
- const block: Block
|{} = reactive({});
+ const block: Block = reactive({
+ name: 'none',
+ blockId: '0',
+ data: null,
+ });
- fetch('/initial-data.json')
- .then(res => res.json())
- .then(data => {
- block.name = data.name;
- block.blockId = data.blockId;
- block.data = data.data;
- });
+ onBeforeMount(async () => {
+ const res = await fetch('/initial-data.json');
+ const data = await res.json();
+ block.name = data.name;
+ block.blockId = data.blockId;
+ block.data = data.data;
+ });
- return () => (
-
+ const Example = computed(() => {
+ switch (activeTab.value) {
+ case SbMode.Edit:
+ return
) => {
+ block.data = newBlock.data;
+ }}
+ customBlocks={[
+ SbLayout,
+ /*
+ SbHeading,
+ SbImage,
+ SbParagraph,
+ */
+ ]}
+ key="edit"
+ mode="edit"
+ />;
+ case SbMode.Edit:
+ return ;
+ case 'data':
+ return { JSON.stringify(block, null, 2) }
;
+ }
+ });
+
+ return () => {
+ console.log('render App');
+ return
-
- {(() => {
- switch (activeTab.value) {
- case SbMode.Edit:
- return
) => {
- block.data = newBlock.data;
- }}
- customBlocks={[
- SbLayout,
- SbHeading,
- SbImage,
- SbParagraph,
- ]}
- key="edit"
- mode="edit"
- />;
- case SbMode.Edit:
- return ;
- case 'data':
- return { JSON.stringify(block, null, 2) }
;
- }
- })()}
-
- );
+
+ ;
+ };
},
});