@youversion/platform-core 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
 
2
- > @youversion/platform-core@1.3.0 build /home/runner/work/platform-sdk-react/platform-sdk-react/packages/core
2
+ > @youversion/platform-core@1.4.0 build /home/runner/work/platform-sdk-react/platform-sdk-react/packages/core
3
3
  > tsup src/index.ts --format cjs,esm --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,10 +9,10 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  ESM dist/index.js 41.47 KB
12
- ESM ⚡️ Build success in 34ms
12
+ ESM ⚡️ Build success in 36ms
13
13
  CJS dist/index.cjs 43.29 KB
14
- CJS ⚡️ Build success in 35ms
14
+ CJS ⚡️ Build success in 36ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 1804ms
16
+ DTS ⚡️ Build success in 1771ms
17
17
  DTS dist/index.d.cts 32.84 KB
18
18
  DTS dist/index.d.ts 32.84 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @youversion/platform-core
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8275a27: feat(ui): add bible reader settings
8
+ - refactor popover component to have consistent styling across
9
+ multiple components and reduce duplication in code.
10
+ - add bible reader settings and save the users settings to localStorage.
11
+
3
12
  ## 1.3.0
4
13
 
5
14
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@youversion/platform-core",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -0,0 +1,29 @@
1
+ class LocalStorageMock {
2
+ private store: Record<string, string> = {};
3
+
4
+ getItem(key: string): string | null {
5
+ return this.store[key] ?? null;
6
+ }
7
+
8
+ setItem(key: string, value: string): void {
9
+ this.store[key] = value;
10
+ }
11
+
12
+ removeItem(key: string): void {
13
+ delete this.store[key];
14
+ }
15
+
16
+ clear(): void {
17
+ this.store = {};
18
+ }
19
+
20
+ get length(): number {
21
+ return Object.keys(this.store).length;
22
+ }
23
+
24
+ key(index: number): string | null {
25
+ return Object.keys(this.store)[index] ?? null;
26
+ }
27
+ }
28
+
29
+ globalThis.localStorage = new LocalStorageMock() as Storage;
package/vitest.config.ts CHANGED
@@ -3,7 +3,7 @@ import { defineConfig } from 'vitest/config';
3
3
  export default defineConfig({
4
4
  test: {
5
5
  environment: 'node',
6
- setupFiles: ['./src/__tests__/setup.ts'],
6
+ setupFiles: ['./src/__tests__/polyfills.ts', './src/__tests__/setup.ts'],
7
7
  testTimeout: 10_000,
8
8
  coverage: {
9
9
  provider: 'v8',