Skip to content

Commit 975a021

Browse files
committed
docs: Add jsdoc to two live-tile classes
1 parent 6df625c commit 975a021

File tree

4 files changed

+55
-4
lines changed

4 files changed

+55
-4
lines changed

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"yoavbls.pretty-ts-errors",
99
"christian-kohler.path-intellisense",
1010
"christian-kohler.npm-intellisense",
11-
"chdsbd.github-code-owners"
11+
"chdsbd.github-code-owners",
12+
"bierner.jsdoc-markdown-highlighting"
1213
]
1314
}

.vscode/settings.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,20 @@
3030
"editor.wordWrap": "off",
3131
"workbench.editor.restoreViewState": false
3232
},
33-
"cSpell.words": ["bitcode", "codegen", "commitlint", "nativewind", "Pressable", "startscreen", "Subviews", "tsup"],
33+
"cSpell.words": [
34+
"bitcode",
35+
"codegen",
36+
"commitlint",
37+
"nativewind",
38+
"nvmrc",
39+
"Pressable",
40+
"startscreen",
41+
"Subviews",
42+
"tsup"
43+
],
3444
"githubCodeOwners.format.enabled": true,
3545
"typescript.preferences.importModuleSpecifier": "non-relative",
36-
"typescript.experimental.expandableHover": true
46+
"typescript.experimental.expandableHover": true,
47+
"jsdoc-generator.includeExport": false,
48+
"jsdoc-generator.emptyLineAfterHeader": true
3749
}

packages/live-tiles/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# @metro-ui/live-tiles
22

3-
[![npm](https://img.shields.io/npm/dt/@metro-ui/live-tiles)](https://www.npmjs.com/package/@metro-ui/live-tiles)
3+
[![npm downloads](https://img.shields.io/npm/dt/@metro-ui/live-tiles.svg)](https://www.npmjs.com/package/@metro-ui/live-tiles)
4+
[![npm version](https://img.shields.io/npm/v/@metro-ui/live-tiles.svg?style=flat)](https://www.npmjs.com/package/@metro-ui/live-tiles)

packages/live-tiles/src/tiles/live-tiles.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export abstract class LiveTileImage {
7676
public readonly overlay: number = 20
7777
) {}
7878
}
79+
export class LiveTileBadgeImage extends LiveTileImage {}
7980
export class LiveTilePeekImage extends LiveTileImage {}
8081
export class LiveTileBackgroundImage extends LiveTileImage {}
8182

@@ -91,6 +92,42 @@ export class LiveTileContentAdaptive extends LiveTileContent {
9192
}
9293
}
9394

95+
/**
96+
* A tile that displays a single line of text with an optional badge.
97+
*
98+
* ![screenshot](https://learn.microsoft.com/en-us/previous-versions/windows/apps/images/hh761491.tilesquare150x150iconwithbadge(en-us,win.10).jpg)
99+
*
100+
*{@link https://learn.microsoft.com/en-us/previous-versions/windows/apps/hh761491(v=win.10)#tilesquare150x150iconwithbadge}
101+
* @extends {LiveTileContent}
102+
*/
103+
export class LiveTileContentIconWithBadge extends LiveTileContent {
104+
public constructor(
105+
public readonly badgeImage: Optional<LiveTileBadgeImage>,
106+
public readonly text: string = ''
107+
) {
108+
super();
109+
}
110+
}
111+
112+
/**
113+
* A tile that displays two rows of text either side by side or one above the other depending on the device/platform.
114+
* They were typically used for display the day and month the calendar app tile.
115+
*
116+
* ![screenshot](https://learn.microsoft.com/en-us/previous-versions/windows/apps/images/hh761491.tilesquareblock(en-us,win.10).png)
117+
*
118+
* {@link https://learn.microsoft.com/en-us/previous-versions/windows/apps/hh761491(v=win.10)#tilesquareblocktilesquare150x150block}
119+
* @extends {LiveTileContent}
120+
*/
121+
export class LiveTileContentTileSquareBlock extends LiveTileContent {
122+
public constructor(
123+
public readonly blockText: Optional<string>,
124+
public readonly besideBlockText: Optional<string>,
125+
public readonly text: string = ''
126+
) {
127+
super();
128+
}
129+
}
130+
94131
export class LiveTileBinding {
95132
public constructor(
96133
public displayName: Optional<string>,

0 commit comments

Comments
 (0)