@alquimia-ai/ui 2.0.0 → 2.2.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.
- package/dist/{alert-dialog-CP71C4vl.d.mts → alert-dialog-HrXEPlTh.d.mts} +1 -1
- package/dist/{alert-dialog-CP71C4vl.d.ts → alert-dialog-HrXEPlTh.d.ts} +1 -1
- package/dist/components/atoms/index.d.mts +48 -3
- package/dist/components/atoms/index.d.ts +48 -3
- package/dist/components/atoms/index.js +239 -0
- package/dist/components/atoms/index.js.map +1 -1
- package/dist/components/atoms/index.mjs +207 -1
- package/dist/components/atoms/index.mjs.map +1 -1
- package/dist/components/genui/index.d.mts +79 -0
- package/dist/components/genui/index.d.ts +79 -0
- package/dist/components/genui/index.js +4693 -0
- package/dist/components/genui/index.js.map +1 -0
- package/dist/components/genui/index.mjs +4622 -0
- package/dist/components/genui/index.mjs.map +1 -0
- package/dist/components/hooks/index.d.mts +1 -1
- package/dist/components/hooks/index.d.ts +1 -1
- package/dist/components/molecules/documents/index.js +283 -58
- package/dist/components/molecules/documents/index.js.map +1 -1
- package/dist/components/molecules/documents/index.mjs +281 -58
- package/dist/components/molecules/documents/index.mjs.map +1 -1
- package/dist/components/molecules/index.d.mts +2 -2
- package/dist/components/molecules/index.d.ts +2 -2
- package/dist/components/molecules/index.js +335 -156
- package/dist/components/molecules/index.js.map +1 -1
- package/dist/components/molecules/index.mjs +331 -152
- package/dist/components/molecules/index.mjs.map +1 -1
- package/dist/components/molecules/viewers/index.js +182 -3
- package/dist/components/molecules/viewers/index.js.map +1 -1
- package/dist/components/molecules/viewers/index.mjs +182 -3
- package/dist/components/molecules/viewers/index.mjs.map +1 -1
- package/dist/components/organisms/index.d.mts +15 -2
- package/dist/components/organisms/index.d.ts +15 -2
- package/dist/components/organisms/index.js +434 -247
- package/dist/components/organisms/index.js.map +1 -1
- package/dist/components/organisms/index.mjs +431 -244
- package/dist/components/organisms/index.mjs.map +1 -1
- package/dist/components/templates/index.js +210 -31
- package/dist/components/templates/index.js.map +1 -1
- package/dist/components/templates/index.mjs +210 -31
- package/dist/components/templates/index.mjs.map +1 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +554 -307
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +524 -310
- package/dist/index.mjs.map +1 -1
- package/dist/{toast-2xT7L1tJ.d.mts → toast-DEc6eGUE.d.mts} +1 -1
- package/dist/{toast-2xT7L1tJ.d.ts → toast-DEc6eGUE.d.ts} +1 -1
- package/package.json +22 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { e as ToastProps, b as ToastActionElement } from '../../toast-DEc6eGUE.mjs';
|
|
3
3
|
import { ActionResponse } from '../../types/index.mjs';
|
|
4
4
|
import 'class-variance-authority/types';
|
|
5
5
|
import '@radix-ui/react-toast';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { e as ToastProps, b as ToastActionElement } from '../../toast-DEc6eGUE.js';
|
|
3
3
|
import { ActionResponse } from '../../types/index.js';
|
|
4
4
|
import 'class-variance-authority/types';
|
|
5
5
|
import '@radix-ui/react-toast';
|
|
@@ -1964,6 +1964,226 @@ var init_think_indicator = __esm({
|
|
|
1964
1964
|
ThinkIndicator.displayName = "ThinkIndicator";
|
|
1965
1965
|
}
|
|
1966
1966
|
});
|
|
1967
|
+
// src/components/atoms/ui/accordion.tsx
|
|
1968
|
+
var React26, AccordionPrimitive, import_lucide_react8, import_jsx_runtime31, AccordionItem, AccordionTrigger, AccordionContent;
|
|
1969
|
+
var init_accordion = __esm({
|
|
1970
|
+
"src/components/atoms/ui/accordion.tsx": function() {
|
|
1971
|
+
"use strict";
|
|
1972
|
+
"use client";
|
|
1973
|
+
React26 = __toESM(require("react"));
|
|
1974
|
+
AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
|
|
1975
|
+
import_lucide_react8 = require("lucide-react");
|
|
1976
|
+
init_utils();
|
|
1977
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1978
|
+
AccordionItem = React26.forwardRef(function(_param, ref) {
|
|
1979
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1980
|
+
"className"
|
|
1981
|
+
]);
|
|
1982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AccordionPrimitive.Item, _object_spread({
|
|
1983
|
+
ref: ref,
|
|
1984
|
+
className: cn("border-b", className)
|
|
1985
|
+
}, props));
|
|
1986
|
+
});
|
|
1987
|
+
AccordionItem.displayName = "AccordionItem";
|
|
1988
|
+
AccordionTrigger = React26.forwardRef(function(_param, ref) {
|
|
1989
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1990
|
+
"className",
|
|
1991
|
+
"children"
|
|
1992
|
+
]);
|
|
1993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AccordionPrimitive.Header, {
|
|
1994
|
+
className: "flex",
|
|
1995
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(AccordionPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
1996
|
+
ref: ref,
|
|
1997
|
+
className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className)
|
|
1998
|
+
}, props), {
|
|
1999
|
+
children: [
|
|
2000
|
+
children,
|
|
2001
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react8.ChevronDown, {
|
|
2002
|
+
className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"
|
|
2003
|
+
})
|
|
2004
|
+
]
|
|
2005
|
+
}))
|
|
2006
|
+
});
|
|
2007
|
+
});
|
|
2008
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
2009
|
+
AccordionContent = React26.forwardRef(function(_param, ref) {
|
|
2010
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2011
|
+
"className",
|
|
2012
|
+
"children"
|
|
2013
|
+
]);
|
|
2014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AccordionPrimitive.Content, _object_spread_props(_object_spread({
|
|
2015
|
+
ref: ref,
|
|
2016
|
+
className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
2017
|
+
}, props), {
|
|
2018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {
|
|
2019
|
+
className: cn("pb-4 pt-0", className),
|
|
2020
|
+
children: children
|
|
2021
|
+
})
|
|
2022
|
+
}));
|
|
2023
|
+
});
|
|
2024
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
2025
|
+
}
|
|
2026
|
+
});
|
|
2027
|
+
// src/components/atoms/ui/radio-group.tsx
|
|
2028
|
+
var React27, RadioGroupPrimitive, import_lucide_react9, import_jsx_runtime32, RadioGroup, RadioGroupItem;
|
|
2029
|
+
var init_radio_group = __esm({
|
|
2030
|
+
"src/components/atoms/ui/radio-group.tsx": function() {
|
|
2031
|
+
"use strict";
|
|
2032
|
+
"use client";
|
|
2033
|
+
React27 = __toESM(require("react"));
|
|
2034
|
+
RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
2035
|
+
import_lucide_react9 = require("lucide-react");
|
|
2036
|
+
init_utils();
|
|
2037
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2038
|
+
RadioGroup = React27.forwardRef(function(_param, ref) {
|
|
2039
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
2040
|
+
"className"
|
|
2041
|
+
]);
|
|
2042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadioGroupPrimitive.Root, _object_spread({
|
|
2043
|
+
ref: ref,
|
|
2044
|
+
className: cn("grid gap-2", className)
|
|
2045
|
+
}, props));
|
|
2046
|
+
});
|
|
2047
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
2048
|
+
RadioGroupItem = React27.forwardRef(function(_param, ref) {
|
|
2049
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
2050
|
+
"className"
|
|
2051
|
+
]);
|
|
2052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadioGroupPrimitive.Item, _object_spread_props(_object_spread({
|
|
2053
|
+
ref: ref,
|
|
2054
|
+
className: cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className)
|
|
2055
|
+
}, props), {
|
|
2056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadioGroupPrimitive.Indicator, {
|
|
2057
|
+
className: "flex items-center justify-center",
|
|
2058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react9.Circle, {
|
|
2059
|
+
className: "h-2.5 w-2.5 fill-current text-current"
|
|
2060
|
+
})
|
|
2061
|
+
})
|
|
2062
|
+
}));
|
|
2063
|
+
});
|
|
2064
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
2065
|
+
}
|
|
2066
|
+
});
|
|
2067
|
+
// src/components/atoms/ui/progress.tsx
|
|
2068
|
+
var React28, ProgressPrimitive, import_jsx_runtime33, Progress;
|
|
2069
|
+
var init_progress = __esm({
|
|
2070
|
+
"src/components/atoms/ui/progress.tsx": function() {
|
|
2071
|
+
"use strict";
|
|
2072
|
+
"use client";
|
|
2073
|
+
React28 = __toESM(require("react"));
|
|
2074
|
+
ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
|
2075
|
+
init_utils();
|
|
2076
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2077
|
+
Progress = React28.forwardRef(function(_param, ref) {
|
|
2078
|
+
var className = _param.className, value = _param.value, props = _object_without_properties(_param, [
|
|
2079
|
+
"className",
|
|
2080
|
+
"value"
|
|
2081
|
+
]);
|
|
2082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
2083
|
+
ref: ref,
|
|
2084
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-muted", className)
|
|
2085
|
+
}, props), {
|
|
2086
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ProgressPrimitive.Indicator, {
|
|
2087
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
2088
|
+
style: {
|
|
2089
|
+
transform: "translateX(-".concat(100 - (value || 0), "%)")
|
|
2090
|
+
}
|
|
2091
|
+
})
|
|
2092
|
+
}));
|
|
2093
|
+
});
|
|
2094
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
2095
|
+
}
|
|
2096
|
+
});
|
|
2097
|
+
// src/components/atoms/ui/calendar.tsx
|
|
2098
|
+
function Calendar(_param) {
|
|
2099
|
+
var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties(_param, [
|
|
2100
|
+
"className",
|
|
2101
|
+
"classNames",
|
|
2102
|
+
"showOutsideDays"
|
|
2103
|
+
]);
|
|
2104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_day_picker.DayPicker, _object_spread({
|
|
2105
|
+
showOutsideDays: showOutsideDays,
|
|
2106
|
+
className: cn("p-3", className),
|
|
2107
|
+
classNames: _object_spread({
|
|
2108
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
2109
|
+
month: "space-y-4",
|
|
2110
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
2111
|
+
caption_label: "text-sm font-medium",
|
|
2112
|
+
nav: "space-x-1 flex items-center",
|
|
2113
|
+
nav_button: cn(buttonVariants({
|
|
2114
|
+
variant: "outline"
|
|
2115
|
+
}), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
|
|
2116
|
+
nav_button_previous: "absolute left-1",
|
|
2117
|
+
nav_button_next: "absolute right-1",
|
|
2118
|
+
table: "w-full border-collapse space-y-1",
|
|
2119
|
+
head_row: "flex",
|
|
2120
|
+
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
2121
|
+
row: "flex w-full mt-2",
|
|
2122
|
+
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
2123
|
+
day: cn(buttonVariants({
|
|
2124
|
+
variant: "ghost"
|
|
2125
|
+
}), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
|
|
2126
|
+
day_range_end: "day-range-end",
|
|
2127
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
2128
|
+
day_today: "bg-accent text-accent-foreground",
|
|
2129
|
+
day_outside: "day-outside text-muted-foreground opacity-50",
|
|
2130
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
2131
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
2132
|
+
day_hidden: "invisible"
|
|
2133
|
+
}, classNames),
|
|
2134
|
+
components: {
|
|
2135
|
+
IconLeft: function() {
|
|
2136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react10.ChevronLeft, {
|
|
2137
|
+
className: "h-4 w-4"
|
|
2138
|
+
});
|
|
2139
|
+
},
|
|
2140
|
+
IconRight: function() {
|
|
2141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react10.ChevronRight, {
|
|
2142
|
+
className: "h-4 w-4"
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
}, props));
|
|
2147
|
+
}
|
|
2148
|
+
var import_lucide_react10, import_react_day_picker, import_jsx_runtime34;
|
|
2149
|
+
var init_calendar = __esm({
|
|
2150
|
+
"src/components/atoms/ui/calendar.tsx": function() {
|
|
2151
|
+
"use strict";
|
|
2152
|
+
"use client";
|
|
2153
|
+
import_lucide_react10 = require("lucide-react");
|
|
2154
|
+
import_react_day_picker = require("react-day-picker");
|
|
2155
|
+
init_utils();
|
|
2156
|
+
init_button();
|
|
2157
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2158
|
+
Calendar.displayName = "Calendar";
|
|
2159
|
+
}
|
|
2160
|
+
});
|
|
2161
|
+
// src/components/atoms/ui/chart.tsx
|
|
2162
|
+
function Chart(param) {
|
|
2163
|
+
var className = param.className, _param_height = param.height, height = _param_height === void 0 ? 300 : _param_height, children = param.children;
|
|
2164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", {
|
|
2165
|
+
className: cn("w-full", className),
|
|
2166
|
+
style: {
|
|
2167
|
+
height: height
|
|
2168
|
+
},
|
|
2169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_recharts.ResponsiveContainer, {
|
|
2170
|
+
width: "100%",
|
|
2171
|
+
height: "100%",
|
|
2172
|
+
children: children
|
|
2173
|
+
})
|
|
2174
|
+
});
|
|
2175
|
+
}
|
|
2176
|
+
var import_recharts, import_jsx_runtime35;
|
|
2177
|
+
var init_chart = __esm({
|
|
2178
|
+
"src/components/atoms/ui/chart.tsx": function() {
|
|
2179
|
+
"use strict";
|
|
2180
|
+
"use client";
|
|
2181
|
+
import_recharts = require("recharts");
|
|
2182
|
+
init_utils();
|
|
2183
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2184
|
+
Chart.displayName = "Chart";
|
|
2185
|
+
}
|
|
2186
|
+
});
|
|
1967
2187
|
// src/components/atoms/index.ts
|
|
1968
2188
|
var init_atoms = __esm({
|
|
1969
2189
|
"src/components/atoms/index.ts": function() {
|
|
@@ -2001,6 +2221,11 @@ var init_atoms = __esm({
|
|
|
2001
2221
|
init_separator();
|
|
2002
2222
|
init_toaster();
|
|
2003
2223
|
init_think_indicator();
|
|
2224
|
+
init_accordion();
|
|
2225
|
+
init_radio_group();
|
|
2226
|
+
init_progress();
|
|
2227
|
+
init_calendar();
|
|
2228
|
+
init_chart();
|
|
2004
2229
|
}
|
|
2005
2230
|
});
|
|
2006
2231
|
// src/components/hooks/use-resize-observer.ts
|
|
@@ -2106,21 +2331,21 @@ function PdfViewer(param) {
|
|
|
2106
2331
|
a.click();
|
|
2107
2332
|
URL.revokeObjectURL(docUrl || "");
|
|
2108
2333
|
};
|
|
2109
|
-
return /* @__PURE__ */ (0,
|
|
2334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, {
|
|
2110
2335
|
children: [
|
|
2111
|
-
/* @__PURE__ */ (0,
|
|
2336
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", {
|
|
2112
2337
|
className: "flex justify-between items-center p-4 border-b border-border",
|
|
2113
2338
|
children: [
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2339
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", {
|
|
2115
2340
|
children: [
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2341
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, {
|
|
2117
2342
|
onClick: handlePrevPage,
|
|
2118
2343
|
disabled: pageNumber <= 1,
|
|
2119
|
-
children: /* @__PURE__ */ (0,
|
|
2344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react11.ChevronLeft, {
|
|
2120
2345
|
className: "h-4 w-4"
|
|
2121
2346
|
})
|
|
2122
2347
|
}),
|
|
2123
|
-
/* @__PURE__ */ (0,
|
|
2348
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", {
|
|
2124
2349
|
className: "mx-2",
|
|
2125
2350
|
children: [
|
|
2126
2351
|
"Page ",
|
|
@@ -2129,33 +2354,33 @@ function PdfViewer(param) {
|
|
|
2129
2354
|
numPages
|
|
2130
2355
|
]
|
|
2131
2356
|
}),
|
|
2132
|
-
/* @__PURE__ */ (0,
|
|
2357
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, {
|
|
2133
2358
|
onClick: handleNextPage,
|
|
2134
2359
|
disabled: pageNumber >= numPages,
|
|
2135
|
-
children: /* @__PURE__ */ (0,
|
|
2360
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react11.ChevronRight, {
|
|
2136
2361
|
className: "h-4 w-4"
|
|
2137
2362
|
})
|
|
2138
2363
|
})
|
|
2139
2364
|
]
|
|
2140
2365
|
}),
|
|
2141
|
-
/* @__PURE__ */ (0,
|
|
2366
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", {
|
|
2142
2367
|
children: [
|
|
2143
|
-
/* @__PURE__ */ (0,
|
|
2368
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, {
|
|
2144
2369
|
onClick: handleZoomOut,
|
|
2145
|
-
children: /* @__PURE__ */ (0,
|
|
2370
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react11.ZoomOut, {
|
|
2146
2371
|
className: "h-4 w-4"
|
|
2147
2372
|
})
|
|
2148
2373
|
}),
|
|
2149
|
-
/* @__PURE__ */ (0,
|
|
2374
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", {
|
|
2150
2375
|
className: "mx-2",
|
|
2151
2376
|
children: [
|
|
2152
2377
|
(scale * 100).toFixed(0),
|
|
2153
2378
|
"%"
|
|
2154
2379
|
]
|
|
2155
2380
|
}),
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2381
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, {
|
|
2157
2382
|
onClick: handleZoomIn,
|
|
2158
|
-
children: /* @__PURE__ */ (0,
|
|
2383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react11.ZoomIn, {
|
|
2159
2384
|
className: "h-4 w-4"
|
|
2160
2385
|
})
|
|
2161
2386
|
})
|
|
@@ -2163,18 +2388,18 @@ function PdfViewer(param) {
|
|
|
2163
2388
|
})
|
|
2164
2389
|
]
|
|
2165
2390
|
}),
|
|
2166
|
-
/* @__PURE__ */ (0,
|
|
2391
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", {
|
|
2167
2392
|
ref: setContainerRef,
|
|
2168
2393
|
className: "overflow-auto",
|
|
2169
|
-
children: /* @__PURE__ */ (0,
|
|
2394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_pdf.Document, {
|
|
2170
2395
|
file: doc,
|
|
2171
2396
|
onLoadSuccess: onDocumentLoadSuccess,
|
|
2172
2397
|
options: options,
|
|
2173
|
-
loading: /* @__PURE__ */ (0,
|
|
2398
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Loader, {
|
|
2174
2399
|
size: "xl",
|
|
2175
2400
|
colorVariant: "destructive"
|
|
2176
2401
|
}),
|
|
2177
|
-
children: /* @__PURE__ */ (0,
|
|
2402
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_pdf.Page, {
|
|
2178
2403
|
pageNumber: pageNumber,
|
|
2179
2404
|
scale: scale,
|
|
2180
2405
|
width: containerWidth,
|
|
@@ -2185,19 +2410,19 @@ function PdfViewer(param) {
|
|
|
2185
2410
|
]
|
|
2186
2411
|
});
|
|
2187
2412
|
}
|
|
2188
|
-
var import_react6,
|
|
2413
|
+
var import_react6, import_lucide_react11, import_react_pdf, import_AnnotationLayer, import_TextLayer, import_jsx_runtime36, options, resizeObserverOptions;
|
|
2189
2414
|
var init_pdf_viewer = __esm({
|
|
2190
2415
|
"src/components/molecules/viewers/pdf-viewer.tsx": function() {
|
|
2191
2416
|
"use strict";
|
|
2192
2417
|
"use client";
|
|
2193
2418
|
import_react6 = require("react");
|
|
2194
2419
|
init_atoms();
|
|
2195
|
-
|
|
2420
|
+
import_lucide_react11 = require("lucide-react");
|
|
2196
2421
|
init_use_resize_observer();
|
|
2197
2422
|
import_react_pdf = require("react-pdf");
|
|
2198
2423
|
import_AnnotationLayer = require("react-pdf/dist/esm/Page/AnnotationLayer.css");
|
|
2199
2424
|
import_TextLayer = require("react-pdf/dist/esm/Page/TextLayer.css");
|
|
2200
|
-
|
|
2425
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2201
2426
|
import_react_pdf.pdfjs.GlobalWorkerOptions.workerSrc = "//unpkg.com/pdfjs-dist@".concat(import_react_pdf.pdfjs.version, "/build/pdf.worker.min.mjs");
|
|
2202
2427
|
options = {
|
|
2203
2428
|
cMapUrl: "/cmaps/",
|
|
@@ -2276,26 +2501,26 @@ function PlainTextViewer(param) {
|
|
|
2276
2501
|
}, [
|
|
2277
2502
|
doc
|
|
2278
2503
|
]);
|
|
2279
|
-
return /* @__PURE__ */ (0,
|
|
2280
|
-
children: /* @__PURE__ */ (0,
|
|
2504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, {
|
|
2505
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", {
|
|
2281
2506
|
className: "relative w-full h-full max-h-[80vh] overflow-y-auto p-8 alq--prose",
|
|
2282
2507
|
children: [
|
|
2283
|
-
loading && /* @__PURE__ */ (0,
|
|
2284
|
-
!loading && /* @__PURE__ */ (0,
|
|
2508
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Loader, {}),
|
|
2509
|
+
!loading && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RichText, {
|
|
2285
2510
|
content: content || ""
|
|
2286
2511
|
})
|
|
2287
2512
|
]
|
|
2288
2513
|
})
|
|
2289
2514
|
});
|
|
2290
2515
|
}
|
|
2291
|
-
var import_react7,
|
|
2516
|
+
var import_react7, import_jsx_runtime37;
|
|
2292
2517
|
var init_plain_text_viewer = __esm({
|
|
2293
2518
|
"src/components/molecules/viewers/plain-text-viewer.tsx": function() {
|
|
2294
2519
|
"use strict";
|
|
2295
2520
|
"use client";
|
|
2296
2521
|
import_react7 = require("react");
|
|
2297
2522
|
init_atoms();
|
|
2298
|
-
|
|
2523
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2299
2524
|
}
|
|
2300
2525
|
});
|
|
2301
2526
|
// src/components/molecules/documents/index.ts
|
|
@@ -2312,7 +2537,7 @@ module.exports = __toCommonJS(documents_exports);
|
|
|
2312
2537
|
// src/components/molecules/documents/document-selector.tsx
|
|
2313
2538
|
var import_react9 = require("react");
|
|
2314
2539
|
init_atoms();
|
|
2315
|
-
var
|
|
2540
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2316
2541
|
// src/components/molecules/documents/document-viewer.tsx
|
|
2317
2542
|
var import_react8 = __toESM(require("react"));
|
|
2318
2543
|
init_atoms();
|
|
@@ -2396,7 +2621,7 @@ var useDocumentReader = function(url, getDocument) {
|
|
|
2396
2621
|
};
|
|
2397
2622
|
};
|
|
2398
2623
|
// src/components/molecules/documents/document-viewer.tsx
|
|
2399
|
-
var
|
|
2624
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2400
2625
|
var PdfViewer2 = import_react8.default.lazy(function() {
|
|
2401
2626
|
return Promise.resolve().then(function() {
|
|
2402
2627
|
return init_pdf_viewer(), pdf_viewer_exports;
|
|
@@ -2418,30 +2643,30 @@ var DocumentViewer = function(param) {
|
|
|
2418
2643
|
}, [
|
|
2419
2644
|
isOpen
|
|
2420
2645
|
]);
|
|
2421
|
-
var documentRender = document2 && !error ? /* @__PURE__ */ (0,
|
|
2646
|
+
var documentRender = document2 && !error ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DocumentFactory, {
|
|
2422
2647
|
document: document2,
|
|
2423
2648
|
docId: doc.id
|
|
2424
|
-
}) : /* @__PURE__ */ (0,
|
|
2649
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", {
|
|
2425
2650
|
className: "flex flex-col items-center justify-center h-full w-full text-center p-4",
|
|
2426
|
-
children: /* @__PURE__ */ (0,
|
|
2651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", {
|
|
2427
2652
|
className: "text-primary font-medium",
|
|
2428
2653
|
children: error
|
|
2429
2654
|
})
|
|
2430
2655
|
});
|
|
2431
|
-
return /* @__PURE__ */ (0,
|
|
2656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Dialog, {
|
|
2432
2657
|
open: isOpen,
|
|
2433
2658
|
onOpenChange: onClose,
|
|
2434
|
-
children: /* @__PURE__ */ (0,
|
|
2659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(DialogContent, {
|
|
2435
2660
|
"aria-describedby": document2 ? "document-description" : void 0,
|
|
2436
2661
|
className: "h-[90%] max-w-[90%] gap-0 flex flex-col focus:outline-none alq--document-viewer-container",
|
|
2437
2662
|
children: [
|
|
2438
|
-
/* @__PURE__ */ (0,
|
|
2663
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DialogHeader, {
|
|
2439
2664
|
className: "border-b border-border pb-2",
|
|
2440
|
-
children: /* @__PURE__ */ (0,
|
|
2665
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DialogTitle, {
|
|
2441
2666
|
children: doc.name
|
|
2442
2667
|
})
|
|
2443
2668
|
}),
|
|
2444
|
-
!document2 && loading ? /* @__PURE__ */ (0,
|
|
2669
|
+
!document2 && loading ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Loader, {
|
|
2445
2670
|
size: "xl",
|
|
2446
2671
|
colorVariant: "destructive"
|
|
2447
2672
|
}) : documentRender
|
|
@@ -2451,35 +2676,35 @@ var DocumentViewer = function(param) {
|
|
|
2451
2676
|
};
|
|
2452
2677
|
var DocumentFactory = function(param) {
|
|
2453
2678
|
var document2 = param.document, docId = param.docId;
|
|
2454
|
-
var fallback = /* @__PURE__ */ (0,
|
|
2679
|
+
var fallback = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Loader, {
|
|
2455
2680
|
size: "xl",
|
|
2456
2681
|
colorVariant: "destructive"
|
|
2457
2682
|
});
|
|
2458
2683
|
switch(document2 && document2.type){
|
|
2459
2684
|
case "application/pdf":
|
|
2460
|
-
return /* @__PURE__ */ (0,
|
|
2685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react8.Suspense, {
|
|
2461
2686
|
fallback: fallback,
|
|
2462
|
-
children: /* @__PURE__ */ (0,
|
|
2687
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PdfViewer2, {
|
|
2463
2688
|
doc: document2,
|
|
2464
2689
|
docId: docId
|
|
2465
2690
|
})
|
|
2466
2691
|
});
|
|
2467
2692
|
case "text/plain":
|
|
2468
|
-
return /* @__PURE__ */ (0,
|
|
2693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react8.Suspense, {
|
|
2469
2694
|
fallback: fallback,
|
|
2470
|
-
children: /* @__PURE__ */ (0,
|
|
2695
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PlainTextViewer2, {
|
|
2471
2696
|
doc: document2,
|
|
2472
2697
|
docId: docId
|
|
2473
2698
|
})
|
|
2474
2699
|
});
|
|
2475
2700
|
default:
|
|
2476
|
-
return /* @__PURE__ */ (0,
|
|
2701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", {
|
|
2477
2702
|
children: "Unsupported file type"
|
|
2478
2703
|
});
|
|
2479
2704
|
}
|
|
2480
2705
|
};
|
|
2481
2706
|
// src/components/molecules/documents/document-selector.tsx
|
|
2482
|
-
var
|
|
2707
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2483
2708
|
var DocumentSelector = function(param) {
|
|
2484
2709
|
var documents = param.documents, getDocument = param.getDocument, logInfoMessage = param.logInfoMessage;
|
|
2485
2710
|
var _ref = _sliced_to_array((0, import_react9.useState)(void 0), 2), selectedDocName = _ref[0], setSelectedDocName = _ref[1];
|
|
@@ -2497,47 +2722,47 @@ var DocumentSelector = function(param) {
|
|
|
2497
2722
|
var handleDrawerClose = function() {
|
|
2498
2723
|
setIsModalOpen(false);
|
|
2499
2724
|
};
|
|
2500
|
-
return /* @__PURE__ */ (0,
|
|
2725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", {
|
|
2501
2726
|
className: "w-full md:w-4/6 alq--document-selector",
|
|
2502
2727
|
children: [
|
|
2503
|
-
/* @__PURE__ */ (0,
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Select, {
|
|
2504
2729
|
value: selectedDocName,
|
|
2505
2730
|
onValueChange: setSelectedDocName,
|
|
2506
2731
|
children: [
|
|
2507
|
-
/* @__PURE__ */ (0,
|
|
2732
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectTrigger, {
|
|
2508
2733
|
"aria-label": "Documentos",
|
|
2509
|
-
children: /* @__PURE__ */ (0,
|
|
2734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectValue, {
|
|
2510
2735
|
placeholder: "Documentos"
|
|
2511
2736
|
})
|
|
2512
2737
|
}),
|
|
2513
|
-
/* @__PURE__ */ (0,
|
|
2514
|
-
children: /* @__PURE__ */ (0,
|
|
2738
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectContent, {
|
|
2739
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(SelectGroup, {
|
|
2515
2740
|
children: [
|
|
2516
|
-
/* @__PURE__ */ (0,
|
|
2741
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectLabel, {
|
|
2517
2742
|
children: "Documents"
|
|
2518
2743
|
}),
|
|
2519
2744
|
documents.map(function(doc) {
|
|
2520
|
-
return /* @__PURE__ */ (0,
|
|
2745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", {
|
|
2521
2746
|
className: "w-full flex relative",
|
|
2522
2747
|
children: [
|
|
2523
|
-
/* @__PURE__ */ (0,
|
|
2748
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectItem, {
|
|
2524
2749
|
className: "w-full",
|
|
2525
2750
|
value: doc.id,
|
|
2526
|
-
children: /* @__PURE__ */ (0,
|
|
2751
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", {
|
|
2527
2752
|
className: "flex justify-between w-full",
|
|
2528
|
-
children: /* @__PURE__ */ (0,
|
|
2753
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", {
|
|
2529
2754
|
className: "h-4 truncate mr-5",
|
|
2530
2755
|
children: doc.name
|
|
2531
2756
|
})
|
|
2532
2757
|
})
|
|
2533
2758
|
}, doc.id),
|
|
2534
|
-
/* @__PURE__ */ (0,
|
|
2759
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", {
|
|
2535
2760
|
onClick: function(event) {
|
|
2536
2761
|
return handleDocumentClick(doc, event);
|
|
2537
2762
|
},
|
|
2538
2763
|
className: "bflex items-center text-gray-400 hover:text-gray-500 absolute right-0 mt-2",
|
|
2539
2764
|
"aria-label": "Open ".concat(doc.name),
|
|
2540
|
-
children: /* @__PURE__ */ (0,
|
|
2765
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react12.ExternalLink, {
|
|
2541
2766
|
className: "h-4 w-4 mx-2"
|
|
2542
2767
|
})
|
|
2543
2768
|
})
|
|
@@ -2549,7 +2774,7 @@ var DocumentSelector = function(param) {
|
|
|
2549
2774
|
})
|
|
2550
2775
|
]
|
|
2551
2776
|
}),
|
|
2552
|
-
selectedDoc && /* @__PURE__ */ (0,
|
|
2777
|
+
selectedDoc && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DocumentViewer, {
|
|
2553
2778
|
doc: selectedDoc,
|
|
2554
2779
|
docName: selectedDocName || "",
|
|
2555
2780
|
isOpen: isModalOpen,
|