Skip to content

Commit

Permalink
feat: add slangroom editor (#4)
Browse files Browse the repository at this point in the history
* feat: add codemirror lib

* fix: remove package manager limitation

* chore: delete old component

* Update vscode-data.json

* feat: add basic setup for codemirror

* feat: add multiple editors

* feat(editor): add theme

* feat(editor): json lang support, remove themes

* build: add strict null checks

* fix: after adding strict null checks

* feat: add error display

* refactor(editor): created slangroom utils

* refactor(editor): move error handling to util

* big refactor

* almost done!

* finishing touches

* feat: add read from localstorage

* Update index.html

* Revert "feat: add read from localstorage"

This reverts commit 3e2e65c.

* Reapply "feat: add read from localstorage"

This reverts commit 53971d4.

* fix: .name instead of .id

* fix: tests

* fix: storybook import errors

* fix: docs

* feat: add readme as storybook home

* Update home.mdx

---------

Co-authored-by: puria <[email protected]>
  • Loading branch information
bbtgnn and puria authored Jul 22, 2024
1 parent a16bb0f commit e8b3e85
Show file tree
Hide file tree
Showing 35 changed files with 1,928 additions and 3,277 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"quoteProps": "consistent",
"printWidth": 180,
"printWidth": 100,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
Expand Down
2 changes: 1 addition & 1 deletion .storybook/dyne-theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { create } from '@storybook/theming/create';
import { create } from '@storybook/theming';

export default create({
base: 'light',
Expand Down
11 changes: 8 additions & 3 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { StorybookConfig } from '@storybook/html-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions',
"@saucelabs/storybook-variants"
stories: ['../src/home/home.mdx', '../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@saucelabs/storybook-variants',
],
framework: '@storybook/html-vite',
staticDirs: ['../dist'],
Expand All @@ -17,4 +21,5 @@ const config: StorybookConfig = {
autodocs: true,
},
};

export default config;
4 changes: 2 additions & 2 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<link rel="stylesheet" href="./dyne-components/dyne-components.css" />
<script type="module" src="./dyne-components/dyne-components.esm.js"></script>
<link rel="stylesheet" href="../dist/dyne-components/dyne-components.css" />
<script type="module" src="../dist/dyne-components/dyne-components.esm.js"></script>
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,18 @@
"license": "AGPL-3.0-only",
"dependencies": {
"@codemirror/commands": "^6.6.0",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/state": "^6.4.1",
"@codemirror/view": "^6.28.2",
"@sinclair/typebox": "^0.32.34",
"@slangroom/browser": "^1.33.12",
"@types/node": "^20.14.8",
"ansi-to-html": "^0.7.2",
"codemirror": "^6.0.1",
"has-ansi": "^6.0.0",
"lucide-react": "^0.396.0",
"nanoid": "^5.0.7",
"thememirror": "^2.0.1",
"zenroom": "^4.32.3"
},
"packageManager": "[email protected]+sha512.67f5879916a9293e5cf059c23853d571beaf4f753c707f40cb22bed5fb1578c6aad3b6c4107ccb3ba0b35be003eb621a16471ac836c87beb53f9d54bb4612724"
}
}
Loading

0 comments on commit e8b3e85

Please sign in to comment.