@7h3laughingman/foundry-helpers 13.351.4 → 13.351.6
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.
|
@@ -1,13 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare function isPlaceableObject
|
|
13
|
-
export
|
|
1
|
+
import AmbientLight = foundry.canvas.placeables.AmbientLight;
|
|
2
|
+
import AmbientSound = foundry.canvas.placeables.AmbientSound;
|
|
3
|
+
import Drawing = foundry.canvas.placeables.Drawing;
|
|
4
|
+
import MeasuredTemplate = foundry.canvas.placeables.MeasuredTemplate;
|
|
5
|
+
import Note = foundry.canvas.placeables.Note;
|
|
6
|
+
import Region = foundry.canvas.placeables.Region;
|
|
7
|
+
import Tile = foundry.canvas.placeables.Tile;
|
|
8
|
+
import Token = foundry.canvas.placeables.Token;
|
|
9
|
+
import Wall = foundry.canvas.placeables.Wall;
|
|
10
|
+
export declare function isPlaceableObject(value: unknown, embeddedName: "AmbientLight"): value is AmbientLight;
|
|
11
|
+
export declare function isPlaceableObject(value: unknown, embeddedName: "AmbientSound"): value is AmbientSound;
|
|
12
|
+
export declare function isPlaceableObject(value: unknown, embeddedName: "Drawing"): value is Drawing;
|
|
13
|
+
export declare function isPlaceableObject(value: unknown, embeddedName: "MeasuredTemplate"): value is MeasuredTemplate;
|
|
14
|
+
export declare function isPlaceableObject(value: unknown, embeddedName: "Note"): value is Note;
|
|
15
|
+
export declare function isPlaceableObject(value: unknown, embeddedName: "Region"): value is Region;
|
|
16
|
+
export declare function isPlaceableObject(value: unknown, embeddedName: "Tile"): value is Tile;
|
|
17
|
+
export declare function isPlaceableObject(value: unknown, embeddedName: "Token"): value is Token;
|
|
18
|
+
export declare function isPlaceableObject(value: unknown, embeddedName: "Wall"): value is Wall;
|
|
19
|
+
export declare function placeableObjectHasScene(value: Maybe<AmbientLight>): value is AmbientLight<AmbientLightDocument<Scene>>;
|
|
20
|
+
export declare function placeableObjectHasScene(value: Maybe<AmbientSound>): value is AmbientSound<AmbientSoundDocument<Scene>>;
|
|
21
|
+
export declare function placeableObjectHasScene(value: Maybe<Drawing>): value is Drawing<DrawingDocument<Scene>>;
|
|
22
|
+
export declare function placeableObjectHasScene(value: Maybe<MeasuredTemplate>): value is MeasuredTemplate<MeasuredTemplateDocument<Scene>>;
|
|
23
|
+
export declare function placeableObjectHasScene(value: Maybe<Note>): value is Note<NoteDocument<Scene>>;
|
|
24
|
+
export declare function placeableObjectHasScene(value: Maybe<Region>): value is Region<RegionDocument<Scene>>;
|
|
25
|
+
export declare function placeableObjectHasScene(value: Maybe<Tile>): value is Tile<TileDocument<Scene>>;
|
|
26
|
+
export declare function placeableObjectHasScene(value: Maybe<Token>): value is Token<TokenDocument<Scene>>;
|
|
27
|
+
export declare function placeableObjectHasScene(value: Maybe<Wall>): value is Wall<WallDocument<Scene>>;
|
package/dist/utilities/canvas.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as R from "remeda";
|
|
2
|
+
var PlaceableObject = foundry.canvas.placeables.PlaceableObject;
|
|
3
|
+
export function isPlaceableObject(value, embeddedName) {
|
|
4
|
+
return value instanceof PlaceableObject && value.constructor.embeddedName === embeddedName;
|
|
5
|
+
}
|
|
6
|
+
export function placeableObjectHasScene(value) {
|
|
7
|
+
return R.isNonNullish(value?.scene);
|
|
4
8
|
}
|
|
@@ -1 +1,55 @@
|
|
|
1
|
-
export declare function isDocumentType
|
|
1
|
+
export declare function isDocumentType(value: unknown, documentName: "ActiveEffect"): value is ActiveEffect;
|
|
2
|
+
export declare function isDocumentType(value: unknown, documentName: "Actor"): value is Actor;
|
|
3
|
+
export declare function isDocumentType(value: unknown, documentName: "ActorDelta"): value is ActorDelta;
|
|
4
|
+
export declare function isDocumentType(value: unknown, documentName: "Adventure"): value is Adventure;
|
|
5
|
+
export declare function isDocumentType(value: unknown, documentName: "AmbientLight"): value is AmbientLightDocument;
|
|
6
|
+
export declare function isDocumentType(value: unknown, documentName: "AmbientSound"): value is AmbientSoundDocument;
|
|
7
|
+
export declare function isDocumentType(value: unknown, documentName: "Card"): value is Card;
|
|
8
|
+
export declare function isDocumentType(value: unknown, documentName: "Cards"): value is Cards;
|
|
9
|
+
export declare function isDocumentType(value: unknown, documentName: "ChatMessage"): value is ChatMessage;
|
|
10
|
+
export declare function isDocumentType(value: unknown, documentName: "Combat"): value is Combat;
|
|
11
|
+
export declare function isDocumentType(value: unknown, documentName: "Combatant"): value is Combatant;
|
|
12
|
+
export declare function isDocumentType(value: unknown, documentName: "CombatantGroup"): value is CombatantGroup;
|
|
13
|
+
export declare function isDocumentType(value: unknown, documentName: "Drawing"): value is DrawingDocument;
|
|
14
|
+
export declare function isDocumentType(value: unknown, documentName: "FogExploration"): value is FogExploration;
|
|
15
|
+
export declare function isDocumentType(value: unknown, documentName: "Folder"): value is Folder;
|
|
16
|
+
export declare function isDocumentType(value: unknown, documentName: "Item"): value is Item;
|
|
17
|
+
export declare function isDocumentType(value: unknown, documentName: "JournalEntry"): value is JournalEntry;
|
|
18
|
+
export declare function isDocumentType(value: unknown, documentName: "JournalEntryCategory"): value is JournalEntryCategory;
|
|
19
|
+
export declare function isDocumentType(value: unknown, documentName: "JournalEntryPage"): value is JournalEntryPage;
|
|
20
|
+
export declare function isDocumentType(value: unknown, documentName: "Macro"): value is Macro;
|
|
21
|
+
export declare function isDocumentType(value: unknown, documentName: "MeasuredTemplate"): value is MeasuredTemplateDocument;
|
|
22
|
+
export declare function isDocumentType(value: unknown, documentName: "Note"): value is NoteDocument;
|
|
23
|
+
export declare function isDocumentType(value: unknown, documentName: "Playlist"): value is Playlist;
|
|
24
|
+
export declare function isDocumentType(value: unknown, documentName: "PlaylistSound"): value is PlaylistSound;
|
|
25
|
+
export declare function isDocumentType(value: unknown, documentName: "Region"): value is RegionDocument;
|
|
26
|
+
export declare function isDocumentType(value: unknown, documentName: "RegionBehavior"): value is RegionBehavior;
|
|
27
|
+
export declare function isDocumentType(value: unknown, documentName: "RollTable"): value is RollTable;
|
|
28
|
+
export declare function isDocumentType(value: unknown, documentName: "Scene"): value is Scene;
|
|
29
|
+
export declare function isDocumentType(value: unknown, documentName: "Setting"): value is Setting;
|
|
30
|
+
export declare function isDocumentType(value: unknown, documentName: "TableResult"): value is TableResult;
|
|
31
|
+
export declare function isDocumentType(value: unknown, documentName: "Tile"): value is TileDocument;
|
|
32
|
+
export declare function isDocumentType(value: unknown, documentName: "Token"): value is TokenDocument;
|
|
33
|
+
export declare function isDocumentType(value: unknown, documentName: "User"): value is User;
|
|
34
|
+
export declare function isDocumentType(value: unknown, documentName: "Wall"): value is WallDocument;
|
|
35
|
+
export declare function documentHasParent(value: Maybe<ActiveEffect>): value is ActiveEffect<Actor | Item>;
|
|
36
|
+
export declare function documentHasParent(value: Maybe<Actor>): value is Actor<TokenDocument>;
|
|
37
|
+
export declare function documentHasParent(value: Maybe<ActorDelta>): value is ActorDelta<TokenDocument>;
|
|
38
|
+
export declare function documentHasParent(value: Maybe<AmbientLightDocument>): value is AmbientLightDocument<Scene>;
|
|
39
|
+
export declare function documentHasParent(value: Maybe<AmbientSoundDocument>): value is AmbientSoundDocument<Scene>;
|
|
40
|
+
export declare function documentHasParent(value: Maybe<Card>): value is Card<Cards>;
|
|
41
|
+
export declare function documentHasParent(value: Maybe<Combatant>): value is Combatant<Combat>;
|
|
42
|
+
export declare function documentHasParent(value: Maybe<CombatantGroup>): value is CombatantGroup<Combat>;
|
|
43
|
+
export declare function documentHasParent(value: Maybe<DrawingDocument>): value is DrawingDocument<Scene>;
|
|
44
|
+
export declare function documentHasParent(value: Maybe<Item>): value is Item<Actor>;
|
|
45
|
+
export declare function documentHasParent(value: Maybe<JournalEntryCategory>): value is JournalEntryCategory<JournalEntry>;
|
|
46
|
+
export declare function documentHasParent(value: Maybe<JournalEntryPage>): value is JournalEntryPage<JournalEntry>;
|
|
47
|
+
export declare function documentHasParent(value: Maybe<MeasuredTemplateDocument>): value is MeasuredTemplateDocument<Scene>;
|
|
48
|
+
export declare function documentHasParent(value: Maybe<NoteDocument>): value is NoteDocument<Scene>;
|
|
49
|
+
export declare function documentHasParent(value: Maybe<PlaylistSound>): value is PlaylistSound<Playlist>;
|
|
50
|
+
export declare function documentHasParent(value: Maybe<RegionDocument>): value is RegionDocument<Scene>;
|
|
51
|
+
export declare function documentHasParent(value: Maybe<RegionBehavior>): value is RegionBehavior<RegionDocument>;
|
|
52
|
+
export declare function documentHasParent(value: Maybe<TableResult>): value is TableResult<RollTable>;
|
|
53
|
+
export declare function documentHasParent(value: Maybe<TileDocument>): value is TileDocument<Scene>;
|
|
54
|
+
export declare function documentHasParent(value: Maybe<TokenDocument>): value is TokenDocument<Scene>;
|
|
55
|
+
export declare function documentHasParent(value: Maybe<WallDocument>): value is WallDocument<Scene>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as R from "remeda";
|
|
2
|
+
var Document = foundry.abstract.Document;
|
|
3
|
+
export function isDocumentType(value, documentName) {
|
|
4
|
+
return value instanceof Document && value.documentName === documentName;
|
|
5
|
+
}
|
|
6
|
+
export function documentHasParent(value) {
|
|
7
|
+
return R.isNonNullish(value?.parent);
|
|
3
8
|
}
|
package/package.json
CHANGED