@fangzhongya/vue-archive 0.0.74 → 0.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,17 @@
1
- import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from '../../../vue/dist/vue.esm-bundler.js';
2
- declare const _default: DefineComponent<ExtractPropTypes<{
3
- name: {
4
- type: StringConstructor;
5
- };
6
- html: {
7
- type: StringConstructor;
8
- default(): string;
9
- };
10
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
11
- refresh: (...args: any[]) => void;
12
- }, string, PublicProps, Readonly< ExtractPropTypes<{
13
- name: {
14
- type: StringConstructor;
15
- };
16
- html: {
17
- type: StringConstructor;
18
- default(): string;
19
- };
20
- }>> & Readonly<{
21
- onRefresh?: ((...args: any[]) => any) | undefined;
22
- }>, {
23
- html: string;
24
- }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
25
- export default _default;
1
+ import { ObjStr, ObjUnk } from '../../config';
2
+ import { SpecObjs, Spec } from '../../utils/index';
3
+ export declare function getHmtl(propsname: string, param: {
4
+ [key: string]: SpecObjs[];
5
+ }, value: ObjUnk, slotValue?: ObjStr, propsText?: ObjStr, exposeText?: ObjUnk): Promise<string>;
6
+ export declare function setValStringify(v: unknown, key: string, propsText?: ObjStr): string | Promise<string>;
7
+ type SelectsObj = {
8
+ label: string;
9
+ prop: unknown;
10
+ };
11
+ export declare function getSpecType(val: Spec): {
12
+ arr: SelectsObj[];
13
+ type: string;
14
+ dataType: string[];
15
+ };
16
+ export declare function getDefaultValue(obj: Spec, is?: boolean): any;
17
+ export {};
@@ -16,3 +16,44 @@ export declare function getHtml(parent: Element, obj: CreateStateOptions): Edito
16
16
  export declare function getJson(parent: Element, obj: CreateStateOptions): EditorView;
17
17
  export declare function getCss(parent: Element, obj: CreateStateOptions): EditorView;
18
18
  export {};
19
+ >): Promise<T[]>;
20
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
21
+ readonly [Symbol.species]: ArrayConstructor;
22
+ };
23
+ };
24
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
25
+ "update:modelValue": (...args: any[]) => void;
26
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
27
+ modelValue: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ format: {
32
+ type: StringConstructor;
33
+ };
34
+ options: {
35
+ type: {
36
+ (arrayLength: number): string[];
37
+ (...items: string[]): string[];
38
+ new (arrayLength: number): string[];
39
+ new (...items: string[]): string[];
40
+ isArray(arg: any): arg is any[];
41
+ readonly prototype: any[];
42
+ from<T>(arrayLike: ArrayLike<T>): T[];
43
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
44
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
45
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
46
+ of<T>(...items: T[]): T[];
47
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
48
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
49
+ readonly [Symbol.species]: ArrayConstructor;
50
+ };
51
+ };
52
+ }>> & Readonly<{
53
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
54
+ }>, {
55
+ modelValue: string;
56
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {
57
+ refText: HTMLDivElement;
58
+ }, HTMLDivElement>;
59
+ export default _default;
@@ -3,54 +3,3 @@ export declare function getJs(parent: HTMLElement, value: string): monaco.editor
3
3
  export declare function getHtml(parent: HTMLElement, value: string): monaco.editor.IStandaloneCodeEditor;
4
4
  export declare function getJson(parent: HTMLElement, value: string): monaco.editor.IStandaloneCodeEditor;
5
5
  export declare function getCss(parent: HTMLElement, value: string): monaco.editor.IStandaloneCodeEditor;
6
- ]): string[];
7
- new (arrayLength: number): string[];
8
- new (...items: string[]): string[];
9
- isArray(arg: any): arg is any[];
10
- readonly prototype: any[];
11
- from<T>(arrayLike: ArrayLike<T>): T[];
12
- from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
13
- from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
14
- from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
15
- of<T>(...items: T[]): T[];
16
- fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
17
- fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
18
- readonly [Symbol.species]: ArrayConstructor;
19
- };
20
- };
21
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
22
- "update:modelValue": (...args: any[]) => void;
23
- }, string, PublicProps, Readonly< ExtractPropTypes<{
24
- modelValue: {
25
- type: StringConstructor;
26
- default: string;
27
- };
28
- format: {
29
- type: StringConstructor;
30
- };
31
- options: {
32
- type: {
33
- (arrayLength: number): string[];
34
- (...items: string[]): string[];
35
- new (arrayLength: number): string[];
36
- new (...items: string[]): string[];
37
- isArray(arg: any): arg is any[];
38
- readonly prototype: any[];
39
- from<T>(arrayLike: ArrayLike<T>): T[];
40
- from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
41
- from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
42
- from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
43
- of<T>(...items: T[]): T[];
44
- fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
45
- fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
46
- readonly [Symbol.species]: ArrayConstructor;
47
- };
48
- };
49
- }>> & Readonly<{
50
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
51
- }>, {
52
- modelValue: string;
53
- }, {}, {}, {}, string, ComponentProvideOptions, true, {
54
- refText: HTMLDivElement;
55
- }, HTMLDivElement>;
56
- export default _default;
@@ -1,5 +1,5 @@
1
- "use strict";const t=require("vue"),m=require("../../../../../directives/adjust/index.cjs"),l=require("./editor.cjs"),d=require("./init.cjs"),v={class:"editor-div"},p=t.defineComponent({__name:"editor",props:{modelValue:{type:String,default:`
1
+ "use strict";const t=require("vue"),m=require("../../../../../directives/adjust/index.cjs"),r=require("./editor.cjs"),d={class:"editor-div"},v=t.defineComponent({__name:"editor",props:{modelValue:{type:String,default:`
2
2
 
3
3
 
4
4
 
5
- `},format:{type:String},options:{type:Array}},emits:["update:modelValue"],setup(n,{emit:u}){const e=n,i=u,s=t.ref(),r=t.shallowRef();function c(){d.init();const o=e.modelValue;e.format==="js"||e.format==="ts"?r.value=l.getJs(s.value,o):e.format==="css"||e.format==="scss"?r.value=l.getCss(s.value,o):e.format==="html"||e.format==="vue"?r.value=l.getHtml(s.value,o):e.format==="json"&&(r.value=l.getJson(s.value,o))}function f(o){o&&i("update:modelValue",o)}return t.watch(()=>e.modelValue,()=>{r.value?.setValue(e.modelValue)}),t.onMounted(()=>{c(),r.value?.onDidBlurEditorText(o=>{if(r.value){const a=r.value.getValue();f(a)}})}),(o,a)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",v,[t.createElementVNode("div",{class:"editor-code",ref_key:"refText",ref:s},null,512)])),[[t.unref(m),{bottom:{}}]])}});module.exports=p;
5
+ `},format:{type:String},options:{type:Array}},emits:["update:modelValue"],setup(u,{emit:n}){const e=u,i=n,s=t.ref(),l=t.shallowRef();function c(){const o=e.modelValue;e.format==="js"||e.format==="ts"?l.value=r.getJs(s.value,o):e.format==="css"||e.format==="scss"?l.value=r.getCss(s.value,o):e.format==="html"||e.format==="vue"?l.value=r.getHtml(s.value,o):e.format==="json"&&(l.value=r.getJson(s.value,o))}function f(o){o&&i("update:modelValue",o)}return t.watch(()=>e.modelValue,()=>{l.value?.setValue(e.modelValue)}),t.onMounted(()=>{c(),l.value?.onDidBlurEditorText(o=>{if(l.value){const a=l.value.getValue();f(a)}})}),(o,a)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",d,[t.createElementVNode("div",{class:"editor-code",ref_key:"refText",ref:s},null,512)])),[[t.unref(m),{bottom:{}}]])}});module.exports=v;
@@ -1,8 +1,7 @@
1
1
  import { defineComponent as m, ref as f, shallowRef as c, watch as d, onMounted as v, withDirectives as p, createElementBlock as V, openBlock as _, createElementVNode as g, unref as h } from "vue";
2
2
  import x from "../../../../../directives/adjust/index.js";
3
3
  import { getJs as y, getCss as B, getHtml as j, getJson as k } from "./editor.js";
4
- import { init as w } from "./init.js";
5
- const E = { class: "editor-div" }, J = /* @__PURE__ */ m({
4
+ const w = { class: "editor-div" }, C = /* @__PURE__ */ m({
6
5
  __name: "editor",
7
6
  props: {
8
7
  modelValue: {
@@ -23,12 +22,11 @@ const E = { class: "editor-div" }, J = /* @__PURE__ */ m({
23
22
  emits: ["update:modelValue"],
24
23
  setup(r, { emit: s }) {
25
24
  const e = r, u = s, l = f(), o = c();
26
- function i() {
27
- w();
25
+ function n() {
28
26
  const t = e.modelValue;
29
27
  e.format === "js" || e.format === "ts" ? o.value = y(l.value, t) : e.format === "css" || e.format === "scss" ? o.value = B(l.value, t) : e.format === "html" || e.format === "vue" ? o.value = j(l.value, t) : e.format === "json" && (o.value = k(l.value, t));
30
28
  }
31
- function n(t) {
29
+ function i(t) {
32
30
  t && u("update:modelValue", t);
33
31
  }
34
32
  return d(
@@ -37,13 +35,13 @@ const E = { class: "editor-div" }, J = /* @__PURE__ */ m({
37
35
  o.value?.setValue(e.modelValue);
38
36
  }
39
37
  ), v(() => {
40
- i(), o.value?.onDidBlurEditorText((t) => {
38
+ n(), o.value?.onDidBlurEditorText((t) => {
41
39
  if (o.value) {
42
40
  const a = o.value.getValue();
43
- n(a);
41
+ i(a);
44
42
  }
45
43
  });
46
- }), (t, a) => p((_(), V("div", E, [
44
+ }), (t, a) => p((_(), V("div", w, [
47
45
  g("div", {
48
46
  class: "editor-code",
49
47
  ref_key: "refText",
@@ -57,5 +55,5 @@ const E = { class: "editor-div" }, J = /* @__PURE__ */ m({
57
55
  }
58
56
  });
59
57
  export {
60
- J as default
58
+ C as default
61
59
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-archive",
3
3
  "private": false,
4
- "version": "0.0.74",
4
+ "version": "0.0.75",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("monaco-editor/esm/vs/editor/editor.main");function e(o){const r="/node_modules/monaco-editor/esm/vs/",t=new Worker(`${r}${o}.js?type=module&worker_file`,{type:"module"});return t.onerror=()=>{},t.postMessage(""),t}const n=e("editor/editor.worker"),i=e("language/json/json.worker"),c=e("language/css/css.worker"),u=e("language/html/html.worker"),g=e("language/typescript/ts.worker");function a(){self.MonacoEnvironment={getWorker(o,r){return r==="json"?i:r==="css"||r==="scss"||r==="less"?c:r==="html"||r==="handlebars"||r==="razor"?u:r==="typescript"||r==="javascript"?g:n}},s.languages.typescript.typescriptDefaults.setEagerModelSync(!0)}exports.init=a;
@@ -1,19 +0,0 @@
1
- import { languages as s } from "monaco-editor/esm/vs/editor/editor.main";
2
- function e(t) {
3
- const r = "/node_modules/monaco-editor/esm/vs/", o = new Worker(`${r}${t}.js?type=module&worker_file`, {
4
- type: "module"
5
- });
6
- return o.onerror = () => {
7
- }, o.postMessage(""), o;
8
- }
9
- const n = e("editor/editor.worker"), c = e("language/json/json.worker"), i = e("language/css/css.worker"), u = e("language/html/html.worker"), k = e("language/typescript/ts.worker");
10
- function p() {
11
- self.MonacoEnvironment = {
12
- getWorker(t, r) {
13
- return r === "json" ? c : r === "css" || r === "scss" || r === "less" ? i : r === "html" || r === "handlebars" || r === "razor" ? u : r === "typescript" || r === "javascript" ? k : n;
14
- }
15
- }, s.typescript.typescriptDefaults.setEagerModelSync(!0);
16
- }
17
- export {
18
- p as init
19
- };