diff --git a/apps/desktop/.env b/apps/desktop/.env index 5c8d27e2d..f4077a02d 100644 --- a/apps/desktop/.env +++ b/apps/desktop/.env @@ -1,5 +1,5 @@ -# VITE_API_URL=https://app.penx.io -VITE_API_URL=http://localhost:3000 +VITE_API_URL=https://app.penx.io +# VITE_API_URL=http://localhost:3000 NEXT_PUBLIC_PLATFORM=DESKTOP diff --git a/extension-samples/preset-ui/developer/.gitignore b/extension-samples/preset-ui/developer/.gitignore new file mode 100644 index 000000000..0e1a8353b --- /dev/null +++ b/extension-samples/preset-ui/developer/.gitignore @@ -0,0 +1,4 @@ +node_modules +.DS_Store +dist +*.log \ No newline at end of file diff --git a/extension-samples/preset-ui/developer/.prettierrc b/extension-samples/preset-ui/developer/.prettierrc new file mode 100644 index 000000000..fa295cd75 --- /dev/null +++ b/extension-samples/preset-ui/developer/.prettierrc @@ -0,0 +1,7 @@ +{ + "semi": false, + "tabWidth": 2, + "singleQuote": true, + "trailingComma": "all", + "printWidth": 80 +} \ No newline at end of file diff --git a/extension-samples/preset-ui/developer/README.md b/extension-samples/preset-ui/developer/README.md new file mode 100644 index 000000000..f2f553c64 --- /dev/null +++ b/extension-samples/preset-ui/developer/README.md @@ -0,0 +1 @@ +# Counter diff --git a/extension-samples/preset-ui/developer/assets/logo.svg b/extension-samples/preset-ui/developer/assets/logo.svg new file mode 100644 index 000000000..2e8e722e3 --- /dev/null +++ b/extension-samples/preset-ui/developer/assets/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/extension-samples/preset-ui/developer/manifest.json b/extension-samples/preset-ui/developer/manifest.json new file mode 100644 index 000000000..e1e1ae0ac --- /dev/null +++ b/extension-samples/preset-ui/developer/manifest.json @@ -0,0 +1,20 @@ +{ + "name": "developer", + "title": "Developer", + "description": "PenX Developer Tools", + "icon": { + "name": "lucide--braces" + }, + "commands": [ + { + "name": "create-extension", + "title": "Create Extension", + "subtitle": "", + "description": "", + "icon": { + "name": "lucide--braces" + }, + "mode": "preset-ui" + } + ] +} diff --git a/extension-samples/preset-ui/developer/package.json b/extension-samples/preset-ui/developer/package.json new file mode 100644 index 000000000..fd8ea088f --- /dev/null +++ b/extension-samples/preset-ui/developer/package.json @@ -0,0 +1,15 @@ +{ + "name": "counter", + "private": true, + "scripts": { + "dev": "penx dev", + "release": "penx release" + }, + "devDependencies": { + "@penxio/preset-ui": "workspace:*", + "@penxio/api": "workspace:*", + "penx-cli": "workspace:*", + "prettier": "^3.2.5", + "typescript": "^5.3.2" + } +} diff --git a/extension-samples/preset-ui/developer/src/create-extension.command.ts b/extension-samples/preset-ui/developer/src/create-extension.command.ts new file mode 100644 index 000000000..00c09130b --- /dev/null +++ b/extension-samples/preset-ui/developer/src/create-extension.command.ts @@ -0,0 +1,12 @@ +import { MarkdownApp } from '@penxio/preset-ui' + +export function main() { + let counter = 1 + + const app = new MarkdownApp({ content: `## ${counter}` }).run() + + setInterval(() => { + counter++ + app.setState({ content: `## ${counter}` }) + }, 1000) +} diff --git a/extension-samples/preset-ui/developer/tsconfig.json b/extension-samples/preset-ui/developer/tsconfig.json new file mode 100644 index 000000000..562c94951 --- /dev/null +++ b/extension-samples/preset-ui/developer/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "esnext", + "strict": true, + "lib": ["ESNext", "DOM"], + "esModuleInterop": true, + "moduleResolution": "node", + "skipLibCheck": true, + "noUnusedLocals": true, + "noImplicitAny": true, + "allowJs": true, + "noEmit": true, + "outDir": "dist", + "resolveJsonModule": true + } +}