@tulip-systems/core 0.10.2 → 0.10.3

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.
@@ -33,6 +33,7 @@ function RootLayout({ children }) {
33
33
  return /* @__PURE__ */ jsx("html", {
34
34
  lang: "nl",
35
35
  "data-theme": "tulip",
36
+ suppressHydrationWarning: true,
36
37
  children: /* @__PURE__ */ jsx("body", {
37
38
  className: cn("bg-background font-sans antialiased", registerFonts()),
38
39
  children
@@ -5,7 +5,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
5
5
 
6
6
  //#region src/components/ui/badge.d.ts
7
7
  declare const badgeVariants: (props?: ({
8
- variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
8
+ variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
9
9
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
10
10
  declare function Badge({
11
11
  className,
@@ -5,7 +5,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
5
5
 
6
6
  //#region src/components/ui/button.d.ts
7
7
  declare const buttonVariants: (props?: ({
8
- variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
8
+ variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
9
9
  size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
10
10
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
11
11
  declare function Button({
@@ -4,7 +4,6 @@ import { AccessControl, AdminOptions, Role } from "better-auth/plugins";
4
4
  import * as better_auth0 from "better-auth";
5
5
  import * as better_call0 from "better-call";
6
6
  import * as zod_v4_core0 from "zod/v4/core";
7
- import * as better_auth_client0 from "better-auth/client";
8
7
 
9
8
  //#region src/modules/auth/plugins/admin.d.ts
10
9
  /**
@@ -832,13 +831,13 @@ declare function adminPlugin<Options extends AdminOptions>({
832
831
  };
833
832
  $Infer: {
834
833
  body: {
835
- permissions: { [key in keyof (Options["ac"] extends AccessControl<infer S extends better_auth_client0.Statements> ? S : {
834
+ permissions: { [key in keyof (Options["ac"] extends AccessControl<infer S extends better_auth_plugins0.Statements> ? S : {
836
835
  readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
837
836
  readonly session: readonly ["list", "revoke", "delete"];
838
- })]?: ((Options["ac"] extends AccessControl<infer S_1 extends better_auth_client0.Statements> ? S_1 : {
837
+ })]?: ((Options["ac"] extends AccessControl<infer S_1 extends better_auth_plugins0.Statements> ? S_1 : {
839
838
  readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
840
839
  readonly session: readonly ["list", "revoke", "delete"];
841
- })[key] extends readonly unknown[] ? better_auth_client0.ArrayElement<(Options["ac"] extends AccessControl<infer S_2 extends better_auth_client0.Statements> ? S_2 : {
840
+ })[key] extends readonly unknown[] ? better_auth_plugins0.ArrayElement<(Options["ac"] extends AccessControl<infer S_2 extends better_auth_plugins0.Statements> ? S_2 : {
842
841
  readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
843
842
  readonly session: readonly ["list", "revoke", "delete"];
844
843
  })[key]> : never)[] | undefined };
@@ -1,12 +1,15 @@
1
1
  "use client";
2
2
 
3
+ import { Badge } from "../../../../components/ui/badge.mjs";
4
+ import { Button } from "../../../../components/ui/button.mjs";
5
+ import { Popover, PopoverContent, PopoverTrigger } from "../../../../components/ui/popover.client.mjs";
6
+ import { Separator } from "../../../../components/ui/separator.mjs";
7
+ import { Calendar as Calendar$1 } from "../../../../components/ui/calendar.client.mjs";
3
8
  import { CalendarIcon } from "lucide-react";
4
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
10
  import { startTransition, useState } from "react";
6
11
  import { format } from "date-fns";
7
12
  import { useQueryState } from "nuqs";
8
- import { Badge, Button, Separator } from "@tulip-systems/core/components";
9
- import { Calendar as Calendar$1, Popover, PopoverContent, PopoverTrigger } from "@tulip-systems/core/components/client";
10
13
 
11
14
  //#region src/modules/data-tables/components/filters/date-range.client.tsx
12
15
  function TableFilterDateRange({ title, filter, presets }) {
@@ -14,8 +14,7 @@ function InfinteTableBottombar({ table }) {
14
14
  const scrollRef = useRef(null);
15
15
  const isInView = useInView(scrollRef);
16
16
  const hasNextPage = table.getCanNextPage();
17
- const fetchNextPage = table.nextPage;
18
- const { isFetching, isFetchingNextPage } = table.options.meta.strategy.meta;
17
+ const { fetchNextPage, isFetching, isFetchingNextPage } = table.options.meta.strategy.meta;
19
18
  useEffect(() => {
20
19
  if (isInView && hasNextPage && !isFetching && !isFetchingNextPage) fetchNextPage();
21
20
  }, [
@@ -21,12 +21,6 @@ function useInfiniteStrategy({ cursor, total, fetchNextPage, isFetching, isFetch
21
21
  rowCount: total,
22
22
  paginationState,
23
23
  manualPagination: true,
24
- onPaginationChange: (updater) => {
25
- const newState = typeof updater === "function" ? updater(paginationState) : updater;
26
- setQuery({ limit: newState.pageSize });
27
- fetchNextPage();
28
- return newState;
29
- },
30
24
  resetCursor,
31
25
  tableSearchParams,
32
26
  sortingState,
@@ -4,7 +4,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
4
4
  //#region src/modules/inline/lib/variants.d.ts
5
5
  declare const inlineEditVariants: (props?: ({
6
6
  variant?: "default" | "table" | null | undefined;
7
- status?: "success" | "error" | "idle" | "pending" | null | undefined;
7
+ status?: "error" | "success" | "pending" | "idle" | null | undefined;
8
8
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
9
9
  type InlineEditVariantsProps = VariantProps<typeof inlineEditVariants>;
10
10
  //#endregion
@@ -36,7 +36,7 @@ type DropzoneContentProps = {
36
36
  declare function DropzoneContent({
37
37
  children,
38
38
  className
39
- }: DropzoneContentProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null;
39
+ }: DropzoneContentProps): string | number | bigint | true | react_jsx_runtime0.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null;
40
40
  /**
41
41
  * DropzoneEmptyState
42
42
  */
@@ -47,6 +47,6 @@ type DropzoneEmptyStateProps = {
47
47
  declare function DropzoneEmptyState({
48
48
  children,
49
49
  className
50
- }: DropzoneEmptyStateProps): string | number | bigint | true | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null;
50
+ }: DropzoneEmptyStateProps): string | number | bigint | true | react_jsx_runtime0.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null;
51
51
  //#endregion
52
52
  export { Dropzone, DropzoneContent, DropzoneContentProps, DropzoneEmptyState, DropzoneEmptyStateProps, DropzoneProps };
@@ -1915,22 +1915,22 @@ declare class Storage<TSchema extends TDatabaseSchema> {
1915
1915
  */
1916
1916
  presignUpload(props: PresignUploadInput): Promise<{
1917
1917
  presignedUrl: string;
1918
- key: string;
1919
- id: string;
1920
1918
  metadata: unknown;
1919
+ uploadId: string;
1921
1920
  name: string | null;
1922
- status: "error" | "pending" | "ready";
1923
- contentType: string | null;
1921
+ visibility: "private" | "public";
1924
1922
  size: number | null;
1925
- createdAt: Date;
1926
- updatedAt: Date;
1923
+ contentType: string | null;
1927
1924
  provider: "s3";
1928
- uploadId: string;
1929
- visibility: "private" | "public";
1930
1925
  bucket: string;
1926
+ key: string;
1927
+ status: "error" | "pending" | "ready";
1931
1928
  etag: string | null;
1932
1929
  uploadedAt: Date;
1933
1930
  deletedAt: Date | null;
1931
+ id: string;
1932
+ createdAt: Date;
1933
+ updatedAt: Date;
1934
1934
  }>;
1935
1935
  /**
1936
1936
  * Confirms a direct-to-storage upload by verifying object existence
@@ -2164,22 +2164,22 @@ declare class Storage<TSchema extends TDatabaseSchema> {
2164
2164
  * @returns The purged asset record, or null if not found
2165
2165
  */
2166
2166
  purgeAsset(input: string): Promise<{
2167
- key: string;
2168
- id: string;
2169
2167
  metadata: unknown;
2168
+ uploadId: string;
2170
2169
  name: string | null;
2171
- status: "error" | "pending" | "ready";
2172
- contentType: string | null;
2170
+ visibility: "private" | "public";
2173
2171
  size: number | null;
2174
- createdAt: Date;
2175
- updatedAt: Date;
2172
+ contentType: string | null;
2176
2173
  provider: "s3";
2177
- uploadId: string;
2178
- visibility: "private" | "public";
2179
2174
  bucket: string;
2175
+ key: string;
2176
+ status: "error" | "pending" | "ready";
2180
2177
  etag: string | null;
2181
2178
  uploadedAt: Date;
2182
2179
  deletedAt: Date | null;
2180
+ id: string;
2181
+ createdAt: Date;
2182
+ updatedAt: Date;
2183
2183
  } | null>;
2184
2184
  /**
2185
2185
  * Hard deletes multiple storage assets.
@@ -2195,22 +2195,22 @@ declare class Storage<TSchema extends TDatabaseSchema> {
2195
2195
  * @throws {ServerError} If provider deletion fails
2196
2196
  */
2197
2197
  purgeAssets(input: string[]): Promise<{
2198
- key: string;
2199
- id: string;
2200
2198
  metadata: unknown;
2199
+ uploadId: string;
2201
2200
  name: string | null;
2202
- status: "error" | "pending" | "ready";
2203
- contentType: string | null;
2201
+ visibility: "private" | "public";
2204
2202
  size: number | null;
2205
- createdAt: Date;
2206
- updatedAt: Date;
2203
+ contentType: string | null;
2207
2204
  provider: "s3";
2208
- uploadId: string;
2209
- visibility: "private" | "public";
2210
2205
  bucket: string;
2206
+ key: string;
2207
+ status: "error" | "pending" | "ready";
2211
2208
  etag: string | null;
2212
2209
  uploadedAt: Date;
2213
2210
  deletedAt: Date | null;
2211
+ id: string;
2212
+ createdAt: Date;
2213
+ updatedAt: Date;
2214
2214
  }[]>;
2215
2215
  }
2216
2216
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tulip-systems/core",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "AGPL-3.0",
@@ -42,7 +42,7 @@ export type RootLayoutProps = PropsWithChildren;
42
42
 
43
43
  export function RootLayout({ children }: RootLayoutProps) {
44
44
  return (
45
- <html lang="nl" data-theme="tulip">
45
+ <html lang="nl" data-theme="tulip" suppressHydrationWarning>
46
46
  <body className={cn("bg-background font-sans antialiased", registerFonts())}>{children}</body>
47
47
  </html>
48
48
  );
@@ -1,16 +1,14 @@
1
1
  "use client";
2
2
 
3
- import { Badge, Button, Separator } from "@tulip-systems/core/components";
4
- import {
5
- Calendar,
6
- Popover,
7
- PopoverContent,
8
- PopoverTrigger,
9
- } from "@tulip-systems/core/components/client";
10
3
  import { format } from "date-fns";
11
4
  import { CalendarIcon } from "lucide-react";
12
5
  import { type SingleParserBuilder, useQueryState } from "nuqs";
13
6
  import { startTransition, useState } from "react";
7
+ import { Badge } from "@/components/ui/badge";
8
+ import { Button } from "@/components/ui/button";
9
+ import { Calendar } from "@/components/ui/calendar.client";
10
+ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover.client";
11
+ import { Separator } from "@/components/ui/separator";
14
12
 
15
13
  export type TableFilterDateRangeValue = [Date, Date] | null;
16
14
 
@@ -16,10 +16,10 @@ export function InfinteTableBottombar<TData>({ table }: { table: Table<TData> })
16
16
  const isInView = useInView(scrollRef);
17
17
 
18
18
  const hasNextPage = table.getCanNextPage();
19
- const fetchNextPage = table.nextPage;
20
19
 
21
20
  const meta = table.options.meta as TableMeta<TData>;
22
- const { isFetching, isFetchingNextPage } = meta.strategy.meta as InfiniteStrategyMeta;
21
+ const { fetchNextPage, isFetching, isFetchingNextPage } = meta.strategy
22
+ .meta as InfiniteStrategyMeta;
23
23
 
24
24
  useEffect(() => {
25
25
  if (isInView && hasNextPage && !isFetching && !isFetchingNextPage) {
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
 
3
- import type { PaginationState, Updater } from "@tanstack/react-table";
4
3
  import { useQueryStates } from "nuqs";
5
4
  import { tableSearchParams } from "../../entry";
6
5
  import type { TableStrategy } from "../../lib/types";
@@ -44,19 +43,6 @@ export function useInfiniteStrategy({
44
43
  rowCount: total,
45
44
  paginationState,
46
45
  manualPagination: true,
47
- onPaginationChange: (updater: Updater<PaginationState>) => {
48
- // Get the new state from the updater function
49
- const newState = typeof updater === "function" ? updater(paginationState) : updater;
50
-
51
- // Update the search params
52
- setQuery({ limit: newState.pageSize });
53
-
54
- // Fetch the next page
55
- fetchNextPage();
56
-
57
- // Return the new state
58
- return newState;
59
- },
60
46
  resetCursor,
61
47
  tableSearchParams: tableSearchParams,
62
48
  sortingState,