@happyvertical/smrt-inventory 0.54.2 → 0.54.4
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.
- package/AGENTS.md +16 -0
- package/README.md +58 -0
- package/dist/collections/StockLevelCollection.d.ts +5 -0
- package/dist/collections/StockLevelCollection.d.ts.map +1 -1
- package/dist/index.js +91 -12
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +88 -10
- package/dist/models/StockLevel.d.ts +6 -0
- package/dist/models/StockLevel.d.ts.map +1 -1
- package/dist/models/StockMovement.d.ts +3 -0
- package/dist/models/StockMovement.d.ts.map +1 -1
- package/dist/services/StockService.d.ts +9 -0
- package/dist/services/StockService.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +95 -10
- package/dist/svelte/AdjustStockForm.svelte +59 -0
- package/dist/svelte/AdjustStockForm.svelte.d.ts +11 -0
- package/dist/svelte/AdjustStockForm.svelte.d.ts.map +1 -0
- package/dist/svelte/LocationForm.svelte +65 -0
- package/dist/svelte/LocationForm.svelte.d.ts +10 -0
- package/dist/svelte/LocationForm.svelte.d.ts.map +1 -0
- package/dist/svelte/LocationList.svelte +16 -0
- package/dist/svelte/LocationList.svelte.d.ts +9 -0
- package/dist/svelte/LocationList.svelte.d.ts.map +1 -0
- package/dist/svelte/MovementHistory.svelte +14 -0
- package/dist/svelte/MovementHistory.svelte.d.ts +8 -0
- package/dist/svelte/MovementHistory.svelte.d.ts.map +1 -0
- package/dist/svelte/StockLevels.svelte +22 -0
- package/dist/svelte/StockLevels.svelte.d.ts +9 -0
- package/dist/svelte/StockLevels.svelte.d.ts.map +1 -0
- package/dist/svelte/index.d.ts +7 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +5 -0
- package/dist/svelte/types.d.ts +40 -0
- package/dist/svelte/types.d.ts.map +1 -0
- package/dist/svelte/types.js +1 -0
- package/package.json +28 -10
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { StockAdjustmentInput } from './types.js';
|
|
2
|
+
export interface Props {
|
|
3
|
+
skuId: string;
|
|
4
|
+
locationId: string;
|
|
5
|
+
onsubmit: (input: StockAdjustmentInput) => Promise<void> | void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const AdjustStockForm: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type AdjustStockForm = ReturnType<typeof AdjustStockForm>;
|
|
10
|
+
export default AdjustStockForm;
|
|
11
|
+
//# sourceMappingURL=AdjustStockForm.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdjustStockForm.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/AdjustStockForm.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA0DD,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Checkbox, Form, FormGroup, Input } from '@happyvertical/smrt-ui/forms';
|
|
3
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
4
|
+
import { untrack } from 'svelte';
|
|
5
|
+
import type { InventoryLocationData } from './types.js';
|
|
6
|
+
export interface Props {
|
|
7
|
+
location?: InventoryLocationData;
|
|
8
|
+
onsubmit: (input: InventoryLocationData) => Promise<void> | void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
const { location, onsubmit, disabled = false }: Props = $props();
|
|
12
|
+
let code = $state(untrack(() => location?.code ?? ''));
|
|
13
|
+
let name = $state(untrack(() => location?.name ?? ''));
|
|
14
|
+
let kind = $state(untrack(() => location?.kind ?? 'warehouse'));
|
|
15
|
+
let placeId = $state(untrack(() => location?.placeId ?? ''));
|
|
16
|
+
let active = $state(untrack(() => location?.active ?? true));
|
|
17
|
+
let pending = $state(false);
|
|
18
|
+
let error = $state('');
|
|
19
|
+
let saved = $state(false);
|
|
20
|
+
$effect(() => {
|
|
21
|
+
code = location?.code ?? '';
|
|
22
|
+
name = location?.name ?? '';
|
|
23
|
+
kind = location?.kind ?? 'warehouse';
|
|
24
|
+
placeId = location?.placeId ?? '';
|
|
25
|
+
active = location?.active ?? true;
|
|
26
|
+
saved = false;
|
|
27
|
+
error = '';
|
|
28
|
+
});
|
|
29
|
+
async function submit(event: SubmitEvent) {
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
if (pending || disabled) return;
|
|
32
|
+
error = '';
|
|
33
|
+
saved = false;
|
|
34
|
+
if (!code.trim() || !name.trim() || !kind.trim()) {
|
|
35
|
+
error = 'Code, name, and kind are required.';
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
pending = true;
|
|
39
|
+
try {
|
|
40
|
+
await onsubmit({
|
|
41
|
+
id: location?.id,
|
|
42
|
+
code: code.trim(),
|
|
43
|
+
name: name.trim(),
|
|
44
|
+
kind: kind.trim(),
|
|
45
|
+
placeId: placeId.trim(),
|
|
46
|
+
active,
|
|
47
|
+
});
|
|
48
|
+
saved = true;
|
|
49
|
+
} catch (cause) {
|
|
50
|
+
error = cause instanceof Error ? cause.message : 'Unable to save location.';
|
|
51
|
+
} finally {
|
|
52
|
+
pending = false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
<Form onsubmit={submit} aria-label="Inventory location">
|
|
57
|
+
<FormGroup label="Code"><Input bind:value={code} required disabled={disabled || pending} /></FormGroup>
|
|
58
|
+
<FormGroup label="Name"><Input bind:value={name} required disabled={disabled || pending} /></FormGroup>
|
|
59
|
+
<FormGroup label="Kind"><Input bind:value={kind} required disabled={disabled || pending} /></FormGroup>
|
|
60
|
+
<FormGroup label="Place ID"><Input bind:value={placeId} disabled={disabled || pending} /></FormGroup>
|
|
61
|
+
<Checkbox label="Active" bind:checked={active} disabled={disabled || pending} />
|
|
62
|
+
{#if error}<p role="alert">{error}</p>{/if}
|
|
63
|
+
{#if saved}<p role="status">Location saved</p>{/if}
|
|
64
|
+
<Button type="submit" disabled={disabled || pending}>{pending ? 'Saving…' : 'Save location'}</Button>
|
|
65
|
+
</Form>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InventoryLocationData } from './types.js';
|
|
2
|
+
export interface Props {
|
|
3
|
+
location?: InventoryLocationData;
|
|
4
|
+
onsubmit: (input: InventoryLocationData) => Promise<void> | void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const LocationForm: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type LocationForm = ReturnType<typeof LocationForm>;
|
|
9
|
+
export default LocationForm;
|
|
10
|
+
//# sourceMappingURL=LocationForm.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationForm.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/LocationForm.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAiED,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
3
|
+
import type { InventoryLocationData } from './types.js';
|
|
4
|
+
export interface Props {
|
|
5
|
+
locations: InventoryLocationData[];
|
|
6
|
+
onedit?: (location: InventoryLocationData) => void;
|
|
7
|
+
}
|
|
8
|
+
const { locations, onedit }: Props = $props();
|
|
9
|
+
</script>
|
|
10
|
+
<table>
|
|
11
|
+
<caption>Inventory locations</caption>
|
|
12
|
+
<thead><tr><th>Code</th><th>Name</th><th>Kind</th><th>Status</th>{#if onedit}<th>Actions</th>{/if}</tr></thead>
|
|
13
|
+
<tbody>{#each locations as location}
|
|
14
|
+
<tr><td>{location.code}</td><td>{location.name}</td><td>{location.kind}</td><td>{location.active ? 'Active' : 'Inactive'}</td>{#if onedit}<td><Button onclick={() => onedit?.(location)}>Edit {location.code}</Button></td>{/if}</tr>
|
|
15
|
+
{:else}<tr><td colspan={onedit ? 5 : 4}>No inventory locations</td></tr>{/each}</tbody>
|
|
16
|
+
</table>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InventoryLocationData } from './types.js';
|
|
2
|
+
export interface Props {
|
|
3
|
+
locations: InventoryLocationData[];
|
|
4
|
+
onedit?: (location: InventoryLocationData) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const LocationList: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type LocationList = ReturnType<typeof LocationList>;
|
|
8
|
+
export default LocationList;
|
|
9
|
+
//# sourceMappingURL=LocationList.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocationList.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/LocationList.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,qBAAqB,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACpD;AAiBD,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { StockMovementData } from './types.js';
|
|
3
|
+
export interface Props {
|
|
4
|
+
movements: StockMovementData[];
|
|
5
|
+
}
|
|
6
|
+
const { movements }: Props = $props();
|
|
7
|
+
</script>
|
|
8
|
+
<table>
|
|
9
|
+
<caption>Stock movement history</caption>
|
|
10
|
+
<thead><tr><th>When</th><th>Location</th><th>SKU</th><th>From</th><th>To</th><th>Quantity</th><th>Reason</th><th>Actor</th><th>Source</th><th>Note</th></tr></thead>
|
|
11
|
+
<tbody>{#each movements as movement}
|
|
12
|
+
<tr><td>{movement.occurredAt instanceof Date ? movement.occurredAt.toISOString() : movement.occurredAt ?? '—'}</td><td>{movement.locationId}</td><td>{movement.skuId}</td><td>{movement.fromState ?? 'Outside inventory'}</td><td>{movement.toState ?? 'Outside inventory'}</td><td>{movement.qty}</td><td>{movement.reasonCode}</td><td>{movement.actorProfileId ?? 'Unattributed'}</td><td>{movement.sourceType} {movement.sourceId}</td><td>{movement.note}</td></tr>
|
|
13
|
+
{:else}<tr><td colspan="10">No stock movements</td></tr>{/each}</tbody>
|
|
14
|
+
</table>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { StockMovementData } from './types.js';
|
|
2
|
+
export interface Props {
|
|
3
|
+
movements: StockMovementData[];
|
|
4
|
+
}
|
|
5
|
+
declare const MovementHistory: import("svelte").Component<Props, {}, "">;
|
|
6
|
+
type MovementHistory = ReturnType<typeof MovementHistory>;
|
|
7
|
+
export default MovementHistory;
|
|
8
|
+
//# sourceMappingURL=MovementHistory.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MovementHistory.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/MovementHistory.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAgBD,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { StockLevelData } from './types.js';
|
|
3
|
+
export interface Props {
|
|
4
|
+
levels: StockLevelData[];
|
|
5
|
+
locationId?: string;
|
|
6
|
+
}
|
|
7
|
+
const { levels, locationId }: Props = $props();
|
|
8
|
+
const visible = $derived(
|
|
9
|
+
levels.filter(
|
|
10
|
+
(level) => locationId === undefined || level.locationId === locationId,
|
|
11
|
+
),
|
|
12
|
+
);
|
|
13
|
+
</script>
|
|
14
|
+
<table>
|
|
15
|
+
<caption>Stock levels by location</caption>
|
|
16
|
+
<thead><tr><th>Location</th><th>SKU</th><th>State</th><th>Quantity</th><th>Reorder point</th><th>Reorder quantity</th><th>Status</th></tr></thead>
|
|
17
|
+
<tbody>
|
|
18
|
+
{#each visible as level}
|
|
19
|
+
<tr><td>{level.locationId}</td><td>{level.skuId}</td><td>{level.state}</td><td>{level.qty}</td><td>{level.reorderPoint ?? '—'}</td><td>{level.reorderQuantity ?? '—'}</td><td>{level.state === 'available' && level.reorderPoint != null && level.qty < level.reorderPoint ? 'Low stock' : '—'}</td></tr>
|
|
20
|
+
{:else}<tr><td colspan="7">No stock levels</td></tr>{/each}
|
|
21
|
+
</tbody>
|
|
22
|
+
</table>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StockLevelData } from './types.js';
|
|
2
|
+
export interface Props {
|
|
3
|
+
levels: StockLevelData[];
|
|
4
|
+
locationId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const StockLevels: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type StockLevels = ReturnType<typeof StockLevels>;
|
|
8
|
+
export default StockLevels;
|
|
9
|
+
//# sourceMappingURL=StockLevels.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StockLevels.svelte.d.ts","sourceRoot":"","sources":["../../src/svelte/StockLevels.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAuBD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as AdjustStockForm } from './AdjustStockForm.svelte';
|
|
2
|
+
export { default as LocationForm } from './LocationForm.svelte';
|
|
3
|
+
export { default as LocationList } from './LocationList.svelte';
|
|
4
|
+
export { default as MovementHistory } from './MovementHistory.svelte';
|
|
5
|
+
export { default as StockLevels } from './StockLevels.svelte';
|
|
6
|
+
export type { InventoryLocationData, StockAdjustmentInput, StockLevelData, StockMovementData, } from './types.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/svelte/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as AdjustStockForm } from './AdjustStockForm.svelte';
|
|
2
|
+
export { default as LocationForm } from './LocationForm.svelte';
|
|
3
|
+
export { default as LocationList } from './LocationList.svelte';
|
|
4
|
+
export { default as MovementHistory } from './MovementHistory.svelte';
|
|
5
|
+
export { default as StockLevels } from './StockLevels.svelte';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Browser-safe inventory view contracts. Hosts supply authorized data and callbacks. */
|
|
2
|
+
export interface StockLevelData {
|
|
3
|
+
id?: string;
|
|
4
|
+
skuId: string;
|
|
5
|
+
locationId: string;
|
|
6
|
+
state: string;
|
|
7
|
+
qty: number;
|
|
8
|
+
reorderPoint?: number | null;
|
|
9
|
+
reorderQuantity?: number | null;
|
|
10
|
+
}
|
|
11
|
+
export interface StockMovementData {
|
|
12
|
+
fromState?: string | null;
|
|
13
|
+
toState?: string | null;
|
|
14
|
+
id?: string;
|
|
15
|
+
skuId: string;
|
|
16
|
+
locationId: string;
|
|
17
|
+
qty: number;
|
|
18
|
+
reasonCode: string;
|
|
19
|
+
actorProfileId?: string | null;
|
|
20
|
+
sourceType?: string;
|
|
21
|
+
sourceId?: string;
|
|
22
|
+
note?: string;
|
|
23
|
+
occurredAt?: Date | string;
|
|
24
|
+
}
|
|
25
|
+
export interface InventoryLocationData {
|
|
26
|
+
id?: string;
|
|
27
|
+
code: string;
|
|
28
|
+
name: string;
|
|
29
|
+
kind: string;
|
|
30
|
+
placeId?: string;
|
|
31
|
+
active: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface StockAdjustmentInput {
|
|
34
|
+
skuId: string;
|
|
35
|
+
locationId: string;
|
|
36
|
+
delta: number;
|
|
37
|
+
reasonCode: string;
|
|
38
|
+
note: string;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/svelte/types.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AACD,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;CAC5B;AACD,MAAM,WAAW,qBAAqB;IACpC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-inventory",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.4",
|
|
4
4
|
"description": "Multi-location stock tracking for the SMRT framework — Sku, InventoryLocation, StockLevel, StockMovement, and a stock-mutation service",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,20 +16,30 @@
|
|
|
16
16
|
"import": "./dist/index.js"
|
|
17
17
|
},
|
|
18
18
|
"./manifest": "./dist/manifest.json",
|
|
19
|
-
"./manifest.json": "./dist/manifest.json"
|
|
19
|
+
"./manifest.json": "./dist/manifest.json",
|
|
20
|
+
"./svelte": {
|
|
21
|
+
"types": "./dist/svelte/index.d.ts",
|
|
22
|
+
"svelte": "./dist/svelte/index.js",
|
|
23
|
+
"import": "./dist/svelte/index.js"
|
|
24
|
+
}
|
|
20
25
|
},
|
|
21
26
|
"dependencies": {
|
|
22
|
-
"@happyvertical/logger": "^0.
|
|
23
|
-
"@happyvertical/smrt-core": "0.54.
|
|
24
|
-
"@happyvertical/smrt-tenancy": "0.54.
|
|
25
|
-
"@happyvertical/sql": "^0.
|
|
27
|
+
"@happyvertical/logger": "^0.102.1",
|
|
28
|
+
"@happyvertical/smrt-core": "0.54.4",
|
|
29
|
+
"@happyvertical/smrt-tenancy": "0.54.4",
|
|
30
|
+
"@happyvertical/sql": "^0.102.1",
|
|
31
|
+
"@happyvertical/smrt-ui": "0.54.4"
|
|
26
32
|
},
|
|
27
33
|
"devDependencies": {
|
|
28
|
-
"@happyvertical/smrt-vitest": "0.54.
|
|
34
|
+
"@happyvertical/smrt-vitest": "0.54.4",
|
|
29
35
|
"@types/node": "24.13.6",
|
|
30
36
|
"typescript": "6.0.3",
|
|
31
37
|
"vite": "8.1.4",
|
|
32
|
-
"vitest": "4.1.10"
|
|
38
|
+
"vitest": "4.1.10",
|
|
39
|
+
"@sveltejs/package": "^2.5.8",
|
|
40
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
41
|
+
"svelte": "^5.57.1",
|
|
42
|
+
"svelte-check": "^4.7.6"
|
|
33
43
|
},
|
|
34
44
|
"keywords": [
|
|
35
45
|
"smrt",
|
|
@@ -51,14 +61,22 @@
|
|
|
51
61
|
"url": "https://github.com/happyvertical/smrt.git",
|
|
52
62
|
"directory": "packages/inventory"
|
|
53
63
|
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"svelte": "^5.57.0"
|
|
66
|
+
},
|
|
67
|
+
"peerDependenciesMeta": {
|
|
68
|
+
"svelte": {
|
|
69
|
+
"optional": true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
54
72
|
"scripts": {
|
|
55
|
-
"build": "vite build --mode library",
|
|
73
|
+
"build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json && node ../../scripts/prune-svelte-package-artifacts.js dist",
|
|
56
74
|
"build:watch": "vite build --mode library --watch",
|
|
57
75
|
"clean": "rm -rf dist",
|
|
58
76
|
"dev": "vite dev",
|
|
59
77
|
"test": "vitest run",
|
|
60
78
|
"test:watch": "vitest",
|
|
61
|
-
"typecheck": "tsc --noEmit",
|
|
79
|
+
"typecheck": "tsc --noEmit && node ../../scripts/svelte-check-a11y.mjs --tsconfig ./tsconfig.svelte.json",
|
|
62
80
|
"verify:pack": "node ../../scripts/verify-package-types-exports.js ."
|
|
63
81
|
}
|
|
64
82
|
}
|