Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frameworks/qwik/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@
"@formisch/core": "workspace:*",
"@formisch/eslint-config": "workspace:*",
"@formisch/methods": "workspace:*",
"@qwik.dev/core": "2.0.0-beta.5",
"@qwik.dev/core": "https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@1778671",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"@types/node": "24.0.13",
"eslint": "9.31.0",
"eslint-plugin-qwik": "2.0.0-beta.5",
"eslint-plugin-qwik": "https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@1778671",
"globals": "16.3.0",
"prettier": "3.6.2",
"tsdown": "0.12.9",
"typescript": "5.8.3",
"valibot": "^1.4.1",
"vite": "7.0.4",
"vite": "7.3.5",
"vite-tsconfig-paths": "^5.1.4"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions frameworks/qwik/src/hooks/usePathSignal/usePathSignal.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Path } from '@formisch/core/qwik';
import { type ReadonlySignal, useSignal } from '@qwik.dev/core';
import { type Signal, useSignal } from '@qwik.dev/core';

// @__NO_SIDE_EFFECTS__
function isEqual(a: Path, b: Path): boolean {
Expand All @@ -21,7 +21,7 @@ function isEqual(a: Path, b: Path): boolean {
// @__NO_SIDE_EFFECTS__
export function usePathSignal<TPath extends Path>(
path: TPath
): ReadonlySignal<TPath> {
): Readonly<Signal<TPath>> {
const signal = useSignal(path);
if (!isEqual(signal.value, path)) {
signal.value = path;
Expand Down
30 changes: 15 additions & 15 deletions frameworks/qwik/src/types/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
ValidArrayPath,
ValidPath,
} from '@formisch/core/qwik';
import type { QRL, ReadonlySignal } from '@qwik.dev/core';
import type { QRL, Signal } from '@qwik.dev/core';
import type * as v from 'valibot';

/**
Expand Down Expand Up @@ -54,29 +54,29 @@ export interface FieldStore<
/**
* The path to the field within the form.
*/
readonly path: ReadonlySignal<ValidPath<v.InferInput<TSchema>, TFieldPath>>;
readonly path: Readonly<Signal<ValidPath<v.InferInput<TSchema>, TFieldPath>>>;
/**
* The current input value of the field.
*/
readonly input: ReadonlySignal<
PartialValues<PathValue<v.InferInput<TSchema>, TFieldPath>>
readonly input: Readonly<
Signal<PartialValues<PathValue<v.InferInput<TSchema>, TFieldPath>>>
>;
/**
* The current error messages of the field.
*/
readonly errors: ReadonlySignal<[string, ...string[]] | null>;
readonly errors: Readonly<Signal<[string, ...string[]] | null>>;
/**
* Whether the field has been touched.
*/
readonly isTouched: ReadonlySignal<boolean>;
readonly isTouched: Readonly<Signal<boolean>>;
/**
* Whether the field input differs from its initial value.
*/
readonly isDirty: ReadonlySignal<boolean>;
readonly isDirty: Readonly<Signal<boolean>>;
/**
* Whether the field is valid according to the schema.
*/
readonly isValid: ReadonlySignal<boolean>;
readonly isValid: Readonly<Signal<boolean>>;
/**
* Sets the field input value programmatically.
*/
Expand All @@ -99,27 +99,27 @@ export interface FieldArrayStore<
/**
* The path to the array field within the form.
*/
readonly path: ReadonlySignal<
ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>
readonly path: Readonly<
Signal<ValidArrayPath<v.InferInput<TSchema>, TFieldArrayPath>>
>;
/**
* The item IDs of the array field.
*/
readonly items: ReadonlySignal<string[]>;
readonly items: Readonly<Signal<string[]>>;
/**
* The current error messages of the field array.
*/
readonly errors: ReadonlySignal<[string, ...string[]] | null>;
readonly errors: Readonly<Signal<[string, ...string[]] | null>>;
/**
* Whether the field array has been touched.
*/
readonly isTouched: ReadonlySignal<boolean>;
readonly isTouched: Readonly<Signal<boolean>>;
/**
* Whether the field array input differs from its initial value.
*/
readonly isDirty: ReadonlySignal<boolean>;
readonly isDirty: Readonly<Signal<boolean>>;
/**
* Whether the field array is valid according to the schema.
*/
readonly isValid: ReadonlySignal<boolean>;
readonly isValid: Readonly<Signal<boolean>>;
}
16 changes: 8 additions & 8 deletions frameworks/qwik/src/types/form.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { BaseFormStore, FormSchema } from '@formisch/core/qwik';
import type { ReadonlySignal } from '@qwik.dev/core';
import type { Signal } from '@qwik.dev/core';

/**
* Form store interface.
Expand All @@ -9,32 +9,32 @@ export interface FormStore<TSchema extends FormSchema = FormSchema>
/**
* Whether the form is currently submitting.
*/
readonly isSubmitting: ReadonlySignal<boolean>;
readonly isSubmitting: Readonly<Signal<boolean>>;
/**
* Whether the form has been submitted.
*/
readonly isSubmitted: ReadonlySignal<boolean>;
readonly isSubmitted: Readonly<Signal<boolean>>;
/**
* Whether the form is currently validating.
*/
readonly isValidating: ReadonlySignal<boolean>;
readonly isValidating: Readonly<Signal<boolean>>;
/**
* Whether any field in the form has been touched.
*/
readonly isTouched: ReadonlySignal<boolean>;
readonly isTouched: Readonly<Signal<boolean>>;
/**
* Whether any field in the form differs from its initial value.
*/
readonly isDirty: ReadonlySignal<boolean>;
readonly isDirty: Readonly<Signal<boolean>>;
/**
* Whether the form is valid according to the schema.
*/
readonly isValid: ReadonlySignal<boolean>;
readonly isValid: Readonly<Signal<boolean>>;
/**
* The current error messages of the form.
*
* Hint: This property only contains validation errors at the root level
* of the form. To get all errors from all fields, use `getAllErrors`.
*/
readonly errors: ReadonlySignal<[string, ...string[]] | null>;
readonly errors: Readonly<Signal<[string, ...string[]] | null>>;
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@angular/core": "^21.0.0",
"@formisch/eslint-config": "workspace:*",
"@preact/signals": "^2.9.0",
"@qwik.dev/core": "2.0.0-beta.5",
"@qwik.dev/core": "https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@1778671",
Comment thread
maiieul marked this conversation as resolved.
"@types/node": "24.0.13",
"@types/react": "^19.2.5",
"@vitest/coverage-v8": "^4.1.7",
Expand Down
8 changes: 4 additions & 4 deletions playgrounds/qwik/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@
"devDependencies": {
Comment thread
maiieul marked this conversation as resolved.
"@eslint/js": "^9.31.0",
"@formisch/qwik": "workspace:*",
"@qwik.dev/core": "2.0.0-beta.5",
"@qwik.dev/router": "2.0.0-beta.5",
"@qwik.dev/core": "https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@1778671",
"@qwik.dev/router": "https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@1778671",
"@tailwindcss/vite": "^4.1.11",
"@types/node": "24.0.13",
"eslint": "9.31.0",
"eslint-plugin-qwik": "2.0.0-beta.5",
"eslint-plugin-qwik": "https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@1778671",
"globals": "16.3.0",
"prettier": "3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14",
"tailwindcss": "^4.1.11",
"typescript": "5.8.3",
"typescript-eslint": "8.36.0",
"typescript-plugin-css-modules": "^5.1.0",
"vite": "6.3.5",
"vite": "7.3.5",
Comment thread
maiieul marked this conversation as resolved.
"vite-tsconfig-paths": "^5.1.4"
}
}
6 changes: 3 additions & 3 deletions playgrounds/qwik/src/components/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { FieldElementProps } from '@formisch/qwik';
import { component$, ReadonlySignal } from '@qwik.dev/core';
import { component$, Signal } from '@qwik.dev/core';
import clsx from 'clsx';
import { InputErrors } from './InputErrors';

interface CheckboxProps extends FieldElementProps {
class?: string;
label?: string;
value?: string;
input: ReadonlySignal<boolean | undefined>;
input: Readonly<Signal<boolean | undefined>>;
required?: boolean;
errors: ReadonlySignal<[string, ...string[]] | null>;
errors: Readonly<Signal<[string, ...string[]] | null>>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions playgrounds/qwik/src/components/FileInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable qwik/valid-lexical-scope */
import type { FieldElementProps } from '@formisch/qwik';
import { component$, ReadonlySignal, useComputed$ } from '@qwik.dev/core';
import { component$, Signal, useComputed$ } from '@qwik.dev/core';
import clsx from 'clsx';
import { InputErrors } from './InputErrors';
import { InputLabel } from './InputLabel';
Expand All @@ -11,8 +11,8 @@ interface FileInputProps extends FieldElementProps {
accept?: string;
required?: boolean;
multiple?: boolean;
input: ReadonlySignal<File | File[] | null | undefined>;
errors: ReadonlySignal<[string, ...string[]] | null>;
input: Readonly<Signal<File | File[] | null | undefined>>;
errors: Readonly<Signal<[string, ...string[]] | null>>;
}

/**
Expand Down
9 changes: 2 additions & 7 deletions playgrounds/qwik/src/components/InputErrors.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import {
component$,
ReadonlySignal,
useSignal,
useTask$,
} from '@qwik.dev/core';
import { component$, Signal, useSignal, useTask$ } from '@qwik.dev/core';
import { isBrowser } from '@qwik.dev/core/build';
import { Expandable } from './Expandable';

type InputErrorProps = {
name: string;
errors: ReadonlySignal<[string, ...string[]] | null>;
errors: Readonly<Signal<[string, ...string[]] | null>>;
};

/**
Expand Down
6 changes: 3 additions & 3 deletions playgrounds/qwik/src/components/RadioGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FieldElementProps } from '@formisch/qwik';
import { component$, ReadonlySignal } from '@qwik.dev/core';
import { component$, Signal } from '@qwik.dev/core';
import clsx from 'clsx';
import { InputErrors } from './InputErrors';
import { InputLabel } from './InputLabel';
Expand All @@ -10,8 +10,8 @@ interface RadioGroupProps extends FieldElementProps {
label?: string;
options: { label: string; value: string }[];
required?: boolean;
input: ReadonlySignal<string | undefined>;
errors: ReadonlySignal<[string, ...string[]] | null>;
input: Readonly<Signal<string | undefined>>;
errors: Readonly<Signal<[string, ...string[]] | null>>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions playgrounds/qwik/src/components/Select.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FieldElementProps } from '@formisch/qwik';
import { component$, ReadonlySignal, useComputed$ } from '@qwik.dev/core';
import { component$, Signal, useComputed$ } from '@qwik.dev/core';
import clsx from 'clsx';
import { AngleDownIcon } from '~/icons';
import { InputErrors } from './InputErrors';
Expand All @@ -13,8 +13,8 @@ interface SelectProps extends FieldElementProps {
size?: number;
placeholder?: string;
required?: boolean;
input: ReadonlySignal<string | string[] | null | undefined>;
errors: ReadonlySignal<[string, ...string[]] | null>;
input: Readonly<Signal<string | string[] | null | undefined>>;
errors: Readonly<Signal<[string, ...string[]] | null>>;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions playgrounds/qwik/src/components/Slider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FieldElementProps } from '@formisch/qwik';
import { component$, ReadonlySignal } from '@qwik.dev/core';
import { component$, Signal } from '@qwik.dev/core';
import clsx from 'clsx';
import { InputErrors } from './InputErrors';
import { InputLabel } from './InputLabel';
Expand All @@ -11,8 +11,8 @@ interface SliderProps extends FieldElementProps {
max?: number;
step?: number;
required?: boolean;
input: ReadonlySignal<string | number | undefined>;
errors: ReadonlySignal<[string, ...string[]] | null>;
input: Readonly<Signal<string | number | undefined>>;
errors: Readonly<Signal<[string, ...string[]] | null>>;
}

/**
Expand Down
11 changes: 3 additions & 8 deletions playgrounds/qwik/src/components/TextInput.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import type { FieldElementProps } from '@formisch/qwik';
import {
component$,
ReadonlySignal,
useSignal,
useTask$,
} from '@qwik.dev/core';
import { component$, type Signal, useSignal, useTask$ } from '@qwik.dev/core';
import clsx from 'clsx';
import { InputErrors } from './InputErrors';
import { InputLabel } from './InputLabel';
Expand All @@ -15,8 +10,8 @@ interface TextInputProps extends FieldElementProps {
label?: string;
placeholder?: string;
required?: boolean;
input: ReadonlySignal<string | number | undefined>;
errors: ReadonlySignal<[string, ...string[]] | null>;
input: Readonly<Signal<string | number | undefined>>;
errors: Readonly<Signal<[string, ...string[]] | null>>;
}

/**
Expand Down
4 changes: 1 addition & 3 deletions playgrounds/qwik/src/entry.preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
* - https://vitejs.dev/config/preview-options.html#preview-options
*
*/
import qwikRouterConfig from '@qwik-router-config';
import { createQwikRouter } from '@qwik.dev/router/middleware/node';
// make sure qwikRouterConfig is imported before entry
import render from './entry.ssr';
Comment thread
maiieul marked this conversation as resolved.

/**
* The default export is the QwikRouter adapter used by Vite preview.
*/
export default createQwikRouter({ render, qwikRouterConfig });
export default createQwikRouter({ render });
Comment thread
maiieul marked this conversation as resolved.
Comment thread
maiieul marked this conversation as resolved.
Loading
Loading