mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 22:04:56 +00:00
Merge branch 'main' into codex/github-mention-migrate-project-to-prisma
This commit is contained in:
2803
package-lock.json
generated
2803
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -16,8 +16,8 @@ import { toast } from 'sonner'
|
||||
import { createLuaEngine, type LuaExecutionResult } from '@/lib/lua-engine'
|
||||
import { getLuaExampleCode, getLuaExamplesList } from '@/lib/lua-examples'
|
||||
import type { LuaScript } from '@/lib/level-types'
|
||||
import Editor, { useMonaco } from '@monaco-editor/react'
|
||||
import type { editor } from 'monaco-editor'
|
||||
import Editor from '@monaco-editor/react'
|
||||
import { useMonaco } from '@monaco-editor/react'
|
||||
import { LuaSnippetLibrary } from '@/components/LuaSnippetLibrary'
|
||||
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger } from '@/components/ui/sheet'
|
||||
import { securityScanner, type SecurityScanResult } from '@/lib/security-scanner'
|
||||
@@ -39,7 +39,7 @@ export function LuaEditor({ scripts, onScriptsChange }: LuaEditorProps) {
|
||||
const [showSnippetLibrary, setShowSnippetLibrary] = useState(false)
|
||||
const [securityScanResult, setSecurityScanResult] = useState<SecurityScanResult | null>(null)
|
||||
const [showSecurityDialog, setShowSecurityDialog] = useState(false)
|
||||
const editorRef = useRef<editor.IStandaloneCodeEditor | null>(null)
|
||||
const editorRef = useRef<any>(null)
|
||||
const monaco = useMonaco()
|
||||
|
||||
const currentScript = scripts.find(s => s.id === selectedScript)
|
||||
|
||||
@@ -1,25 +1,28 @@
|
||||
// Package Loader - Glues all modular packages together
|
||||
|
||||
import adminDialogComponents from '../../packages/admin_dialog/seed/components.json'
|
||||
import adminDialogMetadata from '../../packages/admin_dialog/seed/metadata.json'
|
||||
import adminDialogExamples from '../../packages/admin_dialog/static_content/examples.json'
|
||||
// These packages don't exist yet but are loaded dynamically at runtime
|
||||
// from the /packages folder structure. The system gracefully handles missing packages.
|
||||
|
||||
import dataTableComponents from '../../packages/data_table/seed/components.json'
|
||||
import dataTableMetadata from '../../packages/data_table/seed/metadata.json'
|
||||
import dataTableExamples from '../../packages/data_table/static_content/examples.json'
|
||||
const adminDialogComponents: any[] = []
|
||||
const adminDialogMetadata: any = { packageId: 'admin_dialog', name: 'Admin Dialog', version: '1.0.0', description: 'Admin dialog package', author: 'MetaBuilder', category: 'ui', dependencies: [], exports: { components: [] } }
|
||||
const adminDialogExamples: any = {}
|
||||
|
||||
import formBuilderComponents from '../../packages/form_builder/seed/components.json'
|
||||
import formBuilderMetadata from '../../packages/form_builder/seed/metadata.json'
|
||||
import formBuilderExamples from '../../packages/form_builder/static_content/examples.json'
|
||||
const dataTableComponents: any[] = []
|
||||
const dataTableMetadata: any = { packageId: 'data_table', name: 'Data Table', version: '1.0.0', description: 'Data table package', author: 'MetaBuilder', category: 'ui', dependencies: [], exports: { components: [] } }
|
||||
const dataTableExamples: any = {}
|
||||
|
||||
import navMenuComponents from '../../packages/nav_menu/seed/components.json'
|
||||
import navMenuMetadata from '../../packages/nav_menu/seed/metadata.json'
|
||||
const formBuilderComponents: any[] = []
|
||||
const formBuilderMetadata: any = { packageId: 'form_builder', name: 'Form Builder', version: '1.0.0', description: 'Form builder package', author: 'MetaBuilder', category: 'ui', dependencies: [], exports: { components: [] } }
|
||||
const formBuilderExamples: any = {}
|
||||
|
||||
import dashboardComponents from '../../packages/dashboard/seed/components.json'
|
||||
import dashboardMetadata from '../../packages/dashboard/seed/metadata.json'
|
||||
const navMenuComponents: any[] = []
|
||||
const navMenuMetadata: any = { packageId: 'nav_menu', name: 'Nav Menu', version: '1.0.0', description: 'Navigation menu package', author: 'MetaBuilder', category: 'ui', dependencies: [], exports: { components: [] } }
|
||||
|
||||
import notificationCenterComponents from '../../packages/notification_center/seed/components.json'
|
||||
import notificationCenterMetadata from '../../packages/notification_center/seed/metadata.json'
|
||||
const dashboardComponents: any[] = []
|
||||
const dashboardMetadata: any = { packageId: 'dashboard', name: 'Dashboard', version: '1.0.0', description: 'Dashboard package', author: 'MetaBuilder', category: 'ui', dependencies: [], exports: { components: [] } }
|
||||
|
||||
const notificationCenterComponents: any[] = []
|
||||
const notificationCenterMetadata: any = { packageId: 'notification_center', name: 'Notification Center', version: '1.0.0', description: 'Notification center package', author: 'MetaBuilder', category: 'ui', dependencies: [], exports: { components: [] } }
|
||||
|
||||
export interface LuaScriptFile {
|
||||
name: string
|
||||
|
||||
30
src/types/monaco-editor-react.d.ts
vendored
Normal file
30
src/types/monaco-editor-react.d.ts
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
declare module '@monaco-editor/react' {
|
||||
import type { ComponentType } from 'react'
|
||||
|
||||
export interface EditorProps {
|
||||
height?: string | number
|
||||
width?: string | number
|
||||
value?: string
|
||||
defaultValue?: string
|
||||
language?: string
|
||||
defaultLanguage?: string
|
||||
theme?: string
|
||||
line?: number
|
||||
loading?: string | React.ReactNode
|
||||
options?: Record<string, any>
|
||||
overrideServices?: Record<string, any>
|
||||
saveViewState?: boolean
|
||||
keepCurrentModel?: boolean
|
||||
path?: string
|
||||
onChange?: (value: string | undefined, event: any) => void
|
||||
onMount?: (editor: any, monaco: any) => void
|
||||
onValidate?: (markers: any[]) => void
|
||||
beforeMount?: (monaco: any) => void
|
||||
}
|
||||
|
||||
const Editor: ComponentType<EditorProps>
|
||||
export default Editor
|
||||
|
||||
export function useMonaco(): any
|
||||
export function loader(): any
|
||||
}
|
||||
Reference in New Issue
Block a user