-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[editor][wip] Packaging AIConfigEditor Component
- Loading branch information
Ryan Holinshead
committed
Jan 9, 2024
1 parent
bcd2921
commit 70327ee
Showing
63 changed files
with
12,244 additions
and
34 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
python/src/aiconfig/editor/client/editor_package/.eslintrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"caughtErrorsIgnorePattern": "^_" | ||
} | ||
] | ||
}, | ||
"ignorePatterns": [ | ||
"@types/", | ||
"build/", | ||
"node_modules/", | ||
"public/", | ||
"postbuild.js" | ||
] | ||
} |
27 changes: 27 additions & 0 deletions
27
python/src/aiconfig/editor/client/editor_package/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# AIConfigEditor | ||
|
||
This component library provides an AIConfigEditor React component for renderering a customizable AIConfig file editor in React. | ||
|
||
## Usage | ||
|
||
To render the editor component, simply render an AIConfigEditor within your JSX, passing in an AIConfig object: | ||
|
||
``` | ||
<AIConfigEditor aiconfig={aiconfig} /> | ||
``` | ||
|
||
## Customization | ||
|
||
The editor component can be customized to suit different needs. The following customizations are supported: | ||
|
||
### Readonly Editor | ||
|
||
// TODO | ||
|
||
### Custom Callbacks | ||
|
||
// TODO | ||
|
||
### Custom Styles | ||
|
||
// TODO |
64 changes: 64 additions & 0 deletions
64
python/src/aiconfig/editor/client/editor_package/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"name": "aiconfig-editor", | ||
"version": "0.1.0", | ||
"description": "React component for editing aiconfig files", | ||
"author": "LastMile AI", | ||
"license": "UNLICENSED", | ||
"keywords": [ | ||
"aiconfig", | ||
"editor", | ||
"react" | ||
], | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"exports": { | ||
".": { | ||
"default": "./dist/index.js", | ||
"types": "./dist/index.d.ts" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "yarn clean && npx tsc", | ||
"clean": "rm -rf dist", | ||
"lint": "eslint . --max-warnings=0" | ||
}, | ||
"dependencies": { | ||
"@emotion/react": "^11.11.1", | ||
"@mantine/carousel": "^6.0.7", | ||
"@mantine/core": "^6.0.7", | ||
"@mantine/dates": "^6.0.16", | ||
"@mantine/dropzone": "^6.0.7", | ||
"@mantine/form": "^6.0.7", | ||
"@mantine/hooks": "^6.0.7", | ||
"@mantine/modals": "^6.0.7", | ||
"@mantine/notifications": "^6.0.7", | ||
"@mantine/prism": "^6.0.7", | ||
"@monaco-editor/react": "^4.6.0", | ||
"@tabler/icons-react": "^2.44.0", | ||
"aiconfig": "^1.1.3", | ||
"lodash": "^4.17.21", | ||
"node-fetch": "^3.3.2", | ||
"react": "^18", | ||
"react-dom": "^18", | ||
"react-error-boundary": "^4.0.12", | ||
"react-markdown": "^8.0.6", | ||
"react-scripts": "5.0.1", | ||
"remark-gfm": "^4.0.0", | ||
"uuid": "^9.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/lodash": "^4.14.202", | ||
"@types/react": "^18", | ||
"@types/react-dom": "^18", | ||
"@types/uuid": "^9.0.7", | ||
"@typescript-eslint/eslint-plugin": "^6.16.0", | ||
"@typescript-eslint/parser": "^6.16.0", | ||
"eslint": "^8", | ||
"eslint-config-next": "14.0.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"typescript": "^5" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
python/src/aiconfig/editor/client/editor_package/src/components/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// For now, just export the AIConfigEditor component and relevant types. | ||
export { AIConfigEditor } from "./AIConfigEditor"; | ||
export type { | ||
AIConfigCallbacks, | ||
RunPromptStreamCallback, | ||
RunPromptStreamErrorCallback, | ||
RunPromptStreamErrorEvent, | ||
} from "./AIConfigEditor"; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./components"; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
python/src/aiconfig/editor/client/editor_package/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"rootDir": "src", | ||
"baseUrl": ".", | ||
"outDir": "dist", | ||
"declaration": true, | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "Node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"incremental": true, | ||
"composite": true | ||
}, | ||
"include": ["src"], | ||
"exclude": ["dist", "node_modules"] | ||
} |
Oops, something went wrong.