Updated package imports
This commit is contained in:
parent
f54546259b
commit
d11d52160b
|
@ -8,6 +8,6 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/lib/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
6
lerna-debug.log
Normal file
6
lerna-debug.log
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
0 silly argv { _: [ 'bootstrap' ], lernaVersion: '3.22.1', '$0': 'lerna' }
|
||||||
|
1 notice cli v3.22.1
|
||||||
|
2 verbose rootPath /home/ben/Workspace/schlechtenburg
|
||||||
|
3 error JSONError: Unexpected string in JSON at position 503 while parsing '{ "name": "@schlechtenburg/core", "v' in core/package.json
|
||||||
|
3 error at module.exports (/home/ben/.local/share/nvm/versions/node/v14.5.0/lib/node_modules/lerna/node_modules/parse-json/index.js:26:19)
|
||||||
|
3 error at parse (/home/ben/.local/share/nvm/versions/node/v14.5.0/lib/node_modules/lerna/node_modules/load-json-file/index.js:15:9)
|
10104
package-lock.json
generated
Normal file
10104
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
19
package.json
19
package.json
|
@ -1,4 +1,21 @@
|
||||||
{
|
{
|
||||||
"name": "schlechtenburg",
|
"name": "schlechtenburg",
|
||||||
"version": "0.0.0"
|
"version": "0.0.0",
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vuedx-typecheck . && vite build"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"vue": "^3.0.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vue/compiler-sfc": "^3.0.4",
|
||||||
|
"@vuedx/typecheck": "^0.3.1-insiders-1606311019.0",
|
||||||
|
"@vuedx/typescript-plugin-vue": "^0.3.1-insiders-1606311019.0",
|
||||||
|
"lerna": "^3.22.1",
|
||||||
|
"sass": "^1.30.0",
|
||||||
|
"typescript": "^4.1.2",
|
||||||
|
"vite": "^1.0.0-rc.13"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,13 +6,13 @@ import {
|
||||||
ref,
|
ref,
|
||||||
Ref,
|
Ref,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import { Block } from '/@/blocks';
|
import { Block } from '../blocks';
|
||||||
import { SbMode } from '/@/mode';
|
import { SbMode } from '../mode';
|
||||||
import { useResizeObserver, BlockDimensions } from '/@/use-resize-observer';
|
import { useResizeObserver, BlockDimensions } from '../use-resize-observer';
|
||||||
import { useActivation } from '/@/use-activation';
|
import { useActivation } from '../use-activation';
|
||||||
import { useDynamicBlocks } from '/@/use-dynamic-blocks';
|
import { useDynamicBlocks } from '../use-dynamic-blocks';
|
||||||
|
|
||||||
import SbBlockOrdering from './BlockOrdering';
|
import { SbBlockOrdering } from './BlockOrdering';
|
||||||
|
|
||||||
import './Block.scss';
|
import './Block.scss';
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ interface BlockProps {
|
||||||
sortable: string;
|
sortable: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
export const SbBlock = defineComponent({
|
||||||
name: 'sb-block',
|
name: 'sb-block',
|
||||||
|
|
||||||
props: {
|
props: {
|
|
@ -5,13 +5,13 @@ import {
|
||||||
computed,
|
computed,
|
||||||
defineComponent,
|
defineComponent,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import { useBlockSizing } from '/@/use-resize-observer';
|
import { useBlockSizing } from '../use-resize-observer';
|
||||||
|
|
||||||
import SbButton from './Button';
|
import SbButton from './Button';
|
||||||
|
|
||||||
import './BlockOrdering.scss';
|
import './BlockOrdering.scss';
|
||||||
|
|
||||||
export default defineComponent({
|
export const SbBlockOrdering = defineComponent({
|
||||||
name: 'sb-block-ordering',
|
name: 'sb-block-ordering',
|
||||||
|
|
||||||
props: {
|
props: {
|
|
@ -6,14 +6,14 @@ import {
|
||||||
import {
|
import {
|
||||||
useDynamicBlocks,
|
useDynamicBlocks,
|
||||||
BlockDefinition,
|
BlockDefinition,
|
||||||
} from '/@/use-dynamic-blocks';
|
} from '../use-dynamic-blocks';
|
||||||
|
|
||||||
import SbButton from '/@internal/Button';
|
import SbButton from './Button';
|
||||||
import SbModal from '/@internal/Modal';
|
import SbModal from './Modal';
|
||||||
|
|
||||||
import './BlockPicker.scss';
|
import './BlockPicker.scss';
|
||||||
|
|
||||||
export default defineComponent({
|
export const SbBlockPicker = defineComponent({
|
||||||
name: 'sb-block-picker',
|
name: 'sb-block-picker',
|
||||||
|
|
||||||
props: {},
|
props: {},
|
|
@ -1,16 +1,17 @@
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { BlockDefinition } from '/@/blocks';
|
import { BlockDefinition } from '../blocks';
|
||||||
import BlockPicker from '/@internal/BlockPicker';
|
|
||||||
|
import SbBlockPicker from './BlockPicker';
|
||||||
|
|
||||||
import './BlockPlaceholder.scss';
|
import './BlockPlaceholder.scss';
|
||||||
|
|
||||||
export default defineComponent({
|
export const BlockPlaceholder = defineComponent({
|
||||||
name: 'sb-block-placeholder',
|
name: 'sb-block-placeholder',
|
||||||
|
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
return () => (
|
return () => (
|
||||||
<div class="sb-block-placeholder">
|
<div class="sb-block-placeholder">
|
||||||
<BlockPicker
|
<SbBlockPicker
|
||||||
onPickedBlock={(block: BlockDefinition) => context.emit('insert-block', block)}
|
onPickedBlock={(block: BlockDefinition) => context.emit('insert-block', block)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
|
@ -1,7 +1,7 @@
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import './Button.scss';
|
import './Button.scss';
|
||||||
|
|
||||||
export default defineComponent({
|
export const SbButton = defineComponent({
|
||||||
name: 'sb-button',
|
name: 'sb-button',
|
||||||
|
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
|
@ -10,7 +10,7 @@ interface ModalProps {
|
||||||
eventClose: () => void;
|
eventClose: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
export const SbModal = defineComponent({
|
||||||
name: 'sb-modal',
|
name: 'sb-modal',
|
||||||
|
|
||||||
props: {
|
props: {
|
|
@ -11,18 +11,13 @@ import {
|
||||||
Block,
|
Block,
|
||||||
BlockDefinition,
|
BlockDefinition,
|
||||||
BlockLibraryDefinition,
|
BlockLibraryDefinition,
|
||||||
} from '/@/blocks';
|
} from '../blocks';
|
||||||
import { Mode, SbMode } from '/@/mode';
|
import { Mode, SbMode } from '../mode';
|
||||||
import { BlockLibrary } from '/@/use-dynamic-blocks';
|
import { BlockLibrary } from '../use-dynamic-blocks';
|
||||||
import { EditorDimensions, useResizeObserver } from '/@/use-resize-observer';
|
import { EditorDimensions, useResizeObserver } from '../use-resize-observer';
|
||||||
import { ActiveBlock } from '/@/use-activation';
|
import { ActiveBlock } from '../use-activation';
|
||||||
|
|
||||||
import SbBlock from '/@internal/Block';
|
import SbBlock from './Block';
|
||||||
|
|
||||||
import SbLayout from '/@user/Layout/index';
|
|
||||||
import SbParagraph from '/@user/Paragraph/index';
|
|
||||||
import SbImage from '/@user/Image/index';
|
|
||||||
import SbHeading from '/@user/Heading/index';
|
|
||||||
|
|
||||||
import './Schlechtenburg.scss';
|
import './Schlechtenburg.scss';
|
||||||
|
|
||||||
|
@ -33,7 +28,7 @@ export interface SchlechtenburgProps {
|
||||||
mode: SbMode;
|
mode: SbMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
export const Schlechtenburg = defineComponent({
|
||||||
name: 'schlechtenburg-main',
|
name: 'schlechtenburg-main',
|
||||||
|
|
||||||
model,
|
model,
|
||||||
|
@ -62,10 +57,6 @@ export default defineComponent({
|
||||||
provide(ActiveBlock, activeBlock);
|
provide(ActiveBlock, activeBlock);
|
||||||
|
|
||||||
const blockLibrary: BlockLibraryDefinition = shallowReactive({
|
const blockLibrary: BlockLibraryDefinition = shallowReactive({
|
||||||
'sb-layout': SbLayout,
|
|
||||||
'sb-image': SbImage,
|
|
||||||
'sb-paragraph': SbParagraph,
|
|
||||||
'sb-heading': SbHeading,
|
|
||||||
...props.customBlocks.reduce(
|
...props.customBlocks.reduce(
|
||||||
(blocks: {[name: string]: Block<any>}, block: Block<any>) => ({ ...blocks, [block.name]: block }),
|
(blocks: {[name: string]: Block<any>}, block: Block<any>) => ({ ...blocks, [block.name]: block }),
|
||||||
{},
|
{},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import './Select.scss';
|
import './Select.scss';
|
||||||
|
|
||||||
export default defineComponent({
|
export const SbSelect = defineComponent({
|
||||||
name: 'sb-select',
|
name: 'sb-select',
|
||||||
|
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
|
@ -4,11 +4,11 @@ import {
|
||||||
watch,
|
watch,
|
||||||
reactive,
|
reactive,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import { useBlockSizing } from '/@/use-resize-observer';
|
import { useBlockSizing } from '../use-resize-observer';
|
||||||
|
|
||||||
import './Toolbar.scss';
|
import './Toolbar.scss';
|
||||||
|
|
||||||
export default defineComponent({
|
export const SbToolbar = defineComponent({
|
||||||
name: 'sb-toolbar',
|
name: 'sb-toolbar',
|
||||||
|
|
||||||
setup(_, context) {
|
setup(_, context) {
|
14
packages/core/lib/index.ts
Normal file
14
packages/core/lib/index.ts
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
export * from './mode';
|
||||||
|
export * from './blocks';
|
||||||
|
|
||||||
|
export * from './use-activation';
|
||||||
|
export * from './use-dynamic-blocks';
|
||||||
|
export * from './use-resize-observer';
|
||||||
|
|
||||||
|
export * from './directives/activation-cover.js';
|
||||||
|
|
||||||
|
export * from './components/Schlechtenburg';
|
||||||
|
export * from './components/Block';
|
||||||
|
export * from './components/BlockPicker';
|
||||||
|
export * from './components/BlockOrdering';
|
||||||
|
export * from './components/BlockPlaceholder';
|
|
@ -3,8 +3,8 @@ import {
|
||||||
inject,
|
inject,
|
||||||
reactive,
|
reactive,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import { BlockLibraryDefinition } from '/@/blocks';
|
import { BlockLibraryDefinition } from './blocks';
|
||||||
import { Mode, SbMode } from '/@/mode';
|
import { Mode, SbMode } from './mode';
|
||||||
|
|
||||||
export const BlockLibrary = Symbol('Schlechtenburg block library');
|
export const BlockLibrary = Symbol('Schlechtenburg block library');
|
||||||
export function useDynamicBlocks() {
|
export function useDynamicBlocks() {
|
||||||
|
|
9950
packages/core/package-lock.json
generated
9950
packages/core/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -4,8 +4,8 @@
|
||||||
"description": "> TODO: description",
|
"description": "> TODO: description",
|
||||||
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||||
"homepage": "",
|
"homepage": "",
|
||||||
"license": "GPLv3",
|
"license": "GPL-3.0-or-later",
|
||||||
"main": "lib/core.js",
|
"main": "lib/index.ts",
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
|
@ -20,21 +20,11 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"dev": "vite",
|
|
||||||
"build": "vuedx-typecheck . && vite build"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.0.4"
|
"vue": "^3.0.4",
|
||||||
|
"lodash-es": "^4.17.20"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"peerDependencies": {
|
||||||
"@vue/compiler-sfc": "^3.0.4",
|
"vue": "3"
|
||||||
"@vuedx/typecheck": "^0.3.1-insiders-1606311019.0",
|
|
||||||
"@vuedx/typescript-plugin-vue": "^0.3.1-insiders-1606311019.0",
|
|
||||||
"lerna": "^3.22.1",
|
|
||||||
"lodash-es": "^4.17.20",
|
|
||||||
"sass": "^1.30.0",
|
|
||||||
"typescript": "^4.1.2",
|
|
||||||
"vite": "^1.0.0-rc.13"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
const ROOT_DIR = path.resolve(__dirname);
|
|
||||||
const SRC_DIR = path.resolve(ROOT_DIR, 'lib');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
alias: {
|
|
||||||
'/@/': SRC_DIR,
|
|
||||||
'/@components/': path.join(SRC_DIR, 'components'),
|
|
||||||
'/@internal/': path.join(SRC_DIR, 'components/internal'),
|
|
||||||
'/@user/': path.join(SRC_DIR, 'components/user'),
|
|
||||||
},
|
|
||||||
};
|
|
11
packages/heading/README.md
Normal file
11
packages/heading/README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# `@schlechtenburg/heading`
|
||||||
|
|
||||||
|
> TODO: description
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
const heading = require('@schlechtenburg/heading');
|
||||||
|
|
||||||
|
// TODO: DEMONSTRATE API
|
||||||
|
```
|
7
packages/heading/__tests__/heading.test.js
Normal file
7
packages/heading/__tests__/heading.test.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const heading = require('..');
|
||||||
|
|
||||||
|
describe('@schlechtenburg/heading', () => {
|
||||||
|
it('needs tests');
|
||||||
|
});
|
23
packages/heading/package-lock.json
generated
Normal file
23
packages/heading/package-lock.json
generated
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"name": "@schlechtenburg/heading",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"undefined": {
|
||||||
|
"version": "file:../blocks",
|
||||||
|
"requires": {
|
||||||
|
"undefined": "file:../blocks"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"undefined": {
|
||||||
|
"version": "file:../blocks",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"undefined": "file:../blocks"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
32
packages/heading/package.json
Normal file
32
packages/heading/package.json
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"name": "@schlechtenburg/heading",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "> TODO: description",
|
||||||
|
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||||
|
"homepage": "",
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
|
"main": "lib/index.ts",
|
||||||
|
"directories": {
|
||||||
|
"lib": "lib",
|
||||||
|
"test": "__tests__"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@schlechtenburg/core": "^0.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": "3"
|
||||||
|
}
|
||||||
|
}
|
11
packages/image/README.md
Normal file
11
packages/image/README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# `@schlechtenburg/image`
|
||||||
|
|
||||||
|
> TODO: description
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
const image = require('@schlechtenburg/image');
|
||||||
|
|
||||||
|
// TODO: DEMONSTRATE API
|
||||||
|
```
|
7
packages/image/__tests__/image.test.js
Normal file
7
packages/image/__tests__/image.test.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const image = require('..');
|
||||||
|
|
||||||
|
describe('@schlechtenburg/image', () => {
|
||||||
|
it('needs tests');
|
||||||
|
});
|
|
@ -2,9 +2,8 @@ import { defineComponent, PropType } from 'vue';
|
||||||
import {
|
import {
|
||||||
model,
|
model,
|
||||||
blockProps,
|
blockProps,
|
||||||
} from '/@/blocks';
|
SbBlock,
|
||||||
|
} from '@schlechtenburg/core';
|
||||||
import SbBlock from '/@internal/block';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getDefaultData,
|
getDefaultData,
|
|
@ -9,11 +9,10 @@ import {
|
||||||
import {
|
import {
|
||||||
model,
|
model,
|
||||||
blockProps,
|
blockProps,
|
||||||
} from '/@/blocks';
|
SbToolbar,
|
||||||
|
SbButton,
|
||||||
import SbToolbar from '/@internal/Toolbar';
|
SbBlock
|
||||||
import SbButton from '/@internal/Button';
|
} from '@schlechtenburg/core';
|
||||||
import SbBlock from '/@internal/Block';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getDefaultData,
|
getDefaultData,
|
|
@ -1,7 +1,7 @@
|
||||||
import {
|
import {
|
||||||
ParagraphData,
|
ParagraphData,
|
||||||
getDefaultData as getDefaultParagraphData
|
getDefaultData as getDefaultParagraphData
|
||||||
} from '/@user/Paragraph/util';
|
} from '@schlechtenburg/paragraph';
|
||||||
import { BlockData, BlockProps } from '/@/blocks';
|
import { BlockData, BlockProps } from '/@/blocks';
|
||||||
|
|
||||||
export interface ImageData {
|
export interface ImageData {
|
14
packages/image/package-lock.json
generated
Normal file
14
packages/image/package-lock.json
generated
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"name": "@schlechtenburg/image",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"undefined": {
|
||||||
|
"version": "file:../blocks",
|
||||||
|
"requires": {
|
||||||
|
"undefined": "file:../blocks"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
33
packages/image/package.json
Normal file
33
packages/image/package.json
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
"name": "@schlechtenburg/image",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "> TODO: description",
|
||||||
|
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||||
|
"homepage": "",
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
|
"main": "lib/index.ts",
|
||||||
|
"directories": {
|
||||||
|
"lib": "lib",
|
||||||
|
"test": "__tests__"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@schlechtenburg/core": "^0.0.0",
|
||||||
|
"@schlechtenburg/paragraph": "^0.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": "3"
|
||||||
|
}
|
||||||
|
}
|
11
packages/layout/README.md
Normal file
11
packages/layout/README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# `@schlechtenburg/layout`
|
||||||
|
|
||||||
|
> TODO: description
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
const layout = require('@schlechtenburg/layout');
|
||||||
|
|
||||||
|
// TODO: DEMONSTRATE API
|
||||||
|
```
|
7
packages/layout/__tests__/layout.test.js
Normal file
7
packages/layout/__tests__/layout.test.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const layout = require('..');
|
||||||
|
|
||||||
|
describe('@schlechtenburg/layout', () => {
|
||||||
|
it('needs tests');
|
||||||
|
});
|
|
@ -6,9 +6,8 @@ import {
|
||||||
import {
|
import {
|
||||||
model,
|
model,
|
||||||
blockProps,
|
blockProps,
|
||||||
} from '/@/blocks';
|
SbBlock,
|
||||||
|
} from '@schlechtenburg/core';
|
||||||
import SbBlock from '/@internal/Block';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
LayoutData,
|
LayoutData,
|
|
@ -9,14 +9,14 @@ import {
|
||||||
model,
|
model,
|
||||||
Block,
|
Block,
|
||||||
blockProps,
|
blockProps,
|
||||||
} from '/@/blocks';
|
useActivation,
|
||||||
import { useActivation } from '/@/use-activation';
|
|
||||||
|
|
||||||
import SbBlock from '/@internal/Block';
|
SbBlock,
|
||||||
import SbButton from '/@internal/Button';
|
SbButton,
|
||||||
import SbToolbar from '/@internal/Toolbar';
|
SbToolbar,
|
||||||
import SbBlockPlaceholder from '/@internal/BlockPlaceholder';
|
SbBlockPlaceholder,
|
||||||
import SbBlockOrdering from '/@internal/BlockOrdering';
|
SbBlockOrdering,
|
||||||
|
} from '@schlechtenburg/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
LayoutData,
|
LayoutData,
|
23
packages/layout/package-lock.json
generated
Normal file
23
packages/layout/package-lock.json
generated
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"name": "@schlechtenburg/layout",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"undefined": {
|
||||||
|
"version": "file:../blocks",
|
||||||
|
"requires": {
|
||||||
|
"undefined": "file:../blocks"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"undefined": {
|
||||||
|
"version": "file:../blocks",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"undefined": "file:../blocks"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
32
packages/layout/package.json
Normal file
32
packages/layout/package.json
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"name": "@schlechtenburg/layout",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "> TODO: description",
|
||||||
|
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||||
|
"homepage": "",
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
|
"main": "lib/index.ts",
|
||||||
|
"directories": {
|
||||||
|
"lib": "lib",
|
||||||
|
"test": "__tests__"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@schlechtenburg/core": "^0.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": "3"
|
||||||
|
}
|
||||||
|
}
|
11
packages/paragraph/README.md
Normal file
11
packages/paragraph/README.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# `@schlechtenburg/paragraph`
|
||||||
|
|
||||||
|
> TODO: description
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
const paragraph = require('@schlechtenburg/paragraph');
|
||||||
|
|
||||||
|
// TODO: DEMONSTRATE API
|
||||||
|
```
|
7
packages/paragraph/__tests__/paragraph.test.js
Normal file
7
packages/paragraph/__tests__/paragraph.test.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const paragraph = require('..');
|
||||||
|
|
||||||
|
describe('@schlechtenburg/paragraph', () => {
|
||||||
|
it('needs tests');
|
||||||
|
});
|
|
@ -7,7 +7,7 @@ import {
|
||||||
model,
|
model,
|
||||||
blockProps,
|
blockProps,
|
||||||
BlockProps,
|
BlockProps,
|
||||||
} from '/@/blocks';
|
} from '@schlechtenburg/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getDefaultData,
|
getDefaultData,
|
|
@ -13,11 +13,11 @@ import {
|
||||||
blockProps,
|
blockProps,
|
||||||
BlockProps,
|
BlockProps,
|
||||||
BlockData,
|
BlockData,
|
||||||
} from '/@/blocks';
|
useActivation,
|
||||||
import { useActivation } from '/@/use-activation';
|
|
||||||
|
|
||||||
import SbToolbar from '/@internal/Toolbar';
|
SbToolbar,
|
||||||
import SbSelect from '/@internal/Select';
|
SbSelect,
|
||||||
|
} from '@schlechtenburg/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getDefaultData,
|
getDefaultData,
|
23
packages/paragraph/package-lock.json
generated
Normal file
23
packages/paragraph/package-lock.json
generated
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"name": "@schlechtenburg/paragraph",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"undefined": {
|
||||||
|
"version": "file:../blocks",
|
||||||
|
"requires": {
|
||||||
|
"undefined": "file:../blocks"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"undefined": {
|
||||||
|
"version": "file:../blocks",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"undefined": "file:../blocks"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
32
packages/paragraph/package.json
Normal file
32
packages/paragraph/package.json
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"name": "@schlechtenburg/paragraph",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "> TODO: description",
|
||||||
|
"author": "Benjamin Bädorf <hello@benjaminbaedorf.eu>",
|
||||||
|
"homepage": "",
|
||||||
|
"license": "GPL-3.0-or-later",
|
||||||
|
"main": "lib/index.ts",
|
||||||
|
"directories": {
|
||||||
|
"lib": "lib",
|
||||||
|
"test": "__tests__"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib"
|
||||||
|
],
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git@git.b12f.io:b12f/schlechtenburg.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@schlechtenburg/core": "^0.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": "3"
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -1,4 +1,4 @@
|
||||||
export default {
|
{
|
||||||
"name": "sb-layout",
|
"name": "sb-layout",
|
||||||
"blockId": "1590592097800",
|
"blockId": "1590592097800",
|
||||||
"data": {
|
"data": {
|
|
@ -1,9 +1,11 @@
|
||||||
import { defineComponent, reactive, ref } from 'vue';
|
import { defineComponent, reactive, ref } from 'vue';
|
||||||
import Schlechtenburg from '/@components/Schlechtenburg';
|
|
||||||
import { Block } from '/@/blocks';
|
|
||||||
import { SbMode } from '/@/mode';
|
|
||||||
|
|
||||||
import initialData from './initial-data';
|
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 SbImage from '../packages/image/lib';
|
||||||
|
|
||||||
import './App.scss';
|
import './App.scss';
|
||||||
|
|
||||||
|
@ -12,7 +14,15 @@ export default defineComponent({
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
const activeTab = ref('edit');
|
const activeTab = ref('edit');
|
||||||
const block: Block<any> = reactive(initialData);
|
const block: Block<any>|{} = reactive({});
|
||||||
|
|
||||||
|
fetch('/initial-data.json')
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => {
|
||||||
|
block.name = data.name;
|
||||||
|
block.blockId = data.blockId;
|
||||||
|
block.data = data.data;
|
||||||
|
});
|
||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<div id="app">
|
<div id="app">
|
||||||
|
@ -35,6 +45,12 @@ export default defineComponent({
|
||||||
eventUpdate={(newBlock: Block<any>) => {
|
eventUpdate={(newBlock: Block<any>) => {
|
||||||
block.data = newBlock.data;
|
block.data = newBlock.data;
|
||||||
}}
|
}}
|
||||||
|
customBlocks={[
|
||||||
|
SbLayout,
|
||||||
|
SbHeading,
|
||||||
|
SbImage,
|
||||||
|
SbParagraph,
|
||||||
|
]}
|
||||||
key="edit"
|
key="edit"
|
||||||
mode="edit"
|
mode="edit"
|
||||||
/>;
|
/>;
|
|
@ -10,12 +10,7 @@
|
||||||
"plugins": [ { "name": "@vuedx/typescript-plugin-vue" } ],
|
"plugins": [ { "name": "@vuedx/typescript-plugin-vue" } ],
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
// "noErrorTruncation": true,
|
// "noErrorTruncation": true,
|
||||||
"paths": {
|
"paths": {}
|
||||||
"/@/*": [ "./lib/*" ],
|
|
||||||
"/@components/*": [ "./lib/components/*" ],
|
|
||||||
"/@internal/*": [ "./lib/components/internal/*" ],
|
|
||||||
"/@user/*": [ "./lib/components/user/*" ]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"include": [ "lib/**/*.ts", "lib/**/*.d.ts", "lib/**/*.tsx", "lib/**/*.vue" ]
|
"include": [ "lib/**/*.ts", "lib/**/*.d.ts", "lib/**/*.tsx", "lib/**/*.vue" ]
|
||||||
}
|
}
|
3
vite.config.js
Normal file
3
vite.config.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = {
|
||||||
|
alias: {},
|
||||||
|
};
|
Loading…
Reference in a new issue