@fangzhongya/vue-archive 0.1.6 → 0.1.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.
@@ -4408,6 +4408,7 @@ var tslot = [
4408
4408
 
4409
4409
  // packages/node/index.ts
4410
4410
  var Fang;
4411
+ var annotat = {};
4411
4412
  function h3(div, sx, v) {
4412
4413
  if (isArray(v)) {
4413
4414
  v = v.join("");
@@ -4589,6 +4590,10 @@ async function getCompoData(value) {
4589
4590
  const arr = [];
4590
4591
  arr.push("# " + getName(value));
4591
4592
  await getNotes2(value.key).then((obj2) => {
4593
+ annotat[value.key] = {
4594
+ key: value,
4595
+ value: obj2
4596
+ };
4592
4597
  let { titles: titles2, propss, slots, emitss, exposes } = obj2;
4593
4598
  const dom = setHtml(
4594
4599
  "div",
@@ -4694,6 +4699,7 @@ function getlistDom(arr, t, list) {
4694
4699
  return arrs;
4695
4700
  }
4696
4701
  async function nodeInit(c, callback) {
4702
+ annotat = {};
4697
4703
  configObj = userConfig(c);
4698
4704
  configObj._callback_ = callback;
4699
4705
  if (typeof c.setHtml === "function") {
@@ -4705,6 +4711,7 @@ async function nodeInit(c, callback) {
4705
4711
  const element = comps[index];
4706
4712
  await getCompoData(element);
4707
4713
  }
4714
+ return annotat;
4708
4715
  }
4709
4716
  // Annotate the CommonJS export names for ESM import in node:
4710
4717
  0 && (module.exports = {
@@ -143,6 +143,6 @@ interface NodeConfig extends Config {
143
143
  [key: string]: any;
144
144
  }
145
145
 
146
- declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<void>;
146
+ declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<Record<string, any>>;
147
147
 
148
148
  export { type ComponentsObj, type TextObj, nodeInit };
@@ -143,6 +143,6 @@ interface NodeConfig extends Config {
143
143
  [key: string]: any;
144
144
  }
145
145
 
146
- declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<void>;
146
+ declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<Record<string, any>>;
147
147
 
148
148
  export { type ComponentsObj, type TextObj, nodeInit };
@@ -4390,6 +4390,7 @@ var tslot = [
4390
4390
 
4391
4391
  // packages/node/index.ts
4392
4392
  var Fang;
4393
+ var annotat = {};
4393
4394
  function h3(div, sx, v) {
4394
4395
  if (isArray(v)) {
4395
4396
  v = v.join("");
@@ -4571,6 +4572,10 @@ async function getCompoData(value) {
4571
4572
  const arr = [];
4572
4573
  arr.push("# " + getName(value));
4573
4574
  await getNotes2(value.key).then((obj2) => {
4575
+ annotat[value.key] = {
4576
+ key: value,
4577
+ value: obj2
4578
+ };
4574
4579
  let { titles: titles2, propss, slots, emitss, exposes } = obj2;
4575
4580
  const dom = setHtml(
4576
4581
  "div",
@@ -4676,6 +4681,7 @@ function getlistDom(arr, t, list) {
4676
4681
  return arrs;
4677
4682
  }
4678
4683
  async function nodeInit(c, callback) {
4684
+ annotat = {};
4679
4685
  configObj = userConfig(c);
4680
4686
  configObj._callback_ = callback;
4681
4687
  if (typeof c.setHtml === "function") {
@@ -4687,6 +4693,7 @@ async function nodeInit(c, callback) {
4687
4693
  const element = comps[index];
4688
4694
  await getCompoData(element);
4689
4695
  }
4696
+ return annotat;
4690
4697
  }
4691
4698
  export {
4692
4699
  nodeInit
@@ -1,22 +1,24 @@
1
- import { ObjStr, ObjUnk } from '../../config';
2
- import { SpecObjs, Spec } from '../../utils/index';
3
- import { DataType } from './util';
4
- export declare function getHmtl(propsname: string, param: {
5
- [key: string]: SpecObjs[];
6
- }, value: ObjUnk, slotValue?: ObjStr, propsText?: ObjStr, exposeText?: ObjUnk): Promise<string>;
7
- export declare function setValStringify(v: unknown, key: string, propsText?: ObjStr): string | Promise<string>;
8
- type SelectsObj = {
9
- label: string;
10
- prop: unknown;
11
- };
12
- export declare function getSpecType(val: Spec): {
13
- arr: SelectsObj[];
14
- type: string;
15
- dataType: DataType[];
16
- };
17
- export declare function getDefaultValue(obj: Spec, is?: boolean): any;
18
- export {};
19
- fined;
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;
20
22
  }>, {
21
23
  html: string;
22
24
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
@@ -4,4 +4,4 @@ interface NodeConfig extends Config {
4
4
  [key: string]: any;
5
5
  }
6
6
  export type { TextObj, ComponentsObj };
7
- export declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<void>;
7
+ export declare function nodeInit(c: NodeConfig, callback: (mls: ComponentsObj[]) => void): Promise<Record<string, any>>;
@@ -0,0 +1,37 @@
1
+ type Spec = {
2
+ tag: string;
3
+ name: string;
4
+ default?: string;
5
+ type: string;
6
+ optional: boolean;
7
+ description: string;
8
+ selectable: string;
9
+ problems?: unknown;
10
+ source?: unknown;
11
+ } & {
12
+ [key: string]: string;
13
+ };
14
+ interface Block {
15
+ description: string;
16
+ tags: Spec[];
17
+ source: unknown;
18
+ problems: unknown;
19
+ }
20
+ interface Specs {
21
+ [key: string]: Spec;
22
+ }
23
+ interface Descriptions {
24
+ descriptions: string;
25
+ }
26
+ type SpecObjs = Descriptions & Specs;
27
+ type NotesObj = {
28
+ titles: SpecObjs[];
29
+ propss: SpecObjs[];
30
+ slots: SpecObjs[];
31
+ emitss: SpecObjs[];
32
+ exposes: SpecObjs[];
33
+ [key: string]: any[];
34
+ };
35
+ export declare function getTextNotes(text: string): Block[] | undefined;
36
+ export declare function getNotesText(text: string): NotesObj;
37
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-archive",
3
3
  "private": false,
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "type": "module",
6
6
  "description ": "vue 组件注释生成文档",
7
7
  "author": "fangzhongya ",