@xivdyetools/test-utils 1.0.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.
Files changed (131) hide show
  1. package/LICENSE +37 -0
  2. package/README.md +144 -0
  3. package/dist/assertions/index.d.ts +7 -0
  4. package/dist/assertions/index.d.ts.map +1 -0
  5. package/dist/assertions/index.js +7 -0
  6. package/dist/assertions/index.js.map +1 -0
  7. package/dist/assertions/response.d.ts +84 -0
  8. package/dist/assertions/response.d.ts.map +1 -0
  9. package/dist/assertions/response.js +125 -0
  10. package/dist/assertions/response.js.map +1 -0
  11. package/dist/auth/context.d.ts +55 -0
  12. package/dist/auth/context.d.ts.map +1 -0
  13. package/dist/auth/context.js +95 -0
  14. package/dist/auth/context.js.map +1 -0
  15. package/dist/auth/headers.d.ts +64 -0
  16. package/dist/auth/headers.d.ts.map +1 -0
  17. package/dist/auth/headers.js +101 -0
  18. package/dist/auth/headers.js.map +1 -0
  19. package/dist/auth/index.d.ts +10 -0
  20. package/dist/auth/index.d.ts.map +1 -0
  21. package/dist/auth/index.js +10 -0
  22. package/dist/auth/index.js.map +1 -0
  23. package/dist/auth/jwt.d.ts +76 -0
  24. package/dist/auth/jwt.d.ts.map +1 -0
  25. package/dist/auth/jwt.js +77 -0
  26. package/dist/auth/jwt.js.map +1 -0
  27. package/dist/auth/signature.d.ts +64 -0
  28. package/dist/auth/signature.d.ts.map +1 -0
  29. package/dist/auth/signature.js +75 -0
  30. package/dist/auth/signature.js.map +1 -0
  31. package/dist/cloudflare/analytics.d.ts +55 -0
  32. package/dist/cloudflare/analytics.d.ts.map +1 -0
  33. package/dist/cloudflare/analytics.js +44 -0
  34. package/dist/cloudflare/analytics.js.map +1 -0
  35. package/dist/cloudflare/d1.d.ts +101 -0
  36. package/dist/cloudflare/d1.d.ts.map +1 -0
  37. package/dist/cloudflare/d1.js +148 -0
  38. package/dist/cloudflare/d1.js.map +1 -0
  39. package/dist/cloudflare/fetcher.d.ts +72 -0
  40. package/dist/cloudflare/fetcher.d.ts.map +1 -0
  41. package/dist/cloudflare/fetcher.js +136 -0
  42. package/dist/cloudflare/fetcher.js.map +1 -0
  43. package/dist/cloudflare/index.d.ts +12 -0
  44. package/dist/cloudflare/index.d.ts.map +1 -0
  45. package/dist/cloudflare/index.js +12 -0
  46. package/dist/cloudflare/index.js.map +1 -0
  47. package/dist/cloudflare/kv.d.ts +85 -0
  48. package/dist/cloudflare/kv.d.ts.map +1 -0
  49. package/dist/cloudflare/kv.js +138 -0
  50. package/dist/cloudflare/kv.js.map +1 -0
  51. package/dist/cloudflare/r2.d.ts +88 -0
  52. package/dist/cloudflare/r2.d.ts.map +1 -0
  53. package/dist/cloudflare/r2.js +127 -0
  54. package/dist/cloudflare/r2.js.map +1 -0
  55. package/dist/constants/index.d.ts +8 -0
  56. package/dist/constants/index.d.ts.map +1 -0
  57. package/dist/constants/index.js +8 -0
  58. package/dist/constants/index.js.map +1 -0
  59. package/dist/constants/pkce.d.ts +89 -0
  60. package/dist/constants/pkce.d.ts.map +1 -0
  61. package/dist/constants/pkce.js +107 -0
  62. package/dist/constants/pkce.js.map +1 -0
  63. package/dist/constants/secrets.d.ts +72 -0
  64. package/dist/constants/secrets.d.ts.map +1 -0
  65. package/dist/constants/secrets.js +73 -0
  66. package/dist/constants/secrets.js.map +1 -0
  67. package/dist/dom/canvas.d.ts +108 -0
  68. package/dist/dom/canvas.d.ts.map +1 -0
  69. package/dist/dom/canvas.js +125 -0
  70. package/dist/dom/canvas.js.map +1 -0
  71. package/dist/dom/fetch.d.ts +69 -0
  72. package/dist/dom/fetch.d.ts.map +1 -0
  73. package/dist/dom/fetch.js +107 -0
  74. package/dist/dom/fetch.js.map +1 -0
  75. package/dist/dom/index.d.ts +12 -0
  76. package/dist/dom/index.d.ts.map +1 -0
  77. package/dist/dom/index.js +12 -0
  78. package/dist/dom/index.js.map +1 -0
  79. package/dist/dom/localStorage.d.ts +80 -0
  80. package/dist/dom/localStorage.d.ts.map +1 -0
  81. package/dist/dom/localStorage.js +124 -0
  82. package/dist/dom/localStorage.js.map +1 -0
  83. package/dist/dom/matchMedia.d.ts +51 -0
  84. package/dist/dom/matchMedia.d.ts.map +1 -0
  85. package/dist/dom/matchMedia.js +120 -0
  86. package/dist/dom/matchMedia.js.map +1 -0
  87. package/dist/dom/resizeObserver.d.ts +68 -0
  88. package/dist/dom/resizeObserver.d.ts.map +1 -0
  89. package/dist/dom/resizeObserver.js +99 -0
  90. package/dist/dom/resizeObserver.js.map +1 -0
  91. package/dist/factories/category.d.ts +74 -0
  92. package/dist/factories/category.d.ts.map +1 -0
  93. package/dist/factories/category.js +99 -0
  94. package/dist/factories/category.js.map +1 -0
  95. package/dist/factories/dye.d.ts +76 -0
  96. package/dist/factories/dye.d.ts.map +1 -0
  97. package/dist/factories/dye.js +211 -0
  98. package/dist/factories/dye.js.map +1 -0
  99. package/dist/factories/index.d.ts +13 -0
  100. package/dist/factories/index.d.ts.map +1 -0
  101. package/dist/factories/index.js +14 -0
  102. package/dist/factories/index.js.map +1 -0
  103. package/dist/factories/preset.d.ts +105 -0
  104. package/dist/factories/preset.d.ts.map +1 -0
  105. package/dist/factories/preset.js +170 -0
  106. package/dist/factories/preset.js.map +1 -0
  107. package/dist/factories/user.d.ts +74 -0
  108. package/dist/factories/user.d.ts.map +1 -0
  109. package/dist/factories/user.js +115 -0
  110. package/dist/factories/user.js.map +1 -0
  111. package/dist/factories/vote.d.ts +55 -0
  112. package/dist/factories/vote.d.ts.map +1 -0
  113. package/dist/factories/vote.js +68 -0
  114. package/dist/factories/vote.js.map +1 -0
  115. package/dist/index.d.ts +17 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +24 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/utils/counters.d.ts +35 -0
  120. package/dist/utils/counters.d.ts.map +1 -0
  121. package/dist/utils/counters.js +53 -0
  122. package/dist/utils/counters.js.map +1 -0
  123. package/dist/utils/crypto.d.ts +42 -0
  124. package/dist/utils/crypto.d.ts.map +1 -0
  125. package/dist/utils/crypto.js +72 -0
  126. package/dist/utils/crypto.js.map +1 -0
  127. package/dist/utils/index.d.ts +6 -0
  128. package/dist/utils/index.d.ts.map +1 -0
  129. package/dist/utils/index.js +6 -0
  130. package/dist/utils/index.js.map +1 -0
  131. package/package.json +88 -0
@@ -0,0 +1,51 @@
1
+ /**
2
+ * matchMedia mock for testing
3
+ *
4
+ * Provides a mock implementation of window.matchMedia
5
+ * for testing responsive and theme-aware components.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // Setup mock
10
+ * setupMatchMediaMock();
11
+ *
12
+ * // Test dark mode detection
13
+ * setMediaQueryMatch('(prefers-color-scheme: dark)', true);
14
+ *
15
+ * const darkMode = window.matchMedia('(prefers-color-scheme: dark)');
16
+ * expect(darkMode.matches).toBe(true);
17
+ * ```
18
+ */
19
+ /**
20
+ * Sets up matchMedia mock on window/globalThis
21
+ */
22
+ export declare function setupMatchMediaMock(): void;
23
+ /**
24
+ * Sets the match state for a media query
25
+ *
26
+ * @param query - The media query string
27
+ * @param matches - Whether it should match
28
+ */
29
+ export declare function setMediaQueryMatch(query: string, matches: boolean): void;
30
+ /**
31
+ * Resets all media query states
32
+ */
33
+ export declare function resetMediaQueries(): void;
34
+ /**
35
+ * Common media query presets
36
+ */
37
+ export declare const MediaQueryPresets: {
38
+ /** Prefer dark color scheme */
39
+ readonly DARK_MODE: "(prefers-color-scheme: dark)";
40
+ /** Prefer light color scheme */
41
+ readonly LIGHT_MODE: "(prefers-color-scheme: light)";
42
+ /** Reduced motion preference */
43
+ readonly REDUCED_MOTION: "(prefers-reduced-motion: reduce)";
44
+ /** Mobile viewport */
45
+ readonly MOBILE: "(max-width: 768px)";
46
+ /** Tablet viewport */
47
+ readonly TABLET: "(min-width: 769px) and (max-width: 1024px)";
48
+ /** Desktop viewport */
49
+ readonly DESKTOP: "(min-width: 1025px)";
50
+ };
51
+ //# sourceMappingURL=matchMedia.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchMedia.d.ts","sourceRoot":"","sources":["../../src/dom/matchMedia.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAkDH;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAsB1C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAkBxE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAGxC;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB;IAC5B,+BAA+B;;IAE/B,gCAAgC;;IAEhC,gCAAgC;;IAEhC,sBAAsB;;IAEtB,sBAAsB;;IAEtB,uBAAuB;;CAEf,CAAC"}
@@ -0,0 +1,120 @@
1
+ /**
2
+ * matchMedia mock for testing
3
+ *
4
+ * Provides a mock implementation of window.matchMedia
5
+ * for testing responsive and theme-aware components.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // Setup mock
10
+ * setupMatchMediaMock();
11
+ *
12
+ * // Test dark mode detection
13
+ * setMediaQueryMatch('(prefers-color-scheme: dark)', true);
14
+ *
15
+ * const darkMode = window.matchMedia('(prefers-color-scheme: dark)');
16
+ * expect(darkMode.matches).toBe(true);
17
+ * ```
18
+ */
19
+ /** Store for media query states */
20
+ const mediaQueryStates = new Map();
21
+ /** Store for media query listeners */
22
+ const mediaQueryListeners = new Map();
23
+ /**
24
+ * Creates a mock MediaQueryList
25
+ */
26
+ function createMockMediaQueryList(query) {
27
+ const listeners = mediaQueryListeners.get(query) ?? new Set();
28
+ mediaQueryListeners.set(query, listeners);
29
+ return {
30
+ get matches() {
31
+ return mediaQueryStates.get(query) ?? false;
32
+ },
33
+ media: query,
34
+ onchange: null,
35
+ addListener: (callback) => {
36
+ listeners.add(callback);
37
+ },
38
+ removeListener: (callback) => {
39
+ listeners.delete(callback);
40
+ },
41
+ addEventListener: (_event, callback) => {
42
+ listeners.add(callback);
43
+ },
44
+ removeEventListener: (_event, callback) => {
45
+ listeners.delete(callback);
46
+ },
47
+ dispatchEvent: () => true,
48
+ };
49
+ }
50
+ /**
51
+ * Sets up matchMedia mock on window/globalThis
52
+ */
53
+ export function setupMatchMediaMock() {
54
+ mediaQueryStates.clear();
55
+ mediaQueryListeners.clear();
56
+ const matchMedia = (query) => {
57
+ return createMockMediaQueryList(query);
58
+ };
59
+ Object.defineProperty(globalThis, 'matchMedia', {
60
+ value: matchMedia,
61
+ writable: true,
62
+ configurable: true,
63
+ });
64
+ // Also set on window if it exists
65
+ if (typeof window !== 'undefined') {
66
+ Object.defineProperty(window, 'matchMedia', {
67
+ value: matchMedia,
68
+ writable: true,
69
+ configurable: true,
70
+ });
71
+ }
72
+ }
73
+ /**
74
+ * Sets the match state for a media query
75
+ *
76
+ * @param query - The media query string
77
+ * @param matches - Whether it should match
78
+ */
79
+ export function setMediaQueryMatch(query, matches) {
80
+ const previousMatches = mediaQueryStates.get(query) ?? false;
81
+ mediaQueryStates.set(query, matches);
82
+ // Notify listeners if the state changed
83
+ if (previousMatches !== matches) {
84
+ const listeners = mediaQueryListeners.get(query);
85
+ if (listeners) {
86
+ const event = {
87
+ matches,
88
+ media: query,
89
+ };
90
+ for (const listener of listeners) {
91
+ listener(event);
92
+ }
93
+ }
94
+ }
95
+ }
96
+ /**
97
+ * Resets all media query states
98
+ */
99
+ export function resetMediaQueries() {
100
+ mediaQueryStates.clear();
101
+ mediaQueryListeners.clear();
102
+ }
103
+ /**
104
+ * Common media query presets
105
+ */
106
+ export const MediaQueryPresets = {
107
+ /** Prefer dark color scheme */
108
+ DARK_MODE: '(prefers-color-scheme: dark)',
109
+ /** Prefer light color scheme */
110
+ LIGHT_MODE: '(prefers-color-scheme: light)',
111
+ /** Reduced motion preference */
112
+ REDUCED_MOTION: '(prefers-reduced-motion: reduce)',
113
+ /** Mobile viewport */
114
+ MOBILE: '(max-width: 768px)',
115
+ /** Tablet viewport */
116
+ TABLET: '(min-width: 769px) and (max-width: 1024px)',
117
+ /** Desktop viewport */
118
+ DESKTOP: '(min-width: 1025px)',
119
+ };
120
+ //# sourceMappingURL=matchMedia.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchMedia.js","sourceRoot":"","sources":["../../src/dom/matchMedia.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAeH,mCAAmC;AACnC,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAmB,CAAC;AAEpD,sCAAsC;AACtC,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAmC,CAAC;AAEvE;;GAEG;AACH,SAAS,wBAAwB,CAAC,KAAa;IAC7C,MAAM,SAAS,GAAG,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;IAC9D,mBAAmB,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAE1C,OAAO;QACL,IAAI,OAAO;YACT,OAAO,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;QAC9C,CAAC;QACD,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,CAAC,QAA4B,EAAE,EAAE;YAC5C,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1B,CAAC;QACD,cAAc,EAAE,CAAC,QAA4B,EAAE,EAAE;YAC/C,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;QACD,gBAAgB,EAAE,CAAC,MAAc,EAAE,QAA4B,EAAE,EAAE;YACjE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1B,CAAC;QACD,mBAAmB,EAAE,CAAC,MAAc,EAAE,QAA4B,EAAE,EAAE;YACpE,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC7B,CAAC;QACD,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI;KAC1B,CAAC;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AAgB,CAAC,KAAK,EAAE,CAAC;IACzB,mBAAmB,CAAC,KAAK,EAAE,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,+BAA+B;IAC/B,SAAS,EAAE,8BAA8B;IACzC,gCAAgC;IAChC,UAAU,EAAE,+BAA+B;IAC3C,gCAAgC;IAChC,cAAc,EAAE,kCAAkC;IAClD,sBAAsB;IACtB,MAAM,EAAE,oBAAoB;IAC5B,sBAAsB;IACtB,MAAM,EAAE,4CAA4C;IACpD,uBAAuB;IACvB,OAAO,EAAE,qBAAqB;CACtB,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * ResizeObserver mock for testing
3
+ *
4
+ * Provides a mock implementation of ResizeObserver
5
+ * for testing responsive components.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // Setup mock before tests
10
+ * setupResizeObserverMock();
11
+ *
12
+ * // Now ResizeObserver won't throw
13
+ * const observer = new ResizeObserver(entries => {
14
+ * console.log('Resized:', entries);
15
+ * });
16
+ * observer.observe(element);
17
+ *
18
+ * // Trigger resize callbacks manually
19
+ * MockResizeObserver.triggerAll([{ width: 100, height: 200 }]);
20
+ * ```
21
+ */
22
+ type ResizeObserverCallback = (entries: ResizeObserverEntry[], observer: ResizeObserver) => void;
23
+ /**
24
+ * Mock ResizeObserver class
25
+ */
26
+ export declare class MockResizeObserver implements ResizeObserver {
27
+ private callback;
28
+ private observedElements;
29
+ /** All active MockResizeObserver instances */
30
+ static instances: MockResizeObserver[];
31
+ constructor(callback: ResizeObserverCallback);
32
+ observe(target: Element): void;
33
+ unobserve(target: Element): void;
34
+ disconnect(): void;
35
+ /**
36
+ * Get observed elements
37
+ */
38
+ getObservedElements(): Element[];
39
+ /**
40
+ * Manually trigger the callback with mock entries
41
+ */
42
+ trigger(entries: Array<{
43
+ width?: number;
44
+ height?: number;
45
+ target?: Element;
46
+ }>): void;
47
+ /**
48
+ * Trigger all active observers
49
+ */
50
+ static triggerAll(entries: Array<{
51
+ width?: number;
52
+ height?: number;
53
+ }>): void;
54
+ /**
55
+ * Clear all instances
56
+ */
57
+ static clearInstances(): void;
58
+ }
59
+ /**
60
+ * Sets up ResizeObserver mock on globalThis
61
+ */
62
+ export declare function setupResizeObserverMock(): void;
63
+ /**
64
+ * Creates a standalone mock ResizeObserver (without global setup)
65
+ */
66
+ export declare function createMockResizeObserver(callback: ResizeObserverCallback): MockResizeObserver;
67
+ export {};
68
+ //# sourceMappingURL=resizeObserver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizeObserver.d.ts","sourceRoot":"","sources":["../../src/dom/resizeObserver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,KAAK,sBAAsB,GAAG,CAC5B,OAAO,EAAE,mBAAmB,EAAE,EAC9B,QAAQ,EAAE,cAAc,KACrB,IAAI,CAAC;AAUV;;GAEG;AACH,qBAAa,kBAAmB,YAAW,cAAc;IACvD,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,gBAAgB,CAA2B;IAEnD,8CAA8C;IAC9C,MAAM,CAAC,SAAS,EAAE,kBAAkB,EAAE,CAAM;gBAEhC,QAAQ,EAAE,sBAAsB;IAK5C,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAI9B,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAIhC,UAAU,IAAI,IAAI;IAQlB;;OAEG;IACH,mBAAmB,IAAI,OAAO,EAAE;IAIhC;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI;IAoBpF;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI;IAM5E;;OAEG;IACH,MAAM,CAAC,cAAc,IAAI,IAAI;CAG9B;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAG9C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,sBAAsB,GAC/B,kBAAkB,CAEpB"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * ResizeObserver mock for testing
3
+ *
4
+ * Provides a mock implementation of ResizeObserver
5
+ * for testing responsive components.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // Setup mock before tests
10
+ * setupResizeObserverMock();
11
+ *
12
+ * // Now ResizeObserver won't throw
13
+ * const observer = new ResizeObserver(entries => {
14
+ * console.log('Resized:', entries);
15
+ * });
16
+ * observer.observe(element);
17
+ *
18
+ * // Trigger resize callbacks manually
19
+ * MockResizeObserver.triggerAll([{ width: 100, height: 200 }]);
20
+ * ```
21
+ */
22
+ /**
23
+ * Mock ResizeObserver class
24
+ */
25
+ export class MockResizeObserver {
26
+ constructor(callback) {
27
+ this.observedElements = new Set();
28
+ this.callback = callback;
29
+ MockResizeObserver.instances.push(this);
30
+ }
31
+ observe(target) {
32
+ this.observedElements.add(target);
33
+ }
34
+ unobserve(target) {
35
+ this.observedElements.delete(target);
36
+ }
37
+ disconnect() {
38
+ this.observedElements.clear();
39
+ const index = MockResizeObserver.instances.indexOf(this);
40
+ if (index > -1) {
41
+ MockResizeObserver.instances.splice(index, 1);
42
+ }
43
+ }
44
+ /**
45
+ * Get observed elements
46
+ */
47
+ getObservedElements() {
48
+ return Array.from(this.observedElements);
49
+ }
50
+ /**
51
+ * Manually trigger the callback with mock entries
52
+ */
53
+ trigger(entries) {
54
+ const mockEntries = entries.map((entry) => {
55
+ const target = entry.target ?? this.observedElements.values().next().value ?? document.body;
56
+ const width = entry.width ?? 100;
57
+ const height = entry.height ?? 100;
58
+ const size = { inlineSize: width, blockSize: height };
59
+ return {
60
+ target,
61
+ contentRect: new DOMRect(0, 0, width, height),
62
+ borderBoxSize: [size],
63
+ contentBoxSize: [size],
64
+ devicePixelContentBoxSize: [size],
65
+ };
66
+ });
67
+ this.callback(mockEntries, this);
68
+ }
69
+ /**
70
+ * Trigger all active observers
71
+ */
72
+ static triggerAll(entries) {
73
+ for (const instance of MockResizeObserver.instances) {
74
+ instance.trigger(entries);
75
+ }
76
+ }
77
+ /**
78
+ * Clear all instances
79
+ */
80
+ static clearInstances() {
81
+ MockResizeObserver.instances = [];
82
+ }
83
+ }
84
+ /** All active MockResizeObserver instances */
85
+ MockResizeObserver.instances = [];
86
+ /**
87
+ * Sets up ResizeObserver mock on globalThis
88
+ */
89
+ export function setupResizeObserverMock() {
90
+ MockResizeObserver.clearInstances();
91
+ globalThis.ResizeObserver = MockResizeObserver;
92
+ }
93
+ /**
94
+ * Creates a standalone mock ResizeObserver (without global setup)
95
+ */
96
+ export function createMockResizeObserver(callback) {
97
+ return new MockResizeObserver(callback);
98
+ }
99
+ //# sourceMappingURL=resizeObserver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizeObserver.js","sourceRoot":"","sources":["../../src/dom/resizeObserver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAeH;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAO7B,YAAY,QAAgC;QALpC,qBAAgB,GAAiB,IAAI,GAAG,EAAE,CAAC;QAMjD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,kBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,CAAC,MAAe;QACrB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,CAAC,MAAe;QACvB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;I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AC,OAAmD;QACnE,KAAK,MAAM,QAAQ,IAAI,kBAAkB,CAAC,SAAS,EAAE,CAAC;YACpD,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAc;QACnB,kBAAkB,CAAC,SAAS,GAAG,EAAE,CAAC;IACpC,CAAC;;AApED,8CAA8C;AACvC,4BAAS,GAAyB,EAAE,AAA3B,CAA4B;AAsE9C;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,kBAAkB,CAAC,cAAc,EAAE,CAAC;IACpC,UAAU,CAAC,cAAc,GAAG,kBAAsD,CAAC;AACrF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,QAAgC;IAEhC,OAAO,IAAI,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Category factory functions for testing
3
+ *
4
+ * Provides functions to create mock categories.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * const category = createMockCategory({ name: 'Jobs' });
9
+ * const row = createMockCategoryRow({ is_curated: 1 });
10
+ * ```
11
+ */
12
+ /**
13
+ * Category database row type (as stored in D1)
14
+ */
15
+ export interface CategoryRow {
16
+ id: string;
17
+ name: string;
18
+ description: string;
19
+ icon: string | null;
20
+ is_curated: number;
21
+ display_order: number;
22
+ }
23
+ /**
24
+ * Category domain object (with boolean is_curated)
25
+ */
26
+ export interface Category {
27
+ id: string;
28
+ name: string;
29
+ description: string;
30
+ icon: string | null;
31
+ is_curated: boolean;
32
+ display_order: number;
33
+ }
34
+ /**
35
+ * Creates a mock category row (as returned from database)
36
+ *
37
+ * @param overrides - Optional overrides for the default values
38
+ * @returns A CategoryRow object
39
+ */
40
+ export declare function createMockCategoryRow(overrides?: Partial<CategoryRow>): CategoryRow;
41
+ /**
42
+ * Creates a mock category domain object
43
+ *
44
+ * @param overrides - Optional overrides for the default values
45
+ * @returns A Category object
46
+ */
47
+ export declare function createMockCategory(overrides?: Partial<Category>): Category;
48
+ /**
49
+ * Creates multiple mock categories
50
+ *
51
+ * @param count - Number of categories to create
52
+ * @param overrides - Optional overrides to apply to all categories
53
+ * @returns Array of Category objects
54
+ */
55
+ export declare function createMockCategories(count: number, overrides?: Partial<Category>): Category[];
56
+ /**
57
+ * Creates a curated category
58
+ *
59
+ * @param overrides - Optional overrides
60
+ * @returns A curated Category object
61
+ */
62
+ export declare function createCuratedCategory(overrides?: Partial<Category>): Category;
63
+ /**
64
+ * Default preset categories for testing
65
+ */
66
+ export declare const DEFAULT_CATEGORIES: Category[];
67
+ /**
68
+ * Converts a Category to a CategoryRow
69
+ *
70
+ * @param category - The Category to convert
71
+ * @returns A CategoryRow object
72
+ */
73
+ export declare function categoryToRow(category: Category): CategoryRow;
74
+ //# sourceMappingURL=category.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/factories/category.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,GAAE,OAAO,CAAC,WAAW,CAAM,GAAG,WAAW,CAavF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,GAAE,OAAO,CAAC,QAAQ,CAAM,GAAG,QAAQ,CAa9E;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,SAAS,GAAE,OAAO,CAAC,QAAQ,CAAM,GAChC,QAAQ,EAAE,CAOZ;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,GAAE,OAAO,CAAC,QAAQ,CAAM,GAAG,QAAQ,CAKjF;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,EAOxC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAK7D"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Category factory functions for testing
3
+ *
4
+ * Provides functions to create mock categories.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * const category = createMockCategory({ name: 'Jobs' });
9
+ * const row = createMockCategoryRow({ is_curated: 1 });
10
+ * ```
11
+ */
12
+ import { nextStringId, nextId } from '../utils/counters.js';
13
+ /**
14
+ * Creates a mock category row (as returned from database)
15
+ *
16
+ * @param overrides - Optional overrides for the default values
17
+ * @returns A CategoryRow object
18
+ */
19
+ export function createMockCategoryRow(overrides = {}) {
20
+ const id = overrides.id ?? nextStringId('category');
21
+ const displayOrder = overrides.display_order ?? nextId('category-order');
22
+ return {
23
+ id,
24
+ name: 'Test Category',
25
+ description: 'A test category description',
26
+ icon: null,
27
+ is_curated: 0,
28
+ display_order: displayOrder,
29
+ ...overrides,
30
+ };
31
+ }
32
+ /**
33
+ * Creates a mock category domain object
34
+ *
35
+ * @param overrides - Optional overrides for the default values
36
+ * @returns A Category object
37
+ */
38
+ export function createMockCategory(overrides = {}) {
39
+ const id = overrides.id ?? nextStringId('category');
40
+ const displayOrder = overrides.display_order ?? nextId('category-order');
41
+ return {
42
+ id,
43
+ name: 'Test Category',
44
+ description: 'A test category description',
45
+ icon: null,
46
+ is_curated: false,
47
+ display_order: displayOrder,
48
+ ...overrides,
49
+ };
50
+ }
51
+ /**
52
+ * Creates multiple mock categories
53
+ *
54
+ * @param count - Number of categories to create
55
+ * @param overrides - Optional overrides to apply to all categories
56
+ * @returns Array of Category objects
57
+ */
58
+ export function createMockCategories(count, overrides = {}) {
59
+ return Array.from({ length: count }, (_, i) => createMockCategory({
60
+ name: `Category ${i + 1}`,
61
+ ...overrides,
62
+ }));
63
+ }
64
+ /**
65
+ * Creates a curated category
66
+ *
67
+ * @param overrides - Optional overrides
68
+ * @returns A curated Category object
69
+ */
70
+ export function createCuratedCategory(overrides = {}) {
71
+ return createMockCategory({
72
+ is_curated: true,
73
+ ...overrides,
74
+ });
75
+ }
76
+ /**
77
+ * Default preset categories for testing
78
+ */
79
+ export const DEFAULT_CATEGORIES = [
80
+ { id: 'jobs', name: 'Jobs', description: 'Job-inspired palettes', icon: null, is_curated: true, display_order: 1 },
81
+ { id: 'grand-companies', name: 'Grand Companies', description: 'GC-themed palettes', icon: null, is_curated: true, display_order: 2 },
82
+ { id: 'seasons', name: 'Seasons', description: 'Seasonal themes', icon: null, is_curated: true, display_order: 3 },
83
+ { id: 'events', name: 'Events', description: 'Event themes', icon: null, is_curated: true, display_order: 4 },
84
+ { id: 'aesthetics', name: 'Aesthetics', description: 'Visual styles', icon: null, is_curated: true, display_order: 5 },
85
+ { id: 'community', name: 'Community', description: 'User submissions', icon: null, is_curated: false, display_order: 6 },
86
+ ];
87
+ /**
88
+ * Converts a Category to a CategoryRow
89
+ *
90
+ * @param category - The Category to convert
91
+ * @returns A CategoryRow object
92
+ */
93
+ export function categoryToRow(category) {
94
+ return {
95
+ ...category,
96
+ is_curated: category.is_curated ? 1 : 0,
97
+ };
98
+ }
99
+ //# sourceMappingURL=category.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/factories/category.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,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,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACxC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Dye factory functions and mock data for testing
3
+ *
4
+ * Provides mock dye data and factory functions for testing
5
+ * dye-related functionality.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { mockDyes, createMockDye } from '@xivdyetools/test-utils/factories';
10
+ *
11
+ * // Use predefined mock dyes
12
+ * const dyes = mockDyes;
13
+ *
14
+ * // Create a custom mock dye
15
+ * const dye = createMockDye({ name: 'Custom Dye', hex: '#FF0000' });
16
+ * ```
17
+ */
18
+ import type { Dye } from '@xivdyetools/types/dye';
19
+ export type { Dye };
20
+ /**
21
+ * Sample mock dyes for testing
22
+ *
23
+ * A small set of dyes covering different categories and properties.
24
+ */
25
+ export declare const mockDyes: Dye[];
26
+ /**
27
+ * Creates a mock dye with custom properties
28
+ *
29
+ * @param overrides - Optional overrides for the default values
30
+ * @returns A Dye object
31
+ */
32
+ export declare function createMockDye(overrides?: Partial<Dye>): Dye;
33
+ /**
34
+ * Creates multiple mock dyes
35
+ *
36
+ * @param count - Number of dyes to create
37
+ * @param overrides - Optional overrides to apply to all dyes
38
+ * @returns Array of Dye objects
39
+ */
40
+ export declare function createMockDyes(count: number, overrides?: Partial<Dye>): Dye[];
41
+ /**
42
+ * Creates a metallic dye
43
+ *
44
+ * @param overrides - Optional overrides
45
+ * @returns A metallic Dye object
46
+ */
47
+ export declare function createMetallicDye(overrides?: Partial<Dye>): Dye;
48
+ /**
49
+ * Creates a pastel dye
50
+ *
51
+ * @param overrides - Optional overrides
52
+ * @returns A pastel Dye object
53
+ */
54
+ export declare function createPastelDye(overrides?: Partial<Dye>): Dye;
55
+ /**
56
+ * Creates a dark dye
57
+ *
58
+ * @param overrides - Optional overrides
59
+ * @returns A dark Dye object
60
+ */
61
+ export declare function createDarkDye(overrides?: Partial<Dye>): Dye;
62
+ /**
63
+ * Get a dye by ID from the mock dyes
64
+ *
65
+ * @param id - The dye ID
66
+ * @returns The Dye object or undefined
67
+ */
68
+ export declare function getMockDyeById(id: number): Dye | undefined;
69
+ /**
70
+ * Get dyes by IDs from the mock dyes
71
+ *
72
+ * @param ids - Array of dye IDs
73
+ * @returns Array of Dye objects (missing IDs are filtered out)
74
+ */
75
+ export declare function getMockDyesByIds(ids: number[]): Dye[];
76
+ //# sourceMappingURL=dye.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dye.d.ts","sourceRoot":"","sources":["../../src/factories/dye.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAIlD,YAAY,EAAE,GAAG,EAAE,CAAC;AAEpB;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,GAAG,EA2FzB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,SAAS,GAAE,OAAO,CAAC,GAAG,CAAM,GAAG,GAAG,CAoB/D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,SAAS,GAAE,OAAO,CAAC,GAAG,CAAM,GAC3B,GAAG,EAAE,CAEP;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,GAAE,OAAO,CAAC,GAAG,CAAM,GAAG,GAAG,CAKnE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,SAAS,GAAE,OAAO,CAAC,GAAG,CAAM,GAAG,GAAG,CAKjE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,SAAS,GAAE,OAAO,CAAC,GAAG,CAAM,GAAG,GAAG,CAQ/D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,EAAE,CAIrD"}