@onlyworlds/sdk 1.3.1 → 1.4.0

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 CHANGED
@@ -835,6 +835,44 @@ declare const ELEMENT_LABELS: Record<ElementType, string>;
835
835
  * @returns The plural label string
836
836
  */
837
837
  declare function getElementLabel(elementType: ElementType): string;
838
+ /**
839
+ * Current OnlyWorlds version
840
+ * Synced with https://github.com/OnlyWorlds/OnlyWorlds/blob/main/VERSION
841
+ */
842
+ declare const ONLYWORLDS_VERSION: "00.30.00";
843
+ /**
844
+ * Material Design icons for element types
845
+ * Compatible with Google Material Icons font
846
+ */
847
+ declare const ELEMENT_MATERIAL_ICONS: Record<ElementType, string>;
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>;
853
+ /**
854
+ * Unicode emoji icons for element types
855
+ * Universal compatibility across platforms
856
+ */
857
+ declare const ELEMENT_UNICODE_ICONS: Record<ElementType, string>;
858
+ /**
859
+ * Get Material Design icon for an element type
860
+ * @param elementType The element type
861
+ * @returns Material icon name
862
+ */
863
+ declare function getElementMaterialIcon(elementType: ElementType): string;
864
+ /**
865
+ * Get Font Awesome icon for an element type
866
+ * @param elementType The element type
867
+ * @returns Font Awesome icon class
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
874
+ */
875
+ declare function getElementUnicodeIcon(elementType: ElementType): string;
838
876
  /**
839
877
  * Field type definitions for OnlyWorlds elements
840
878
  */
@@ -2289,4 +2327,4 @@ declare class OnlyWorldsClient {
2289
2327
  static prepareInput<T extends Record<string, any>>(data: T): any;
2290
2328
  }
2291
2329
 
2292
- 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, 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 };
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, ELEMENT_FONTAWESOME_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, getElementFontAwesomeIcon, getElementLabel, getElementMaterialIcon, getElementUnicodeIcon };
package/dist/index.d.ts CHANGED
@@ -835,6 +835,44 @@ declare const ELEMENT_LABELS: Record<ElementType, string>;
835
835
  * @returns The plural label string
836
836
  */
837
837
  declare function getElementLabel(elementType: ElementType): string;
838
+ /**
839
+ * Current OnlyWorlds version
840
+ * Synced with https://github.com/OnlyWorlds/OnlyWorlds/blob/main/VERSION
841
+ */
842
+ declare const ONLYWORLDS_VERSION: "00.30.00";
843
+ /**
844
+ * Material Design icons for element types
845
+ * Compatible with Google Material Icons font
846
+ */
847
+ declare const ELEMENT_MATERIAL_ICONS: Record<ElementType, string>;
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>;
853
+ /**
854
+ * Unicode emoji icons for element types
855
+ * Universal compatibility across platforms
856
+ */
857
+ declare const ELEMENT_UNICODE_ICONS: Record<ElementType, string>;
858
+ /**
859
+ * Get Material Design icon for an element type
860
+ * @param elementType The element type
861
+ * @returns Material icon name
862
+ */
863
+ declare function getElementMaterialIcon(elementType: ElementType): string;
864
+ /**
865
+ * Get Font Awesome icon for an element type
866
+ * @param elementType The element type
867
+ * @returns Font Awesome icon class
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
874
+ */
875
+ declare function getElementUnicodeIcon(elementType: ElementType): string;
838
876
  /**
839
877
  * Field type definitions for OnlyWorlds elements
840
878
  */
@@ -2289,4 +2327,4 @@ declare class OnlyWorldsClient {
2289
2327
  static prepareInput<T extends Record<string, any>>(data: T): any;
2290
2328
  }
2291
2329
 
2292
- 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, 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 };
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, ELEMENT_FONTAWESOME_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, getElementFontAwesomeIcon, getElementLabel, getElementMaterialIcon, getElementUnicodeIcon };
package/dist/index.js CHANGED
@@ -20,15 +20,22 @@ 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_FONTAWESOME_ICONS: () => ELEMENT_FONTAWESOME_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,
30
+ ONLYWORLDS_VERSION: () => ONLYWORLDS_VERSION,
27
31
  OnlyWorldsClient: () => OnlyWorldsClient,
28
32
  createAnyElementId: () => createAnyElementId,
29
33
  createElementId: () => createElementId,
30
34
  createElementIds: () => createElementIds,
31
- getElementLabel: () => getElementLabel
35
+ getElementFontAwesomeIcon: () => getElementFontAwesomeIcon,
36
+ getElementLabel: () => getElementLabel,
37
+ getElementMaterialIcon: () => getElementMaterialIcon,
38
+ getElementUnicodeIcon: () => getElementUnicodeIcon
32
39
  });
33
40
  module.exports = __toCommonJS(index_exports);
34
41
 
@@ -205,6 +212,88 @@ var ELEMENT_LABELS = {
205
212
  function getElementLabel(elementType) {
206
213
  return ELEMENT_LABELS[elementType];
207
214
  }
215
+ var ONLYWORLDS_VERSION = "00.30.00";
216
+ var ELEMENT_MATERIAL_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_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
+ var ELEMENT_UNICODE_ICONS = {
265
+ ["ability" /* Ability */]: "\u2728",
266
+ ["character" /* Character */]: "\u{1F464}",
267
+ ["collective" /* Collective */]: "\u{1F465}",
268
+ ["construct" /* Construct */]: "\u2699\uFE0F",
269
+ ["creature" /* Creature */]: "\u{1F43E}",
270
+ ["event" /* Event */]: "\u{1F4C5}",
271
+ ["family" /* Family */]: "\u{1F468}\u200D\u{1F469}\u200D\u{1F467}\u200D\u{1F466}",
272
+ ["institution" /* Institution */]: "\u{1F3DB}\uFE0F",
273
+ ["language" /* Language */]: "\u{1F4AC}",
274
+ ["law" /* Law */]: "\u2696\uFE0F",
275
+ ["location" /* Location */]: "\u{1F3F0}",
276
+ ["map" /* Map */]: "\u{1F5FA}\uFE0F",
277
+ ["marker" /* Marker */]: "\u{1F4CD}",
278
+ ["narrative" /* Narrative */]: "\u{1F4D6}",
279
+ ["object" /* Object */]: "\u{1F4E6}",
280
+ ["phenomenon" /* Phenomenon */]: "\u26A1",
281
+ ["pin" /* Pin */]: "\u{1F4CC}",
282
+ ["relation" /* Relation */]: "\u{1F517}",
283
+ ["species" /* Species */]: "\u{1F9EC}",
284
+ ["title" /* Title */]: "\u{1F451}",
285
+ ["trait" /* Trait */]: "\u2744\uFE0F",
286
+ ["zone" /* Zone */]: "\u{1F5FA}\uFE0F"
287
+ };
288
+ function getElementMaterialIcon(elementType) {
289
+ return ELEMENT_MATERIAL_ICONS[elementType];
290
+ }
291
+ function getElementFontAwesomeIcon(elementType) {
292
+ return ELEMENT_FONTAWESOME_ICONS[elementType];
293
+ }
294
+ function getElementUnicodeIcon(elementType) {
295
+ return ELEMENT_UNICODE_ICONS[elementType];
296
+ }
208
297
  var FIELD_SCHEMA = {
209
298
  ability: {
210
299
  // Text fields
@@ -672,13 +761,20 @@ function createAnyElementId(id) {
672
761
  }
673
762
  // Annotate the CommonJS export names for ESM import in node:
674
763
  0 && (module.exports = {
764
+ ELEMENT_FONTAWESOME_ICONS,
675
765
  ELEMENT_LABELS,
766
+ ELEMENT_MATERIAL_ICONS,
767
+ ELEMENT_UNICODE_ICONS,
676
768
  ElementType,
677
769
  FIELD_MAPPINGS,
678
770
  FIELD_SCHEMA,
771
+ ONLYWORLDS_VERSION,
679
772
  OnlyWorldsClient,
680
773
  createAnyElementId,
681
774
  createElementId,
682
775
  createElementIds,
683
- getElementLabel
776
+ getElementFontAwesomeIcon,
777
+ getElementLabel,
778
+ getElementMaterialIcon,
779
+ getElementUnicodeIcon
684
780
  });
package/dist/index.mjs CHANGED
@@ -171,6 +171,88 @@ var ELEMENT_LABELS = {
171
171
  function getElementLabel(elementType) {
172
172
  return ELEMENT_LABELS[elementType];
173
173
  }
174
+ var ONLYWORLDS_VERSION = "00.30.00";
175
+ var ELEMENT_MATERIAL_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_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
+ var ELEMENT_UNICODE_ICONS = {
224
+ ["ability" /* Ability */]: "\u2728",
225
+ ["character" /* Character */]: "\u{1F464}",
226
+ ["collective" /* Collective */]: "\u{1F465}",
227
+ ["construct" /* Construct */]: "\u2699\uFE0F",
228
+ ["creature" /* Creature */]: "\u{1F43E}",
229
+ ["event" /* Event */]: "\u{1F4C5}",
230
+ ["family" /* Family */]: "\u{1F468}\u200D\u{1F469}\u200D\u{1F467}\u200D\u{1F466}",
231
+ ["institution" /* Institution */]: "\u{1F3DB}\uFE0F",
232
+ ["language" /* Language */]: "\u{1F4AC}",
233
+ ["law" /* Law */]: "\u2696\uFE0F",
234
+ ["location" /* Location */]: "\u{1F3F0}",
235
+ ["map" /* Map */]: "\u{1F5FA}\uFE0F",
236
+ ["marker" /* Marker */]: "\u{1F4CD}",
237
+ ["narrative" /* Narrative */]: "\u{1F4D6}",
238
+ ["object" /* Object */]: "\u{1F4E6}",
239
+ ["phenomenon" /* Phenomenon */]: "\u26A1",
240
+ ["pin" /* Pin */]: "\u{1F4CC}",
241
+ ["relation" /* Relation */]: "\u{1F517}",
242
+ ["species" /* Species */]: "\u{1F9EC}",
243
+ ["title" /* Title */]: "\u{1F451}",
244
+ ["trait" /* Trait */]: "\u2744\uFE0F",
245
+ ["zone" /* Zone */]: "\u{1F5FA}\uFE0F"
246
+ };
247
+ function getElementMaterialIcon(elementType) {
248
+ return ELEMENT_MATERIAL_ICONS[elementType];
249
+ }
250
+ function getElementFontAwesomeIcon(elementType) {
251
+ return ELEMENT_FONTAWESOME_ICONS[elementType];
252
+ }
253
+ function getElementUnicodeIcon(elementType) {
254
+ return ELEMENT_UNICODE_ICONS[elementType];
255
+ }
174
256
  var FIELD_SCHEMA = {
175
257
  ability: {
176
258
  // Text fields
@@ -637,13 +719,20 @@ function createAnyElementId(id) {
637
719
  return id;
638
720
  }
639
721
  export {
722
+ ELEMENT_FONTAWESOME_ICONS,
640
723
  ELEMENT_LABELS,
724
+ ELEMENT_MATERIAL_ICONS,
725
+ ELEMENT_UNICODE_ICONS,
641
726
  ElementType,
642
727
  FIELD_MAPPINGS,
643
728
  FIELD_SCHEMA,
729
+ ONLYWORLDS_VERSION,
644
730
  OnlyWorldsClient,
645
731
  createAnyElementId,
646
732
  createElementId,
647
733
  createElementIds,
648
- getElementLabel
734
+ getElementFontAwesomeIcon,
735
+ getElementLabel,
736
+ getElementMaterialIcon,
737
+ getElementUnicodeIcon
649
738
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",