@neo4j-ndl/react 4.18.6 → 4.18.8

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 (54) hide show
  1. package/lib/cjs/_generated/style-rules/index.js +7 -1
  2. package/lib/cjs/_generated/style-rules/index.js.map +1 -1
  3. package/lib/cjs/_generated/style-rules/literal-schemas.js +32 -1
  4. package/lib/cjs/_generated/style-rules/literal-schemas.js.map +1 -1
  5. package/lib/cjs/_generated/style-rules/range-utils.js +46 -0
  6. package/lib/cjs/_generated/style-rules/range-utils.js.map +1 -0
  7. package/lib/cjs/ai/user-bubble/UserBubble.js +39 -2
  8. package/lib/cjs/ai/user-bubble/UserBubble.js.map +1 -1
  9. package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js +1 -5
  10. package/lib/cjs/ai/user-bubble/stories/user-bubble.story.js.map +1 -1
  11. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +26 -8
  12. package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
  13. package/lib/cjs/data-grid/style-rules/evaluate.js +60 -55
  14. package/lib/cjs/data-grid/style-rules/evaluate.js.map +1 -1
  15. package/lib/cjs/data-grid/style-rules/index.js +2 -1
  16. package/lib/cjs/data-grid/style-rules/index.js.map +1 -1
  17. package/lib/cjs/data-grid/style-rules/types.js +20 -14
  18. package/lib/cjs/data-grid/style-rules/types.js.map +1 -1
  19. package/lib/esm/_generated/style-rules/index.js +2 -1
  20. package/lib/esm/_generated/style-rules/index.js.map +1 -1
  21. package/lib/esm/_generated/style-rules/literal-schemas.js +28 -0
  22. package/lib/esm/_generated/style-rules/literal-schemas.js.map +1 -1
  23. package/lib/esm/_generated/style-rules/range-utils.js +43 -0
  24. package/lib/esm/_generated/style-rules/range-utils.js.map +1 -0
  25. package/lib/esm/ai/user-bubble/UserBubble.js +41 -4
  26. package/lib/esm/ai/user-bubble/UserBubble.js.map +1 -1
  27. package/lib/esm/ai/user-bubble/stories/user-bubble.story.js +1 -5
  28. package/lib/esm/ai/user-bubble/stories/user-bubble.story.js.map +1 -1
  29. package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +26 -8
  30. package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
  31. package/lib/esm/data-grid/style-rules/evaluate.js +61 -56
  32. package/lib/esm/data-grid/style-rules/evaluate.js.map +1 -1
  33. package/lib/esm/data-grid/style-rules/index.js +1 -1
  34. package/lib/esm/data-grid/style-rules/index.js.map +1 -1
  35. package/lib/esm/data-grid/style-rules/types.js +20 -14
  36. package/lib/esm/data-grid/style-rules/types.js.map +1 -1
  37. package/lib/types/_generated/style-rules/index.d.ts +3 -2
  38. package/lib/types/_generated/style-rules/index.d.ts.map +1 -1
  39. package/lib/types/_generated/style-rules/literal-schemas.d.ts +20 -0
  40. package/lib/types/_generated/style-rules/literal-schemas.d.ts.map +1 -1
  41. package/lib/types/_generated/style-rules/range-utils.d.ts +26 -0
  42. package/lib/types/_generated/style-rules/range-utils.d.ts.map +1 -0
  43. package/lib/types/ai/user-bubble/UserBubble.d.ts +7 -1
  44. package/lib/types/ai/user-bubble/UserBubble.d.ts.map +1 -1
  45. package/lib/types/ai/user-bubble/stories/user-bubble.story.d.ts.map +1 -1
  46. package/lib/types/data-grid/stories/datagrid-rule-based-styling-datetime.story.d.ts.map +1 -1
  47. package/lib/types/data-grid/style-rules/evaluate.d.ts.map +1 -1
  48. package/lib/types/data-grid/style-rules/index.d.ts +2 -2
  49. package/lib/types/data-grid/style-rules/index.d.ts.map +1 -1
  50. package/lib/types/data-grid/style-rules/types.d.ts +141 -28
  51. package/lib/types/data-grid/style-rules/types.d.ts.map +1 -1
  52. package/package.json +2 -2
  53. package/skills/ndl-react/components/ai/user-bubble.md +1 -0
  54. package/skills/ndl-react/components/data-grid.md +27 -9
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/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AC,CAAC;AAGH;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAuCzD,qFAAqF;AACrF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,uDAAuD;IACvD,KAAK,EAAE,uBAAuB;IAC9B,qGAAqG;IACrG,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,6CAA6C;IAC7C,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,0CAA0C;IAC1C,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IACnC,oPAAoP;IACpP,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAC7C,mFAAmF;IACnF,KAAK,EAAE,4BAA4B,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,KAAc,EACc,EAAE,CAC9B,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { z } from 'zod';\n\nimport {\n BigintLiteralSchema,\n DatetimeLiteralSchema,\n LocalDatetimeLiteralSchema,\n NumericLiteralSchema,\n TimeLiteralSchema,\n} from '../../_generated/style-rules';\n\n/*\n * Style types defined in Zod, so that we can use the schemas to generate JSON Schema.\n * This is useful for generating documentation, importing and for future integration into editors.\n */\n\n/** A literal that can appear as an operand in a style-rule where clause. */\nexport const DataGridStyleRuleLiteralSchema = z.union([\n z.string(),\n NumericLiteralSchema,\n z.boolean(),\n z.null(),\n]);\nexport type DataGridStyleRuleLiteral = z.infer<\n typeof DataGridStyleRuleLiteralSchema\n>;\n\n/** A JSON-safe bigint literal represented by a signed decimal string. */\nexport const DataGridBigintLiteralSchema = BigintLiteralSchema;\nexport type DataGridBigintLiteral = z.infer<typeof DataGridBigintLiteralSchema>;\n\n/** A number, native bigint, or JSON-safe bigint literal. */\nexport const DataGridNumericLiteralSchema = NumericLiteralSchema;\nexport type DataGridNumericLiteral = z.infer<\n typeof DataGridNumericLiteralSchema\n>;\n\n/** A reference to a column whose cell value is resolved at evaluation time. */\nexport const DataGridColumnRefSchema = z.object({ column: z.string() });\nexport type DataGridColumnRef = z.infer<typeof DataGridColumnRefSchema>;\n\n/**\n * An ISO 8601 or RFC 9557 datetime literal that resolves to a Unix millisecond\n * timestamp at evaluation time. Wraps the shared `DatetimeLiteralSchema` with a\n * DataGrid-specific name. Supported formats:\n * - RFC 9557 with IANA timezone: `\"2024-06-15T14:00:00[Europe/Stockholm]\"` (offset\n * inferred) or `\"2024-06-15T14:00:00+02:00[Europe/Stockholm]\"` (offset explicit)\n * - UTC or offset datetime: `\"2024-01-01T00:00:00Z\"`, `\"2024-01-01T00:00:00+02:00\"`\n * - Plain datetime (treated as UTC): `\"2024-01-01T14:30:00\"`\n * - Date-only (treated as UTC midnight): `\"2024-01-01\"`\n *\n * Unzoned datetimes without `Z` or an offset are treated as UTC wall-clock time.\n */\nexport const DataGridDatetimeLiteralSchema = DatetimeLiteralSchema;\nexport type DataGridDatetimeLiteral = z.infer<\n typeof DataGridDatetimeLiteralSchema\n>;\n\n/**\n * A plain (unzoned) ISO 8601 date or datetime literal that resolves to a Unix\n * millisecond timestamp in the browser's local timezone at evaluation time.\n * Wraps the shared `LocalDatetimeLiteralSchema` with a DataGrid-specific name.\n *\n * Only plain date/datetime strings without timezone qualifiers are accepted:\n * - Plain datetime: `\"2024-01-01T14:30:00\"`\n * - Date-only (treated as local midnight): `\"2024-01-01\"`\n *\n * Strings with `Z`, a UTC offset, or an IANA bracket are rejected — use\n * `{ datetime }` for timezone-aware instants.\n */\nexport const DataGridLocalDatetimeLiteralSchema = LocalDatetimeLiteralSchema;\nexport type DataGridLocalDatetimeLiteral = z.infer<\n typeof DataGridLocalDatetimeLiteralSchema\n>;\n\n/**\n * An ISO 8601 time literal that resolves to milliseconds since UTC midnight at\n * evaluation time. Wraps the shared `TimeLiteralSchema` with a DataGrid-specific\n * name. Supported formats:\n * - Local time (treated as UTC): `\"14:30:00\"`, `\"14:30:00.500\"`\n * - Offset time (UTC-normalised): `\"14:30:00+02:00\"`\n */\nexport const DataGridTimeLiteralSchema = TimeLiteralSchema;\nexport type DataGridTimeLiteral = z.infer<typeof DataGridTimeLiteralSchema>;\n\n/** An operand in a style-rule where clause -- either a literal value, a datetime literal, a localdatetime literal, a time literal, or a column reference. */\nexport const DataGridStyleRuleOperandSchema = z.union([\n DataGridColumnRefSchema,\n DataGridDatetimeLiteralSchema,\n DataGridLocalDatetimeLiteralSchema,\n DataGridTimeLiteralSchema,\n DataGridStyleRuleLiteralSchema,\n]);\nexport type DataGridStyleRuleOperand =\n | DataGridColumnRef\n | DataGridDatetimeLiteral\n | DataGridLocalDatetimeLiteral\n | DataGridTimeLiteral\n | DataGridStyleRuleLiteral;\n\n/**\n * Recursive WHERE clause for conditional expressions.\n * Inspired by the graph visualization style rule system but adapted for tabular data.\n *\n * The type is manually defined for the export, since zod doesn't support\n * exporting inferred recursive types.\n */\nexport type DataGridStyleRuleWhere =\n | { not: DataGridStyleRuleWhere }\n | { and: DataGridStyleRuleWhere[] }\n | { or: DataGridStyleRuleWhere[] }\n | { equal: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { lessThan: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { lessThanOrEqual: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { greaterThan: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { greaterThanOrEqual: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { contains: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { startsWith: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { endsWith: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { isNull: DataGridStyleRuleOperand };\n\nexport const DataGridStyleRuleWhereSchema: z.ZodType<DataGridStyleRuleWhere> =\n z.lazy(() =>\n z.union([\n z.object({ not: DataGridStyleRuleWhereSchema }),\n z.object({ and: z.array(DataGridStyleRuleWhereSchema) }),\n z.object({ or: z.array(DataGridStyleRuleWhereSchema) }),\n z.object({\n equal: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n lessThan: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n lessThanOrEqual: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n greaterThan: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n greaterThanOrEqual: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n contains: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n startsWith: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n endsWith: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({ isNull: DataGridStyleRuleOperandSchema }),\n ]),\n );\n\n/**\n * Gradient coloring based on a continuous numeric column value.\n * Colors should be hex strings (#rrggbb).\n * If the column value is missing or non-numeric, the colorRange is ignored.\n */\nexport const DataGridColorRangeSchema = z.object({\n /** Disable this color range without removing it. */\n isDisabled: z.boolean().optional(),\n /** Hex color (#rrggbb) at the maximum value. */\n maxColor: z.string(),\n /** The high end of the numeric range. Values above this clamp to maxColor. */\n maxValue: DataGridNumericLiteralSchema,\n /** Hex color (#rrggbb) at the optional mid-point for a 3-stop gradient. */\n midColor: z.string().optional(),\n /** Optional inflection point between minValue and maxValue for a 3-stop gradient. */\n midValue: DataGridNumericLiteralSchema.optional(),\n /** Hex color (#rrggbb) at the minimum value. */\n minColor: z.string(),\n /** The low end of the numeric range. Values below this clamp to minColor. */\n minValue: DataGridNumericLiteralSchema,\n /** The column whose numeric value drives the interpolation. */\n onColumn: z.string(),\n});\nexport type DataGridColorRange = z.infer<typeof DataGridColorRangeSchema>;\n\n/** A disable-able static color value. */\nexport const DataGridDisableableColorSchema = z.object({\n /** Disable this style without removing it. */\n isDisabled: z.boolean().optional(),\n /** The CSS color value (e.g. '#fee2e2'). */\n value: z.string(),\n});\nexport type DataGridDisableableColor = z.infer<\n typeof DataGridDisableableColorSchema\n>;\n\n/** Visual properties that a style rule can apply to a cell or row. */\nexport const DataGridCellStyleSchema = z.object({\n /** CSS background color / cell fill (e.g. '#fee2e2'). Matches the graph `Style.color`. */\n color: DataGridDisableableColorSchema.optional(),\n /** Gradient color interpolation applied to the cell fill. Matches the graph `Style.colorRange`. */\n colorRange: DataGridColorRangeSchema.optional(),\n /** CSS text color (e.g. '#991b1b'). Grid-only; no graph equivalent. */\n textColor: DataGridDisableableColorSchema.optional(),\n /** Gradient color interpolation applied to the text color. Grid-only; no graph equivalent. */\n textColorRange: DataGridColorRangeSchema.optional(),\n});\nexport type DataGridCellStyle = z.infer<typeof DataGridCellStyleSchema>;\n\n/**\n * metaData is an free-form object that can be used to store additional information about a style rule.\n * The data is not taken into account when evaluating the rule.\n */\nconst metaDataSchema = z.record(z.string(), z.unknown());\n\n/**\n * A function that converts a complex or non-scalar cell value into a\n * `DataGridStyleRuleLiteral` so it can participate in where-clause evaluation\n * and color-range interpolation.\n *\n * The function receives the raw cell value (`unknown`) and must return a scalar\n * (`string | number | bigint | { bigint: string } | boolean | null`). Return\n * `null` or `undefined` to signal that the value is missing or cannot be\n * represented.\n *\n * Note: converter functions are TypeScript-only — they cannot be serialized as\n * JSON, so no Zod schema is provided.\n */\nexport type DataGridStyleRuleValueConverter = (\n value: unknown,\n) => DataGridStyleRuleLiteral | undefined;\n\n/**\n * A map of column id → converter function.\n * Pass this as the `styleRuleValueConverters` prop on `DataGrid` to teach the\n * style-rule engine how to interpret complex cell values for specific columns.\n *\n * @example\n * ```ts\n * const converters: DataGridStyleRuleValueConverters = {\n * priority: (v) => {\n * const s = v as { min: number; max: number };\n * return s.max - s.min;\n * },\n * };\n * ```\n */\nexport type DataGridStyleRuleValueConverters = Record<\n string,\n DataGridStyleRuleValueConverter\n>;\n\n/** A single declarative rule that conditionally applies styles to DataGrid cells. */\nexport const DataGridStyleRuleSchema = z.object({\n /** Style properties to apply when the rule matches. */\n apply: DataGridCellStyleSchema,\n /** Which column this rule targets. Set to null to apply styles to all columns (row-level effect). */\n column: z.string().nullable(),\n /** Disable this rule without removing it. */\n isDisabled: z.boolean().optional(),\n /** Additional metadata about the rule. */\n metaData: metaDataSchema.optional(),\n /** Higher priority rules are applied later (override lower). Must be >= 0; negative values are reserved for internal use. Rules without explicit priority preserve their array order but are always applied before rules with explicit priority. */\n priority: z.number().nonnegative().optional(),\n /** Condition to evaluate. If omitted, rule always applies to matched column(s). */\n where: DataGridStyleRuleWhereSchema.optional(),\n});\nexport type DataGridStyleRule = z.infer<typeof DataGridStyleRuleSchema>;\n\n/**\n * Runtime type guard for {@link DataGridStyleRule}, backed by the internal Zod\n * schema. Narrows an `unknown` value to `DataGridStyleRule` when it is a valid\n * style rule.\n *\n * This lets consumers validate values without taking a dependency on Zod or on\n * our schema export. For example, it can be passed to another validation\n * library's custom check:\n *\n * @example\n * ```ts\n * import { z } from 'zod';\n * import { isDataGridStyleRule, type DataGridStyleRule } from '@neo4j-ndl/react';\n *\n * const formSchema = z.object({\n * rule: z.custom<DataGridStyleRule>(isDataGridStyleRule),\n * notes: z.string(),\n * });\n * ```\n */\nexport const isDataGridStyleRule = (\n value: unknown,\n): value is DataGridStyleRule =>\n DataGridStyleRuleSchema.safeParse(value).success;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AAEtC;;;GAGG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC;IACpD,CAAC,CAAC,MAAM,EAAE;IACV,oBAAoB;IACpB,CAAC,CAAC,OAAO,EAAE;IACX,CAAC,CAAC,IAAI,EAAE;IACR,qBAAqB;IACrB,0BAA0B;IAC1B,iBAAiB;CAClB,CAAC,CAAC;AAKH,yEAAyE;AACzE,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;AAG/D,4DAA4D;AAC5D,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;AAKjE,oFAAoF;AACpF,MAAM,CAAC,MAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAG7D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CA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GAAG,CACjC,KAAc,EACc,EAAE,CAC9B,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { z } from 'zod';\n\nimport {\n BigintLiteralSchema,\n DatetimeLiteralSchema,\n LocalDatetimeLiteralSchema,\n NumericLiteralSchema,\n RangeLiteralSchema,\n TimeLiteralSchema,\n} from '../../_generated/style-rules';\n\n/*\n * Style types defined in Zod, so that we can use the schemas to generate JSON Schema.\n * This is useful for generating documentation, importing and for future integration into editors.\n */\n\n/**\n * A literal value used in style-rule where clauses, converter return values,\n * and cell data. Temporal wrappers resolve to numbers at evaluation time.\n */\nexport const DataGridStyleRuleLiteralSchema = z.union([\n z.string(),\n NumericLiteralSchema,\n z.boolean(),\n z.null(),\n DatetimeLiteralSchema,\n LocalDatetimeLiteralSchema,\n TimeLiteralSchema,\n]);\nexport type DataGridStyleRuleLiteral = z.infer<\n typeof DataGridStyleRuleLiteralSchema\n>;\n\n/** A JSON-safe bigint literal represented by a signed decimal string. */\nexport const DataGridBigintLiteralSchema = BigintLiteralSchema;\nexport type DataGridBigintLiteral = z.infer<typeof DataGridBigintLiteralSchema>;\n\n/** A number, native bigint, or JSON-safe bigint literal. */\nexport const DataGridNumericLiteralSchema = NumericLiteralSchema;\nexport type DataGridNumericLiteral = z.infer<\n typeof DataGridNumericLiteralSchema\n>;\n\n/** A numeric, datetime, localdatetime, or time literal used as a range boundary. */\nexport const DataGridRangeLiteralSchema = RangeLiteralSchema;\nexport type DataGridRangeLiteral = z.infer<typeof DataGridRangeLiteralSchema>;\n\n/** A reference to a column whose cell value is resolved at evaluation time. */\nexport const DataGridColumnRefSchema = z.object({ column: z.string() });\nexport type DataGridColumnRef = z.infer<typeof DataGridColumnRefSchema>;\n\n/**\n * An ISO 8601 or RFC 9557 datetime literal that resolves to a Unix millisecond\n * timestamp at evaluation time. Wraps the shared `DatetimeLiteralSchema` with a\n * DataGrid-specific name. Supported formats:\n * - RFC 9557 with IANA timezone: `\"2024-06-15T14:00:00[Europe/Stockholm]\"` (offset\n * inferred) or `\"2024-06-15T14:00:00+02:00[Europe/Stockholm]\"` (offset explicit)\n * - UTC or offset datetime: `\"2024-01-01T00:00:00Z\"`, `\"2024-01-01T00:00:00+02:00\"`\n * - Plain datetime (treated as UTC): `\"2024-01-01T14:30:00\"`\n * - Date-only (treated as UTC midnight): `\"2024-01-01\"`\n *\n * Unzoned datetimes without `Z` or an offset are treated as UTC wall-clock time.\n */\nexport const DataGridDatetimeLiteralSchema = DatetimeLiteralSchema;\nexport type DataGridDatetimeLiteral = z.infer<\n typeof DataGridDatetimeLiteralSchema\n>;\n\n/**\n * A plain (unzoned) ISO 8601 date or datetime literal that resolves to a Unix\n * millisecond timestamp in the browser's local timezone at evaluation time.\n * Wraps the shared `LocalDatetimeLiteralSchema` with a DataGrid-specific name.\n *\n * Only plain date/datetime strings without timezone qualifiers are accepted:\n * - Plain datetime: `\"2024-01-01T14:30:00\"`\n * - Date-only (treated as local midnight): `\"2024-01-01\"`\n *\n * Strings with `Z`, a UTC offset, or an IANA bracket are rejected — use\n * `{ datetime }` for timezone-aware instants.\n */\nexport const DataGridLocalDatetimeLiteralSchema = LocalDatetimeLiteralSchema;\nexport type DataGridLocalDatetimeLiteral = z.infer<\n typeof DataGridLocalDatetimeLiteralSchema\n>;\n\n/**\n * An ISO 8601 time literal that resolves to milliseconds since UTC midnight at\n * evaluation time. Wraps the shared `TimeLiteralSchema` with a DataGrid-specific\n * name. Supported formats:\n * - Local time (treated as UTC): `\"14:30:00\"`, `\"14:30:00.500\"`\n * - Offset time (UTC-normalised): `\"14:30:00+02:00\"`\n */\nexport const DataGridTimeLiteralSchema = TimeLiteralSchema;\nexport type DataGridTimeLiteral = z.infer<typeof DataGridTimeLiteralSchema>;\n\n/** An operand in a style-rule where clause -- either a literal value or a column reference. */\nexport const DataGridStyleRuleOperandSchema = z.union([\n DataGridColumnRefSchema,\n DataGridStyleRuleLiteralSchema,\n]);\nexport type DataGridStyleRuleOperand = z.infer<\n typeof DataGridStyleRuleOperandSchema\n>;\n\n/**\n * Recursive WHERE clause for conditional expressions.\n * Inspired by the graph visualization style rule system but adapted for tabular data.\n *\n * The type is manually defined for the export, since zod doesn't support\n * exporting inferred recursive types.\n */\nexport type DataGridStyleRuleWhere =\n | { not: DataGridStyleRuleWhere }\n | { and: DataGridStyleRuleWhere[] }\n | { or: DataGridStyleRuleWhere[] }\n | { equal: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { lessThan: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { lessThanOrEqual: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { greaterThan: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { greaterThanOrEqual: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { contains: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { startsWith: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { endsWith: [DataGridStyleRuleOperand, DataGridStyleRuleOperand] }\n | { isNull: DataGridStyleRuleOperand };\n\nexport const DataGridStyleRuleWhereSchema: z.ZodType<DataGridStyleRuleWhere> =\n z.lazy(() =>\n z.union([\n z.object({ not: DataGridStyleRuleWhereSchema }),\n z.object({ and: z.array(DataGridStyleRuleWhereSchema) }),\n z.object({ or: z.array(DataGridStyleRuleWhereSchema) }),\n z.object({\n equal: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n lessThan: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n lessThanOrEqual: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n greaterThan: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n greaterThanOrEqual: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n contains: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n startsWith: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({\n endsWith: z.tuple([\n DataGridStyleRuleOperandSchema,\n DataGridStyleRuleOperandSchema,\n ]),\n }),\n z.object({ isNull: DataGridStyleRuleOperandSchema }),\n ]),\n );\n\n/**\n * Gradient coloring based on a continuous orderable column value.\n * Colors should be hex strings (#rrggbb).\n * Temporal range boundaries resolve to numbers before interpolation.\n * If the column value is missing or non-orderable, the colorRange is ignored.\n */\nexport const DataGridColorRangeSchema = z.object({\n /** Disable this color range without removing it. */\n isDisabled: z.boolean().optional(),\n /** Hex color (#rrggbb) at the maximum value. */\n maxColor: z.string(),\n /** The high end of the range. Values above this clamp to maxColor. */\n maxValue: DataGridRangeLiteralSchema,\n /** Hex color (#rrggbb) at the optional mid-point for a 3-stop gradient. */\n midColor: z.string().optional(),\n /** Optional inflection point between minValue and maxValue for a 3-stop gradient. */\n midValue: DataGridRangeLiteralSchema.optional(),\n /** Hex color (#rrggbb) at the minimum value. */\n minColor: z.string(),\n /** The low end of the range. Values below this clamp to minColor. */\n minValue: DataGridRangeLiteralSchema,\n /** The column whose orderable value drives the interpolation. */\n onColumn: z.string(),\n});\nexport type DataGridColorRange = z.infer<typeof DataGridColorRangeSchema>;\n\n/** A disable-able static color value. */\nexport const DataGridDisableableColorSchema = z.object({\n /** Disable this style without removing it. */\n isDisabled: z.boolean().optional(),\n /** The CSS color value (e.g. '#fee2e2'). */\n value: z.string(),\n});\nexport type DataGridDisableableColor = z.infer<\n typeof DataGridDisableableColorSchema\n>;\n\n/** Visual properties that a style rule can apply to a cell or row. */\nexport const DataGridCellStyleSchema = z.object({\n /** CSS background color / cell fill (e.g. '#fee2e2'). Matches the graph `Style.color`. */\n color: DataGridDisableableColorSchema.optional(),\n /** Gradient color interpolation applied to the cell fill. Matches the graph `Style.colorRange`. */\n colorRange: DataGridColorRangeSchema.optional(),\n /** CSS text color (e.g. '#991b1b'). Grid-only; no graph equivalent. */\n textColor: DataGridDisableableColorSchema.optional(),\n /** Gradient color interpolation applied to the text color. Grid-only; no graph equivalent. */\n textColorRange: DataGridColorRangeSchema.optional(),\n});\nexport type DataGridCellStyle = z.infer<typeof DataGridCellStyleSchema>;\n\n/**\n * metaData is an free-form object that can be used to store additional information about a style rule.\n * The data is not taken into account when evaluating the rule.\n */\nconst metaDataSchema = z.record(z.string(), z.unknown());\n\n/**\n * A function that converts a complex or non-scalar cell value into a\n * `DataGridStyleRuleLiteral` so it can participate in where-clause evaluation\n * and color-range interpolation.\n *\n * The function receives the raw cell value (`unknown`) and must return a scalar\n * (`string | number | bigint | { bigint: string } | boolean | null`) or a\n * temporal wrapper (`{ datetime: string }`, `{ localdatetime: string }`,\n * `{ time: string }`). The engine parses temporal wrappers to milliseconds.\n * Return `null` or `undefined` to signal that the value is missing or cannot\n * be represented.\n *\n * Note: converter functions are TypeScript-only — they cannot be serialized as\n * JSON, so no Zod schema is provided.\n */\nexport type DataGridStyleRuleValueConverter = (\n value: unknown,\n) => DataGridStyleRuleLiteral | undefined;\n\n/**\n * A map of column id → converter function.\n * Pass this as the `styleRuleValueConverters` prop on `DataGrid` to teach the\n * style-rule engine how to interpret complex cell values for specific columns.\n *\n * @example\n * ```ts\n * const converters: DataGridStyleRuleValueConverters = {\n * priority: (v) => {\n * const s = v as { min: number; max: number };\n * return s.max - s.min;\n * },\n * };\n * ```\n */\nexport type DataGridStyleRuleValueConverters = Record<\n string,\n DataGridStyleRuleValueConverter\n>;\n\n/** A single declarative rule that conditionally applies styles to DataGrid cells. */\nexport const DataGridStyleRuleSchema = z.object({\n /** Style properties to apply when the rule matches. */\n apply: DataGridCellStyleSchema,\n /** Which column this rule targets. Set to null to apply styles to all columns (row-level effect). */\n column: z.string().nullable(),\n /** Disable this rule without removing it. */\n isDisabled: z.boolean().optional(),\n /** Additional metadata about the rule. */\n metaData: metaDataSchema.optional(),\n /** Higher priority rules are applied later (override lower). Must be >= 0; negative values are reserved for internal use. Rules without explicit priority preserve their array order but are always applied before rules with explicit priority. */\n priority: z.number().nonnegative().optional(),\n /** Condition to evaluate. If omitted, rule always applies to matched column(s). */\n where: DataGridStyleRuleWhereSchema.optional(),\n});\nexport type DataGridStyleRule = z.infer<typeof DataGridStyleRuleSchema>;\n\n/**\n * Runtime type guard for {@link DataGridStyleRule}, backed by the internal Zod\n * schema. Narrows an `unknown` value to `DataGridStyleRule` when it is a valid\n * style rule.\n *\n * This lets consumers validate values without taking a dependency on Zod or on\n * our schema export. For example, it can be passed to another validation\n * library's custom check:\n *\n * @example\n * ```ts\n * import { z } from 'zod';\n * import { isDataGridStyleRule, type DataGridStyleRule } from '@neo4j-ndl/react';\n *\n * const formSchema = z.object({\n * rule: z.custom<DataGridStyleRule>(isDataGridStyleRule),\n * notes: z.string(),\n * });\n * ```\n */\nexport const isDataGridStyleRule = (\n value: unknown,\n): value is DataGridStyleRule =>\n DataGridStyleRuleSchema.safeParse(value).success;\n"]}
@@ -20,8 +20,9 @@
20
20
  */
21
21
  export { getWeight, lerpColor } from './color-utils';
22
22
  export { parseDateString, parseLocalDateString, parseTimeString, } from './date-utils';
23
- export { BigintLiteralSchema, DatetimeLiteralSchema, LocalDatetimeLiteralSchema, NumericLiteralSchema, TimeLiteralSchema, } from './literal-schemas';
24
- export type { BigintLiteral, DatetimeLiteral, LocalDatetimeLiteral, NumericLiteral, TimeLiteral, } from './literal-schemas';
23
+ export { BigintLiteralSchema, DatetimeLiteralSchema, isDatetimeLiteral, isLocalDatetimeLiteral, isTimeLiteral, LocalDatetimeLiteralSchema, NumericLiteralSchema, RangeLiteralSchema, TimeLiteralSchema, } from './literal-schemas';
24
+ export type { BigintLiteral, DatetimeLiteral, LocalDatetimeLiteral, NumericLiteral, RangeLiteral, TimeLiteral, } from './literal-schemas';
25
25
  export { clampNumericValue, compareNumericValues, getNumericWeight, isBigintLiteral, numericValuesEqual, resolveNumericLiteral, } from './numeric-utils';
26
26
  export type { NumericValue } from './numeric-utils';
27
+ export { resolveRangeLiteral } from './range-utils';
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_generated/style-rules/index.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_generated/style-rules/index.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
@@ -80,4 +80,24 @@ export declare const TimeLiteralSchema: z.ZodObject<{
80
80
  time: z.ZodString;
81
81
  }, z.core.$strip>;
82
82
  export type TimeLiteral = z.infer<typeof TimeLiteralSchema>;
83
+ /** Returns whether a value is a `{ datetime: string }` wrapper. Does not validate the string. */
84
+ export declare function isDatetimeLiteral(value: unknown): value is DatetimeLiteral;
85
+ /** Returns whether a value is a `{ localdatetime: string }` wrapper. Does not validate the string. */
86
+ export declare function isLocalDatetimeLiteral(value: unknown): value is LocalDatetimeLiteral;
87
+ /** Returns whether a value is a `{ time: string }` wrapper. Does not validate the string. */
88
+ export declare function isTimeLiteral(value: unknown): value is TimeLiteral;
89
+ /**
90
+ * A continuous, orderable literal that can be used as a range boundary.
91
+ * Temporal literals resolve to numbers before range interpolation.
92
+ */
93
+ export declare const RangeLiteralSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
94
+ bigint: z.ZodString;
95
+ }, z.core.$strip>]>, z.ZodObject<{
96
+ datetime: z.ZodString;
97
+ }, z.core.$strip>, z.ZodObject<{
98
+ localdatetime: z.ZodString;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ time: z.ZodString;
101
+ }, z.core.$strip>]>;
102
+ export type RangeLiteral = z.infer<typeof RangeLiteralSchema>;
83
103
  //# sourceMappingURL=literal-schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"literal-schemas.d.ts","sourceRoot":"","sources":["../../../../src/_generated/style-rules/literal-schemas.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;iBAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB;;mBAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB;;iBAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0BAA0B;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB;;iBAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":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AG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+
22
+ import type { RangeLiteral } from './literal-schemas';
23
+ import { type NumericValue } from './numeric-utils';
24
+ /** Resolves a range literal to the numeric representation used for interpolation. */
25
+ export declare function resolveRangeLiteral(value: RangeLiteral): NumericValue | null;
26
+ //# sourceMappingURL=range-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"range-utils.d.ts","sourceRoot":"","sources":["../../../../src/_generated/style-rules/range-utils.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,KAAK,YAAY,EAAyB,MAAM,iBAAiB,CAAC;AAE3E,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY,GAAG,IAAI,CAa5E"}
@@ -27,6 +27,12 @@ type UserBubbleProps = {
27
27
  avatarProps?: React.ComponentProps<typeof Avatar>;
28
28
  /** The element to display after the content. Could be a CleanIconButton to edit the user bubble. */
29
29
  trailingElement?: React.ReactNode;
30
+ /**
31
+ * Maximum number of lines visible before the message is collapsed.
32
+ * Set to `null` to always show the full message.
33
+ * @default 4
34
+ */
35
+ maxLines?: number | null;
30
36
  };
31
37
  /**
32
38
  * The component is used to display the user's message in a chat.
@@ -34,6 +40,6 @@ type UserBubbleProps = {
34
40
  *
35
41
  * @alpha - Changes to this component may be breaking.
36
42
  */
37
- declare const UserBubbleComponent: ({ avatarProps, trailingElement, children, className, style, htmlAttributes, ref, ...restProps }: CommonProps<"div", UserBubbleProps>) => import("react/jsx-runtime").JSX.Element;
43
+ declare const UserBubbleComponent: ({ avatarProps, trailingElement, children, maxLines, className, style, htmlAttributes, ref, ...restProps }: CommonProps<"div", UserBubbleProps>) => import("react/jsx-runtime").JSX.Element;
38
44
  export { UserBubbleComponent as UserBubble };
39
45
  //# sourceMappingURL=UserBubble.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserBubble.d.ts","sourceRoot":"","sources":["../../../../src/ai/user-bubble/UserBubble.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,kBAAkB,CAAC;AAGtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,KAAK,eAAe,GAAG;IACrB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,+BAA+B;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;IAClD,oGAAoG;IACpG,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,GAAI,iGAS1B,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,4CA2BrC,CAAC;AAEF,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"UserBubble.d.ts","sourceRoot":"","sources":["../../../../src/ai/user-bubble/UserBubble.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAA+B,MAAM,kBAAkB,CAAC;AAIvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,KAAK,eAAe,GAAG;IACrB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,+BAA+B;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;IAClD,oGAAoG;IACpG,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,GAAI,2GAU1B,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,4CA4GrC,CAAC;AAEF,OAAO,EAAE,mBAAmB,IAAI,UAAU,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"user-bubble.story.d.ts","sourceRoot":"","sources":["../../../../../src/ai/user-bubble/stories/user-bubble.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAIjD,QAAA,MAAM,SAAS,+CAad,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"user-bubble.story.d.ts","sourceRoot":"","sources":["../../../../../src/ai/user-bubble/stories/user-bubble.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAIjD,QAAA,MAAM,SAAS,+CAEd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"datagrid-rule-based-styling-datetime.story.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-rule-based-styling-datetime.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AA6NjD,QAAA,MAAM,SAAS,+CAmFd,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"datagrid-rule-based-styling-datetime.story.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-rule-based-styling-datetime.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AA+OjD,QAAA,MAAM,SAAS,+CAmFd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/evaluate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAiBH,OAAO,EAKL,KAAK,iBAAiB,EAGtB,KAAK,gCAAgC,EAGtC,MAAM,SAAS,CAAC;AAgZjB,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC7D,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,UAAU,CAAC,EAAE,gCAAgC,GAC5C,sBAAsB,CAsExB;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,gCAAgC,GAC5C,KAAK,CAAC,aAAa,GAAG,SAAS,CAGjC"}
1
+ {"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/evaluate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAqBH,OAAO,EAGL,KAAK,iBAAiB,EAGtB,KAAK,gCAAgC,EAEtC,MAAM,SAAS,CAAC;AA0ZjB,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CAC7D,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,UAAU,CAAC,EAAE,gCAAgC,GAC5C,sBAAsB,CAsExB;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,iBAAiB,EAAE,EAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,gCAAgC,GAC5C,KAAK,CAAC,aAAa,GAAG,SAAS,CAGjC"}
@@ -21,6 +21,6 @@
21
21
  export { evaluateDataGridStyleRules } from './evaluate';
22
22
  export { useDataGridCellStyle } from './hooks';
23
23
  export { isDataGridStyleRule } from './types';
24
- export { DataGridBigintLiteralSchema, DataGridCellStyleSchema, DataGridColorRangeSchema, DataGridColumnRefSchema, DataGridDatetimeLiteralSchema, DataGridDisableableColorSchema, DataGridStyleRuleLiteralSchema, DataGridStyleRuleOperandSchema, DataGridStyleRuleSchema, DataGridStyleRuleWhereSchema, DataGridTimeLiteralSchema, DataGridLocalDatetimeLiteralSchema, DataGridNumericLiteralSchema, } from './types';
25
- export type { DataGridBigintLiteral, DataGridCellStyle, DataGridColorRange, DataGridColumnRef, DataGridDatetimeLiteral, DataGridDisableableColor, DataGridStyleRuleLiteral, DataGridStyleRuleOperand, DataGridStyleRule, DataGridStyleRuleWhere, DataGridStyleRuleValueConverter, DataGridStyleRuleValueConverters, DataGridTimeLiteral, DataGridLocalDatetimeLiteral, DataGridNumericLiteral, } from './types';
24
+ export { DataGridBigintLiteralSchema, DataGridCellStyleSchema, DataGridColorRangeSchema, DataGridColumnRefSchema, DataGridDatetimeLiteralSchema, DataGridDisableableColorSchema, DataGridStyleRuleLiteralSchema, DataGridStyleRuleOperandSchema, DataGridStyleRuleSchema, DataGridStyleRuleWhereSchema, DataGridTimeLiteralSchema, DataGridLocalDatetimeLiteralSchema, DataGridNumericLiteralSchema, DataGridRangeLiteralSchema, } from './types';
25
+ export type { DataGridBigintLiteral, DataGridCellStyle, DataGridColorRange, DataGridColumnRef, DataGridDatetimeLiteral, DataGridDisableableColor, DataGridStyleRuleLiteral, DataGridStyleRuleOperand, DataGridStyleRule, DataGridStyleRuleWhere, DataGridStyleRuleValueConverter, DataGridStyleRuleValueConverters, DataGridTimeLiteral, DataGridLocalDatetimeLiteral, DataGridNumericLiteral, DataGridRangeLiteral, } from './types';
26
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,+BAA+B,EAC/B,gCAAgC,EAChC,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,kCAAkC,EAClC,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,+BAA+B,EAC/B,gCAAgC,EAChC,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
@@ -19,10 +19,19 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import { z } from 'zod';
22
- /** A literal that can appear as an operand in a style-rule where clause. */
22
+ /**
23
+ * A literal value used in style-rule where clauses, converter return values,
24
+ * and cell data. Temporal wrappers resolve to numbers at evaluation time.
25
+ */
23
26
  export declare const DataGridStyleRuleLiteralSchema: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
24
27
  bigint: z.ZodString;
25
- }, z.core.$strip>]>, z.ZodBoolean, z.ZodNull]>;
28
+ }, z.core.$strip>]>, z.ZodBoolean, z.ZodNull, z.ZodObject<{
29
+ datetime: z.ZodString;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ localdatetime: z.ZodString;
32
+ }, z.core.$strip>, z.ZodObject<{
33
+ time: z.ZodString;
34
+ }, z.core.$strip>]>;
26
35
  export type DataGridStyleRuleLiteral = z.infer<typeof DataGridStyleRuleLiteralSchema>;
27
36
  /** A JSON-safe bigint literal represented by a signed decimal string. */
28
37
  export declare const DataGridBigintLiteralSchema: z.ZodObject<{
@@ -34,6 +43,17 @@ export declare const DataGridNumericLiteralSchema: z.ZodUnion<readonly [z.ZodNum
34
43
  bigint: z.ZodString;
35
44
  }, z.core.$strip>]>;
36
45
  export type DataGridNumericLiteral = z.infer<typeof DataGridNumericLiteralSchema>;
46
+ /** A numeric, datetime, localdatetime, or time literal used as a range boundary. */
47
+ export declare const DataGridRangeLiteralSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
48
+ bigint: z.ZodString;
49
+ }, z.core.$strip>]>, z.ZodObject<{
50
+ datetime: z.ZodString;
51
+ }, z.core.$strip>, z.ZodObject<{
52
+ localdatetime: z.ZodString;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ time: z.ZodString;
55
+ }, z.core.$strip>]>;
56
+ export type DataGridRangeLiteral = z.infer<typeof DataGridRangeLiteralSchema>;
37
57
  /** A reference to a column whose cell value is resolved at evaluation time. */
38
58
  export declare const DataGridColumnRefSchema: z.ZodObject<{
39
59
  column: z.ZodString;
@@ -82,19 +102,19 @@ export declare const DataGridTimeLiteralSchema: z.ZodObject<{
82
102
  time: z.ZodString;
83
103
  }, z.core.$strip>;
84
104
  export type DataGridTimeLiteral = z.infer<typeof DataGridTimeLiteralSchema>;
85
- /** An operand in a style-rule where clause -- either a literal value, a datetime literal, a localdatetime literal, a time literal, or a column reference. */
105
+ /** An operand in a style-rule where clause -- either a literal value or a column reference. */
86
106
  export declare const DataGridStyleRuleOperandSchema: z.ZodUnion<readonly [z.ZodObject<{
87
107
  column: z.ZodString;
88
- }, z.core.$strip>, z.ZodObject<{
108
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
109
+ bigint: z.ZodString;
110
+ }, z.core.$strip>]>, z.ZodBoolean, z.ZodNull, z.ZodObject<{
89
111
  datetime: z.ZodString;
90
112
  }, z.core.$strip>, z.ZodObject<{
91
113
  localdatetime: z.ZodString;
92
114
  }, z.core.$strip>, z.ZodObject<{
93
115
  time: z.ZodString;
94
- }, z.core.$strip>, z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
95
- bigint: z.ZodString;
96
- }, z.core.$strip>]>, z.ZodBoolean, z.ZodNull]>]>;
97
- export type DataGridStyleRuleOperand = DataGridColumnRef | DataGridDatetimeLiteral | DataGridLocalDatetimeLiteral | DataGridTimeLiteral | DataGridStyleRuleLiteral;
116
+ }, z.core.$strip>]>]>;
117
+ export type DataGridStyleRuleOperand = z.infer<typeof DataGridStyleRuleOperandSchema>;
98
118
  /**
99
119
  * Recursive WHERE clause for conditional expressions.
100
120
  * Inspired by the graph visualization style rule system but adapted for tabular data.
@@ -129,23 +149,42 @@ export type DataGridStyleRuleWhere = {
129
149
  };
130
150
  export declare const DataGridStyleRuleWhereSchema: z.ZodType<DataGridStyleRuleWhere>;
131
151
  /**
132
- * Gradient coloring based on a continuous numeric column value.
152
+ * Gradient coloring based on a continuous orderable column value.
133
153
  * Colors should be hex strings (#rrggbb).
134
- * If the column value is missing or non-numeric, the colorRange is ignored.
154
+ * Temporal range boundaries resolve to numbers before interpolation.
155
+ * If the column value is missing or non-orderable, the colorRange is ignored.
135
156
  */
136
157
  export declare const DataGridColorRangeSchema: z.ZodObject<{
137
158
  isDisabled: z.ZodOptional<z.ZodBoolean>;
138
159
  maxColor: z.ZodString;
139
- maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
160
+ maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
140
161
  bigint: z.ZodString;
162
+ }, z.core.$strip>]>, z.ZodObject<{
163
+ datetime: z.ZodString;
164
+ }, z.core.$strip>, z.ZodObject<{
165
+ localdatetime: z.ZodString;
166
+ }, z.core.$strip>, z.ZodObject<{
167
+ time: z.ZodString;
141
168
  }, z.core.$strip>]>;
142
169
  midColor: z.ZodOptional<z.ZodString>;
143
- midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
170
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
144
171
  bigint: z.ZodString;
172
+ }, z.core.$strip>]>, z.ZodObject<{
173
+ datetime: z.ZodString;
174
+ }, z.core.$strip>, z.ZodObject<{
175
+ localdatetime: z.ZodString;
176
+ }, z.core.$strip>, z.ZodObject<{
177
+ time: z.ZodString;
145
178
  }, z.core.$strip>]>>;
146
179
  minColor: z.ZodString;
147
- minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
180
+ minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
148
181
  bigint: z.ZodString;
182
+ }, z.core.$strip>]>, z.ZodObject<{
183
+ datetime: z.ZodString;
184
+ }, z.core.$strip>, z.ZodObject<{
185
+ localdatetime: z.ZodString;
186
+ }, z.core.$strip>, z.ZodObject<{
187
+ time: z.ZodString;
149
188
  }, z.core.$strip>]>;
150
189
  onColumn: z.ZodString;
151
190
  }, z.core.$strip>;
@@ -165,16 +204,34 @@ export declare const DataGridCellStyleSchema: z.ZodObject<{
165
204
  colorRange: z.ZodOptional<z.ZodObject<{
166
205
  isDisabled: z.ZodOptional<z.ZodBoolean>;
167
206
  maxColor: z.ZodString;
168
- maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
207
+ maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
169
208
  bigint: z.ZodString;
209
+ }, z.core.$strip>]>, z.ZodObject<{
210
+ datetime: z.ZodString;
211
+ }, z.core.$strip>, z.ZodObject<{
212
+ localdatetime: z.ZodString;
213
+ }, z.core.$strip>, z.ZodObject<{
214
+ time: z.ZodString;
170
215
  }, z.core.$strip>]>;
171
216
  midColor: z.ZodOptional<z.ZodString>;
172
- midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
217
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
173
218
  bigint: z.ZodString;
219
+ }, z.core.$strip>]>, z.ZodObject<{
220
+ datetime: z.ZodString;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ localdatetime: z.ZodString;
223
+ }, z.core.$strip>, z.ZodObject<{
224
+ time: z.ZodString;
174
225
  }, z.core.$strip>]>>;
175
226
  minColor: z.ZodString;
176
- minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
227
+ minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
177
228
  bigint: z.ZodString;
229
+ }, z.core.$strip>]>, z.ZodObject<{
230
+ datetime: z.ZodString;
231
+ }, z.core.$strip>, z.ZodObject<{
232
+ localdatetime: z.ZodString;
233
+ }, z.core.$strip>, z.ZodObject<{
234
+ time: z.ZodString;
178
235
  }, z.core.$strip>]>;
179
236
  onColumn: z.ZodString;
180
237
  }, z.core.$strip>>;
@@ -185,16 +242,34 @@ export declare const DataGridCellStyleSchema: z.ZodObject<{
185
242
  textColorRange: z.ZodOptional<z.ZodObject<{
186
243
  isDisabled: z.ZodOptional<z.ZodBoolean>;
187
244
  maxColor: z.ZodString;
188
- maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
245
+ maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
189
246
  bigint: z.ZodString;
247
+ }, z.core.$strip>]>, z.ZodObject<{
248
+ datetime: z.ZodString;
249
+ }, z.core.$strip>, z.ZodObject<{
250
+ localdatetime: z.ZodString;
251
+ }, z.core.$strip>, z.ZodObject<{
252
+ time: z.ZodString;
190
253
  }, z.core.$strip>]>;
191
254
  midColor: z.ZodOptional<z.ZodString>;
192
- midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
255
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
193
256
  bigint: z.ZodString;
257
+ }, z.core.$strip>]>, z.ZodObject<{
258
+ datetime: z.ZodString;
259
+ }, z.core.$strip>, z.ZodObject<{
260
+ localdatetime: z.ZodString;
261
+ }, z.core.$strip>, z.ZodObject<{
262
+ time: z.ZodString;
194
263
  }, z.core.$strip>]>>;
195
264
  minColor: z.ZodString;
196
- minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
265
+ minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
197
266
  bigint: z.ZodString;
267
+ }, z.core.$strip>]>, z.ZodObject<{
268
+ datetime: z.ZodString;
269
+ }, z.core.$strip>, z.ZodObject<{
270
+ localdatetime: z.ZodString;
271
+ }, z.core.$strip>, z.ZodObject<{
272
+ time: z.ZodString;
198
273
  }, z.core.$strip>]>;
199
274
  onColumn: z.ZodString;
200
275
  }, z.core.$strip>>;
@@ -206,9 +281,11 @@ export type DataGridCellStyle = z.infer<typeof DataGridCellStyleSchema>;
206
281
  * and color-range interpolation.
207
282
  *
208
283
  * The function receives the raw cell value (`unknown`) and must return a scalar
209
- * (`string | number | bigint | { bigint: string } | boolean | null`). Return
210
- * `null` or `undefined` to signal that the value is missing or cannot be
211
- * represented.
284
+ * (`string | number | bigint | { bigint: string } | boolean | null`) or a
285
+ * temporal wrapper (`{ datetime: string }`, `{ localdatetime: string }`,
286
+ * `{ time: string }`). The engine parses temporal wrappers to milliseconds.
287
+ * Return `null` or `undefined` to signal that the value is missing or cannot
288
+ * be represented.
212
289
  *
213
290
  * Note: converter functions are TypeScript-only — they cannot be serialized as
214
291
  * JSON, so no Zod schema is provided.
@@ -240,16 +317,34 @@ export declare const DataGridStyleRuleSchema: z.ZodObject<{
240
317
  colorRange: z.ZodOptional<z.ZodObject<{
241
318
  isDisabled: z.ZodOptional<z.ZodBoolean>;
242
319
  maxColor: z.ZodString;
243
- maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
320
+ maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
244
321
  bigint: z.ZodString;
322
+ }, z.core.$strip>]>, z.ZodObject<{
323
+ datetime: z.ZodString;
324
+ }, z.core.$strip>, z.ZodObject<{
325
+ localdatetime: z.ZodString;
326
+ }, z.core.$strip>, z.ZodObject<{
327
+ time: z.ZodString;
245
328
  }, z.core.$strip>]>;
246
329
  midColor: z.ZodOptional<z.ZodString>;
247
- midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
330
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
248
331
  bigint: z.ZodString;
332
+ }, z.core.$strip>]>, z.ZodObject<{
333
+ datetime: z.ZodString;
334
+ }, z.core.$strip>, z.ZodObject<{
335
+ localdatetime: z.ZodString;
336
+ }, z.core.$strip>, z.ZodObject<{
337
+ time: z.ZodString;
249
338
  }, z.core.$strip>]>>;
250
339
  minColor: z.ZodString;
251
- minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
340
+ minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
252
341
  bigint: z.ZodString;
342
+ }, z.core.$strip>]>, z.ZodObject<{
343
+ datetime: z.ZodString;
344
+ }, z.core.$strip>, z.ZodObject<{
345
+ localdatetime: z.ZodString;
346
+ }, z.core.$strip>, z.ZodObject<{
347
+ time: z.ZodString;
253
348
  }, z.core.$strip>]>;
254
349
  onColumn: z.ZodString;
255
350
  }, z.core.$strip>>;
@@ -260,16 +355,34 @@ export declare const DataGridStyleRuleSchema: z.ZodObject<{
260
355
  textColorRange: z.ZodOptional<z.ZodObject<{
261
356
  isDisabled: z.ZodOptional<z.ZodBoolean>;
262
357
  maxColor: z.ZodString;
263
- maxValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
358
+ maxValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
264
359
  bigint: z.ZodString;
360
+ }, z.core.$strip>]>, z.ZodObject<{
361
+ datetime: z.ZodString;
362
+ }, z.core.$strip>, z.ZodObject<{
363
+ localdatetime: z.ZodString;
364
+ }, z.core.$strip>, z.ZodObject<{
365
+ time: z.ZodString;
265
366
  }, z.core.$strip>]>;
266
367
  midColor: z.ZodOptional<z.ZodString>;
267
- midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
368
+ midValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
268
369
  bigint: z.ZodString;
370
+ }, z.core.$strip>]>, z.ZodObject<{
371
+ datetime: z.ZodString;
372
+ }, z.core.$strip>, z.ZodObject<{
373
+ localdatetime: z.ZodString;
374
+ }, z.core.$strip>, z.ZodObject<{
375
+ time: z.ZodString;
269
376
  }, z.core.$strip>]>>;
270
377
  minColor: z.ZodString;
271
- minValue: z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
378
+ minValue: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt, z.ZodObject<{
272
379
  bigint: z.ZodString;
380
+ }, z.core.$strip>]>, z.ZodObject<{
381
+ datetime: z.ZodString;
382
+ }, z.core.$strip>, z.ZodObject<{
383
+ localdatetime: z.ZodString;
384
+ }, z.core.$strip>, z.ZodObject<{
385
+ time: z.ZodString;
273
386
  }, z.core.$strip>]>;
274
387
  onColumn: z.ZodString;
275
388
  }, z.core.$strip>>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/style-rules/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,4EAA4E;AAC5E,eAAO,MAAM,8BAA8B;;8CAKzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,2BAA2B;;iBAAsB,CAAC;AAC/D,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,4DAA4D;AAC5D,eAAO,MAAM,4BAA4B;;mBAAuB,CAAC;AACjE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB;;iBAAmC,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B;;i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;iBAiBnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,yCAAyC;AACzC,eAAO,MAAM,8BAA8B;;;iBAKzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAQxE;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,+BAA+B,GAAG,CAC5C,KAAK,EAAE,OAAO,KACX,wBAAwB,GAAG,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,gCAAgC,GAAG,MAAM,CACnD,MAAM,EACN,+BAA+B,CAChC,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAalC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,OAAO,KACb,KAAK,IAAI,iBACsC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "4.18.6",
3
+ "version": "4.18.8",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -399,7 +399,7 @@
399
399
  "@tanstack/react-table": "8.21.3",
400
400
  "react": ">=19.0.0",
401
401
  "react-dom": ">=19.0.0",
402
- "@neo4j-ndl/base": "^4.17.4"
402
+ "@neo4j-ndl/base": "^4.17.5"
403
403
  },
404
404
  "dependencies": {
405
405
  "@dnd-kit/core": "6.3.1",
@@ -10,6 +10,7 @@ Import: `import { UserBubbleComponent } from '@neo4j-ndl/react/ai'`
10
10
  |------|------|----------|---------|-------------|
11
11
  | `avatarProps` | `PolymorphicCommonProps<ElementType<any, keyof IntrinsicElements>, AvatarProps>` | | | The props for the avatar |
12
12
  | `children` | `ReactNode` | | | The content of the user bubble |
13
+ | `maxLines` | `number \| null` | | `4` | Maximum number of lines visible before the message is collapsed. Set to `null` to always show the full message. |
13
14
  | `ref` | `Ref<HTMLDivElement>` | | | A ref to apply to the root element. |
14
15
  | `trailingElement` | `ReactNode` | | | The element to display after the content. Could be a CleanIconButton to edit the user bubble. |
15
16