@uipath/apollo-wind 2.20.1 → 2.22.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.
@@ -27,18 +27,19 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  MetadataForm: ()=>MetadataForm
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const standard_schema_namespaceObject = require("@hookform/resolvers/standard-schema");
30
31
  const external_react_namespaceObject = require("react");
31
32
  const external_react_hook_form_namespaceObject = require("react-hook-form");
32
33
  const v4_namespaceObject = require("zod/v4");
33
34
  const accordion_cjs_namespaceObject = require("../ui/accordion.cjs");
34
35
  const button_cjs_namespaceObject = require("../ui/button.cjs");
35
- const standard_schema_namespaceObject = require("@hookform/resolvers/standard-schema");
36
+ const tabs_cjs_namespaceObject = require("../ui/tabs.cjs");
36
37
  const external_data_fetcher_cjs_namespaceObject = require("./data-fetcher.cjs");
37
38
  const external_field_renderer_cjs_namespaceObject = require("./field-renderer.cjs");
38
39
  const external_rules_engine_cjs_namespaceObject = require("./rules-engine.cjs");
39
40
  const external_validation_converter_cjs_namespaceObject = require("./validation-converter.cjs");
40
41
  const DEFAULT_PLUGINS = [];
41
- function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete }) {
42
+ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard' }) {
42
43
  const [currentStep, setCurrentStep] = (0, external_react_namespaceObject.useState)(0);
43
44
  const [customComponents, setCustomComponents] = (0, external_react_namespaceObject.useState)({});
44
45
  const [isInitialized, setIsInitialized] = (0, external_react_namespaceObject.useState)(false);
@@ -124,14 +125,23 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
124
125
  if (onSubmit) await onSubmit(finalData);
125
126
  });
126
127
  const renderContent = ()=>{
127
- if (schema.steps) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(MultiStepForm, {
128
- schema: schema,
129
- context: context,
130
- currentStep: currentStep,
131
- setCurrentStep: setCurrentStep,
132
- customComponents: customComponents,
133
- disabled: disabled
134
- });
128
+ if (schema.steps) {
129
+ if ('tabs' === stepVariant) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabbedStepForm, {
130
+ schema: schema,
131
+ context: context,
132
+ customComponents: customComponents,
133
+ disabled: disabled,
134
+ onReset: ()=>reset()
135
+ });
136
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(MultiStepForm, {
137
+ schema: schema,
138
+ context: context,
139
+ currentStep: currentStep,
140
+ setCurrentStep: setCurrentStep,
141
+ customComponents: customComponents,
142
+ disabled: disabled
143
+ });
144
+ }
135
145
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SinglePageForm, {
136
146
  schema: schema,
137
147
  context: context,
@@ -240,6 +250,53 @@ function MultiStepForm({ schema, context, currentStep, setCurrentStep, customCom
240
250
  ]
241
251
  });
242
252
  }
253
+ function TabbedStepForm({ schema, context, customComponents, disabled, onReset }) {
254
+ const steps = schema.steps || [];
255
+ const visibleSteps = steps.filter((step)=>step.sections.length > 0 && (!step.conditions || context.evaluateConditions(step.conditions)));
256
+ const [activeTab, setActiveTab] = (0, external_react_namespaceObject.useState)('');
257
+ const currentTab = visibleSteps.some((step)=>step.id === activeTab) ? activeTab : visibleSteps[0]?.id ?? '';
258
+ (0, external_react_namespaceObject.useEffect)(()=>{
259
+ if (activeTab !== currentTab) setActiveTab(currentTab);
260
+ }, [
261
+ activeTab,
262
+ currentTab
263
+ ]);
264
+ if (0 === visibleSteps.length) return null;
265
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
266
+ children: [
267
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(tabs_cjs_namespaceObject.Tabs, {
268
+ value: currentTab,
269
+ onValueChange: setActiveTab,
270
+ className: "flex flex-col gap-4",
271
+ children: [
272
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsList, {
273
+ className: "h-auto justify-start gap-4 overflow-x-auto rounded-none border-b border-border bg-transparent py-0 text-muted-foreground [-ms-overflow-style:none] [margin-inline:calc(var(--mf-content-inset,0px)*-1)] [padding-inline:var(--mf-content-inset,0px)] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
274
+ children: visibleSteps.map((step)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsTrigger, {
275
+ value: step.id,
276
+ className: "-mb-px shrink-0 whitespace-nowrap rounded-none border-b-2 border-transparent bg-transparent px-1 pb-2 pt-1 font-medium text-muted-foreground shadow-none transition-colors hover:text-foreground data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",
277
+ children: step.title
278
+ }, step.id))
279
+ }),
280
+ visibleSteps.map((step)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(tabs_cjs_namespaceObject.TabsContent, {
281
+ value: step.id,
282
+ className: "space-y-2",
283
+ children: step.sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions)).map((section)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormSection, {
284
+ section: section,
285
+ context: context,
286
+ customComponents: customComponents,
287
+ disabled: disabled
288
+ }, section.id))
289
+ }, step.id))
290
+ ]
291
+ }),
292
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormActions, {
293
+ schema: schema,
294
+ context: context,
295
+ onReset: onReset
296
+ })
297
+ ]
298
+ });
299
+ }
243
300
  function FormSection({ section, context, customComponents, disabled }) {
244
301
  const gridColumns = context.schema.layout?.columns || 1;
245
302
  const gap = context.schema.layout?.gap || 4;
@@ -11,6 +11,13 @@ interface MetadataFormProps {
11
11
  disabled?: boolean;
12
12
  /** Disable browser autocomplete suggestions. Defaults to undefined (browser default). */
13
13
  autoComplete?: 'off' | 'on';
14
+ /**
15
+ * Presentation for multi-step schemas. `'wizard'` (default) shows Previous/Next
16
+ * navigation with a Submit button on the final step. `'tabs'` renders the steps
17
+ * as a tab bar over a single form instance, so values and validation are shared
18
+ * across every step. Ignored for single-page (`sections`) schemas.
19
+ */
20
+ stepVariant?: 'wizard' | 'tabs';
14
21
  }
15
- export declare function MetadataForm({ schema, plugins, onSubmit, className, disabled, autoComplete, }: MetadataFormProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function MetadataForm({ schema, plugins, onSubmit, className, disabled, autoComplete, stepVariant, }: MetadataFormProps): import("react/jsx-runtime").JSX.Element;
16
23
  export {};
@@ -1,16 +1,17 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
2
3
  import { useEffect, useMemo, useRef, useState } from "react";
3
4
  import { FormProvider, useForm } from "react-hook-form";
4
5
  import { z } from "zod/v4";
5
6
  import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../ui/accordion.js";
6
7
  import { Button } from "../ui/button.js";
7
- import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
8
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs.js";
8
9
  import { DataFetcher } from "./data-fetcher.js";
9
10
  import { FormFieldRenderer } from "./field-renderer.js";
10
11
  import { RulesEngine } from "./rules-engine.js";
11
12
  import { validationConfigToZod } from "./validation-converter.js";
12
13
  const DEFAULT_PLUGINS = [];
13
- function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete }) {
14
+ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className, disabled = false, autoComplete, stepVariant = 'wizard' }) {
14
15
  const [currentStep, setCurrentStep] = useState(0);
15
16
  const [customComponents, setCustomComponents] = useState({});
16
17
  const [isInitialized, setIsInitialized] = useState(false);
@@ -96,14 +97,23 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
96
97
  if (onSubmit) await onSubmit(finalData);
97
98
  });
98
99
  const renderContent = ()=>{
99
- if (schema.steps) return /*#__PURE__*/ jsx(MultiStepForm, {
100
- schema: schema,
101
- context: context,
102
- currentStep: currentStep,
103
- setCurrentStep: setCurrentStep,
104
- customComponents: customComponents,
105
- disabled: disabled
106
- });
100
+ if (schema.steps) {
101
+ if ('tabs' === stepVariant) return /*#__PURE__*/ jsx(TabbedStepForm, {
102
+ schema: schema,
103
+ context: context,
104
+ customComponents: customComponents,
105
+ disabled: disabled,
106
+ onReset: ()=>reset()
107
+ });
108
+ return /*#__PURE__*/ jsx(MultiStepForm, {
109
+ schema: schema,
110
+ context: context,
111
+ currentStep: currentStep,
112
+ setCurrentStep: setCurrentStep,
113
+ customComponents: customComponents,
114
+ disabled: disabled
115
+ });
116
+ }
107
117
  return /*#__PURE__*/ jsx(SinglePageForm, {
108
118
  schema: schema,
109
119
  context: context,
@@ -212,6 +222,53 @@ function MultiStepForm({ schema, context, currentStep, setCurrentStep, customCom
212
222
  ]
213
223
  });
214
224
  }
225
+ function TabbedStepForm({ schema, context, customComponents, disabled, onReset }) {
226
+ const steps = schema.steps || [];
227
+ const visibleSteps = steps.filter((step)=>step.sections.length > 0 && (!step.conditions || context.evaluateConditions(step.conditions)));
228
+ const [activeTab, setActiveTab] = useState('');
229
+ const currentTab = visibleSteps.some((step)=>step.id === activeTab) ? activeTab : visibleSteps[0]?.id ?? '';
230
+ useEffect(()=>{
231
+ if (activeTab !== currentTab) setActiveTab(currentTab);
232
+ }, [
233
+ activeTab,
234
+ currentTab
235
+ ]);
236
+ if (0 === visibleSteps.length) return null;
237
+ return /*#__PURE__*/ jsxs(Fragment, {
238
+ children: [
239
+ /*#__PURE__*/ jsxs(Tabs, {
240
+ value: currentTab,
241
+ onValueChange: setActiveTab,
242
+ className: "flex flex-col gap-4",
243
+ children: [
244
+ /*#__PURE__*/ jsx(TabsList, {
245
+ className: "h-auto justify-start gap-4 overflow-x-auto rounded-none border-b border-border bg-transparent py-0 text-muted-foreground [-ms-overflow-style:none] [margin-inline:calc(var(--mf-content-inset,0px)*-1)] [padding-inline:var(--mf-content-inset,0px)] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
246
+ children: visibleSteps.map((step)=>/*#__PURE__*/ jsx(TabsTrigger, {
247
+ value: step.id,
248
+ className: "-mb-px shrink-0 whitespace-nowrap rounded-none border-b-2 border-transparent bg-transparent px-1 pb-2 pt-1 font-medium text-muted-foreground shadow-none transition-colors hover:text-foreground data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",
249
+ children: step.title
250
+ }, step.id))
251
+ }),
252
+ visibleSteps.map((step)=>/*#__PURE__*/ jsx(TabsContent, {
253
+ value: step.id,
254
+ className: "space-y-2",
255
+ children: step.sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions)).map((section)=>/*#__PURE__*/ jsx(FormSection, {
256
+ section: section,
257
+ context: context,
258
+ customComponents: customComponents,
259
+ disabled: disabled
260
+ }, section.id))
261
+ }, step.id))
262
+ ]
263
+ }),
264
+ /*#__PURE__*/ jsx(FormActions, {
265
+ schema: schema,
266
+ context: context,
267
+ onReset: onReset
268
+ })
269
+ ]
270
+ });
271
+ }
215
272
  function FormSection({ section, context, customComponents, disabled }) {
216
273
  const gridColumns = context.schema.layout?.columns || 1;
217
274
  const gap = context.schema.layout?.gap || 4;
@@ -27,13 +27,13 @@ var __webpack_modules__ = {
27
27
  "@/components/ui/button" (module) {
28
28
  module.exports = require("./button.cjs");
29
29
  },
30
- "@/components/ui/calendar" (module) {
30
+ "./calendar" (module) {
31
31
  module.exports = require("./calendar.cjs");
32
32
  },
33
- "./card" (module) {
33
+ "@/components/ui/card" (module) {
34
34
  module.exports = require("./card.cjs");
35
35
  },
36
- "@/components/ui/checkbox" (module) {
36
+ "./checkbox" (module) {
37
37
  module.exports = require("./checkbox.cjs");
38
38
  },
39
39
  "./collapsible" (module) {
@@ -57,7 +57,7 @@ var __webpack_modules__ = {
57
57
  "./datetime-picker" (module) {
58
58
  module.exports = require("./datetime-picker.cjs");
59
59
  },
60
- "@/components/ui/dialog" (module) {
60
+ "./dialog" (module) {
61
61
  module.exports = require("./dialog.cjs");
62
62
  },
63
63
  "./dropdown-menu" (module) {
@@ -75,7 +75,7 @@ var __webpack_modules__ = {
75
75
  "./hover-card" (module) {
76
76
  module.exports = require("./hover-card.cjs");
77
77
  },
78
- "./input" (module) {
78
+ "@/components/ui/input" (module) {
79
79
  module.exports = require("./input.cjs");
80
80
  },
81
81
  "./label" (module) {
@@ -269,21 +269,21 @@ var __webpack_exports__ = {};
269
269
  "default"
270
270
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_button_group__rspack_import_8[__rspack_import_key];
271
271
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
272
- var _calendar__rspack_import_9 = __webpack_require__("@/components/ui/calendar");
272
+ var _calendar__rspack_import_9 = __webpack_require__("./calendar");
273
273
  var __rspack_reexport = {};
274
274
  for(const __rspack_import_key in _calendar__rspack_import_9)if ([
275
275
  "TreeView",
276
276
  "default"
277
277
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_calendar__rspack_import_9[__rspack_import_key];
278
278
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
279
- var _card__rspack_import_10 = __webpack_require__("./card");
279
+ var _card__rspack_import_10 = __webpack_require__("@/components/ui/card");
280
280
  var __rspack_reexport = {};
281
281
  for(const __rspack_import_key in _card__rspack_import_10)if ([
282
282
  "TreeView",
283
283
  "default"
284
284
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_card__rspack_import_10[__rspack_import_key];
285
285
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
286
- var _checkbox__rspack_import_11 = __webpack_require__("@/components/ui/checkbox");
286
+ var _checkbox__rspack_import_11 = __webpack_require__("./checkbox");
287
287
  var __rspack_reexport = {};
288
288
  for(const __rspack_import_key in _checkbox__rspack_import_11)if ([
289
289
  "TreeView",
@@ -339,7 +339,7 @@ var __webpack_exports__ = {};
339
339
  "default"
340
340
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_datetime_picker__rspack_import_18[__rspack_import_key];
341
341
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
342
- var _dialog__rspack_import_19 = __webpack_require__("@/components/ui/dialog");
342
+ var _dialog__rspack_import_19 = __webpack_require__("./dialog");
343
343
  var __rspack_reexport = {};
344
344
  for(const __rspack_import_key in _dialog__rspack_import_19)if ([
345
345
  "TreeView",
@@ -381,7 +381,7 @@ var __webpack_exports__ = {};
381
381
  "default"
382
382
  ].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_hover_card__rspack_import_24[__rspack_import_key];
383
383
  __webpack_require__.d(__webpack_exports__, __rspack_reexport);
384
- var _input__rspack_import_25 = __webpack_require__("./input");
384
+ var _input__rspack_import_25 = __webpack_require__("@/components/ui/input");
385
385
  var __rspack_reexport = {};
386
386
  for(const __rspack_import_key in _input__rspack_import_25)if ([
387
387
  "TreeView",
@@ -0,0 +1,194 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ apolloCoreDarkCodeMirror: ()=>apolloCoreDarkCodeMirror,
28
+ apolloCoreDarkHCCodeMirror: ()=>apolloCoreDarkHCCodeMirror,
29
+ apolloCoreLightCodeMirror: ()=>apolloCoreLightCodeMirror,
30
+ apolloCoreLightHCCodeMirror: ()=>apolloCoreLightHCCodeMirror,
31
+ apolloFutureDarkCodeMirror: ()=>apolloFutureDarkCodeMirror,
32
+ apolloFutureLightCodeMirror: ()=>apolloFutureLightCodeMirror
33
+ });
34
+ const apolloFutureDarkCodeMirror = {
35
+ syntax: {
36
+ rest: '#a1a1aa',
37
+ comment: '#52525b',
38
+ punctuation: '#71717a',
39
+ keyword: '#22d3ee',
40
+ string: '#34d399',
41
+ number: '#fbbf24',
42
+ literal: '#a78bfa',
43
+ operator: '#22d3ee',
44
+ meta: '#71717a'
45
+ },
46
+ ui: {
47
+ background: '#18181b',
48
+ foreground: '#a1a1aa',
49
+ cursor: '#22d3ee',
50
+ selection: '#3f3f4666',
51
+ lineHighlight: '#27272a80',
52
+ lineNumber: '#52525b',
53
+ lineNumberActive: '#a1a1aa',
54
+ indentGuide: '#3f3f46',
55
+ matchingBracket: '#22d3ee'
56
+ }
57
+ };
58
+ const apolloFutureLightCodeMirror = {
59
+ syntax: {
60
+ rest: '#52525b',
61
+ comment: '#a1a1aa',
62
+ punctuation: '#71717a',
63
+ keyword: '#0e7490',
64
+ string: '#047857',
65
+ number: '#b45309',
66
+ literal: '#7c3aed',
67
+ operator: '#0e7490',
68
+ meta: '#71717a'
69
+ },
70
+ ui: {
71
+ background: '#f4f4f5',
72
+ foreground: '#52525b',
73
+ cursor: '#0891b2',
74
+ selection: '#d4d4d866',
75
+ lineHighlight: '#e4e4e780',
76
+ lineNumber: '#a1a1aa',
77
+ lineNumberActive: '#71717a',
78
+ indentGuide: '#d4d4d8',
79
+ matchingBracket: '#0891b2'
80
+ }
81
+ };
82
+ const apolloCoreDarkCodeMirror = {
83
+ syntax: {
84
+ rest: '#cfd8dd',
85
+ comment: '#526069',
86
+ punctuation: '#8a97a0',
87
+ keyword: '#66adff',
88
+ string: '#f25a8c',
89
+ number: '#6ecdb6',
90
+ literal: '#dc80db',
91
+ operator: '#66adff',
92
+ meta: '#8a97a0'
93
+ },
94
+ ui: {
95
+ background: '#182027',
96
+ foreground: '#cfd8dd',
97
+ cursor: '#66adff',
98
+ selection: '#37465266',
99
+ lineHighlight: '#27313980',
100
+ lineNumber: '#526069',
101
+ lineNumberActive: '#8a97a0',
102
+ indentGuide: '#374652',
103
+ matchingBracket: '#66adff'
104
+ }
105
+ };
106
+ const apolloCoreLightCodeMirror = {
107
+ syntax: {
108
+ rest: '#526069',
109
+ comment: '#a4b1b8',
110
+ punctuation: '#6b7882',
111
+ keyword: '#0067df',
112
+ string: '#d91153',
113
+ number: '#1e7f5a',
114
+ literal: '#b748b6',
115
+ operator: '#0067df',
116
+ meta: '#6b7882'
117
+ },
118
+ ui: {
119
+ background: '#ffffff',
120
+ foreground: '#526069',
121
+ cursor: '#0067df',
122
+ selection: '#e9f1fa',
123
+ lineHighlight: '#f4f5f780',
124
+ lineNumber: '#a4b1b8',
125
+ lineNumberActive: '#6b7882',
126
+ indentGuide: '#cfd8dd',
127
+ matchingBracket: '#0067df'
128
+ }
129
+ };
130
+ const apolloCoreDarkHCCodeMirror = {
131
+ syntax: {
132
+ rest: '#cfd8dd',
133
+ comment: '#526069',
134
+ punctuation: '#8a97a0',
135
+ keyword: '#badaff',
136
+ string: '#fd7da7',
137
+ number: '#6ecdb6',
138
+ literal: '#dc80db',
139
+ operator: '#badaff',
140
+ meta: '#8a97a0'
141
+ },
142
+ ui: {
143
+ background: '#182027',
144
+ foreground: '#cfd8dd',
145
+ cursor: '#badaff',
146
+ selection: '#37465266',
147
+ lineHighlight: '#27313980',
148
+ lineNumber: '#526069',
149
+ lineNumberActive: '#bbc7cd',
150
+ indentGuide: '#374652',
151
+ matchingBracket: '#badaff'
152
+ }
153
+ };
154
+ const apolloCoreLightHCCodeMirror = {
155
+ syntax: {
156
+ rest: '#374652',
157
+ comment: '#8a97a0',
158
+ punctuation: '#526069',
159
+ keyword: '#00489d',
160
+ string: '#a60e3f',
161
+ number: '#176245',
162
+ literal: '#8c338b',
163
+ operator: '#00489d',
164
+ meta: '#526069'
165
+ },
166
+ ui: {
167
+ background: '#ffffff',
168
+ foreground: '#374652',
169
+ cursor: '#00489d',
170
+ selection: '#e9f1fa',
171
+ lineHighlight: '#f4f5f780',
172
+ lineNumber: '#8a97a0',
173
+ lineNumberActive: '#526069',
174
+ indentGuide: '#cfd8dd',
175
+ matchingBracket: '#00489d'
176
+ }
177
+ };
178
+ exports.apolloCoreDarkCodeMirror = __webpack_exports__.apolloCoreDarkCodeMirror;
179
+ exports.apolloCoreDarkHCCodeMirror = __webpack_exports__.apolloCoreDarkHCCodeMirror;
180
+ exports.apolloCoreLightCodeMirror = __webpack_exports__.apolloCoreLightCodeMirror;
181
+ exports.apolloCoreLightHCCodeMirror = __webpack_exports__.apolloCoreLightHCCodeMirror;
182
+ exports.apolloFutureDarkCodeMirror = __webpack_exports__.apolloFutureDarkCodeMirror;
183
+ exports.apolloFutureLightCodeMirror = __webpack_exports__.apolloFutureLightCodeMirror;
184
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
185
+ "apolloCoreDarkCodeMirror",
186
+ "apolloCoreDarkHCCodeMirror",
187
+ "apolloCoreLightCodeMirror",
188
+ "apolloCoreLightHCCodeMirror",
189
+ "apolloFutureDarkCodeMirror",
190
+ "apolloFutureLightCodeMirror"
191
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
192
+ Object.defineProperty(exports, '__esModule', {
193
+ value: true
194
+ });
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Apollo CodeMirror v6 Theme Tokens — Future, Core, and Core HC variants.
3
+ *
4
+ * Plain color/style data objects for building CodeMirror v6 extensions.
5
+ * This file has NO imports from `@codemirror/*` — consumers wire these
6
+ * values into their own CodeMirror setup.
7
+ *
8
+ * -------------------------------------------------------------------------
9
+ * Usage Example
10
+ * -------------------------------------------------------------------------
11
+ *
12
+ * ```ts
13
+ * import { EditorView } from '@codemirror/view';
14
+ * import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
15
+ * import { tags as t } from '@lezer/highlight';
16
+ * import { apolloFutureDarkCodeMirror } from '@uipath/apollo-wind/editor-themes';
17
+ *
18
+ * const { syntax, ui } = apolloFutureDarkCodeMirror;
19
+ *
20
+ * // 1. Base editor theme (cursor, selection, gutter, etc.)
21
+ * const apolloFutureDarkTheme = EditorView.theme(
22
+ * {
23
+ * '&': {
24
+ * backgroundColor: ui.background,
25
+ * color: ui.foreground,
26
+ * },
27
+ * '.cm-cursor': { borderLeftColor: ui.cursor },
28
+ * '&.cm-focused .cm-selectionBackground, .cm-selectionBackground': {
29
+ * backgroundColor: ui.selection,
30
+ * },
31
+ * '.cm-activeLine': { backgroundColor: ui.lineHighlight },
32
+ * '.cm-gutters': {
33
+ * backgroundColor: ui.background,
34
+ * borderRight: 'none',
35
+ * },
36
+ * '.cm-lineNumbers .cm-gutterElement': { color: ui.lineNumber },
37
+ * '.cm-activeLineGutter': { color: ui.lineNumberActive },
38
+ * '.cm-indentationMark': { borderLeft: `1px solid ${ui.indentGuide}` },
39
+ * '.cm-matchingBracket': { outline: `1px solid ${ui.matchingBracket}` },
40
+ * },
41
+ * { dark: true },
42
+ * );
43
+ *
44
+ * // 2. Syntax highlight style
45
+ * const apolloFutureDarkHighlight = HighlightStyle.define([
46
+ * { tag: t.comment, color: syntax.comment, fontStyle: 'italic' },
47
+ * { tag: t.punctuation, color: syntax.punctuation },
48
+ * { tag: [t.keyword, t.operator], color: syntax.keyword },
49
+ * { tag: [t.string, t.regexp], color: syntax.string },
50
+ * { tag: [t.number, t.integer], color: syntax.number },
51
+ * { tag: [t.bool, t.null, t.className, t.typeName], color: syntax.literal },
52
+ * { tag: [t.propertyName, t.attributeName], color: syntax.keyword },
53
+ * { tag: t.meta, color: syntax.meta },
54
+ * { tag: t.name, color: syntax.rest },
55
+ * ]);
56
+ *
57
+ * // 3. Combine into a single extension array
58
+ * export const apolloFutureDark = [
59
+ * apolloFutureDarkTheme,
60
+ * syntaxHighlighting(apolloFutureDarkHighlight),
61
+ * ];
62
+ * ```
63
+ *
64
+ * Swap `apolloFutureDarkCodeMirror` for `apolloFutureLightCodeMirror` and
65
+ * pass `{ dark: false }` to `EditorView.theme` to get the light variant.
66
+ */
67
+ export interface CodeMirrorSyntaxTokens {
68
+ /** Default text — unclassified identifiers, names */
69
+ rest: string;
70
+ /** Source comments */
71
+ comment: string;
72
+ /** Punctuation — brackets, delimiters, operators */
73
+ punctuation: string;
74
+ /** Language keywords (`if`, `return`, `const`, …) */
75
+ keyword: string;
76
+ /** String and template literals */
77
+ string: string;
78
+ /** Numeric literals */
79
+ number: string;
80
+ /** Booleans, `null`, `undefined`, class names, type names */
81
+ literal: string;
82
+ /** Operator symbols (`+`, `=>`, `&&`, …) — shares keyword color */
83
+ operator: string;
84
+ /** Directives, annotations, preprocessor meta */
85
+ meta: string;
86
+ }
87
+ export interface CodeMirrorUiTokens {
88
+ /** Editor panel background */
89
+ background: string;
90
+ /** Default text color */
91
+ foreground: string;
92
+ /** Text-insertion cursor */
93
+ cursor: string;
94
+ /** Selection highlight (semi-transparent) */
95
+ selection: string;
96
+ /** Active line background (semi-transparent) */
97
+ lineHighlight: string;
98
+ /** Gutter line number color */
99
+ lineNumber: string;
100
+ /** Gutter line number color for the active line */
101
+ lineNumberActive: string;
102
+ /** Indentation guide line color */
103
+ indentGuide: string;
104
+ /** Matching bracket outline */
105
+ matchingBracket: string;
106
+ }
107
+ export interface ApolloCodeMirrorTheme {
108
+ syntax: CodeMirrorSyntaxTokens;
109
+ ui: CodeMirrorUiTokens;
110
+ }
111
+ /**
112
+ * Apollo Future dark theme tokens for CodeMirror v6.
113
+ *
114
+ * Base palette: zinc-900 surfaces, cyan accent, muted zinc foregrounds.
115
+ * Syntax colors follow the `--code-*` custom properties from the design system.
116
+ */
117
+ export declare const apolloFutureDarkCodeMirror: ApolloCodeMirrorTheme;
118
+ /**
119
+ * Apollo Future light theme tokens for CodeMirror v6.
120
+ *
121
+ * Base palette: zinc-100 surfaces, cyan-700 accent, muted zinc foregrounds.
122
+ * Syntax colors follow the `--code-*` custom properties from the design system.
123
+ */
124
+ export declare const apolloFutureLightCodeMirror: ApolloCodeMirrorTheme;
125
+ export declare const apolloCoreDarkCodeMirror: ApolloCodeMirrorTheme;
126
+ export declare const apolloCoreLightCodeMirror: ApolloCodeMirrorTheme;
127
+ export declare const apolloCoreDarkHCCodeMirror: ApolloCodeMirrorTheme;
128
+ export declare const apolloCoreLightHCCodeMirror: ApolloCodeMirrorTheme;