mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-16 14:52:31 +00:00
fix vite build (wip)
This commit is contained in:
1 parent
5c3760f9ec
commit
239edf075f
19 files changed
+143
-16
No files matched your search
@@ -88,11 +88,15 @@ export const PageEnigma = ({ sceneToken }: { sceneToken?: string }) => {
|
||||
});
|
||||
});
|
||||
|
||||
console.log(">>> test - install events in PageEnigma");
|
||||
|
||||
useGenerationEnqueueSuccessEvent();
|
||||
useGenerationEnqueueFailureEvent();
|
||||
useGenerationCompleteEvent();
|
||||
useGenerationFailedEvent();
|
||||
|
||||
console.log(">>> test - install events in PageEnigma block over");
|
||||
|
||||
useFlashUserInputErrorEvent(async (event) => {
|
||||
console.log("Flash user input error event received:", event);
|
||||
toast.error(event.message);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"build": "vite build",
|
||||
"preview": "vite preview --port 8080",
|
||||
"dev": "echo 'editor3d' && vite dev",
|
||||
"production-preview": "echo 'editor3d dev with production preview' && vite build && vite preview --port 5173",
|
||||
"production-preview": "echo 'editor3d dev with production preview' && vite build --debug true --emptyOutDir --logLevel info && vite preview --port 5173",
|
||||
"staging-build": "vite build",
|
||||
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint playground/* .",
|
||||
"typecheck": "tsc",
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"nx": {
|
||||
"name": "@storyteller/api-enums",
|
||||
"targets": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -3,6 +3,16 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"nx": {
|
||||
"name": "@storyteller/api",
|
||||
"targets": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
"name": "@storyteller/ui-create-3d-modal",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"nx": {
|
||||
"name": "@storyteller/ui-create-3d-modal",
|
||||
"targets": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
"name": "@storyteller/ui-gallery-modal",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"nx": {
|
||||
"name": "@storyteller/ui-gallery-modal",
|
||||
"targets": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
"name": "@storyteller/ui-lightbox-modal",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"nx": {
|
||||
"name": "@storyteller/ui-lightbox-modal",
|
||||
"targets": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
"name": "@storyteller/ui-login-modal",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"nx": {
|
||||
"name": "@storyteller/ui-login-modal",
|
||||
"targets": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -7,7 +7,13 @@ import * as path from 'path';
|
||||
export default defineConfig(() => ({
|
||||
root: __dirname,
|
||||
cacheDir: '../../../node_modules/.vite/libs/components/login-modal',
|
||||
plugins: [react(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })],
|
||||
plugins: [
|
||||
react(),
|
||||
dts({
|
||||
entryRoot: 'src',
|
||||
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json')
|
||||
})
|
||||
],
|
||||
// Uncomment this if you are using workers.
|
||||
// worker: {
|
||||
// plugins: [ nxViteTsPaths() ],
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
"name": "@storyteller/ui-model-selector",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"nx": {
|
||||
"name": "@storyteller/ui-model-selector",
|
||||
"targets": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
"name": "@storyteller/ui-promptbox",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"nx": {
|
||||
"name": "@storyteller/ui-promptbox",
|
||||
"targets": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
JobContextType,
|
||||
MaybeCanvasRenderBitmapType,
|
||||
UploaderState,
|
||||
UploaderStates,
|
||||
} from "@storyteller/common";
|
||||
import { PopoverMenu, PopoverItem } from "@storyteller/ui-popover";
|
||||
import { Tooltip } from "@storyteller/ui-tooltip";
|
||||
@@ -32,7 +31,7 @@ import {
|
||||
EnqueueContextualEditImage,
|
||||
EnqueueContextualEditImageSize,
|
||||
} from "@storyteller/tauri-api";
|
||||
import { usePrompt2DStore, RefImage } from "./promptStore";
|
||||
import { usePrompt2DStore } from "./promptStore";
|
||||
import { gtagEvent } from "@storyteller/google-analytics";
|
||||
import { getCapabilitiesForModel } from "@storyteller/model-list";
|
||||
import { ImageModel } from "@storyteller/model-list";
|
||||
|
||||
@@ -39,11 +39,8 @@ import { Signal } from "@preact/signals-react";
|
||||
import {
|
||||
CommandSuccessStatus,
|
||||
EnqueueContextualEditImage,
|
||||
EnqueueContextualEditImageModel,
|
||||
EnqueueContextualEditImageSize,
|
||||
// waitForSoraLogin,
|
||||
} from "@storyteller/tauri-api";
|
||||
// import { showActionReminder } from "@storyteller/ui-action-reminder-modal";
|
||||
import { usePrompt3DStore } from "./promptStore";
|
||||
import { gtagEvent } from "@storyteller/google-analytics";
|
||||
import { ImageModel } from "@storyteller/model-list";
|
||||
@@ -98,7 +95,7 @@ export const PromptBox3D = ({
|
||||
snapshotCurrentFrame,
|
||||
}: PromptBox3DProps) => {
|
||||
useSignals();
|
||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||
//const fileInputRef = useRef<HTMLInputElement>(null);
|
||||
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
||||
const [content, setContent] = useState<React.ReactNode>(null);
|
||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
"name": "@storyteller/ui-tutorial-modal",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"nx": {
|
||||
"name": "@storyteller/ui-tutorial-modal",
|
||||
"targets": {
|
||||
"build": {
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"main": "./src/index.ts",
|
||||
"module": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
|
||||
@@ -12,3 +12,5 @@ export * from "./lib/events/generation/useGenerationEnqueueFailureEvent";
|
||||
export * from "./lib/events/generation/useGenerationEnqueueSuccessEvent";
|
||||
export * from "./lib/events/generation/useGenerationFailedEvent";
|
||||
export * from "./lib/events/warning/FlashUserInputErrorEvent";
|
||||
|
||||
console.log(">>> test - tauri-events index.ts");
|
||||
+8
@@ -12,12 +12,19 @@ type GenerationEnqueueSuccessEvent = {
|
||||
model?: GenerationModel,
|
||||
};
|
||||
|
||||
console.log(">>> test - useGenerationEnqueueSuccessEvent defined")
|
||||
|
||||
export const useGenerationEnqueueSuccessEvent = () => {
|
||||
console.log(">>> test - useGenerationEnqueueSuccessEvent called")
|
||||
|
||||
useEffect(() => {
|
||||
console.log(">>> test - useGenerationEnqueueSuccessEvent useEffect")
|
||||
|
||||
let isUnmounted = false;
|
||||
let unlisten: Promise<UnlistenFn>;
|
||||
|
||||
const setup = async () => {
|
||||
console.log(">>> test - useGenerationEnqueueSuccessEvent setup")
|
||||
unlisten = listen<BasicEventWrapper<GenerationEnqueueSuccessEvent>>('generation-enqueue-success-event', async (event) => {
|
||||
console.log("Generation enqueue success event received:", event);
|
||||
const prefs = await GetAppPreferences();
|
||||
@@ -38,6 +45,7 @@ export const useGenerationEnqueueSuccessEvent = () => {
|
||||
setup();
|
||||
|
||||
return () => {
|
||||
console.log(">>> test - useGenerationEnqueueSuccessEvent unmount")
|
||||
isUnmounted = true;
|
||||
unlisten.then(f => f());
|
||||
};
|
||||
|
||||
@@ -7,7 +7,13 @@ import * as path from 'path';
|
||||
export default defineConfig(() => ({
|
||||
root: __dirname,
|
||||
cacheDir: '../../node_modules/.vite/libs/tauri-events',
|
||||
plugins: [react(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })],
|
||||
plugins: [
|
||||
react(),
|
||||
dts({
|
||||
entryRoot: 'src',
|
||||
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json')
|
||||
})
|
||||
],
|
||||
// Uncomment this if you are using workers.
|
||||
// worker: {
|
||||
// plugins: [ nxViteTsPaths() ],
|
||||
|
||||
@@ -28,7 +28,22 @@
|
||||
// Uncomment if 2D ever gets used
|
||||
// "apps/editor2d/app/src/*",
|
||||
"apps/editor3d/app/src/*"
|
||||
]
|
||||
],
|
||||
"@storyteller/api": ["libs/api/src/*"],
|
||||
"@storyteller/api-enums": ["libs/api-enums/src/*"],
|
||||
"@storyteller/tauri-api": ["libs/tauri-api/src/*"],
|
||||
"@storyteller/tauri-events": ["libs/tauri-events/src/*"],
|
||||
"@storyteller/tauri-utils": ["libs/tauri-utils/src/*"],
|
||||
"@storyteller/ui-action-reminder-modal": ["libs/components/action-reminder-modal/src/*"],
|
||||
"@storyteller/ui-button": ["libs/components/button/src/*"],
|
||||
"@storyteller/ui-gallery-modal": ["libs/components/gallery-modal/src/*"],
|
||||
"@storyteller/ui-modal": ["libs/components/modal/src/*"],
|
||||
"@storyteller/ui-model-selector": ["libs/components/model-selector/src/*"],
|
||||
"@storyteller/ui-pricing-modal": ["libs/components/pricing-modal/src/*"],
|
||||
"@storyteller/ui-toaster": ["libs/components/ui-toaster/src/*"],
|
||||
"@storyteller/ui-tutorial-modal": ["libs/components/tutorial-modal/src/*"],
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,12 @@
|
||||
{
|
||||
"path": "./libs/components/tooltip"
|
||||
},
|
||||
{
|
||||
"path": "./libs/tauri-api"
|
||||
},
|
||||
{
|
||||
"path": "./libs/tauri-events"
|
||||
},
|
||||
{
|
||||
"path": "./libs/tauri-utils"
|
||||
},
|
||||
@@ -78,9 +84,6 @@
|
||||
{
|
||||
"path": "./libs/common"
|
||||
},
|
||||
{
|
||||
"path": "./libs/tauri-api"
|
||||
},
|
||||
{
|
||||
"path": "./libs/components/login-modal"
|
||||
},
|
||||
@@ -150,9 +153,6 @@
|
||||
{
|
||||
"path": "./libs/analytics/google-analytics"
|
||||
},
|
||||
{
|
||||
"path": "./libs/tauri-events"
|
||||
},
|
||||
{
|
||||
"path": "./libs/components/provider-setup-modal"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user