Loading dependecies...
+ return Loading dependencies...
}
if (!isImageVaultDAMConfig(appConfig)) {
@@ -60,16 +74,21 @@ export default function Field() {
}
const fieldConfig = sdk.location.CustomField?.fieldConfig
- const config = {
- ...appConfig,
- ...fieldConfig,
- }
+ const config = { ...appConfig, ...fieldConfig }
return (
-
-
Loading field...}>
-
-
+
Loading field...}>
+
+
+ )
+}
+
+export default function Field() {
+ const { sdk, config, ref } = useApp()
+
+ return (
+
+
)
}
diff --git a/remix/env.d.ts b/remix/env.d.ts
index 78ed234..11f02fe 100644
--- a/remix/env.d.ts
+++ b/remix/env.d.ts
@@ -1,2 +1 @@
-///
///
diff --git a/remix/eslint.config.mjs b/remix/eslint.config.mjs
new file mode 100644
index 0000000..8421088
--- /dev/null
+++ b/remix/eslint.config.mjs
@@ -0,0 +1,133 @@
+import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"
+import { FlatCompat } from "@eslint/eslintrc"
+import js from "@eslint/js"
+import typescriptEslint from "@typescript-eslint/eslint-plugin"
+import tsParser from "@typescript-eslint/parser"
+import _import from "eslint-plugin-import"
+import jsxA11Y from "eslint-plugin-jsx-a11y"
+import react from "eslint-plugin-react"
+import { defineConfig, globalIgnores } from "eslint/config"
+import globals from "globals"
+import path from "node:path"
+import { fileURLToPath } from "node:url"
+
+const __filename = fileURLToPath(import.meta.url)
+const __dirname = path.dirname(__filename)
+const compat = new FlatCompat({
+ baseDirectory: __dirname,
+ recommendedConfig: js.configs.recommended,
+ allConfig: js.configs.all,
+})
+
+export default defineConfig([
+ globalIgnores(["build/**/*", "node_modules/**/*", "public/**/*"]),
+ {
+ extends: compat.extends("eslint:recommended"),
+
+ languageOptions: {
+ globals: {
+ ...globals.browser,
+ ...globals.commonjs,
+ },
+
+ ecmaVersion: "latest",
+ sourceType: "module",
+
+ parserOptions: {
+ ecmaFeatures: {
+ jsx: true,
+ },
+ },
+ },
+ },
+ {
+ files: ["**/*.{js,jsx,ts,tsx}"],
+
+ extends: fixupConfigRules(
+ compat.extends(
+ "plugin:react/recommended",
+ "plugin:react/jsx-runtime",
+ "plugin:react-hooks/recommended",
+ "plugin:jsx-a11y/recommended"
+ )
+ ),
+
+ plugins: {
+ react: fixupPluginRules(react),
+ "jsx-a11y": fixupPluginRules(jsxA11Y),
+ },
+
+ settings: {
+ react: {
+ version: "detect",
+ },
+
+ formComponents: ["Form"],
+
+ linkComponents: [
+ {
+ name: "Link",
+ linkAttribute: "to",
+ },
+ {
+ name: "NavLink",
+ linkAttribute: "to",
+ },
+ ],
+
+ "import/resolver": {
+ typescript: {
+ project: "./remix/tsconfig.json",
+ },
+ },
+ },
+
+ rules: {
+ "react/jsx-uses-vars": "error",
+ "react/jsx-uses-react": "error",
+ },
+ },
+ {
+ files: ["**/*.{ts,tsx}"],
+
+ extends: fixupConfigRules(
+ compat.extends(
+ "plugin:@typescript-eslint/recommended",
+ "plugin:import/recommended",
+ "plugin:import/typescript"
+ )
+ ),
+
+ plugins: {
+ "@typescript-eslint": fixupPluginRules(typescriptEslint),
+ import: fixupPluginRules(_import),
+ },
+
+ languageOptions: {
+ parser: tsParser,
+ },
+
+ settings: {
+ "import/internal-regex": "^~/",
+
+ "import/resolver": {
+ node: {
+ extensions: [".ts", ".tsx"],
+ },
+
+ typescript: {
+ alwaysTryTypes: true,
+ },
+ },
+ },
+ },
+ {
+ files: ["**/.eslintrc.cjs"],
+
+ languageOptions: {
+ globals: {
+ ...globals.node,
+ },
+ },
+ },
+])
diff --git a/remix/package.json b/remix/package.json
index 30cc1a0..649310c 100644
--- a/remix/package.json
+++ b/remix/package.json
@@ -12,14 +12,14 @@
"typecheck": "tsc"
},
"dependencies": {
- "@remix-run/node": "^2.13.1",
- "@remix-run/react": "^2.13.1",
- "usehooks-ts": "^3.1.0"
+ "@remix-run/node": "^2.16.8",
+ "@remix-run/react": "^2.16.8",
+ "usehooks-ts": "^3.1.1"
},
"devDependencies": {
- "@remix-run/dev": "^2.13.1"
+ "@remix-run/dev": "^2.16.8"
},
"engines": {
- "node": ">=18.0.0"
+ "node": ">=22.0.0"
}
}
diff --git a/remix/tsconfig.json b/remix/tsconfig.json
index 7661096..7b26708 100644
--- a/remix/tsconfig.json
+++ b/remix/tsconfig.json
@@ -10,6 +10,8 @@
"**/*.tsx"
],
"compilerOptions": {
+ "types": ["@remix-run/node", "vite/client"],
+ "skipLibCheck": true,
"jsx": "react-jsx",
"baseUrl": ".",
"paths": {
diff --git a/remix/vite.config.ts b/remix/vite.config.ts
index 61ddcc3..0d079a7 100644
--- a/remix/vite.config.ts
+++ b/remix/vite.config.ts
@@ -1,15 +1,15 @@
import { vitePlugin as remix } from "@remix-run/dev"
import { defineConfig } from "vite"
+import devtoolsJson from "vite-plugin-devtools-json"
+import { libInjectCss } from "vite-plugin-lib-inject-css"
import tsconfigPaths from "vite-tsconfig-paths"
export default defineConfig({
plugins: [
- remix({
- ssr: false,
- }),
+ remix({ ssr: false }),
tsconfigPaths(),
+ libInjectCss(),
+ devtoolsJson(),
],
- build: {
- emptyOutDir: true,
- },
+ build: { emptyOutDir: true },
})
diff --git a/rte/.eslintrc.cjs b/rte/.eslintrc.cjs
deleted file mode 100644
index 8a3eb50..0000000
--- a/rte/.eslintrc.cjs
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * This is intended to be a basic starting point for linting in your app.
- * It relies on recommended configs out of the box for simplicity, but you can
- * and should modify this configuration to best suit your team's needs.
- */
-
-/** @type {import('eslint').Linter.Config} */
-module.exports = {
- root: true,
- parserOptions: {
- ecmaVersion: "latest",
- sourceType: "module",
- ecmaFeatures: {
- jsx: true,
- },
- },
- env: {
- browser: true,
- commonjs: true,
- es6: true,
- },
- ignorePatterns: ["node_modules/**/*"],
-
- // Base config
- extends: ["eslint:recommended"],
-
- overrides: [
- // React
- {
- files: ["**/*.{js,jsx,ts,tsx}"],
- plugins: ["react", "jsx-a11y"],
- rules: {
- "react/jsx-uses-vars": "error",
- "react/jsx-uses-react": "error",
- },
- extends: [
- "plugin:react/recommended",
- "plugin:react/jsx-runtime",
- "plugin:react-hooks/recommended",
- "plugin:jsx-a11y/recommended",
- ],
- settings: {
- react: {
- version: "detect",
- },
- formComponents: ["Form"],
- linkComponents: [
- { name: "Link", linkAttribute: "to" },
- { name: "NavLink", linkAttribute: "to" },
- ],
- "import/resolver": {
- typescript: {
- project: "./rte/tsconfig.json",
- },
- },
- },
- },
-
- // Typescript
- {
- files: ["**/*.{ts,tsx}"],
- plugins: ["@typescript-eslint", "import"],
- parser: "@typescript-eslint/parser",
- settings: {
- "import/internal-regex": "^~/",
- "import/resolver": {
- node: {
- extensions: [".ts", ".tsx"],
- },
- typescript: {
- alwaysTryTypes: true,
- },
- },
- },
- extends: [
- "plugin:@typescript-eslint/recommended",
- "plugin:import/recommended",
- "plugin:import/typescript",
- ],
- },
-
- // Node
- {
- files: [".eslintrc.cjs"],
- env: {
- node: true,
- },
- },
- ],
-}
diff --git a/rte/components/ImageEditModal.tsx b/rte/components/ImageEditModal.tsx
index d2877bf..38b62a7 100644
--- a/rte/components/ImageEditModal.tsx
+++ b/rte/components/ImageEditModal.tsx
@@ -178,6 +178,7 @@ export default function ImageEditModal({
/>
+ {/* @ts-expect-error: Type incompatibility with Venus components */}