@onlyworlds/sdk 1.4.0 → 1.4.1
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/dist/index.d.mts +11 -18
- package/dist/index.d.ts +11 -18
- package/dist/index.js +9 -34
- package/dist/index.mjs +7 -32
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -842,37 +842,30 @@ declare function getElementLabel(elementType: ElementType): string;
|
|
|
842
842
|
declare const ONLYWORLDS_VERSION: "00.30.00";
|
|
843
843
|
/**
|
|
844
844
|
* Material Design icons for element types
|
|
845
|
+
* These are the uniform, monochrome icons used in the OnlyWorlds frontend
|
|
845
846
|
* Compatible with Google Material Icons font
|
|
846
847
|
*/
|
|
847
|
-
declare const
|
|
848
|
-
/**
|
|
849
|
-
* Font Awesome icons for element types
|
|
850
|
-
* Compatible with Font Awesome 6.0+
|
|
851
|
-
*/
|
|
852
|
-
declare const ELEMENT_FONTAWESOME_ICONS: Record<ElementType, string>;
|
|
848
|
+
declare const ELEMENT_ICONS: Record<ElementType, string>;
|
|
853
849
|
/**
|
|
854
|
-
* Unicode
|
|
855
|
-
*
|
|
850
|
+
* Simple Unicode icons for element types
|
|
851
|
+
* Minimalist symbols used as fallbacks
|
|
856
852
|
*/
|
|
857
853
|
declare const ELEMENT_UNICODE_ICONS: Record<ElementType, string>;
|
|
858
854
|
/**
|
|
859
855
|
* Get Material Design icon for an element type
|
|
856
|
+
* Returns the uniform monochrome icon used in OnlyWorlds frontend
|
|
860
857
|
* @param elementType The element type
|
|
861
858
|
* @returns Material icon name
|
|
862
859
|
*/
|
|
863
|
-
declare function
|
|
860
|
+
declare function getElementIcon(elementType: ElementType): string;
|
|
864
861
|
/**
|
|
865
|
-
* Get
|
|
862
|
+
* Get Unicode icon for an element type
|
|
866
863
|
* @param elementType The element type
|
|
867
|
-
* @returns
|
|
868
|
-
*/
|
|
869
|
-
declare function getElementFontAwesomeIcon(elementType: ElementType): string;
|
|
870
|
-
/**
|
|
871
|
-
* Get Unicode emoji for an element type
|
|
872
|
-
* @param elementType The element type
|
|
873
|
-
* @returns Unicode emoji string
|
|
864
|
+
* @returns Unicode symbol string
|
|
874
865
|
*/
|
|
875
866
|
declare function getElementUnicodeIcon(elementType: ElementType): string;
|
|
867
|
+
declare const ELEMENT_MATERIAL_ICONS: Record<ElementType, string>;
|
|
868
|
+
declare const getElementMaterialIcon: typeof getElementIcon;
|
|
876
869
|
/**
|
|
877
870
|
* Field type definitions for OnlyWorlds elements
|
|
878
871
|
*/
|
|
@@ -2327,4 +2320,4 @@ declare class OnlyWorldsClient {
|
|
|
2327
2320
|
static prepareInput<T extends Record<string, any>>(data: T): any;
|
|
2328
2321
|
}
|
|
2329
2322
|
|
|
2330
|
-
export { type Ability, type AbilityInput, type AnyElementId, type ApiResponse, type BaseElement, type Character, type CharacterInput, type Collective, type CollectiveInput, type Construct, type ConstructInput, type Creature, type CreatureInput,
|
|
2323
|
+
export { type Ability, type AbilityInput, type AnyElementId, type ApiResponse, type BaseElement, type Character, type CharacterInput, type Collective, type CollectiveInput, type Construct, type ConstructInput, type Creature, type CreatureInput, ELEMENT_ICONS, ELEMENT_LABELS, ELEMENT_MATERIAL_ICONS, ELEMENT_UNICODE_ICONS, type ElementId, type ElementIds, ElementType, type Event, type EventInput, FIELD_MAPPINGS, FIELD_SCHEMA, type Family, type FamilyInput, type FieldInfo, type FieldMappingsType, type FieldType, type Institution, type InstitutionInput, type Language, type LanguageInput, type Law, type LawInput, type ListOptions, type Location, type LocationInput, type Map, type MapInput, type Marker, type MarkerInput, type Narrative, type NarrativeInput, ONLYWORLDS_VERSION, type Object$1 as Object, type ObjectInput, OnlyWorldsClient, type OnlyWorldsConfig, type Phenomenon, type PhenomenonInput, type Pin, type PinInput, type Relation, type RelationInput, type Species, type SpeciesInput, type Title, type TitleInput, type Trait, type TraitInput, type World, type WorldInput, type Zone, type ZoneInput, createAnyElementId, createElementId, createElementIds, getElementIcon, getElementLabel, getElementMaterialIcon, getElementUnicodeIcon };
|
package/dist/index.d.ts
CHANGED
|
@@ -842,37 +842,30 @@ declare function getElementLabel(elementType: ElementType): string;
|
|
|
842
842
|
declare const ONLYWORLDS_VERSION: "00.30.00";
|
|
843
843
|
/**
|
|
844
844
|
* Material Design icons for element types
|
|
845
|
+
* These are the uniform, monochrome icons used in the OnlyWorlds frontend
|
|
845
846
|
* Compatible with Google Material Icons font
|
|
846
847
|
*/
|
|
847
|
-
declare const
|
|
848
|
-
/**
|
|
849
|
-
* Font Awesome icons for element types
|
|
850
|
-
* Compatible with Font Awesome 6.0+
|
|
851
|
-
*/
|
|
852
|
-
declare const ELEMENT_FONTAWESOME_ICONS: Record<ElementType, string>;
|
|
848
|
+
declare const ELEMENT_ICONS: Record<ElementType, string>;
|
|
853
849
|
/**
|
|
854
|
-
* Unicode
|
|
855
|
-
*
|
|
850
|
+
* Simple Unicode icons for element types
|
|
851
|
+
* Minimalist symbols used as fallbacks
|
|
856
852
|
*/
|
|
857
853
|
declare const ELEMENT_UNICODE_ICONS: Record<ElementType, string>;
|
|
858
854
|
/**
|
|
859
855
|
* Get Material Design icon for an element type
|
|
856
|
+
* Returns the uniform monochrome icon used in OnlyWorlds frontend
|
|
860
857
|
* @param elementType The element type
|
|
861
858
|
* @returns Material icon name
|
|
862
859
|
*/
|
|
863
|
-
declare function
|
|
860
|
+
declare function getElementIcon(elementType: ElementType): string;
|
|
864
861
|
/**
|
|
865
|
-
* Get
|
|
862
|
+
* Get Unicode icon for an element type
|
|
866
863
|
* @param elementType The element type
|
|
867
|
-
* @returns
|
|
868
|
-
*/
|
|
869
|
-
declare function getElementFontAwesomeIcon(elementType: ElementType): string;
|
|
870
|
-
/**
|
|
871
|
-
* Get Unicode emoji for an element type
|
|
872
|
-
* @param elementType The element type
|
|
873
|
-
* @returns Unicode emoji string
|
|
864
|
+
* @returns Unicode symbol string
|
|
874
865
|
*/
|
|
875
866
|
declare function getElementUnicodeIcon(elementType: ElementType): string;
|
|
867
|
+
declare const ELEMENT_MATERIAL_ICONS: Record<ElementType, string>;
|
|
868
|
+
declare const getElementMaterialIcon: typeof getElementIcon;
|
|
876
869
|
/**
|
|
877
870
|
* Field type definitions for OnlyWorlds elements
|
|
878
871
|
*/
|
|
@@ -2327,4 +2320,4 @@ declare class OnlyWorldsClient {
|
|
|
2327
2320
|
static prepareInput<T extends Record<string, any>>(data: T): any;
|
|
2328
2321
|
}
|
|
2329
2322
|
|
|
2330
|
-
export { type Ability, type AbilityInput, type AnyElementId, type ApiResponse, type BaseElement, type Character, type CharacterInput, type Collective, type CollectiveInput, type Construct, type ConstructInput, type Creature, type CreatureInput,
|
|
2323
|
+
export { type Ability, type AbilityInput, type AnyElementId, type ApiResponse, type BaseElement, type Character, type CharacterInput, type Collective, type CollectiveInput, type Construct, type ConstructInput, type Creature, type CreatureInput, ELEMENT_ICONS, ELEMENT_LABELS, ELEMENT_MATERIAL_ICONS, ELEMENT_UNICODE_ICONS, type ElementId, type ElementIds, ElementType, type Event, type EventInput, FIELD_MAPPINGS, FIELD_SCHEMA, type Family, type FamilyInput, type FieldInfo, type FieldMappingsType, type FieldType, type Institution, type InstitutionInput, type Language, type LanguageInput, type Law, type LawInput, type ListOptions, type Location, type LocationInput, type Map, type MapInput, type Marker, type MarkerInput, type Narrative, type NarrativeInput, ONLYWORLDS_VERSION, type Object$1 as Object, type ObjectInput, OnlyWorldsClient, type OnlyWorldsConfig, type Phenomenon, type PhenomenonInput, type Pin, type PinInput, type Relation, type RelationInput, type Species, type SpeciesInput, type Title, type TitleInput, type Trait, type TraitInput, type World, type WorldInput, type Zone, type ZoneInput, createAnyElementId, createElementId, createElementIds, getElementIcon, getElementLabel, getElementMaterialIcon, getElementUnicodeIcon };
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
|
|
23
|
+
ELEMENT_ICONS: () => ELEMENT_ICONS,
|
|
24
24
|
ELEMENT_LABELS: () => ELEMENT_LABELS,
|
|
25
25
|
ELEMENT_MATERIAL_ICONS: () => ELEMENT_MATERIAL_ICONS,
|
|
26
26
|
ELEMENT_UNICODE_ICONS: () => ELEMENT_UNICODE_ICONS,
|
|
@@ -32,7 +32,7 @@ __export(index_exports, {
|
|
|
32
32
|
createAnyElementId: () => createAnyElementId,
|
|
33
33
|
createElementId: () => createElementId,
|
|
34
34
|
createElementIds: () => createElementIds,
|
|
35
|
-
|
|
35
|
+
getElementIcon: () => getElementIcon,
|
|
36
36
|
getElementLabel: () => getElementLabel,
|
|
37
37
|
getElementMaterialIcon: () => getElementMaterialIcon,
|
|
38
38
|
getElementUnicodeIcon: () => getElementUnicodeIcon
|
|
@@ -213,7 +213,7 @@ function getElementLabel(elementType) {
|
|
|
213
213
|
return ELEMENT_LABELS[elementType];
|
|
214
214
|
}
|
|
215
215
|
var ONLYWORLDS_VERSION = "00.30.00";
|
|
216
|
-
var
|
|
216
|
+
var ELEMENT_ICONS = {
|
|
217
217
|
["ability" /* Ability */]: "auto_fix_normal",
|
|
218
218
|
["character" /* Character */]: "person",
|
|
219
219
|
["collective" /* Collective */]: "groups_3",
|
|
@@ -237,30 +237,6 @@ var ELEMENT_MATERIAL_ICONS = {
|
|
|
237
237
|
["trait" /* Trait */]: "flaky",
|
|
238
238
|
["zone" /* Zone */]: "architecture"
|
|
239
239
|
};
|
|
240
|
-
var ELEMENT_FONTAWESOME_ICONS = {
|
|
241
|
-
["ability" /* Ability */]: "fa-wand-magic-sparkles",
|
|
242
|
-
["character" /* Character */]: "fa-user",
|
|
243
|
-
["collective" /* Collective */]: "fa-people-group",
|
|
244
|
-
["construct" /* Construct */]: "fa-gear",
|
|
245
|
-
["creature" /* Creature */]: "fa-dragon",
|
|
246
|
-
["event" /* Event */]: "fa-calendar-days",
|
|
247
|
-
["family" /* Family */]: "fa-users",
|
|
248
|
-
["institution" /* Institution */]: "fa-building",
|
|
249
|
-
["language" /* Language */]: "fa-language",
|
|
250
|
-
["law" /* Law */]: "fa-gavel",
|
|
251
|
-
["location" /* Location */]: "fa-location-dot",
|
|
252
|
-
["map" /* Map */]: "fa-map",
|
|
253
|
-
["marker" /* Marker */]: "fa-map-marker-alt",
|
|
254
|
-
["narrative" /* Narrative */]: "fa-book",
|
|
255
|
-
["object" /* Object */]: "fa-cube",
|
|
256
|
-
["phenomenon" /* Phenomenon */]: "fa-bolt",
|
|
257
|
-
["pin" /* Pin */]: "fa-thumbtack",
|
|
258
|
-
["relation" /* Relation */]: "fa-link",
|
|
259
|
-
["species" /* Species */]: "fa-dna",
|
|
260
|
-
["title" /* Title */]: "fa-crown",
|
|
261
|
-
["trait" /* Trait */]: "fa-snowflake",
|
|
262
|
-
["zone" /* Zone */]: "fa-layer-group"
|
|
263
|
-
};
|
|
264
240
|
var ELEMENT_UNICODE_ICONS = {
|
|
265
241
|
["ability" /* Ability */]: "\u2728",
|
|
266
242
|
["character" /* Character */]: "\u{1F464}",
|
|
@@ -285,15 +261,14 @@ var ELEMENT_UNICODE_ICONS = {
|
|
|
285
261
|
["trait" /* Trait */]: "\u2744\uFE0F",
|
|
286
262
|
["zone" /* Zone */]: "\u{1F5FA}\uFE0F"
|
|
287
263
|
};
|
|
288
|
-
function
|
|
289
|
-
return
|
|
290
|
-
}
|
|
291
|
-
function getElementFontAwesomeIcon(elementType) {
|
|
292
|
-
return ELEMENT_FONTAWESOME_ICONS[elementType];
|
|
264
|
+
function getElementIcon(elementType) {
|
|
265
|
+
return ELEMENT_ICONS[elementType];
|
|
293
266
|
}
|
|
294
267
|
function getElementUnicodeIcon(elementType) {
|
|
295
268
|
return ELEMENT_UNICODE_ICONS[elementType];
|
|
296
269
|
}
|
|
270
|
+
var ELEMENT_MATERIAL_ICONS = ELEMENT_ICONS;
|
|
271
|
+
var getElementMaterialIcon = getElementIcon;
|
|
297
272
|
var FIELD_SCHEMA = {
|
|
298
273
|
ability: {
|
|
299
274
|
// Text fields
|
|
@@ -761,7 +736,7 @@ function createAnyElementId(id) {
|
|
|
761
736
|
}
|
|
762
737
|
// Annotate the CommonJS export names for ESM import in node:
|
|
763
738
|
0 && (module.exports = {
|
|
764
|
-
|
|
739
|
+
ELEMENT_ICONS,
|
|
765
740
|
ELEMENT_LABELS,
|
|
766
741
|
ELEMENT_MATERIAL_ICONS,
|
|
767
742
|
ELEMENT_UNICODE_ICONS,
|
|
@@ -773,7 +748,7 @@ function createAnyElementId(id) {
|
|
|
773
748
|
createAnyElementId,
|
|
774
749
|
createElementId,
|
|
775
750
|
createElementIds,
|
|
776
|
-
|
|
751
|
+
getElementIcon,
|
|
777
752
|
getElementLabel,
|
|
778
753
|
getElementMaterialIcon,
|
|
779
754
|
getElementUnicodeIcon
|
package/dist/index.mjs
CHANGED
|
@@ -172,7 +172,7 @@ function getElementLabel(elementType) {
|
|
|
172
172
|
return ELEMENT_LABELS[elementType];
|
|
173
173
|
}
|
|
174
174
|
var ONLYWORLDS_VERSION = "00.30.00";
|
|
175
|
-
var
|
|
175
|
+
var ELEMENT_ICONS = {
|
|
176
176
|
["ability" /* Ability */]: "auto_fix_normal",
|
|
177
177
|
["character" /* Character */]: "person",
|
|
178
178
|
["collective" /* Collective */]: "groups_3",
|
|
@@ -196,30 +196,6 @@ var ELEMENT_MATERIAL_ICONS = {
|
|
|
196
196
|
["trait" /* Trait */]: "flaky",
|
|
197
197
|
["zone" /* Zone */]: "architecture"
|
|
198
198
|
};
|
|
199
|
-
var ELEMENT_FONTAWESOME_ICONS = {
|
|
200
|
-
["ability" /* Ability */]: "fa-wand-magic-sparkles",
|
|
201
|
-
["character" /* Character */]: "fa-user",
|
|
202
|
-
["collective" /* Collective */]: "fa-people-group",
|
|
203
|
-
["construct" /* Construct */]: "fa-gear",
|
|
204
|
-
["creature" /* Creature */]: "fa-dragon",
|
|
205
|
-
["event" /* Event */]: "fa-calendar-days",
|
|
206
|
-
["family" /* Family */]: "fa-users",
|
|
207
|
-
["institution" /* Institution */]: "fa-building",
|
|
208
|
-
["language" /* Language */]: "fa-language",
|
|
209
|
-
["law" /* Law */]: "fa-gavel",
|
|
210
|
-
["location" /* Location */]: "fa-location-dot",
|
|
211
|
-
["map" /* Map */]: "fa-map",
|
|
212
|
-
["marker" /* Marker */]: "fa-map-marker-alt",
|
|
213
|
-
["narrative" /* Narrative */]: "fa-book",
|
|
214
|
-
["object" /* Object */]: "fa-cube",
|
|
215
|
-
["phenomenon" /* Phenomenon */]: "fa-bolt",
|
|
216
|
-
["pin" /* Pin */]: "fa-thumbtack",
|
|
217
|
-
["relation" /* Relation */]: "fa-link",
|
|
218
|
-
["species" /* Species */]: "fa-dna",
|
|
219
|
-
["title" /* Title */]: "fa-crown",
|
|
220
|
-
["trait" /* Trait */]: "fa-snowflake",
|
|
221
|
-
["zone" /* Zone */]: "fa-layer-group"
|
|
222
|
-
};
|
|
223
199
|
var ELEMENT_UNICODE_ICONS = {
|
|
224
200
|
["ability" /* Ability */]: "\u2728",
|
|
225
201
|
["character" /* Character */]: "\u{1F464}",
|
|
@@ -244,15 +220,14 @@ var ELEMENT_UNICODE_ICONS = {
|
|
|
244
220
|
["trait" /* Trait */]: "\u2744\uFE0F",
|
|
245
221
|
["zone" /* Zone */]: "\u{1F5FA}\uFE0F"
|
|
246
222
|
};
|
|
247
|
-
function
|
|
248
|
-
return
|
|
249
|
-
}
|
|
250
|
-
function getElementFontAwesomeIcon(elementType) {
|
|
251
|
-
return ELEMENT_FONTAWESOME_ICONS[elementType];
|
|
223
|
+
function getElementIcon(elementType) {
|
|
224
|
+
return ELEMENT_ICONS[elementType];
|
|
252
225
|
}
|
|
253
226
|
function getElementUnicodeIcon(elementType) {
|
|
254
227
|
return ELEMENT_UNICODE_ICONS[elementType];
|
|
255
228
|
}
|
|
229
|
+
var ELEMENT_MATERIAL_ICONS = ELEMENT_ICONS;
|
|
230
|
+
var getElementMaterialIcon = getElementIcon;
|
|
256
231
|
var FIELD_SCHEMA = {
|
|
257
232
|
ability: {
|
|
258
233
|
// Text fields
|
|
@@ -719,7 +694,7 @@ function createAnyElementId(id) {
|
|
|
719
694
|
return id;
|
|
720
695
|
}
|
|
721
696
|
export {
|
|
722
|
-
|
|
697
|
+
ELEMENT_ICONS,
|
|
723
698
|
ELEMENT_LABELS,
|
|
724
699
|
ELEMENT_MATERIAL_ICONS,
|
|
725
700
|
ELEMENT_UNICODE_ICONS,
|
|
@@ -731,7 +706,7 @@ export {
|
|
|
731
706
|
createAnyElementId,
|
|
732
707
|
createElementId,
|
|
733
708
|
createElementIds,
|
|
734
|
-
|
|
709
|
+
getElementIcon,
|
|
735
710
|
getElementLabel,
|
|
736
711
|
getElementMaterialIcon,
|
|
737
712
|
getElementUnicodeIcon
|
package/package.json
CHANGED