@flowselections/facturen-installatie-techniek 1.0.2
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/dist-lib/_core-safelist.d.ts +2 -0
- package/dist-lib/_core-safelist.d.ts.map +1 -0
- package/dist-lib/_core-safelist.js +15 -0
- package/dist-lib/components/FacturenForInstallatieTechniek.d.ts +2 -0
- package/dist-lib/components/FacturenForInstallatieTechniek.d.ts.map +1 -0
- package/dist-lib/components/FacturenForInstallatieTechniek.js +161 -0
- package/dist-lib/components/FactuurDetailPage.d.ts +2 -0
- package/dist-lib/components/FactuurDetailPage.d.ts.map +1 -0
- package/dist-lib/components/FactuurDetailPage.js +51 -0
- package/dist-lib/components/TemplateModuleLogo.d.ts +6 -0
- package/dist-lib/components/TemplateModuleLogo.d.ts.map +1 -0
- package/dist-lib/components/TemplateModuleLogo.js +4 -0
- package/dist-lib/components/TemplateModulePage.d.ts +2 -0
- package/dist-lib/components/TemplateModulePage.d.ts.map +1 -0
- package/dist-lib/components/TemplateModulePage.js +44 -0
- package/dist-lib/components/TemplatePage.d.ts +2 -0
- package/dist-lib/components/TemplatePage.d.ts.map +1 -0
- package/dist-lib/components/TemplatePage.js +4 -0
- package/dist-lib/components/settings/MijnModuleSettingsCard.d.ts +2 -0
- package/dist-lib/components/settings/MijnModuleSettingsCard.d.ts.map +1 -0
- package/dist-lib/components/settings/MijnModuleSettingsCard.js +42 -0
- package/dist-lib/hooks/useMijnModuleData.d.ts +13 -0
- package/dist-lib/hooks/useMijnModuleData.d.ts.map +1 -0
- package/dist-lib/hooks/useMijnModuleData.js +49 -0
- package/dist-lib/index.d.ts +7 -0
- package/dist-lib/index.d.ts.map +1 -0
- package/dist-lib/index.js +19 -0
- package/dist-lib/integrations/supabase/auth-attacher.d.ts +2 -0
- package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/auth-attacher.js +12 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +22553 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/auth-middleware.js +52 -0
- package/dist-lib/integrations/supabase/client.d.ts +22549 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/client.js +13 -0
- package/dist-lib/integrations/supabase/client.server.d.ts +22549 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/client.server.js +30 -0
- package/dist-lib/integrations/supabase/types.d.ts +23165 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -0
- package/dist-lib/integrations/supabase/types.js +92 -0
- package/dist-lib/lib/facturen.d.ts +77 -0
- package/dist-lib/lib/facturen.d.ts.map +1 -0
- package/dist-lib/lib/facturen.js +102 -0
- package/dist-lib/lib/utils.d.ts +3 -0
- package/dist-lib/lib/utils.d.ts.map +1 -0
- package/dist-lib/lib/utils.js +5 -0
- package/dist-lib/lib/validationSchemas.d.ts +15 -0
- package/dist-lib/lib/validationSchemas.d.ts.map +1 -0
- package/dist-lib/lib/validationSchemas.js +25 -0
- package/dist-lib/styles.css +1 -0
- package/package.json +92 -0
- package/public/logo.png +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export const Constants = {
|
|
2
|
+
public: {
|
|
3
|
+
Enums: {
|
|
4
|
+
ai_import_status: [
|
|
5
|
+
"nieuw",
|
|
6
|
+
"verwerken",
|
|
7
|
+
"bevestigen",
|
|
8
|
+
"klaar",
|
|
9
|
+
"mislukt",
|
|
10
|
+
],
|
|
11
|
+
app_role: [
|
|
12
|
+
"admin",
|
|
13
|
+
"planner",
|
|
14
|
+
"monteur",
|
|
15
|
+
"administratie",
|
|
16
|
+
"ai_admin",
|
|
17
|
+
"manager",
|
|
18
|
+
"warehouse",
|
|
19
|
+
"sales",
|
|
20
|
+
"developer",
|
|
21
|
+
"receptie",
|
|
22
|
+
],
|
|
23
|
+
doc_layout_type: [
|
|
24
|
+
"pakbon",
|
|
25
|
+
"factuur",
|
|
26
|
+
"offerte",
|
|
27
|
+
"orderbevestiging",
|
|
28
|
+
"etiket",
|
|
29
|
+
"verzendlabel",
|
|
30
|
+
"productlabel",
|
|
31
|
+
"barcode_label",
|
|
32
|
+
"magazijnlijst",
|
|
33
|
+
"controlelijst",
|
|
34
|
+
"transportdocument",
|
|
35
|
+
"vrij",
|
|
36
|
+
"sticker",
|
|
37
|
+
"productiebon",
|
|
38
|
+
"veilingbon",
|
|
39
|
+
"afleverbrief",
|
|
40
|
+
"veilingbrief",
|
|
41
|
+
],
|
|
42
|
+
doc_orientation: ["portrait", "landscape"],
|
|
43
|
+
exact_env: ["staging", "live"],
|
|
44
|
+
exact_push_status: ["pending", "sent", "error"],
|
|
45
|
+
itk_customer_segment: ["Business", "Private"],
|
|
46
|
+
itk_dynamic_field_type: ["text", "select", "date", "checkbox"],
|
|
47
|
+
planning_item_status: [
|
|
48
|
+
"gepland",
|
|
49
|
+
"bezig",
|
|
50
|
+
"afgerond",
|
|
51
|
+
"geannuleerd",
|
|
52
|
+
"concept",
|
|
53
|
+
"vrijgegeven",
|
|
54
|
+
],
|
|
55
|
+
print_job_status: [
|
|
56
|
+
"wachtend",
|
|
57
|
+
"bezig",
|
|
58
|
+
"voltooid",
|
|
59
|
+
"mislukt",
|
|
60
|
+
"geannuleerd",
|
|
61
|
+
],
|
|
62
|
+
printer_connection: [
|
|
63
|
+
"ipp",
|
|
64
|
+
"raw9100",
|
|
65
|
+
"printnode",
|
|
66
|
+
"cups",
|
|
67
|
+
"usb",
|
|
68
|
+
"windows",
|
|
69
|
+
"airprint",
|
|
70
|
+
"cloud",
|
|
71
|
+
],
|
|
72
|
+
printer_kind: [
|
|
73
|
+
"labelprinter",
|
|
74
|
+
"laserprinter",
|
|
75
|
+
"inkjet",
|
|
76
|
+
"thermal",
|
|
77
|
+
"kantoorprinter",
|
|
78
|
+
"overig",
|
|
79
|
+
],
|
|
80
|
+
quote_status: [
|
|
81
|
+
"concept",
|
|
82
|
+
"verzonden",
|
|
83
|
+
"bekeken",
|
|
84
|
+
"in_behandeling",
|
|
85
|
+
"geaccepteerd",
|
|
86
|
+
"afgewezen",
|
|
87
|
+
"verlopen",
|
|
88
|
+
"gearchiveerd",
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export type InvoiceSourceType = "work_order" | "quotation" | "order" | "manual";
|
|
2
|
+
export type InvoiceStatus = "concept" | "verzonden" | "betaald" | "vervallen" | "gecrediteerd";
|
|
3
|
+
export interface Invoice {
|
|
4
|
+
id: string;
|
|
5
|
+
invoice_number: string | null;
|
|
6
|
+
source_type: InvoiceSourceType;
|
|
7
|
+
source_ref: string | null;
|
|
8
|
+
source_number: string | null;
|
|
9
|
+
customer_id: string | null;
|
|
10
|
+
customer_name: string | null;
|
|
11
|
+
invoice_date: string;
|
|
12
|
+
due_date: string | null;
|
|
13
|
+
status: InvoiceStatus;
|
|
14
|
+
subtotal_cents: number;
|
|
15
|
+
vat_rate: number;
|
|
16
|
+
vat_cents: number;
|
|
17
|
+
total_cents: number;
|
|
18
|
+
note: string | null;
|
|
19
|
+
created_at: string;
|
|
20
|
+
}
|
|
21
|
+
export interface InvoiceItem {
|
|
22
|
+
id: string;
|
|
23
|
+
invoice_id: string;
|
|
24
|
+
sort_order: number;
|
|
25
|
+
kind: string;
|
|
26
|
+
description: string;
|
|
27
|
+
quantity: number;
|
|
28
|
+
unit: string;
|
|
29
|
+
unit_price_cents: number;
|
|
30
|
+
total_cents: number;
|
|
31
|
+
}
|
|
32
|
+
export interface SourceOption {
|
|
33
|
+
id: string;
|
|
34
|
+
number: string | null;
|
|
35
|
+
customer_id: string | null;
|
|
36
|
+
customer_name: string | null;
|
|
37
|
+
status: string | null;
|
|
38
|
+
description: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface BillableLine {
|
|
41
|
+
description?: string;
|
|
42
|
+
omschrijving?: string;
|
|
43
|
+
kind?: string;
|
|
44
|
+
quantity?: number;
|
|
45
|
+
unit?: string;
|
|
46
|
+
unit_price_cents?: number;
|
|
47
|
+
line_total_cents?: number;
|
|
48
|
+
sort_order?: number;
|
|
49
|
+
}
|
|
50
|
+
export declare const STATUS_LABELS: Record<InvoiceStatus, string>;
|
|
51
|
+
export declare const SOURCE_LABELS: Record<InvoiceSourceType, string>;
|
|
52
|
+
export declare const KIND_LABELS: Record<string, string>;
|
|
53
|
+
export declare function formatCents(cents: number | null | undefined): string;
|
|
54
|
+
export declare function euroToCents(input: string): number;
|
|
55
|
+
export declare function fetchInvoices(): Promise<Invoice[]>;
|
|
56
|
+
export declare function fetchInvoice(id: string): Promise<Invoice | null>;
|
|
57
|
+
export declare function fetchInvoiceItems(id: string): Promise<InvoiceItem[]>;
|
|
58
|
+
export declare function listSources(sourceType: "work_order" | "quotation"): Promise<SourceOption[]>;
|
|
59
|
+
export declare function fetchSourceLines(sourceType: "work_order" | "quotation", sourceId: string): Promise<BillableLine[]>;
|
|
60
|
+
export declare function createInvoiceFromSource(payload: {
|
|
61
|
+
sourceType: InvoiceSourceType;
|
|
62
|
+
sourceId: string | null;
|
|
63
|
+
sourceNumber?: string | null;
|
|
64
|
+
customerId?: string | null;
|
|
65
|
+
customerName?: string | null;
|
|
66
|
+
vatRate?: number;
|
|
67
|
+
invoiceDate?: string;
|
|
68
|
+
note?: string | null;
|
|
69
|
+
lines: BillableLine[];
|
|
70
|
+
}): Promise<{
|
|
71
|
+
id: string;
|
|
72
|
+
invoice_number: string;
|
|
73
|
+
reused?: boolean;
|
|
74
|
+
}>;
|
|
75
|
+
export declare function updateInvoiceStatus(id: string, status: InvoiceStatus): Promise<void>;
|
|
76
|
+
export declare function deleteInvoice(id: string): Promise<void>;
|
|
77
|
+
//# sourceMappingURL=facturen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facturen.d.ts","sourceRoot":"","sources":["../../src/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G,WAAW,EACtC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,YAAY,EAAE,CAAC,CAMzB;AAED,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAgBpE;AAED,wBAAsB,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1F;AAED,wBAAsB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG7D"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { supabase } from "@flowselections/core";
|
|
2
|
+
const db = supabase;
|
|
3
|
+
export const STATUS_LABELS = {
|
|
4
|
+
concept: "Concept",
|
|
5
|
+
verzonden: "Verzonden",
|
|
6
|
+
betaald: "Betaald",
|
|
7
|
+
vervallen: "Vervallen",
|
|
8
|
+
gecrediteerd: "Gecrediteerd",
|
|
9
|
+
};
|
|
10
|
+
export const SOURCE_LABELS = {
|
|
11
|
+
work_order: "Werkbon",
|
|
12
|
+
quotation: "Offerte",
|
|
13
|
+
order: "Order",
|
|
14
|
+
manual: "Handmatig",
|
|
15
|
+
};
|
|
16
|
+
export const KIND_LABELS = {
|
|
17
|
+
work: "Arbeid",
|
|
18
|
+
travel: "Reistijd",
|
|
19
|
+
callout: "Voorrijkosten",
|
|
20
|
+
material: "Materiaal",
|
|
21
|
+
package: "Pakket",
|
|
22
|
+
other: "Overig",
|
|
23
|
+
};
|
|
24
|
+
export function formatCents(cents) {
|
|
25
|
+
const value = (Number(cents) || 0) / 100;
|
|
26
|
+
return value.toLocaleString("nl-NL", { style: "currency", currency: "EUR" });
|
|
27
|
+
}
|
|
28
|
+
export function euroToCents(input) {
|
|
29
|
+
const parsed = parseFloat(String(input).replace(/\./g, "").replace(",", "."));
|
|
30
|
+
return Number.isFinite(parsed) ? Math.round(parsed * 100) : 0;
|
|
31
|
+
}
|
|
32
|
+
export async function fetchInvoices() {
|
|
33
|
+
const { data, error } = await db
|
|
34
|
+
.from("invoices")
|
|
35
|
+
.select("*")
|
|
36
|
+
.order("created_at", { ascending: false })
|
|
37
|
+
.limit(500);
|
|
38
|
+
if (error)
|
|
39
|
+
throw error;
|
|
40
|
+
return Array.isArray(data) ? data : [];
|
|
41
|
+
}
|
|
42
|
+
export async function fetchInvoice(id) {
|
|
43
|
+
const { data, error } = await db.from("invoices").select("*").eq("id", id).maybeSingle();
|
|
44
|
+
if (error)
|
|
45
|
+
throw error;
|
|
46
|
+
return data ?? null;
|
|
47
|
+
}
|
|
48
|
+
export async function fetchInvoiceItems(id) {
|
|
49
|
+
const { data, error } = await db
|
|
50
|
+
.from("invoice_items")
|
|
51
|
+
.select("*")
|
|
52
|
+
.eq("invoice_id", id)
|
|
53
|
+
.order("sort_order", { ascending: true });
|
|
54
|
+
if (error)
|
|
55
|
+
throw error;
|
|
56
|
+
return Array.isArray(data) ? data : [];
|
|
57
|
+
}
|
|
58
|
+
export async function listSources(sourceType) {
|
|
59
|
+
const { data, error } = await db.rpc("invoice_list_sources", {
|
|
60
|
+
_source_type: sourceType,
|
|
61
|
+
_limit: 100,
|
|
62
|
+
});
|
|
63
|
+
if (error)
|
|
64
|
+
throw error;
|
|
65
|
+
return Array.isArray(data) ? data : [];
|
|
66
|
+
}
|
|
67
|
+
export async function fetchSourceLines(sourceType, sourceId) {
|
|
68
|
+
const fn = sourceType === "work_order" ? "wo_get_billable_lines" : "quote_get_billable_lines";
|
|
69
|
+
const arg = sourceType === "work_order" ? { _work_order_id: sourceId } : { _quotation_id: sourceId };
|
|
70
|
+
const { data, error } = await db.rpc(fn, arg);
|
|
71
|
+
if (error)
|
|
72
|
+
throw error;
|
|
73
|
+
return Array.isArray(data) ? data : [];
|
|
74
|
+
}
|
|
75
|
+
export async function createInvoiceFromSource(payload) {
|
|
76
|
+
const { data, error } = await db.rpc("invoice_create_from_source", {
|
|
77
|
+
_source_type: payload.sourceType,
|
|
78
|
+
_source_id: payload.sourceId,
|
|
79
|
+
_payload: {
|
|
80
|
+
source_number: payload.sourceNumber ?? null,
|
|
81
|
+
customer_id: payload.customerId ?? null,
|
|
82
|
+
customer_name: payload.customerName ?? null,
|
|
83
|
+
vat_rate: payload.vatRate ?? 21,
|
|
84
|
+
invoice_date: payload.invoiceDate ?? new Date().toISOString().slice(0, 10),
|
|
85
|
+
note: payload.note ?? null,
|
|
86
|
+
lines: payload.lines,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
if (error)
|
|
90
|
+
throw error;
|
|
91
|
+
return data;
|
|
92
|
+
}
|
|
93
|
+
export async function updateInvoiceStatus(id, status) {
|
|
94
|
+
const { error } = await db.from("invoices").update({ status }).eq("id", id);
|
|
95
|
+
if (error)
|
|
96
|
+
throw error;
|
|
97
|
+
}
|
|
98
|
+
export async function deleteInvoice(id) {
|
|
99
|
+
const { error } = await db.from("invoices").delete().eq("id", id);
|
|
100
|
+
if (error)
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const loginSchema: z.ZodObject<{
|
|
3
|
+
email: z.ZodString;
|
|
4
|
+
password: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const bugReportSchema: z.ZodObject<{
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
description: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const ALLOWED_FILE_TYPES: string[];
|
|
11
|
+
export declare function validateFileUpload(file: File): {
|
|
12
|
+
valid: boolean;
|
|
13
|
+
error?: string;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=validationSchemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validationSchemas.d.ts","sourceRoot":"","sources":["../../src/lib/validationSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AAEH,eAAO,MAAM,eAAe;;;iBAG1B,CAAC;AAEH,eAAO,MAAM,kBAAkB,UAK9B,CAAC;AAIF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAQjF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const loginSchema = z.object({
|
|
3
|
+
email: z.string().email("Ongeldig e-mailadres"),
|
|
4
|
+
password: z.string().min(6, "Wachtwoord moet minimaal 6 tekens bevatten"),
|
|
5
|
+
});
|
|
6
|
+
export const bugReportSchema = z.object({
|
|
7
|
+
title: z.string().min(1, "Titel is verplicht").max(200),
|
|
8
|
+
description: z.string().min(1, "Beschrijving is verplicht").max(5000),
|
|
9
|
+
});
|
|
10
|
+
export const ALLOWED_FILE_TYPES = [
|
|
11
|
+
"image/png",
|
|
12
|
+
"image/jpeg",
|
|
13
|
+
"image/gif",
|
|
14
|
+
"application/pdf",
|
|
15
|
+
];
|
|
16
|
+
const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10MB
|
|
17
|
+
export function validateFileUpload(file) {
|
|
18
|
+
if (!ALLOWED_FILE_TYPES.includes(file.type)) {
|
|
19
|
+
return { valid: false, error: "Bestandstype niet toegestaan" };
|
|
20
|
+
}
|
|
21
|
+
if (file.size > MAX_FILE_SIZE) {
|
|
22
|
+
return { valid: false, error: "Bestand is te groot (max 10MB)" };
|
|
23
|
+
}
|
|
24
|
+
return { valid: true };
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@source "./";
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flowselections/facturen-installatie-techniek",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"flowselections": {
|
|
5
|
+
"moduleId": "facturen-installatietechniek",
|
|
6
|
+
"pages": [
|
|
7
|
+
{
|
|
8
|
+
"export": "FacturenForInstallatieTechniek",
|
|
9
|
+
"route": "facturen-installatietechniek",
|
|
10
|
+
"title": "Facturen"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"export": "FactuurDetailPage",
|
|
14
|
+
"route": "facturen-installatietechniek/detail/$id",
|
|
15
|
+
"title": "Factuur"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"private": false,
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"type": "module",
|
|
22
|
+
"main": "./dist-lib/index.js",
|
|
23
|
+
"types": "./dist-lib/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist-lib/index.d.ts",
|
|
27
|
+
"default": "./dist-lib/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./styles": "./dist-lib/styles.css"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist-lib",
|
|
33
|
+
"public"
|
|
34
|
+
],
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"dev": "vite dev",
|
|
40
|
+
"build": "vite build",
|
|
41
|
+
"build:lib": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && node -e \"require('fs').writeFileSync('dist-lib/styles.css', '@source \\\"./\\\";\\n')\"",
|
|
42
|
+
"build:lib:watch": "tsc -p tsconfig.build.json --watch",
|
|
43
|
+
"build:dev": "vite build --mode development",
|
|
44
|
+
"preview": "vite preview",
|
|
45
|
+
"lint": "eslint ."
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@flowselections/core": "*",
|
|
49
|
+
"@tanstack/react-query": "^5.0.0",
|
|
50
|
+
"@tanstack/react-router": "^1.0.0",
|
|
51
|
+
"@tanstack/react-start": "^1.0.0",
|
|
52
|
+
"lucide-react": "^0.400.0",
|
|
53
|
+
"react": "^18 || ^19",
|
|
54
|
+
"react-dom": "^18 || ^19",
|
|
55
|
+
"sonner": "^2.0.0"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@supabase/supabase-js": "^2.110.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@cloudflare/vite-plugin": "^1.25.5",
|
|
62
|
+
"@eslint/js": "^9.32.0",
|
|
63
|
+
"@flowselections/core": "1.0.12",
|
|
64
|
+
"@lovable.dev/vite-tanstack-config": "2.13.1",
|
|
65
|
+
"@rsbuild/core": "^1.0.0",
|
|
66
|
+
"@tailwindcss/vite": "^4.2.1",
|
|
67
|
+
"@tanstack/react-query": "^5.83.0",
|
|
68
|
+
"@tanstack/react-router": "^1.168.0",
|
|
69
|
+
"@tanstack/react-start": "^1.167.14",
|
|
70
|
+
"@tanstack/router-plugin": "^1.167.10",
|
|
71
|
+
"@types/node": "^22.16.5",
|
|
72
|
+
"@types/react": "^19.2.0",
|
|
73
|
+
"@types/react-dom": "^19.2.0",
|
|
74
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
75
|
+
"eslint": "^9.32.0",
|
|
76
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
77
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
78
|
+
"globals": "^15.15.0",
|
|
79
|
+
"lucide-react": "^0.575.0",
|
|
80
|
+
"react": "^19.2.0",
|
|
81
|
+
"react-dom": "^19.2.0",
|
|
82
|
+
"sonner": "^2.0.7",
|
|
83
|
+
"tailwindcss": "^4.2.1",
|
|
84
|
+
"tw-animate-css": "^1.3.4",
|
|
85
|
+
"typescript": "^5.8.3",
|
|
86
|
+
"tsc-alias": "^1.8.10",
|
|
87
|
+
"typescript-eslint": "^8.56.1",
|
|
88
|
+
"vite": "^7.3.1",
|
|
89
|
+
"vite-tsconfig-paths": "^6.0.2",
|
|
90
|
+
"nitro": "3.0.260603-beta"
|
|
91
|
+
}
|
|
92
|
+
}
|
package/public/logo.png
ADDED
|
Binary file
|