@opentiny/vue-divider 2.11.0-alpha.0 → 3.11.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -61,7 +61,7 @@ var Divider = defineComponent({
61
61
  });
62
62
  }
63
63
  });
64
- var version = "2.11.0-alpha.0";
64
+ var version = "3.11.0-alpha.0";
65
65
  Divider.install = function(Vue) {
66
66
  Vue.component(Divider.name, Divider);
67
67
  };
package/lib/pc.js CHANGED
@@ -1,80 +1,52 @@
1
1
  import { renderless, api } from "@opentiny/vue-renderless/divider/vue";
2
2
  import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";
3
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
4
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
5
- if (render) {
6
- options.render = render;
7
- options.staticRenderFns = staticRenderFns;
8
- options._compiled = true;
9
- }
10
- if (functionalTemplate) {
11
- options.functional = true;
12
- }
13
- if (scopeId) {
14
- options._scopeId = "data-v-" + scopeId;
15
- }
16
- var hook;
17
- if (moduleIdentifier) {
18
- hook = function hook2(context) {
19
- context = context || // cached call
20
- this.$vnode && this.$vnode.ssrContext || // stateful
21
- this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
22
- if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
23
- context = __VUE_SSR_CONTEXT__;
24
- }
25
- if (injectStyles) {
26
- injectStyles.call(this, context);
27
- }
28
- if (context && context._registeredComponents) {
29
- context._registeredComponents.add(moduleIdentifier);
30
- }
3
+ import { openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createCommentVNode } from "vue";
4
+ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
5
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
6
+ if (it)
7
+ return (it = it.call(o)).next.bind(it);
8
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
9
+ if (it)
10
+ o = it;
11
+ var i = 0;
12
+ return function() {
13
+ if (i >= o.length)
14
+ return { done: true };
15
+ return { done: false, value: o[i++] };
31
16
  };
32
- options._ssrRegister = hook;
33
- } else if (injectStyles) {
34
- hook = shadowMode ? function() {
35
- injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
36
- } : injectStyles;
37
17
  }
38
- if (hook) {
39
- if (options.functional) {
40
- options._injectStyles = hook;
41
- var originalRender = options.render;
42
- options.render = function renderWithStyleInjection(h, context) {
43
- hook.call(context);
44
- return originalRender(h, context);
45
- };
46
- } else {
47
- var existing = options.beforeCreate;
48
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
49
- }
50
- }
51
- return {
52
- exports: scriptExports,
53
- options
54
- };
18
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
55
19
  }
56
-
57
- var render = function render2() {
58
- var _vm = this;
59
- var _h = _vm.$createElement;
60
- var _c = _vm._self._c || _h;
61
- return _c("div", {
62
- class: ["tiny-divider", "tiny-divider--" + _vm.direction],
63
- style: {
64
- "border-top-style": _vm.direction === "horizontal" ? _vm.borderStyle : "",
65
- "border-left-style": _vm.direction === "vertical" ? _vm.borderStyle : "",
66
- "border-color": _vm.color
67
- }
68
- }, [_vm.slots.default ? _c("div", {
69
- class: ["tiny-divider__text", "is-" + _vm.contentPosition],
70
- style: {
71
- color: _vm.contentColor,
72
- "background-color": _vm.contentBackgroundColor
73
- }
74
- }, [_vm._t("default")], 2) : _vm._e()]);
20
+ function _unsupportedIterableToArray(o, minLen) {
21
+ if (!o)
22
+ return;
23
+ if (typeof o === "string")
24
+ return _arrayLikeToArray(o, minLen);
25
+ var n = Object.prototype.toString.call(o).slice(8, -1);
26
+ if (n === "Object" && o.constructor)
27
+ n = o.constructor.name;
28
+ if (n === "Map" || n === "Set")
29
+ return Array.from(o);
30
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
31
+ return _arrayLikeToArray(o, minLen);
32
+ }
33
+ function _arrayLikeToArray(arr, len) {
34
+ if (len == null || len > arr.length)
35
+ len = arr.length;
36
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
37
+ arr2[i] = arr[i];
38
+ return arr2;
39
+ }
40
+ var _export_sfc = function _export_sfc2(sfc, props) {
41
+ var target = sfc.__vccOpts || sfc;
42
+ for (var _iterator = _createForOfIteratorHelperLoose_tiny(props), _step; !(_step = _iterator()).done; ) {
43
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
44
+ target[key] = val;
45
+ }
46
+ return target;
75
47
  };
76
- var staticRenderFns = [];
77
- var __vue2_script = defineComponent({
48
+
49
+ var _sfc_main = defineComponent({
78
50
  props: [].concat(props, ["direction", "color", "borderStyle", "contentPosition", "contentColor", "contentBackgroundColor"]),
79
51
  setup: function setup(props2, context) {
80
52
  return _setup({
@@ -85,16 +57,36 @@ var __vue2_script = defineComponent({
85
57
  });
86
58
  }
87
59
  });
88
- var __cssModules = {};
89
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null);
90
- function __vue2_injectStyles(context) {
91
- for (var o in __cssModules) {
92
- this[o] = __cssModules[o];
93
- }
60
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
61
+ return openBlock(), createElementBlock(
62
+ "div",
63
+ {
64
+ class: normalizeClass(["tiny-divider", "tiny-divider--" + _ctx.direction]),
65
+ style: normalizeStyle({
66
+ "border-top-style": _ctx.direction === "horizontal" ? _ctx.borderStyle : "",
67
+ "border-left-style": _ctx.direction === "vertical" ? _ctx.borderStyle : "",
68
+ "border-color": _ctx.color
69
+ })
70
+ },
71
+ [_ctx.slots.default ? (openBlock(), createElementBlock(
72
+ "div",
73
+ {
74
+ key: 0,
75
+ class: normalizeClass(["tiny-divider__text", "is-" + _ctx.contentPosition]),
76
+ style: normalizeStyle({
77
+ color: _ctx.contentColor,
78
+ "background-color": _ctx.contentBackgroundColor
79
+ })
80
+ },
81
+ [renderSlot(_ctx.$slots, "default")],
82
+ 6
83
+ /* CLASS, STYLE */
84
+ )) : createCommentVNode("v-if", true)],
85
+ 6
86
+ /* CLASS, STYLE */
87
+ );
94
88
  }
95
- var pc = /* @__PURE__ */ function() {
96
- return __component__.exports;
97
- }();
89
+ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
98
90
  export {
99
91
  pc as default
100
92
  };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@opentiny/vue-divider",
3
- "version": "2.11.0-alpha.0",
3
+ "version": "3.11.0-alpha.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentiny/vue-common": "~2.11.0",
11
- "@opentiny/vue-renderless": "~3.11.0"
10
+ "@opentiny/vue-common": "~3.11.0-alpha.0",
11
+ "@opentiny/vue-renderless": "~3.11.0-alpha.0"
12
12
  },
13
13
  "license": "MIT",
14
14
  "types": "index.d.ts"
package/src/index.d.ts CHANGED
@@ -1,5 +1,87 @@
1
+ import type { PropType } from '@opentiny/vue-common';
1
2
  export type DirectionType = 'horizontal' | 'vertical';
2
3
  export type BorderStyleType = 'dashed' | 'solid';
3
4
  export type ContentPositionType = 'left' | 'right' | 'center';
4
- declare const _default: any;
5
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
6
+ _constants: {
7
+ type: ObjectConstructor;
8
+ default: () => {};
9
+ };
10
+ direction: {
11
+ type: PropType<DirectionType>;
12
+ default: string;
13
+ };
14
+ color: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ borderStyle: {
19
+ type: PropType<BorderStyleType>;
20
+ default: string;
21
+ };
22
+ contentPosition: {
23
+ type: PropType<ContentPositionType>;
24
+ default: string;
25
+ };
26
+ contentColor: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ contentBackgroundColor: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ tiny_mode: StringConstructor;
35
+ tiny_mode_root: BooleanConstructor;
36
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
37
+ tiny_renderless: FunctionConstructor;
38
+ tiny_theme: StringConstructor;
39
+ tiny_chart_theme: ObjectConstructor;
40
+ }, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
41
+ [key: string]: any;
42
+ }>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
43
+ _constants: {
44
+ type: ObjectConstructor;
45
+ default: () => {};
46
+ };
47
+ direction: {
48
+ type: PropType<DirectionType>;
49
+ default: string;
50
+ };
51
+ color: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ borderStyle: {
56
+ type: PropType<BorderStyleType>;
57
+ default: string;
58
+ };
59
+ contentPosition: {
60
+ type: PropType<ContentPositionType>;
61
+ default: string;
62
+ };
63
+ contentColor: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ contentBackgroundColor: {
68
+ type: StringConstructor;
69
+ default: string;
70
+ };
71
+ tiny_mode: StringConstructor;
72
+ tiny_mode_root: BooleanConstructor;
73
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
74
+ tiny_renderless: FunctionConstructor;
75
+ tiny_theme: StringConstructor;
76
+ tiny_chart_theme: ObjectConstructor;
77
+ }>>, {
78
+ color: string;
79
+ tiny_mode_root: boolean;
80
+ _constants: Record<string, any>;
81
+ direction: DirectionType;
82
+ contentPosition: ContentPositionType;
83
+ borderStyle: BorderStyleType;
84
+ contentColor: string;
85
+ contentBackgroundColor: string;
86
+ }, {}>;
5
87
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,2 +1,53 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ color?: any;
3
+ tiny_mode?: any;
4
+ tiny_mode_root?: any;
5
+ tiny_template?: any;
6
+ tiny_renderless?: any;
7
+ _constants?: any;
8
+ tiny_theme?: any;
9
+ tiny_chart_theme?: any;
10
+ direction?: any;
11
+ contentPosition?: any;
12
+ borderStyle?: any;
13
+ contentColor?: any;
14
+ contentBackgroundColor?: any;
15
+ }>, {
16
+ t: (this: any, path: any, options?: any) => any;
17
+ vm: any;
18
+ f: (props: any, attrs?: {}) => {};
19
+ a: (attrs: any, filters: any, include: any) => {};
20
+ d: (props: any) => void;
21
+ dp: (props: any) => void;
22
+ gcls: (key: any) => any;
23
+ m: (...cssClasses: any[]) => string;
24
+ }, any, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
25
+ color?: any;
26
+ tiny_mode?: any;
27
+ tiny_mode_root?: any;
28
+ tiny_template?: any;
29
+ tiny_renderless?: any;
30
+ _constants?: any;
31
+ tiny_theme?: any;
32
+ tiny_chart_theme?: any;
33
+ direction?: any;
34
+ contentPosition?: any;
35
+ borderStyle?: any;
36
+ contentColor?: any;
37
+ contentBackgroundColor?: any;
38
+ }>>>, {
39
+ readonly color?: any;
40
+ readonly tiny_mode?: any;
41
+ readonly tiny_mode_root?: any;
42
+ readonly tiny_template?: any;
43
+ readonly tiny_renderless?: any;
44
+ readonly _constants?: any;
45
+ readonly tiny_theme?: any;
46
+ readonly tiny_chart_theme?: any;
47
+ readonly direction?: any;
48
+ readonly contentPosition?: any;
49
+ readonly borderStyle?: any;
50
+ readonly contentColor?: any;
51
+ readonly contentBackgroundColor?: any;
52
+ }, {}>;
2
53
  export default _default;