BLOG-290 Migrate the frontend JS runtime to bun (#294)
All checks were successful
Frontend CI / build (push) Successful in 1m33s
All checks were successful
Frontend CI / build (push) Successful in 1m33s
### Description This change migrates the frontend environment from Node.js/pnpm to Bun to improve build performance and runtime efficiency. The migration includes updating CI/CD workflows, Docker configurations, and the SvelteKit adapter. Additionally, the PR introduces stricter linting rules via eslint-plugin-simple-import-sort and a global restriction on relative imports to enforce the use of path aliases ($lib/...), ensuring a cleaner and more maintainable import structure across the project. Backend environment variables were also renamed for consistency. ### Package Changes Package | Action | Version -- | -- | -- svelte-adapter-bun | Added | 1.0.1 eslint-plugin-simple-import-sort | Added | 13.0.0 @types/node | Added | 22.19.17 eslint-plugin-import | Removed | 2.32.0 @sveltejs/adapter-node | Removed | 5.5.4 svelte | Updated | 5.55.1 -> 5.55.5 @sentry/sveltekit | Updated | 10.47.0 -> 10.51.0 @sveltejs/kit | Updated | 2.55.0 -> 2.58.0 tailwindcss | Updated | 4.2.2 -> 4.2.4 typescript-eslint | Updated | 8.58.0 -> 8.59.1 ### Screenshots _No response_ ### Reference Resolves #290. ### Checklist - [x] A milestone is set - [x] The related issuse has been linked to this branch Reviewed-on: #294 Co-authored-by: SquidSpirit <squid@squidspirit.com> Co-committed-by: SquidSpirit <squid@squidspirit.com>
This commit was merged in pull request #294.
This commit is contained in:
@@ -12,24 +12,14 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
run_install: false
|
||||
|
||||
- name: Install node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: frontend/pnpm-lock.yaml
|
||||
- name: Install bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
run: bun install
|
||||
|
||||
- name: ESLint
|
||||
run: pnpm run lint
|
||||
run: bun run --bun lint
|
||||
|
||||
- name: Check
|
||||
run: pnpm run check
|
||||
run: bun run --bun check
|
||||
|
||||
@@ -28,6 +28,6 @@ REDIS_SEARCH_QUERY_EMBEDDING_PREFIX=search:query_embedding
|
||||
SESSION_KEY='openssl rand -hex 64'
|
||||
|
||||
STORAGE_PATH=static
|
||||
EMBEDDING_CACHE_DIR=embedding_cache
|
||||
EMBEDDING_CACHE_PATH=embedding_cache
|
||||
|
||||
SENTRY_DSN=
|
||||
|
||||
@@ -15,12 +15,13 @@ RUN apt-get update && \
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/target/release/server .
|
||||
EXPOSE 8080
|
||||
VOLUME ["/app/static"]
|
||||
VOLUME ["/app/static", "/app/embedding_cache"]
|
||||
ENV RUST_LOG=info
|
||||
ENV RUST_BACKTRACE=1
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=8080
|
||||
ENV STORAGE_PATH=/app/static
|
||||
ENV EMBEDDING_CACHE_PATH=/app/embedding_cache
|
||||
ENV DATABASE_HOST=127.0.0.1
|
||||
ENV DATABASE_PORT=5432
|
||||
ENV DATABASE_USER=postgres
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
engine-strict=true
|
||||
@@ -1,28 +1,29 @@
|
||||
FROM node:22-alpine AS base
|
||||
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
RUN corepack enable pnpm
|
||||
FROM oven/bun:1-alpine AS base
|
||||
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN apk add --no-cache libc6-compat && \
|
||||
pnpm install --frozen-lockfile
|
||||
RUN apk add --no-cache libc6-compat
|
||||
RUN mkdir -p /temp/dev
|
||||
RUN mkdir -p /temp/prod
|
||||
COPY package.json bun.lock /temp/dev/
|
||||
COPY package.json bun.lock /temp/prod/
|
||||
RUN cd /temp/dev && bun install --frozen-lockfile
|
||||
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
||||
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY --from=deps /temp/dev/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN \
|
||||
SENTRY_AUTH_TOKEN="$(cat /run/secrets/SENTRY_AUTH_TOKEN 2>/dev/null || true)" \
|
||||
pnpm run build
|
||||
bun run build
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
COPY --from=deps /temp/prod/node_modules ./node_modules
|
||||
COPY --from=builder /app/build ./build
|
||||
RUN pnpm install --prod --frozen-lockfile
|
||||
COPY --from=builder /app/package.json ./
|
||||
EXPOSE 3000
|
||||
ENV NODE_ENV=production
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
ENV PORT=3000
|
||||
CMD ["node", "build"]
|
||||
CMD ["bun", "run", "build/index.js"]
|
||||
|
||||
1030
frontend/bun.lock
Normal file
1030
frontend/bun.lock
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,14 @@
|
||||
import prettier from 'eslint-config-prettier';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import { includeIgnoreFile } from '@eslint/compat';
|
||||
import js from '@eslint/js';
|
||||
import prettier from 'eslint-config-prettier';
|
||||
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
||||
import svelte from 'eslint-plugin-svelte';
|
||||
import importPlugin from 'eslint-plugin-import';
|
||||
import globals from 'globals';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import ts from 'typescript-eslint';
|
||||
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import svelteConfig from './svelte.config.js';
|
||||
|
||||
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
|
||||
@@ -15,10 +18,12 @@ export default ts.config(
|
||||
js.configs.recommended,
|
||||
...ts.configs.recommended,
|
||||
...svelte.configs.recommended,
|
||||
importPlugin.flatConfigs.typescript,
|
||||
prettier,
|
||||
...svelte.configs.prettier,
|
||||
{
|
||||
plugins: {
|
||||
'simple-import-sort': simpleImportSort,
|
||||
},
|
||||
languageOptions: {
|
||||
globals: { ...globals.browser, ...globals.node },
|
||||
},
|
||||
@@ -27,15 +32,39 @@ export default ts.config(
|
||||
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
|
||||
'no-undef': 'off',
|
||||
|
||||
// Disallow relative imports - use absolute paths instead
|
||||
'import/no-relative-parent-imports': 'error',
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
patterns: [
|
||||
{
|
||||
group: ['./*', '!./$types', '../*'],
|
||||
message:
|
||||
'Relative imports are not allowed. Please use path aliases (e.g., $lib/...) instead.',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
'sort-imports': 'off',
|
||||
'simple-import-sort/imports': 'error',
|
||||
'simple-import-sort/exports': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
||||
rules: {
|
||||
// Allow relative imports for CSS files
|
||||
'import/no-relative-parent-imports': ['error', { ignore: ['.*\\.css$'] }],
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
patterns: [
|
||||
{
|
||||
group: ['./*', '../*', '!./$types', '!**/*.css'],
|
||||
message:
|
||||
'Relative imports are not allowed. Please use path aliases (e.g., $lib/...) instead.',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
|
||||
@@ -14,59 +14,59 @@
|
||||
"lint": "prettier --check . && eslint ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/sveltekit": "10.47.0"
|
||||
"@sentry/sveltekit": "10.51.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "2.0.3",
|
||||
"@eslint/compat": "2.0.5",
|
||||
"@eslint/js": "9.39.4",
|
||||
"@fortawesome/fontawesome-free": "7.2.0",
|
||||
"@internationalized/date": "3.12.0",
|
||||
"@lucide/svelte": "1.7.0",
|
||||
"@sentry/vite-plugin": "5.2.0",
|
||||
"@internationalized/date": "3.12.1",
|
||||
"@lucide/svelte": "1.14.0",
|
||||
"@sentry/vite-plugin": "5.2.1",
|
||||
"@sveltejs/adapter-auto": "7.0.1",
|
||||
"@sveltejs/adapter-node": "5.5.4",
|
||||
"@sveltejs/kit": "2.55.0",
|
||||
"@sveltejs/kit": "2.58.0",
|
||||
"@sveltejs/vite-plugin-svelte": "6.2.4",
|
||||
"@tailwindcss/typography": "0.5.19",
|
||||
"@tailwindcss/vite": "4.2.2",
|
||||
"@tailwindcss/vite": "4.2.4",
|
||||
"@types/crypto-js": "4.2.2",
|
||||
"@types/markdown-it": "14.1.2",
|
||||
"@types/markdown-it-attrs": "4.1.3",
|
||||
"@types/node": "22.19.17",
|
||||
"@types/sanitize-html": "2.16.1",
|
||||
"bits-ui": "2.16.5",
|
||||
"bits-ui": "2.18.0",
|
||||
"clsx": "2.1.1",
|
||||
"crypto-js": "4.2.0",
|
||||
"eslint": "9.39.4",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-plugin-import": "2.32.0",
|
||||
"eslint-plugin-svelte": "3.17.0",
|
||||
"globals": "17.4.0",
|
||||
"eslint-plugin-simple-import-sort": "13.0.0",
|
||||
"eslint-plugin-svelte": "3.17.1",
|
||||
"globals": "17.5.0",
|
||||
"highlight.js": "11.11.1",
|
||||
"markdown-it": "14.1.1",
|
||||
"markdown-it-attrs": "4.3.1",
|
||||
"mode-watcher": "1.1.0",
|
||||
"prettier": "3.8.1",
|
||||
"prettier": "3.8.3",
|
||||
"prettier-plugin-svelte": "3.5.1",
|
||||
"prettier-plugin-tailwindcss": "0.7.2",
|
||||
"sanitize-html": "2.17.2",
|
||||
"svelte": "5.55.1",
|
||||
"sanitize-html": "2.17.3",
|
||||
"svelte": "5.55.5",
|
||||
"svelte-adapter-bun": "1.0.1",
|
||||
"svelte-check": "4.4.6",
|
||||
"svelte-sonner": "1.1.0",
|
||||
"svelte-sonner": "1.1.1",
|
||||
"tailwind-merge": "3.5.0",
|
||||
"tailwind-variants": "3.2.2",
|
||||
"tailwindcss": "4.2.2",
|
||||
"tailwindcss": "4.2.4",
|
||||
"tw-animate-css": "1.4.0",
|
||||
"typescript": "5.9.3",
|
||||
"typescript-eslint": "8.58.0",
|
||||
"typescript-eslint": "8.59.1",
|
||||
"vaul-svelte": "1.0.0-next.7",
|
||||
"vite": "7.3.1",
|
||||
"zod": "4.3.6"
|
||||
"zod": "4.4.1"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"@sentry/cli",
|
||||
"esbuild"
|
||||
]
|
||||
},
|
||||
"packageManager": "pnpm@10.33.0"
|
||||
}
|
||||
}
|
||||
|
||||
5734
frontend/pnpm-lock.yaml
generated
5734
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
import { Environment } from '$lib/environment';
|
||||
import { handleErrorWithSentry, replayIntegration } from '@sentry/sveltekit';
|
||||
import * as Sentry from '@sentry/sveltekit';
|
||||
|
||||
import { Environment } from '$lib/environment';
|
||||
|
||||
Sentry.init({
|
||||
dsn: Environment.SENTRY_DSN,
|
||||
|
||||
@@ -19,11 +19,11 @@ Sentry.init({
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
|
||||
// If you don't want to use Session Replay, just remove the line below:
|
||||
integrations: [replayIntegration()],
|
||||
integrations: [Sentry.replayIntegration()],
|
||||
|
||||
release: App.__VERSION__,
|
||||
environment: import.meta.env.MODE || 'development',
|
||||
});
|
||||
|
||||
// If you have a custom error handler, pass it to `handleErrorWithSentry`
|
||||
export const handleError = handleErrorWithSentry();
|
||||
export const handleError = Sentry.handleErrorWithSentry();
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { sequence } from '@sveltejs/kit/hooks';
|
||||
import * as Sentry from '@sentry/sveltekit';
|
||||
import type { Handle } from '@sveltejs/kit';
|
||||
import { Environment } from '$lib/environment';
|
||||
import { sequence } from '@sveltejs/kit/hooks';
|
||||
|
||||
import { Container } from '$lib/container';
|
||||
import { Environment } from '$lib/environment';
|
||||
|
||||
Sentry.init({
|
||||
dsn: Environment.SENTRY_DSN,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { User } from '$lib/auth/domain/entity/user';
|
||||
import z from 'zod';
|
||||
|
||||
import { User } from '$lib/auth/domain/entity/user';
|
||||
|
||||
export const userResponseSchema = z.object({
|
||||
id: z.int32(),
|
||||
displayed_name: z.string(),
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
import { AuthViewModel } from '$lib/auth/adapter/presenter/authViewModel';
|
||||
import { UserViewModel } from '$lib/auth/adapter/presenter/userViewModel';
|
||||
import type { GetCurrentUserUseCase } from '$lib/auth/application/useCase/getCurrentUserUseCase';
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
type AuthState = AsyncState<AuthViewModel>;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { UserViewModel, type DehydratedUserProps } from '$lib/auth/adapter/presenter/userViewModel';
|
||||
import { type DehydratedUserProps, UserViewModel } from '$lib/auth/adapter/presenter/userViewModel';
|
||||
|
||||
export class AuthViewModel {
|
||||
readonly user: UserViewModel | null;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { Readable } from 'svelte/store';
|
||||
|
||||
import type { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
|
||||
export interface BaseStore<T extends AsyncState<unknown>, U = void> {
|
||||
get subscribe(): Readable<T>['subscribe'];
|
||||
get trigger(): (arg: U) => Promise<T>;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import { writable } from 'svelte/store';
|
||||
import { DrawerViewModel } from './drawerViewModel';
|
||||
import { DrawerViewModel } from '$lib/common/adapter/presenter/drawerViewModel';
|
||||
|
||||
type DrawerState = AsyncState<DrawerViewModel>;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts" module>
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
|
||||
import { type VariantProps, tv } from 'tailwind-variants';
|
||||
import { tv, type VariantProps } from 'tailwind-variants';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
export const buttonVariants = tv({
|
||||
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
||||
|
||||
@@ -3,15 +3,15 @@ import Root, {
|
||||
type ButtonSize,
|
||||
type ButtonVariant,
|
||||
buttonVariants,
|
||||
} from './button.svelte';
|
||||
} from '$lib/common/framework/components/ui/button/button.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
type ButtonProps as Props,
|
||||
//
|
||||
Root as Button,
|
||||
buttonVariants,
|
||||
type ButtonProps,
|
||||
type ButtonSize,
|
||||
type ButtonVariant,
|
||||
buttonVariants,
|
||||
type ButtonProps as Props,
|
||||
Root,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import type { Command as CommandPrimitive, Dialog as DialogPrimitive } from 'bits-ui';
|
||||
import type { Snippet } from 'svelte';
|
||||
import Command from './command.svelte';
|
||||
|
||||
import Command from '$lib/common/framework/components/ui/command/command.svelte';
|
||||
import * as Dialog from '$lib/common/framework/components/ui/dialog/index.js';
|
||||
import type { WithoutChildrenOrChild } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
@@ -30,7 +31,7 @@
|
||||
</Dialog.Header>
|
||||
<Dialog.Content class="overflow-hidden p-0" {portalProps}>
|
||||
<Command
|
||||
class="**:data-[slot=command-input-wrapper]:h-12 [&_[data-command-group]]:px-2 [&_[data-command-group]:not([hidden])_~[data-command-group]]:pt-0 [&_[data-command-input-wrapper]_svg]:h-5 [&_[data-command-input-wrapper]_svg]:w-5 [&_[data-command-input]]:h-12 [&_[data-command-item]]:px-2 [&_[data-command-item]]:py-3 [&_[data-command-item]_svg]:h-5 [&_[data-command-item]_svg]:w-5"
|
||||
class="**:data-command-group:px-2 **:data-command-input:h-12 **:data-command-item:px-2 **:data-command-item:py-3 **:data-[slot=command-input-wrapper]:h-12 [&_[data-command-group]:not([hidden])_~[data-command-group]]:pt-0 [&_[data-command-input-wrapper]_svg]:h-5 [&_[data-command-input-wrapper]_svg]:w-5 [&_[data-command-item]_svg]:h-5 [&_[data-command-item]_svg]:w-5"
|
||||
{...restProps}
|
||||
bind:value
|
||||
bind:ref
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Command as CommandPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Command as CommandPrimitive, useId } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { Command as CommandPrimitive } from 'bits-ui';
|
||||
import SearchIcon from '@lucide/svelte/icons/search';
|
||||
import { Command as CommandPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Command as CommandPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
@@ -13,7 +14,7 @@
|
||||
bind:ref
|
||||
data-slot="command-item"
|
||||
class={cn(
|
||||
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
||||
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-selected:bg-accent aria-selected:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
||||
className
|
||||
)}
|
||||
{...restProps}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Command as CommandPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Command as CommandPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Command as CommandPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
import { Command as CommandPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
export type CommandRootApi = CommandPrimitive.Root;
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,40 +1,39 @@
|
||||
import { Command as CommandPrimitive } from 'bits-ui';
|
||||
|
||||
import Root from './command.svelte';
|
||||
import Dialog from './command-dialog.svelte';
|
||||
import Empty from './command-empty.svelte';
|
||||
import Group from './command-group.svelte';
|
||||
import Item from './command-item.svelte';
|
||||
import Input from './command-input.svelte';
|
||||
import List from './command-list.svelte';
|
||||
import Separator from './command-separator.svelte';
|
||||
import Shortcut from './command-shortcut.svelte';
|
||||
import LinkItem from './command-link-item.svelte';
|
||||
import Root from '$lib/common/framework/components/ui/command/command.svelte';
|
||||
import Dialog from '$lib/common/framework/components/ui/command/command-dialog.svelte';
|
||||
import Empty from '$lib/common/framework/components/ui/command/command-empty.svelte';
|
||||
import Group from '$lib/common/framework/components/ui/command/command-group.svelte';
|
||||
import Input from '$lib/common/framework/components/ui/command/command-input.svelte';
|
||||
import Item from '$lib/common/framework/components/ui/command/command-item.svelte';
|
||||
import LinkItem from '$lib/common/framework/components/ui/command/command-link-item.svelte';
|
||||
import List from '$lib/common/framework/components/ui/command/command-list.svelte';
|
||||
import Separator from '$lib/common/framework/components/ui/command/command-separator.svelte';
|
||||
import Shortcut from '$lib/common/framework/components/ui/command/command-shortcut.svelte';
|
||||
|
||||
const Loading = CommandPrimitive.Loading;
|
||||
|
||||
export {
|
||||
Root,
|
||||
Dialog,
|
||||
Empty,
|
||||
Group,
|
||||
Item,
|
||||
LinkItem,
|
||||
Input,
|
||||
List,
|
||||
Separator,
|
||||
Shortcut,
|
||||
Loading,
|
||||
//
|
||||
Root as Command,
|
||||
Dialog as CommandDialog,
|
||||
Empty as CommandEmpty,
|
||||
Group as CommandGroup,
|
||||
Input as CommandInput,
|
||||
Item as CommandItem,
|
||||
LinkItem as CommandLinkItem,
|
||||
Input as CommandInput,
|
||||
List as CommandList,
|
||||
Loading as CommandLoading,
|
||||
Separator as CommandSeparator,
|
||||
Shortcut as CommandShortcut,
|
||||
Loading as CommandLoading,
|
||||
Dialog,
|
||||
Empty,
|
||||
Group,
|
||||
Input,
|
||||
Item,
|
||||
LinkItem,
|
||||
List,
|
||||
Loading,
|
||||
Root,
|
||||
Separator,
|
||||
Shortcut,
|
||||
};
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { Dialog as DialogPrimitive } from 'bits-ui';
|
||||
import XIcon from '@lucide/svelte/icons/x';
|
||||
import { Dialog as DialogPrimitive } from 'bits-ui';
|
||||
import type { Snippet } from 'svelte';
|
||||
import * as Dialog from './index.js';
|
||||
import { cn, type WithoutChildrenOrChild } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
import * as Dialog from '$lib/common/framework/components/ui/dialog/index';
|
||||
import { cn, type WithoutChildrenOrChild } from '$lib/common/framework/components/utils';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -33,7 +34,7 @@
|
||||
{@render children?.()}
|
||||
{#if showCloseButton}
|
||||
<DialogPrimitive.Close
|
||||
class="absolute end-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
||||
class="absolute inset-e-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
||||
>
|
||||
<XIcon />
|
||||
<span class="sr-only">Close</span>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Dialog as DialogPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Dialog as DialogPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Dialog as DialogPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,37 +1,36 @@
|
||||
import { Dialog as DialogPrimitive } from 'bits-ui';
|
||||
|
||||
import Title from './dialog-title.svelte';
|
||||
import Footer from './dialog-footer.svelte';
|
||||
import Header from './dialog-header.svelte';
|
||||
import Overlay from './dialog-overlay.svelte';
|
||||
import Content from './dialog-content.svelte';
|
||||
import Description from './dialog-description.svelte';
|
||||
import Trigger from './dialog-trigger.svelte';
|
||||
import Close from './dialog-close.svelte';
|
||||
import Close from '$lib/common/framework/components/ui/dialog/dialog-close.svelte';
|
||||
import Content from '$lib/common/framework/components/ui/dialog/dialog-content.svelte';
|
||||
import Description from '$lib/common/framework/components/ui/dialog/dialog-description.svelte';
|
||||
import Footer from '$lib/common/framework/components/ui/dialog/dialog-footer.svelte';
|
||||
import Header from '$lib/common/framework/components/ui/dialog/dialog-header.svelte';
|
||||
import Overlay from '$lib/common/framework/components/ui/dialog/dialog-overlay.svelte';
|
||||
import Title from '$lib/common/framework/components/ui/dialog/dialog-title.svelte';
|
||||
import Trigger from '$lib/common/framework/components/ui/dialog/dialog-trigger.svelte';
|
||||
|
||||
const Root = DialogPrimitive.Root;
|
||||
const Portal = DialogPrimitive.Portal;
|
||||
|
||||
export {
|
||||
Root,
|
||||
Title,
|
||||
Portal,
|
||||
Footer,
|
||||
Header,
|
||||
Trigger,
|
||||
Overlay,
|
||||
Close,
|
||||
Content,
|
||||
Description,
|
||||
Close,
|
||||
//
|
||||
Root as Dialog,
|
||||
Title as DialogTitle,
|
||||
Portal as DialogPortal,
|
||||
Footer as DialogFooter,
|
||||
Header as DialogHeader,
|
||||
Trigger as DialogTrigger,
|
||||
Overlay as DialogOverlay,
|
||||
Close as DialogClose,
|
||||
Content as DialogContent,
|
||||
Description as DialogDescription,
|
||||
Close as DialogClose,
|
||||
Footer as DialogFooter,
|
||||
Header as DialogHeader,
|
||||
Overlay as DialogOverlay,
|
||||
Portal as DialogPortal,
|
||||
Title as DialogTitle,
|
||||
Trigger as DialogTrigger,
|
||||
Footer,
|
||||
Header,
|
||||
Overlay,
|
||||
Portal,
|
||||
Root,
|
||||
Title,
|
||||
Trigger,
|
||||
};
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import DrawerPortal from './drawer-portal.svelte';
|
||||
import DrawerOverlay from './drawer-overlay.svelte';
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
import type { ComponentProps } from 'svelte';
|
||||
import type { WithoutChildrenOrChild } from '$lib/common/framework/components/utils.js';
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
|
||||
import DrawerOverlay from '$lib/common/framework/components/ui/drawer/drawer-overlay.svelte';
|
||||
import DrawerPortal from '$lib/common/framework/components/ui/drawer/drawer-portal.svelte';
|
||||
import type { WithoutChildrenOrChild } from '$lib/common/framework/components/utils';
|
||||
import { cn } from '$lib/common/framework/components/utils';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
@@ -26,14 +27,14 @@
|
||||
'group/drawer-content fixed z-50 flex h-auto flex-col bg-background',
|
||||
'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b',
|
||||
'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t',
|
||||
'data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-s data-[vaul-drawer-direction=right]:sm:max-w-sm',
|
||||
'data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-e data-[vaul-drawer-direction=left]:sm:max-w-sm',
|
||||
'data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:inset-e-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-s data-[vaul-drawer-direction=right]:sm:max-w-sm',
|
||||
'data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:inset-s-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-e data-[vaul-drawer-direction=left]:sm:max-w-sm',
|
||||
className
|
||||
)}
|
||||
{...restProps}
|
||||
>
|
||||
<div
|
||||
class="mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block"
|
||||
class="mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block"
|
||||
></div>
|
||||
{@render children?.()}
|
||||
</DrawerPrimitive.Content>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { Drawer as DrawerPrimitive } from 'vaul-svelte';
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
|
||||
@@ -1,38 +1,36 @@
|
||||
import Root from './drawer.svelte';
|
||||
import Content from './drawer-content.svelte';
|
||||
import Description from './drawer-description.svelte';
|
||||
import Overlay from './drawer-overlay.svelte';
|
||||
import Footer from './drawer-footer.svelte';
|
||||
import Header from './drawer-header.svelte';
|
||||
import Title from './drawer-title.svelte';
|
||||
import NestedRoot from './drawer-nested.svelte';
|
||||
import Close from './drawer-close.svelte';
|
||||
import Trigger from './drawer-trigger.svelte';
|
||||
import Portal from './drawer-portal.svelte';
|
||||
import Root from '$lib/common/framework/components/ui/drawer/drawer.svelte';
|
||||
import Close from '$lib/common/framework/components/ui/drawer/drawer-close.svelte';
|
||||
import Content from '$lib/common/framework/components/ui/drawer/drawer-content.svelte';
|
||||
import Description from '$lib/common/framework/components/ui/drawer/drawer-description.svelte';
|
||||
import Footer from '$lib/common/framework/components/ui/drawer/drawer-footer.svelte';
|
||||
import Header from '$lib/common/framework/components/ui/drawer/drawer-header.svelte';
|
||||
import NestedRoot from '$lib/common/framework/components/ui/drawer/drawer-nested.svelte';
|
||||
import Overlay from '$lib/common/framework/components/ui/drawer/drawer-overlay.svelte';
|
||||
import Portal from '$lib/common/framework/components/ui/drawer/drawer-portal.svelte';
|
||||
import Title from '$lib/common/framework/components/ui/drawer/drawer-title.svelte';
|
||||
import Trigger from '$lib/common/framework/components/ui/drawer/drawer-trigger.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
NestedRoot,
|
||||
Close,
|
||||
Content,
|
||||
Description,
|
||||
Overlay,
|
||||
Footer,
|
||||
Header,
|
||||
Title,
|
||||
Trigger,
|
||||
Portal,
|
||||
Close,
|
||||
|
||||
//
|
||||
Root as Drawer,
|
||||
NestedRoot as DrawerNestedRoot,
|
||||
Close as DrawerClose,
|
||||
Content as DrawerContent,
|
||||
Description as DrawerDescription,
|
||||
Overlay as DrawerOverlay,
|
||||
Footer as DrawerFooter,
|
||||
Header as DrawerHeader,
|
||||
NestedRoot as DrawerNestedRoot,
|
||||
Overlay as DrawerOverlay,
|
||||
Portal as DrawerPortal,
|
||||
Title as DrawerTitle,
|
||||
Trigger as DrawerTrigger,
|
||||
Portal as DrawerPortal,
|
||||
Close as DrawerClose,
|
||||
Footer,
|
||||
Header,
|
||||
NestedRoot,
|
||||
Overlay,
|
||||
Portal,
|
||||
Root,
|
||||
Title,
|
||||
Trigger,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { LinkPreview as HoverCardPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import { LinkPreview as HoverCardPrimitive } from 'bits-ui';
|
||||
import Content from './hover-card-content.svelte';
|
||||
import Trigger from './hover-card-trigger.svelte';
|
||||
|
||||
import Content from '$lib/common/framework/components/ui/hover-card/hover-card-content.svelte';
|
||||
import Trigger from '$lib/common/framework/components/ui/hover-card/hover-card-trigger.svelte';
|
||||
|
||||
const Root = HoverCardPrimitive.Root;
|
||||
|
||||
export {
|
||||
Root,
|
||||
Content,
|
||||
Trigger,
|
||||
Root as HoverCard,
|
||||
Content as HoverCardContent,
|
||||
Trigger as HoverCardTrigger,
|
||||
Root,
|
||||
Trigger,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Root from './input.svelte';
|
||||
import Root from '$lib/common/framework/components/ui/input/input.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
//
|
||||
Root as Input,
|
||||
Root,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
type InputType = Exclude<HTMLInputTypeAttribute, 'file'>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Root from './label.svelte';
|
||||
import Root from '$lib/common/framework/components/ui/label/label.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
//
|
||||
Root as Label,
|
||||
Root,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Label as LabelPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
import { Popover as PopoverPrimitive } from 'bits-ui';
|
||||
import Content from './popover-content.svelte';
|
||||
import Trigger from './popover-trigger.svelte';
|
||||
|
||||
import Content from '$lib/common/framework/components/ui/popover/popover-content.svelte';
|
||||
import Trigger from '$lib/common/framework/components/ui/popover/popover-trigger.svelte';
|
||||
|
||||
const Root = PopoverPrimitive.Root;
|
||||
const Close = PopoverPrimitive.Close;
|
||||
|
||||
export {
|
||||
Root,
|
||||
Content,
|
||||
Trigger,
|
||||
Close,
|
||||
//
|
||||
Content,
|
||||
Root as Popover,
|
||||
Close as PopoverClose,
|
||||
Content as PopoverContent,
|
||||
Trigger as PopoverTrigger,
|
||||
Close as PopoverClose,
|
||||
Root,
|
||||
Trigger,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
import { Popover as PopoverPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
import { Popover as PopoverPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { default as Toaster } from './sonner.svelte';
|
||||
export { default as Toaster } from '$lib/common/framework/components/ui/sonner/sonner.svelte';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Toaster as Sonner, type ToasterProps as SonnerProps } from 'svelte-sonner';
|
||||
import { mode } from 'mode-watcher';
|
||||
import { Toaster as Sonner, type ToasterProps as SonnerProps } from 'svelte-sonner';
|
||||
|
||||
let { ...restProps }: SonnerProps = $props();
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Root from './switch.svelte';
|
||||
import Root from '$lib/common/framework/components/ui/switch/switch.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Switch as SwitchPrimitive } from 'bits-ui';
|
||||
|
||||
import { cn, type WithoutChildrenOrChild } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import Root from './table.svelte';
|
||||
import Body from './table-body.svelte';
|
||||
import Caption from './table-caption.svelte';
|
||||
import Cell from './table-cell.svelte';
|
||||
import Footer from './table-footer.svelte';
|
||||
import Head from './table-head.svelte';
|
||||
import Header from './table-header.svelte';
|
||||
import Row from './table-row.svelte';
|
||||
import Root from '$lib/common/framework/components/ui/table/table.svelte';
|
||||
import Body from '$lib/common/framework/components/ui/table/table-body.svelte';
|
||||
import Caption from '$lib/common/framework/components/ui/table/table-caption.svelte';
|
||||
import Cell from '$lib/common/framework/components/ui/table/table-cell.svelte';
|
||||
import Footer from '$lib/common/framework/components/ui/table/table-footer.svelte';
|
||||
import Head from '$lib/common/framework/components/ui/table/table-head.svelte';
|
||||
import Header from '$lib/common/framework/components/ui/table/table-header.svelte';
|
||||
import Row from '$lib/common/framework/components/ui/table/table-row.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
Body,
|
||||
Caption,
|
||||
Cell,
|
||||
Footer,
|
||||
Head,
|
||||
Header,
|
||||
Root,
|
||||
Row,
|
||||
//
|
||||
Root as Table,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLTdAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLThAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import type { HTMLTableAttributes } from 'svelte/elements';
|
||||
|
||||
import { cn, type WithElementRef } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Root from './textarea.svelte';
|
||||
import Root from '$lib/common/framework/components/ui/textarea/textarea.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<script lang="ts">
|
||||
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
||||
|
||||
import {
|
||||
cn,
|
||||
type WithElementRef,
|
||||
type WithoutChildren,
|
||||
} from '$lib/common/framework/components/utils.js';
|
||||
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import Root from './tooltip.svelte';
|
||||
import Trigger from './tooltip-trigger.svelte';
|
||||
import Content from './tooltip-content.svelte';
|
||||
import Provider from './tooltip-provider.svelte';
|
||||
import Portal from './tooltip-portal.svelte';
|
||||
import Root from '$lib/common/framework/components/ui/tooltip/tooltip.svelte';
|
||||
import Content from '$lib/common/framework/components/ui/tooltip/tooltip-content.svelte';
|
||||
import Portal from '$lib/common/framework/components/ui/tooltip/tooltip-portal.svelte';
|
||||
import Provider from '$lib/common/framework/components/ui/tooltip/tooltip-provider.svelte';
|
||||
import Trigger from '$lib/common/framework/components/ui/tooltip/tooltip-trigger.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
Trigger,
|
||||
Content,
|
||||
Provider,
|
||||
Portal,
|
||||
Provider,
|
||||
Root,
|
||||
//
|
||||
Root as Tooltip,
|
||||
Content as TooltipContent,
|
||||
Trigger as TooltipTrigger,
|
||||
Provider as TooltipProvider,
|
||||
Portal as TooltipPortal,
|
||||
Provider as TooltipProvider,
|
||||
Trigger as TooltipTrigger,
|
||||
Trigger,
|
||||
};
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { Tooltip as TooltipPrimitive } from 'bits-ui';
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
import TooltipPortal from './tooltip-portal.svelte';
|
||||
import type { ComponentProps } from 'svelte';
|
||||
|
||||
import TooltipPortal from '$lib/common/framework/components/ui/tooltip/tooltip-portal.svelte';
|
||||
import type { WithoutChildrenOrChild } from '$lib/common/framework/components/utils.js';
|
||||
import { cn } from '$lib/common/framework/components/utils.js';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { Tooltip as TooltipPrimitive } from 'bits-ui';
|
||||
import TooltipProvider from './tooltip-provider.svelte';
|
||||
|
||||
import TooltipProvider from '$lib/common/framework/components/ui/tooltip/tooltip-provider.svelte';
|
||||
|
||||
let { open = $bindable(false), ...restProps }: TooltipPrimitive.RootProps = $props();
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { clsx, type ClassValue } from 'clsx';
|
||||
import { type ClassValue, clsx } from 'clsx';
|
||||
import { twMerge } from 'tailwind-merge';
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { Strings } from '$lib/strings';
|
||||
import { resolve } from '$app/paths';
|
||||
import { cn } from '$lib/common/framework/components/utils';
|
||||
import { Links } from '$lib/links';
|
||||
import { resolve } from '$app/paths';
|
||||
import { Strings } from '$lib/strings';
|
||||
|
||||
const currentYear = new Date().getFullYear();
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script>
|
||||
import { Environment } from '$lib/environment';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
import { Environment } from '$lib/environment';
|
||||
|
||||
onMount(() => {
|
||||
const gaMeasurementId = Environment.GA_MEASUREMENT_ID;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import Switch from '$lib/common/framework/components/ui/switch/switch.svelte';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
|
||||
import Switch from '$lib/common/framework/components/ui/switch/switch.svelte';
|
||||
|
||||
const {
|
||||
for: htmlFor,
|
||||
defaultValue,
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
<script lang="ts">
|
||||
/* eslint-disable svelte/no-navigation-without-resolve */
|
||||
|
||||
import { page } from '$app/state';
|
||||
import { cn } from '$lib/common/framework/components/utils';
|
||||
import { getContext, onDestroy, onMount } from 'svelte';
|
||||
import { DrawerConfiguredStore } from '$lib/common/adapter/presenter/drawerConfiguredStore';
|
||||
|
||||
import { resolve } from '$app/paths';
|
||||
import { page } from '$app/state';
|
||||
import { DrawerConfiguredStore } from '$lib/common/adapter/presenter/drawerConfiguredStore';
|
||||
import { cn } from '$lib/common/framework/components/utils';
|
||||
|
||||
const { actions }: { actions: NavigationActionProps[] } = $props();
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { DrawerConfiguredStore } from '$lib/common/adapter/presenter/drawerConfiguredStore';
|
||||
import { getContext } from 'svelte';
|
||||
import { fade, scale } from 'svelte/transition';
|
||||
|
||||
import { DrawerConfiguredStore } from '$lib/common/adapter/presenter/drawerConfiguredStore';
|
||||
import { cn } from '$lib/common/framework/components/utils';
|
||||
|
||||
const drawerConfiguredStore = getContext<DrawerConfiguredStore>(DrawerConfiguredStore.name);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { Button } from '$lib/common/framework/components/ui/button';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
|
||||
import { Button } from '$lib/common/framework/components/ui/button';
|
||||
|
||||
const {
|
||||
for: htmlFor,
|
||||
defaultValue,
|
||||
|
||||
@@ -4,47 +4,47 @@ import { AuthLoadedStore } from '$lib/auth/adapter/presenter/authLoadedStore';
|
||||
import type { AuthRepository } from '$lib/auth/application/gateway/authRepository';
|
||||
import { GetCurrentUserUseCase } from '$lib/auth/application/useCase/getCurrentUserUseCase';
|
||||
import { AuthApiServiceImpl } from '$lib/auth/framework/api/authApiServiceImpl';
|
||||
import { DrawerConfiguredStore } from '$lib/common/adapter/presenter/drawerConfiguredStore';
|
||||
import type { ImageApiService } from '$lib/image/adapter/gateway/imageApiService';
|
||||
import { ImageRepositoryImpl } from '$lib/image/adapter/gateway/imageRepositoryImpl';
|
||||
import { ImageDeletedStore } from '$lib/image/adapter/presenter/imageDeletedStore';
|
||||
import type { ImageInfoViewModel } from '$lib/image/adapter/presenter/imageInfoViewModel';
|
||||
import { ImageLoadedStore } from '$lib/image/adapter/presenter/imageLoadedStore';
|
||||
import { ImagesListedStore } from '$lib/image/adapter/presenter/imagesListedStore';
|
||||
import { ImageUploadedStore } from '$lib/image/adapter/presenter/imageUploadedStore';
|
||||
import type { ImageRepository } from '$lib/image/application/gateway/imageRepository';
|
||||
import { DeleteImageUseCase } from '$lib/image/application/useCase/deleteImageUseCase';
|
||||
import { GetImageInfoUseCase } from '$lib/image/application/useCase/getImageInfoUseCase';
|
||||
import { ListImagesUseCase } from '$lib/image/application/useCase/listImagesUseCase';
|
||||
import { UploadImageUseCase } from '$lib/image/application/useCase/uploadImageUseCase';
|
||||
import { ImageApiServiceImpl } from '$lib/image/framework/api/imageApiServiceImpl';
|
||||
import type { LabelApiService } from '$lib/label/adapter/gateway/labelApiService';
|
||||
import { LabelRepositoryImpl } from '$lib/label/adapter/gateway/labelRepositoryImpl';
|
||||
import { LabelCreatedStore } from '$lib/label/adapter/presenter/labelCreatedStore';
|
||||
import { LabelLoadedStore } from '$lib/label/adapter/presenter/labelLoadedStore';
|
||||
import { LabelsListedStore } from '$lib/label/adapter/presenter/labelsListedStore';
|
||||
import { LabelUpdatedStore } from '$lib/label/adapter/presenter/labelUpdatedStore';
|
||||
import type { LabelViewModel } from '$lib/label/adapter/presenter/labelViewModel';
|
||||
import { LabelsListedStore } from '$lib/label/adapter/presenter/labelsListedStore';
|
||||
import type { LabelRepository } from '$lib/label/application/gateway/labelRepository';
|
||||
import { CreateLabelUseCase } from '$lib/label/application/useCase/createLabelUseCase';
|
||||
import { GetImageInfoUseCase } from '$lib/image/application/useCase/getImageInfoUseCase';
|
||||
import { GetAllLabelsUseCase } from '$lib/label/application/useCase/getAllLabelsUseCase';
|
||||
import { GetLabelUseCase } from '$lib/label/application/useCase/getLabelUseCase';
|
||||
import { UpdateLabelUseCase } from '$lib/label/application/useCase/updateLabelUseCase';
|
||||
import { LabelApiServiceImpl } from '$lib/label/framework/api/labelApiServiceImpl';
|
||||
import type { ImageApiService } from '$lib/image/adapter/gateway/imageApiService';
|
||||
import { ImageRepositoryImpl } from '$lib/image/adapter/gateway/imageRepositoryImpl';
|
||||
import { ImageLoadedStore } from '$lib/image/adapter/presenter/imageLoadedStore';
|
||||
import { ImageUploadedStore } from '$lib/image/adapter/presenter/imageUploadedStore';
|
||||
import { ImagesListedStore } from '$lib/image/adapter/presenter/imagesListedStore';
|
||||
import type { ImageRepository } from '$lib/image/application/gateway/imageRepository';
|
||||
import { UploadImageUseCase } from '$lib/image/application/useCase/uploadImageUseCase';
|
||||
import { ListImagesUseCase } from '$lib/image/application/useCase/listImagesUseCase';
|
||||
import { ImageApiServiceImpl } from '$lib/image/framework/api/imageApiServiceImpl';
|
||||
import type { ImageInfoViewModel } from '$lib/image/adapter/presenter/imageInfoViewModel';
|
||||
import type { PostApiService } from '$lib/post/adapter/gateway/postApiService';
|
||||
import { PostRepositoryImpl } from '$lib/post/adapter/gateway/postRepositoryImpl';
|
||||
import { PostCreatedStore } from '$lib/post/adapter/presenter/postCreatedStore';
|
||||
import { PostUpdatedStore } from '$lib/post/adapter/presenter/postUpdatedStore';
|
||||
import type { PostInfoViewModel } from '$lib/post/adapter/presenter/postInfoViewModel';
|
||||
import { PostsListedStore } from '$lib/post/adapter/presenter/postsListedStore';
|
||||
import { PostLoadedStore } from '$lib/post/adapter/presenter/postLoadedStore';
|
||||
import { PostsListedStore } from '$lib/post/adapter/presenter/postsListedStore';
|
||||
import { PostUpdatedStore } from '$lib/post/adapter/presenter/postUpdatedStore';
|
||||
import type { PostViewModel } from '$lib/post/adapter/presenter/postViewModel';
|
||||
import type { PostRepository } from '$lib/post/application/gateway/postRepository';
|
||||
import { CreatePostUseCase } from '$lib/post/application/useCase/createPostUseCase';
|
||||
import { UpdatePostUseCase } from '$lib/post/application/useCase/updatePostUseCase';
|
||||
import { GetAllPostsUseCase } from '$lib/post/application/useCase/getAllPostsUseCase';
|
||||
import { GetPostUseCase } from '$lib/post/application/useCase/getPostUseCase';
|
||||
import { UpdatePostUseCase } from '$lib/post/application/useCase/updatePostUseCase';
|
||||
import { PostApiServiceImpl } from '$lib/post/framework/api/postApiServiceImpl';
|
||||
import { GetLabelUseCase } from '$lib/label/application/useCase/getLabelUseCase';
|
||||
import { LabelLoadedStore } from '$lib/label/adapter/presenter/labelLoadedStore';
|
||||
import { DrawerConfiguredStore } from './common/adapter/presenter/drawerConfiguredStore';
|
||||
import { ImageDeletedStore } from '$lib/image/adapter/presenter/imageDeletedStore';
|
||||
import { DeleteImageUseCase } from '$lib/image/application/useCase/deleteImageUseCase';
|
||||
|
||||
export class Container {
|
||||
private useCases: UseCases;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
|
||||
import { cn } from '$lib/common/framework/components/utils';
|
||||
import { selfIntroductionLines } from '$lib/common/framework/ui/StructuredData.svelte';
|
||||
import TerminalLastLine from '$lib/home/framework/ui/TerminalLastLine.svelte';
|
||||
import TerminalNormalLine from '$lib/home/framework/ui/TerminalNormalLine.svelte';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
|
||||
const lines = selfIntroductionLines;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<script lang="ts">
|
||||
import TerminalCursor from '$lib/home/framework/ui/TerminalCursor.svelte';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
|
||||
import TerminalCursor from '$lib/home/framework/ui/TerminalCursor.svelte';
|
||||
|
||||
let { text, onComplete: onCompleted }: { text: string; onComplete: () => void } = $props();
|
||||
|
||||
let timeText: string = $state('');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ImageInfo } from '$lib/image/domain/entity/imageInfo';
|
||||
import z from 'zod';
|
||||
|
||||
import { ImageInfo } from '$lib/image/domain/entity/imageInfo';
|
||||
|
||||
export const imageInfoResponseSchema = z.object({
|
||||
id: z.int32(),
|
||||
mime_type: z.string(),
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import type { DeleteImageUseCase } from '$lib/image/application/useCase/deleteImageUseCase';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
type VoidState = AsyncState<void>;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import { ImageInfoViewModel } from '$lib/image/adapter/presenter/imageInfoViewModel';
|
||||
import type { GetImageInfoUseCase } from '$lib/image/application/useCase/getImageInfoUseCase';
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
type ImageState = AsyncState<ImageInfoViewModel>;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import { ImageInfoViewModel } from '$lib/image/adapter/presenter/imageInfoViewModel';
|
||||
import type { UploadImageUseCase } from '$lib/image/application/useCase/uploadImageUseCase';
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
type ImageInfoState = AsyncState<ImageInfoViewModel>;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import { ImageInfoViewModel } from '$lib/image/adapter/presenter/imageInfoViewModel';
|
||||
import type { ListImagesUseCase } from '$lib/image/application/useCase/listImagesUseCase';
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
type ImageListState = AsyncState<readonly ImageInfoViewModel[]>;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ImageInfo } from '$lib/image/domain/entity/imageInfo';
|
||||
import type { ImageRepository } from '$lib/image/application/gateway/imageRepository';
|
||||
import type { ImageInfo } from '$lib/image/domain/entity/imageInfo';
|
||||
|
||||
export class GetImageInfoUseCase {
|
||||
constructor(private readonly imageRepository: ImageRepository) {}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte';
|
||||
import { ImageLoadedStore } from '$lib/image/adapter/presenter/imageLoadedStore';
|
||||
|
||||
import { resolve } from '$app/paths';
|
||||
import Table from '$lib/common/framework/components/ui/table/table.svelte';
|
||||
import TableBody from '$lib/common/framework/components/ui/table/table-body.svelte';
|
||||
import TableRow from '$lib/common/framework/components/ui/table/table-row.svelte';
|
||||
import TableCell from '$lib/common/framework/components/ui/table/table-cell.svelte';
|
||||
import TableHead from '$lib/common/framework/components/ui/table/table-head.svelte';
|
||||
import TableRow from '$lib/common/framework/components/ui/table/table-row.svelte';
|
||||
import { copyToClipboard } from '$lib/common/framework/ui/copyToClipboard';
|
||||
import { resolve } from '$app/paths';
|
||||
import { ImageLoadedStore } from '$lib/image/adapter/presenter/imageLoadedStore';
|
||||
|
||||
const imageLoadedStore = getContext<ImageLoadedStore>(ImageLoadedStore.name);
|
||||
const imageState = $derived($imageLoadedStore);
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte';
|
||||
import UploadImageDialoag from '$lib/image/framework/ui/UploadImageDialoag.svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { ImageUploadedStore } from '$lib/image/adapter/presenter/imageUploadedStore';
|
||||
import { ImagesListedStore } from '$lib/image/adapter/presenter/imagesListedStore';
|
||||
|
||||
import { Button } from '$lib/common/framework/components/ui/button';
|
||||
import { cn } from '$lib/common/framework/components/utils';
|
||||
import { copyToClipboard } from '$lib/common/framework/ui/copyToClipboard';
|
||||
import { ImageDeletedStore } from '$lib/image/adapter/presenter/imageDeletedStore';
|
||||
import { ImagesListedStore } from '$lib/image/adapter/presenter/imagesListedStore';
|
||||
import { ImageUploadedStore } from '$lib/image/adapter/presenter/imageUploadedStore';
|
||||
import UploadImageDialoag from '$lib/image/framework/ui/UploadImageDialoag.svelte';
|
||||
|
||||
const imageUploadedStore = getContext<ImageUploadedStore>(ImageUploadedStore.name);
|
||||
const imageUploadedState = $derived($imageUploadedStore);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Color } from '$lib/label/domain/entity/color';
|
||||
import z from 'zod';
|
||||
|
||||
import { Color } from '$lib/label/domain/entity/color';
|
||||
|
||||
export const colorResponseSchema = z.object({
|
||||
red: z.number().int().min(0).max(255),
|
||||
green: z.number().int().min(0).max(255),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
import { ColorDto, colorResponseSchema } from '$lib/label/adapter/gateway/colorDto';
|
||||
import { Label } from '$lib/label/domain/entity/label';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const labelResponseSchema = z.object({
|
||||
id: z.int32(),
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import { LabelViewModel } from '$lib/label/adapter/presenter/labelViewModel';
|
||||
import type { CreateLabelParams } from '$lib/label/application/gateway/labelRepository';
|
||||
import type { CreateLabelUseCase } from '$lib/label/application/useCase/createLabelUseCase';
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
type LabelState = AsyncState<LabelViewModel>;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import { LabelViewModel } from '$lib/label/adapter/presenter/labelViewModel';
|
||||
import type { GetLabelUseCase } from '$lib/label/application/useCase/getLabelUseCase';
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
type LabelState = AsyncState<LabelViewModel>;
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import { LabelViewModel } from '$lib/label/adapter/presenter/labelViewModel';
|
||||
import type { UpdateLabelParams } from '$lib/label/application/gateway/labelRepository';
|
||||
import type { UpdateLabelUseCase } from '$lib/label/application/useCase/updateLabelUseCase';
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
type LabelState = AsyncState<LabelViewModel>;
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
import { AsyncState } from '$lib/common/adapter/presenter/asyncState';
|
||||
import type { BaseStore } from '$lib/common/adapter/presenter/baseStore';
|
||||
import { LabelViewModel } from '$lib/label/adapter/presenter/labelViewModel';
|
||||
import type { GetAllLabelsUseCase } from '$lib/label/application/useCase/getAllLabelsUseCase';
|
||||
import { captureException } from '@sentry/sveltekit';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
type LabelListState = AsyncState<readonly LabelViewModel[]>;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Label } from '$lib/label/domain/entity/label';
|
||||
import type {
|
||||
LabelRepository,
|
||||
UpdateLabelParams,
|
||||
} from '$lib/label/application/gateway/labelRepository';
|
||||
import type { Label } from '$lib/label/domain/entity/label';
|
||||
|
||||
export class UpdateLabelUseCase {
|
||||
constructor(private readonly labelRepository: LabelRepository) {}
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
} from '$lib/common/framework/components/ui/dialog';
|
||||
import Input from '$lib/common/framework/components/ui/input/input.svelte';
|
||||
import Label from '$lib/common/framework/components/ui/label/label.svelte';
|
||||
import PostLabel from '$lib/label/framework/ui/PostLabel.svelte';
|
||||
import InputError from '$lib/common/framework/ui/InputError.svelte';
|
||||
import RestoreButton from '$lib/common/framework/ui/RestoreButton.svelte';
|
||||
import { ColorViewModel } from '$lib/label/adapter/presenter/colorViewModel';
|
||||
import { LabelViewModel } from '$lib/label/adapter/presenter/labelViewModel';
|
||||
import { Label as LabelEntity } from '$lib/label/domain/entity/label';
|
||||
import { ColorViewModel } from '$lib/label/adapter/presenter/colorViewModel';
|
||||
import RestoreButton from '$lib/common/framework/ui/RestoreButton.svelte';
|
||||
import InputError from '$lib/common/framework/ui/InputError.svelte';
|
||||
import PostLabel from '$lib/label/framework/ui/PostLabel.svelte';
|
||||
|
||||
const {
|
||||
title,
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<script lang="ts">
|
||||
import { getContext, onMount } from 'svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
|
||||
import { resolve } from '$app/paths';
|
||||
import Table from '$lib/common/framework/components/ui/table/table.svelte';
|
||||
import TableBody from '$lib/common/framework/components/ui/table/table-body.svelte';
|
||||
import TableCell from '$lib/common/framework/components/ui/table/table-cell.svelte';
|
||||
import TableRow from '$lib/common/framework/components/ui/table/table-row.svelte';
|
||||
import { ColorViewModel } from '$lib/label/adapter/presenter/colorViewModel';
|
||||
import { LabelLoadedStore } from '$lib/label/adapter/presenter/labelLoadedStore';
|
||||
import { LabelUpdatedStore } from '$lib/label/adapter/presenter/labelUpdatedStore';
|
||||
import { ColorViewModel } from '$lib/label/adapter/presenter/colorViewModel';
|
||||
import ColorCode from '$lib/label/framework/ui/ColorCode.svelte';
|
||||
import EditLabelDialog, {
|
||||
type EditLabelDialogFormParams,
|
||||
} from '$lib/label/framework/ui/EditLabelDialog.svelte';
|
||||
import PostLabel from '$lib/label/framework/ui/PostLabel.svelte';
|
||||
import { PostsListedStore } from '$lib/post/adapter/presenter/postsListedStore';
|
||||
import { getContext, onMount } from 'svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import Table from '$lib/common/framework/components/ui/table/table.svelte';
|
||||
import TableBody from '$lib/common/framework/components/ui/table/table-body.svelte';
|
||||
import TableRow from '$lib/common/framework/components/ui/table/table-row.svelte';
|
||||
import TableCell from '$lib/common/framework/components/ui/table/table-cell.svelte';
|
||||
import { resolve } from '$app/paths';
|
||||
|
||||
const { id }: { id: number } = $props();
|
||||
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
<script lang="ts">
|
||||
import { getContext, onMount } from 'svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
|
||||
import { resolve } from '$app/paths';
|
||||
import { TableCell } from '$lib/common/framework/components/ui/table';
|
||||
import Table from '$lib/common/framework/components/ui/table/table.svelte';
|
||||
import TableBody from '$lib/common/framework/components/ui/table/table-body.svelte';
|
||||
import TableHead from '$lib/common/framework/components/ui/table/table-head.svelte';
|
||||
import TableHeader from '$lib/common/framework/components/ui/table/table-header.svelte';
|
||||
import TableRow from '$lib/common/framework/components/ui/table/table-row.svelte';
|
||||
import Table from '$lib/common/framework/components/ui/table/table.svelte';
|
||||
import { ColorViewModel } from '$lib/label/adapter/presenter/colorViewModel';
|
||||
import { LabelCreatedStore } from '$lib/label/adapter/presenter/labelCreatedStore';
|
||||
import { LabelsListedStore } from '$lib/label/adapter/presenter/labelsListedStore';
|
||||
import ColorCode from '$lib/label/framework/ui/ColorCode.svelte';
|
||||
import EditLabelDialog, {
|
||||
type EditLabelDialogFormParams,
|
||||
} from '$lib/label/framework/ui/EditLabelDialog.svelte';
|
||||
import { ColorViewModel } from '$lib/label/adapter/presenter/colorViewModel';
|
||||
import { getContext, onMount } from 'svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { TableCell } from '$lib/common/framework/components/ui/table';
|
||||
import ColorCode from '$lib/label/framework/ui/ColorCode.svelte';
|
||||
import PostLabel from '$lib/label/framework/ui/PostLabel.svelte';
|
||||
import { resolve } from '$app/paths';
|
||||
|
||||
const labelCreatedStore = getContext<LabelCreatedStore>(LabelCreatedStore.name);
|
||||
const labelCreatedState = $derived($labelCreatedStore);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { CreatePostRequestDto } from '$lib/post/adapter/gateway/creatPostRequestDto';
|
||||
import type { UpdatePostRequestDto } from '$lib/post/adapter/gateway/updatePostRequestDto';
|
||||
import type { PostInfoResponseDto } from '$lib/post/adapter/gateway/postInfoResponseDto';
|
||||
import type { PostListQueryDto } from '$lib/post/adapter/gateway/postListQueryDto';
|
||||
import type { PostResponseDto } from '$lib/post/adapter/gateway/postResponseDto';
|
||||
import type { UpdatePostRequestDto } from '$lib/post/adapter/gateway/updatePostRequestDto';
|
||||
|
||||
export interface PostApiService {
|
||||
getAllPosts(searchParams: PostListQueryDto): Promise<PostInfoResponseDto[]>;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import z from 'zod';
|
||||
|
||||
import { LabelResponseDto, labelResponseSchema } from '$lib/label/adapter/gateway/labelResponseDto';
|
||||
import { PostInfo } from '$lib/post/domain/entity/postInfo';
|
||||
import z from 'zod';
|
||||
|
||||
export const postInfoResponseSchema = z.object({
|
||||
id: z.int32(),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user