@lumerahq/ui 0.9.0 → 0.9.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.
@@ -1,11 +1,14 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import React__default, { forwardRef, createElement, memo, useId as useId$1, useTransition, useMemo, useRef, useEffect, useState, cloneElement, createContext, isValidElement, useContext, useCallback, Suspense, lazy, useLayoutEffect } from "react";
3
+ import React__default, { useContext, createContext, forwardRef, createElement, memo, useId as useId$1, useTransition, useMemo, useRef, useEffect, useState, cloneElement, isValidElement, useCallback, Suspense, lazy, useLayoutEffect } from "react";
4
4
  import { t as twMerge, p as clsx, o as cn$2, a as formatCellValue } from "./formatters-D4T821Dv.js";
5
5
  import * as ReactDOM from "react-dom";
6
6
  import { createPortal } from "react-dom";
7
7
  import { u as useAgentChat, a as useAutomationRun } from "./use-automation-run-D_1647k0.js";
8
8
  import { p as parentApiRequest, d as parentApiStream, B as BridgeError, f as automationStatuses, u as getAutomationRunFileDownloadUrl, A as listAutomationRunFiles } from "./automations-DNWw-HT7.js";
9
+ const mergeClasses = (...classes) => classes.filter((className, index2, array) => {
10
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
11
+ }).join(" ").trim();
9
12
  const toKebabCase = (string2) => string2.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
10
13
  const toCamelCase = (string2) => string2.replace(
11
14
  /^([A-Z])|[\s-_]+(\w)/g,
@@ -15,16 +18,6 @@ const toPascalCase = (string2) => {
15
18
  const camelCase = toCamelCase(string2);
16
19
  return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
17
20
  };
18
- const mergeClasses = (...classes) => classes.filter((className, index2, array) => {
19
- return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index2;
20
- }).join(" ").trim();
21
- const hasA11yProp = (props) => {
22
- for (const prop in props) {
23
- if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
24
- return true;
25
- }
26
- }
27
- };
28
21
  var defaultAttributes = {
29
22
  xmlns: "http://www.w3.org/2000/svg",
30
23
  width: 24,
@@ -36,34 +29,45 @@ var defaultAttributes = {
36
29
  strokeLinecap: "round",
37
30
  strokeLinejoin: "round"
38
31
  };
32
+ const hasA11yProp = (props) => {
33
+ for (const prop in props) {
34
+ if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
35
+ return true;
36
+ }
37
+ }
38
+ return false;
39
+ };
40
+ const LucideContext = createContext({});
41
+ const useLucideContext = () => useContext(LucideContext);
39
42
  const Icon = forwardRef(
40
- ({
41
- color: color2 = "currentColor",
42
- size: size2 = 24,
43
- strokeWidth = 2,
44
- absoluteStrokeWidth,
45
- className = "",
46
- children: children2,
47
- iconNode,
48
- ...rest
49
- }, ref) => createElement(
50
- "svg",
51
- {
52
- ref,
53
- ...defaultAttributes,
54
- width: size2,
55
- height: size2,
56
- stroke: color2,
57
- strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size2) : strokeWidth,
58
- className: mergeClasses("lucide", className),
59
- ...!children2 && !hasA11yProp(rest) && { "aria-hidden": "true" },
60
- ...rest
61
- },
62
- [
63
- ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
64
- ...Array.isArray(children2) ? children2 : [children2]
65
- ]
66
- )
43
+ ({ color: color2, size: size2, strokeWidth, absoluteStrokeWidth, className = "", children: children2, iconNode, ...rest }, ref) => {
44
+ const {
45
+ size: contextSize = 24,
46
+ strokeWidth: contextStrokeWidth = 2,
47
+ absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,
48
+ color: contextColor = "currentColor",
49
+ className: contextClass = ""
50
+ } = useLucideContext() ?? {};
51
+ const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size2 ?? contextSize) : strokeWidth ?? contextStrokeWidth;
52
+ return createElement(
53
+ "svg",
54
+ {
55
+ ref,
56
+ ...defaultAttributes,
57
+ width: size2 ?? contextSize ?? defaultAttributes.width,
58
+ height: size2 ?? contextSize ?? defaultAttributes.height,
59
+ stroke: color2 ?? contextColor,
60
+ strokeWidth: calculatedStrokeWidth,
61
+ className: mergeClasses("lucide", contextClass, className),
62
+ ...!children2 && !hasA11yProp(rest) && { "aria-hidden": "true" },
63
+ ...rest
64
+ },
65
+ [
66
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
67
+ ...Array.isArray(children2) ? children2 : [children2]
68
+ ]
69
+ );
70
+ }
67
71
  );
68
72
  const createLucideIcon = (iconName, iconNode) => {
69
73
  const Component = forwardRef(
@@ -23866,7 +23870,7 @@ var lr = (e) => {
23866
23870
  for (; t > 0 && e[t - 1] === `
23867
23871
  `; ) t--;
23868
23872
  return e.slice(0, t);
23869
- }, cr = lazy(() => import("./highlighted-body-OFNGDK62-ClX2-0Ut.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), st = ({ code: e, language: t, className: o, children: n, isIncomplete: r = false, startLine: s2, lineNumbers: a, ...l }) => {
23873
+ }, cr = lazy(() => import("./highlighted-body-OFNGDK62-CeR4x7F6.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), st = ({ code: e, language: t, className: o, children: n, isIncomplete: r = false, startLine: s2, lineNumbers: a, ...l }) => {
23870
23874
  let i = y2(), d2 = useMemo(() => lr(e), [e]), c2 = useMemo(() => ({ bg: "transparent", fg: "inherit", tokens: d2.split(`
23871
23875
  `).map((p2) => [{ content: p2, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [d2]);
23872
23876
  return jsx(nt.Provider, { value: { code: e }, children: jsxs(ot, { isIncomplete: r, language: t, children: [jsx(rt, { language: t }), n ? jsx("div", { className: i("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"), children: jsx("div", { className: i("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"), "data-streamdown": "code-block-actions", children: n }) }) : null, jsx(Suspense, { fallback: jsx(At, { className: o, language: t, lineNumbers: a, result: c2, startLine: s2, ...l }), children: jsx(cr, { className: o, code: d2, language: t, lineNumbers: a, raw: c2, startLine: s2, ...l }) })] }) });
@@ -24228,7 +24232,7 @@ var vo = ({ children: e, className: t, showControls: o, showCopy: n = true, show
24228
24232
  let l = y2(), i = o && n, d2 = o && r, c2 = o && s2, p2 = i || d2 || c2;
24229
24233
  return jsxs("div", { className: l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"), "data-streamdown": "table-wrapper", children: [p2 ? jsxs("div", { className: l("flex items-center justify-end gap-1"), children: [i ? jsx(Te, {}) : null, d2 ? jsx(Pe, {}) : null, c2 ? jsx(Co, { showCopy: i, showDownload: d2, children: e }) : null] }) : null, jsx("div", { className: l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"), children: jsx("table", { className: l("w-full divide-y divide-border", t), "data-streamdown": "table", ...a, children: e }) })] });
24230
24234
  };
24231
- var es = /startLine=(\d+)/, ts = /\bnoLineNumbers\b/, os = lazy(() => import("./mermaid-GHXKKRXX-srRS7-dD.js").then((e) => ({ default: e.Mermaid }))), ns = /language-([^\s]+)/;
24235
+ var es = /startLine=(\d+)/, ts = /\bnoLineNumbers\b/, os = lazy(() => import("./mermaid-GHXKKRXX-BCicmuVL.js").then((e) => ({ default: e.Mermaid }))), ns = /language-([^\s]+)/;
24232
24236
  function qe(e, t) {
24233
24237
  if (!(e != null && e.position || t != null && t.position)) return true;
24234
24238
  if (!(e != null && e.position && (t != null && t.position))) return false;
@@ -1,4 +1,4 @@
1
- import { A, a, b, D, d, e, R, c } from "../RecordSheet-DnEqk0gH.js";
1
+ import { A, a, b, D, d, e, R, c } from "../RecordSheet-yAcqIdOK.js";
2
2
  export {
3
3
  A as AgentChat,
4
4
  a as AutomationRunList,
@@ -1,4 +1,4 @@
1
- import { f as R$1, L as Li, g as At } from "./RecordSheet-DnEqk0gH.js";
1
+ import { f as R$1, L as Li, g as At } from "./RecordSheet-yAcqIdOK.js";
2
2
  import { useContext, useState, useEffect } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  var R = ({ code: s, language: e, raw: t, className: h, startLine: d, lineNumbers: m, ...p }) => {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, a, b, D, d, e, R, c } from "./RecordSheet-DnEqk0gH.js";
1
+ import { A, a, b, D, d, e, R, c } from "./RecordSheet-yAcqIdOK.js";
2
2
  import { u, a as a2 } from "./use-automation-run-D_1647k0.js";
3
3
  import { u as u2, a as a3, b as b2, c as c2, d as d2, e as e2, f } from "./use-sql-table-8APCNryn.js";
4
4
  import { B, E, f as f2, b as b3, h, j, k, c as c3, l, m, n, q, g, r, t, u as u3, v, x, w, a as a4, y, i, z, A as A2, C, D as D2, F, o, p, d as d3, G, H, e as e3, s } from "./automations-DNWw-HT7.js";
@@ -0,0 +1,4 @@
1
+ import { p } from "./RecordSheet-yAcqIdOK.js";
2
+ export {
3
+ p as Mermaid
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/ui",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -53,7 +53,7 @@
53
53
  "@tanstack/react-query": "^5.90.12",
54
54
  "class-variance-authority": "^0.7.1",
55
55
  "clsx": "^2.1.1",
56
- "lucide-react": "^0.561.0",
56
+ "lucide-react": "^1.7.0",
57
57
  "streamdown": "^2.5.0",
58
58
  "tailwind-merge": "^3.4.0"
59
59
  },
@@ -1,4 +0,0 @@
1
- import { p } from "./RecordSheet-DnEqk0gH.js";
2
- export {
3
- p as Mermaid
4
- };