Skip to content

Commit

Permalink
fix: enter a new era
Browse files Browse the repository at this point in the history
  • Loading branch information
tefkah committed Mar 9, 2023
1 parent 1f35009 commit 22a4a10
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 194 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
"rules": {
"no-var": "warn",
"@typescript-eslint/no-empty-interface": "warn"
}
},
{
"files": ["*.ts", "*.tsx"],
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './lib/ooxast'
export * from './lib/ooxml/wordprocessingml/main'
export * as Math from './lib/ooxml/officeDocument/math'
export * from './lib/ooxast.js'
export * from './lib/ooxml/wordprocessingml/main.js'
export * as Math from './lib/ooxml/officeDocument/math.js'
2 changes: 1 addition & 1 deletion src/lib/ooxast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type {
XastLiteral as Literal,
XastAttributes as Attributes,
}
import { document, Text } from './ooxml/wordprocessingml/main'
import { document, Text } from './ooxml/wordprocessingml/main.js'

export type Root = XastRoot & {
/**
Expand Down
67 changes: 11 additions & 56 deletions src/lib/ooxml/drawingml/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Primitive from '../../xml-primitives'
import * as r from '../officeDocument/relationships'
import * as s from '../officeDocument/sharedTypes'
import { RequiredMap } from '../../ooxast'
import * as Primitive from '../../xml-primitives.js'
import * as r from '../officeDocument/relationships.js'
import * as s from '../officeDocument/sharedTypes.js'
import { RequiredMap } from '../../ooxast.js'

// Source files:
// http://localhost:3000/dml-main.xsd
Expand Down Expand Up @@ -3316,11 +3316,7 @@ export type AnimationBuildTypeVal = 'allAtOnce'

export type AnimationChartBuildTypeVal = string

export type AnimationChartOnlyBuildTypeVal =
| 'series'
| 'category'
| 'seriesEl'
| 'categoryEl'
export type AnimationChartOnlyBuildTypeVal = 'series' | 'category' | 'seriesEl' | 'categoryEl'

export type AnimationDgmBuildTypeVal = string

Expand Down Expand Up @@ -3355,12 +3351,7 @@ export type BlackWhiteModeVal =

export type BlendModeVal = 'over' | 'mult' | 'screen' | 'darken' | 'lighten'

export type BlipCompressionVal =
| 'email'
| 'screen'
| 'print'
| 'hqprint'
| 'none'
export type BlipCompressionVal = 'email' | 'screen' | 'print' | 'hqprint' | 'none'

export type ChartBuildStepVal =
| 'category'
Expand Down Expand Up @@ -3412,15 +3403,7 @@ export type GeomGuideFormulaVal = string

export type GeomGuideNameVal = string

export type LightRigDirectionVal =
| 'tl'
| 't'
| 'tr'
| 'l'
| 'r'
| 'bl'
| 'b'
| 'br'
export type LightRigDirectionVal = 'tl' | 't' | 'tr' | 'l' | 'r' | 'bl' | 'b' | 'br'

export type LightRigTypeVal =
| 'legacyFlat1'
Expand Down Expand Up @@ -3455,27 +3438,15 @@ export type LineCapVal = 'rnd' | 'sq' | 'flat'

export type LineEndLengthVal = 'sm' | 'med' | 'lg'

export type LineEndTypeVal =
| 'none'
| 'triangle'
| 'stealth'
| 'diamond'
| 'oval'
| 'arrow'
export type LineEndTypeVal = 'none' | 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow'

export type LineEndWidthVal = 'sm' | 'med' | 'lg'

export type LineWidthVal = number

export type OnOffStyleTypeVal = 'on' | 'off' | 'def'

export type PathFillModeVal =
| 'none'
| 'norm'
| 'lighten'
| 'lightenLess'
| 'darken'
| 'darkenLess'
export type PathFillModeVal = 'none' | 'norm' | 'lighten' | 'lightenLess' | 'darken' | 'darkenLess'

export type PathShadeTypeVal = 'shape' | 'circle' | 'rect'

Expand Down Expand Up @@ -3877,16 +3848,7 @@ export type PresetShadowValVal =
| 'shdw19'
| 'shdw20'

export type RectAlignmentVal =
| 'tl'
| 't'
| 'tr'
| 'l'
| 'ctr'
| 'r'
| 'bl'
| 'b'
| 'br'
export type RectAlignmentVal = 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br'

export type SchemeColorValVal =
| 'bg1'
Expand Down Expand Up @@ -4132,14 +4094,7 @@ export type SystemColorValVal =
| 'menuHighlight'
| 'menuBar'

export type TextAlignTypeVal =
| 'l'
| 'ctr'
| 'r'
| 'just'
| 'justLow'
| 'dist'
| 'thaiDist'
export type TextAlignTypeVal = 'l' | 'ctr' | 'r' | 'just' | 'justLow' | 'dist' | 'thaiDist'

export type TextAnchoringTypeVal = 't' | 'ctr' | 'b' | 'just' | 'dist'

Expand Down
4 changes: 2 additions & 2 deletions src/lib/ooxml/drawingml/picture.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as a from './main'
import { RequiredMap } from '../../ooxast'
import * as a from './main.js'
import { RequiredMap } from '../../ooxast.js'

// Source files:
// http://localhost:3000/dml-picture.xsd
Expand Down
16 changes: 8 additions & 8 deletions src/lib/ooxml/drawingml/wordprocessingDrawing.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as Primitive from '../../xml-primitives'
import * as a from './main'
import * as dpct from './picture'
import * as m from '../officeDocument/math'
import * as r from '../officeDocument/relationships'
import * as w from '../wordprocessingml/main'

import { RequiredMap } from '../../ooxast'
import * as Primitive from '../../xml-primitives.js'
import * as a from './main.js'
import * as dpct from './picture.js'
import * as m from '../officeDocument/math.js'
import * as r from '../officeDocument/relationships.js'
import * as w from '../wordprocessingml/main.js'

import { RequiredMap } from '../../ooxast.js'
// Source files:
// http://localhost:3000/dml-wordprocessingDrawing.xsd

Expand Down
9 changes: 4 additions & 5 deletions src/lib/ooxml/officeDocument/bibliography.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as s from './sharedTypes'
import { Text } from '../wordprocessingml/main'
import { RequiredMap } from '../../ooxast'
import * as s from './sharedTypes.js'
import { Text } from '../wordprocessingml/main.js'
import { RequiredMap } from '../../ooxast.js'
import { Node as UnistNode } from 'unist'

// Source files:
Expand Down Expand Up @@ -43,8 +43,7 @@ export interface NameListMap {
Person: Person[]
}

export interface NameOrCorporate<name extends string = 'NameOrCorporate'>
extends UnistNode {
export interface NameOrCorporate<name extends string = 'NameOrCorporate'> extends UnistNode {
type: 'element'
name: `b:${name}`
attributes: Record<string, never>
Expand Down
12 changes: 6 additions & 6 deletions src/lib/ooxml/officeDocument/math.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Primitive from '../../xml-primitives'
import * as s from './sharedTypes'
import * as w from '../wordprocessingml/main'
import { RequiredMap } from '../../ooxast'
import * as Primitive from '../../xml-primitives.js'
import * as s from './sharedTypes.js'
import * as w from '../wordprocessingml/main.js'
import { RequiredMap } from '../../ooxast.js'

// Source files:
// http://localhost:3000/shared-math.xsd
Expand Down Expand Up @@ -406,7 +406,7 @@ export interface MathPrMap {
intLim?: LimLoc
intraSp?: TwipsMeasure
lMargin?: TwipsMeasure
mathFont?: String
mathFont?: MString
naryLim?: LimLoc
postSp?: TwipsMeasure
preSp?: TwipsMeasure
Expand Down Expand Up @@ -924,7 +924,7 @@ export interface SSupPrMap {
ctrlPr?: CtrlPr
}

export interface String extends UnistNode {
export interface MString extends UnistNode {
type: 'element'
name: 'm:string'
attributes: {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/ooxml/officeDocument/relationships.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Primitive from '../../xml-primitives'
import * as Primitive from '../../xml-primitives.js'

import { RequiredMap } from '../../ooxast'
import { RequiredMap } from '../../ooxast.js'
// Source files:
// http://localhost:3000/shared-relationshipReference.xsd

Expand Down
12 changes: 3 additions & 9 deletions src/lib/ooxml/officeDocument/sharedTypes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Primitive from '../../xml-primitives'
import * as Primitive from '../../xml-primitives.js'

import { RequiredMap } from '../../ooxast'
import { RequiredMap } from '../../ooxast.js'

// Source files:
// http://localhost:3000/shared-commonSimpleTypes.xsd
Expand Down Expand Up @@ -60,13 +60,7 @@ export type XmlNameVal = string

export type XstringVal = string

export type YAlignVal =
| 'inline'
| 'top'
| 'center'
| 'bottom'
| 'inside'
| 'outside'
export type YAlignVal = 'inline' | 'top' | 'center' | 'bottom' | 'inside' | 'outside'

export interface document extends UnistNode {}
export var document: document
4 changes: 2 additions & 2 deletions src/lib/ooxml/schemaLibrary/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Primitive from '../../xml-primitives'
import * as Primitive from '../../xml-primitives.js'

import { RequiredMap } from '../../ooxast'
import { RequiredMap } from '../../ooxast.js'
// Source files:
// http://localhost:3000/shared-customXmlSchemaProperties.xsd

Expand Down
Loading

0 comments on commit 22a4a10

Please sign in to comment.