@lavalogic/scoria 0.0.15 → 0.0.16

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.
@@ -1,4 +1,3 @@
1
- import { Value } from '@sinclair/typebox/value';
2
1
  export function autoPluralise(text, quantity = 2, { capitalise = false } = {}) {
3
2
  if (quantity === 1) {
4
3
  return text;
@@ -2,15 +2,16 @@ export type NonNullableKey<T> = T extends null ? never : string & keyof T;
2
2
  export type ValueProp<V> = keyof V & string;
3
3
  export type Unsubscriber = () => void;
4
4
  export type Pixels = number;
5
- export type InputDate = string & {
6
- readonly __brand: unique symbol;
5
+ export type BrandedString<T> = string & {
6
+ __brand: T;
7
7
  };
8
- export type InputDateWithTime = string & {
9
- readonly __brand: unique symbol;
8
+ export type BrandedNumber<T> = number & {
9
+ __brand: T;
10
10
  };
11
- export type SQLDate = string & {
12
- readonly __brand: unique symbol;
13
- };
14
- export type Centimetres = number & {
15
- readonly __brand: unique symbol;
11
+ export type BrandedInteger<T> = number & {
12
+ __brand: T;
16
13
  };
14
+ export type InputDate = BrandedString<'InputDate'>;
15
+ export type InputDateWithTime = BrandedString<'InputDateWithTime'>;
16
+ export type SQLDate = BrandedString<'SQLDate'>;
17
+ export type Centimetres = BrandedInteger<'Centimetres'>;
package/dist/index.d.ts CHANGED
@@ -143,7 +143,7 @@ export { type GridStringItem } from './Types/Internal/GridStringItem.js';
143
143
  export { type GridTextItem } from './Types/Internal/GridTextItem.js';
144
144
  export { type IdentifiableToastMessage } from './Types/Internal/IdentifiableToastMessage.js';
145
145
  export { InputVariant } from './Types/Internal/InputVariant.js';
146
- export { type NonNullableKey, type ValueProp, type Unsubscriber, type Pixels, type Centimetres, type InputDate, type InputDateWithTime } from './Types/Internal/Misc.js';
146
+ export { type NonNullableKey, type ValueProp, type Unsubscriber, type Pixels, type Centimetres, type InputDate, type InputDateWithTime, type BrandedString, type BrandedNumber, type BrandedInteger } from './Types/Internal/Misc.js';
147
147
  export { type RefWrapper } from './Types/Internal/RefWrapper.js';
148
148
  export { type SelectOption } from './Types/Internal/SelectOption.js';
149
149
  export { Shape } from './Types/Internal/Shape.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.0.15",
4
+ "version": "0.0.16",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -23,17 +23,13 @@
23
23
  }
24
24
  },
25
25
  "peerDependencies": {
26
- "@sinclair/typebox": "^0.34.41",
27
- "@sveltejs/kit": "^2.0.0",
28
26
  "svelte": "^5.0.0"
29
27
  },
30
28
  "devDependencies": {
31
29
  "@chromatic-com/storybook": "^4.1.1",
32
30
  "@eslint/compat": "^1.4.0",
33
31
  "@eslint/js": "^9.37.0",
34
- "@inlang/paraglide-js": "^2.4.0",
35
32
  "@playwright/test": "^1.56.0",
36
- "@sinclair/typebox": "^0.34.41",
37
33
  "@storybook/addon-a11y": "^9.1.10",
38
34
  "@storybook/addon-docs": "^9.1.10",
39
35
  "@storybook/addon-svelte-csf": "^5.0.10",