generated from qq15725/starter-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
575 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.adjusthandlelist | ||
*/ | ||
@defineElement('a:ahLst') | ||
export class AdjustHandleList extends OXML { | ||
// TODO | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { ShapeGuide } from './ShapeGuide' | ||
import { defineChildren, defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.adjustvaluelist | ||
*/ | ||
@defineElement('a:avLst') | ||
export class AdjustValueList extends OXML { | ||
@defineChildren('a:gd') declare value: ShapeGuide[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineAttribute, defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.arcto | ||
*/ | ||
@defineElement('a:arcTo') | ||
export class ArcTo extends OXML { | ||
@defineAttribute('hR', 'ST_AdjCoordinate') declare hR: number | ||
@defineAttribute('wR', 'ST_AdjCoordinate') declare wR: number | ||
@defineAttribute('stAng', 'ST_AdjAngle') declare stAng: number | ||
@defineAttribute('swAng', 'ST_AdjAngle') declare swAng: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { defineElement } from '../../core' | ||
import { _ColorDefinable } from './_ColorDefinable' | ||
import { _Color } from './_Color' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.backgroundcolor | ||
*/ | ||
@defineElement('a:bgClr') | ||
export class BackgroundColor extends _ColorDefinable { | ||
export class BackgroundColor extends _Color { | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.closeshapepath | ||
*/ | ||
@defineElement('a:close') | ||
export class CloseShapePath extends OXML { | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.connectionsitelist | ||
*/ | ||
@defineElement('a:cxnLst') | ||
export class ConnectionSiteList extends OXML { | ||
// TODO | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { Point } from './Point' | ||
import { defineChildren, defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.cubicbeziercurveto | ||
*/ | ||
@defineElement('a:cubicBezTo') | ||
export class CubicBezierCurveTo extends OXML { | ||
@defineChildren('a:pt') declare value: Point[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import type { AdjustHandleList } from './AdjustHandleList' | ||
import type { AdjustValueList } from './AdjustValueList' | ||
import type { ConnectionSiteList } from './ConnectionSiteList' | ||
import type { PathList } from './PathList' | ||
import type { Rectangle } from './Rectangle' | ||
import type { ShapeGuideList } from './ShapeGuideList' | ||
import { defineChild, defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.customgeometry | ||
*/ | ||
@defineElement('a:custGeom') | ||
export class CustomGeometry extends OXML { | ||
@defineChild('a:ahLst') declare ahLst: OXML | ||
@defineChild('a:avLst') declare avLst: OXML | ||
@defineChild('a:cxnLst') declare cxnLst: OXML | ||
@defineChild('a:gdLst') declare gdLst: OXML | ||
@defineChild('a:pathLst') declare pathLst: OXML | ||
@defineChild('a:rect') declare rect: Rectangle | ||
@defineChild('a:ahLst') ahLst?: AdjustHandleList | ||
@defineChild('a:avLst') avLst?: AdjustValueList | ||
@defineChild('a:cxnLst') cxnLst?: ConnectionSiteList | ||
@defineChild('a:gdLst') gdLst?: ShapeGuideList | ||
@defineChild('a:pathLst') pathLst?: PathList | ||
@defineChild('a:rect') rect?: Rectangle | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { defineElement } from '../../core' | ||
import { _ParagraphProperties } from './_ParagraphProperties' | ||
|
||
/** | ||
* @link https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.DefaultParagraphProperties | ||
*/ | ||
@defineElement('a:defPPr') | ||
export class DefaultParagraphProperties extends _ParagraphProperties { | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* @link https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.effectdag | ||
*/ | ||
@defineElement('a:effectDag') | ||
export class EffectDag extends OXML { | ||
// TODO | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import { defineElement, OXML } from '../../core' | ||
import { defineChild, defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* @link https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.effectlist | ||
*/ | ||
@defineElement('a:effectLst') | ||
export class EffectList extends OXML { | ||
// | ||
// TODO | ||
@defineChild('blur') blur?: OXML | ||
@defineChild('fillOverlay') fillOverlay?: OXML | ||
@defineChild('glow') glow?: OXML | ||
@defineChild('innerShdw') innerShdw?: OXML | ||
@defineChild('outerShdw') outerShdw?: OXML | ||
@defineChild('prstShdw') prstShdw?: OXML | ||
@defineChild('reflection') reflection?: OXML | ||
@defineChild('softEdge') softEdge?: OXML | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { defineAttribute, defineElement } from '../../core' | ||
import { _ColorDefinable } from './_ColorDefinable' | ||
import { _Color } from './_Color' | ||
|
||
/** | ||
* @link https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.effectreference | ||
*/ | ||
@defineElement('a:effectRef') | ||
export class EffectReference extends _ColorDefinable { | ||
export class EffectReference extends _Color { | ||
@defineAttribute('idx') declare idx: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { defineAttribute, defineElement } from '../../core' | ||
import { _ColorDefinable } from './_ColorDefinable' | ||
import { _Color } from './_Color' | ||
|
||
/** | ||
* @link https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.fillreference | ||
*/ | ||
@defineElement('a:fillRef') | ||
export class FillReference extends _ColorDefinable { | ||
export class FillReference extends _Color { | ||
@defineAttribute('idx') declare idx: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { defineAttribute, defineElement } from '../../core' | ||
import { _ColorDefinable } from './_ColorDefinable' | ||
import { _Color } from './_Color' | ||
|
||
/** | ||
* @link https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.fontreference | ||
*/ | ||
@defineElement('a:fontRef') | ||
export class FontReference extends _ColorDefinable { | ||
export class FontReference extends _Color { | ||
@defineAttribute('idx') declare idx: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,10 @@ | ||
import type { HslColor } from './HslColor' | ||
import type { PresetColor } from './PresetColor' | ||
import type { RgbColorModelHex } from './RgbColorModelHex' | ||
import type { RgbColorModelPercentage } from './RgbColorModelPercentage' | ||
import type { SchemeColor } from './SchemeColor' | ||
import type { SystemColor } from './SystemColor' | ||
import { defineChild, defineElement, OXML } from '../../core' | ||
import { defineElement } from '../../core' | ||
import { _Color } from './_Color' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.foregroundcolor | ||
*/ | ||
@defineElement('a:fgClr') | ||
export class ForegroundColor extends OXML { | ||
@defineChild('a:hslClr') hslClr?: HslColor | ||
@defineChild('a:prstClr') prstClr?: PresetColor | ||
@defineChild('a:schemeClr') schemeClr?: SchemeColor | ||
@defineChild('a:scrgbClr') scrgbClr?: RgbColorModelPercentage | ||
@defineChild('a:srgbClr') srgbClr?: RgbColorModelHex | ||
@defineChild('a:sysClr') sysClr?: SystemColor | ||
export class ForegroundColor extends _Color { | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { defineAttribute, defineElement } from '../../core' | ||
import { _ColorDefinable } from './_ColorDefinable' | ||
import { _Color } from './_Color' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.GradientStop | ||
*/ | ||
@defineElement('a:gs') | ||
export class GradientStop extends _ColorDefinable { | ||
export class GradientStop extends _Color { | ||
@defineAttribute('pos', 'positiveFixedPercentage') declare pos: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.groupfill | ||
*/ | ||
@defineElement('a:grpFill') | ||
export class GroupFill extends OXML { | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { defineAttribute, defineElement } from '../../core' | ||
import { _ColorDefinable } from './_ColorDefinable' | ||
import { _Color } from './_Color' | ||
|
||
/** | ||
* @link https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.linereference | ||
*/ | ||
@defineElement('a:lnRef') | ||
export class LineReference extends _ColorDefinable { | ||
export class LineReference extends _Color { | ||
@defineAttribute('idx') declare idx: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { Point } from './Point' | ||
import { defineChild, defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.lineto | ||
*/ | ||
@defineElement('a:lnTo') | ||
export class LineTo extends OXML { | ||
@defineChild('a:pt') declare pt: Point | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { defineElement, OXML } from '../../core' | ||
import { defineElement } from '../../core' | ||
import { _Style } from './_Style' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.liststyle | ||
*/ | ||
@defineElement('a:lstStyle') | ||
export class ListStyle extends OXML { | ||
export class ListStyle extends _Style { | ||
// | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { Point } from './Point' | ||
import { defineChild, defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.moveto | ||
*/ | ||
@defineElement('a:moveTo') | ||
export class MoveTo extends OXML { | ||
@defineChild('a:pt') declare pt: Point | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,39 @@ | ||
import { defineElement, OXML } from '../../core' | ||
import { defineAttribute, defineElement, OXML } from '../../core' | ||
import { ArcTo } from './ArcTo' | ||
import { CloseShapePath } from './CloseShapePath' | ||
import { CubicBezierCurveTo } from './CubicBezierCurveTo' | ||
import { LineTo } from './LineTo' | ||
import { MoveTo } from './MoveTo' | ||
import { QuadraticBezierCurveTo } from './QuadraticBezierCurveTo' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.path | ||
*/ | ||
@defineElement('a:path') | ||
export class Path extends OXML { | ||
// | ||
@defineAttribute('extrusionOk', 'boolean') extrusionOk?: boolean | ||
@defineAttribute('fill', 'boolean') fill?: boolean | ||
@defineAttribute('stroke', 'boolean') stroke?: boolean | ||
@defineAttribute('w', 'ST_PositiveCoordinate') declare w: number | ||
@defineAttribute('h', 'ST_PositiveCoordinate') declare h: number | ||
|
||
get commands() { | ||
return Array.from(this.element.children).map((element) => { | ||
switch (element.tagName) { | ||
case 'a:arcTo': | ||
return new ArcTo().fromElement(element) | ||
case 'a:close': | ||
return new CloseShapePath().fromElement(element) | ||
case 'a:lnTo': | ||
return new LineTo().fromElement(element) | ||
case 'a:cubicBezTo': | ||
return new CubicBezierCurveTo().fromElement(element) | ||
case 'a:quadBezTo': | ||
return new QuadraticBezierCurveTo().fromElement(element) | ||
case 'a:moveTo': | ||
default: | ||
return new MoveTo().fromElement(element) | ||
} | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { Path } from './Path' | ||
import { defineChildren, defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.pathlist | ||
*/ | ||
@defineElement('a:pathLst') | ||
export class PathList extends OXML { | ||
@defineChildren('a:path') declare value: Path[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { defineAttribute, defineElement, OXML } from '../../core' | ||
|
||
/** | ||
* https://learn.microsoft.com/dotnet/api/documentformat.openxml.drawing.point | ||
*/ | ||
@defineElement('a:pt') | ||
export class Point extends OXML { | ||
@defineAttribute('x', 'ST_AdjCoordinate') declare x: number | ||
@defineAttribute('y', 'ST_AdjCoordinate') declare y: number | ||
} |
Oops, something went wrong.