light-chain-open-ui 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./button-DE8_GX7q.cjs`),t=require(`./client-Dt9_oZey.cjs`),n=require(`./constants-BTXokn3H.cjs`);require(`./core-DkseUrte.cjs`);function r(){}exports.ACCEPTED_FILE_TYPES=n.t,exports.API_BASE_URL=n.n,exports.ASPECT_RATIOS=t.d,exports.AUTH_HEADER_KEY=n.r,exports.CallbackStatus=t.f,exports.ERROR_CODES=n.i,exports.ERROR_MESSAGES=n.a,exports.EVENT_NAMES=n.o,exports.FIELD_TYPES=n.s,exports.FILE_SIZE_LIMITS=n.c,exports.IMAGE_LIMITS=t.p,Object.defineProperty(exports,`LcButton`,{enumerable:!0,get:function(){return e.t}}),Object.defineProperty(exports,`LcColorPicker`,{enumerable:!0,get:function(){return e.s}}),Object.defineProperty(exports,`LcEnumSelector`,{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(exports,`LcImageCompareSlider`,{enumerable:!0,get:function(){return e.r}}),Object.defineProperty(exports,`LcImageUploader`,{enumerable:!0,get:function(){return e.d}}),Object.defineProperty(exports,`LcMaskEditor`,{enumerable:!0,get:function(){return e.u}}),Object.defineProperty(exports,`LcPromptInput`,{enumerable:!0,get:function(){return e.c}}),Object.defineProperty(exports,`LcResultGallery`,{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(exports,`LcStrengthSlider`,{enumerable:!0,get:function(){return e.o}}),Object.defineProperty(exports,`LcTaskProgressCard`,{enumerable:!0,get:function(){return e.a}}),Object.defineProperty(exports,`LcTaskWorkflow`,{enumerable:!0,get:function(){return e.n}}),exports.LightChainClient=t.t,exports.OPTIONS_ACCESSORY_TYPE=n.l,exports.OPTIONS_AGE=n.u,exports.OPTIONS_ASPECT_RATIO=n.d,exports.OPTIONS_BODY_SHAPE=n.f,exports.OPTIONS_CROP_MODE=n.p,exports.OPTIONS_DETAIL_LIST=n.m,exports.OPTIONS_DURATION=n.h,exports.OPTIONS_GENDER=n.g,exports.OPTIONS_IMAGE_TYPE=n._,exports.OPTIONS_NATIONALITY=n.v,exports.OPTIONS_PATTERN_TYPE=n.y,exports.OPTIONS_PERSPECTIVE=n.b,exports.OPTIONS_POSITION=n.x,exports.OPTIONS_RACE=n.S,exports.OPTIONS_RECOGNITION_TYPE=n.C,exports.OPTIONS_REMOVE_PATTERN=n.w,exports.OPTIONS_SCALE=n.T,exports.OPTIONS_SIMILARITY=n.E,exports.OPTIONS_SIZE=n.D,exports.OPTIONS_SKIN_COLOR=n.O,exports.OPTIONS_TEMPLATE_ID=n.k,exports.TASK_PROGRESS_PATH=n.A,exports.TASK_SUBMIT_PREFIX=n.j,exports.TASK_TYPES=t.r,exports.TASK_TYPES_PART_A=t.s,exports.TASK_TYPES_PART_B=t.o,exports.TASK_WORKFLOW_TYPES=n.M,exports.TaskStatus=t.m,exports.WORKFLOW_DEFAULTS=n.N,exports.WORKFLOW_PHASES=n.P,exports.getAllTaskTypes=t.i,exports.getTaskTypeDef=t.a,exports.registerAllComponents=r,exports.validateFormData=t.n,exports.validateImage=t.c,exports.validateImageFile=t.l,exports.validateMask=t.u;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./button-BN6fkYfk.cjs`),t=require(`./client-Dt9_oZey.cjs`),n=require(`./constants-BTXokn3H.cjs`);require(`./core-DkseUrte.cjs`),e.f();function r(){}exports.ACCEPTED_FILE_TYPES=n.t,exports.API_BASE_URL=n.n,exports.ASPECT_RATIOS=t.d,exports.AUTH_HEADER_KEY=n.r,exports.CallbackStatus=t.f,exports.ERROR_CODES=n.i,exports.ERROR_MESSAGES=n.a,exports.EVENT_NAMES=n.o,exports.FIELD_TYPES=n.s,exports.FILE_SIZE_LIMITS=n.c,exports.IMAGE_LIMITS=t.p,Object.defineProperty(exports,`LcButton`,{enumerable:!0,get:function(){return e.t}}),Object.defineProperty(exports,`LcColorPicker`,{enumerable:!0,get:function(){return e.s}}),Object.defineProperty(exports,`LcEnumSelector`,{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(exports,`LcImageCompareSlider`,{enumerable:!0,get:function(){return e.r}}),Object.defineProperty(exports,`LcImageUploader`,{enumerable:!0,get:function(){return e.d}}),Object.defineProperty(exports,`LcMaskEditor`,{enumerable:!0,get:function(){return e.u}}),Object.defineProperty(exports,`LcPromptInput`,{enumerable:!0,get:function(){return e.c}}),Object.defineProperty(exports,`LcResultGallery`,{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(exports,`LcStrengthSlider`,{enumerable:!0,get:function(){return e.o}}),Object.defineProperty(exports,`LcTaskProgressCard`,{enumerable:!0,get:function(){return e.a}}),Object.defineProperty(exports,`LcTaskWorkflow`,{enumerable:!0,get:function(){return e.n}}),exports.LightChainClient=t.t,exports.OPTIONS_ACCESSORY_TYPE=n.l,exports.OPTIONS_AGE=n.u,exports.OPTIONS_ASPECT_RATIO=n.d,exports.OPTIONS_BODY_SHAPE=n.f,exports.OPTIONS_CROP_MODE=n.p,exports.OPTIONS_DETAIL_LIST=n.m,exports.OPTIONS_DURATION=n.h,exports.OPTIONS_GENDER=n.g,exports.OPTIONS_IMAGE_TYPE=n._,exports.OPTIONS_NATIONALITY=n.v,exports.OPTIONS_PATTERN_TYPE=n.y,exports.OPTIONS_PERSPECTIVE=n.b,exports.OPTIONS_POSITION=n.x,exports.OPTIONS_RACE=n.S,exports.OPTIONS_RECOGNITION_TYPE=n.C,exports.OPTIONS_REMOVE_PATTERN=n.w,exports.OPTIONS_SCALE=n.T,exports.OPTIONS_SIMILARITY=n.E,exports.OPTIONS_SIZE=n.D,exports.OPTIONS_SKIN_COLOR=n.O,exports.OPTIONS_TEMPLATE_ID=n.k,exports.TASK_PROGRESS_PATH=n.A,exports.TASK_SUBMIT_PREFIX=n.j,exports.TASK_TYPES=t.r,exports.TASK_TYPES_PART_A=t.s,exports.TASK_TYPES_PART_B=t.o,exports.TASK_WORKFLOW_TYPES=n.M,exports.TaskStatus=t.m,exports.WORKFLOW_DEFAULTS=n.N,exports.WORKFLOW_PHASES=n.P,exports.getAllTaskTypes=t.i,exports.getTaskTypeDef=t.a,exports.registerAllComponents=r,exports.validateFormData=t.n,exports.validateImage=t.c,exports.validateImageFile=t.l,exports.validateMask=t.u;
@@ -1,8 +1,9 @@
1
- import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./button-CREPu5oG.js";
2
- import { a as d, c as f, d as p, f as m, i as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w } from "./client-C5AgfBeT.js";
3
- import { A as T, C as E, D, E as O, M as k, N as A, O as j, P as M, S as N, T as P, _ as F, a as I, b as L, c as R, d as z, f as B, g as V, h as H, i as U, j as W, k as G, l as K, m as q, n as J, o as Y, p as X, r as Z, s as Q, t as $, u as ee, v as te, w as ne, x as re, y as ie } from "./constants-DmzJOR2G.js";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./button-ClBAD6mB.js";
2
+ import { a as f, c as p, d as m, f as h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T } from "./client-C5AgfBeT.js";
3
+ import { A as E, C as D, D as O, E as k, M as A, N as j, O as M, P as N, S as P, T as F, _ as I, a as L, b as R, c as z, d as B, f as V, g as H, h as U, i as W, j as G, k as K, l as q, m as J, n as Y, o as X, p as Z, r as Q, s as $, t as ee, u as te, v as ne, w as re, x as ie, y as ae } from "./constants-DmzJOR2G.js";
4
4
  import "./core-C5cKUOSx.js";
5
5
  //#region src/index.ts
6
- function ae() {}
6
+ r();
7
+ function oe() {}
7
8
  //#endregion
8
- export { $ as ACCEPTED_FILE_TYPES, J as API_BASE_URL, p as ASPECT_RATIOS, Z as AUTH_HEADER_KEY, m as CallbackStatus, U as ERROR_CODES, I as ERROR_MESSAGES, Y as EVENT_NAMES, Q as FIELD_TYPES, R as FILE_SIZE_LIMITS, b as IMAGE_LIMITS, l as LcButton, c as LcColorPicker, i as LcEnumSelector, s as LcImageCompareSlider, n as LcImageUploader, u as LcMaskEditor, t as LcPromptInput, r as LcResultGallery, o as LcStrengthSlider, e as LcTaskProgressCard, a as LcTaskWorkflow, C as LightChainClient, K as OPTIONS_ACCESSORY_TYPE, ee as OPTIONS_AGE, z as OPTIONS_ASPECT_RATIO, B as OPTIONS_BODY_SHAPE, X as OPTIONS_CROP_MODE, q as OPTIONS_DETAIL_LIST, H as OPTIONS_DURATION, V as OPTIONS_GENDER, F as OPTIONS_IMAGE_TYPE, te as OPTIONS_NATIONALITY, ie as OPTIONS_PATTERN_TYPE, L as OPTIONS_PERSPECTIVE, re as OPTIONS_POSITION, N as OPTIONS_RACE, E as OPTIONS_RECOGNITION_TYPE, ne as OPTIONS_REMOVE_PATTERN, P as OPTIONS_SCALE, O as OPTIONS_SIMILARITY, D as OPTIONS_SIZE, j as OPTIONS_SKIN_COLOR, G as OPTIONS_TEMPLATE_ID, T as TASK_PROGRESS_PATH, W as TASK_SUBMIT_PREFIX, x as TASK_TYPES, S as TASK_TYPES_PART_A, y as TASK_TYPES_PART_B, k as TASK_WORKFLOW_TYPES, _ as TaskStatus, A as WORKFLOW_DEFAULTS, M as WORKFLOW_PHASES, h as getAllTaskTypes, d as getTaskTypeDef, ae as registerAllComponents, v as validateFormData, f as validateImage, g as validateImageFile, w as validateMask };
9
+ export { ee as ACCEPTED_FILE_TYPES, Y as API_BASE_URL, m as ASPECT_RATIOS, Q as AUTH_HEADER_KEY, h as CallbackStatus, W as ERROR_CODES, L as ERROR_MESSAGES, X as EVENT_NAMES, $ as FIELD_TYPES, z as FILE_SIZE_LIMITS, x as IMAGE_LIMITS, u as LcButton, l as LcColorPicker, a as LcEnumSelector, c as LcImageCompareSlider, n as LcImageUploader, d as LcMaskEditor, t as LcPromptInput, i as LcResultGallery, s as LcStrengthSlider, e as LcTaskProgressCard, o as LcTaskWorkflow, w as LightChainClient, q as OPTIONS_ACCESSORY_TYPE, te as OPTIONS_AGE, B as OPTIONS_ASPECT_RATIO, V as OPTIONS_BODY_SHAPE, Z as OPTIONS_CROP_MODE, J as OPTIONS_DETAIL_LIST, U as OPTIONS_DURATION, H as OPTIONS_GENDER, I as OPTIONS_IMAGE_TYPE, ne as OPTIONS_NATIONALITY, ae as OPTIONS_PATTERN_TYPE, R as OPTIONS_PERSPECTIVE, ie as OPTIONS_POSITION, P as OPTIONS_RACE, D as OPTIONS_RECOGNITION_TYPE, re as OPTIONS_REMOVE_PATTERN, F as OPTIONS_SCALE, k as OPTIONS_SIMILARITY, O as OPTIONS_SIZE, M as OPTIONS_SKIN_COLOR, K as OPTIONS_TEMPLATE_ID, E as TASK_PROGRESS_PATH, G as TASK_SUBMIT_PREFIX, S as TASK_TYPES, C as TASK_TYPES_PART_A, b as TASK_TYPES_PART_B, A as TASK_WORKFLOW_TYPES, v as TaskStatus, j as WORKFLOW_DEFAULTS, N as WORKFLOW_PHASES, g as getAllTaskTypes, f as getTaskTypeDef, oe as registerAllComponents, y as validateFormData, p as validateImage, _ as validateImageFile, T as validateMask };
package/dist/react.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./button-DE8_GX7q.cjs`),l=require(`./constants-BTXokn3H.cjs`);let u=require(`@lit/react`),d=require(`react`);d=s(d,1);var f=l.o,p=(0,u.createComponent)({react:d.default,tagName:`lc-image-uploader`,elementClass:c.d,events:{onChange:f.CHANGE}}),m=(0,u.createComponent)({react:d.default,tagName:`lc-mask-editor`,elementClass:c.u,events:{onChange:f.CHANGE}}),h=(0,u.createComponent)({react:d.default,tagName:`lc-enum-selector`,elementClass:c.l,events:{onChange:f.CHANGE}}),g=(0,u.createComponent)({react:d.default,tagName:`lc-prompt-input`,elementClass:c.c,events:{onChange:f.CHANGE}}),_=(0,u.createComponent)({react:d.default,tagName:`lc-color-picker`,elementClass:c.s,events:{onChange:f.CHANGE}}),v=(0,u.createComponent)({react:d.default,tagName:`lc-strength-slider`,elementClass:c.o,events:{onChange:f.CHANGE}}),y=(0,u.createComponent)({react:d.default,tagName:`lc-task-progress-card`,elementClass:c.a,events:{}}),b=(0,u.createComponent)({react:d.default,tagName:`lc-result-gallery`,elementClass:c.i,events:{onImageClick:f.IMAGE_CLICK,onCompare:f.COMPARE}}),x=(0,u.createComponent)({react:d.default,tagName:`lc-image-compare-slider`,elementClass:c.r,events:{}}),S=(0,u.createComponent)({react:d.default,tagName:`lc-task-workflow`,elementClass:c.n,events:{onSubmit:f.SUBMIT,onPoll:f.POLL,onPolling:f.POLL,onSuccess:f.SUCCESS,onError:f.ERROR}}),C=(0,u.createComponent)({react:d.default,tagName:`lc-button`,elementClass:c.t,events:{}});exports.LcButtonReact=C,exports.LcColorPickerReact=_,exports.LcEnumSelectorReact=h,exports.LcImageCompareSliderReact=x,exports.LcImageUploaderReact=p,exports.LcMaskEditorReact=m,exports.LcPromptInputReact=g,exports.LcResultGalleryReact=b,exports.LcStrengthSliderReact=v,exports.LcTaskProgressCardReact=y,exports.LcTaskWorkflowReact=S,exports.t=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=require(`./button-BN6fkYfk.cjs`),l=require(`./constants-BTXokn3H.cjs`);let u=require(`@lit/react`),d=require(`react`);d=s(d,1);var f=l.o;c.f();var p=(0,u.createComponent)({react:d.default,tagName:`lc-image-uploader`,elementClass:c.d,events:{onChange:f.CHANGE}}),m=(0,u.createComponent)({react:d.default,tagName:`lc-mask-editor`,elementClass:c.u,events:{onChange:f.CHANGE}}),h=(0,u.createComponent)({react:d.default,tagName:`lc-enum-selector`,elementClass:c.l,events:{onChange:f.CHANGE}}),g=(0,u.createComponent)({react:d.default,tagName:`lc-prompt-input`,elementClass:c.c,events:{onChange:f.CHANGE}}),_=(0,u.createComponent)({react:d.default,tagName:`lc-color-picker`,elementClass:c.s,events:{onChange:f.CHANGE}}),v=(0,u.createComponent)({react:d.default,tagName:`lc-strength-slider`,elementClass:c.o,events:{onChange:f.CHANGE}}),y=(0,u.createComponent)({react:d.default,tagName:`lc-task-progress-card`,elementClass:c.a,events:{}}),b=(0,u.createComponent)({react:d.default,tagName:`lc-result-gallery`,elementClass:c.i,events:{onImageClick:f.IMAGE_CLICK,onCompare:f.COMPARE}}),x=(0,u.createComponent)({react:d.default,tagName:`lc-image-compare-slider`,elementClass:c.r,events:{}}),S=(0,u.createComponent)({react:d.default,tagName:`lc-task-workflow`,elementClass:c.n,events:{onSubmit:f.SUBMIT,onPoll:f.POLL,onPolling:f.POLL,onSuccess:f.SUCCESS,onError:f.ERROR}}),C=(0,u.createComponent)({react:d.default,tagName:`lc-button`,elementClass:c.t,events:{}});exports.LcButtonReact=C,exports.LcColorPickerReact=_,exports.LcEnumSelectorReact=h,exports.LcImageCompareSliderReact=x,exports.LcImageUploaderReact=p,exports.LcMaskEditorReact=m,exports.LcPromptInputReact=g,exports.LcResultGalleryReact=b,exports.LcStrengthSliderReact=v,exports.LcTaskProgressCardReact=y,exports.LcTaskWorkflowReact=S,exports.t=s;
package/dist/react.mjs CHANGED
@@ -1,72 +1,74 @@
1
- import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./button-CREPu5oG.js";
2
- import { o as d } from "./constants-DmzJOR2G.js";
3
- import { createComponent as f } from "@lit/react";
4
- import p from "react";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "./button-ClBAD6mB.js";
2
+ import { o as f } from "./constants-DmzJOR2G.js";
3
+ import { createComponent as p } from "@lit/react";
4
+ import m from "react";
5
5
  //#region src/react/index.ts
6
- var m = d, h = f({
7
- react: p,
6
+ var h = f;
7
+ r();
8
+ var g = p({
9
+ react: m,
8
10
  tagName: "lc-image-uploader",
9
11
  elementClass: n,
10
- events: { onChange: m.CHANGE }
11
- }), g = f({
12
- react: p,
12
+ events: { onChange: h.CHANGE }
13
+ }), _ = p({
14
+ react: m,
13
15
  tagName: "lc-mask-editor",
14
- elementClass: u,
15
- events: { onChange: m.CHANGE }
16
- }), _ = f({
17
- react: p,
16
+ elementClass: d,
17
+ events: { onChange: h.CHANGE }
18
+ }), v = p({
19
+ react: m,
18
20
  tagName: "lc-enum-selector",
19
- elementClass: i,
20
- events: { onChange: m.CHANGE }
21
- }), v = f({
22
- react: p,
21
+ elementClass: a,
22
+ events: { onChange: h.CHANGE }
23
+ }), y = p({
24
+ react: m,
23
25
  tagName: "lc-prompt-input",
24
26
  elementClass: t,
25
- events: { onChange: m.CHANGE }
26
- }), y = f({
27
- react: p,
27
+ events: { onChange: h.CHANGE }
28
+ }), b = p({
29
+ react: m,
28
30
  tagName: "lc-color-picker",
29
- elementClass: c,
30
- events: { onChange: m.CHANGE }
31
- }), b = f({
32
- react: p,
31
+ elementClass: l,
32
+ events: { onChange: h.CHANGE }
33
+ }), x = p({
34
+ react: m,
33
35
  tagName: "lc-strength-slider",
34
- elementClass: o,
35
- events: { onChange: m.CHANGE }
36
- }), x = f({
37
- react: p,
36
+ elementClass: s,
37
+ events: { onChange: h.CHANGE }
38
+ }), S = p({
39
+ react: m,
38
40
  tagName: "lc-task-progress-card",
39
41
  elementClass: e,
40
42
  events: {}
41
- }), S = f({
42
- react: p,
43
+ }), C = p({
44
+ react: m,
43
45
  tagName: "lc-result-gallery",
44
- elementClass: r,
46
+ elementClass: i,
45
47
  events: {
46
- onImageClick: m.IMAGE_CLICK,
47
- onCompare: m.COMPARE
48
+ onImageClick: h.IMAGE_CLICK,
49
+ onCompare: h.COMPARE
48
50
  }
49
- }), C = f({
50
- react: p,
51
+ }), w = p({
52
+ react: m,
51
53
  tagName: "lc-image-compare-slider",
52
- elementClass: s,
54
+ elementClass: c,
53
55
  events: {}
54
- }), w = f({
55
- react: p,
56
+ }), T = p({
57
+ react: m,
56
58
  tagName: "lc-task-workflow",
57
- elementClass: a,
59
+ elementClass: o,
58
60
  events: {
59
- onSubmit: m.SUBMIT,
60
- onPoll: m.POLL,
61
- onPolling: m.POLL,
62
- onSuccess: m.SUCCESS,
63
- onError: m.ERROR
61
+ onSubmit: h.SUBMIT,
62
+ onPoll: h.POLL,
63
+ onPolling: h.POLL,
64
+ onSuccess: h.SUCCESS,
65
+ onError: h.ERROR
64
66
  }
65
- }), T = f({
66
- react: p,
67
+ }), E = p({
68
+ react: m,
67
69
  tagName: "lc-button",
68
- elementClass: l,
70
+ elementClass: u,
69
71
  events: {}
70
72
  });
71
73
  //#endregion
72
- export { T as LcButtonReact, y as LcColorPickerReact, _ as LcEnumSelectorReact, C as LcImageCompareSliderReact, h as LcImageUploaderReact, g as LcMaskEditorReact, v as LcPromptInputReact, S as LcResultGalleryReact, b as LcStrengthSliderReact, x as LcTaskProgressCardReact, w as LcTaskWorkflowReact };
74
+ export { E as LcButtonReact, b as LcColorPickerReact, v as LcEnumSelectorReact, w as LcImageCompareSliderReact, g as LcImageUploaderReact, _ as LcMaskEditorReact, y as LcPromptInputReact, C as LcResultGalleryReact, x as LcStrengthSliderReact, S as LcTaskProgressCardReact, T as LcTaskWorkflowReact };
@@ -20,7 +20,7 @@ export type CustomUploadRequestFn = NonNullable<LightChainClientOptions['customU
20
20
  * @fires error - 出错时触发,detail: { message, phase }
21
21
  */
22
22
  export declare class LcTaskWorkflow extends LitElement {
23
- type: TaskWorkflowType | string;
23
+ type: TaskWorkflowType;
24
24
  submitEndpoint: string;
25
25
  pollEndpoint: string;
26
26
  pollInterval: number;
@@ -0,0 +1 @@
1
+ export declare function registerLightChainTheme(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "light-chain-open-ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/lightchain-ui.cjs",
@@ -31,7 +31,11 @@
31
31
  "types": "./dist/types/types.d.ts",
32
32
  "import": "./dist/types.mjs",
33
33
  "require": "./dist/types.cjs"
34
- }
34
+ },
35
+ "./styles/tokens.css": "./src/styles/tokens.css",
36
+ "./styles/reset.css": "./src/styles/reset.css",
37
+ "./styles/themes/default.css": "./src/styles/themes/default.css",
38
+ "./styles/themes/dark.css": "./src/styles/themes/dark.css"
35
39
  },
36
40
  "files": [
37
41
  "dist",
@@ -0,0 +1,64 @@
1
+ const LIGHT_CHAIN_THEME_STYLE_ID = 'light-chain-open-ui-theme'
2
+
3
+ const DEFAULT_THEME_CSS = `
4
+ :root {
5
+ --lc-color-blue-50: #eff6ff;
6
+ --lc-color-blue-100: #dbeafe;
7
+ --lc-color-blue-500: #3b82f6;
8
+ --lc-color-blue-600: #2563eb;
9
+ --lc-color-blue-700: #1d4ed8;
10
+ --lc-color-gray-50: #f9fafb;
11
+ --lc-color-gray-100: #f3f4f6;
12
+ --lc-color-gray-200: #e5e7eb;
13
+ --lc-color-gray-300: #d1d5db;
14
+ --lc-color-gray-500: #6b7280;
15
+ --lc-color-gray-700: #374151;
16
+ --lc-color-gray-900: #111827;
17
+ --lc-color-success: #10b981;
18
+ --lc-color-warning: #f59e0b;
19
+ --lc-color-error: #ef4444;
20
+ --lc-spacing-1: 4px;
21
+ --lc-spacing-2: 8px;
22
+ --lc-spacing-3: 12px;
23
+ --lc-spacing-4: 16px;
24
+ --lc-spacing-5: 20px;
25
+ --lc-spacing-6: 24px;
26
+ --lc-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
27
+ --lc-font-size-xs: 12px;
28
+ --lc-font-size-sm: 14px;
29
+ --lc-font-size-base: 16px;
30
+ --lc-font-size-lg: 18px;
31
+ --lc-font-size-xl: 20px;
32
+ --lc-line-height: 1.5;
33
+ --lc-radius-sm: 4px;
34
+ --lc-radius-md: 8px;
35
+ --lc-radius-lg: 12px;
36
+ --lc-radius-full: 9999px;
37
+ --lc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
38
+ --lc-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
39
+ --lc-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
40
+ --lc-transition-fast: 150ms ease;
41
+ --lc-transition-normal: 200ms ease;
42
+ --lc-color-primary: var(--lc-color-blue-600);
43
+ --lc-color-primary-hover: var(--lc-color-blue-700);
44
+ --lc-color-primary-light: var(--lc-color-blue-50);
45
+ --lc-color-bg: #ffffff;
46
+ --lc-color-bg-secondary: var(--lc-color-gray-50);
47
+ --lc-color-border: var(--lc-color-gray-200);
48
+ --lc-color-text: var(--lc-color-gray-900);
49
+ --lc-color-text-secondary: var(--lc-color-gray-500);
50
+ --lc-color-text-placeholder: var(--lc-color-gray-300);
51
+ --lc-radius-component: var(--lc-radius-md);
52
+ --lc-spacing-component: var(--lc-spacing-4);
53
+ }
54
+ `
55
+
56
+ export function registerLightChainTheme(): void {
57
+ if (typeof document === 'undefined') return
58
+ if (document.getElementById(LIGHT_CHAIN_THEME_STYLE_ID)) return
59
+
60
+ const style = document.createElement('style')
61
+ style.id = LIGHT_CHAIN_THEME_STYLE_ID
62
+ style.textContent = DEFAULT_THEME_CSS
63
+ document.head.append(style)
64
+ }