@holyer-lib/ui 0.0.6 → 0.0.7

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/ui.cjs.js CHANGED
@@ -14,13 +14,21 @@ function __$styleInject(css) {
14
14
  return css;
15
15
  }
16
16
 
17
- //
18
- //
19
- //
20
- //
21
- //
22
- //
17
+ function __$styleInject(css) {
18
+ if (!css) return;
23
19
 
20
+ if (typeof window == 'undefined') return;
21
+ var style = document.createElement('style');
22
+ style.setAttribute('media', 'screen');
23
+
24
+ style.innerHTML = css;
25
+ document.head.appendChild(style);
26
+ return css;
27
+ }
28
+
29
+ __$styleInject(".hi-title {\n font-size: 24px;\n font-weight: bold;\n margin: 16px 0;\n border-left: 4px solid var(--td-brand-color);\n}\n");
30
+
31
+ //
24
32
  var script = {
25
33
  name: 'HiTitle',
26
34
  props: {
@@ -29,7 +37,9 @@ var script = {
29
37
  default: '标题'
30
38
  }
31
39
  },
32
- data() {}
40
+ data() {
41
+ return {};
42
+ }
33
43
  };
34
44
 
35
45
  function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
@@ -107,59 +117,6 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
107
117
  return script;
108
118
  }
109
119
 
110
- const isOldIE = typeof navigator !== 'undefined' &&
111
- /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
112
- function createInjector(context) {
113
- return (id, style) => addStyle(id, style);
114
- }
115
- let HEAD;
116
- const styles = {};
117
- function addStyle(id, css) {
118
- const group = isOldIE ? css.media || 'default' : id;
119
- const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
120
- if (!style.ids.has(id)) {
121
- style.ids.add(id);
122
- let code = css.source;
123
- if (css.map) {
124
- // https://developer.chrome.com/devtools/docs/javascript-debugging
125
- // this makes source maps inside style tags work properly in Chrome
126
- code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
127
- // http://stackoverflow.com/a/26603875
128
- code +=
129
- '\n/*# sourceMappingURL=data:application/json;base64,' +
130
- btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
131
- ' */';
132
- }
133
- if (!style.element) {
134
- style.element = document.createElement('style');
135
- style.element.type = 'text/css';
136
- if (css.media)
137
- style.element.setAttribute('media', css.media);
138
- if (HEAD === undefined) {
139
- HEAD = document.head || document.getElementsByTagName('head')[0];
140
- }
141
- HEAD.appendChild(style.element);
142
- }
143
- if ('styleSheet' in style.element) {
144
- style.styles.push(code);
145
- style.element.styleSheet.cssText = style.styles
146
- .filter(Boolean)
147
- .join('\n');
148
- }
149
- else {
150
- const index = style.ids.size - 1;
151
- const textNode = document.createTextNode(code);
152
- const nodes = style.element.childNodes;
153
- if (nodes[index])
154
- style.element.removeChild(nodes[index]);
155
- if (nodes.length)
156
- style.element.insertBefore(textNode, nodes[index]);
157
- else
158
- style.element.appendChild(textNode);
159
- }
160
- }
161
- }
162
-
163
120
  /* script */
164
121
  const __vue_script__ = script;
165
122
 
@@ -168,25 +125,30 @@ var __vue_render__ = function () {
168
125
  var _vm = this;
169
126
  var _h = _vm.$createElement;
170
127
  var _c = _vm._self._c || _h;
171
- return _c("div", { staticClass: "hi-title" }, [
172
- _vm._v("\n " + _vm._s(_vm.content) + "\n"),
173
- ])
128
+ return _c(
129
+ "div",
130
+ { staticClass: "hi-title" },
131
+ [
132
+ _vm._t("default", function () {
133
+ return [_vm._v(_vm._s(_vm.content))]
134
+ }),
135
+ ],
136
+ 2
137
+ )
174
138
  };
175
139
  var __vue_staticRenderFns__ = [];
176
140
  __vue_render__._withStripped = true;
177
141
 
178
142
  /* style */
179
- const __vue_inject_styles__ = function (inject) {
180
- if (!inject) return
181
- inject("data-v-03a3ffda_0", { source: "\n.title[data-v-03a3ffda] {\n text-align: center;\n margin: 20px 0;\n}\n", map: {"version":3,"sources":["/home/runner/work/holyer-lib/holyer-lib/packages/ui/title/src/index.vue"],"names":[],"mappings":";AAoBA;EACA,kBAAA;EACA,cAAA;AACA","file":"index.vue","sourcesContent":["<template>\n <div class=\"hi-title\">\n {{ content }}\n </div>\n</template>\n\n<script>\nexport default {\n name: 'HiTitle',\n props: {\n content: {\n type: String,\n default: '标题'\n }\n },\n data() {}\n};\n</script>\n\n<style scoped>\n.title {\n text-align: center;\n margin: 20px 0;\n}\n</style>\n"]}, media: undefined });
182
-
183
- };
143
+ const __vue_inject_styles__ = undefined;
184
144
  /* scoped */
185
- const __vue_scope_id__ = "data-v-03a3ffda";
145
+ const __vue_scope_id__ = undefined;
186
146
  /* module identifier */
187
147
  const __vue_module_identifier__ = undefined;
188
148
  /* functional template */
189
149
  const __vue_is_functional_template__ = false;
150
+ /* style inject */
151
+
190
152
  /* style inject SSR */
191
153
 
192
154
  /* style inject shadow dom */
@@ -201,7 +163,7 @@ __vue_render__._withStripped = true;
201
163
  __vue_is_functional_template__,
202
164
  __vue_module_identifier__,
203
165
  false,
204
- createInjector,
166
+ undefined,
205
167
  undefined,
206
168
  undefined
207
169
  );
package/dist/ui.esm.js CHANGED
@@ -10,13 +10,21 @@ function __$styleInject(css) {
10
10
  return css;
11
11
  }
12
12
 
13
- //
14
- //
15
- //
16
- //
17
- //
18
- //
13
+ function __$styleInject(css) {
14
+ if (!css) return;
19
15
 
16
+ if (typeof window == 'undefined') return;
17
+ var style = document.createElement('style');
18
+ style.setAttribute('media', 'screen');
19
+
20
+ style.innerHTML = css;
21
+ document.head.appendChild(style);
22
+ return css;
23
+ }
24
+
25
+ __$styleInject(".hi-title {\n font-size: 24px;\n font-weight: bold;\n margin: 16px 0;\n border-left: 4px solid var(--td-brand-color);\n}\n");
26
+
27
+ //
20
28
  var script = {
21
29
  name: 'HiTitle',
22
30
  props: {
@@ -25,7 +33,9 @@ var script = {
25
33
  default: '标题'
26
34
  }
27
35
  },
28
- data() {}
36
+ data() {
37
+ return {};
38
+ }
29
39
  };
30
40
 
31
41
  function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
@@ -103,59 +113,6 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
103
113
  return script;
104
114
  }
105
115
 
106
- const isOldIE = typeof navigator !== 'undefined' &&
107
- /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
108
- function createInjector(context) {
109
- return (id, style) => addStyle(id, style);
110
- }
111
- let HEAD;
112
- const styles = {};
113
- function addStyle(id, css) {
114
- const group = isOldIE ? css.media || 'default' : id;
115
- const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
116
- if (!style.ids.has(id)) {
117
- style.ids.add(id);
118
- let code = css.source;
119
- if (css.map) {
120
- // https://developer.chrome.com/devtools/docs/javascript-debugging
121
- // this makes source maps inside style tags work properly in Chrome
122
- code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
123
- // http://stackoverflow.com/a/26603875
124
- code +=
125
- '\n/*# sourceMappingURL=data:application/json;base64,' +
126
- btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
127
- ' */';
128
- }
129
- if (!style.element) {
130
- style.element = document.createElement('style');
131
- style.element.type = 'text/css';
132
- if (css.media)
133
- style.element.setAttribute('media', css.media);
134
- if (HEAD === undefined) {
135
- HEAD = document.head || document.getElementsByTagName('head')[0];
136
- }
137
- HEAD.appendChild(style.element);
138
- }
139
- if ('styleSheet' in style.element) {
140
- style.styles.push(code);
141
- style.element.styleSheet.cssText = style.styles
142
- .filter(Boolean)
143
- .join('\n');
144
- }
145
- else {
146
- const index = style.ids.size - 1;
147
- const textNode = document.createTextNode(code);
148
- const nodes = style.element.childNodes;
149
- if (nodes[index])
150
- style.element.removeChild(nodes[index]);
151
- if (nodes.length)
152
- style.element.insertBefore(textNode, nodes[index]);
153
- else
154
- style.element.appendChild(textNode);
155
- }
156
- }
157
- }
158
-
159
116
  /* script */
160
117
  const __vue_script__ = script;
161
118
 
@@ -164,25 +121,30 @@ var __vue_render__ = function () {
164
121
  var _vm = this;
165
122
  var _h = _vm.$createElement;
166
123
  var _c = _vm._self._c || _h;
167
- return _c("div", { staticClass: "hi-title" }, [
168
- _vm._v("\n " + _vm._s(_vm.content) + "\n"),
169
- ])
124
+ return _c(
125
+ "div",
126
+ { staticClass: "hi-title" },
127
+ [
128
+ _vm._t("default", function () {
129
+ return [_vm._v(_vm._s(_vm.content))]
130
+ }),
131
+ ],
132
+ 2
133
+ )
170
134
  };
171
135
  var __vue_staticRenderFns__ = [];
172
136
  __vue_render__._withStripped = true;
173
137
 
174
138
  /* style */
175
- const __vue_inject_styles__ = function (inject) {
176
- if (!inject) return
177
- inject("data-v-03a3ffda_0", { source: "\n.title[data-v-03a3ffda] {\n text-align: center;\n margin: 20px 0;\n}\n", map: {"version":3,"sources":["/home/runner/work/holyer-lib/holyer-lib/packages/ui/title/src/index.vue"],"names":[],"mappings":";AAoBA;EACA,kBAAA;EACA,cAAA;AACA","file":"index.vue","sourcesContent":["<template>\n <div class=\"hi-title\">\n {{ content }}\n </div>\n</template>\n\n<script>\nexport default {\n name: 'HiTitle',\n props: {\n content: {\n type: String,\n default: '标题'\n }\n },\n data() {}\n};\n</script>\n\n<style scoped>\n.title {\n text-align: center;\n margin: 20px 0;\n}\n</style>\n"]}, media: undefined });
178
-
179
- };
139
+ const __vue_inject_styles__ = undefined;
180
140
  /* scoped */
181
- const __vue_scope_id__ = "data-v-03a3ffda";
141
+ const __vue_scope_id__ = undefined;
182
142
  /* module identifier */
183
143
  const __vue_module_identifier__ = undefined;
184
144
  /* functional template */
185
145
  const __vue_is_functional_template__ = false;
146
+ /* style inject */
147
+
186
148
  /* style inject SSR */
187
149
 
188
150
  /* style inject shadow dom */
@@ -197,7 +159,7 @@ __vue_render__._withStripped = true;
197
159
  __vue_is_functional_template__,
198
160
  __vue_module_identifier__,
199
161
  false,
200
- createInjector,
162
+ undefined,
201
163
  undefined,
202
164
  undefined
203
165
  );
package/dist/ui.umd.js CHANGED
@@ -16,13 +16,21 @@
16
16
  return css;
17
17
  }
18
18
 
19
- //
20
- //
21
- //
22
- //
23
- //
24
- //
19
+ function __$styleInject(css) {
20
+ if (!css) return;
25
21
 
22
+ if (typeof window == 'undefined') return;
23
+ var style = document.createElement('style');
24
+ style.setAttribute('media', 'screen');
25
+
26
+ style.innerHTML = css;
27
+ document.head.appendChild(style);
28
+ return css;
29
+ }
30
+
31
+ __$styleInject(".hi-title {\n font-size: 24px;\n font-weight: bold;\n margin: 16px 0;\n border-left: 4px solid var(--td-brand-color);\n}\n");
32
+
33
+ //
26
34
  var script = {
27
35
  name: 'HiTitle',
28
36
  props: {
@@ -31,7 +39,9 @@
31
39
  default: '标题'
32
40
  }
33
41
  },
34
- data() {}
42
+ data() {
43
+ return {};
44
+ }
35
45
  };
36
46
 
37
47
  function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
@@ -109,59 +119,6 @@
109
119
  return script;
110
120
  }
111
121
 
112
- const isOldIE = typeof navigator !== 'undefined' &&
113
- /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
114
- function createInjector(context) {
115
- return (id, style) => addStyle(id, style);
116
- }
117
- let HEAD;
118
- const styles = {};
119
- function addStyle(id, css) {
120
- const group = isOldIE ? css.media || 'default' : id;
121
- const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
122
- if (!style.ids.has(id)) {
123
- style.ids.add(id);
124
- let code = css.source;
125
- if (css.map) {
126
- // https://developer.chrome.com/devtools/docs/javascript-debugging
127
- // this makes source maps inside style tags work properly in Chrome
128
- code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
129
- // http://stackoverflow.com/a/26603875
130
- code +=
131
- '\n/*# sourceMappingURL=data:application/json;base64,' +
132
- btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
133
- ' */';
134
- }
135
- if (!style.element) {
136
- style.element = document.createElement('style');
137
- style.element.type = 'text/css';
138
- if (css.media)
139
- style.element.setAttribute('media', css.media);
140
- if (HEAD === undefined) {
141
- HEAD = document.head || document.getElementsByTagName('head')[0];
142
- }
143
- HEAD.appendChild(style.element);
144
- }
145
- if ('styleSheet' in style.element) {
146
- style.styles.push(code);
147
- style.element.styleSheet.cssText = style.styles
148
- .filter(Boolean)
149
- .join('\n');
150
- }
151
- else {
152
- const index = style.ids.size - 1;
153
- const textNode = document.createTextNode(code);
154
- const nodes = style.element.childNodes;
155
- if (nodes[index])
156
- style.element.removeChild(nodes[index]);
157
- if (nodes.length)
158
- style.element.insertBefore(textNode, nodes[index]);
159
- else
160
- style.element.appendChild(textNode);
161
- }
162
- }
163
- }
164
-
165
122
  /* script */
166
123
  const __vue_script__ = script;
167
124
 
@@ -170,25 +127,30 @@
170
127
  var _vm = this;
171
128
  var _h = _vm.$createElement;
172
129
  var _c = _vm._self._c || _h;
173
- return _c("div", { staticClass: "hi-title" }, [
174
- _vm._v("\n " + _vm._s(_vm.content) + "\n"),
175
- ])
130
+ return _c(
131
+ "div",
132
+ { staticClass: "hi-title" },
133
+ [
134
+ _vm._t("default", function () {
135
+ return [_vm._v(_vm._s(_vm.content))]
136
+ }),
137
+ ],
138
+ 2
139
+ )
176
140
  };
177
141
  var __vue_staticRenderFns__ = [];
178
142
  __vue_render__._withStripped = true;
179
143
 
180
144
  /* style */
181
- const __vue_inject_styles__ = function (inject) {
182
- if (!inject) return
183
- inject("data-v-03a3ffda_0", { source: "\n.title[data-v-03a3ffda] {\n text-align: center;\n margin: 20px 0;\n}\n", map: {"version":3,"sources":["/home/runner/work/holyer-lib/holyer-lib/packages/ui/title/src/index.vue"],"names":[],"mappings":";AAoBA;EACA,kBAAA;EACA,cAAA;AACA","file":"index.vue","sourcesContent":["<template>\n <div class=\"hi-title\">\n {{ content }}\n </div>\n</template>\n\n<script>\nexport default {\n name: 'HiTitle',\n props: {\n content: {\n type: String,\n default: '标题'\n }\n },\n data() {}\n};\n</script>\n\n<style scoped>\n.title {\n text-align: center;\n margin: 20px 0;\n}\n</style>\n"]}, media: undefined });
184
-
185
- };
145
+ const __vue_inject_styles__ = undefined;
186
146
  /* scoped */
187
- const __vue_scope_id__ = "data-v-03a3ffda";
147
+ const __vue_scope_id__ = undefined;
188
148
  /* module identifier */
189
149
  const __vue_module_identifier__ = undefined;
190
150
  /* functional template */
191
151
  const __vue_is_functional_template__ = false;
152
+ /* style inject */
153
+
192
154
  /* style inject SSR */
193
155
 
194
156
  /* style inject shadow dom */
@@ -203,7 +165,7 @@
203
165
  __vue_is_functional_template__,
204
166
  __vue_module_identifier__,
205
167
  false,
206
- createInjector,
168
+ undefined,
207
169
  undefined,
208
170
  undefined
209
171
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holyer-lib/ui",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "main": "dist/ui.cjs.js",
5
5
  "module": "dist/ui.esm.js",
6
6
  "unpkg": "dist/ui.umd.js",
@@ -11,7 +11,7 @@
11
11
  "access": "public"
12
12
  },
13
13
  "dependencies": {
14
- "@holyer-lib/title": "0.0.6"
14
+ "@holyer-lib/title": "1.0.0"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "vue": "2.6.14"