@reopt-ai/opt-ui 1.6.0 → 1.7.0
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/COMPONENT_CATALOG.md +95 -12
- package/dist/app.css +24 -0
- package/dist/core/index.cjs +3 -3
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +2 -2
- package/dist/docs/02-components/03-shells.md +104 -11
- package/dist/docs/02-components/index.md +3 -3
- package/dist/docs/05-migration/01-breaking-changes.md +18 -1
- package/dist/field-sidebar-BTZCBviA.d.cts +1031 -0
- package/dist/field-sidebar-BTZCBviA.d.cts.map +1 -0
- package/dist/field-sidebar-CB8vjvUM.d.ts +1031 -0
- package/dist/field-sidebar-CB8vjvUM.d.ts.map +1 -0
- package/dist/{workflow-canvas-BGBAcjf-.js → field-sidebar-Cs-J-5VE.js} +1882 -52
- package/dist/field-sidebar-Cs-J-5VE.js.map +1 -0
- package/dist/{workflow-canvas-3Jeevkgy.cjs → field-sidebar-CzIQX70-.cjs} +2010 -48
- package/dist/id-registry.cjs +41 -1
- package/dist/id-registry.d.cts +1 -1
- package/dist/id-registry.d.cts.map +1 -1
- package/dist/id-registry.d.ts +1 -1
- package/dist/id-registry.d.ts.map +1 -1
- package/dist/id-registry.js +41 -1
- package/dist/id-registry.js.map +1 -1
- package/dist/id-registry.json +85 -0
- package/dist/index.cjs +142 -56
- package/dist/index.d.cts +149 -80
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +149 -80
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -11
- package/dist/index.js.map +1 -1
- package/dist/meta.cjs +292 -0
- package/dist/meta.d.cts.map +1 -1
- package/dist/meta.d.ts.map +1 -1
- package/dist/meta.js +292 -0
- package/dist/meta.js.map +1 -1
- package/dist/{pagination-By7Ozv3U.js → pagination-DWbvACuN.js} +93 -31
- package/dist/pagination-DWbvACuN.js.map +1 -0
- package/dist/{pagination-Uv3CnGJz.cjs → pagination-DjfxBcjX.cjs} +98 -36
- package/dist/query.cjs +386 -0
- package/dist/query.d.cts +141 -0
- package/dist/query.d.cts.map +1 -0
- package/dist/query.d.ts +141 -0
- package/dist/query.d.ts.map +1 -0
- package/dist/query.js +371 -0
- package/dist/query.js.map +1 -0
- package/dist/{shader-surface-BWhO2xkk.js → shader-surface-BUPZ0P-n.js} +22 -83
- package/dist/shader-surface-BUPZ0P-n.js.map +1 -0
- package/dist/{shader-surface-DIVWtpFl.d.ts → shader-surface-BfTP9c1Q.d.ts} +139 -139
- package/dist/shader-surface-BfTP9c1Q.d.ts.map +1 -0
- package/dist/{shader-surface-BK1GMt5_.d.cts → shader-surface-DRrcLrWf.d.cts} +139 -139
- package/dist/shader-surface-DRrcLrWf.d.cts.map +1 -0
- package/dist/{shader-surface-DxLLfrE6.cjs → shader-surface-Fav5K9UC.cjs} +20 -87
- package/dist/shells/index.cjs +31 -24
- package/dist/shells/index.d.cts +2 -2
- package/dist/shells/index.d.ts +2 -2
- package/dist/shells/index.js +3 -2
- package/dist/theme/presets/default.css +2 -2
- package/dist/theme/presets/minimal.css +2 -2
- package/dist/theme/presets/mono-dark.css +2 -2
- package/dist/theme/presets/natural.css +1 -1
- package/dist/theme/presets/pro.css +2 -2
- package/package.json +17 -6
- package/dist/pagination-By7Ozv3U.js.map +0 -1
- package/dist/shader-surface-BK1GMt5_.d.cts.map +0 -1
- package/dist/shader-surface-BWhO2xkk.js.map +0 -1
- package/dist/shader-surface-DIVWtpFl.d.ts.map +0 -1
- package/dist/workflow-canvas-BGBAcjf-.js.map +0 -1
- package/dist/workflow-canvas-Bar_O2SQ.d.ts +0 -494
- package/dist/workflow-canvas-Bar_O2SQ.d.ts.map +0 -1
- package/dist/workflow-canvas-DghDRtHn.d.cts +0 -494
- package/dist/workflow-canvas-DghDRtHn.d.cts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","names":[],"sources":["../src/lib/query/query-ast.ts","../src/lib/query/query-parse.ts","../src/lib/query/query-format.ts","../src/lib/query/query-match.ts"],"sourcesContent":["/**\n * A search query, as a value.\n *\n * Free-text search and a row of filter pickers answer different halves of the\n * same question, and neither can express the other: a picker cannot say \"not\n * this\", and a text box cannot say \"this field, exactly\". A parsed query is one\n * thing that does both, and — because it is a value rather than a widget's\n * internal state — it survives a URL, a saved view, and the trip to a server\n * that has to turn it into a database filter.\n *\n * The grammar follows the one analytics tools have converged on (Elastic's\n * `EuiSearchBar`, Kibana, GitHub's issue search), minus the parts that only\n * make sense against a Lucene index:\n *\n * error a term anywhere in the row\n * \"connection reset\" a phrase, kept together\n * -health a term that must not appear\n * path:/checkout a field equal to a value\n * path:(/a or /b) a field equal to any of several values\n * -status:200 a field that must not equal a value\n * status>=500 a comparison\n * path:*checkout* the field contains this somewhere\n * utm_source:* the field is present at all\n *\n * Clauses combine with AND; `or` only groups values inside one field. That is\n * a deliberate ceiling: arbitrary boolean nesting reads worse than it queries,\n * and every backend this targets can express the restricted form directly.\n */\n\n/** How a field clause compares. */\nexport type QueryOperator =\n | \"eq\"\n | \"contains\"\n | \"gt\"\n | \"gte\"\n | \"lt\"\n | \"lte\"\n | \"exists\";\n\n/** A bare or quoted word matched against the whole row. */\nexport interface QueryTermClause {\n type: \"term\";\n value: string;\n negated: boolean;\n}\n\n/** A constraint on one named field. Several values read as \"any of\". */\nexport interface QueryFieldClause {\n type: \"field\";\n field: string;\n operator: QueryOperator;\n values: string[];\n negated: boolean;\n}\n\nexport type QueryClause = QueryTermClause | QueryFieldClause;\n\n/** A parsed query: clauses combined with AND. */\nexport interface Query {\n clauses: QueryClause[];\n}\n\nexport const EMPTY_QUERY: Query = { clauses: [] };\n\n/** Whether a query constrains anything at all. */\nexport function isEmptyQuery(query: Query | null | undefined): boolean {\n return !query || query.clauses.length === 0;\n}\n\n/* ------------------------------------------------------------------ */\n/* Editing */\n/* ------------------------------------------------------------------ */\n\nfunction sameClause(a: QueryClause, b: QueryClause): boolean {\n if (a.type !== b.type) return false;\n if (a.type === \"term\" && b.type === \"term\") {\n return a.value === b.value && a.negated === b.negated;\n }\n const fieldA = a as QueryFieldClause;\n const fieldB = b as QueryFieldClause;\n return (\n fieldA.field === fieldB.field &&\n fieldA.operator === fieldB.operator &&\n fieldA.negated === fieldB.negated &&\n fieldA.values.length === fieldB.values.length &&\n fieldA.values.every((value, index) => value === fieldB.values[index])\n );\n}\n\n/** Add a clause unless an identical one is already there. */\nexport function addClause(query: Query, clause: QueryClause): Query {\n if (query.clauses.some((existing) => sameClause(existing, clause))) {\n return query;\n }\n return { clauses: [...query.clauses, clause] };\n}\n\n/**\n * Constrain a field to a value — what a cell's \"filter for this\" action does.\n *\n * Applying the opposite of a constraint already present replaces it rather than\n * adding it: `status:200` then \"filter out 200\" should read as one changed\n * mind, not as a query that can never match.\n */\nexport function withFieldValue(\n query: Query,\n field: string,\n value: string,\n options: { negated?: boolean; operator?: QueryOperator } = {},\n): Query {\n const negated = options.negated ?? false;\n const operator = options.operator ?? \"eq\";\n const clauses = query.clauses.filter(\n (clause) =>\n !(\n clause.type === \"field\" &&\n clause.field === field &&\n clause.operator === operator &&\n clause.values.length === 1 &&\n clause.values[0] === value\n ),\n );\n return {\n clauses: [\n ...clauses,\n { type: \"field\", field, operator, values: [value], negated },\n ],\n };\n}\n\n/** Drop every clause naming `field`. */\nexport function withoutField(query: Query, field: string): Query {\n return {\n clauses: query.clauses.filter(\n (clause) => clause.type !== \"field\" || clause.field !== field,\n ),\n };\n}\n\n/** Drop the clause at `index`, for a removable chip. */\nexport function removeClause(query: Query, index: number): Query {\n return { clauses: query.clauses.filter((_, at) => at !== index) };\n}\n\n/** Every field the query names, in the order they first appear. */\nexport function queryFields(query: Query): string[] {\n const seen: string[] = [];\n for (const clause of query.clauses) {\n if (clause.type === \"field\" && !seen.includes(clause.field)) {\n seen.push(clause.field);\n }\n }\n return seen;\n}\n\n/** The values a field is constrained to, if any — for showing a filter as active. */\nexport function fieldValues(query: Query, field: string): string[] {\n return query.clauses.flatMap((clause) =>\n clause.type === \"field\" && clause.field === field && !clause.negated\n ? clause.values\n : [],\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Cell actions */\n/* ------------------------------------------------------------------ */\n\n/** What a \"filter for / filter out\" control on a value asks for. */\nexport interface QueryCellAction {\n field: string;\n value: string;\n intent: \"include\" | \"exclude\";\n}\n\n/**\n * Fold a cell action into the query.\n *\n * The pair of buttons on a log cell is the fastest path from \"I noticed this\n * value\" to a filtered view, and the reason it works is that the result is a\n * query the reader can then see, edit and share — not a hidden filter stack\n * with its own rules.\n */\nexport function applyCellAction(query: Query, action: QueryCellAction): Query {\n return withFieldValue(query, action.field, action.value, {\n negated: action.intent === \"exclude\",\n });\n}\n","/**\n * Text in, {@link Query} out — and never an exception.\n *\n * A search box is edited one keystroke at a time, so most of the strings this\n * sees are half-written: `path:`, `status>`, `\"unclosed`. A parser that throws\n * on those turns every intermediate state into an error banner, which trains\n * people to type somewhere else and paste. Instead, anything that cannot be\n * read as a clause is kept as a plain term, and the caller is told separately\n * (via {@link parseQueryWithDiagnostics}) if it wants to warn.\n *\n * Written by hand rather than generated. EUI compiles a PEG grammar for the\n * same job, which buys arbitrary nesting we deliberately do not offer, at the\n * cost of a build-time plugin in every consumer.\n */\nimport type {\n Query,\n QueryClause,\n QueryFieldClause,\n QueryOperator,\n} from \"./query-ast\";\n\n/** A part of the input that could not be read as intended. */\nexport interface QueryDiagnostic {\n /** Character offset into the original string. */\n at: number;\n text: string;\n message: string;\n}\n\nexport interface ParsedQuery {\n query: Query;\n diagnostics: QueryDiagnostic[];\n /** The final clause is still being typed — the caller can complete it. */\n trailing: { field: string; operator: QueryOperator; value: string } | null;\n}\n\nconst FIELD_NAME = /^[A-Za-z_][A-Za-z0-9_.-]*$/;\n\ninterface Token {\n text: string;\n at: number;\n /** The token was written inside quotes, so it is a phrase, not syntax. */\n quoted: boolean;\n}\n\n/**\n * Split on whitespace, but keep quoted runs and parenthesised groups whole.\n *\n * An unterminated quote or group swallows the rest of the line rather than\n * erroring: the reader is mid-word, and the alternative is the query flickering\n * between two different meanings as they type the closing character.\n */\nfunction tokenize(input: string): Token[] {\n const tokens: Token[] = [];\n let index = 0;\n\n while (index < input.length) {\n while (index < input.length && /\\s/.test(input[index]!)) index += 1;\n if (index >= input.length) break;\n\n const start = index;\n let text = \"\";\n // Only a token that *opens* with a quote is a phrase. `name:\"a b\"` quotes\n // its value, not the constraint — reading the whole token as a phrase there\n // would turn a field filter into a search for the literal text.\n let quoted = false;\n let atTokenStart = true;\n let depth = 0;\n\n while (index < input.length) {\n const char = input[index]!;\n\n if (char === '\"') {\n if (atTokenStart) quoted = true;\n atTokenStart = false;\n index += 1;\n while (index < input.length && input[index] !== '\"') {\n text += input[index];\n index += 1;\n }\n index += 1; // closing quote, or the end of the input\n continue;\n }\n\n if (char === \"(\") depth += 1;\n if (char === \")\") depth = Math.max(0, depth - 1);\n if (/\\s/.test(char) && depth === 0) break;\n\n atTokenStart = false;\n text += char;\n index += 1;\n }\n\n if (text.length > 0 || quoted) tokens.push({ text, at: start, quoted });\n }\n\n return tokens;\n}\n\n/** `(a or b)` → `[\"a\", \"b\"]`; anything else is a single value. */\nfunction readValues(raw: string): string[] {\n const trimmed = raw.trim();\n if (!trimmed.startsWith(\"(\")) {\n return [stripQuotes(trimmed)];\n }\n const inner = trimmed.replace(/^\\(/, \"\").replace(/\\)$/, \"\");\n return inner\n .split(/\\s+or\\s+/i)\n .map((part) => stripQuotes(part.trim()))\n .filter((part) => part.length > 0);\n}\n\nfunction stripQuotes(value: string): string {\n if (value.length >= 2 && value.startsWith('\"') && value.endsWith('\"')) {\n return value.slice(1, -1);\n }\n return value.replace(/^\"/, \"\");\n}\n\nconst OPERATORS: { symbol: string; operator: QueryOperator }[] = [\n { symbol: \">=\", operator: \"gte\" },\n { symbol: \"<=\", operator: \"lte\" },\n { symbol: \":\", operator: \"eq\" },\n { symbol: \">\", operator: \"gt\" },\n { symbol: \"<\", operator: \"lt\" },\n];\n\n/** Where a field operator starts in the token, or `-1`. */\nfunction findOperator(\n text: string,\n): { index: number; symbol: string; operator: QueryOperator } | null {\n let best: { index: number; symbol: string; operator: QueryOperator } | null =\n null;\n for (const { symbol, operator } of OPERATORS) {\n const index = text.indexOf(symbol);\n if (index <= 0) continue;\n // `>=` must win over the `>` inside it.\n if (\n !best ||\n index < best.index ||\n (index === best.index && symbol.length > best.symbol.length)\n ) {\n best = { index, symbol, operator };\n }\n }\n return best;\n}\n\n/** Parse, keeping whatever could not be understood as a plain term. */\nexport function parseQueryWithDiagnostics(input: string): ParsedQuery {\n const diagnostics: QueryDiagnostic[] = [];\n const clauses: QueryClause[] = [];\n let trailing: ParsedQuery[\"trailing\"] = null;\n\n for (const token of tokenize(input)) {\n let text = token.text;\n let negated = false;\n\n if (!token.quoted && text.startsWith(\"-\") && text.length > 1) {\n negated = true;\n text = text.slice(1);\n }\n\n const operator = token.quoted ? null : findOperator(text);\n if (!operator) {\n if (text.length > 0) clauses.push({ type: \"term\", value: text, negated });\n continue;\n }\n\n const field = text.slice(0, operator.index);\n const rawValue = text.slice(operator.index + operator.symbol.length);\n\n if (!FIELD_NAME.test(field)) {\n // `12:30` is a time, not a field constraint.\n clauses.push({ type: \"term\", value: text, negated });\n continue;\n }\n\n if (rawValue === \"\") {\n // Mid-typing: remember it so the caller can offer completions, but do not\n // constrain anything yet — an empty value would match nothing.\n trailing = { field, operator: operator.operator, value: \"\" };\n continue;\n }\n\n if (rawValue === \"*\" && operator.operator === \"eq\") {\n clauses.push({\n type: \"field\",\n field,\n operator: \"exists\",\n values: [],\n negated,\n });\n continue;\n }\n\n // `path:*checkout*` — the wildcards are the syntax, the middle is the value.\n // Distinct from a bare `*`, which asks whether the field is there at all.\n if (\n operator.operator === \"eq\" &&\n rawValue.length > 2 &&\n rawValue.startsWith(\"*\") &&\n rawValue.endsWith(\"*\")\n ) {\n clauses.push({\n type: \"field\",\n field,\n operator: \"contains\",\n values: [stripQuotes(rawValue.slice(1, -1))],\n negated,\n });\n continue;\n }\n\n const values = readValues(rawValue);\n if (values.length === 0) {\n diagnostics.push({\n at: token.at,\n text: token.text,\n message: \"Empty value group\",\n });\n continue;\n }\n\n if (operator.operator !== \"eq\" && values.length > 1) {\n diagnostics.push({\n at: token.at,\n text: token.text,\n message: \"A comparison takes a single value\",\n });\n }\n\n const clause: QueryFieldClause = {\n type: \"field\",\n field,\n operator: operator.operator,\n values: operator.operator === \"eq\" ? values : values.slice(0, 1),\n negated,\n };\n clauses.push(clause);\n if (!rawValue.startsWith(\"(\")) {\n trailing = { field, operator: operator.operator, value: values[0] ?? \"\" };\n }\n }\n\n return { query: { clauses }, diagnostics, trailing };\n}\n\n/** Parse, discarding diagnostics. */\nexport function parseQuery(input: string): Query {\n return parseQueryWithDiagnostics(input).query;\n}\n","/**\n * {@link Query} back to text, so the box shows what the chips mean.\n *\n * Round-tripping matters more than prettiness: whatever a cell action or a\n * sidebar click adds to the query has to appear in the input as something the\n * reader could have typed themselves, and could edit by hand from there.\n */\nimport type { Query, QueryClause, QueryOperator } from \"./query-ast\";\n\nconst OPERATOR_SYMBOL: Record<QueryOperator, string> = {\n eq: \":\",\n contains: \":\",\n gt: \">\",\n gte: \">=\",\n lt: \"<\",\n lte: \"<=\",\n exists: \":\",\n};\n\n/** Quote a value that would otherwise re-parse as something else. */\nexport function quoteValue(value: string): string {\n return /[\\s\"()]/.test(value) || value === \"\"\n ? `\"${value.replace(/\"/g, \"\")}\"`\n : value;\n}\n\n/** One clause as text. */\nexport function formatClause(clause: QueryClause): string {\n const prefix = clause.negated ? \"-\" : \"\";\n if (clause.type === \"term\") return `${prefix}${quoteValue(clause.value)}`;\n if (clause.operator === \"exists\") return `${prefix}${clause.field}:*`;\n if (clause.operator === \"contains\") {\n return `${prefix}${clause.field}:*${clause.values[0] ?? \"\"}*`;\n }\n\n const symbol = OPERATOR_SYMBOL[clause.operator];\n if (clause.values.length > 1) {\n return `${prefix}${clause.field}${symbol}(${clause.values.map(quoteValue).join(\" or \")})`;\n }\n return `${prefix}${clause.field}${symbol}${quoteValue(clause.values[0] ?? \"\")}`;\n}\n\n/** The whole query as text. */\nexport function formatQuery(query: Query): string {\n return query.clauses.map(formatClause).join(\" \");\n}\n\n/** A short human label for a clause chip. */\nexport function describeClause(clause: QueryClause): string {\n if (clause.type === \"term\") {\n return clause.negated ? `not \"${clause.value}\"` : `\"${clause.value}\"`;\n }\n if (clause.operator === \"exists\") {\n return clause.negated\n ? `${clause.field} missing`\n : `${clause.field} present`;\n }\n if (clause.operator === \"contains\") {\n return `${clause.negated ? \"not \" : \"\"}${clause.field} ⊃ ${clause.values[0] ?? \"\"}`;\n }\n const values = clause.values.join(\", \");\n const symbol = OPERATOR_SYMBOL[clause.operator];\n return `${clause.negated ? \"not \" : \"\"}${clause.field} ${symbol === \":\" ? \"=\" : symbol} ${values}`;\n}\n","/**\n * Run a {@link Query} against rows already in the browser.\n *\n * The server does the real filtering; this exists for the cases where asking it\n * would be worse than answering locally — live rows arriving over a socket that\n * must be held to the same filter as the page they land on, and a preview of\n * what a clause will do before it is committed.\n *\n * Keeping both readings in one module is the point: a query that means one\n * thing in the list and another in the live tail is a bug nobody reports,\n * because each half looks right on its own.\n */\nimport type { Query, QueryClause } from \"./query-ast\";\n\n/** How a row exposes its values. Missing fields return `undefined`. */\nexport type FieldReader = (field: string) => unknown;\n\nfunction toText(value: unknown): string {\n if (value === null || value === undefined) return \"\";\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\" || typeof value === \"boolean\")\n return String(value);\n return JSON.stringify(value);\n}\n\nfunction compare(left: unknown, right: string): number {\n const leftNumber = typeof left === \"number\" ? left : Number(toText(left));\n const rightNumber = Number(right);\n if (Number.isFinite(leftNumber) && Number.isFinite(rightNumber)) {\n return leftNumber - rightNumber;\n }\n return toText(left).localeCompare(right);\n}\n\nfunction matchesClause(\n clause: QueryClause,\n read: FieldReader,\n searchable: () => string,\n): boolean {\n if (clause.type === \"term\") {\n return searchable().toLowerCase().includes(clause.value.toLowerCase());\n }\n\n const value = read(clause.field);\n\n switch (clause.operator) {\n case \"exists\":\n return value !== undefined && value !== null && value !== \"\";\n case \"eq\":\n // Case-insensitive: a log reader typing `path:/Checkout` means the path.\n return clause.values.some(\n (candidate) => toText(value).toLowerCase() === candidate.toLowerCase(),\n );\n case \"contains\":\n return clause.values.some((candidate) =>\n toText(value).toLowerCase().includes(candidate.toLowerCase()),\n );\n case \"gt\":\n return compare(value, clause.values[0] ?? \"\") > 0;\n case \"gte\":\n return compare(value, clause.values[0] ?? \"\") >= 0;\n case \"lt\":\n return compare(value, clause.values[0] ?? \"\") < 0;\n case \"lte\":\n return compare(value, clause.values[0] ?? \"\") <= 0;\n default:\n return true;\n }\n}\n\n/**\n * Whether one row satisfies every clause.\n *\n * `searchable` is lazy because most queries are field constraints, and\n * flattening a row to text for a term match nobody asked for is the expensive\n * part of filtering a live tail.\n */\nexport function matchesQuery(\n query: Query,\n read: FieldReader,\n searchable: () => string,\n): boolean {\n return query.clauses.every((clause) => {\n const matched = matchesClause(clause, read, searchable);\n return clause.negated ? !matched : matched;\n });\n}\n\n/** Convenience for plain objects, including one level of nested properties. */\nexport function matchesQueryObject(\n query: Query,\n row: Record<string, unknown>,\n options: { nested?: string } = {},\n): boolean {\n const nested = options.nested\n ? (row[options.nested] as Record<string, unknown> | undefined)\n : undefined;\n const read: FieldReader = (field) =>\n field in row ? row[field] : nested?.[field];\n let cached: string | null = null;\n const searchable = () => {\n cached ??= [\n ...Object.values(row).filter((value) => typeof value !== \"object\"),\n ...Object.values(nested ?? {}),\n ]\n .map(toText)\n .join(\" \");\n return cached;\n };\n return matchesQuery(query, read, searchable);\n}\n"],"mappings":";AA8DA,MAAa,cAAqB,EAAE,SAAS,CAAC,EAAE;;AAGhD,SAAgB,aAAa,OAA0C;CACrE,OAAO,CAAC,SAAS,MAAM,QAAQ,WAAW;AAC5C;AAMA,SAAS,WAAW,GAAgB,GAAyB;CAC3D,IAAI,EAAE,SAAS,EAAE,MA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AI,SAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IAAS,OAAS;CACvC,IAAI,SAAwB;CAC5B,MAAM,mBAAmB;;EACvB,CAAA,UAAA,YAAA,QAAA,YAAA,KAAA,MAAA,SAAW,CACT,GAAG,OAAO,OAAO,GAAG,CAAC,CAAC,QAAQ,UAAU,OAAO,UAAU,QAAQ,GACjE,GAAG,OAAO,OAAO,WAAA,QAAA,WAAA,KAAA,IAAA,SAAU,CAAC,CAAC,CAC/B,CAAC,CACE,IAAI,MAAM,CAAC,CACX,KAAK,GAAG;EACX,OAAO;CACT;CACA,OAAO,aAAa,OAAO,MAAM,UAAU;AAC7C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Bn as _objectSpread2, Cn as
|
|
2
|
+
import { $t as koBreadcrumbLabels, Bn as _objectSpread2, Cn as OPT_FOCUS, En as OPT_INPUT, In as OPT_TEXT_PRIMARY, Ln as OPT_TEXT_SECONDARY, Pn as OPT_TEXTAREA_SIZE, Qt as Button, Rn as OPT_TEXT_TERTIARY, Un as cn, Vn as _objectWithoutProperties, Yt as Spinner, an as RequiredMark, at as MenuPopover$1, cn as OPT_ANIMATE_DRAWER, ct as MenuTrigger$1, hn as OPT_BORDER, in as FieldMessages, kn as OPT_SURFACE, ln as OPT_ANIMATE_ENTER_EXIT, nt as MenuItem$1, on as getDescribedBy, ot as MenuRoot$1, qt as useInputId, rn as useControlledState, st as MenuSeparator$1, wn as OPT_FOCUS_VISIBLE } from "./pagination-DWbvACuN.js";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { createContext, createElement, forwardRef, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
@@ -9,7 +9,7 @@ import { Group, Panel, Separator as Separator$1 } from "react-resizable-panels";
|
|
|
9
9
|
import { Mesh, Program, Renderer, Triangle } from "ogl";
|
|
10
10
|
import { hexToSrgb } from "@reopt-ai/opt-palette";
|
|
11
11
|
//#region src/core/text.tsx
|
|
12
|
-
const _excluded$
|
|
12
|
+
const _excluded$17 = [
|
|
13
13
|
"as",
|
|
14
14
|
"variant",
|
|
15
15
|
"tone",
|
|
@@ -25,8 +25,9 @@ const toneStyles = {
|
|
|
25
25
|
};
|
|
26
26
|
/** Semantic body text whose visual role is controlled by foundation tokens. */
|
|
27
27
|
function Text(_ref) {
|
|
28
|
-
let { as, variant = "body", tone = "primary", truncate = false, className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
29
|
-
|
|
28
|
+
let { as, variant = "body", tone = "primary", truncate = false, className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$17);
|
|
29
|
+
const Component = as !== null && as !== void 0 ? as : "span";
|
|
30
|
+
const elementProps = _objectSpread2(_objectSpread2({}, props), {}, {
|
|
30
31
|
className: cn(`opt-type-${variant}`, toneStyles[tone], truncate && "truncate", className),
|
|
31
32
|
"data-opt-component": "text",
|
|
32
33
|
"data-opt-part": "root",
|
|
@@ -34,11 +35,12 @@ function Text(_ref) {
|
|
|
34
35
|
"data-opt-slug": "text.Text",
|
|
35
36
|
"data-role": variant,
|
|
36
37
|
"data-tone": tone
|
|
37
|
-
})
|
|
38
|
+
});
|
|
39
|
+
return createElement(Component, elementProps, children);
|
|
38
40
|
}
|
|
39
41
|
//#endregion
|
|
40
42
|
//#region src/core/heading.tsx
|
|
41
|
-
const _excluded$
|
|
43
|
+
const _excluded$16 = [
|
|
42
44
|
"level",
|
|
43
45
|
"variant",
|
|
44
46
|
"className",
|
|
@@ -46,7 +48,7 @@ const _excluded$17 = [
|
|
|
46
48
|
];
|
|
47
49
|
/** Semantic heading with independently selectable visual hierarchy. */
|
|
48
50
|
function Heading(_ref) {
|
|
49
|
-
let { level = 2, variant = `heading-${level}`, className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
51
|
+
let { level = 2, variant = `heading-${level}`, className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$16);
|
|
50
52
|
const Component = {
|
|
51
53
|
1: "h1",
|
|
52
54
|
2: "h2",
|
|
@@ -188,8 +190,6 @@ function OtpField({ length = 6, value: controlledValue, defaultValue = "", onCha
|
|
|
188
190
|
case "ArrowRight":
|
|
189
191
|
e.preventDefault();
|
|
190
192
|
focusCell(index + 1);
|
|
191
|
-
break;
|
|
192
|
-
default: break;
|
|
193
193
|
}
|
|
194
194
|
}, [
|
|
195
195
|
cells,
|
|
@@ -267,7 +267,7 @@ function OtpField({ length = 6, value: controlledValue, defaultValue = "", onCha
|
|
|
267
267
|
OtpField.displayName = "OtpField";
|
|
268
268
|
//#endregion
|
|
269
269
|
//#region src/core/toggle.tsx
|
|
270
|
-
const _excluded$
|
|
270
|
+
const _excluded$15 = [
|
|
271
271
|
"size",
|
|
272
272
|
"className",
|
|
273
273
|
"children"
|
|
@@ -284,7 +284,7 @@ const sizeStyles$5 = {
|
|
|
284
284
|
const toggleBase = cn("inline-flex cursor-pointer items-center justify-center rounded-md border border-border bg-surface font-medium text-text-secondary", "hover:bg-bg-subtle hover:text-text-primary", "data-[pressed]:border-accent data-[pressed]:bg-accent-subtle data-[pressed]:text-accent", "disabled:pointer-events-none disabled:opacity-40", OPT_FOCUS_VISIBLE);
|
|
285
285
|
/** A two-state (pressed) button. Use standalone or inside `ToggleGroup`. */
|
|
286
286
|
function Toggle$1(_ref) {
|
|
287
|
-
let { size = "md", className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
287
|
+
let { size = "md", className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$15);
|
|
288
288
|
return /* @__PURE__ */ jsx(Toggle, _objectSpread2(_objectSpread2({ className: cn(toggleBase, sizeStyles$5[size], className) }, props), {}, {
|
|
289
289
|
"data-opt-id": "GFCMY",
|
|
290
290
|
"data-opt-slug": "toggle.Toggle",
|
|
@@ -308,7 +308,7 @@ function ToggleGroup$1(_ref2) {
|
|
|
308
308
|
ToggleGroup$1.displayName = "ToggleGroup";
|
|
309
309
|
//#endregion
|
|
310
310
|
//#region src/core/accordion.tsx
|
|
311
|
-
const _excluded$
|
|
311
|
+
const _excluded$14 = ["className"];
|
|
312
312
|
const _excluded2$7 = ["className"];
|
|
313
313
|
const _excluded3$4 = ["className", "children"];
|
|
314
314
|
const _excluded4$3 = ["className", "children"];
|
|
@@ -316,7 +316,7 @@ const triggerClass = `group/acc-trigger flex w-full cursor-pointer items-center
|
|
|
316
316
|
const contentClass = `overflow-hidden text-sm text-text-secondary ${OPT_ANIMATE_ENTER_EXIT}`;
|
|
317
317
|
/** A vertically stacked set of expandable panels (single or multiple open). */
|
|
318
318
|
function AccordionRoot$1(_ref) {
|
|
319
|
-
let { className } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
319
|
+
let { className } = _ref, props = _objectWithoutProperties(_ref, _excluded$14);
|
|
320
320
|
return /* @__PURE__ */ jsx("div", {
|
|
321
321
|
className: cn("border-border border-y", className),
|
|
322
322
|
"data-opt-id": "CSBA9",
|
|
@@ -411,7 +411,7 @@ function Breadcrumb({ items, separator = "/", className, onNavigate, "aria-label
|
|
|
411
411
|
}
|
|
412
412
|
//#endregion
|
|
413
413
|
//#region src/core/card.tsx
|
|
414
|
-
const _excluded$
|
|
414
|
+
const _excluded$13 = [
|
|
415
415
|
"variant",
|
|
416
416
|
"padding",
|
|
417
417
|
"shadow",
|
|
@@ -448,7 +448,7 @@ const _excluded6 = [
|
|
|
448
448
|
];
|
|
449
449
|
/** Renders the card component. */
|
|
450
450
|
function Card(_ref) {
|
|
451
|
-
let { variant = "default", padding = "md", shadow = true, selectable = false, selected = false, onSelectedChange, className, children, onClick, onKeyDown, role, tabIndex } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
451
|
+
let { variant = "default", padding = "md", shadow = true, selectable = false, selected = false, onSelectedChange, className, children, onClick, onKeyDown, role, tabIndex } = _ref, props = _objectWithoutProperties(_ref, _excluded$13);
|
|
452
452
|
const isInteractive = selectable || !!onClick;
|
|
453
453
|
const handleClick = selectable ? (e) => {
|
|
454
454
|
onSelectedChange === null || onSelectedChange === void 0 || onSelectedChange(!selected);
|
|
@@ -541,68 +541,6 @@ function CardFooter(_ref6) {
|
|
|
541
541
|
}));
|
|
542
542
|
}
|
|
543
543
|
//#endregion
|
|
544
|
-
//#region src/core/input.tsx
|
|
545
|
-
const _excluded$13 = [
|
|
546
|
-
"label",
|
|
547
|
-
"error",
|
|
548
|
-
"hint",
|
|
549
|
-
"leftIcon",
|
|
550
|
-
"rightIcon",
|
|
551
|
-
"fullWidth",
|
|
552
|
-
"size",
|
|
553
|
-
"required",
|
|
554
|
-
"className",
|
|
555
|
-
"id"
|
|
556
|
-
];
|
|
557
|
-
const inputSizeStyles = OPT_INPUT_SIZE;
|
|
558
|
-
const Input = forwardRef((_ref, ref) => {
|
|
559
|
-
var _useInputId;
|
|
560
|
-
let { label, error, hint, leftIcon, rightIcon, fullWidth = false, size = "md", required, className, id } = _ref, props = _objectWithoutProperties(_ref, _excluded$13);
|
|
561
|
-
const fallbackId = useId().replace(/:/g, "");
|
|
562
|
-
const inputId = (_useInputId = useInputId(id, label, "input")) !== null && _useInputId !== void 0 ? _useInputId : `input-${fallbackId}`;
|
|
563
|
-
const hasError = Boolean(error);
|
|
564
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
565
|
-
className: cn("flex flex-col gap-1.5", fullWidth && "w-full"),
|
|
566
|
-
"data-opt-id": "7BY1Q",
|
|
567
|
-
"data-opt-slug": "input.Input",
|
|
568
|
-
children: [
|
|
569
|
-
label && /* @__PURE__ */ jsxs("label", {
|
|
570
|
-
htmlFor: inputId,
|
|
571
|
-
className: "text-text-primary text-sm font-medium",
|
|
572
|
-
children: [label, required && /* @__PURE__ */ jsx(RequiredMark, {})]
|
|
573
|
-
}),
|
|
574
|
-
/* @__PURE__ */ jsxs("div", {
|
|
575
|
-
className: "relative",
|
|
576
|
-
children: [
|
|
577
|
-
leftIcon && /* @__PURE__ */ jsx("div", {
|
|
578
|
-
className: "text-text-tertiary pointer-events-none absolute top-1/2 left-3 -translate-y-1/2",
|
|
579
|
-
children: leftIcon
|
|
580
|
-
}),
|
|
581
|
-
/* @__PURE__ */ jsx("input", _objectSpread2({
|
|
582
|
-
ref,
|
|
583
|
-
id: inputId,
|
|
584
|
-
className: cn(OPT_INPUT, inputSizeStyles[size], leftIcon && (size === "sm" ? "pl-8" : "pl-10"), rightIcon && (size === "sm" ? "pr-8" : "pr-10"), hasError && "border-danger focus-visible:outline-danger", !fullWidth && "w-auto", className),
|
|
585
|
-
"aria-invalid": hasError,
|
|
586
|
-
"aria-required": required,
|
|
587
|
-
"aria-describedby": getDescribedBy(inputId, error, hint),
|
|
588
|
-
required
|
|
589
|
-
}, props)),
|
|
590
|
-
rightIcon && /* @__PURE__ */ jsx("div", {
|
|
591
|
-
className: "text-text-tertiary pointer-events-none absolute top-1/2 right-3 -translate-y-1/2",
|
|
592
|
-
children: rightIcon
|
|
593
|
-
})
|
|
594
|
-
]
|
|
595
|
-
}),
|
|
596
|
-
/* @__PURE__ */ jsx(FieldMessages, {
|
|
597
|
-
id: inputId,
|
|
598
|
-
error,
|
|
599
|
-
hint
|
|
600
|
-
})
|
|
601
|
-
]
|
|
602
|
-
});
|
|
603
|
-
});
|
|
604
|
-
Input.displayName = "Input";
|
|
605
|
-
//#endregion
|
|
606
544
|
//#region src/core/switch.tsx
|
|
607
545
|
const _excluded$12 = [
|
|
608
546
|
"label",
|
|
@@ -1427,7 +1365,7 @@ StepBuilder.displayName = "StepBuilder";
|
|
|
1427
1365
|
//#endregion
|
|
1428
1366
|
//#region src/lib/formatters.ts
|
|
1429
1367
|
const OPT_UI_DEFAULT_LOCALE = "ko-KR";
|
|
1430
|
-
const KST_OFFSET_MS =
|
|
1368
|
+
const KST_OFFSET_MS = 324e5;
|
|
1431
1369
|
function getKstDateParts(input) {
|
|
1432
1370
|
const date = input instanceof Date ? input : new Date(input);
|
|
1433
1371
|
if (Number.isNaN(date.getTime())) return null;
|
|
@@ -1987,11 +1925,11 @@ const _excluded$4 = [
|
|
|
1987
1925
|
];
|
|
1988
1926
|
/** Renders the loading overlay component. */
|
|
1989
1927
|
function LoadingOverlay(_ref) {
|
|
1990
|
-
let { loading, children, label = "Loading…", className } = _ref;
|
|
1928
|
+
let { loading, children, label = "Loading…", className } = _ref, props = _objectWithoutProperties(_ref, _excluded$4);
|
|
1991
1929
|
return /* @__PURE__ */ jsxs("div", _objectSpread2(_objectSpread2({
|
|
1992
1930
|
"data-opt-id": "380ZR",
|
|
1993
1931
|
"data-opt-slug": "loading-overlay.LoadingOverlay"
|
|
1994
|
-
},
|
|
1932
|
+
}, props), {}, {
|
|
1995
1933
|
className: cn("relative", className),
|
|
1996
1934
|
children: [children, loading && /* @__PURE__ */ jsx("div", {
|
|
1997
1935
|
className: "bg-surface/60 absolute inset-0 z-10 flex items-center justify-center rounded-lg backdrop-blur-[1px]",
|
|
@@ -2069,9 +2007,10 @@ const _excluded$2 = ["loading", "className"];
|
|
|
2069
2007
|
function createBlock(name, render, options) {
|
|
2070
2008
|
const Component = (props) => {
|
|
2071
2009
|
const { loading, className } = props, rest = _objectWithoutProperties(props, _excluded$2);
|
|
2010
|
+
const layoutCn = (options === null || options === void 0 ? void 0 : options.layoutClassName) ? `${options.layoutClassName}${className ? ` ${className}` : ""}` : className;
|
|
2072
2011
|
return /* @__PURE__ */ jsx(BlockLayout, {
|
|
2073
2012
|
loading,
|
|
2074
|
-
className:
|
|
2013
|
+
className: layoutCn,
|
|
2075
2014
|
children: render(rest)
|
|
2076
2015
|
});
|
|
2077
2016
|
};
|
|
@@ -3710,6 +3649,6 @@ const ShaderSurfaceComponent = forwardRef(function ShaderSurface({ preset, color
|
|
|
3710
3649
|
ShaderSurfaceComponent.displayName = "ShaderSurface";
|
|
3711
3650
|
const ShaderSurface = ShaderSurfaceComponent;
|
|
3712
3651
|
//#endregion
|
|
3713
|
-
export {
|
|
3652
|
+
export { CardHeader as $, DropdownTrigger as A, Avatar as B, LoadingOverlay as C, DropdownItem as D, DropdownContent as E, formatOptTime as F, SkeletonCard as G, Textarea as H, StepBuilder as I, Switch as J, SkeletonTable as K, Meter$1 as L, formatOptDateTime as M, formatOptNumber as N, DropdownMenu as O, formatOptShortDate as P, CardFooter as Q, CircularProgress as R, BlockLayout as S, RadioGroup as T, Skeleton as U, AvatarGroup as V, SkeletonAvatar as W, CardContent as X, Card as Y, CardDescription as Z, Section as _, SHADER_PRESETS as a, AccordionTrigger$1 as at, PageHeader as b, getShaderPreset as c, OtpField as ct, DrawerPanel as d, Text as dt, CardTitle as et, DrawerRoot as f, ResizablePanelGroup as g, ResizablePanel as h, SHADER_PARAM_KEYS as i, AccordionRoot$1 as it, ConditionBuilder as j, DropdownSeparator as k, VirtualList as l, Separator$2 as lt, ResizableHandle as m, SHADER_OVERLAY_PARAM_KEYS as n, AccordionContent$1 as nt, SHADER_PRESET_IDS as o, Toggle$1 as ot, Logo as p, SkeletonText as q, SHADER_PARAM_FALLBACK as r, AccordionItem$1 as rt, getShaderFragment as s, ToggleGroup$1 as st, ShaderSurface as t, Breadcrumb as tt, DrawerClose as u, Heading as ut, Container as v, Radio as w, createBlock as x, ScrollArea as y, Progress as z };
|
|
3714
3653
|
|
|
3715
|
-
//# sourceMappingURL=shader-surface-
|
|
3654
|
+
//# sourceMappingURL=shader-surface-BUPZ0P-n.js.map
|