@webamoki/web-svelte 0.5.14 → 0.5.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ export declare const Time: import("arktype/internal/methods/object.ts").ObjectTy
9
9
  export declare const CalendarDate: import("arktype/internal/methods/object.ts").ObjectType<calendarImport, {}>;
10
10
  export declare const HexColor: import("arktype/internal/methods/string.ts").StringType<string, {}>;
11
11
  export declare const Email: import("arktype/internal/methods/object.ts").ObjectType<(In: string) => import("arktype").Out<string>, {}>;
12
+ export declare const Name: import("arktype/internal/methods/object.ts").ObjectType<(In: string) => import("arktype").Out<string>, {}>;
12
13
  export declare const FirstName: import("arktype/internal/methods/object.ts").ObjectType<(In: string) => import("arktype").Out<string>, {}>;
13
14
  export declare const LastName: import("arktype/internal/methods/object.ts").ObjectType<(In: string) => import("arktype").Out<string>, {}>;
14
15
  export declare const Id: import("arktype/internal/methods/number.ts").NumberType<number, {}>;
@@ -1,7 +1,7 @@
1
1
  import { Type, type } from 'arktype';
2
2
  import { Days } from '../datetime/index.js';
3
3
  import { Time as timeImport, CalendarDate as calendarImport } from '@internationalized/date';
4
- import { EMAIL_MAX, FIRST_NAME_MAX, LAST_NAME_MAX } from './consts.js';
4
+ import { EMAIL_MAX, FIRST_NAME_MAX, LAST_NAME_MAX, NAME_MAX } from './consts.js';
5
5
  import { toTitleCase } from '../string.js';
6
6
  /** Type string which is trimmed before narrowing the type checking */
7
7
  export function trimTo(typeTo) {
@@ -32,6 +32,7 @@ export const Email = trimTo(type('string.email')
32
32
  problem: () => 'invalid email address'
33
33
  })
34
34
  .atMostLength(EMAIL_MAX)).pipe((email) => email.toLowerCase());
35
+ export const Name = trimTo(type.string.moreThanLength(0).atMostLength(NAME_MAX)).pipe(toTitleCase);
35
36
  export const FirstName = trimTo(type.string.moreThanLength(0).atMostLength(FIRST_NAME_MAX)).pipe(toTitleCase);
36
37
  export const LastName = trimTo(type.string.moreThanLength(0).atMostLength(LAST_NAME_MAX)).pipe(toTitleCase);
37
38
  export const Id = type('number >= 0');
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.5.14",
6
+ "version": "0.5.15",
7
7
  "license": "MIT",
8
8
  "files": [
9
9
  "dist",