@dxos/random 0.8.2-main.f11618f → 0.8.2-main.fbd8ed0

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.
@@ -5,6 +5,7 @@ export * from "@ngneat/falso";
5
5
 
6
6
  // packages/common/random/src/faker.ts
7
7
  import { rand, randChanceBoolean, randCompanyName, randEmail, randFirstName, randFloat, randFullName, randHexaDecimal, randImg, randNumber as randNumber2, randParagraph, randProductName, randRecentDate, randSentence, randUrl, randUuid, randWord, seed } from "@ngneat/falso";
8
+ import { idEmoji, idHue } from "@dxos/util";
8
9
 
9
10
  // packages/common/random/src/data.ts
10
11
  var airports = [
@@ -393,7 +394,56 @@ var airports = [
393
394
  ]
394
395
  }
395
396
  ];
396
- var randAirport = () => airports[Math.floor(Math.random() * airports.length)];
397
+ var icons = [
398
+ "ph--air-traffic-control--regular",
399
+ "ph--asterisk--regular",
400
+ "ph--atom--regular",
401
+ "ph--basketball--regular",
402
+ "ph--butterfly--regular",
403
+ "ph--cactus--regular",
404
+ "ph--cake--regular",
405
+ "ph--calendar-dots--regular",
406
+ "ph--campfire--regular",
407
+ "ph--command--regular",
408
+ "ph--confetti--regular",
409
+ "ph--detective--regular",
410
+ "ph--disco-ball--regular",
411
+ "ph--dna--regular",
412
+ "ph--factory--regular",
413
+ "ph--flag-banner-fold--regular",
414
+ "ph--flask--regular",
415
+ "ph--flower-lotus--regular",
416
+ "ph--flying-saucer--regular",
417
+ "ph--game-controller--regular",
418
+ "ph--gavel--regular",
419
+ "ph--gift--regular",
420
+ "ph--guitar--regular",
421
+ "ph--hamburger--regular",
422
+ "ph--handshake--regular",
423
+ "ph--heart--regular",
424
+ "ph--lightbulb--regular",
425
+ "ph--lock--regular",
426
+ "ph--martini--regular",
427
+ "ph--medal-military--regular",
428
+ "ph--moped-front--regular",
429
+ "ph--office-chair--regular",
430
+ "ph--paint-brush-household--regular",
431
+ "ph--peace--regular",
432
+ "ph--person-simple-hike--regular",
433
+ "ph--piggy-bank--regular",
434
+ "ph--potted-plant--regular",
435
+ "ph--radioactive--regular",
436
+ "ph--rocket-launch--regular",
437
+ "ph--shield-star--regular",
438
+ "ph--shopping-cart--regular",
439
+ "ph--stethoscope--regular",
440
+ "ph--student--regular",
441
+ "ph--sun--regular",
442
+ "ph--tote--regular",
443
+ "ph--tree--regular",
444
+ "ph--users-three--regular",
445
+ "ph--yin-yang--regular"
446
+ ];
397
447
 
398
448
  // packages/common/random/src/util.ts
399
449
  import { randNumber } from "@ngneat/falso";
@@ -520,10 +570,15 @@ var faker = {
520
570
  productName: () => randProductName()
521
571
  },
522
572
  geo: {
523
- airport: () => randAirport(),
524
- location: () => randAirport().location
525
- },
526
- email: {}
573
+ airport: () => rand(airports),
574
+ location: () => rand(airports).location
575
+ },
576
+ email: {},
577
+ properties: {
578
+ emoji: () => rand(idEmoji),
579
+ hue: () => rand(idHue),
580
+ icon: () => rand(icons)
581
+ }
527
582
  };
528
583
  export {
529
584
  faker
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/index.ts", "../../../src/faker.ts", "../../../src/data.ts", "../../../src/util.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport * from '@ngneat/falso';\n\nexport * from './faker';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n rand,\n randChanceBoolean,\n randCompanyName,\n randEmail,\n randFirstName,\n randFloat,\n randFullName,\n randHexaDecimal,\n randImg,\n randNumber,\n randParagraph,\n randProductName,\n randRecentDate,\n randSentence,\n randUrl,\n randUuid,\n randWord,\n seed,\n} from '@ngneat/falso';\n\nimport { randAirport } from './data';\nimport { type Range, getCount, multiple, toRange, uniqueArray } from './util';\n\n// Fake faker.\nexport const faker = {\n //\n // Util\n //\n seed: (value: number) => seed(String(value)),\n helpers: {\n arrayElement: <T>(a: T[]) => rand(a),\n multiple: <T>(f: () => T, { count }: { count: number | { min: number; max: number } }) =>\n multiple(f, typeof count === 'number' ? count : getCount(count)),\n uniqueArray: <T>(f: T[] | (() => T), n: number) => uniqueArray(f, n),\n randomSubset: <T>(array: T[], count?: number | { min: number; max: number }) => {\n const length =\n count === undefined\n ? Math.floor(Math.random() * (array.length + 1))\n : Math.min(typeof count === 'number' ? count : getCount(count), array.length);\n\n if (length === 0) {\n return [];\n }\n return uniqueArray(() => rand(array), length);\n },\n },\n\n //\n // Type\n //\n number: {\n float: (range?: number | Range) => randFloat(range ? toRange(range) : undefined),\n int: (range?: number | Range) => randNumber(range ? toRange(range) : undefined),\n },\n datatype: {\n boolean: (p?: { probability: number }) => randChanceBoolean({ chanceTrue: p?.probability ?? 0.5 }),\n },\n date: {\n recent: () => randRecentDate(),\n },\n image: {\n url: () => randImg(),\n },\n\n //\n // Text\n //\n lorem: {\n word: () => randWord(),\n words: (n: number | Range = 1) => randWord({ length: getCount(n) }).join(' '),\n sentence: (n: number | Range = 1) => {\n if (n) {\n const text = randWord({ length: getCount(n) }).join(' ');\n return text.charAt(0).toUpperCase() + text.slice(1) + '.';\n }\n\n return randSentence();\n },\n sentences: (n: number | Range = 1) => randSentence({ length: getCount(n) }).join(' '),\n paragraph: (n: number | Range = 1) => {\n if (n) {\n return randSentence({ length: getCount(n) }).join(' ');\n }\n\n return randParagraph();\n },\n paragraphs: (n: number | Range = 1) => randParagraph({ length: getCount(n) }).join('\\n'),\n },\n\n //\n // String\n //\n string: {\n hexadecimal: (l?: { length: number }) => randHexaDecimal(l).join(''),\n uuid: () => randUuid(),\n },\n\n //\n // Custom\n //\n internet: {\n email: () => randEmail(),\n url: () => randUrl(),\n },\n person: {\n firstName: () => randFirstName(),\n fullName: () => randFullName(),\n },\n company: {\n name: () => randCompanyName(),\n },\n commerce: {\n productName: () => randProductName(),\n },\n geo: {\n airport: () => randAirport(),\n location: () => randAirport().location,\n },\n email: {},\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nconst airports = [\n { name: 'Atlanta', code: 'ATL', location: [-84.4277, 33.6407] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n { name: 'Dallas', code: 'DFW', location: [-97.0403, 32.8998] },\n { name: 'London', code: 'LHR', location: [-0.4543, 51.47] },\n { name: 'Tokyo', code: 'HND', location: [139.7811, 35.5494] },\n { name: 'Denver', code: 'DEN', location: [-104.6737, 39.8561] },\n { name: 'Istanbul', code: 'IST', location: [28.8153, 41.2753] },\n { name: 'Los Angeles', code: 'LAX', location: [-118.4085, 33.9416] },\n { name: 'Paris', code: 'CDG', location: [2.55, 49.0097] },\n { name: 'Guangzhou', code: 'CAN', location: [113.2971, 23.3924] },\n { name: 'Frankfurt', code: 'FRA', location: [8.5706, 50.0333] },\n { name: 'Delhi', code: 'DEL', location: [77.1031, 28.5562] },\n { name: 'Singapore', code: 'SIN', location: [103.994, 1.3644] },\n { name: 'Amsterdam', code: 'AMS', location: [4.7639, 52.3105] },\n { name: 'Seoul', code: 'ICN', location: [126.4505, 37.4602] },\n { name: 'Jakarta', code: 'CGK', location: [106.6559, -6.1256] },\n { name: 'Bangkok', code: 'BKK', location: [100.7501, 13.6899] },\n { name: 'Hong Kong', code: 'HKG', location: [113.9185, 22.308] },\n { name: 'Madrid', code: 'MAD', location: [-3.5676, 40.4936] },\n { name: 'San Francisco', code: 'SFO', location: [-122.379, 37.6213] },\n { name: 'New York', code: 'JFK', location: [-73.7781, 40.6413] },\n { name: 'Chicago', code: 'ORD', location: [-87.9048, 41.9742] },\n { name: 'Shanghai', code: 'PVG', location: [121.8083, 31.1434] },\n { name: 'Beijing', code: 'PEK', location: [116.4074, 39.9042] },\n { name: 'Miami', code: 'MIA', location: [-80.2906, 25.7959] },\n { name: 'Houston', code: 'IAH', location: [-95.3414, 29.9844] },\n { name: 'Munich', code: 'MUC', location: [11.7861, 48.3538] },\n { name: 'Toronto', code: 'YYZ', location: [-79.6306, 43.6777] },\n { name: 'Sydney', code: 'SYD', location: [151.1799, -33.9399] },\n { name: 'Melbourne', code: 'MEL', location: [144.843, -37.6733] },\n { name: 'Rome', code: 'FCO', location: [12.2508, 41.8003] },\n { name: 'Barcelona', code: 'BCN', location: [2.0759, 41.2974] },\n { name: 'Kuala Lumpur', code: 'KUL', location: [101.7099, 2.7456] },\n { name: 'Doha', code: 'DOH', location: [51.6136, 25.2731] },\n { name: 'Vienna', code: 'VIE', location: [16.5697, 48.1103] },\n { name: 'Zurich', code: 'ZRH', location: [8.5492, 47.4583] },\n { name: 'Brussels', code: 'BRU', location: [4.4844, 50.901] },\n { name: 'Copenhagen', code: 'CPH', location: [12.6508, 55.6181] },\n { name: 'Oslo', code: 'OSL', location: [11.1004, 60.1939] },\n { name: 'Stockholm', code: 'ARN', location: [17.9186, 59.6519] },\n { name: 'Helsinki', code: 'HEL', location: [24.9633, 60.3172] },\n { name: 'Lisbon', code: 'LIS', location: [-9.1359, 38.7742] },\n { name: 'Athens', code: 'ATH', location: [23.9445, 37.9364] },\n { name: 'Warsaw', code: 'WAW', location: [20.9671, 52.1657] },\n { name: 'Budapest', code: 'BUD', location: [19.261, 47.433] },\n { name: 'Prague', code: 'PRG', location: [14.2632, 50.1008] },\n { name: 'Moscow', code: 'SVO', location: [37.4146, 55.9726] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n];\n\nexport const randAirport = () => airports[Math.floor(Math.random() * airports.length)];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { randNumber } from '@ngneat/falso';\n\nexport type Range = { min?: number; max?: number; count?: number };\n\nexport const toRange = (range: number | Range, min = 0) => (typeof range === 'number' ? { min, max: range } : range);\n\nexport const getCount = (range?: number | Range) => (typeof range === 'number' ? range : randNumber(range));\n\nexport const multiple = <T>(fn: (i: number) => T, n: number): T[] => {\n return Array.from({ length: n }).map((_, i) => fn(i));\n};\n\nexport const uniqueArray = <T>(values: T[] | (() => T), n: number): T[] => {\n if (Array.isArray(values)) {\n const results: T[] = [];\n const selection = Array.from(new Set<T>(values));\n for (let i = 0; i < n; i++) {\n if (selection.length === 0) {\n break;\n }\n results.push(selection.splice(Math.floor(Math.random() * selection.length), 1)[0]);\n }\n return results;\n } else {\n const results = new Set<T>();\n // TODO(burdon): Set timeout.\n while (results.size < n) {\n results.add(values());\n }\n\n return Array.from(results);\n }\n};\n"],
5
- "mappings": ";;;AAIA,cAAc;;;ACAd,SACEA,MACAC,mBACAC,iBACAC,WACAC,eACAC,WACAC,cACAC,iBACAC,SACAC,cAAAA,aACAC,eACAC,iBACAC,gBACAC,cACAC,SACAC,UACAC,UACAC,YACK;;;ACnBP,IAAMC,WAAW;EACf;IAAEC,MAAM;IAAWC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC9D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC3D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC7D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAO;EAC1D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC5D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAW;;EAAS;EAC9D;IAAEF,MAAM;IAAYC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC9D;IAAEF,MAAM;IAAeC,MAAM;IAAOC,UAAU;MAAC;MAAW;;EAAS;EACnE;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAM;;EAAS;EACxD;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAChE;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAQ;;EAAS;EAC9D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC3D;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAQ;EAC9D;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;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IACAC,YAAY,CAAC1C,IAAoB,MAAMyC,cAAc;MAAEtC,QAAQL,SAASE,CAAAA;IAAG,CAAA,EAAGgC,KAAK,IAAA;EACrF;;;;EAKAW,QAAQ;IACNC,aAAa,CAACC,MAA2BC,gBAAgBD,CAAAA,EAAGb,KAAK,EAAA;IACjEe,MAAM,MAAMC,SAAAA;EACd;;;;EAKAC,UAAU;IACRC,OAAO,MAAMC,UAAAA;IACbzB,KAAK,MAAM0B,QAAAA;EACb;EACAC,QAAQ;IACNC,WAAW,MAAMC,cAAAA;IACjBC,UAAU,MAAMC,aAAAA;EAClB;EACAC,SAAS;IACPC,MAAM,MAAMC,gBAAAA;EACd;EACAC,UAAU;IACRC,aAAa,MAAMC,gBAAAA;EACrB;EACAC,KAAK;IACHC,SAAS,MAAMC,YAAAA;IACfC,UAAU,MAAMD,YAAAA,EAAcC;EAChC;EACAjB,OAAO,CAAC;AACV;",
6
- "names": ["rand", "randChanceBoolean", "randCompanyName", "randEmail", "randFirstName", "randFloat", "randFullName", "randHexaDecimal", "randImg", "randNumber", "randParagraph", "randProductName", "randRecentDate", "randSentence", "randUrl", "randUuid", "randWord", "seed", "airports", "name", "code", "location", "randAirport", "Math", "floor", "random", "length", "randNumber", "toRange", "range", "min", "max", "getCount", "randNumber", "multiple", "fn", "n", "Array", "from", "length", "map", "_", "i", "uniqueArray", "values", "isArray", "results", "selection", "Set", "push", "splice", "Math", "floor", "random", "size", "add", "faker", "seed", "value", "String", "helpers", "arrayElement", "a", "rand", "multiple", "f", "count", "getCount", "uniqueArray", "n", "randomSubset", "array", "length", "undefined", "Math", "floor", "random", "min", "number", "float", "range", "randFloat", "toRange", "int", "randNumber", "datatype", "boolean", "p", "randChanceBoolean", "chanceTrue", "probability", "date", "recent", "randRecentDate", "image", "url", "randImg", "lorem", "word", "randWord", "words", "join", "sentence", "text", "charAt", "toUpperCase", "slice", "randSentence", "sentences", "paragraph", "randParagraph", "paragraphs", "string", "hexadecimal", "l", "randHexaDecimal", "uuid", "randUuid", "internet", "email", "randEmail", "randUrl", "person", "firstName", "randFirstName", "fullName", "randFullName", "company", "name", "randCompanyName", "commerce", "productName", "randProductName", "geo", "airport", "randAirport", "location"]
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport * from '@ngneat/falso';\n\nexport * from './faker';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n rand,\n randChanceBoolean,\n randCompanyName,\n randEmail,\n randFirstName,\n randFloat,\n randFullName,\n randHexaDecimal,\n randImg,\n randNumber,\n randParagraph,\n randProductName,\n randRecentDate,\n randSentence,\n randUrl,\n randUuid,\n randWord,\n seed,\n} from '@ngneat/falso';\n\nimport { idEmoji, idHue } from '@dxos/util';\n\nimport { airports, icons } from './data';\nimport { type Range, getCount, multiple, toRange, uniqueArray } from './util';\n\n// Fake faker.\nexport const faker = {\n //\n // Util\n //\n seed: (value: number) => seed(String(value)),\n helpers: {\n arrayElement: <T>(a: T[]) => rand(a),\n multiple: <T>(f: () => T, { count }: { count: number | { min: number; max: number } }) =>\n multiple(f, typeof count === 'number' ? count : getCount(count)),\n uniqueArray: <T>(f: T[] | (() => T), n: number) => uniqueArray(f, n),\n randomSubset: <T>(array: T[], count?: number | { min: number; max: number }) => {\n const length =\n count === undefined\n ? Math.floor(Math.random() * (array.length + 1))\n : Math.min(typeof count === 'number' ? count : getCount(count), array.length);\n\n if (length === 0) {\n return [];\n }\n return uniqueArray(() => rand(array), length);\n },\n },\n\n //\n // Type\n //\n number: {\n float: (range?: number | Range) => randFloat(range ? toRange(range) : undefined),\n int: (range?: number | Range) => randNumber(range ? toRange(range) : undefined),\n },\n datatype: {\n boolean: (p?: { probability: number }) => randChanceBoolean({ chanceTrue: p?.probability ?? 0.5 }),\n },\n date: {\n recent: () => randRecentDate(),\n },\n image: {\n url: () => randImg(),\n },\n\n //\n // Text\n //\n lorem: {\n word: () => randWord(),\n words: (n: number | Range = 1) => randWord({ length: getCount(n) }).join(' '),\n sentence: (n: number | Range = 1) => {\n if (n) {\n const text = randWord({ length: getCount(n) }).join(' ');\n return text.charAt(0).toUpperCase() + text.slice(1) + '.';\n }\n\n return randSentence();\n },\n sentences: (n: number | Range = 1) => randSentence({ length: getCount(n) }).join(' '),\n paragraph: (n: number | Range = 1) => {\n if (n) {\n return randSentence({ length: getCount(n) }).join(' ');\n }\n\n return randParagraph();\n },\n paragraphs: (n: number | Range = 1) => randParagraph({ length: getCount(n) }).join('\\n'),\n },\n\n //\n // String\n //\n string: {\n hexadecimal: (l?: { length: number }) => randHexaDecimal(l).join(''),\n uuid: () => randUuid(),\n },\n\n //\n // Custom\n //\n internet: {\n email: () => randEmail(),\n url: () => randUrl(),\n },\n person: {\n firstName: () => randFirstName(),\n fullName: () => randFullName(),\n },\n company: {\n name: () => randCompanyName(),\n },\n commerce: {\n productName: () => randProductName(),\n },\n geo: {\n airport: () => rand(airports),\n location: () => rand(airports).location,\n },\n email: {},\n properties: {\n emoji: () => rand(idEmoji),\n hue: () => rand(idHue),\n icon: () => rand(icons),\n },\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nexport const airports = [\n { name: 'Atlanta', code: 'ATL', location: [-84.4277, 33.6407] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n { name: 'Dallas', code: 'DFW', location: [-97.0403, 32.8998] },\n { name: 'London', code: 'LHR', location: [-0.4543, 51.47] },\n { name: 'Tokyo', code: 'HND', location: [139.7811, 35.5494] },\n { name: 'Denver', code: 'DEN', location: [-104.6737, 39.8561] },\n { name: 'Istanbul', code: 'IST', location: [28.8153, 41.2753] },\n { name: 'Los Angeles', code: 'LAX', location: [-118.4085, 33.9416] },\n { name: 'Paris', code: 'CDG', location: [2.55, 49.0097] },\n { name: 'Guangzhou', code: 'CAN', location: [113.2971, 23.3924] },\n { name: 'Frankfurt', code: 'FRA', location: [8.5706, 50.0333] },\n { name: 'Delhi', code: 'DEL', location: [77.1031, 28.5562] },\n { name: 'Singapore', code: 'SIN', location: [103.994, 1.3644] },\n { name: 'Amsterdam', code: 'AMS', location: [4.7639, 52.3105] },\n { name: 'Seoul', code: 'ICN', location: [126.4505, 37.4602] },\n { name: 'Jakarta', code: 'CGK', location: [106.6559, -6.1256] },\n { name: 'Bangkok', code: 'BKK', location: [100.7501, 13.6899] },\n { name: 'Hong Kong', code: 'HKG', location: [113.9185, 22.308] },\n { name: 'Madrid', code: 'MAD', location: [-3.5676, 40.4936] },\n { name: 'San Francisco', code: 'SFO', location: [-122.379, 37.6213] },\n { name: 'New York', code: 'JFK', location: [-73.7781, 40.6413] },\n { name: 'Chicago', code: 'ORD', location: [-87.9048, 41.9742] },\n { name: 'Shanghai', code: 'PVG', location: [121.8083, 31.1434] },\n { name: 'Beijing', code: 'PEK', location: [116.4074, 39.9042] },\n { name: 'Miami', code: 'MIA', location: [-80.2906, 25.7959] },\n { name: 'Houston', code: 'IAH', location: [-95.3414, 29.9844] },\n { name: 'Munich', code: 'MUC', location: [11.7861, 48.3538] },\n { name: 'Toronto', code: 'YYZ', location: [-79.6306, 43.6777] },\n { name: 'Sydney', code: 'SYD', location: [151.1799, -33.9399] },\n { name: 'Melbourne', code: 'MEL', location: [144.843, -37.6733] },\n { name: 'Rome', code: 'FCO', location: [12.2508, 41.8003] },\n { name: 'Barcelona', code: 'BCN', location: [2.0759, 41.2974] },\n { name: 'Kuala Lumpur', code: 'KUL', location: [101.7099, 2.7456] },\n { name: 'Doha', code: 'DOH', location: [51.6136, 25.2731] },\n { name: 'Vienna', code: 'VIE', location: [16.5697, 48.1103] },\n { name: 'Zurich', code: 'ZRH', location: [8.5492, 47.4583] },\n { name: 'Brussels', code: 'BRU', location: [4.4844, 50.901] },\n { name: 'Copenhagen', code: 'CPH', location: [12.6508, 55.6181] },\n { name: 'Oslo', code: 'OSL', location: [11.1004, 60.1939] },\n { name: 'Stockholm', code: 'ARN', location: [17.9186, 59.6519] },\n { name: 'Helsinki', code: 'HEL', location: [24.9633, 60.3172] },\n { name: 'Lisbon', code: 'LIS', location: [-9.1359, 38.7742] },\n { name: 'Athens', code: 'ATH', location: [23.9445, 37.9364] },\n { name: 'Warsaw', code: 'WAW', location: [20.9671, 52.1657] },\n { name: 'Budapest', code: 'BUD', location: [19.261, 47.433] },\n { name: 'Prague', code: 'PRG', location: [14.2632, 50.1008] },\n { name: 'Moscow', code: 'SVO', location: [37.4146, 55.9726] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n];\n\nexport const icons = [\n 'ph--air-traffic-control--regular',\n 'ph--asterisk--regular',\n 'ph--atom--regular',\n 'ph--basketball--regular',\n 'ph--butterfly--regular',\n 'ph--cactus--regular',\n 'ph--cake--regular',\n 'ph--calendar-dots--regular',\n 'ph--campfire--regular',\n 'ph--command--regular',\n 'ph--confetti--regular',\n 'ph--detective--regular',\n 'ph--disco-ball--regular',\n 'ph--dna--regular',\n 'ph--factory--regular',\n 'ph--flag-banner-fold--regular',\n 'ph--flask--regular',\n 'ph--flower-lotus--regular',\n 'ph--flying-saucer--regular',\n 'ph--game-controller--regular',\n 'ph--gavel--regular',\n 'ph--gift--regular',\n 'ph--guitar--regular',\n 'ph--hamburger--regular',\n 'ph--handshake--regular',\n 'ph--heart--regular',\n 'ph--lightbulb--regular',\n 'ph--lock--regular',\n 'ph--martini--regular',\n 'ph--medal-military--regular',\n 'ph--moped-front--regular',\n 'ph--office-chair--regular',\n 'ph--paint-brush-household--regular',\n 'ph--peace--regular',\n 'ph--person-simple-hike--regular',\n 'ph--piggy-bank--regular',\n 'ph--potted-plant--regular',\n 'ph--radioactive--regular',\n 'ph--rocket-launch--regular',\n 'ph--shield-star--regular',\n 'ph--shopping-cart--regular',\n 'ph--stethoscope--regular',\n 'ph--student--regular',\n 'ph--sun--regular',\n 'ph--tote--regular',\n 'ph--tree--regular',\n 'ph--users-three--regular',\n 'ph--yin-yang--regular',\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { randNumber } from '@ngneat/falso';\n\nexport type Range = { min?: number; max?: number; count?: number };\n\nexport const toRange = (range: number | Range, min = 0) => (typeof range === 'number' ? { min, max: range } : range);\n\nexport const getCount = (range?: number | Range) => (typeof range === 'number' ? range : randNumber(range));\n\nexport const multiple = <T>(fn: (i: number) => T, n: number): T[] => {\n return Array.from({ length: n }).map((_, i) => fn(i));\n};\n\nexport const uniqueArray = <T>(values: T[] | (() => T), n: number): T[] => {\n if (Array.isArray(values)) {\n const results: T[] = [];\n const selection = Array.from(new Set<T>(values));\n for (let i = 0; i < n; i++) {\n if (selection.length === 0) {\n break;\n }\n results.push(selection.splice(Math.floor(Math.random() * selection.length), 1)[0]);\n }\n return results;\n } else {\n const results = new Set<T>();\n // TODO(burdon): Set timeout.\n while (results.size < n) {\n results.add(values());\n }\n\n return Array.from(results);\n }\n};\n"],
5
+ "mappings": ";;;AAIA,cAAc;;;ACAd,SACEA,MACAC,mBACAC,iBACAC,WACAC,eACAC,WACAC,cACAC,iBACAC,SACAC,cAAAA,aACAC,eACAC,iBACAC,gBACAC,cACAC,SACAC,UACAC,UACAC,YACK;AAEP,SAASC,SAASC,aAAa;;;ACrBxB,IAAMC,WAAW;EACtB;IAAEC,MAAM;IAAWC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC9D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC3D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC7D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAO;EAC1D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC5D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAW;;EAAS;EAC9D;IAAEF,MAAM;IAAYC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC9D;IAAEF,MAAM;IAAeC,MAAM;IAAOC,UAAU;MAAC;MAAW;;EAAS;EACnE;IAAEF,MAAM;I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F;",
6
+ "names": ["rand", "randChanceBoolean", "randCompanyName", "randEmail", "randFirstName", "randFloat", "randFullName", "randHexaDecimal", "randImg", "randNumber", "randParagraph", "randProductName", "randRecentDate", "randSentence", "randUrl", "randUuid", "randWord", "seed", "idEmoji", "idHue", "airports", "name", "code", "location", "icons", "randNumber", "toRange", "range", "min", "max", "getCount", "randNumber", "multiple", "fn", "n", "Array", "from", "length", "map", "_", "i", "uniqueArray", "values", "isArray", "results", "selection", "Set", "push", "splice", "Math", "floor", "random", "size", "add", "faker", "seed", "value", "String", "helpers", "arrayElement", "a", "rand", "multiple", "f", "count", "getCount", "uniqueArray", "n", "randomSubset", "array", "length", "undefined", "Math", "floor", "random", "min", "number", "float", "range", "randFloat", "toRange", "int", "randNumber", "datatype", "boolean", "p", "randChanceBoolean", "chanceTrue", "probability", "date", "recent", "randRecentDate", "image", "url", "randImg", "lorem", "word", "randWord", "words", "join", "sentence", "text", "charAt", "toUpperCase", "slice", "randSentence", "sentences", "paragraph", "randParagraph", "paragraphs", "string", "hexadecimal", "l", "randHexaDecimal", "uuid", "randUuid", "internet", "email", "randEmail", "randUrl", "person", "firstName", "randFirstName", "fullName", "randFullName", "company", "name", "randCompanyName", "commerce", "productName", "randProductName", "geo", "airport", "airports", "location", "properties", "emoji", "idEmoji", "hue", "idHue", "icon", "icons"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/common/random/src/data.ts":{"bytes":15884,"imports":[],"format":"esm"},"packages/common/random/src/util.ts":{"bytes":4274,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true}],"format":"esm"},"packages/common/random/src/faker.ts":{"bytes":11625,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"packages/common/random/src/data.ts","kind":"import-statement","original":"./data"},{"path":"packages/common/random/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/common/random/src/index.ts":{"bytes":590,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"packages/common/random/src/faker.ts","kind":"import-statement","original":"./faker"}],"format":"esm"}},"outputs":{"packages/common/random/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15011},"packages/common/random/dist/lib/browser/index.mjs":{"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true}],"exports":["faker"],"entryPoint":"packages/common/random/src/index.ts","inputs":{"packages/common/random/src/index.ts":{"bytesInOutput":31},"packages/common/random/src/faker.ts":{"bytesInOutput":2469},"packages/common/random/src/data.ts":{"bytesInOutput":4814},"packages/common/random/src/util.ts":{"bytesInOutput":827}},"bytes":8427}}}
1
+ {"inputs":{"packages/common/random/src/data.ts":{"bytes":19345,"imports":[],"format":"esm"},"packages/common/random/src/util.ts":{"bytes":4274,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true}],"format":"esm"},"packages/common/random/src/faker.ts":{"bytes":12319,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/common/random/src/data.ts","kind":"import-statement","original":"./data"},{"path":"packages/common/random/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/common/random/src/index.ts":{"bytes":590,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"packages/common/random/src/faker.ts","kind":"import-statement","original":"./faker"}],"format":"esm"}},"outputs":{"packages/common/random/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16908},"packages/common/random/dist/lib/browser/index.mjs":{"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true}],"exports":["faker"],"entryPoint":"packages/common/random/src/index.ts","inputs":{"packages/common/random/src/index.ts":{"bytesInOutput":31},"packages/common/random/src/faker.ts":{"bytesInOutput":2625},"packages/common/random/src/data.ts":{"bytesInOutput":6106},"packages/common/random/src/util.ts":{"bytesInOutput":827}},"bytes":9875}}}
@@ -24,6 +24,7 @@ __export(node_exports, {
24
24
  module.exports = __toCommonJS(node_exports);
25
25
  __reExport(node_exports, require("@ngneat/falso"), module.exports);
26
26
  var import_falso = require("@ngneat/falso");
27
+ var import_util = require("@dxos/util");
27
28
  var import_falso2 = require("@ngneat/falso");
28
29
  var airports = [
29
30
  {
@@ -411,7 +412,56 @@ var airports = [
411
412
  ]
412
413
  }
413
414
  ];
414
- var randAirport = () => airports[Math.floor(Math.random() * airports.length)];
415
+ var icons = [
416
+ "ph--air-traffic-control--regular",
417
+ "ph--asterisk--regular",
418
+ "ph--atom--regular",
419
+ "ph--basketball--regular",
420
+ "ph--butterfly--regular",
421
+ "ph--cactus--regular",
422
+ "ph--cake--regular",
423
+ "ph--calendar-dots--regular",
424
+ "ph--campfire--regular",
425
+ "ph--command--regular",
426
+ "ph--confetti--regular",
427
+ "ph--detective--regular",
428
+ "ph--disco-ball--regular",
429
+ "ph--dna--regular",
430
+ "ph--factory--regular",
431
+ "ph--flag-banner-fold--regular",
432
+ "ph--flask--regular",
433
+ "ph--flower-lotus--regular",
434
+ "ph--flying-saucer--regular",
435
+ "ph--game-controller--regular",
436
+ "ph--gavel--regular",
437
+ "ph--gift--regular",
438
+ "ph--guitar--regular",
439
+ "ph--hamburger--regular",
440
+ "ph--handshake--regular",
441
+ "ph--heart--regular",
442
+ "ph--lightbulb--regular",
443
+ "ph--lock--regular",
444
+ "ph--martini--regular",
445
+ "ph--medal-military--regular",
446
+ "ph--moped-front--regular",
447
+ "ph--office-chair--regular",
448
+ "ph--paint-brush-household--regular",
449
+ "ph--peace--regular",
450
+ "ph--person-simple-hike--regular",
451
+ "ph--piggy-bank--regular",
452
+ "ph--potted-plant--regular",
453
+ "ph--radioactive--regular",
454
+ "ph--rocket-launch--regular",
455
+ "ph--shield-star--regular",
456
+ "ph--shopping-cart--regular",
457
+ "ph--stethoscope--regular",
458
+ "ph--student--regular",
459
+ "ph--sun--regular",
460
+ "ph--tote--regular",
461
+ "ph--tree--regular",
462
+ "ph--users-three--regular",
463
+ "ph--yin-yang--regular"
464
+ ];
415
465
  var toRange = (range, min = 0) => typeof range === "number" ? {
416
466
  min,
417
467
  max: range
@@ -533,10 +583,15 @@ var faker = {
533
583
  productName: () => (0, import_falso.randProductName)()
534
584
  },
535
585
  geo: {
536
- airport: () => randAirport(),
537
- location: () => randAirport().location
538
- },
539
- email: {}
586
+ airport: () => (0, import_falso.rand)(airports),
587
+ location: () => (0, import_falso.rand)(airports).location
588
+ },
589
+ email: {},
590
+ properties: {
591
+ emoji: () => (0, import_falso.rand)(import_util.idEmoji),
592
+ hue: () => (0, import_falso.rand)(import_util.idHue),
593
+ icon: () => (0, import_falso.rand)(icons)
594
+ }
540
595
  };
541
596
  // Annotate the CommonJS export names for ESM import in node:
542
597
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/index.ts", "../../../src/faker.ts", "../../../src/data.ts", "../../../src/util.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport * from '@ngneat/falso';\n\nexport * from './faker';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n rand,\n randChanceBoolean,\n randCompanyName,\n randEmail,\n randFirstName,\n randFloat,\n randFullName,\n randHexaDecimal,\n randImg,\n randNumber,\n randParagraph,\n randProductName,\n randRecentDate,\n randSentence,\n randUrl,\n randUuid,\n randWord,\n seed,\n} from '@ngneat/falso';\n\nimport { randAirport } from './data';\nimport { type Range, getCount, multiple, toRange, uniqueArray } from './util';\n\n// Fake faker.\nexport const faker = {\n //\n // Util\n //\n seed: (value: number) => seed(String(value)),\n helpers: {\n arrayElement: <T>(a: T[]) => rand(a),\n multiple: <T>(f: () => T, { count }: { count: number | { min: number; max: number } }) =>\n multiple(f, typeof count === 'number' ? count : getCount(count)),\n uniqueArray: <T>(f: T[] | (() => T), n: number) => uniqueArray(f, n),\n randomSubset: <T>(array: T[], count?: number | { min: number; max: number }) => {\n const length =\n count === undefined\n ? Math.floor(Math.random() * (array.length + 1))\n : Math.min(typeof count === 'number' ? count : getCount(count), array.length);\n\n if (length === 0) {\n return [];\n }\n return uniqueArray(() => rand(array), length);\n },\n },\n\n //\n // Type\n //\n number: {\n float: (range?: number | Range) => randFloat(range ? toRange(range) : undefined),\n int: (range?: number | Range) => randNumber(range ? toRange(range) : undefined),\n },\n datatype: {\n boolean: (p?: { probability: number }) => randChanceBoolean({ chanceTrue: p?.probability ?? 0.5 }),\n },\n date: {\n recent: () => randRecentDate(),\n },\n image: {\n url: () => randImg(),\n },\n\n //\n // Text\n //\n lorem: {\n word: () => randWord(),\n words: (n: number | Range = 1) => randWord({ length: getCount(n) }).join(' '),\n sentence: (n: number | Range = 1) => {\n if (n) {\n const text = randWord({ length: getCount(n) }).join(' ');\n return text.charAt(0).toUpperCase() + text.slice(1) + '.';\n }\n\n return randSentence();\n },\n sentences: (n: number | Range = 1) => randSentence({ length: getCount(n) }).join(' '),\n paragraph: (n: number | Range = 1) => {\n if (n) {\n return randSentence({ length: getCount(n) }).join(' ');\n }\n\n return randParagraph();\n },\n paragraphs: (n: number | Range = 1) => randParagraph({ length: getCount(n) }).join('\\n'),\n },\n\n //\n // String\n //\n string: {\n hexadecimal: (l?: { length: number }) => randHexaDecimal(l).join(''),\n uuid: () => randUuid(),\n },\n\n //\n // Custom\n //\n internet: {\n email: () => randEmail(),\n url: () => randUrl(),\n },\n person: {\n firstName: () => randFirstName(),\n fullName: () => randFullName(),\n },\n company: {\n name: () => randCompanyName(),\n },\n commerce: {\n productName: () => randProductName(),\n },\n geo: {\n airport: () => randAirport(),\n location: () => randAirport().location,\n },\n email: {},\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nconst airports = [\n { name: 'Atlanta', code: 'ATL', location: [-84.4277, 33.6407] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n { name: 'Dallas', code: 'DFW', location: [-97.0403, 32.8998] },\n { name: 'London', code: 'LHR', location: [-0.4543, 51.47] },\n { name: 'Tokyo', code: 'HND', location: [139.7811, 35.5494] },\n { name: 'Denver', code: 'DEN', location: [-104.6737, 39.8561] },\n { name: 'Istanbul', code: 'IST', location: [28.8153, 41.2753] },\n { name: 'Los Angeles', code: 'LAX', location: [-118.4085, 33.9416] },\n { name: 'Paris', code: 'CDG', location: [2.55, 49.0097] },\n { name: 'Guangzhou', code: 'CAN', location: [113.2971, 23.3924] },\n { name: 'Frankfurt', code: 'FRA', location: [8.5706, 50.0333] },\n { name: 'Delhi', code: 'DEL', location: [77.1031, 28.5562] },\n { name: 'Singapore', code: 'SIN', location: [103.994, 1.3644] },\n { name: 'Amsterdam', code: 'AMS', location: [4.7639, 52.3105] },\n { name: 'Seoul', code: 'ICN', location: [126.4505, 37.4602] },\n { name: 'Jakarta', code: 'CGK', location: [106.6559, -6.1256] },\n { name: 'Bangkok', code: 'BKK', location: [100.7501, 13.6899] },\n { name: 'Hong Kong', code: 'HKG', location: [113.9185, 22.308] },\n { name: 'Madrid', code: 'MAD', location: [-3.5676, 40.4936] },\n { name: 'San Francisco', code: 'SFO', location: [-122.379, 37.6213] },\n { name: 'New York', code: 'JFK', location: [-73.7781, 40.6413] },\n { name: 'Chicago', code: 'ORD', location: [-87.9048, 41.9742] },\n { name: 'Shanghai', code: 'PVG', location: [121.8083, 31.1434] },\n { name: 'Beijing', code: 'PEK', location: [116.4074, 39.9042] },\n { name: 'Miami', code: 'MIA', location: [-80.2906, 25.7959] },\n { name: 'Houston', code: 'IAH', location: [-95.3414, 29.9844] },\n { name: 'Munich', code: 'MUC', location: [11.7861, 48.3538] },\n { name: 'Toronto', code: 'YYZ', location: [-79.6306, 43.6777] },\n { name: 'Sydney', code: 'SYD', location: [151.1799, -33.9399] },\n { name: 'Melbourne', code: 'MEL', location: [144.843, -37.6733] },\n { name: 'Rome', code: 'FCO', location: [12.2508, 41.8003] },\n { name: 'Barcelona', code: 'BCN', location: [2.0759, 41.2974] },\n { name: 'Kuala Lumpur', code: 'KUL', location: [101.7099, 2.7456] },\n { name: 'Doha', code: 'DOH', location: [51.6136, 25.2731] },\n { name: 'Vienna', code: 'VIE', location: [16.5697, 48.1103] },\n { name: 'Zurich', code: 'ZRH', location: [8.5492, 47.4583] },\n { name: 'Brussels', code: 'BRU', location: [4.4844, 50.901] },\n { name: 'Copenhagen', code: 'CPH', location: [12.6508, 55.6181] },\n { name: 'Oslo', code: 'OSL', location: [11.1004, 60.1939] },\n { name: 'Stockholm', code: 'ARN', location: [17.9186, 59.6519] },\n { name: 'Helsinki', code: 'HEL', location: [24.9633, 60.3172] },\n { name: 'Lisbon', code: 'LIS', location: [-9.1359, 38.7742] },\n { name: 'Athens', code: 'ATH', location: [23.9445, 37.9364] },\n { name: 'Warsaw', code: 'WAW', location: [20.9671, 52.1657] },\n { name: 'Budapest', code: 'BUD', location: [19.261, 47.433] },\n { name: 'Prague', code: 'PRG', location: [14.2632, 50.1008] },\n { name: 'Moscow', code: 'SVO', location: [37.4146, 55.9726] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n];\n\nexport const randAirport = () => airports[Math.floor(Math.random() * airports.length)];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { randNumber } from '@ngneat/falso';\n\nexport type Range = { min?: number; max?: number; count?: number };\n\nexport const toRange = (range: number | Range, min = 0) => (typeof range === 'number' ? { min, max: range } : range);\n\nexport const getCount = (range?: number | Range) => (typeof range === 'number' ? range : randNumber(range));\n\nexport const multiple = <T>(fn: (i: number) => T, n: number): T[] => {\n return Array.from({ length: n }).map((_, i) => fn(i));\n};\n\nexport const uniqueArray = <T>(values: T[] | (() => T), n: number): T[] => {\n if (Array.isArray(values)) {\n const results: T[] = [];\n const selection = Array.from(new Set<T>(values));\n for (let i = 0; i < n; i++) {\n if (selection.length === 0) {\n break;\n }\n results.push(selection.splice(Math.floor(Math.random() * selection.length), 1)[0]);\n }\n return results;\n } else {\n const results = new Set<T>();\n // TODO(burdon): Set timeout.\n while (results.size < n) {\n results.add(values());\n }\n\n return Array.from(results);\n }\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAAc;ACAd,mBAmBO;AEnBP,IAAAA,gBAA2B;ADA3B,IAAMC,WAAW;EACf;IAAEC,MAAM;IAAWC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC9D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC3D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC7D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAO;EAC1D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC5D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAW;;EAAS;EAC9D;IAAEF,MAAM;IAAYC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC9D;IAAEF,MAAM;IAAeC,MAAM;IAAOC,UAAU;MAAC;MAAW;;EAAS;EACnE;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAM;;EAAS;EACxD;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAChE;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAQ;;EAAS;EAC9D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC3D;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAQ;EAC9D;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAQ;;EAAS;EAC9D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC5D;IAAEF,MAAM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,CAAAA;IAAG,CAAA,EAAGiD,KAAK,IAAA;EACrF;;;;EAKAW,QAAQ;IACNC,aAAa,CAACC,UAA2BC,8BAAgBD,CAAAA,EAAGb,KAAK,EAAA;IACjEe,MAAM,UAAMC,uBAAAA;EACd;;;;EAKAC,UAAU;IACRC,OAAO,UAAMC,wBAAAA;IACbzB,KAAK,UAAM0B,sBAAAA;EACb;EACAC,QAAQ;IACNC,WAAW,UAAMC,4BAAAA;IACjBC,UAAU,UAAMC,2BAAAA;EAClB;EACAC,SAAS;IACP3F,MAAM,UAAM4F,8BAAAA;EACd;EACAC,UAAU;IACRC,aAAa,UAAMC,8BAAAA;EACrB;EACAC,KAAK;IACHC,SAAS,MAAM9F,YAAAA;IACfD,UAAU,MAAMC,YAAAA,EAAcD;EAChC;EACAiF,OAAO,CAAC;AACV;",
6
- "names": ["import_falso", "airports", "name", "code", "location", "randAirport", "Math", "floor", "random", "length", "toRange", "range", "min", "max", "getCount", "randNumber", "multiple", "fn", "n", "Array", "from", "map", "_", "i", "uniqueArray", "values", "isArray", "results", "selection", "Set", "push", "splice", "size", "add", "faker", "seed", "value", "String", "helpers", "arrayElement", "a", "rand", "f", "count", "randomSubset", "array", "undefined", "number", "float", "randFloat", "int", "datatype", "boolean", "p", "randChanceBoolean", "chanceTrue", "probability", "date", "recent", "randRecentDate", "image", "url", "randImg", "lorem", "word", "randWord", "words", "join", "sentence", "text", "charAt", "toUpperCase", "slice", "randSentence", "sentences", "paragraph", "randParagraph", "paragraphs", "string", "hexadecimal", "l", "randHexaDecimal", "uuid", "randUuid", "internet", "email", "randEmail", "randUrl", "person", "firstName", "randFirstName", "fullName", "randFullName", "company", "randCompanyName", "commerce", "productName", "randProductName", "geo", "airport"]
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport * from '@ngneat/falso';\n\nexport * from './faker';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n rand,\n randChanceBoolean,\n randCompanyName,\n randEmail,\n randFirstName,\n randFloat,\n randFullName,\n randHexaDecimal,\n randImg,\n randNumber,\n randParagraph,\n randProductName,\n randRecentDate,\n randSentence,\n randUrl,\n randUuid,\n randWord,\n seed,\n} from '@ngneat/falso';\n\nimport { idEmoji, idHue } from '@dxos/util';\n\nimport { airports, icons } from './data';\nimport { type Range, getCount, multiple, toRange, uniqueArray } from './util';\n\n// Fake faker.\nexport const faker = {\n //\n // Util\n //\n seed: (value: number) => seed(String(value)),\n helpers: {\n arrayElement: <T>(a: T[]) => rand(a),\n multiple: <T>(f: () => T, { count }: { count: number | { min: number; max: number } }) =>\n multiple(f, typeof count === 'number' ? count : getCount(count)),\n uniqueArray: <T>(f: T[] | (() => T), n: number) => uniqueArray(f, n),\n randomSubset: <T>(array: T[], count?: number | { min: number; max: number }) => {\n const length =\n count === undefined\n ? Math.floor(Math.random() * (array.length + 1))\n : Math.min(typeof count === 'number' ? count : getCount(count), array.length);\n\n if (length === 0) {\n return [];\n }\n return uniqueArray(() => rand(array), length);\n },\n },\n\n //\n // Type\n //\n number: {\n float: (range?: number | Range) => randFloat(range ? toRange(range) : undefined),\n int: (range?: number | Range) => randNumber(range ? toRange(range) : undefined),\n },\n datatype: {\n boolean: (p?: { probability: number }) => randChanceBoolean({ chanceTrue: p?.probability ?? 0.5 }),\n },\n date: {\n recent: () => randRecentDate(),\n },\n image: {\n url: () => randImg(),\n },\n\n //\n // Text\n //\n lorem: {\n word: () => randWord(),\n words: (n: number | Range = 1) => randWord({ length: getCount(n) }).join(' '),\n sentence: (n: number | Range = 1) => {\n if (n) {\n const text = randWord({ length: getCount(n) }).join(' ');\n return text.charAt(0).toUpperCase() + text.slice(1) + '.';\n }\n\n return randSentence();\n },\n sentences: (n: number | Range = 1) => randSentence({ length: getCount(n) }).join(' '),\n paragraph: (n: number | Range = 1) => {\n if (n) {\n return randSentence({ length: getCount(n) }).join(' ');\n }\n\n return randParagraph();\n },\n paragraphs: (n: number | Range = 1) => randParagraph({ length: getCount(n) }).join('\\n'),\n },\n\n //\n // String\n //\n string: {\n hexadecimal: (l?: { length: number }) => randHexaDecimal(l).join(''),\n uuid: () => randUuid(),\n },\n\n //\n // Custom\n //\n internet: {\n email: () => randEmail(),\n url: () => randUrl(),\n },\n person: {\n firstName: () => randFirstName(),\n fullName: () => randFullName(),\n },\n company: {\n name: () => randCompanyName(),\n },\n commerce: {\n productName: () => randProductName(),\n },\n geo: {\n airport: () => rand(airports),\n location: () => rand(airports).location,\n },\n email: {},\n properties: {\n emoji: () => rand(idEmoji),\n hue: () => rand(idHue),\n icon: () => rand(icons),\n },\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nexport const airports = [\n { name: 'Atlanta', code: 'ATL', location: [-84.4277, 33.6407] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n { name: 'Dallas', code: 'DFW', location: [-97.0403, 32.8998] },\n { name: 'London', code: 'LHR', location: [-0.4543, 51.47] },\n { name: 'Tokyo', code: 'HND', location: [139.7811, 35.5494] },\n { name: 'Denver', code: 'DEN', location: [-104.6737, 39.8561] },\n { name: 'Istanbul', code: 'IST', location: [28.8153, 41.2753] },\n { name: 'Los Angeles', code: 'LAX', location: [-118.4085, 33.9416] },\n { name: 'Paris', code: 'CDG', location: [2.55, 49.0097] },\n { name: 'Guangzhou', code: 'CAN', location: [113.2971, 23.3924] },\n { name: 'Frankfurt', code: 'FRA', location: [8.5706, 50.0333] },\n { name: 'Delhi', code: 'DEL', location: [77.1031, 28.5562] },\n { name: 'Singapore', code: 'SIN', location: [103.994, 1.3644] },\n { name: 'Amsterdam', code: 'AMS', location: [4.7639, 52.3105] },\n { name: 'Seoul', code: 'ICN', location: [126.4505, 37.4602] },\n { name: 'Jakarta', code: 'CGK', location: [106.6559, -6.1256] },\n { name: 'Bangkok', code: 'BKK', location: [100.7501, 13.6899] },\n { name: 'Hong Kong', code: 'HKG', location: [113.9185, 22.308] },\n { name: 'Madrid', code: 'MAD', location: [-3.5676, 40.4936] },\n { name: 'San Francisco', code: 'SFO', location: [-122.379, 37.6213] },\n { name: 'New York', code: 'JFK', location: [-73.7781, 40.6413] },\n { name: 'Chicago', code: 'ORD', location: [-87.9048, 41.9742] },\n { name: 'Shanghai', code: 'PVG', location: [121.8083, 31.1434] },\n { name: 'Beijing', code: 'PEK', location: [116.4074, 39.9042] },\n { name: 'Miami', code: 'MIA', location: [-80.2906, 25.7959] },\n { name: 'Houston', code: 'IAH', location: [-95.3414, 29.9844] },\n { name: 'Munich', code: 'MUC', location: [11.7861, 48.3538] },\n { name: 'Toronto', code: 'YYZ', location: [-79.6306, 43.6777] },\n { name: 'Sydney', code: 'SYD', location: [151.1799, -33.9399] },\n { name: 'Melbourne', code: 'MEL', location: [144.843, -37.6733] },\n { name: 'Rome', code: 'FCO', location: [12.2508, 41.8003] },\n { name: 'Barcelona', code: 'BCN', location: [2.0759, 41.2974] },\n { name: 'Kuala Lumpur', code: 'KUL', location: [101.7099, 2.7456] },\n { name: 'Doha', code: 'DOH', location: [51.6136, 25.2731] },\n { name: 'Vienna', code: 'VIE', location: [16.5697, 48.1103] },\n { name: 'Zurich', code: 'ZRH', location: [8.5492, 47.4583] },\n { name: 'Brussels', code: 'BRU', location: [4.4844, 50.901] },\n { name: 'Copenhagen', code: 'CPH', location: [12.6508, 55.6181] },\n { name: 'Oslo', code: 'OSL', location: [11.1004, 60.1939] },\n { name: 'Stockholm', code: 'ARN', location: [17.9186, 59.6519] },\n { name: 'Helsinki', code: 'HEL', location: [24.9633, 60.3172] },\n { name: 'Lisbon', code: 'LIS', location: [-9.1359, 38.7742] },\n { name: 'Athens', code: 'ATH', location: [23.9445, 37.9364] },\n { name: 'Warsaw', code: 'WAW', location: [20.9671, 52.1657] },\n { name: 'Budapest', code: 'BUD', location: [19.261, 47.433] },\n { name: 'Prague', code: 'PRG', location: [14.2632, 50.1008] },\n { name: 'Moscow', code: 'SVO', location: [37.4146, 55.9726] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n];\n\nexport const icons = [\n 'ph--air-traffic-control--regular',\n 'ph--asterisk--regular',\n 'ph--atom--regular',\n 'ph--basketball--regular',\n 'ph--butterfly--regular',\n 'ph--cactus--regular',\n 'ph--cake--regular',\n 'ph--calendar-dots--regular',\n 'ph--campfire--regular',\n 'ph--command--regular',\n 'ph--confetti--regular',\n 'ph--detective--regular',\n 'ph--disco-ball--regular',\n 'ph--dna--regular',\n 'ph--factory--regular',\n 'ph--flag-banner-fold--regular',\n 'ph--flask--regular',\n 'ph--flower-lotus--regular',\n 'ph--flying-saucer--regular',\n 'ph--game-controller--regular',\n 'ph--gavel--regular',\n 'ph--gift--regular',\n 'ph--guitar--regular',\n 'ph--hamburger--regular',\n 'ph--handshake--regular',\n 'ph--heart--regular',\n 'ph--lightbulb--regular',\n 'ph--lock--regular',\n 'ph--martini--regular',\n 'ph--medal-military--regular',\n 'ph--moped-front--regular',\n 'ph--office-chair--regular',\n 'ph--paint-brush-household--regular',\n 'ph--peace--regular',\n 'ph--person-simple-hike--regular',\n 'ph--piggy-bank--regular',\n 'ph--potted-plant--regular',\n 'ph--radioactive--regular',\n 'ph--rocket-launch--regular',\n 'ph--shield-star--regular',\n 'ph--shopping-cart--regular',\n 'ph--stethoscope--regular',\n 'ph--student--regular',\n 'ph--sun--regular',\n 'ph--tote--regular',\n 'ph--tree--regular',\n 'ph--users-three--regular',\n 'ph--yin-yang--regular',\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { randNumber } from '@ngneat/falso';\n\nexport type Range = { min?: number; max?: number; count?: number };\n\nexport const toRange = (range: number | Range, min = 0) => (typeof range === 'number' ? { min, max: range } : range);\n\nexport const getCount = (range?: number | Range) => (typeof range === 'number' ? range : randNumber(range));\n\nexport const multiple = <T>(fn: (i: number) => T, n: number): T[] => {\n return Array.from({ length: n }).map((_, i) => fn(i));\n};\n\nexport const uniqueArray = <T>(values: T[] | (() => T), n: number): T[] => {\n if (Array.isArray(values)) {\n const results: T[] = [];\n const selection = Array.from(new Set<T>(values));\n for (let i = 0; i < n; i++) {\n if (selection.length === 0) {\n break;\n }\n results.push(selection.splice(Math.floor(Math.random() * selection.length), 1)[0]);\n }\n return results;\n } else {\n const results = new Set<T>();\n // TODO(burdon): Set timeout.\n while (results.size < n) {\n results.add(values());\n }\n\n return Array.from(results);\n }\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,yBAAc;ACAd,mBAmBO;AAEP,kBAA+B;AErB/B,IAAAA,gBAA2B;ADApB,IAAMC,WAAW;EACtB;IAAEC,MAAM;IAAWC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC9D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC3D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC7D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAO;EAC1D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC5D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAW;;EAAS;EAC9D;IAAEF,MAAM;IAAYC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC9D;IAAEF,MAAM;IAAeC,MAAM;IAAOC,UAAU;MAAC;MAAW;;EAAS;EACnE;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAM;;EAAS;EACxD;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAChE;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAQ;;EAAS;EAC9D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC3D;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAQ;EAC9D;IAAEF,MAAM;IAAaC,MAAM;IAAOC,UAAU;MAAC;MAAQ;;EAA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qD,KAAK,GAAA;IACjFQ,WAAW,CAAC7D,IAAoB,MAAC;AAC/B,UAAIA,GAAG;AACL,mBAAO2D,2BAAa;UAAExD,QAAQP,SAASI,CAAAA;QAAG,CAAA,EAAGqD,KAAK,GAAA;MACpD;AAEA,iBAAOS,4BAAAA;IACT;IACAC,YAAY,CAAC/D,IAAoB,UAAM8D,4BAAc;MAAE3D,QAAQP,SAASI,CAAAA;IAAG,CAAA,EAAGqD,KAAK,IAAA;EACrF;;;;EAKAW,QAAQ;IACNC,aAAa,CAACC,UAA2BC,8BAAgBD,CAAAA,EAAGb,KAAK,EAAA;IACjEe,MAAM,UAAMC,uBAAAA;EACd;;;;EAKAC,UAAU;IACRC,OAAO,UAAMC,wBAAAA;IACbzB,KAAK,UAAM0B,sBAAAA;EACb;EACAC,QAAQ;IACNC,WAAW,UAAMC,4BAAAA;IACjBC,UAAU,UAAMC,2BAAAA;EAClB;EACAC,SAAS;IACP3F,MAAM,UAAM4F,8BAAAA;EACd;EACAC,UAAU;IACRC,aAAa,UAAMC,8BAAAA;EACrB;EACAC,KAAK;IACHC,SAAS,UAAM1D,mBAAKxC,QAAAA;IACpBG,UAAU,UAAMqC,mBAAKxC,QAAAA,EAAUG;EACjC;EACAiF,OAAO,CAAC;EACRe,YAAY;IACVC,OAAO,UAAM5D,mBAAK6D,mBAAAA;IAClBC,KAAK,UAAM9D,mBAAK+D,iBAAAA;IAChBC,MAAM,UAAMhE,mBAAKpC,KAAAA;EACnB;AACF;",
6
+ "names": ["import_falso", "airports", "name", "code", "location", "icons", "toRange", "range", "min", "max", "getCount", "randNumber", "multiple", "fn", "n", "Array", "from", "length", "map", "_", "i", "uniqueArray", "values", "isArray", "results", "selection", "Set", "push", "splice", "Math", "floor", "random", "size", "add", "faker", "seed", "value", "String", "helpers", "arrayElement", "a", "rand", "f", "count", "randomSubset", "array", "undefined", "number", "float", "randFloat", "int", "datatype", "boolean", "p", "randChanceBoolean", "chanceTrue", "probability", "date", "recent", "randRecentDate", "image", "url", "randImg", "lorem", "word", "randWord", "words", "join", "sentence", "text", "charAt", "toUpperCase", "slice", "randSentence", "sentences", "paragraph", "randParagraph", "paragraphs", "string", "hexadecimal", "l", "randHexaDecimal", "uuid", "randUuid", "internet", "email", "randEmail", "randUrl", "person", "firstName", "randFirstName", "fullName", "randFullName", "company", "randCompanyName", "commerce", "productName", "randProductName", "geo", "airport", "properties", "emoji", "idEmoji", "hue", "idHue", "icon"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/common/random/src/data.ts":{"bytes":15884,"imports":[],"format":"esm"},"packages/common/random/src/util.ts":{"bytes":4274,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true}],"format":"esm"},"packages/common/random/src/faker.ts":{"bytes":11625,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"packages/common/random/src/data.ts","kind":"import-statement","original":"./data"},{"path":"packages/common/random/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/common/random/src/index.ts":{"bytes":590,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"packages/common/random/src/faker.ts","kind":"import-statement","original":"./faker"}],"format":"esm"}},"outputs":{"packages/common/random/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15009},"packages/common/random/dist/lib/node/index.cjs":{"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true}],"exports":["faker"],"entryPoint":"packages/common/random/src/index.ts","inputs":{"packages/common/random/src/index.ts":{"bytesInOutput":31},"packages/common/random/src/faker.ts":{"bytesInOutput":2469},"packages/common/random/src/data.ts":{"bytesInOutput":4814},"packages/common/random/src/util.ts":{"bytesInOutput":827}},"bytes":8393}}}
1
+ {"inputs":{"packages/common/random/src/data.ts":{"bytes":19345,"imports":[],"format":"esm"},"packages/common/random/src/util.ts":{"bytes":4274,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true}],"format":"esm"},"packages/common/random/src/faker.ts":{"bytes":12319,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/common/random/src/data.ts","kind":"import-statement","original":"./data"},{"path":"packages/common/random/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/common/random/src/index.ts":{"bytes":590,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"packages/common/random/src/faker.ts","kind":"import-statement","original":"./faker"}],"format":"esm"}},"outputs":{"packages/common/random/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16906},"packages/common/random/dist/lib/node/index.cjs":{"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true}],"exports":["faker"],"entryPoint":"packages/common/random/src/index.ts","inputs":{"packages/common/random/src/index.ts":{"bytesInOutput":31},"packages/common/random/src/faker.ts":{"bytesInOutput":2625},"packages/common/random/src/data.ts":{"bytesInOutput":6106},"packages/common/random/src/util.ts":{"bytesInOutput":827}},"bytes":9841}}}
@@ -5,6 +5,7 @@ export * from "@ngneat/falso";
5
5
 
6
6
  // packages/common/random/src/faker.ts
7
7
  import { rand, randChanceBoolean, randCompanyName, randEmail, randFirstName, randFloat, randFullName, randHexaDecimal, randImg, randNumber as randNumber2, randParagraph, randProductName, randRecentDate, randSentence, randUrl, randUuid, randWord, seed } from "@ngneat/falso";
8
+ import { idEmoji, idHue } from "@dxos/util";
8
9
 
9
10
  // packages/common/random/src/data.ts
10
11
  var airports = [
@@ -393,7 +394,56 @@ var airports = [
393
394
  ]
394
395
  }
395
396
  ];
396
- var randAirport = () => airports[Math.floor(Math.random() * airports.length)];
397
+ var icons = [
398
+ "ph--air-traffic-control--regular",
399
+ "ph--asterisk--regular",
400
+ "ph--atom--regular",
401
+ "ph--basketball--regular",
402
+ "ph--butterfly--regular",
403
+ "ph--cactus--regular",
404
+ "ph--cake--regular",
405
+ "ph--calendar-dots--regular",
406
+ "ph--campfire--regular",
407
+ "ph--command--regular",
408
+ "ph--confetti--regular",
409
+ "ph--detective--regular",
410
+ "ph--disco-ball--regular",
411
+ "ph--dna--regular",
412
+ "ph--factory--regular",
413
+ "ph--flag-banner-fold--regular",
414
+ "ph--flask--regular",
415
+ "ph--flower-lotus--regular",
416
+ "ph--flying-saucer--regular",
417
+ "ph--game-controller--regular",
418
+ "ph--gavel--regular",
419
+ "ph--gift--regular",
420
+ "ph--guitar--regular",
421
+ "ph--hamburger--regular",
422
+ "ph--handshake--regular",
423
+ "ph--heart--regular",
424
+ "ph--lightbulb--regular",
425
+ "ph--lock--regular",
426
+ "ph--martini--regular",
427
+ "ph--medal-military--regular",
428
+ "ph--moped-front--regular",
429
+ "ph--office-chair--regular",
430
+ "ph--paint-brush-household--regular",
431
+ "ph--peace--regular",
432
+ "ph--person-simple-hike--regular",
433
+ "ph--piggy-bank--regular",
434
+ "ph--potted-plant--regular",
435
+ "ph--radioactive--regular",
436
+ "ph--rocket-launch--regular",
437
+ "ph--shield-star--regular",
438
+ "ph--shopping-cart--regular",
439
+ "ph--stethoscope--regular",
440
+ "ph--student--regular",
441
+ "ph--sun--regular",
442
+ "ph--tote--regular",
443
+ "ph--tree--regular",
444
+ "ph--users-three--regular",
445
+ "ph--yin-yang--regular"
446
+ ];
397
447
 
398
448
  // packages/common/random/src/util.ts
399
449
  import { randNumber } from "@ngneat/falso";
@@ -520,10 +570,15 @@ var faker = {
520
570
  productName: () => randProductName()
521
571
  },
522
572
  geo: {
523
- airport: () => randAirport(),
524
- location: () => randAirport().location
525
- },
526
- email: {}
573
+ airport: () => rand(airports),
574
+ location: () => rand(airports).location
575
+ },
576
+ email: {},
577
+ properties: {
578
+ emoji: () => rand(idEmoji),
579
+ hue: () => rand(idHue),
580
+ icon: () => rand(icons)
581
+ }
527
582
  };
528
583
  export {
529
584
  faker
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/index.ts", "../../../src/faker.ts", "../../../src/data.ts", "../../../src/util.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport * from '@ngneat/falso';\n\nexport * from './faker';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n rand,\n randChanceBoolean,\n randCompanyName,\n randEmail,\n randFirstName,\n randFloat,\n randFullName,\n randHexaDecimal,\n randImg,\n randNumber,\n randParagraph,\n randProductName,\n randRecentDate,\n randSentence,\n randUrl,\n randUuid,\n randWord,\n seed,\n} from '@ngneat/falso';\n\nimport { randAirport } from './data';\nimport { type Range, getCount, multiple, toRange, uniqueArray } from './util';\n\n// Fake faker.\nexport const faker = {\n //\n // Util\n //\n seed: (value: number) => seed(String(value)),\n helpers: {\n arrayElement: <T>(a: T[]) => rand(a),\n multiple: <T>(f: () => T, { count }: { count: number | { min: number; max: number } }) =>\n multiple(f, typeof count === 'number' ? count : getCount(count)),\n uniqueArray: <T>(f: T[] | (() => T), n: number) => uniqueArray(f, n),\n randomSubset: <T>(array: T[], count?: number | { min: number; max: number }) => {\n const length =\n count === undefined\n ? Math.floor(Math.random() * (array.length + 1))\n : Math.min(typeof count === 'number' ? count : getCount(count), array.length);\n\n if (length === 0) {\n return [];\n }\n return uniqueArray(() => rand(array), length);\n },\n },\n\n //\n // Type\n //\n number: {\n float: (range?: number | Range) => randFloat(range ? toRange(range) : undefined),\n int: (range?: number | Range) => randNumber(range ? toRange(range) : undefined),\n },\n datatype: {\n boolean: (p?: { probability: number }) => randChanceBoolean({ chanceTrue: p?.probability ?? 0.5 }),\n },\n date: {\n recent: () => randRecentDate(),\n },\n image: {\n url: () => randImg(),\n },\n\n //\n // Text\n //\n lorem: {\n word: () => randWord(),\n words: (n: number | Range = 1) => randWord({ length: getCount(n) }).join(' '),\n sentence: (n: number | Range = 1) => {\n if (n) {\n const text = randWord({ length: getCount(n) }).join(' ');\n return text.charAt(0).toUpperCase() + text.slice(1) + '.';\n }\n\n return randSentence();\n },\n sentences: (n: number | Range = 1) => randSentence({ length: getCount(n) }).join(' '),\n paragraph: (n: number | Range = 1) => {\n if (n) {\n return randSentence({ length: getCount(n) }).join(' ');\n }\n\n return randParagraph();\n },\n paragraphs: (n: number | Range = 1) => randParagraph({ length: getCount(n) }).join('\\n'),\n },\n\n //\n // String\n //\n string: {\n hexadecimal: (l?: { length: number }) => randHexaDecimal(l).join(''),\n uuid: () => randUuid(),\n },\n\n //\n // Custom\n //\n internet: {\n email: () => randEmail(),\n url: () => randUrl(),\n },\n person: {\n firstName: () => randFirstName(),\n fullName: () => randFullName(),\n },\n company: {\n name: () => randCompanyName(),\n },\n commerce: {\n productName: () => randProductName(),\n },\n geo: {\n airport: () => randAirport(),\n location: () => randAirport().location,\n },\n email: {},\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nconst airports = [\n { name: 'Atlanta', code: 'ATL', location: [-84.4277, 33.6407] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n { name: 'Dallas', code: 'DFW', location: [-97.0403, 32.8998] },\n { name: 'London', code: 'LHR', location: [-0.4543, 51.47] },\n { name: 'Tokyo', code: 'HND', location: [139.7811, 35.5494] },\n { name: 'Denver', code: 'DEN', location: [-104.6737, 39.8561] },\n { name: 'Istanbul', code: 'IST', location: [28.8153, 41.2753] },\n { name: 'Los Angeles', code: 'LAX', location: [-118.4085, 33.9416] },\n { name: 'Paris', code: 'CDG', location: [2.55, 49.0097] },\n { name: 'Guangzhou', code: 'CAN', location: [113.2971, 23.3924] },\n { name: 'Frankfurt', code: 'FRA', location: [8.5706, 50.0333] },\n { name: 'Delhi', code: 'DEL', location: [77.1031, 28.5562] },\n { name: 'Singapore', code: 'SIN', location: [103.994, 1.3644] },\n { name: 'Amsterdam', code: 'AMS', location: [4.7639, 52.3105] },\n { name: 'Seoul', code: 'ICN', location: [126.4505, 37.4602] },\n { name: 'Jakarta', code: 'CGK', location: [106.6559, -6.1256] },\n { name: 'Bangkok', code: 'BKK', location: [100.7501, 13.6899] },\n { name: 'Hong Kong', code: 'HKG', location: [113.9185, 22.308] },\n { name: 'Madrid', code: 'MAD', location: [-3.5676, 40.4936] },\n { name: 'San Francisco', code: 'SFO', location: [-122.379, 37.6213] },\n { name: 'New York', code: 'JFK', location: [-73.7781, 40.6413] },\n { name: 'Chicago', code: 'ORD', location: [-87.9048, 41.9742] },\n { name: 'Shanghai', code: 'PVG', location: [121.8083, 31.1434] },\n { name: 'Beijing', code: 'PEK', location: [116.4074, 39.9042] },\n { name: 'Miami', code: 'MIA', location: [-80.2906, 25.7959] },\n { name: 'Houston', code: 'IAH', location: [-95.3414, 29.9844] },\n { name: 'Munich', code: 'MUC', location: [11.7861, 48.3538] },\n { name: 'Toronto', code: 'YYZ', location: [-79.6306, 43.6777] },\n { name: 'Sydney', code: 'SYD', location: [151.1799, -33.9399] },\n { name: 'Melbourne', code: 'MEL', location: [144.843, -37.6733] },\n { name: 'Rome', code: 'FCO', location: [12.2508, 41.8003] },\n { name: 'Barcelona', code: 'BCN', location: [2.0759, 41.2974] },\n { name: 'Kuala Lumpur', code: 'KUL', location: [101.7099, 2.7456] },\n { name: 'Doha', code: 'DOH', location: [51.6136, 25.2731] },\n { name: 'Vienna', code: 'VIE', location: [16.5697, 48.1103] },\n { name: 'Zurich', code: 'ZRH', location: [8.5492, 47.4583] },\n { name: 'Brussels', code: 'BRU', location: [4.4844, 50.901] },\n { name: 'Copenhagen', code: 'CPH', location: [12.6508, 55.6181] },\n { name: 'Oslo', code: 'OSL', location: [11.1004, 60.1939] },\n { name: 'Stockholm', code: 'ARN', location: [17.9186, 59.6519] },\n { name: 'Helsinki', code: 'HEL', location: [24.9633, 60.3172] },\n { name: 'Lisbon', code: 'LIS', location: [-9.1359, 38.7742] },\n { name: 'Athens', code: 'ATH', location: [23.9445, 37.9364] },\n { name: 'Warsaw', code: 'WAW', location: [20.9671, 52.1657] },\n { name: 'Budapest', code: 'BUD', location: [19.261, 47.433] },\n { name: 'Prague', code: 'PRG', location: [14.2632, 50.1008] },\n { name: 'Moscow', code: 'SVO', location: [37.4146, 55.9726] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n];\n\nexport const randAirport = () => airports[Math.floor(Math.random() * airports.length)];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { randNumber } from '@ngneat/falso';\n\nexport type Range = { min?: number; max?: number; count?: number };\n\nexport const toRange = (range: number | Range, min = 0) => (typeof range === 'number' ? { min, max: range } : range);\n\nexport const getCount = (range?: number | Range) => (typeof range === 'number' ? range : randNumber(range));\n\nexport const multiple = <T>(fn: (i: number) => T, n: number): T[] => {\n return Array.from({ length: n }).map((_, i) => fn(i));\n};\n\nexport const uniqueArray = <T>(values: T[] | (() => T), n: number): T[] => {\n if (Array.isArray(values)) {\n const results: T[] = [];\n const selection = Array.from(new Set<T>(values));\n for (let i = 0; i < n; i++) {\n if (selection.length === 0) {\n break;\n }\n results.push(selection.splice(Math.floor(Math.random() * selection.length), 1)[0]);\n }\n return results;\n } else {\n const results = new Set<T>();\n // TODO(burdon): Set timeout.\n while (results.size < n) {\n results.add(values());\n }\n\n return Array.from(results);\n }\n};\n"],
5
- "mappings": ";;;AAIA,cAAc;;;ACAd,SACEA,MACAC,mBACAC,iBACAC,WACAC,eACAC,WACAC,cACAC,iBACAC,SACAC,cAAAA,aACAC,eACAC,iBACAC,gBACAC,cACAC,SACAC,UACAC,UACAC,YACK;;;ACnBP,IAAMC,WAAW;EACf;IAAEC,MAAM;IAAWC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC9D;IAAEF,MAAM;IAASC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAS;EAC3D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAU;;EAAS;EAC7D;IAAEF,MAAM;IAAUC,MAAM;IAAOC,UAAU;MAAC;MAAS;;EAAO;EAC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anyName", "randEmail", "randFirstName", "randFloat", "randFullName", "randHexaDecimal", "randImg", "randNumber", "randParagraph", "randProductName", "randRecentDate", "randSentence", "randUrl", "randUuid", "randWord", "seed", "airports", "name", "code", "location", "randAirport", "Math", "floor", "random", "length", "randNumber", "toRange", "range", "min", "max", "getCount", "randNumber", "multiple", "fn", "n", "Array", "from", "length", "map", "_", "i", "uniqueArray", "values", "isArray", "results", "selection", "Set", "push", "splice", "Math", "floor", "random", "size", "add", "faker", "seed", "value", "String", "helpers", "arrayElement", "a", "rand", "multiple", "f", "count", "getCount", "uniqueArray", "n", "randomSubset", "array", "length", "undefined", "Math", "floor", "random", "min", "number", "float", "range", "randFloat", "toRange", "int", "randNumber", "datatype", "boolean", "p", "randChanceBoolean", "chanceTrue", "probability", "date", "recent", "randRecentDate", "image", "url", "randImg", "lorem", "word", "randWord", "words", "join", "sentence", "text", "charAt", "toUpperCase", "slice", "randSentence", "sentences", "paragraph", "randParagraph", "paragraphs", "string", "hexadecimal", "l", "randHexaDecimal", "uuid", "randUuid", "internet", "email", "randEmail", "randUrl", "person", "firstName", "randFirstName", "fullName", "randFullName", "company", "name", "randCompanyName", "commerce", "productName", "randProductName", "geo", "airport", "randAirport", "location"]
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nexport * from '@ngneat/falso';\n\nexport * from './faker';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport {\n rand,\n randChanceBoolean,\n randCompanyName,\n randEmail,\n randFirstName,\n randFloat,\n randFullName,\n randHexaDecimal,\n randImg,\n randNumber,\n randParagraph,\n randProductName,\n randRecentDate,\n randSentence,\n randUrl,\n randUuid,\n randWord,\n seed,\n} from '@ngneat/falso';\n\nimport { idEmoji, idHue } from '@dxos/util';\n\nimport { airports, icons } from './data';\nimport { type Range, getCount, multiple, toRange, uniqueArray } from './util';\n\n// Fake faker.\nexport const faker = {\n //\n // Util\n //\n seed: (value: number) => seed(String(value)),\n helpers: {\n arrayElement: <T>(a: T[]) => rand(a),\n multiple: <T>(f: () => T, { count }: { count: number | { min: number; max: number } }) =>\n multiple(f, typeof count === 'number' ? count : getCount(count)),\n uniqueArray: <T>(f: T[] | (() => T), n: number) => uniqueArray(f, n),\n randomSubset: <T>(array: T[], count?: number | { min: number; max: number }) => {\n const length =\n count === undefined\n ? Math.floor(Math.random() * (array.length + 1))\n : Math.min(typeof count === 'number' ? count : getCount(count), array.length);\n\n if (length === 0) {\n return [];\n }\n return uniqueArray(() => rand(array), length);\n },\n },\n\n //\n // Type\n //\n number: {\n float: (range?: number | Range) => randFloat(range ? toRange(range) : undefined),\n int: (range?: number | Range) => randNumber(range ? toRange(range) : undefined),\n },\n datatype: {\n boolean: (p?: { probability: number }) => randChanceBoolean({ chanceTrue: p?.probability ?? 0.5 }),\n },\n date: {\n recent: () => randRecentDate(),\n },\n image: {\n url: () => randImg(),\n },\n\n //\n // Text\n //\n lorem: {\n word: () => randWord(),\n words: (n: number | Range = 1) => randWord({ length: getCount(n) }).join(' '),\n sentence: (n: number | Range = 1) => {\n if (n) {\n const text = randWord({ length: getCount(n) }).join(' ');\n return text.charAt(0).toUpperCase() + text.slice(1) + '.';\n }\n\n return randSentence();\n },\n sentences: (n: number | Range = 1) => randSentence({ length: getCount(n) }).join(' '),\n paragraph: (n: number | Range = 1) => {\n if (n) {\n return randSentence({ length: getCount(n) }).join(' ');\n }\n\n return randParagraph();\n },\n paragraphs: (n: number | Range = 1) => randParagraph({ length: getCount(n) }).join('\\n'),\n },\n\n //\n // String\n //\n string: {\n hexadecimal: (l?: { length: number }) => randHexaDecimal(l).join(''),\n uuid: () => randUuid(),\n },\n\n //\n // Custom\n //\n internet: {\n email: () => randEmail(),\n url: () => randUrl(),\n },\n person: {\n firstName: () => randFirstName(),\n fullName: () => randFullName(),\n },\n company: {\n name: () => randCompanyName(),\n },\n commerce: {\n productName: () => randProductName(),\n },\n geo: {\n airport: () => rand(airports),\n location: () => rand(airports).location,\n },\n email: {},\n properties: {\n emoji: () => rand(idEmoji),\n hue: () => rand(idHue),\n icon: () => rand(icons),\n },\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nexport const airports = [\n { name: 'Atlanta', code: 'ATL', location: [-84.4277, 33.6407] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n { name: 'Dallas', code: 'DFW', location: [-97.0403, 32.8998] },\n { name: 'London', code: 'LHR', location: [-0.4543, 51.47] },\n { name: 'Tokyo', code: 'HND', location: [139.7811, 35.5494] },\n { name: 'Denver', code: 'DEN', location: [-104.6737, 39.8561] },\n { name: 'Istanbul', code: 'IST', location: [28.8153, 41.2753] },\n { name: 'Los Angeles', code: 'LAX', location: [-118.4085, 33.9416] },\n { name: 'Paris', code: 'CDG', location: [2.55, 49.0097] },\n { name: 'Guangzhou', code: 'CAN', location: [113.2971, 23.3924] },\n { name: 'Frankfurt', code: 'FRA', location: [8.5706, 50.0333] },\n { name: 'Delhi', code: 'DEL', location: [77.1031, 28.5562] },\n { name: 'Singapore', code: 'SIN', location: [103.994, 1.3644] },\n { name: 'Amsterdam', code: 'AMS', location: [4.7639, 52.3105] },\n { name: 'Seoul', code: 'ICN', location: [126.4505, 37.4602] },\n { name: 'Jakarta', code: 'CGK', location: [106.6559, -6.1256] },\n { name: 'Bangkok', code: 'BKK', location: [100.7501, 13.6899] },\n { name: 'Hong Kong', code: 'HKG', location: [113.9185, 22.308] },\n { name: 'Madrid', code: 'MAD', location: [-3.5676, 40.4936] },\n { name: 'San Francisco', code: 'SFO', location: [-122.379, 37.6213] },\n { name: 'New York', code: 'JFK', location: [-73.7781, 40.6413] },\n { name: 'Chicago', code: 'ORD', location: [-87.9048, 41.9742] },\n { name: 'Shanghai', code: 'PVG', location: [121.8083, 31.1434] },\n { name: 'Beijing', code: 'PEK', location: [116.4074, 39.9042] },\n { name: 'Miami', code: 'MIA', location: [-80.2906, 25.7959] },\n { name: 'Houston', code: 'IAH', location: [-95.3414, 29.9844] },\n { name: 'Munich', code: 'MUC', location: [11.7861, 48.3538] },\n { name: 'Toronto', code: 'YYZ', location: [-79.6306, 43.6777] },\n { name: 'Sydney', code: 'SYD', location: [151.1799, -33.9399] },\n { name: 'Melbourne', code: 'MEL', location: [144.843, -37.6733] },\n { name: 'Rome', code: 'FCO', location: [12.2508, 41.8003] },\n { name: 'Barcelona', code: 'BCN', location: [2.0759, 41.2974] },\n { name: 'Kuala Lumpur', code: 'KUL', location: [101.7099, 2.7456] },\n { name: 'Doha', code: 'DOH', location: [51.6136, 25.2731] },\n { name: 'Vienna', code: 'VIE', location: [16.5697, 48.1103] },\n { name: 'Zurich', code: 'ZRH', location: [8.5492, 47.4583] },\n { name: 'Brussels', code: 'BRU', location: [4.4844, 50.901] },\n { name: 'Copenhagen', code: 'CPH', location: [12.6508, 55.6181] },\n { name: 'Oslo', code: 'OSL', location: [11.1004, 60.1939] },\n { name: 'Stockholm', code: 'ARN', location: [17.9186, 59.6519] },\n { name: 'Helsinki', code: 'HEL', location: [24.9633, 60.3172] },\n { name: 'Lisbon', code: 'LIS', location: [-9.1359, 38.7742] },\n { name: 'Athens', code: 'ATH', location: [23.9445, 37.9364] },\n { name: 'Warsaw', code: 'WAW', location: [20.9671, 52.1657] },\n { name: 'Budapest', code: 'BUD', location: [19.261, 47.433] },\n { name: 'Prague', code: 'PRG', location: [14.2632, 50.1008] },\n { name: 'Moscow', code: 'SVO', location: [37.4146, 55.9726] },\n { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },\n];\n\nexport const icons = [\n 'ph--air-traffic-control--regular',\n 'ph--asterisk--regular',\n 'ph--atom--regular',\n 'ph--basketball--regular',\n 'ph--butterfly--regular',\n 'ph--cactus--regular',\n 'ph--cake--regular',\n 'ph--calendar-dots--regular',\n 'ph--campfire--regular',\n 'ph--command--regular',\n 'ph--confetti--regular',\n 'ph--detective--regular',\n 'ph--disco-ball--regular',\n 'ph--dna--regular',\n 'ph--factory--regular',\n 'ph--flag-banner-fold--regular',\n 'ph--flask--regular',\n 'ph--flower-lotus--regular',\n 'ph--flying-saucer--regular',\n 'ph--game-controller--regular',\n 'ph--gavel--regular',\n 'ph--gift--regular',\n 'ph--guitar--regular',\n 'ph--hamburger--regular',\n 'ph--handshake--regular',\n 'ph--heart--regular',\n 'ph--lightbulb--regular',\n 'ph--lock--regular',\n 'ph--martini--regular',\n 'ph--medal-military--regular',\n 'ph--moped-front--regular',\n 'ph--office-chair--regular',\n 'ph--paint-brush-household--regular',\n 'ph--peace--regular',\n 'ph--person-simple-hike--regular',\n 'ph--piggy-bank--regular',\n 'ph--potted-plant--regular',\n 'ph--radioactive--regular',\n 'ph--rocket-launch--regular',\n 'ph--shield-star--regular',\n 'ph--shopping-cart--regular',\n 'ph--stethoscope--regular',\n 'ph--student--regular',\n 'ph--sun--regular',\n 'ph--tote--regular',\n 'ph--tree--regular',\n 'ph--users-three--regular',\n 'ph--yin-yang--regular',\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { randNumber } from '@ngneat/falso';\n\nexport type Range = { min?: number; max?: number; count?: number };\n\nexport const toRange = (range: number | Range, min = 0) => (typeof range === 'number' ? { min, max: range } : range);\n\nexport const getCount = (range?: number | Range) => (typeof range === 'number' ? range : randNumber(range));\n\nexport const multiple = <T>(fn: (i: number) => T, n: number): T[] => {\n return Array.from({ length: n }).map((_, i) => fn(i));\n};\n\nexport const uniqueArray = <T>(values: T[] | (() => T), n: number): T[] => {\n if (Array.isArray(values)) {\n const results: T[] = [];\n const selection = Array.from(new Set<T>(values));\n for (let i = 0; i < n; i++) {\n if (selection.length === 0) {\n break;\n }\n results.push(selection.splice(Math.floor(Math.random() * selection.length), 1)[0]);\n }\n return results;\n } else {\n const results = new Set<T>();\n // TODO(burdon): Set timeout.\n while (results.size < n) {\n results.add(values());\n }\n\n return Array.from(results);\n }\n};\n"],
5
+ "mappings": ";;;AAIA,cAAc;;;ACAd,SACEA,MACAC,mBACAC,iBACAC,WACAC,eACAC,WACAC,cACAC,iBACAC,SACAC,cAAAA,aACAC,eACAC,iBAC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AA,EAAGgC,KAAK,IAAA;EACrF;;;;EAKAW,QAAQ;IACNC,aAAa,CAACC,MAA2BC,gBAAgBD,CAAAA,EAAGb,KAAK,EAAA;IACjEe,MAAM,MAAMC,SAAAA;EACd;;;;EAKAC,UAAU;IACRC,OAAO,MAAMC,UAAAA;IACbzB,KAAK,MAAM0B,QAAAA;EACb;EACAC,QAAQ;IACNC,WAAW,MAAMC,cAAAA;IACjBC,UAAU,MAAMC,aAAAA;EAClB;EACAC,SAAS;IACPC,MAAM,MAAMC,gBAAAA;EACd;EACAC,UAAU;IACRC,aAAa,MAAMC,gBAAAA;EACrB;EACAC,KAAK;IACHC,SAAS,MAAMvE,KAAKwE,QAAAA;IACpBC,UAAU,MAAMzE,KAAKwE,QAAAA,EAAUC;EACjC;EACAjB,OAAO,CAAC;EACRkB,YAAY;IACVC,OAAO,MAAM3E,KAAK4E,OAAAA;IAClBC,KAAK,MAAM7E,KAAK8E,KAAAA;IAChBC,MAAM,MAAM/E,KAAKgF,KAAAA;EACnB;AACF;",
6
+ "names": ["rand", "randChanceBoolean", "randCompanyName", "randEmail", "randFirstName", "randFloat", "randFullName", "randHexaDecimal", "randImg", "randNumber", "randParagraph", "randProductName", "randRecentDate", "randSentence", "randUrl", "randUuid", "randWord", "seed", "idEmoji", "idHue", "airports", "name", "code", "location", "icons", "randNumber", "toRange", "range", "min", "max", "getCount", "randNumber", "multiple", "fn", "n", "Array", "from", "length", "map", "_", "i", "uniqueArray", "values", "isArray", "results", "selection", "Set", "push", "splice", "Math", "floor", "random", "size", "add", "faker", "seed", "value", "String", "helpers", "arrayElement", "a", "rand", "multiple", "f", "count", "getCount", "uniqueArray", "n", "randomSubset", "array", "length", "undefined", "Math", "floor", "random", "min", "number", "float", "range", "randFloat", "toRange", "int", "randNumber", "datatype", "boolean", "p", "randChanceBoolean", "chanceTrue", "probability", "date", "recent", "randRecentDate", "image", "url", "randImg", "lorem", "word", "randWord", "words", "join", "sentence", "text", "charAt", "toUpperCase", "slice", "randSentence", "sentences", "paragraph", "randParagraph", "paragraphs", "string", "hexadecimal", "l", "randHexaDecimal", "uuid", "randUuid", "internet", "email", "randEmail", "randUrl", "person", "firstName", "randFirstName", "fullName", "randFullName", "company", "name", "randCompanyName", "commerce", "productName", "randProductName", "geo", "airport", "airports", "location", "properties", "emoji", "idEmoji", "hue", "idHue", "icon", "icons"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"packages/common/random/src/data.ts":{"bytes":15884,"imports":[],"format":"esm"},"packages/common/random/src/util.ts":{"bytes":4274,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true}],"format":"esm"},"packages/common/random/src/faker.ts":{"bytes":11625,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"packages/common/random/src/data.ts","kind":"import-statement","original":"./data"},{"path":"packages/common/random/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/common/random/src/index.ts":{"bytes":590,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"packages/common/random/src/faker.ts","kind":"import-statement","original":"./faker"}],"format":"esm"}},"outputs":{"packages/common/random/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":15011},"packages/common/random/dist/lib/node-esm/index.mjs":{"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true}],"exports":["faker"],"entryPoint":"packages/common/random/src/index.ts","inputs":{"packages/common/random/src/index.ts":{"bytesInOutput":31},"packages/common/random/src/faker.ts":{"bytesInOutput":2469},"packages/common/random/src/data.ts":{"bytesInOutput":4814},"packages/common/random/src/util.ts":{"bytesInOutput":827}},"bytes":8486}}}
1
+ {"inputs":{"packages/common/random/src/data.ts":{"bytes":19345,"imports":[],"format":"esm"},"packages/common/random/src/util.ts":{"bytes":4274,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true}],"format":"esm"},"packages/common/random/src/faker.ts":{"bytes":12319,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/common/random/src/data.ts","kind":"import-statement","original":"./data"},{"path":"packages/common/random/src/util.ts","kind":"import-statement","original":"./util"}],"format":"esm"},"packages/common/random/src/index.ts":{"bytes":590,"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"packages/common/random/src/faker.ts","kind":"import-statement","original":"./faker"}],"format":"esm"}},"outputs":{"packages/common/random/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16908},"packages/common/random/dist/lib/node-esm/index.mjs":{"imports":[{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@ngneat/falso","kind":"import-statement","external":true}],"exports":["faker"],"entryPoint":"packages/common/random/src/index.ts","inputs":{"packages/common/random/src/index.ts":{"bytesInOutput":31},"packages/common/random/src/faker.ts":{"bytesInOutput":2625},"packages/common/random/src/data.ts":{"bytesInOutput":6106},"packages/common/random/src/util.ts":{"bytesInOutput":827}},"bytes":9934}}}
@@ -1,6 +1,7 @@
1
- export declare const randAirport: () => {
1
+ export declare const airports: {
2
2
  name: string;
3
3
  code: string;
4
4
  location: number[];
5
- };
5
+ }[];
6
+ export declare const icons: string[];
6
7
  //# sourceMappingURL=data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/data.ts"],"names":[],"mappings":"AAuDA,eAAO,MAAM,WAAW;;;;CAA8D,CAAC"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/data.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;GAiDpB,CAAC;AAEF,eAAO,MAAM,KAAK,UAiDjB,CAAC"}
@@ -67,5 +67,10 @@ export declare const faker: {
67
67
  location: () => number[];
68
68
  };
69
69
  email: {};
70
+ properties: {
71
+ emoji: () => string;
72
+ hue: () => "green" | "purple" | "red" | "violet" | "amber" | "lime" | "emerald" | "teal" | "cyan" | "fuchsia" | "pink" | "rose";
73
+ icon: () => string;
74
+ };
70
75
  };
71
76
  //# sourceMappingURL=faker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"faker.d.ts","sourceRoot":"","sources":["../../../src/faker.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,KAAK,KAAK,EAA4C,MAAM,QAAQ,CAAC;AAG9E,eAAO,MAAM,KAAK;kBAIF,MAAM;;uBAEH,CAAC,KAAK,CAAC,EAAE;mBACb,CAAC,KAAK,MAAM,CAAC,aAAa;YAAE,KAAK,EAAE,MAAM,GAAG;gBAAE,GAAG,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE;sBAEvE,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,KAAK,MAAM;uBAC/B,CAAC,SAAS,CAAC,EAAE,UAAU,MAAM,GAAG;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE;;;wBAiB3D,MAAM,GAAG,KAAK;sBAChB,MAAM,GAAG,KAAK;;;sBAGd;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;oBAc1B,MAAM,GAAG,KAAK;uBACX,MAAM,GAAG,KAAK;wBAQb,MAAM,GAAG,KAAK;wBACd,MAAM,GAAG,KAAK;yBAOb,MAAM,GAAG,KAAK;;;0BAOZ;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BvC,CAAC"}
1
+ {"version":3,"file":"faker.d.ts","sourceRoot":"","sources":["../../../src/faker.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,KAAK,KAAK,EAA4C,MAAM,QAAQ,CAAC;AAG9E,eAAO,MAAM,KAAK;kBAIF,MAAM;;uBAEH,CAAC,KAAK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AM,CAAC,CAAC,KAAK,MAAM,KAAG,CAAC,EAoBpE,CAAC"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/util.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,KAAK,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,GAAG,KAAK,EAAE,YAAO,UAA8D,CAAC;AAErH,eAAO,MAAM,QAAQ,GAAI,QAAQ,MAAM,GAAG,KAAK,WAA4D,CAAC;AAE5G,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,EAAE,GAAG,MAAM,KAAG,CAAC,EAE9D,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,KAAG,CAAC,EAoBpE,CAAC"}
@@ -1 +1 @@
1
- {"version":"5.7.3"}
1
+ {"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/random",
3
- "version": "0.8.2-main.f11618f",
3
+ "version": "0.8.2-main.fbd8ed0",
4
4
  "description": "Random data generator.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -28,7 +28,8 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "@ngneat/falso": "^7.1.1",
31
- "@dxos/node-std": "0.8.2-main.f11618f"
31
+ "@dxos/node-std": "0.8.2-main.fbd8ed0",
32
+ "@dxos/util": "0.8.2-main.fbd8ed0"
32
33
  },
33
34
  "devDependencies": {},
34
35
  "publishConfig": {
package/src/data.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- const airports = [
5
+ export const airports = [
6
6
  { name: 'Atlanta', code: 'ATL', location: [-84.4277, 33.6407] },
7
7
  { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },
8
8
  { name: 'Dallas', code: 'DFW', location: [-97.0403, 32.8998] },
@@ -53,4 +53,53 @@ const airports = [
53
53
  { name: 'Dubai', code: 'DXB', location: [55.3644, 25.2532] },
54
54
  ];
55
55
 
56
- export const randAirport = () => airports[Math.floor(Math.random() * airports.length)];
56
+ export const icons = [
57
+ 'ph--air-traffic-control--regular',
58
+ 'ph--asterisk--regular',
59
+ 'ph--atom--regular',
60
+ 'ph--basketball--regular',
61
+ 'ph--butterfly--regular',
62
+ 'ph--cactus--regular',
63
+ 'ph--cake--regular',
64
+ 'ph--calendar-dots--regular',
65
+ 'ph--campfire--regular',
66
+ 'ph--command--regular',
67
+ 'ph--confetti--regular',
68
+ 'ph--detective--regular',
69
+ 'ph--disco-ball--regular',
70
+ 'ph--dna--regular',
71
+ 'ph--factory--regular',
72
+ 'ph--flag-banner-fold--regular',
73
+ 'ph--flask--regular',
74
+ 'ph--flower-lotus--regular',
75
+ 'ph--flying-saucer--regular',
76
+ 'ph--game-controller--regular',
77
+ 'ph--gavel--regular',
78
+ 'ph--gift--regular',
79
+ 'ph--guitar--regular',
80
+ 'ph--hamburger--regular',
81
+ 'ph--handshake--regular',
82
+ 'ph--heart--regular',
83
+ 'ph--lightbulb--regular',
84
+ 'ph--lock--regular',
85
+ 'ph--martini--regular',
86
+ 'ph--medal-military--regular',
87
+ 'ph--moped-front--regular',
88
+ 'ph--office-chair--regular',
89
+ 'ph--paint-brush-household--regular',
90
+ 'ph--peace--regular',
91
+ 'ph--person-simple-hike--regular',
92
+ 'ph--piggy-bank--regular',
93
+ 'ph--potted-plant--regular',
94
+ 'ph--radioactive--regular',
95
+ 'ph--rocket-launch--regular',
96
+ 'ph--shield-star--regular',
97
+ 'ph--shopping-cart--regular',
98
+ 'ph--stethoscope--regular',
99
+ 'ph--student--regular',
100
+ 'ph--sun--regular',
101
+ 'ph--tote--regular',
102
+ 'ph--tree--regular',
103
+ 'ph--users-three--regular',
104
+ 'ph--yin-yang--regular',
105
+ ];
package/src/faker.ts CHANGED
@@ -23,7 +23,9 @@ import {
23
23
  seed,
24
24
  } from '@ngneat/falso';
25
25
 
26
- import { randAirport } from './data';
26
+ import { idEmoji, idHue } from '@dxos/util';
27
+
28
+ import { airports, icons } from './data';
27
29
  import { type Range, getCount, multiple, toRange, uniqueArray } from './util';
28
30
 
29
31
  // Fake faker.
@@ -118,8 +120,13 @@ export const faker = {
118
120
  productName: () => randProductName(),
119
121
  },
120
122
  geo: {
121
- airport: () => randAirport(),
122
- location: () => randAirport().location,
123
+ airport: () => rand(airports),
124
+ location: () => rand(airports).location,
123
125
  },
124
126
  email: {},
127
+ properties: {
128
+ emoji: () => rand(idEmoji),
129
+ hue: () => rand(idHue),
130
+ icon: () => rand(icons),
131
+ },
125
132
  };