solely 0.4.1 → 0.4.3
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/compiler/ir/buildIR.cjs +1 -1
- package/dist/compiler/ir/buildIR.js +1 -1
- package/dist/components/commands/drawer/style.css.cjs +1 -1
- package/dist/components/commands/drawer/style.css.js +1 -1
- package/dist/components/elements/backtop/index.cjs +1 -1
- package/dist/components/elements/backtop/index.d.ts +12 -23
- package/dist/components/elements/backtop/index.js +1 -1
- package/dist/components/elements/backtop/style.css.cjs +1 -1
- package/dist/components/elements/backtop/style.css.js +1 -1
- package/dist/components/elements/checkbox/index.cjs +1 -1
- package/dist/components/elements/checkbox/index.js +1 -1
- package/dist/components/elements/fab/style.css.cjs +1 -1
- package/dist/components/elements/fab/style.css.js +1 -1
- package/dist/components/elements/input/index.cjs +1 -1
- package/dist/components/elements/input/index.d.ts +8 -0
- package/dist/components/elements/input/index.html.cjs +1 -1
- package/dist/components/elements/input/index.html.js +1 -1
- package/dist/components/elements/input/index.js +1 -1
- package/dist/components/elements/input/style.css.cjs +1 -1
- package/dist/components/elements/input/style.css.js +1 -1
- package/dist/components/elements/radio/index.cjs +1 -1
- package/dist/components/elements/radio/index.js +1 -1
- package/dist/components/elements/select/index.cjs +1 -1
- package/dist/components/elements/select/index.d.ts +43 -7
- package/dist/components/elements/select/index.html.cjs +1 -1
- package/dist/components/elements/select/index.html.js +1 -1
- package/dist/components/elements/select/index.js +1 -1
- package/dist/components/elements/select/style.css.cjs +1 -1
- package/dist/components/elements/select/style.css.js +1 -1
- package/dist/components/elements/select/types.d.ts +35 -11
- package/dist/components/elements/slider/style.css.cjs +1 -1
- package/dist/components/elements/slider/style.css.js +1 -1
- package/dist/components/elements/steps/index.cjs +1 -1
- package/dist/components/elements/steps/index.d.ts +38 -1
- package/dist/components/elements/steps/index.html.cjs +1 -1
- package/dist/components/elements/steps/index.html.js +1 -1
- package/dist/components/elements/steps/index.js +1 -1
- package/dist/components/elements/steps/style.css.cjs +1 -1
- package/dist/components/elements/steps/style.css.js +1 -1
- package/dist/components/elements/switch/index.cjs +1 -1
- package/dist/components/elements/switch/index.d.ts +6 -1
- package/dist/components/elements/switch/index.js +1 -1
- package/dist/components/elements/switch/style.css.cjs +1 -1
- package/dist/components/elements/switch/style.css.js +1 -1
- package/dist/components/elements/timeline/style.css.cjs +1 -1
- package/dist/components/elements/timeline/style.css.js +1 -1
- package/dist/components/elements/tree/types.d.ts +1 -1
- package/dist/components/theme/variables.css +11 -1
- package/dist/runtime/component/base-element.cjs +1 -1
- package/dist/runtime/component/base-element.js +1 -1
- package/dist/runtime/component/decorators.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default="*,*:before,*:after{box-sizing:border-box}:host{display:inline-block;--switch-bg: var(--solely-gray-5);--switch-bg-checked: var(--solely-primary);--switch-bg-hover: var(--solely-gray-6);--switch-bg-checked-hover: var(--solely-primary-hover);--switch-handle-bg: var(--solely-white);--switch-disabled-opacity: .4;--switch-focus-shadow: var(--solely-primary-light)}:host([hidden]){display:none!important}.switch{position:relative;display:inline-flex;align-items:center;cursor:pointer;transition:all var(--solely-transition-duration) var(--solely-transition-timing);outline:none;-webkit-user-select:none;user-select:none;touch-action:manipulation}.switch:focus-visible,.switch.focus-visible{box-shadow:0 0 0 2px var(--switch-focus-shadow);border-radius:100px}.switch--md{min-width:44px;height:22px}.switch--sm{min-width:28px;height:16px}.switch--lg{min-width:60px;height:28px}.switch__track{position:relative;width:100%;height:100%;background-color:var(--switch-bg);border-radius:100px;transition:all var(--solely-transition-duration) var(--solely-transition-timing);overflow:hidden}.switch:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--switch-bg-hover)}.switch.is-checked .switch__track{background-color:var(--switch-bg-checked)}.switch.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--switch-bg-checked-hover)}.switch__handle{position:absolute;top:2px;left:2px;background-color:var(--switch-handle-bg);border-radius:var(--solely-border-radius-circle);box-shadow:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default="*,*:before,*:after{box-sizing:border-box}:host{display:inline-block;--switch-bg: var(--solely-gray-5);--switch-bg-checked: var(--solely-primary);--switch-bg-hover: var(--solely-gray-6);--switch-bg-checked-hover: var(--solely-primary-hover);--switch-handle-bg: var(--solely-white);--switch-disabled-opacity: .4;--switch-focus-shadow: var(--solely-primary-light)}:host([hidden]){display:none!important}.switch{position:relative;display:inline-flex;align-items:center;cursor:pointer;transition:all var(--solely-transition-duration) var(--solely-transition-timing);outline:none;-webkit-user-select:none;user-select:none;touch-action:manipulation}.switch:focus-visible,.switch.focus-visible{box-shadow:0 0 0 2px var(--switch-focus-shadow);border-radius:100px}.switch--md{min-width:44px;height:22px}.switch--sm{min-width:28px;height:16px}.switch--lg{min-width:60px;height:28px}.switch__track{position:relative;width:100%;height:100%;background-color:var(--switch-bg);border-radius:100px;transition:all var(--solely-transition-duration) var(--solely-transition-timing);overflow:hidden}.switch:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--switch-bg-hover)}.switch.is-checked .switch__track{background-color:var(--switch-bg-checked)}.switch.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--switch-bg-checked-hover)}.switch__handle{position:absolute;top:2px;left:2px;background-color:var(--switch-handle-bg);border-radius:var(--solely-border-radius-circle);box-shadow:var(--solely-shadow-sm);transition:all var(--solely-transition-duration) var(--solely-transition-timing);z-index:var(--solely-z-index-switch-handle)}.switch--md .switch__handle{width:18px;height:18px}.switch--md.is-checked .switch__handle{left:calc(100% - 20px)}.switch--sm .switch__handle{width:12px;height:12px}.switch--sm.is-checked .switch__handle{left:calc(100% - 14px)}.switch--lg .switch__handle{width:24px;height:24px}.switch--lg.is-checked .switch__handle{left:calc(100% - 26px)}.switch__inner{position:relative;display:flex;align-items:center;justify-content:center;height:100%;width:100%;font-size:12px;color:var(--solely-white);transition:all var(--solely-transition-duration) var(--solely-transition-timing)}.switch--lg .switch__inner{font-size:14px}.switch__inner-checked,.switch__inner-unchecked{position:absolute;top:50%;transform:translateY(-50%);font-size:12px;color:var(--solely-white);white-space:nowrap;font-weight:500;transition:opacity var(--solely-transition-duration) var(--solely-transition-timing)}.switch--lg .switch__inner-checked,.switch--lg .switch__inner-unchecked{font-size:14px}.switch--md .switch__inner-checked{left:6px;opacity:0}.switch--md .switch__inner-unchecked{right:6px;opacity:1}.switch--sm .switch__inner-checked{left:4px;font-size:10px;opacity:0}.switch--sm .switch__inner-unchecked{right:4px;font-size:10px;opacity:1}.switch--lg .switch__inner-checked{left:8px;opacity:0}.switch--lg .switch__inner-unchecked{right:8px;opacity:1}.switch.is-checked .switch__inner-checked{opacity:1}.switch.is-checked .switch__inner-unchecked{opacity:0}.switch.is-disabled{opacity:var(--switch-disabled-opacity)}.switch.is-disabled .switch__track{background-color:var(--solely-gray-5)!important}.switch.is-disabled.is-checked .switch__track{background-color:var(--solely-gray-6)!important}.switch__loading-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:10px;height:10px;border:2px solid var(--solely-primary);border-top-color:transparent;border-radius:var(--solely-border-radius-circle);animation:switch-spin 1s linear infinite}.switch--sm .switch__loading-icon{width:8px;height:8px;border-width:1.5px}.switch--lg .switch__loading-icon{width:14px;height:14px;border-width:2.5px}@keyframes switch-spin{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.switch--primary.is-checked .switch__track{background-color:var(--solely-primary)}.switch--primary.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--solely-primary-hover)}.switch--primary .switch__loading-icon{border-color:var(--solely-primary);border-top-color:transparent}.switch--success.is-checked .switch__track{background-color:var(--solely-success)}.switch--success.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--solely-success-hover)}.switch--success .switch__loading-icon{border-color:var(--solely-success);border-top-color:transparent}.switch--warning.is-checked .switch__track{background-color:var(--solely-warning)}.switch--warning.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--solely-warning-hover)}.switch--warning .switch__loading-icon{border-color:var(--solely-warning);border-top-color:transparent}.switch--error.is-checked .switch__track{background-color:var(--solely-error)}.switch--error.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--solely-error-hover)}.switch--error .switch__loading-icon{border-color:var(--solely-error);border-top-color:transparent}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const i="*,*:before,*:after{box-sizing:border-box}:host{display:inline-block;--switch-bg: var(--solely-gray-5);--switch-bg-checked: var(--solely-primary);--switch-bg-hover: var(--solely-gray-6);--switch-bg-checked-hover: var(--solely-primary-hover);--switch-handle-bg: var(--solely-white);--switch-disabled-opacity: .4;--switch-focus-shadow: var(--solely-primary-light)}:host([hidden]){display:none!important}.switch{position:relative;display:inline-flex;align-items:center;cursor:pointer;transition:all var(--solely-transition-duration) var(--solely-transition-timing);outline:none;-webkit-user-select:none;user-select:none;touch-action:manipulation}.switch:focus-visible,.switch.focus-visible{box-shadow:0 0 0 2px var(--switch-focus-shadow);border-radius:100px}.switch--md{min-width:44px;height:22px}.switch--sm{min-width:28px;height:16px}.switch--lg{min-width:60px;height:28px}.switch__track{position:relative;width:100%;height:100%;background-color:var(--switch-bg);border-radius:100px;transition:all var(--solely-transition-duration) var(--solely-transition-timing);overflow:hidden}.switch:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--switch-bg-hover)}.switch.is-checked .switch__track{background-color:var(--switch-bg-checked)}.switch.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--switch-bg-checked-hover)}.switch__handle{position:absolute;top:2px;left:2px;background-color:var(--switch-handle-bg);border-radius:var(--solely-border-radius-circle);box-shadow:
|
|
1
|
+
const i="*,*:before,*:after{box-sizing:border-box}:host{display:inline-block;--switch-bg: var(--solely-gray-5);--switch-bg-checked: var(--solely-primary);--switch-bg-hover: var(--solely-gray-6);--switch-bg-checked-hover: var(--solely-primary-hover);--switch-handle-bg: var(--solely-white);--switch-disabled-opacity: .4;--switch-focus-shadow: var(--solely-primary-light)}:host([hidden]){display:none!important}.switch{position:relative;display:inline-flex;align-items:center;cursor:pointer;transition:all var(--solely-transition-duration) var(--solely-transition-timing);outline:none;-webkit-user-select:none;user-select:none;touch-action:manipulation}.switch:focus-visible,.switch.focus-visible{box-shadow:0 0 0 2px var(--switch-focus-shadow);border-radius:100px}.switch--md{min-width:44px;height:22px}.switch--sm{min-width:28px;height:16px}.switch--lg{min-width:60px;height:28px}.switch__track{position:relative;width:100%;height:100%;background-color:var(--switch-bg);border-radius:100px;transition:all var(--solely-transition-duration) var(--solely-transition-timing);overflow:hidden}.switch:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--switch-bg-hover)}.switch.is-checked .switch__track{background-color:var(--switch-bg-checked)}.switch.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--switch-bg-checked-hover)}.switch__handle{position:absolute;top:2px;left:2px;background-color:var(--switch-handle-bg);border-radius:var(--solely-border-radius-circle);box-shadow:var(--solely-shadow-sm);transition:all var(--solely-transition-duration) var(--solely-transition-timing);z-index:var(--solely-z-index-switch-handle)}.switch--md .switch__handle{width:18px;height:18px}.switch--md.is-checked .switch__handle{left:calc(100% - 20px)}.switch--sm .switch__handle{width:12px;height:12px}.switch--sm.is-checked .switch__handle{left:calc(100% - 14px)}.switch--lg .switch__handle{width:24px;height:24px}.switch--lg.is-checked .switch__handle{left:calc(100% - 26px)}.switch__inner{position:relative;display:flex;align-items:center;justify-content:center;height:100%;width:100%;font-size:12px;color:var(--solely-white);transition:all var(--solely-transition-duration) var(--solely-transition-timing)}.switch--lg .switch__inner{font-size:14px}.switch__inner-checked,.switch__inner-unchecked{position:absolute;top:50%;transform:translateY(-50%);font-size:12px;color:var(--solely-white);white-space:nowrap;font-weight:500;transition:opacity var(--solely-transition-duration) var(--solely-transition-timing)}.switch--lg .switch__inner-checked,.switch--lg .switch__inner-unchecked{font-size:14px}.switch--md .switch__inner-checked{left:6px;opacity:0}.switch--md .switch__inner-unchecked{right:6px;opacity:1}.switch--sm .switch__inner-checked{left:4px;font-size:10px;opacity:0}.switch--sm .switch__inner-unchecked{right:4px;font-size:10px;opacity:1}.switch--lg .switch__inner-checked{left:8px;opacity:0}.switch--lg .switch__inner-unchecked{right:8px;opacity:1}.switch.is-checked .switch__inner-checked{opacity:1}.switch.is-checked .switch__inner-unchecked{opacity:0}.switch.is-disabled{opacity:var(--switch-disabled-opacity)}.switch.is-disabled .switch__track{background-color:var(--solely-gray-5)!important}.switch.is-disabled.is-checked .switch__track{background-color:var(--solely-gray-6)!important}.switch__loading-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:10px;height:10px;border:2px solid var(--solely-primary);border-top-color:transparent;border-radius:var(--solely-border-radius-circle);animation:switch-spin 1s linear infinite}.switch--sm .switch__loading-icon{width:8px;height:8px;border-width:1.5px}.switch--lg .switch__loading-icon{width:14px;height:14px;border-width:2.5px}@keyframes switch-spin{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.switch--primary.is-checked .switch__track{background-color:var(--solely-primary)}.switch--primary.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--solely-primary-hover)}.switch--primary .switch__loading-icon{border-color:var(--solely-primary);border-top-color:transparent}.switch--success.is-checked .switch__track{background-color:var(--solely-success)}.switch--success.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--solely-success-hover)}.switch--success .switch__loading-icon{border-color:var(--solely-success);border-top-color:transparent}.switch--warning.is-checked .switch__track{background-color:var(--solely-warning)}.switch--warning.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--solely-warning-hover)}.switch--warning .switch__loading-icon{border-color:var(--solely-warning);border-top-color:transparent}.switch--error.is-checked .switch__track{background-color:var(--solely-error)}.switch--error.is-checked:hover:not(.is-disabled):not(.is-loading) .switch__track{background-color:var(--solely-error-hover)}.switch--error .switch__loading-icon{border-color:var(--solely-error);border-top-color:transparent}";export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default="*,*:before,*:after{box-sizing:border-box}:host{display:block;width:100%;font-size:var(--solely-font-size-md)}.timeline{--timeline-dot-size: 10px;--timeline-icon-size: 32px;--timeline-tail-color: var(--solely-border-color);--timeline-font-family: var(--solely-font-family);width:100%;font-family:var(--timeline-font-family);font-size:var(--solely-font-size-md);color:var(--solely-text-primary);line-height:1.5714;list-style:none;margin:0;padding:0;box-sizing:border-box}.timeline__list{position:relative;margin:0;padding:0;list-style:none}.timeline__item{position:relative;padding-bottom:20px;margin:0;list-style:none;box-sizing:border-box}.timeline__item:last-child{padding-bottom:0}.timeline__item-wrapper{display:flex;align-items:flex-start}.timeline__item-tail{position:absolute;top:16px;left:7px;width:2px;height:calc(100% - 6px);background:var(--timeline-tail-color);transition:background var(--solely-transition-duration)}.timeline__item:last-child>.timeline__item-tail{display:none}.timeline__item-head{position:relative;flex-shrink:0;width:16px;height:16px;margin-top:3px}.timeline__dot{position:absolute;top:3px;left:3px;width:var(--timeline-dot-size);height:var(--timeline-dot-size);border-radius:50%;border:2px solid var(--solely-primary);background-color:var(--solely-component-bg);background-clip:padding-box;transition:all var(--solely-transition-duration);box-sizing:border-box}.timeline__icon-wrapper{position:absolute;top:0;left:0;width:var(--timeline-icon-size);height:var(--timeline-icon-size);display:inline-flex;align-items:center;justify-content:center;background-color:var(--solely-primary-light);border:none;border-radius:50%;font-size:18px;line-height:1;color:var(--solely-primary);transform:translate(calc(-1 * (var(--timeline-icon-size) - 16px) / 2),calc(-1 * (var(--timeline-icon-size) - 16px) / 2));cursor:default;transition:all var(--solely-transition-duration)}.timeline__item-content{position:relative;flex:1 1 auto;min-width:0;margin-left:var(--solely-spacing-md);word-break:break-word}.timeline__title{display:inline-block;margin-bottom:var(--solely-spacing-xs);font-weight:500;font-size:var(--solely-font-size-md);color:var(--solely-text-primary);line-height:1.5714}.timeline__content-text{font-size:var(--solely-font-size-md);color:var(--solely-text-secondary);line-height:1.5714;word-break:break-word;margin-top:var(--solely-spacing-xs)}.timeline__time{font-size:var(--solely-font-size-md);color:var(--solely-text-tertiary);margin-top:var(--solely-spacing-xs)}.timeline--left .timeline__item-tail{left:7px}.timeline--left .timeline__item-head{left:0}.timeline--left .timeline__item-content{margin-left:var(--solely-spacing-md)}.timeline--right .timeline__item-wrapper{flex-direction:row-reverse}.timeline--right .timeline__item-tail{right:7px;left:auto}.timeline--right .timeline__item-head{right:0;left:auto}.timeline--right .timeline__item-content{margin-left:0;margin-right:var(--solely-spacing-md);text-align:right}.timeline--alternate .timeline__item{min-height:48px;overflow:visible}.timeline--alternate .timeline__item-tail{left:50%;transform:translate(-50%);top:16px}.timeline--alternate .timeline__item-wrapper{display:block;position:relative}.timeline--alternate .timeline__item-head{position:absolute;left:50%;top:0;transform:translate(-50%);z-index:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),exports.default="*,*:before,*:after{box-sizing:border-box}:host{display:block;width:100%;font-size:var(--solely-font-size-md)}.timeline{--timeline-dot-size: 10px;--timeline-icon-size: 32px;--timeline-tail-color: var(--solely-border-color);--timeline-font-family: var(--solely-font-family);width:100%;font-family:var(--timeline-font-family);font-size:var(--solely-font-size-md);color:var(--solely-text-primary);line-height:1.5714;list-style:none;margin:0;padding:0;box-sizing:border-box}.timeline__list{position:relative;margin:0;padding:0;list-style:none}.timeline__item{position:relative;padding-bottom:20px;margin:0;list-style:none;box-sizing:border-box}.timeline__item:last-child{padding-bottom:0}.timeline__item-wrapper{display:flex;align-items:flex-start}.timeline__item-tail{position:absolute;top:16px;left:7px;width:2px;height:calc(100% - 6px);background:var(--timeline-tail-color);transition:background var(--solely-transition-duration)}.timeline__item:last-child>.timeline__item-tail{display:none}.timeline__item-head{position:relative;flex-shrink:0;width:16px;height:16px;margin-top:3px}.timeline__dot{position:absolute;top:3px;left:3px;width:var(--timeline-dot-size);height:var(--timeline-dot-size);border-radius:50%;border:2px solid var(--solely-primary);background-color:var(--solely-component-bg);background-clip:padding-box;transition:all var(--solely-transition-duration);box-sizing:border-box}.timeline__icon-wrapper{position:absolute;top:0;left:0;width:var(--timeline-icon-size);height:var(--timeline-icon-size);display:inline-flex;align-items:center;justify-content:center;background-color:var(--solely-primary-light);border:none;border-radius:50%;font-size:18px;line-height:1;color:var(--solely-primary);transform:translate(calc(-1 * (var(--timeline-icon-size) - 16px) / 2),calc(-1 * (var(--timeline-icon-size) - 16px) / 2));cursor:default;transition:all var(--solely-transition-duration)}.timeline__item-content{position:relative;flex:1 1 auto;min-width:0;margin-left:var(--solely-spacing-md);word-break:break-word}.timeline__title{display:inline-block;margin-bottom:var(--solely-spacing-xs);font-weight:500;font-size:var(--solely-font-size-md);color:var(--solely-text-primary);line-height:1.5714}.timeline__content-text{font-size:var(--solely-font-size-md);color:var(--solely-text-secondary);line-height:1.5714;word-break:break-word;margin-top:var(--solely-spacing-xs)}.timeline__time{font-size:var(--solely-font-size-md);color:var(--solely-text-tertiary);margin-top:var(--solely-spacing-xs)}.timeline--left .timeline__item-tail{left:7px}.timeline--left .timeline__item-head{left:0}.timeline--left .timeline__item-content{margin-left:var(--solely-spacing-md)}.timeline--right .timeline__item-wrapper{flex-direction:row-reverse}.timeline--right .timeline__item-tail{right:7px;left:auto}.timeline--right .timeline__item-head{right:0;left:auto}.timeline--right .timeline__item-content{margin-left:0;margin-right:var(--solely-spacing-md);text-align:right}.timeline--alternate .timeline__item{min-height:48px;overflow:visible}.timeline--alternate .timeline__item-tail{left:50%;transform:translate(-50%);top:16px}.timeline--alternate .timeline__item-wrapper{display:block;position:relative}.timeline--alternate .timeline__item-head{position:absolute;left:50%;top:0;transform:translate(-50%);z-index:var(--solely-z-index-timeline-dot);margin-top:3px}.timeline--alternate .timeline__item-content{width:100%;min-height:48px;box-sizing:border-box;margin-left:0;padding-top:3px}.timeline--alternate .timeline__item:nth-child(odd) .timeline__item-content{text-align:right;padding-right:calc(50% + 20px)}.timeline--alternate .timeline__item:nth-child(2n) .timeline__item-content{text-align:left;padding-left:calc(50% + 20px)}.timeline--horizontal-top,.timeline--horizontal-bottom,.timeline--horizontal-alternate{overflow-x:auto;overflow-y:hidden}.timeline--horizontal-top .timeline__list,.timeline--horizontal-bottom .timeline__list,.timeline--horizontal-alternate .timeline__list{display:flex;align-items:stretch}.timeline--horizontal-top .timeline__item,.timeline--horizontal-bottom .timeline__item,.timeline--horizontal-alternate .timeline__item{display:block;position:relative;flex:1 1 0;min-width:100px;max-width:240px;padding:0!important}.timeline--horizontal-top .timeline__item-wrapper,.timeline--horizontal-bottom .timeline__item-wrapper,.timeline--horizontal-alternate .timeline__item-wrapper{display:block;width:100%;height:100%}.timeline--horizontal-top .timeline__item-head,.timeline--horizontal-bottom .timeline__item-head,.timeline--horizontal-alternate .timeline__item-head{position:absolute;left:50%;transform:translate(-50%);z-index:var(--solely-z-index-timeline-dot);margin:0;width:16px;height:16px}.timeline--horizontal-top .timeline__dot,.timeline--horizontal-bottom .timeline__dot,.timeline--horizontal-alternate .timeline__dot{position:absolute;top:3px;left:3px}.timeline--horizontal-top .timeline__icon-wrapper,.timeline--horizontal-bottom .timeline__icon-wrapper,.timeline--horizontal-alternate .timeline__icon-wrapper{position:absolute;top:0;left:0;transform:translate(-8px,-8px)}.timeline--horizontal-top .timeline__item-tail,.timeline--horizontal-bottom .timeline__item-tail,.timeline--horizontal-alternate .timeline__item-tail{position:absolute;left:calc(50% + 5px);right:calc(-50% + 5px);width:auto;height:2px}.timeline--horizontal-top .timeline__item:last-child>.timeline__item-tail,.timeline--horizontal-bottom .timeline__item:last-child>.timeline__item-tail,.timeline--horizontal-alternate .timeline__item:last-child>.timeline__item-tail{display:none!important}.timeline--horizontal-top .timeline__item-content,.timeline--horizontal-bottom .timeline__item-content,.timeline--horizontal-alternate .timeline__item-content{text-align:center;margin-left:0;padding:var(--solely-spacing-sm) var(--solely-spacing-md)}.timeline--horizontal-top .timeline__item{min-height:80px}.timeline--horizontal-top .timeline__item-head{top:var(--solely-spacing-sm)}.timeline--horizontal-top .timeline__item-tail{top:15px}.timeline--horizontal-top .timeline__item-content{padding-top:36px;padding-bottom:var(--solely-spacing-xs)}.timeline--horizontal-bottom .timeline__item{min-height:80px}.timeline--horizontal-bottom .timeline__item-head{bottom:var(--solely-spacing-sm);top:auto}.timeline--horizontal-bottom .timeline__item-tail{bottom:15px;top:auto}.timeline--horizontal-bottom .timeline__item-content{padding-bottom:36px;padding-top:var(--solely-spacing-xs)}.timeline--horizontal-alternate .timeline__item{min-height:120px}.timeline--horizontal-alternate .timeline__item-head{top:50%;transform:translate(-50%,-50%)}.timeline--horizontal-alternate .timeline__item-tail{top:50%;transform:translateY(-50%)}.timeline--horizontal-alternate .timeline__item:nth-child(odd) .timeline__item-content{padding-top:100px;padding-bottom:var(--solely-spacing-xs)}.timeline--horizontal-alternate .timeline__item:nth-child(2n) .timeline__item-content{padding-bottom:0;padding-top:var(--solely-spacing-xs)}.timeline__item--left .timeline__item-content{text-align:right;padding-right:calc(50% + 20px);margin-left:0}.timeline__item--right .timeline__item-content{text-align:left;padding-left:calc(50% + 20px);margin-left:0}.timeline__item--top .timeline__item-content{padding-top:calc(50% + 20px);padding-bottom:var(--solely-spacing-xs)}.timeline__item--bottom .timeline__item-content{padding-bottom:calc(50% + 20px);padding-top:var(--solely-spacing-xs)}.timeline__item--pending>.timeline__item-tail{display:block!important;background-color:transparent!important;background-image:repeating-linear-gradient(to bottom,var(--timeline-tail-color) 0,var(--timeline-tail-color) 4px,transparent 4px,transparent 8px)!important;animation:timeline-tail-flow 1s linear infinite}.timeline--horizontal-top .timeline__item--pending>.timeline__item-tail,.timeline--horizontal-bottom .timeline__item--pending>.timeline__item-tail,.timeline--horizontal-alternate .timeline__item--pending>.timeline__item-tail{background-image:repeating-linear-gradient(90deg,rgba(5,5,5,.15) 0,rgba(5,5,5,.15) 4px,transparent 4px,transparent 8px)!important}.timeline__item--pending .timeline__dot{background-color:transparent!important;border-color:var(--solely-primary)!important;border-style:dashed;animation:timeline-pending-pulse 1.5s ease-in-out infinite}.timeline__item--pending .timeline__item-content{color:var(--solely-text-tertiary)}.timeline__dot--blue{border-color:var(--solely-primary)!important}.timeline__dot--green{border-color:var(--solely-success)!important}.timeline__dot--red{border-color:var(--solely-error)!important}.timeline__dot--orange{border-color:var(--solely-warning)!important}.timeline__dot--gray{border-color:var(--solely-border-color)!important}.timeline--filled .timeline__dot{border-width:0!important;background-clip:border-box}.timeline--filled .timeline__dot--blue{background-color:var(--solely-primary)!important}.timeline--filled .timeline__dot--green{background-color:var(--solely-success)!important}.timeline--filled .timeline__dot--red{background-color:var(--solely-error)!important}.timeline--filled .timeline__dot--orange{background-color:var(--solely-warning)!important}.timeline--filled .timeline__dot--gray{background-color:var(--solely-border-color)!important}.timeline__item--loading .timeline__dot{border-color:var(--solely-primary) var(--solely-primary-light) var(--solely-primary) var(--solely-primary-light);animation:timeline-loading-spin .8s linear infinite}@keyframes timeline-tail-flow{0%{background-position:0 0}to{background-position:0 16px}}@keyframes timeline-pending-pulse{0%,to{opacity:1}50%{opacity:.45}}@keyframes timeline-loading-spin{to{transform:rotate(360deg)}}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const i="*,*:before,*:after{box-sizing:border-box}:host{display:block;width:100%;font-size:var(--solely-font-size-md)}.timeline{--timeline-dot-size: 10px;--timeline-icon-size: 32px;--timeline-tail-color: var(--solely-border-color);--timeline-font-family: var(--solely-font-family);width:100%;font-family:var(--timeline-font-family);font-size:var(--solely-font-size-md);color:var(--solely-text-primary);line-height:1.5714;list-style:none;margin:0;padding:0;box-sizing:border-box}.timeline__list{position:relative;margin:0;padding:0;list-style:none}.timeline__item{position:relative;padding-bottom:20px;margin:0;list-style:none;box-sizing:border-box}.timeline__item:last-child{padding-bottom:0}.timeline__item-wrapper{display:flex;align-items:flex-start}.timeline__item-tail{position:absolute;top:16px;left:7px;width:2px;height:calc(100% - 6px);background:var(--timeline-tail-color);transition:background var(--solely-transition-duration)}.timeline__item:last-child>.timeline__item-tail{display:none}.timeline__item-head{position:relative;flex-shrink:0;width:16px;height:16px;margin-top:3px}.timeline__dot{position:absolute;top:3px;left:3px;width:var(--timeline-dot-size);height:var(--timeline-dot-size);border-radius:50%;border:2px solid var(--solely-primary);background-color:var(--solely-component-bg);background-clip:padding-box;transition:all var(--solely-transition-duration);box-sizing:border-box}.timeline__icon-wrapper{position:absolute;top:0;left:0;width:var(--timeline-icon-size);height:var(--timeline-icon-size);display:inline-flex;align-items:center;justify-content:center;background-color:var(--solely-primary-light);border:none;border-radius:50%;font-size:18px;line-height:1;color:var(--solely-primary);transform:translate(calc(-1 * (var(--timeline-icon-size) - 16px) / 2),calc(-1 * (var(--timeline-icon-size) - 16px) / 2));cursor:default;transition:all var(--solely-transition-duration)}.timeline__item-content{position:relative;flex:1 1 auto;min-width:0;margin-left:var(--solely-spacing-md);word-break:break-word}.timeline__title{display:inline-block;margin-bottom:var(--solely-spacing-xs);font-weight:500;font-size:var(--solely-font-size-md);color:var(--solely-text-primary);line-height:1.5714}.timeline__content-text{font-size:var(--solely-font-size-md);color:var(--solely-text-secondary);line-height:1.5714;word-break:break-word;margin-top:var(--solely-spacing-xs)}.timeline__time{font-size:var(--solely-font-size-md);color:var(--solely-text-tertiary);margin-top:var(--solely-spacing-xs)}.timeline--left .timeline__item-tail{left:7px}.timeline--left .timeline__item-head{left:0}.timeline--left .timeline__item-content{margin-left:var(--solely-spacing-md)}.timeline--right .timeline__item-wrapper{flex-direction:row-reverse}.timeline--right .timeline__item-tail{right:7px;left:auto}.timeline--right .timeline__item-head{right:0;left:auto}.timeline--right .timeline__item-content{margin-left:0;margin-right:var(--solely-spacing-md);text-align:right}.timeline--alternate .timeline__item{min-height:48px;overflow:visible}.timeline--alternate .timeline__item-tail{left:50%;transform:translate(-50%);top:16px}.timeline--alternate .timeline__item-wrapper{display:block;position:relative}.timeline--alternate .timeline__item-head{position:absolute;left:50%;top:0;transform:translate(-50%);z-index:
|
|
1
|
+
const i="*,*:before,*:after{box-sizing:border-box}:host{display:block;width:100%;font-size:var(--solely-font-size-md)}.timeline{--timeline-dot-size: 10px;--timeline-icon-size: 32px;--timeline-tail-color: var(--solely-border-color);--timeline-font-family: var(--solely-font-family);width:100%;font-family:var(--timeline-font-family);font-size:var(--solely-font-size-md);color:var(--solely-text-primary);line-height:1.5714;list-style:none;margin:0;padding:0;box-sizing:border-box}.timeline__list{position:relative;margin:0;padding:0;list-style:none}.timeline__item{position:relative;padding-bottom:20px;margin:0;list-style:none;box-sizing:border-box}.timeline__item:last-child{padding-bottom:0}.timeline__item-wrapper{display:flex;align-items:flex-start}.timeline__item-tail{position:absolute;top:16px;left:7px;width:2px;height:calc(100% - 6px);background:var(--timeline-tail-color);transition:background var(--solely-transition-duration)}.timeline__item:last-child>.timeline__item-tail{display:none}.timeline__item-head{position:relative;flex-shrink:0;width:16px;height:16px;margin-top:3px}.timeline__dot{position:absolute;top:3px;left:3px;width:var(--timeline-dot-size);height:var(--timeline-dot-size);border-radius:50%;border:2px solid var(--solely-primary);background-color:var(--solely-component-bg);background-clip:padding-box;transition:all var(--solely-transition-duration);box-sizing:border-box}.timeline__icon-wrapper{position:absolute;top:0;left:0;width:var(--timeline-icon-size);height:var(--timeline-icon-size);display:inline-flex;align-items:center;justify-content:center;background-color:var(--solely-primary-light);border:none;border-radius:50%;font-size:18px;line-height:1;color:var(--solely-primary);transform:translate(calc(-1 * (var(--timeline-icon-size) - 16px) / 2),calc(-1 * (var(--timeline-icon-size) - 16px) / 2));cursor:default;transition:all var(--solely-transition-duration)}.timeline__item-content{position:relative;flex:1 1 auto;min-width:0;margin-left:var(--solely-spacing-md);word-break:break-word}.timeline__title{display:inline-block;margin-bottom:var(--solely-spacing-xs);font-weight:500;font-size:var(--solely-font-size-md);color:var(--solely-text-primary);line-height:1.5714}.timeline__content-text{font-size:var(--solely-font-size-md);color:var(--solely-text-secondary);line-height:1.5714;word-break:break-word;margin-top:var(--solely-spacing-xs)}.timeline__time{font-size:var(--solely-font-size-md);color:var(--solely-text-tertiary);margin-top:var(--solely-spacing-xs)}.timeline--left .timeline__item-tail{left:7px}.timeline--left .timeline__item-head{left:0}.timeline--left .timeline__item-content{margin-left:var(--solely-spacing-md)}.timeline--right .timeline__item-wrapper{flex-direction:row-reverse}.timeline--right .timeline__item-tail{right:7px;left:auto}.timeline--right .timeline__item-head{right:0;left:auto}.timeline--right .timeline__item-content{margin-left:0;margin-right:var(--solely-spacing-md);text-align:right}.timeline--alternate .timeline__item{min-height:48px;overflow:visible}.timeline--alternate .timeline__item-tail{left:50%;transform:translate(-50%);top:16px}.timeline--alternate .timeline__item-wrapper{display:block;position:relative}.timeline--alternate .timeline__item-head{position:absolute;left:50%;top:0;transform:translate(-50%);z-index:var(--solely-z-index-timeline-dot);margin-top:3px}.timeline--alternate .timeline__item-content{width:100%;min-height:48px;box-sizing:border-box;margin-left:0;padding-top:3px}.timeline--alternate .timeline__item:nth-child(odd) .timeline__item-content{text-align:right;padding-right:calc(50% + 20px)}.timeline--alternate .timeline__item:nth-child(2n) .timeline__item-content{text-align:left;padding-left:calc(50% + 20px)}.timeline--horizontal-top,.timeline--horizontal-bottom,.timeline--horizontal-alternate{overflow-x:auto;overflow-y:hidden}.timeline--horizontal-top .timeline__list,.timeline--horizontal-bottom .timeline__list,.timeline--horizontal-alternate .timeline__list{display:flex;align-items:stretch}.timeline--horizontal-top .timeline__item,.timeline--horizontal-bottom .timeline__item,.timeline--horizontal-alternate .timeline__item{display:block;position:relative;flex:1 1 0;min-width:100px;max-width:240px;padding:0!important}.timeline--horizontal-top .timeline__item-wrapper,.timeline--horizontal-bottom .timeline__item-wrapper,.timeline--horizontal-alternate .timeline__item-wrapper{display:block;width:100%;height:100%}.timeline--horizontal-top .timeline__item-head,.timeline--horizontal-bottom .timeline__item-head,.timeline--horizontal-alternate .timeline__item-head{position:absolute;left:50%;transform:translate(-50%);z-index:var(--solely-z-index-timeline-dot);margin:0;width:16px;height:16px}.timeline--horizontal-top .timeline__dot,.timeline--horizontal-bottom .timeline__dot,.timeline--horizontal-alternate .timeline__dot{position:absolute;top:3px;left:3px}.timeline--horizontal-top .timeline__icon-wrapper,.timeline--horizontal-bottom .timeline__icon-wrapper,.timeline--horizontal-alternate .timeline__icon-wrapper{position:absolute;top:0;left:0;transform:translate(-8px,-8px)}.timeline--horizontal-top .timeline__item-tail,.timeline--horizontal-bottom .timeline__item-tail,.timeline--horizontal-alternate .timeline__item-tail{position:absolute;left:calc(50% + 5px);right:calc(-50% + 5px);width:auto;height:2px}.timeline--horizontal-top .timeline__item:last-child>.timeline__item-tail,.timeline--horizontal-bottom .timeline__item:last-child>.timeline__item-tail,.timeline--horizontal-alternate .timeline__item:last-child>.timeline__item-tail{display:none!important}.timeline--horizontal-top .timeline__item-content,.timeline--horizontal-bottom .timeline__item-content,.timeline--horizontal-alternate .timeline__item-content{text-align:center;margin-left:0;padding:var(--solely-spacing-sm) var(--solely-spacing-md)}.timeline--horizontal-top .timeline__item{min-height:80px}.timeline--horizontal-top .timeline__item-head{top:var(--solely-spacing-sm)}.timeline--horizontal-top .timeline__item-tail{top:15px}.timeline--horizontal-top .timeline__item-content{padding-top:36px;padding-bottom:var(--solely-spacing-xs)}.timeline--horizontal-bottom .timeline__item{min-height:80px}.timeline--horizontal-bottom .timeline__item-head{bottom:var(--solely-spacing-sm);top:auto}.timeline--horizontal-bottom .timeline__item-tail{bottom:15px;top:auto}.timeline--horizontal-bottom .timeline__item-content{padding-bottom:36px;padding-top:var(--solely-spacing-xs)}.timeline--horizontal-alternate .timeline__item{min-height:120px}.timeline--horizontal-alternate .timeline__item-head{top:50%;transform:translate(-50%,-50%)}.timeline--horizontal-alternate .timeline__item-tail{top:50%;transform:translateY(-50%)}.timeline--horizontal-alternate .timeline__item:nth-child(odd) .timeline__item-content{padding-top:100px;padding-bottom:var(--solely-spacing-xs)}.timeline--horizontal-alternate .timeline__item:nth-child(2n) .timeline__item-content{padding-bottom:0;padding-top:var(--solely-spacing-xs)}.timeline__item--left .timeline__item-content{text-align:right;padding-right:calc(50% + 20px);margin-left:0}.timeline__item--right .timeline__item-content{text-align:left;padding-left:calc(50% + 20px);margin-left:0}.timeline__item--top .timeline__item-content{padding-top:calc(50% + 20px);padding-bottom:var(--solely-spacing-xs)}.timeline__item--bottom .timeline__item-content{padding-bottom:calc(50% + 20px);padding-top:var(--solely-spacing-xs)}.timeline__item--pending>.timeline__item-tail{display:block!important;background-color:transparent!important;background-image:repeating-linear-gradient(to bottom,var(--timeline-tail-color) 0,var(--timeline-tail-color) 4px,transparent 4px,transparent 8px)!important;animation:timeline-tail-flow 1s linear infinite}.timeline--horizontal-top .timeline__item--pending>.timeline__item-tail,.timeline--horizontal-bottom .timeline__item--pending>.timeline__item-tail,.timeline--horizontal-alternate .timeline__item--pending>.timeline__item-tail{background-image:repeating-linear-gradient(90deg,rgba(5,5,5,.15) 0,rgba(5,5,5,.15) 4px,transparent 4px,transparent 8px)!important}.timeline__item--pending .timeline__dot{background-color:transparent!important;border-color:var(--solely-primary)!important;border-style:dashed;animation:timeline-pending-pulse 1.5s ease-in-out infinite}.timeline__item--pending .timeline__item-content{color:var(--solely-text-tertiary)}.timeline__dot--blue{border-color:var(--solely-primary)!important}.timeline__dot--green{border-color:var(--solely-success)!important}.timeline__dot--red{border-color:var(--solely-error)!important}.timeline__dot--orange{border-color:var(--solely-warning)!important}.timeline__dot--gray{border-color:var(--solely-border-color)!important}.timeline--filled .timeline__dot{border-width:0!important;background-clip:border-box}.timeline--filled .timeline__dot--blue{background-color:var(--solely-primary)!important}.timeline--filled .timeline__dot--green{background-color:var(--solely-success)!important}.timeline--filled .timeline__dot--red{background-color:var(--solely-error)!important}.timeline--filled .timeline__dot--orange{background-color:var(--solely-warning)!important}.timeline--filled .timeline__dot--gray{background-color:var(--solely-border-color)!important}.timeline__item--loading .timeline__dot{border-color:var(--solely-primary) var(--solely-primary-light) var(--solely-primary) var(--solely-primary-light);animation:timeline-loading-spin .8s linear infinite}@keyframes timeline-tail-flow{0%{background-position:0 0}to{background-position:0 16px}}@keyframes timeline-pending-pulse{0%,to{opacity:1}50%{opacity:.45}}@keyframes timeline-loading-spin{to{transform:rotate(360deg)}}";export{i as default};
|
|
@@ -160,9 +160,19 @@
|
|
|
160
160
|
--solely-z-index-table-fixed: 2;
|
|
161
161
|
--solely-z-index-table-header: 3;
|
|
162
162
|
--solely-z-index-switch-handle: 2;
|
|
163
|
-
--solely-z-index-timeline-dot:
|
|
163
|
+
--solely-z-index-timeline-dot: 2;
|
|
164
|
+
--solely-z-index-timeline-tail: 1;
|
|
165
|
+
--solely-z-index-steps-icon: 1;
|
|
166
|
+
--solely-z-index-steps-tail: 0;
|
|
164
167
|
--solely-z-index-slider-handle: 1;
|
|
165
168
|
|
|
169
|
+
/* ==================== 阴影 ==================== */
|
|
170
|
+
--solely-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
171
|
+
--solely-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
172
|
+
--solely-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
173
|
+
--solely-shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.2);
|
|
174
|
+
--solely-shadow-primary: 0 0 0 4px rgba(24, 144, 255, 0.2);
|
|
175
|
+
|
|
166
176
|
/* ==================== 遮罩层 ==================== */
|
|
167
177
|
--solely-mask-bg: rgba(0, 0, 0, 0.45);
|
|
168
178
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t,e,s,i,a,n,o,r,h,l,c,u,d,p,f,b,m,y,v,w,g,M,S,$,k=Object.defineProperty,O=t=>{throw TypeError(t)},j=(t,e,s)=>e.has(t)||O("Cannot "+s),C=(t,e,s)=>(j(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>e.has(t)?O("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),W=(t,e,s,i)=>(j(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),N=(t,e,s)=>(j(t,e,"access private method"),s);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../../shared/is-object.cjs"),D=require("../../shared/env.cjs"),P=require("../reactivity/observe.cjs"),U=require("../renderer/renderIR.cjs"),q=Symbol.for("solely.manifest"),I=class m extends HTMLElement{constructor(d={}){var f,m;super(),A(this,p),((t,e,s)=>{e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s})(this,"symbol"!=typeof(m="$refs")?m+"":m,{}),A(this,t),A(this,e),A(this,s),A(this,i),A(this,a),A(this,n),A(this,o,!1),A(this,r,!1),A(this,h,!1),A(this,l,!1),A(this,c,!1),A(this,u,!1);const v=this.constructor;W(this,t,v[q]||{tagName:"base-element"});const w=C(this,t);W(this,a,(null==(f=w.shadowDOM)?void 0:f.use)?this.attachShadow({mode:w.shadowDOM.mode||"open"}):this),N(this,p,b).call(this,d),N(this,p,y).call(this,w),queueMicrotask(()=>N(this,p,$).call(this))}static get observedAttributes(){const t=this[q];return(null==t?void 0:t.attributeMap)?Array.from(t.attributeMap.keys()):[]}get $data(){return C(this,i)}set $data(t){var e;E.isObject(t)||(t={}),t!==C(this,i)&&(null==(e=C(this,n))||e.call(this),N(this,p,b).call(this,t),N(this,p,g).call(this))}refresh(){N(this,p,g).call(this)}connectedCallback(){var i;W(this,c,!0);const n=C(this,t);if(N(this,p,$).call(this),(n.className||n.tagName||"").split(" ").forEach(t=>t&&this.classList.add(t)),N(this,p,S).call(this),n.attributeMap&&E.isObject(this.$data)){N(this,p,v).call(this);for(const[t,e]of n.attributeMap){const s=e.name;if(this.hasAttribute(t)){const i=this.getAttribute(t),a=N(this,p,w).call(this,i,e.default,e.type);this.$data[s]=a}else"default"in e&&(this.$data[s]=e.default,"boolean"===e.type&&!0===e.default&&this.setAttribute(t,""))}}N(this,p,f).call(this),C(this,s)&&!C(this,e)&&W(this,e,U.createRender(C(this,s),C(this,a),this)),C(this,u)&&(W(this,u,!1),N(this,p,g).call(this)),this.mounted(),null==(i=this.onInit)||i.call(this)}disconnectedCallback(){var e,s;W(this,c,!1);const i=C(this,t);if(!(null==(e=i.shadowDOM)?void 0:e.use)&&i.styles){const t=`solely-style-${i.tagName}`,e=C(m,d).get(t)||0;e<=1?(null==(s=document.head.querySelector(`#${t}`))||s.remove(),C(m,d).delete(t)):C(m,d).set(t,e-1)}this.unmounted()}attributeChangedCallback(e,s,i){var a;if(s===i||!E.isObject(this.$data))return;const n=null==(a=C(this,t).attributeMap)?void 0:a.get(e);if(!n)return;const o=n.name,r=this.$data[o],l=N(this,p,w).call(this,i,n.default??r,n.type);this.$data[o]=l,W(this,h,!0),this.attributeChanged(e,r,l)}emit(t,e,s){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e,...s}))}emitNative(t,e){this.dispatchEvent(new Event(t,{bubbles:!0,composed:!0,...e}))}warn(t,e){if(D.IS_DEV&&t){const t=this.tagName.toLowerCase();console.warn(`[${t}] ${e}`)}}error(t,e){if(D.IS_DEV&&t){const t=this.tagName.toLowerCase();console.error(`[${t}] ${e}`)}}onInit(){}created(){}mounted(){}beforeUpdate(){}updated(){}unmounted(){}attributeChanged(t,e,s){}beforeAttributesUpdate(){}afterAttributesUpdate(){}};t=new WeakMap,e=new WeakMap,s=new WeakMap,i=new WeakMap,a=new WeakMap,n=new WeakMap,o=new WeakMap,r=new WeakMap,h=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakSet,f=function(){const t=Object.getOwnPropertyNames(this),e=["#","_"],s=new Set(["$data","$refs","constructor","onInit","created","mounted","beforeUpdate","updated","unmounted","attributeChanged","beforeAttributesUpdate","afterAttributesUpdate","emit","refresh"]);for(const i of t){if(s.has(i))continue;if(e.some(t=>i.startsWith(t)))continue;const t=Object.getOwnPropertyDescriptor(this,i);if(!t||!("value"in t))continue;const a=t.value;let n,o=this;for(;o&&(n=Object.getOwnPropertyDescriptor(o,i),!(null==n?void 0:n.set));)o=Object.getPrototypeOf(o);(null==n?void 0:n.set)&&(delete this[i],this[i]=a)}},b=function(e){const{proxy:s,dispose:a}=P.observe(e,e=>{var s;if("set"===e.type){const{key:i,newValue:a}=e,n=C(this,t),o=String(i),r=null==(s=n.propMap)?void 0:s.get(o);(null==r?void 0:r.reflect)&&N(this,p,m).call(this,r,a)}this.emit("dataChange",{...e}),N(this,p,g).call(this)});W(this,i,s),W(this,n,a)},m=function(t,e){const s=t.name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if("boolean"===t.type)e?this.setAttribute(s,""):this.removeAttribute(s);else{const t="object"==typeof e?JSON.stringify(e):String(e);this.setAttribute(s,t)}},y=function(t){t.ir&&W(this,s,t.ir)},v=function(){const e=C(this,t);if(e.attributeMap)for(const[t,s]of e.attributeMap){if(!1===s.reactive)continue;const t=Object.getOwnPropertyDescriptor(this.constructor.prototype,s.name);if(!(null==t?void 0:t.get)&&!(null==t?void 0:t.set)){const t=Object.getOwnPropertyDescriptor(this,s.name);t&&"value"in t&&(this.$data[s.name]=t.value,delete this[s.name]),Object.defineProperty(this,s.name,{get:()=>this.$data[s.name],set:t=>{this.$data[s.name]=t},configurable:!0,enumerable:!0})}}},w=function(t,e,s){if(null===t)return"boolean"!==s&&e;switch(s){case"boolean":return!0;case"number":{const s=Number(t);return isNaN(s)?e:s}case"object":try{return JSON.parse(t)}catch(i){return console.error(`[Solely] Failed to parse object value: "${t}", using default value.`,i),e}case"array":try{const s=t.replace(/'/g,'"'),i=JSON.parse(s);return Array.isArray(i)?i:e}catch(i){return console.error(`[Solely] Failed to parse array value: "${t}", using default value.`,i),e}default:return t}},g=function(){C(this,c)?!C(this,r)&&C(this,e)&&(W(this,r,!0),queueMicrotask(()=>{W(this,r,!1),N(this,p,M).call(this)})):W(this,u,!0)},M=function(){if(!C(this,o)&&C(this,c)){W(this,o,!0);try{C(this,h)&&this.beforeAttributesUpdate(),this.beforeUpdate(),C(this,e).update(),this.updated(),C(this,h)&&(this.afterAttributesUpdate(),W(this,h,!1))}finally{W(this,o,!1)}}},S=function(){var e;const s=C(this,t);if(!s.styles)return;const i=C(this,a);if(s.sheet&&i instanceof ShadowRoot&&"adoptedStyleSheets"in i)return void(i.adoptedStyleSheets.includes(s.sheet)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,s.sheet]));const n=i instanceof ShadowRoot?i:document.head,o=`solely-style-${s.tagName}`,r=!(null==(e=s.shadowDOM)?void 0:e.use);if(!n.querySelector(`#${o}`)){const t=document.createElement("style");t.id=o,t.textContent=s.styles,n.appendChild(t)}if(r){const t=C(I,d).get(o)||0;C(I,d).set(o,t+1)}},$=function(){C(this,l)||(W(this,l,!0),this.created())},A(I,d,new Map),(()=>{if(D.IS_DEV&&"undefined"!=typeof customElements){const t=customElements.define,e=new WeakSet;customElements.define=function(s,i,a){if(I.isPrototypeOf(i)&&!e.has(i)){e.add(i);const t=i.prototype,a=["connectedCallback","disconnectedCallback","attributeChangedCallback"];for(const e of a)t[e]!==I.prototype[e]&&console.error(`[${s}] 禁止重写 ${e}(),请使用框架钩子`)}return t.call(this,s,i,a)}}})();let _=I;exports.default=_;
|
|
1
|
+
"use strict";var t,e,s,i,a,n,o,r,h,l,c,u,d,p,f,b,m,y,v,w,g,M,S,$,k=Object.defineProperty,O=t=>{throw TypeError(t)},j=(t,e,s)=>e.has(t)||O("Cannot "+s),C=(t,e,s)=>(j(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>e.has(t)?O("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),W=(t,e,s,i)=>(j(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),N=(t,e,s)=>(j(t,e,"access private method"),s);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const E=require("../../shared/is-object.cjs"),D=require("../../shared/env.cjs"),P=require("../reactivity/observe.cjs"),U=require("../renderer/renderIR.cjs"),q=Symbol.for("solely.manifest"),I=class m extends HTMLElement{constructor(d={}){var f,m;super(),A(this,p),((t,e,s)=>{e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s})(this,"symbol"!=typeof(m="$refs")?m+"":m,{}),A(this,t),A(this,e),A(this,s),A(this,i),A(this,a),A(this,n),A(this,o,!1),A(this,r,!1),A(this,h,!1),A(this,l,!1),A(this,c,!1),A(this,u,!1);const v=this.constructor;W(this,t,v[q]||{tagName:"base-element"});const w=C(this,t);W(this,a,(null==(f=w.shadowDOM)?void 0:f.use)?this.attachShadow({mode:w.shadowDOM.mode||"open"}):this),N(this,p,b).call(this,d),N(this,p,y).call(this,w),queueMicrotask(()=>N(this,p,$).call(this))}static get observedAttributes(){const t=this[q];return(null==t?void 0:t.attributeMap)?Array.from(t.attributeMap.keys()):[]}get $data(){return C(this,i)}set $data(t){var e;E.isObject(t)||(t={}),t!==C(this,i)&&(null==(e=C(this,n))||e.call(this),N(this,p,b).call(this,t),N(this,p,g).call(this))}refresh(){N(this,p,g).call(this)}connectedCallback(){var i;W(this,c,!0);const n=C(this,t);if(N(this,p,$).call(this),(n.className||n.tagName||"").split(" ").forEach(t=>t&&this.classList.add(t)),N(this,p,S).call(this),n.attributeMap&&E.isObject(this.$data)){N(this,p,v).call(this);for(const[t,e]of n.attributeMap){const s=e.name;if(this.hasAttribute(t)){const i=this.getAttribute(t),a=N(this,p,w).call(this,i,e.default,e.type);this.$data[s]=a}else"default"in e&&void 0===this.$data[s]&&(this.$data[s]=e.default,"boolean"===e.type&&!0===e.default&&this.setAttribute(t,""))}}N(this,p,f).call(this),C(this,s)&&!C(this,e)&&W(this,e,U.createRender(C(this,s),C(this,a),this)),C(this,u)&&(W(this,u,!1),N(this,p,g).call(this)),this.mounted(),null==(i=this.onInit)||i.call(this)}disconnectedCallback(){var e,s;W(this,c,!1);const i=C(this,t);if(!(null==(e=i.shadowDOM)?void 0:e.use)&&i.styles){const t=`solely-style-${i.tagName}`,e=C(m,d).get(t)||0;e<=1?(null==(s=document.head.querySelector(`#${t}`))||s.remove(),C(m,d).delete(t)):C(m,d).set(t,e-1)}this.unmounted()}attributeChangedCallback(e,s,i){var a;if(s===i||!E.isObject(this.$data))return;const n=null==(a=C(this,t).attributeMap)?void 0:a.get(e);if(!n)return;const o=n.name,r=this.$data[o],l=N(this,p,w).call(this,i,n.default??r,n.type);this.$data[o]=l,W(this,h,!0),this.attributeChanged(e,r,l)}emit(t,e,s){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e,...s}))}emitNative(t,e){this.dispatchEvent(new Event(t,{bubbles:!0,composed:!0,...e}))}warn(t,e){if(D.IS_DEV&&t){const t=this.tagName.toLowerCase();console.warn(`[${t}] ${e}`)}}error(t,e){if(D.IS_DEV&&t){const t=this.tagName.toLowerCase();console.error(`[${t}] ${e}`)}}onInit(){}created(){}mounted(){}beforeUpdate(){}updated(){}unmounted(){}attributeChanged(t,e,s){}beforeAttributesUpdate(){}afterAttributesUpdate(){}};t=new WeakMap,e=new WeakMap,s=new WeakMap,i=new WeakMap,a=new WeakMap,n=new WeakMap,o=new WeakMap,r=new WeakMap,h=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakSet,f=function(){const t=Object.getOwnPropertyNames(this),e=["#","_"],s=new Set(["$data","$refs","constructor","onInit","created","mounted","beforeUpdate","updated","unmounted","attributeChanged","beforeAttributesUpdate","afterAttributesUpdate","emit","refresh"]);for(const i of t){if(s.has(i))continue;if(e.some(t=>i.startsWith(t)))continue;const t=Object.getOwnPropertyDescriptor(this,i);if(!t||!("value"in t))continue;const a=t.value;let n,o=this;for(;o&&(n=Object.getOwnPropertyDescriptor(o,i),!(null==n?void 0:n.set));)o=Object.getPrototypeOf(o);(null==n?void 0:n.set)&&(delete this[i],this[i]=a)}},b=function(e){const{proxy:s,dispose:a}=P.observe(e,e=>{var s;if("set"===e.type){const{key:i,newValue:a}=e,n=C(this,t),o=String(i),r=null==(s=n.propMap)?void 0:s.get(o);(null==r?void 0:r.reflect)&&N(this,p,m).call(this,r,a)}this.emit("dataChange",{...e}),N(this,p,g).call(this)});W(this,i,s),W(this,n,a)},m=function(t,e){const s=t.name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if("boolean"===t.type)e?this.setAttribute(s,""):this.removeAttribute(s);else{const t="object"==typeof e?JSON.stringify(e):String(e);this.setAttribute(s,t)}},y=function(t){t.ir&&W(this,s,t.ir)},v=function(){const e=C(this,t);if(e.attributeMap)for(const[t,s]of e.attributeMap){if(!1===s.reactive)continue;const t=Object.getOwnPropertyDescriptor(this.constructor.prototype,s.name);if(!(null==t?void 0:t.get)&&!(null==t?void 0:t.set)){const t=Object.getOwnPropertyDescriptor(this,s.name);t&&"value"in t&&(this.$data[s.name]=t.value,delete this[s.name]),Object.defineProperty(this,s.name,{get:()=>this.$data[s.name],set:t=>{this.$data[s.name]=t},configurable:!0,enumerable:!0})}}},w=function(t,e,s){if(null===t)return"boolean"!==s&&e;switch(s){case"boolean":return!0;case"number":{const s=Number(t);return isNaN(s)?e:s}case"object":try{return JSON.parse(t)}catch(i){return console.error(`[Solely] Failed to parse object value: "${t}", using default value.`,i),e}case"array":try{const s=t.replace(/'/g,'"'),i=JSON.parse(s);return Array.isArray(i)?i:e}catch(i){return console.error(`[Solely] Failed to parse array value: "${t}", using default value.`,i),e}default:return t}},g=function(){C(this,c)?!C(this,r)&&C(this,e)&&(W(this,r,!0),queueMicrotask(()=>{W(this,r,!1),N(this,p,M).call(this)})):W(this,u,!0)},M=function(){if(!C(this,o)&&C(this,c)){W(this,o,!0);try{C(this,h)&&this.beforeAttributesUpdate(),this.beforeUpdate(),C(this,e).update(),this.updated(),C(this,h)&&(this.afterAttributesUpdate(),W(this,h,!1))}finally{W(this,o,!1)}}},S=function(){var e;const s=C(this,t);if(!s.styles)return;const i=C(this,a);if(s.sheet&&i instanceof ShadowRoot&&"adoptedStyleSheets"in i)return void(i.adoptedStyleSheets.includes(s.sheet)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,s.sheet]));const n=i instanceof ShadowRoot?i:document.head,o=`solely-style-${s.tagName}`,r=!(null==(e=s.shadowDOM)?void 0:e.use);if(!n.querySelector(`#${o}`)){const t=document.createElement("style");t.id=o,t.textContent=s.styles,n.appendChild(t)}if(r){const t=C(I,d).get(o)||0;C(I,d).set(o,t+1)}},$=function(){C(this,l)||(W(this,l,!0),this.created())},A(I,d,new Map),(()=>{if(D.IS_DEV&&"undefined"!=typeof customElements){const t=customElements.define,e=new WeakSet;customElements.define=function(s,i,a){if(I.isPrototypeOf(i)&&!e.has(i)){e.add(i);const t=i.prototype,a=["connectedCallback","disconnectedCallback","attributeChangedCallback"];for(const e of a)t[e]!==I.prototype[e]&&console.error(`[${s}] 禁止重写 ${e}(),请使用框架钩子`)}return t.call(this,s,i,a)}}})();let _=I;exports.default=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t,e,s,i,a,o,n,r,h,l,c,u,d,p,f,b,m,y,v,w,g,M,$,k,S=Object.defineProperty,O=t=>{throw TypeError(t)},C=(t,e,s)=>e.has(t)||O("Cannot "+s),A=(t,e,s)=>(C(t,e,"read from private field"),s?s.call(t):e.get(t)),W=(t,e,s)=>e.has(t)?O("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),j=(t,e,s,i)=>(C(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),N=(t,e,s)=>(C(t,e,"access private method"),s);import{isObject as E}from"../../shared/is-object.js";import{IS_DEV as P}from"../../shared/env.js";import{observe as U}from"../reactivity/observe.js";import{createRender as D}from"../renderer/renderIR.js";const L=Symbol.for("solely.manifest"),q=class m extends HTMLElement{constructor(d={}){var f,m;super(),W(this,p),((t,e,s)=>{e in t?S(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s})(this,"symbol"!=typeof(m="$refs")?m+"":m,{}),W(this,t),W(this,e),W(this,s),W(this,i),W(this,a),W(this,o),W(this,n,!1),W(this,r,!1),W(this,h,!1),W(this,l,!1),W(this,c,!1),W(this,u,!1);const v=this.constructor;j(this,t,v[L]||{tagName:"base-element"});const w=A(this,t);j(this,a,(null==(f=w.shadowDOM)?void 0:f.use)?this.attachShadow({mode:w.shadowDOM.mode||"open"}):this),N(this,p,b).call(this,d),N(this,p,y).call(this,w),queueMicrotask(()=>N(this,p,k).call(this))}static get observedAttributes(){const t=this[L];return(null==t?void 0:t.attributeMap)?Array.from(t.attributeMap.keys()):[]}get $data(){return A(this,i)}set $data(t){var e;E(t)||(t={}),t!==A(this,i)&&(null==(e=A(this,o))||e.call(this),N(this,p,b).call(this,t),N(this,p,g).call(this))}refresh(){N(this,p,g).call(this)}connectedCallback(){var i;j(this,c,!0);const o=A(this,t);if(N(this,p,k).call(this),(o.className||o.tagName||"").split(" ").forEach(t=>t&&this.classList.add(t)),N(this,p,$).call(this),o.attributeMap&&E(this.$data)){N(this,p,v).call(this);for(const[t,e]of o.attributeMap){const s=e.name;if(this.hasAttribute(t)){const i=this.getAttribute(t),a=N(this,p,w).call(this,i,e.default,e.type);this.$data[s]=a}else"default"in e&&(this.$data[s]=e.default,"boolean"===e.type&&!0===e.default&&this.setAttribute(t,""))}}N(this,p,f).call(this),A(this,s)&&!A(this,e)&&j(this,e,D(A(this,s),A(this,a),this)),A(this,u)&&(j(this,u,!1),N(this,p,g).call(this)),this.mounted(),null==(i=this.onInit)||i.call(this)}disconnectedCallback(){var e,s;j(this,c,!1);const i=A(this,t);if(!(null==(e=i.shadowDOM)?void 0:e.use)&&i.styles){const t=`solely-style-${i.tagName}`,e=A(m,d).get(t)||0;e<=1?(null==(s=document.head.querySelector(`#${t}`))||s.remove(),A(m,d).delete(t)):A(m,d).set(t,e-1)}this.unmounted()}attributeChangedCallback(e,s,i){var a;if(s===i||!E(this.$data))return;const o=null==(a=A(this,t).attributeMap)?void 0:a.get(e);if(!o)return;const n=o.name,r=this.$data[n],l=N(this,p,w).call(this,i,o.default??r,o.type);this.$data[n]=l,j(this,h,!0),this.attributeChanged(e,r,l)}emit(t,e,s){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e,...s}))}emitNative(t,e){this.dispatchEvent(new Event(t,{bubbles:!0,composed:!0,...e}))}warn(t,e){if(P&&t){const t=this.tagName.toLowerCase();console.warn(`[${t}] ${e}`)}}error(t,e){if(P&&t){const t=this.tagName.toLowerCase();console.error(`[${t}] ${e}`)}}onInit(){}created(){}mounted(){}beforeUpdate(){}updated(){}unmounted(){}attributeChanged(t,e,s){}beforeAttributesUpdate(){}afterAttributesUpdate(){}};t=new WeakMap,e=new WeakMap,s=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,n=new WeakMap,r=new WeakMap,h=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakSet,f=function(){const t=Object.getOwnPropertyNames(this),e=["#","_"],s=new Set(["$data","$refs","constructor","onInit","created","mounted","beforeUpdate","updated","unmounted","attributeChanged","beforeAttributesUpdate","afterAttributesUpdate","emit","refresh"]);for(const i of t){if(s.has(i))continue;if(e.some(t=>i.startsWith(t)))continue;const t=Object.getOwnPropertyDescriptor(this,i);if(!t||!("value"in t))continue;const a=t.value;let o,n=this;for(;n&&(o=Object.getOwnPropertyDescriptor(n,i),!(null==o?void 0:o.set));)n=Object.getPrototypeOf(n);(null==o?void 0:o.set)&&(delete this[i],this[i]=a)}},b=function(e){const{proxy:s,dispose:a}=U(e,e=>{var s;if("set"===e.type){const{key:i,newValue:a}=e,o=A(this,t),n=String(i),r=null==(s=o.propMap)?void 0:s.get(n);(null==r?void 0:r.reflect)&&N(this,p,m).call(this,r,a)}this.emit("dataChange",{...e}),N(this,p,g).call(this)});j(this,i,s),j(this,o,a)},m=function(t,e){const s=t.name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if("boolean"===t.type)e?this.setAttribute(s,""):this.removeAttribute(s);else{const t="object"==typeof e?JSON.stringify(e):String(e);this.setAttribute(s,t)}},y=function(t){t.ir&&j(this,s,t.ir)},v=function(){const e=A(this,t);if(e.attributeMap)for(const[t,s]of e.attributeMap){if(!1===s.reactive)continue;const t=Object.getOwnPropertyDescriptor(this.constructor.prototype,s.name);if(!(null==t?void 0:t.get)&&!(null==t?void 0:t.set)){const t=Object.getOwnPropertyDescriptor(this,s.name);t&&"value"in t&&(this.$data[s.name]=t.value,delete this[s.name]),Object.defineProperty(this,s.name,{get:()=>this.$data[s.name],set:t=>{this.$data[s.name]=t},configurable:!0,enumerable:!0})}}},w=function(t,e,s){if(null===t)return"boolean"!==s&&e;switch(s){case"boolean":return!0;case"number":{const s=Number(t);return isNaN(s)?e:s}case"object":try{return JSON.parse(t)}catch(i){return console.error(`[Solely] Failed to parse object value: "${t}", using default value.`,i),e}case"array":try{const s=t.replace(/'/g,'"'),i=JSON.parse(s);return Array.isArray(i)?i:e}catch(i){return console.error(`[Solely] Failed to parse array value: "${t}", using default value.`,i),e}default:return t}},g=function(){A(this,c)?!A(this,r)&&A(this,e)&&(j(this,r,!0),queueMicrotask(()=>{j(this,r,!1),N(this,p,M).call(this)})):j(this,u,!0)},M=function(){if(!A(this,n)&&A(this,c)){j(this,n,!0);try{A(this,h)&&this.beforeAttributesUpdate(),this.beforeUpdate(),A(this,e).update(),this.updated(),A(this,h)&&(this.afterAttributesUpdate(),j(this,h,!1))}finally{j(this,n,!1)}}},$=function(){var e;const s=A(this,t);if(!s.styles)return;const i=A(this,a);if(s.sheet&&i instanceof ShadowRoot&&"adoptedStyleSheets"in i)return void(i.adoptedStyleSheets.includes(s.sheet)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,s.sheet]));const o=i instanceof ShadowRoot?i:document.head,n=`solely-style-${s.tagName}`,r=!(null==(e=s.shadowDOM)?void 0:e.use);if(!o.querySelector(`#${n}`)){const t=document.createElement("style");t.id=n,t.textContent=s.styles,o.appendChild(t)}if(r){const t=A(q,d).get(n)||0;A(q,d).set(n,t+1)}},k=function(){A(this,l)||(j(this,l,!0),this.created())},W(q,d,new Map),(()=>{if(P&&"undefined"!=typeof customElements){const t=customElements.define,e=new WeakSet;customElements.define=function(s,i,a){if(q.isPrototypeOf(i)&&!e.has(i)){e.add(i);const t=i.prototype,a=["connectedCallback","disconnectedCallback","attributeChangedCallback"];for(const e of a)t[e]!==q.prototype[e]&&console.error(`[${s}] 禁止重写 ${e}(),请使用框架钩子`)}return t.call(this,s,i,a)}}})();let x=q;export{x as default};
|
|
1
|
+
var t,e,s,i,a,o,n,r,h,l,c,u,d,p,f,b,m,y,v,w,g,M,$,k,S=Object.defineProperty,O=t=>{throw TypeError(t)},C=(t,e,s)=>e.has(t)||O("Cannot "+s),A=(t,e,s)=>(C(t,e,"read from private field"),s?s.call(t):e.get(t)),W=(t,e,s)=>e.has(t)?O("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),j=(t,e,s,i)=>(C(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),N=(t,e,s)=>(C(t,e,"access private method"),s);import{isObject as E}from"../../shared/is-object.js";import{IS_DEV as P}from"../../shared/env.js";import{observe as U}from"../reactivity/observe.js";import{createRender as D}from"../renderer/renderIR.js";const L=Symbol.for("solely.manifest"),q=class m extends HTMLElement{constructor(d={}){var f,m;super(),W(this,p),((t,e,s)=>{e in t?S(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s})(this,"symbol"!=typeof(m="$refs")?m+"":m,{}),W(this,t),W(this,e),W(this,s),W(this,i),W(this,a),W(this,o),W(this,n,!1),W(this,r,!1),W(this,h,!1),W(this,l,!1),W(this,c,!1),W(this,u,!1);const v=this.constructor;j(this,t,v[L]||{tagName:"base-element"});const w=A(this,t);j(this,a,(null==(f=w.shadowDOM)?void 0:f.use)?this.attachShadow({mode:w.shadowDOM.mode||"open"}):this),N(this,p,b).call(this,d),N(this,p,y).call(this,w),queueMicrotask(()=>N(this,p,k).call(this))}static get observedAttributes(){const t=this[L];return(null==t?void 0:t.attributeMap)?Array.from(t.attributeMap.keys()):[]}get $data(){return A(this,i)}set $data(t){var e;E(t)||(t={}),t!==A(this,i)&&(null==(e=A(this,o))||e.call(this),N(this,p,b).call(this,t),N(this,p,g).call(this))}refresh(){N(this,p,g).call(this)}connectedCallback(){var i;j(this,c,!0);const o=A(this,t);if(N(this,p,k).call(this),(o.className||o.tagName||"").split(" ").forEach(t=>t&&this.classList.add(t)),N(this,p,$).call(this),o.attributeMap&&E(this.$data)){N(this,p,v).call(this);for(const[t,e]of o.attributeMap){const s=e.name;if(this.hasAttribute(t)){const i=this.getAttribute(t),a=N(this,p,w).call(this,i,e.default,e.type);this.$data[s]=a}else"default"in e&&void 0===this.$data[s]&&(this.$data[s]=e.default,"boolean"===e.type&&!0===e.default&&this.setAttribute(t,""))}}N(this,p,f).call(this),A(this,s)&&!A(this,e)&&j(this,e,D(A(this,s),A(this,a),this)),A(this,u)&&(j(this,u,!1),N(this,p,g).call(this)),this.mounted(),null==(i=this.onInit)||i.call(this)}disconnectedCallback(){var e,s;j(this,c,!1);const i=A(this,t);if(!(null==(e=i.shadowDOM)?void 0:e.use)&&i.styles){const t=`solely-style-${i.tagName}`,e=A(m,d).get(t)||0;e<=1?(null==(s=document.head.querySelector(`#${t}`))||s.remove(),A(m,d).delete(t)):A(m,d).set(t,e-1)}this.unmounted()}attributeChangedCallback(e,s,i){var a;if(s===i||!E(this.$data))return;const o=null==(a=A(this,t).attributeMap)?void 0:a.get(e);if(!o)return;const n=o.name,r=this.$data[n],l=N(this,p,w).call(this,i,o.default??r,o.type);this.$data[n]=l,j(this,h,!0),this.attributeChanged(e,r,l)}emit(t,e,s){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e,...s}))}emitNative(t,e){this.dispatchEvent(new Event(t,{bubbles:!0,composed:!0,...e}))}warn(t,e){if(P&&t){const t=this.tagName.toLowerCase();console.warn(`[${t}] ${e}`)}}error(t,e){if(P&&t){const t=this.tagName.toLowerCase();console.error(`[${t}] ${e}`)}}onInit(){}created(){}mounted(){}beforeUpdate(){}updated(){}unmounted(){}attributeChanged(t,e,s){}beforeAttributesUpdate(){}afterAttributesUpdate(){}};t=new WeakMap,e=new WeakMap,s=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,n=new WeakMap,r=new WeakMap,h=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakSet,f=function(){const t=Object.getOwnPropertyNames(this),e=["#","_"],s=new Set(["$data","$refs","constructor","onInit","created","mounted","beforeUpdate","updated","unmounted","attributeChanged","beforeAttributesUpdate","afterAttributesUpdate","emit","refresh"]);for(const i of t){if(s.has(i))continue;if(e.some(t=>i.startsWith(t)))continue;const t=Object.getOwnPropertyDescriptor(this,i);if(!t||!("value"in t))continue;const a=t.value;let o,n=this;for(;n&&(o=Object.getOwnPropertyDescriptor(n,i),!(null==o?void 0:o.set));)n=Object.getPrototypeOf(n);(null==o?void 0:o.set)&&(delete this[i],this[i]=a)}},b=function(e){const{proxy:s,dispose:a}=U(e,e=>{var s;if("set"===e.type){const{key:i,newValue:a}=e,o=A(this,t),n=String(i),r=null==(s=o.propMap)?void 0:s.get(n);(null==r?void 0:r.reflect)&&N(this,p,m).call(this,r,a)}this.emit("dataChange",{...e}),N(this,p,g).call(this)});j(this,i,s),j(this,o,a)},m=function(t,e){const s=t.name.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if("boolean"===t.type)e?this.setAttribute(s,""):this.removeAttribute(s);else{const t="object"==typeof e?JSON.stringify(e):String(e);this.setAttribute(s,t)}},y=function(t){t.ir&&j(this,s,t.ir)},v=function(){const e=A(this,t);if(e.attributeMap)for(const[t,s]of e.attributeMap){if(!1===s.reactive)continue;const t=Object.getOwnPropertyDescriptor(this.constructor.prototype,s.name);if(!(null==t?void 0:t.get)&&!(null==t?void 0:t.set)){const t=Object.getOwnPropertyDescriptor(this,s.name);t&&"value"in t&&(this.$data[s.name]=t.value,delete this[s.name]),Object.defineProperty(this,s.name,{get:()=>this.$data[s.name],set:t=>{this.$data[s.name]=t},configurable:!0,enumerable:!0})}}},w=function(t,e,s){if(null===t)return"boolean"!==s&&e;switch(s){case"boolean":return!0;case"number":{const s=Number(t);return isNaN(s)?e:s}case"object":try{return JSON.parse(t)}catch(i){return console.error(`[Solely] Failed to parse object value: "${t}", using default value.`,i),e}case"array":try{const s=t.replace(/'/g,'"'),i=JSON.parse(s);return Array.isArray(i)?i:e}catch(i){return console.error(`[Solely] Failed to parse array value: "${t}", using default value.`,i),e}default:return t}},g=function(){A(this,c)?!A(this,r)&&A(this,e)&&(j(this,r,!0),queueMicrotask(()=>{j(this,r,!1),N(this,p,M).call(this)})):j(this,u,!0)},M=function(){if(!A(this,n)&&A(this,c)){j(this,n,!0);try{A(this,h)&&this.beforeAttributesUpdate(),this.beforeUpdate(),A(this,e).update(),this.updated(),A(this,h)&&(this.afterAttributesUpdate(),j(this,h,!1))}finally{j(this,n,!1)}}},$=function(){var e;const s=A(this,t);if(!s.styles)return;const i=A(this,a);if(s.sheet&&i instanceof ShadowRoot&&"adoptedStyleSheets"in i)return void(i.adoptedStyleSheets.includes(s.sheet)||(i.adoptedStyleSheets=[...i.adoptedStyleSheets,s.sheet]));const o=i instanceof ShadowRoot?i:document.head,n=`solely-style-${s.tagName}`,r=!(null==(e=s.shadowDOM)?void 0:e.use);if(!o.querySelector(`#${n}`)){const t=document.createElement("style");t.id=n,t.textContent=s.styles,o.appendChild(t)}if(r){const t=A(q,d).get(n)||0;A(q,d).set(n,t+1)}},k=function(){A(this,l)||(j(this,l,!0),this.created())},W(q,d,new Map),(()=>{if(P&&"undefined"!=typeof customElements){const t=customElements.define,e=new WeakSet;customElements.define=function(s,i,a){if(q.isPrototypeOf(i)&&!e.has(i)){e.add(i);const t=i.prototype,a=["connectedCallback","disconnectedCallback","attributeChangedCallback"];for(const e of a)t[e]!==q.prototype[e]&&console.error(`[${s}] 禁止重写 ${e}(),请使用框架钩子`)}return t.call(this,s,i,a)}}})();let x=q;export{x as default};
|
|
@@ -19,6 +19,15 @@ export interface PropDescriptor {
|
|
|
19
19
|
*/
|
|
20
20
|
reactive?: boolean;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Model 配置:定义 s-model 双向绑定的属性名和事件名
|
|
24
|
+
*/
|
|
25
|
+
export interface ModelConfig {
|
|
26
|
+
/** 要绑定的属性名,默认为 'value' */
|
|
27
|
+
prop?: string;
|
|
28
|
+
/** 监听的事件名,默认为 'change' */
|
|
29
|
+
event?: string;
|
|
30
|
+
}
|
|
22
31
|
/**
|
|
23
32
|
* Manifest:组件声明配置
|
|
24
33
|
* -------------------------------------------------------
|
|
@@ -40,6 +49,8 @@ export interface Manifest {
|
|
|
40
49
|
className?: string;
|
|
41
50
|
/** 注册的自定义元素标签名 */
|
|
42
51
|
tagName: string;
|
|
52
|
+
/** s-model 双向绑定配置 */
|
|
53
|
+
model?: ModelConfig;
|
|
43
54
|
}
|
|
44
55
|
/** 框架内部使用的运行时版本 */
|
|
45
56
|
export interface InternalManifest extends Manifest {
|
package/package.json
CHANGED