hwpkit-dev 0.0.3 → 0.0.5

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/ .npmignore CHANGED
@@ -1,4 +1,5 @@
1
1
  node_modules
2
+ dist
2
3
  *.hml
3
4
  *.hml.md
4
5
  *.hwpx
package/README.md CHANGED
@@ -23,14 +23,14 @@
23
23
 
24
24
  ## 변환 지원 현황
25
25
 
26
- | 입력 \ 출력 | HWPX | DOCX | Markdown |
27
- |------------|:----:|:----:|:--------:|
28
- | **HWPX** | - | O | O |
29
- | **HWP** | □ | O | O |
30
- | **DOCX** | O | - | O |
31
- | **Markdown** ||| - |
32
-
33
- > 한글 소프트웨어서는 작동이 안됨 (수정중)
26
+ | 입력 \ 출력 | HWPX | HWP | DOCX |
27
+ |------------|:----:|:----:|:------:|
28
+ | **HWPX** | O | X | O |
29
+ | **HWP** | O | X | O |
30
+ | **DOCX** | O | X | O |
31
+ | **Markdown** |O | X ||
32
+
33
+ > 한글 2022기준 hwpx는 정상적으로 열림
34
34
  ---
35
35
 
36
36
  ## 설치
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- type Align = 'left' | 'center' | 'right' | 'justify';
1
+ type Align = 'left' | 'center' | 'right' | 'justify' | 'distribute' | 'distribute_space';
2
2
  type ImgWrap = 'inline' | 'square' | 'tight' | 'through' | 'none' | 'behind' | 'front' | 'topAndBottom';
3
3
  type ImgHorzAlign = 'left' | 'center' | 'right';
4
4
  type ImgVertAlign = 'top' | 'center' | 'bottom';
@@ -38,6 +38,7 @@ interface ParaProps {
38
38
  align?: Align;
39
39
  heading?: Heading;
40
40
  styleId?: string;
41
+ hwpStyleId?: number;
41
42
  indentPt?: number;
42
43
  indentRightPt?: number;
43
44
  firstLineIndentPt?: number;
@@ -49,6 +50,8 @@ interface ParaProps {
49
50
  listLv?: number;
50
51
  listOrd?: boolean;
51
52
  listMark?: string;
53
+ verAlign?: 'baseline' | 'top' | 'center' | 'bottom';
54
+ lineWrap?: 'break' | 'squeeze' | 'keep';
52
55
  }
53
56
  interface Stroke {
54
57
  kind: StrokeKind;
@@ -131,7 +134,7 @@ interface PbNode {
131
134
  }
132
135
  interface PageNumNode {
133
136
  tag: 'pagenum';
134
- format?: 'decimal' | 'roman' | 'romanCaps';
137
+ format?: 'decimal' | 'roman' | 'romanCaps' | 'total';
135
138
  }
136
139
  interface ImgNode {
137
140
  tag: 'img';
@@ -155,7 +158,7 @@ interface LinkNode {
155
158
  interface ParaNode {
156
159
  tag: 'para';
157
160
  props: ParaProps;
158
- kids: (SpanNode | ImgNode | LinkNode | GridNode)[];
161
+ kids: (SpanNode | ImgNode | LinkNode | GridNode | PageNumNode)[];
159
162
  }
160
163
  interface CellNode {
161
164
  tag: 'cell';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- type Align = 'left' | 'center' | 'right' | 'justify';
1
+ type Align = 'left' | 'center' | 'right' | 'justify' | 'distribute' | 'distribute_space';
2
2
  type ImgWrap = 'inline' | 'square' | 'tight' | 'through' | 'none' | 'behind' | 'front' | 'topAndBottom';
3
3
  type ImgHorzAlign = 'left' | 'center' | 'right';
4
4
  type ImgVertAlign = 'top' | 'center' | 'bottom';
@@ -38,6 +38,7 @@ interface ParaProps {
38
38
  align?: Align;
39
39
  heading?: Heading;
40
40
  styleId?: string;
41
+ hwpStyleId?: number;
41
42
  indentPt?: number;
42
43
  indentRightPt?: number;
43
44
  firstLineIndentPt?: number;
@@ -49,6 +50,8 @@ interface ParaProps {
49
50
  listLv?: number;
50
51
  listOrd?: boolean;
51
52
  listMark?: string;
53
+ verAlign?: 'baseline' | 'top' | 'center' | 'bottom';
54
+ lineWrap?: 'break' | 'squeeze' | 'keep';
52
55
  }
53
56
  interface Stroke {
54
57
  kind: StrokeKind;
@@ -131,7 +134,7 @@ interface PbNode {
131
134
  }
132
135
  interface PageNumNode {
133
136
  tag: 'pagenum';
134
- format?: 'decimal' | 'roman' | 'romanCaps';
137
+ format?: 'decimal' | 'roman' | 'romanCaps' | 'total';
135
138
  }
136
139
  interface ImgNode {
137
140
  tag: 'img';
@@ -155,7 +158,7 @@ interface LinkNode {
155
158
  interface ParaNode {
156
159
  tag: 'para';
157
160
  props: ParaProps;
158
- kids: (SpanNode | ImgNode | LinkNode | GridNode)[];
161
+ kids: (SpanNode | ImgNode | LinkNode | GridNode | PageNumNode)[];
159
162
  }
160
163
  interface CellNode {
161
164
  tag: 'cell';