najm-kit 2.11.23 → 2.12.1

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +26 -12
  2. package/README.md +28 -1
  3. package/dist/NIcon-D73-C51g.d.ts +21 -0
  4. package/dist/{NNotFoundState-BmGDW2Bx.d.ts → NNotFoundState-Z2n2gbhS.d.ts} +1 -16
  5. package/dist/{NajmUIProvider-BwL5HFIV.d.ts → NajmUIProvider-C9IJW1ya.d.ts} +2 -19
  6. package/dist/adapters/app.d.ts +6 -4
  7. package/dist/adapters/app.mjs +9 -6
  8. package/dist/adapters/next.d.ts +2 -1
  9. package/dist/adapters/next.mjs +5 -3
  10. package/dist/chunk-5UY7U2ED.mjs +9 -0
  11. package/dist/chunk-A34LRQYI.mjs +7 -0
  12. package/dist/chunk-BFFTC7LD.mjs +66 -0
  13. package/dist/{chunk-5ZTOCWRA.mjs → chunk-F32O3WRX.mjs} +7 -197
  14. package/dist/chunk-FZX3DONZ.mjs +200 -0
  15. package/dist/{chunk-BDQK6ECA.mjs → chunk-LMW4DM5L.mjs} +43 -101
  16. package/dist/{chunk-DKHIQFXX.mjs → chunk-QDFLHSWO.mjs} +1 -1
  17. package/dist/{chunk-5JVFMOLI.mjs → chunk-QJ22WAQY.mjs} +2 -28
  18. package/dist/{chunk-LK3SMYUP.mjs → chunk-TZRTOQCC.mjs} +1 -6
  19. package/dist/chunk-VKSJ2V3O.mjs +2205 -0
  20. package/dist/chunk-VZXMMC72.mjs +31 -0
  21. package/dist/{chunk-M5VGBZ7R.mjs → chunk-WHGRN7PP.mjs} +2 -1
  22. package/dist/formFill-CQkTA0JS.d.ts +17 -0
  23. package/dist/index.d.ts +23 -437
  24. package/dist/index.mjs +338 -1950
  25. package/dist/json.mjs +5 -3
  26. package/dist/location/google.d.ts +14 -0
  27. package/dist/location/google.mjs +184 -0
  28. package/dist/location/index.d.ts +33 -0
  29. package/dist/location/index.mjs +9 -0
  30. package/dist/location/leaflet.d.ts +13 -0
  31. package/dist/location/leaflet.mjs +168 -0
  32. package/dist/theme.css +23 -2
  33. package/dist/types-BQBx0RZd.d.ts +578 -0
  34. package/package.json +30 -3
@@ -0,0 +1,31 @@
1
+ import { NajmScroll } from './chunk-QJ22WAQY.mjs';
2
+ import { createContext, useContext } from 'react';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ var TableStoreContext = createContext(null);
6
+ var useTableStore = { use: {} };
7
+ var handler = {
8
+ get: (_, prop) => () => {
9
+ const store = useContext(TableStoreContext);
10
+ if (!store) throw new Error("useTableStore must be used within NTable");
11
+ return store.use[prop]();
12
+ }
13
+ };
14
+ useTableStore.use = new Proxy({}, handler);
15
+ function formatJsonValue(value) {
16
+ if (typeof value === "string") return value;
17
+ try {
18
+ return JSON.stringify(value ?? null, null, 2) ?? String(value);
19
+ } catch {
20
+ return String(value);
21
+ }
22
+ }
23
+ function NTableJson() {
24
+ const viewMode = useTableStore.use.viewMode();
25
+ const renderJson = useTableStore.use.renderJson();
26
+ const jsonValue = useTableStore.use.jsonValue();
27
+ if (viewMode !== "json") return null;
28
+ return /* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col min-h-0 overflow-hidden", children: renderJson?.() ?? /* @__PURE__ */ jsx(NajmScroll, { axis: "both", className: "h-full min-h-0 rounded-md border border-border bg-muted/40", children: /* @__PURE__ */ jsx("pre", { className: "p-4 font-mono text-xs leading-relaxed text-foreground", children: formatJsonValue(jsonValue) }) }) });
29
+ }
30
+
31
+ export { NTableJson, TableStoreContext, useTableStore };
@@ -1,4 +1,5 @@
1
- import { useNajmComponentStyle, cn } from './chunk-LK3SMYUP.mjs';
1
+ import { useNajmComponentStyle } from './chunk-TZRTOQCC.mjs';
2
+ import { cn } from './chunk-5UY7U2ED.mjs';
2
3
  import { resolveVariantAlias, resolveRadiusValue } from './chunk-TFHWLE7N.mjs';
3
4
  import * as React2 from 'react';
4
5
  import React2__default from 'react';
@@ -0,0 +1,17 @@
1
+ import { ZodTypeAny, TypeOf } from 'zod';
2
+
3
+ type FormFillOverride = unknown | readonly unknown[] | ((fieldName: string) => unknown);
4
+ type FormFillOverrides = Record<string, FormFillOverride>;
5
+ interface FormDevToolsOptions {
6
+ enabled?: boolean;
7
+ shortcut?: string;
8
+ }
9
+ interface FormDevToolsConfig<T extends ZodTypeAny = ZodTypeAny> extends FormDevToolsOptions {
10
+ fill?: () => Partial<TypeOf<T>>;
11
+ overrides?: FormFillOverrides;
12
+ }
13
+ type FormDevTools<T extends ZodTypeAny = ZodTypeAny> = boolean | FormDevToolsConfig<T>;
14
+ /** Build form-shaped test values from a Zod object schema. */
15
+ declare function buildFormFill<TSchema extends ZodTypeAny>(schema: TSchema, overrides?: FormFillOverrides): Partial<TypeOf<TSchema>>;
16
+
17
+ export { type FormDevToolsOptions as F, type FormDevTools as a, type FormDevToolsConfig as b, type FormFillOverride as c, type FormFillOverrides as d, buildFormFill as e };