@onlyworlds/sdk 1.3.2 → 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 +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +70 -2
- package/dist/index.mjs +63 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -840,6 +840,32 @@ declare function getElementLabel(elementType: ElementType): string;
|
|
|
840
840
|
* Synced with https://github.com/OnlyWorlds/OnlyWorlds/blob/main/VERSION
|
|
841
841
|
*/
|
|
842
842
|
declare const ONLYWORLDS_VERSION: "00.30.00";
|
|
843
|
+
/**
|
|
844
|
+
* Material Design icons for element types
|
|
845
|
+
* These are the uniform, monochrome icons used in the OnlyWorlds frontend
|
|
846
|
+
* Compatible with Google Material Icons font
|
|
847
|
+
*/
|
|
848
|
+
declare const ELEMENT_ICONS: Record<ElementType, string>;
|
|
849
|
+
/**
|
|
850
|
+
* Simple Unicode icons for element types
|
|
851
|
+
* Minimalist symbols used as fallbacks
|
|
852
|
+
*/
|
|
853
|
+
declare const ELEMENT_UNICODE_ICONS: Record<ElementType, string>;
|
|
854
|
+
/**
|
|
855
|
+
* Get Material Design icon for an element type
|
|
856
|
+
* Returns the uniform monochrome icon used in OnlyWorlds frontend
|
|
857
|
+
* @param elementType The element type
|
|
858
|
+
* @returns Material icon name
|
|
859
|
+
*/
|
|
860
|
+
declare function getElementIcon(elementType: ElementType): string;
|
|
861
|
+
/**
|
|
862
|
+
* Get Unicode icon for an element type
|
|
863
|
+
* @param elementType The element type
|
|
864
|
+
* @returns Unicode symbol string
|
|
865
|
+
*/
|
|
866
|
+
declare function getElementUnicodeIcon(elementType: ElementType): string;
|
|
867
|
+
declare const ELEMENT_MATERIAL_ICONS: Record<ElementType, string>;
|
|
868
|
+
declare const getElementMaterialIcon: typeof getElementIcon;
|
|
843
869
|
/**
|
|
844
870
|
* Field type definitions for OnlyWorlds elements
|
|
845
871
|
*/
|
|
@@ -2294,4 +2320,4 @@ declare class OnlyWorldsClient {
|
|
|
2294
2320
|
static prepareInput<T extends Record<string, any>>(data: T): any;
|
|
2295
2321
|
}
|
|
2296
2322
|
|
|
2297
|
-
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_LABELS, 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, getElementLabel };
|
|
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
|
@@ -840,6 +840,32 @@ declare function getElementLabel(elementType: ElementType): string;
|
|
|
840
840
|
* Synced with https://github.com/OnlyWorlds/OnlyWorlds/blob/main/VERSION
|
|
841
841
|
*/
|
|
842
842
|
declare const ONLYWORLDS_VERSION: "00.30.00";
|
|
843
|
+
/**
|
|
844
|
+
* Material Design icons for element types
|
|
845
|
+
* These are the uniform, monochrome icons used in the OnlyWorlds frontend
|
|
846
|
+
* Compatible with Google Material Icons font
|
|
847
|
+
*/
|
|
848
|
+
declare const ELEMENT_ICONS: Record<ElementType, string>;
|
|
849
|
+
/**
|
|
850
|
+
* Simple Unicode icons for element types
|
|
851
|
+
* Minimalist symbols used as fallbacks
|
|
852
|
+
*/
|
|
853
|
+
declare const ELEMENT_UNICODE_ICONS: Record<ElementType, string>;
|
|
854
|
+
/**
|
|
855
|
+
* Get Material Design icon for an element type
|
|
856
|
+
* Returns the uniform monochrome icon used in OnlyWorlds frontend
|
|
857
|
+
* @param elementType The element type
|
|
858
|
+
* @returns Material icon name
|
|
859
|
+
*/
|
|
860
|
+
declare function getElementIcon(elementType: ElementType): string;
|
|
861
|
+
/**
|
|
862
|
+
* Get Unicode icon for an element type
|
|
863
|
+
* @param elementType The element type
|
|
864
|
+
* @returns Unicode symbol string
|
|
865
|
+
*/
|
|
866
|
+
declare function getElementUnicodeIcon(elementType: ElementType): string;
|
|
867
|
+
declare const ELEMENT_MATERIAL_ICONS: Record<ElementType, string>;
|
|
868
|
+
declare const getElementMaterialIcon: typeof getElementIcon;
|
|
843
869
|
/**
|
|
844
870
|
* Field type definitions for OnlyWorlds elements
|
|
845
871
|
*/
|
|
@@ -2294,4 +2320,4 @@ declare class OnlyWorldsClient {
|
|
|
2294
2320
|
static prepareInput<T extends Record<string, any>>(data: T): any;
|
|
2295
2321
|
}
|
|
2296
2322
|
|
|
2297
|
-
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_LABELS, 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, getElementLabel };
|
|
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,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
ELEMENT_ICONS: () => ELEMENT_ICONS,
|
|
23
24
|
ELEMENT_LABELS: () => ELEMENT_LABELS,
|
|
25
|
+
ELEMENT_MATERIAL_ICONS: () => ELEMENT_MATERIAL_ICONS,
|
|
26
|
+
ELEMENT_UNICODE_ICONS: () => ELEMENT_UNICODE_ICONS,
|
|
24
27
|
ElementType: () => ElementType,
|
|
25
28
|
FIELD_MAPPINGS: () => FIELD_MAPPINGS,
|
|
26
29
|
FIELD_SCHEMA: () => FIELD_SCHEMA,
|
|
@@ -29,7 +32,10 @@ __export(index_exports, {
|
|
|
29
32
|
createAnyElementId: () => createAnyElementId,
|
|
30
33
|
createElementId: () => createElementId,
|
|
31
34
|
createElementIds: () => createElementIds,
|
|
32
|
-
|
|
35
|
+
getElementIcon: () => getElementIcon,
|
|
36
|
+
getElementLabel: () => getElementLabel,
|
|
37
|
+
getElementMaterialIcon: () => getElementMaterialIcon,
|
|
38
|
+
getElementUnicodeIcon: () => getElementUnicodeIcon
|
|
33
39
|
});
|
|
34
40
|
module.exports = __toCommonJS(index_exports);
|
|
35
41
|
|
|
@@ -207,6 +213,62 @@ function getElementLabel(elementType) {
|
|
|
207
213
|
return ELEMENT_LABELS[elementType];
|
|
208
214
|
}
|
|
209
215
|
var ONLYWORLDS_VERSION = "00.30.00";
|
|
216
|
+
var ELEMENT_ICONS = {
|
|
217
|
+
["ability" /* Ability */]: "auto_fix_normal",
|
|
218
|
+
["character" /* Character */]: "person",
|
|
219
|
+
["collective" /* Collective */]: "groups_3",
|
|
220
|
+
["construct" /* Construct */]: "api",
|
|
221
|
+
["creature" /* Creature */]: "bug_report",
|
|
222
|
+
["event" /* Event */]: "saved_search",
|
|
223
|
+
["family" /* Family */]: "supervisor_account",
|
|
224
|
+
["institution" /* Institution */]: "business",
|
|
225
|
+
["language" /* Language */]: "edit_road",
|
|
226
|
+
["law" /* Law */]: "gpp_bad",
|
|
227
|
+
["location" /* Location */]: "castle",
|
|
228
|
+
["map" /* Map */]: "map",
|
|
229
|
+
["marker" /* Marker */]: "place",
|
|
230
|
+
["narrative" /* Narrative */]: "menu_book",
|
|
231
|
+
["object" /* Object */]: "webhook",
|
|
232
|
+
["phenomenon" /* Phenomenon */]: "thunderstorm",
|
|
233
|
+
["pin" /* Pin */]: "push_pin",
|
|
234
|
+
["relation" /* Relation */]: "link",
|
|
235
|
+
["species" /* Species */]: "crib",
|
|
236
|
+
["title" /* Title */]: "military_tech",
|
|
237
|
+
["trait" /* Trait */]: "flaky",
|
|
238
|
+
["zone" /* Zone */]: "architecture"
|
|
239
|
+
};
|
|
240
|
+
var ELEMENT_UNICODE_ICONS = {
|
|
241
|
+
["ability" /* Ability */]: "\u2728",
|
|
242
|
+
["character" /* Character */]: "\u{1F464}",
|
|
243
|
+
["collective" /* Collective */]: "\u{1F465}",
|
|
244
|
+
["construct" /* Construct */]: "\u2699\uFE0F",
|
|
245
|
+
["creature" /* Creature */]: "\u{1F43E}",
|
|
246
|
+
["event" /* Event */]: "\u{1F4C5}",
|
|
247
|
+
["family" /* Family */]: "\u{1F468}\u200D\u{1F469}\u200D\u{1F467}\u200D\u{1F466}",
|
|
248
|
+
["institution" /* Institution */]: "\u{1F3DB}\uFE0F",
|
|
249
|
+
["language" /* Language */]: "\u{1F4AC}",
|
|
250
|
+
["law" /* Law */]: "\u2696\uFE0F",
|
|
251
|
+
["location" /* Location */]: "\u{1F3F0}",
|
|
252
|
+
["map" /* Map */]: "\u{1F5FA}\uFE0F",
|
|
253
|
+
["marker" /* Marker */]: "\u{1F4CD}",
|
|
254
|
+
["narrative" /* Narrative */]: "\u{1F4D6}",
|
|
255
|
+
["object" /* Object */]: "\u{1F4E6}",
|
|
256
|
+
["phenomenon" /* Phenomenon */]: "\u26A1",
|
|
257
|
+
["pin" /* Pin */]: "\u{1F4CC}",
|
|
258
|
+
["relation" /* Relation */]: "\u{1F517}",
|
|
259
|
+
["species" /* Species */]: "\u{1F9EC}",
|
|
260
|
+
["title" /* Title */]: "\u{1F451}",
|
|
261
|
+
["trait" /* Trait */]: "\u2744\uFE0F",
|
|
262
|
+
["zone" /* Zone */]: "\u{1F5FA}\uFE0F"
|
|
263
|
+
};
|
|
264
|
+
function getElementIcon(elementType) {
|
|
265
|
+
return ELEMENT_ICONS[elementType];
|
|
266
|
+
}
|
|
267
|
+
function getElementUnicodeIcon(elementType) {
|
|
268
|
+
return ELEMENT_UNICODE_ICONS[elementType];
|
|
269
|
+
}
|
|
270
|
+
var ELEMENT_MATERIAL_ICONS = ELEMENT_ICONS;
|
|
271
|
+
var getElementMaterialIcon = getElementIcon;
|
|
210
272
|
var FIELD_SCHEMA = {
|
|
211
273
|
ability: {
|
|
212
274
|
// Text fields
|
|
@@ -674,7 +736,10 @@ function createAnyElementId(id) {
|
|
|
674
736
|
}
|
|
675
737
|
// Annotate the CommonJS export names for ESM import in node:
|
|
676
738
|
0 && (module.exports = {
|
|
739
|
+
ELEMENT_ICONS,
|
|
677
740
|
ELEMENT_LABELS,
|
|
741
|
+
ELEMENT_MATERIAL_ICONS,
|
|
742
|
+
ELEMENT_UNICODE_ICONS,
|
|
678
743
|
ElementType,
|
|
679
744
|
FIELD_MAPPINGS,
|
|
680
745
|
FIELD_SCHEMA,
|
|
@@ -683,5 +748,8 @@ function createAnyElementId(id) {
|
|
|
683
748
|
createAnyElementId,
|
|
684
749
|
createElementId,
|
|
685
750
|
createElementIds,
|
|
686
|
-
|
|
751
|
+
getElementIcon,
|
|
752
|
+
getElementLabel,
|
|
753
|
+
getElementMaterialIcon,
|
|
754
|
+
getElementUnicodeIcon
|
|
687
755
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -172,6 +172,62 @@ function getElementLabel(elementType) {
|
|
|
172
172
|
return ELEMENT_LABELS[elementType];
|
|
173
173
|
}
|
|
174
174
|
var ONLYWORLDS_VERSION = "00.30.00";
|
|
175
|
+
var ELEMENT_ICONS = {
|
|
176
|
+
["ability" /* Ability */]: "auto_fix_normal",
|
|
177
|
+
["character" /* Character */]: "person",
|
|
178
|
+
["collective" /* Collective */]: "groups_3",
|
|
179
|
+
["construct" /* Construct */]: "api",
|
|
180
|
+
["creature" /* Creature */]: "bug_report",
|
|
181
|
+
["event" /* Event */]: "saved_search",
|
|
182
|
+
["family" /* Family */]: "supervisor_account",
|
|
183
|
+
["institution" /* Institution */]: "business",
|
|
184
|
+
["language" /* Language */]: "edit_road",
|
|
185
|
+
["law" /* Law */]: "gpp_bad",
|
|
186
|
+
["location" /* Location */]: "castle",
|
|
187
|
+
["map" /* Map */]: "map",
|
|
188
|
+
["marker" /* Marker */]: "place",
|
|
189
|
+
["narrative" /* Narrative */]: "menu_book",
|
|
190
|
+
["object" /* Object */]: "webhook",
|
|
191
|
+
["phenomenon" /* Phenomenon */]: "thunderstorm",
|
|
192
|
+
["pin" /* Pin */]: "push_pin",
|
|
193
|
+
["relation" /* Relation */]: "link",
|
|
194
|
+
["species" /* Species */]: "crib",
|
|
195
|
+
["title" /* Title */]: "military_tech",
|
|
196
|
+
["trait" /* Trait */]: "flaky",
|
|
197
|
+
["zone" /* Zone */]: "architecture"
|
|
198
|
+
};
|
|
199
|
+
var ELEMENT_UNICODE_ICONS = {
|
|
200
|
+
["ability" /* Ability */]: "\u2728",
|
|
201
|
+
["character" /* Character */]: "\u{1F464}",
|
|
202
|
+
["collective" /* Collective */]: "\u{1F465}",
|
|
203
|
+
["construct" /* Construct */]: "\u2699\uFE0F",
|
|
204
|
+
["creature" /* Creature */]: "\u{1F43E}",
|
|
205
|
+
["event" /* Event */]: "\u{1F4C5}",
|
|
206
|
+
["family" /* Family */]: "\u{1F468}\u200D\u{1F469}\u200D\u{1F467}\u200D\u{1F466}",
|
|
207
|
+
["institution" /* Institution */]: "\u{1F3DB}\uFE0F",
|
|
208
|
+
["language" /* Language */]: "\u{1F4AC}",
|
|
209
|
+
["law" /* Law */]: "\u2696\uFE0F",
|
|
210
|
+
["location" /* Location */]: "\u{1F3F0}",
|
|
211
|
+
["map" /* Map */]: "\u{1F5FA}\uFE0F",
|
|
212
|
+
["marker" /* Marker */]: "\u{1F4CD}",
|
|
213
|
+
["narrative" /* Narrative */]: "\u{1F4D6}",
|
|
214
|
+
["object" /* Object */]: "\u{1F4E6}",
|
|
215
|
+
["phenomenon" /* Phenomenon */]: "\u26A1",
|
|
216
|
+
["pin" /* Pin */]: "\u{1F4CC}",
|
|
217
|
+
["relation" /* Relation */]: "\u{1F517}",
|
|
218
|
+
["species" /* Species */]: "\u{1F9EC}",
|
|
219
|
+
["title" /* Title */]: "\u{1F451}",
|
|
220
|
+
["trait" /* Trait */]: "\u2744\uFE0F",
|
|
221
|
+
["zone" /* Zone */]: "\u{1F5FA}\uFE0F"
|
|
222
|
+
};
|
|
223
|
+
function getElementIcon(elementType) {
|
|
224
|
+
return ELEMENT_ICONS[elementType];
|
|
225
|
+
}
|
|
226
|
+
function getElementUnicodeIcon(elementType) {
|
|
227
|
+
return ELEMENT_UNICODE_ICONS[elementType];
|
|
228
|
+
}
|
|
229
|
+
var ELEMENT_MATERIAL_ICONS = ELEMENT_ICONS;
|
|
230
|
+
var getElementMaterialIcon = getElementIcon;
|
|
175
231
|
var FIELD_SCHEMA = {
|
|
176
232
|
ability: {
|
|
177
233
|
// Text fields
|
|
@@ -638,7 +694,10 @@ function createAnyElementId(id) {
|
|
|
638
694
|
return id;
|
|
639
695
|
}
|
|
640
696
|
export {
|
|
697
|
+
ELEMENT_ICONS,
|
|
641
698
|
ELEMENT_LABELS,
|
|
699
|
+
ELEMENT_MATERIAL_ICONS,
|
|
700
|
+
ELEMENT_UNICODE_ICONS,
|
|
642
701
|
ElementType,
|
|
643
702
|
FIELD_MAPPINGS,
|
|
644
703
|
FIELD_SCHEMA,
|
|
@@ -647,5 +706,8 @@ export {
|
|
|
647
706
|
createAnyElementId,
|
|
648
707
|
createElementId,
|
|
649
708
|
createElementIds,
|
|
650
|
-
|
|
709
|
+
getElementIcon,
|
|
710
|
+
getElementLabel,
|
|
711
|
+
getElementMaterialIcon,
|
|
712
|
+
getElementUnicodeIcon
|
|
651
713
|
};
|
package/package.json
CHANGED