@superbright/indexeddb-orm 0.1.9 → 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.
- package/dist/_virtual/_commonjsHelpers.cjs +2 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.mjs +9 -0
- package/dist/_virtual/_commonjsHelpers.mjs.map +1 -0
- package/dist/_virtual/dexie.min.cjs +2 -0
- package/dist/_virtual/dexie.min.cjs.map +1 -0
- package/dist/_virtual/dexie.min.mjs +5 -0
- package/dist/_virtual/dexie.min.mjs.map +1 -0
- package/dist/adapters/dexie.cjs +2 -0
- package/dist/adapters/dexie.cjs.map +1 -0
- package/dist/adapters/dexie.mjs +14 -0
- package/dist/adapters/dexie.mjs.map +1 -0
- package/dist/adapters/structured-store.cjs +2 -0
- package/dist/adapters/structured-store.cjs.map +1 -0
- package/dist/adapters/structured-store.mjs +50 -0
- package/dist/adapters/structured-store.mjs.map +1 -0
- package/dist/adapters/zustand-store.cjs +2 -0
- package/dist/adapters/zustand-store.cjs.map +1 -0
- package/dist/adapters/zustand-store.mjs +169 -0
- package/dist/adapters/zustand-store.mjs.map +1 -0
- package/dist/api/favorites.cjs +2 -0
- package/dist/api/favorites.cjs.map +1 -0
- package/dist/api/favorites.mjs +34 -0
- package/dist/api/favorites.mjs.map +1 -0
- package/dist/api/properties.cjs +2 -0
- package/dist/api/properties.cjs.map +1 -0
- package/dist/api/properties.mjs +197 -0
- package/dist/api/properties.mjs.map +1 -0
- package/dist/api/users.cjs +2 -0
- package/dist/api/users.cjs.map +1 -0
- package/dist/api/users.mjs +54 -0
- package/dist/api/users.mjs.map +1 -0
- package/dist/db.cjs +2 -0
- package/dist/db.cjs.map +1 -0
- package/dist/db.mjs +116 -0
- package/dist/db.mjs.map +1 -0
- package/dist/debug.cjs +2 -0
- package/dist/debug.cjs.map +1 -0
- package/dist/debug.mjs +18 -0
- package/dist/debug.mjs.map +1 -0
- package/dist/errors.cjs +2 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.mjs +15 -0
- package/dist/errors.mjs.map +1 -0
- package/dist/features/analytics/MixpanelProvider.cjs +2 -0
- package/dist/features/analytics/MixpanelProvider.cjs.map +1 -0
- package/dist/features/analytics/MixpanelProvider.mjs +40 -0
- package/dist/features/analytics/MixpanelProvider.mjs.map +1 -0
- package/dist/features/analytics/analytics.cjs +2 -0
- package/dist/features/analytics/analytics.cjs.map +1 -0
- package/dist/features/analytics/analytics.d.ts +520 -397
- package/dist/features/analytics/analytics.mjs +230 -0
- package/dist/features/analytics/analytics.mjs.map +1 -0
- package/dist/features/analytics/generateUserUUID.cjs +2 -0
- package/dist/features/analytics/generateUserUUID.cjs.map +1 -0
- package/dist/features/analytics/generateUserUUID.mjs +6 -0
- package/dist/features/analytics/generateUserUUID.mjs.map +1 -0
- package/dist/features/units/transformers.cjs +2 -0
- package/dist/features/units/transformers.cjs.map +1 -0
- package/dist/features/units/transformers.mjs +69 -0
- package/dist/features/units/transformers.mjs.map +1 -0
- package/dist/index.cjs +1 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +84 -14861
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/dexie@4.2.0/node_modules/dexie/dist/dexie.min.cjs +4 -0
- package/dist/node_modules/.pnpm/dexie@4.2.0/node_modules/dexie/dist/dexie.min.cjs.map +1 -0
- package/dist/node_modules/.pnpm/dexie@4.2.0/node_modules/dexie/dist/dexie.min.mjs +3048 -0
- package/dist/node_modules/.pnpm/dexie@4.2.0/node_modules/dexie/dist/dexie.min.mjs.map +1 -0
- package/dist/node_modules/.pnpm/dexie@4.2.0/node_modules/dexie/import-wrapper-prod.cjs +2 -0
- package/dist/node_modules/.pnpm/dexie@4.2.0/node_modules/dexie/import-wrapper-prod.cjs.map +1 -0
- package/dist/node_modules/.pnpm/dexie@4.2.0/node_modules/dexie/import-wrapper-prod.mjs +33 -0
- package/dist/node_modules/.pnpm/dexie@4.2.0/node_modules/dexie/import-wrapper-prod.mjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.cjs +2 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.cjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.mjs +88 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.mjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.cjs +2 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.cjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.mjs +10 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.mjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.cjs +2 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.cjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.mjs +8 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.mjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.cjs +2 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.cjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.mjs +98 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.mjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.cjs +2 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.cjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.mjs +95 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.mjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.cjs +2 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.cjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.mjs +62 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.mjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.cjs +2 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.cjs.map +1 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.mjs +2402 -0
- package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.mjs.map +1 -0
- package/dist/schema.cjs +2 -0
- package/dist/schema.cjs.map +1 -0
- package/dist/schema.d.ts +165 -0
- package/dist/schema.mjs +209 -0
- package/dist/schema.mjs.map +1 -0
- package/dist/storage.cjs +2 -0
- package/dist/storage.cjs.map +1 -0
- package/dist/storage.mjs +54 -0
- package/dist/storage.mjs.map +1 -0
- package/dist/stores/store.cjs +2 -0
- package/dist/stores/store.cjs.map +1 -0
- package/dist/stores/store.mjs +607 -0
- package/dist/stores/store.mjs.map +1 -0
- package/dist/units/favorites.cjs +2 -0
- package/dist/units/favorites.cjs.map +1 -0
- package/dist/units/favorites.mjs +19 -0
- package/dist/units/favorites.mjs.map +1 -0
- package/dist/utils/casing.cjs +2 -0
- package/dist/utils/casing.cjs.map +1 -0
- package/dist/utils/casing.d.ts +6 -0
- package/dist/utils/casing.mjs +12 -0
- package/dist/utils/casing.mjs.map +1 -0
- package/dist/utils/collections.cjs +2 -0
- package/dist/utils/collections.cjs.map +1 -0
- package/dist/utils/collections.d.ts +1 -0
- package/dist/utils/collections.mjs +13 -0
- package/dist/utils/collections.mjs.map +1 -0
- package/dist/utils/dimensions.cjs +2 -0
- package/dist/utils/dimensions.cjs.map +1 -0
- package/dist/utils/dimensions.d.ts +32 -0
- package/dist/utils/dimensions.mjs +29 -0
- package/dist/utils/dimensions.mjs.map +1 -0
- package/dist/validation.cjs +2 -0
- package/dist/validation.cjs.map +1 -0
- package/dist/validation.mjs +18 -0
- package/dist/validation.mjs.map +1 -0
- package/package.json +18 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"favorites.cjs","sources":["../../src/units/favorites.ts"],"sourcesContent":["// src/units/favorites.ts\nimport * as api from \"../api/favorites\";\n\nconst favorites = {\n async isFavorite(propertyId: string | number, unitId: string): Promise<boolean> {\n return api.isUnitFavorited(propertyId, unitId);\n },\n async toggle(propertyId: string | number, unitId: string): Promise<string[]> {\n return api.toggleFavoriteUnit(propertyId, unitId);\n },\n async set(propertyId: string | number, unitId: string, on: boolean): Promise<string[]> {\n return api.setFavoriteUnit(propertyId, unitId, on);\n },\n async getAll(propertyId: string | number): Promise<string[]> {\n return api.getFavoritedUnitsForProperty(propertyId);\n },\n};\n\nexport {favorites}\n"],"names":["favorites","propertyId","unitId","api.isUnitFavorited","api.toggleFavoriteUnit","on","api.setFavoriteUnit","api.getFavoritedUnitsForProperty"],"mappings":"wHAGMA,EAAY,CAChB,MAAM,WAAWC,EAA6BC,EAAkC,CAC9E,OAAOC,EAAAA,gBAAoBF,EAAYC,CAAM,CAC/C,EACA,MAAM,OAAOD,EAA6BC,EAAmC,CAC3E,OAAOE,EAAAA,mBAAuBH,EAAYC,CAAM,CAClD,EACA,MAAM,IAAID,EAA6BC,EAAgBG,EAAgC,CACrF,OAAOC,kBAAoBL,EAAYC,EAAQG,CAAE,CACnD,EACA,MAAM,OAAOJ,EAAgD,CAC3D,OAAOM,EAAAA,6BAAiCN,CAAU,CACpD,CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getFavoritedUnitsForProperty as o, setFavoriteUnit as i, toggleFavoriteUnit as n, isUnitFavorited as s } from "../api/favorites.mjs";
|
|
2
|
+
const g = {
|
|
3
|
+
async isFavorite(t, r) {
|
|
4
|
+
return s(t, r);
|
|
5
|
+
},
|
|
6
|
+
async toggle(t, r) {
|
|
7
|
+
return n(t, r);
|
|
8
|
+
},
|
|
9
|
+
async set(t, r, e) {
|
|
10
|
+
return i(t, r, e);
|
|
11
|
+
},
|
|
12
|
+
async getAll(t) {
|
|
13
|
+
return o(t);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
g as favorites
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=favorites.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"favorites.mjs","sources":["../../src/units/favorites.ts"],"sourcesContent":["// src/units/favorites.ts\nimport * as api from \"../api/favorites\";\n\nconst favorites = {\n async isFavorite(propertyId: string | number, unitId: string): Promise<boolean> {\n return api.isUnitFavorited(propertyId, unitId);\n },\n async toggle(propertyId: string | number, unitId: string): Promise<string[]> {\n return api.toggleFavoriteUnit(propertyId, unitId);\n },\n async set(propertyId: string | number, unitId: string, on: boolean): Promise<string[]> {\n return api.setFavoriteUnit(propertyId, unitId, on);\n },\n async getAll(propertyId: string | number): Promise<string[]> {\n return api.getFavoritedUnitsForProperty(propertyId);\n },\n};\n\nexport {favorites}\n"],"names":["favorites","propertyId","unitId","api.isUnitFavorited","api.toggleFavoriteUnit","on","api.setFavoriteUnit","api.getFavoritedUnitsForProperty"],"mappings":";AAGA,MAAMA,IAAY;AAAA,EAChB,MAAM,WAAWC,GAA6BC,GAAkC;AAC9E,WAAOC,EAAoBF,GAAYC,CAAM;AAAA,EAC/C;AAAA,EACA,MAAM,OAAOD,GAA6BC,GAAmC;AAC3E,WAAOE,EAAuBH,GAAYC,CAAM;AAAA,EAClD;AAAA,EACA,MAAM,IAAID,GAA6BC,GAAgBG,GAAgC;AACrF,WAAOC,EAAoBL,GAAYC,GAAQG,CAAE;AAAA,EACnD;AAAA,EACA,MAAM,OAAOJ,GAAgD;AAC3D,WAAOM,EAAiCN,CAAU;AAAA,EACpD;AACF;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase(),n=e=>e.replace(/[_-](\w)/g,(o,t)=>t.toUpperCase()),a=e=>e!=null&&Object.prototype.toString.call(e)==="[object Object]",r=(e,o)=>Array.isArray(e)?e.map(t=>r(t,o)):a(e)?Object.entries(e).reduce((t,[c,C])=>(t[o(c)]=r(C,o),t),{}):e,i=e=>r(e,s),l=e=>r(e,n);exports.convertKeysToCamelCase=l;exports.convertKeysToSnakeCase=i;exports.isPlainObject=a;exports.toCamelCase=n;exports.toSnakeCase=s;
|
|
2
|
+
//# sourceMappingURL=casing.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"casing.cjs","sources":["../../src/utils/casing.ts"],"sourcesContent":["const toSnakeCase = (input: string): string =>\n input\n .replace(/([a-z0-9])([A-Z])/g, \"$1_$2\")\n .replace(/([A-Z])([A-Z][a-z])/g, \"$1_$2\")\n .toLowerCase();\n\nconst toCamelCase = (input: string): string =>\n input.replace(/[_-](\\w)/g, (_, char: string) => char.toUpperCase());\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n value != null &&\n Object.prototype.toString.call(value) === \"[object Object]\";\n\nconst convertKeys = (\n value: unknown,\n keyMapper: (key: string) => string,\n): unknown => {\n if (Array.isArray(value)) {\n return value.map((item) => convertKeys(item, keyMapper));\n }\n\n if (isPlainObject(value)) {\n return Object.entries(value).reduce<Record<string, unknown>>(\n (acc, [key, val]) => {\n acc[keyMapper(key)] = convertKeys(val, keyMapper);\n return acc;\n },\n {},\n );\n }\n\n return value;\n};\n\nexport const convertKeysToSnakeCase = (value: unknown): unknown =>\n convertKeys(value, toSnakeCase);\n\nexport const convertKeysToCamelCase = (value: unknown): unknown =>\n convertKeys(value, toCamelCase);\n\nexport { toSnakeCase, toCamelCase, isPlainObject };\n\n"],"names":["toSnakeCase","input","toCamelCase","_","char","isPlainObject","value","convertKeys","keyMapper","item","acc","key","val","convertKeysToSnakeCase","convertKeysToCamelCase"],"mappings":"gFAAA,MAAMA,EAAeC,GACnBA,EACG,QAAQ,qBAAsB,OAAO,EACrC,QAAQ,uBAAwB,OAAO,EACvC,YAAA,EAECC,EAAeD,GACnBA,EAAM,QAAQ,YAAa,CAACE,EAAGC,IAAiBA,EAAK,YAAA,CAAa,EAE9DC,EAAiBC,GACrBA,GAAS,MACT,OAAO,UAAU,SAAS,KAAKA,CAAK,IAAM,kBAEtCC,EAAc,CAClBD,EACAE,IAEI,MAAM,QAAQF,CAAK,EACdA,EAAM,IAAKG,GAASF,EAAYE,EAAMD,CAAS,CAAC,EAGrDH,EAAcC,CAAK,EACd,OAAO,QAAQA,CAAK,EAAE,OAC3B,CAACI,EAAK,CAACC,EAAKC,CAAG,KACbF,EAAIF,EAAUG,CAAG,CAAC,EAAIJ,EAAYK,EAAKJ,CAAS,EACzCE,GAET,CAAA,CAAC,EAIEJ,EAGIO,EAA0BP,GACrCC,EAAYD,EAAON,CAAW,EAEnBc,EAA0BR,GACrCC,EAAYD,EAAOJ,CAAW"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const toSnakeCase: (input: string) => string;
|
|
2
|
+
declare const toCamelCase: (input: string) => string;
|
|
3
|
+
declare const isPlainObject: (value: unknown) => value is Record<string, unknown>;
|
|
4
|
+
export declare const convertKeysToSnakeCase: (value: unknown) => unknown;
|
|
5
|
+
export declare const convertKeysToCamelCase: (value: unknown) => unknown;
|
|
6
|
+
export { toSnakeCase, toCamelCase, isPlainObject };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const c = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/([A-Z])([A-Z][a-z])/g, "$1_$2").toLowerCase(), a = (e) => e.replace(/[_-](\w)/g, (r, t) => t.toUpperCase()), C = (e) => e != null && Object.prototype.toString.call(e) === "[object Object]", o = (e, r) => Array.isArray(e) ? e.map((t) => o(t, r)) : C(e) ? Object.entries(e).reduce(
|
|
2
|
+
(t, [n, s]) => (t[r(n)] = o(s, r), t),
|
|
3
|
+
{}
|
|
4
|
+
) : e, i = (e) => o(e, c), b = (e) => o(e, a);
|
|
5
|
+
export {
|
|
6
|
+
b as convertKeysToCamelCase,
|
|
7
|
+
i as convertKeysToSnakeCase,
|
|
8
|
+
C as isPlainObject,
|
|
9
|
+
a as toCamelCase,
|
|
10
|
+
c as toSnakeCase
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=casing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"casing.mjs","sources":["../../src/utils/casing.ts"],"sourcesContent":["const toSnakeCase = (input: string): string =>\n input\n .replace(/([a-z0-9])([A-Z])/g, \"$1_$2\")\n .replace(/([A-Z])([A-Z][a-z])/g, \"$1_$2\")\n .toLowerCase();\n\nconst toCamelCase = (input: string): string =>\n input.replace(/[_-](\\w)/g, (_, char: string) => char.toUpperCase());\n\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n value != null &&\n Object.prototype.toString.call(value) === \"[object Object]\";\n\nconst convertKeys = (\n value: unknown,\n keyMapper: (key: string) => string,\n): unknown => {\n if (Array.isArray(value)) {\n return value.map((item) => convertKeys(item, keyMapper));\n }\n\n if (isPlainObject(value)) {\n return Object.entries(value).reduce<Record<string, unknown>>(\n (acc, [key, val]) => {\n acc[keyMapper(key)] = convertKeys(val, keyMapper);\n return acc;\n },\n {},\n );\n }\n\n return value;\n};\n\nexport const convertKeysToSnakeCase = (value: unknown): unknown =>\n convertKeys(value, toSnakeCase);\n\nexport const convertKeysToCamelCase = (value: unknown): unknown =>\n convertKeys(value, toCamelCase);\n\nexport { toSnakeCase, toCamelCase, isPlainObject };\n\n"],"names":["toSnakeCase","input","toCamelCase","_","char","isPlainObject","value","convertKeys","keyMapper","item","acc","key","val","convertKeysToSnakeCase","convertKeysToCamelCase"],"mappings":"AAAA,MAAMA,IAAc,CAACC,MACnBA,EACG,QAAQ,sBAAsB,OAAO,EACrC,QAAQ,wBAAwB,OAAO,EACvC,YAAA,GAECC,IAAc,CAACD,MACnBA,EAAM,QAAQ,aAAa,CAACE,GAAGC,MAAiBA,EAAK,YAAA,CAAa,GAE9DC,IAAgB,CAACC,MACrBA,KAAS,QACT,OAAO,UAAU,SAAS,KAAKA,CAAK,MAAM,mBAEtCC,IAAc,CAClBD,GACAE,MAEI,MAAM,QAAQF,CAAK,IACdA,EAAM,IAAI,CAACG,MAASF,EAAYE,GAAMD,CAAS,CAAC,IAGrDH,EAAcC,CAAK,IACd,OAAO,QAAQA,CAAK,EAAE;AAAA,EAC3B,CAACI,GAAK,CAACC,GAAKC,CAAG,OACbF,EAAIF,EAAUG,CAAG,CAAC,IAAIJ,EAAYK,GAAKJ,CAAS,GACzCE;AAAA,EAET,CAAA;AAAC,IAIEJ,GAGIO,IAAyB,CAACP,MACrCC,EAAYD,GAAON,CAAW,GAEnBc,IAAyB,CAACR,MACrCC,EAAYD,GAAOJ,CAAW;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=t=>t==null?[]:(Array.isArray(t)?t:[t]).flatMap(r=>{if(r==null)return[];if(Array.isArray(r))return r;if(typeof r=="object"&&r!==null&&"value"in r){const n=r.value;return Array.isArray(n)?n:[n]}return[r]}).filter(r=>r!=null).map(r=>String(r));exports.normalizeToStringArray=i;
|
|
2
|
+
//# sourceMappingURL=collections.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.cjs","sources":["../../src/utils/collections.ts"],"sourcesContent":["export const normalizeToStringArray = (input: unknown): string[] => {\n if (input == null) return [];\n const toArray = Array.isArray(input) ? input : [input];\n return toArray\n .flatMap((value) => {\n if (value == null) return [];\n if (Array.isArray(value)) return value;\n if (typeof value === \"object\" && value !== null && \"value\" in value) {\n const candidate = (value as { value: unknown }).value;\n return Array.isArray(candidate) ? candidate : [candidate];\n }\n return [value];\n })\n .filter((value) => value != null)\n .map((value) => String(value));\n};\n\n"],"names":["normalizeToStringArray","input","value","candidate"],"mappings":"gFAAO,MAAMA,EAA0BC,GACjCA,GAAS,KAAa,CAAA,GACV,MAAM,QAAQA,CAAK,EAAIA,EAAQ,CAACA,CAAK,GAElD,QAASC,GAAU,CAClB,GAAIA,GAAS,KAAM,MAAO,CAAA,EAC1B,GAAI,MAAM,QAAQA,CAAK,EAAG,OAAOA,EACjC,GAAI,OAAOA,GAAU,UAAYA,IAAU,MAAQ,UAAWA,EAAO,CACnE,MAAMC,EAAaD,EAA6B,MAChD,OAAO,MAAM,QAAQC,CAAS,EAAIA,EAAY,CAACA,CAAS,CAC1D,CACA,MAAO,CAACD,CAAK,CACf,CAAC,EACA,OAAQA,GAAUA,GAAS,IAAI,EAC/B,IAAKA,GAAU,OAAOA,CAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const normalizeToStringArray: (input: unknown) => string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const i = (t) => t == null ? [] : (Array.isArray(t) ? t : [t]).flatMap((r) => {
|
|
2
|
+
if (r == null) return [];
|
|
3
|
+
if (Array.isArray(r)) return r;
|
|
4
|
+
if (typeof r == "object" && r !== null && "value" in r) {
|
|
5
|
+
const n = r.value;
|
|
6
|
+
return Array.isArray(n) ? n : [n];
|
|
7
|
+
}
|
|
8
|
+
return [r];
|
|
9
|
+
}).filter((r) => r != null).map((r) => String(r));
|
|
10
|
+
export {
|
|
11
|
+
i as normalizeToStringArray
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=collections.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.mjs","sources":["../../src/utils/collections.ts"],"sourcesContent":["export const normalizeToStringArray = (input: unknown): string[] => {\n if (input == null) return [];\n const toArray = Array.isArray(input) ? input : [input];\n return toArray\n .flatMap((value) => {\n if (value == null) return [];\n if (Array.isArray(value)) return value;\n if (typeof value === \"object\" && value !== null && \"value\" in value) {\n const candidate = (value as { value: unknown }).value;\n return Array.isArray(candidate) ? candidate : [candidate];\n }\n return [value];\n })\n .filter((value) => value != null)\n .map((value) => String(value));\n};\n\n"],"names":["normalizeToStringArray","input","value","candidate"],"mappings":"AAAO,MAAMA,IAAyB,CAACC,MACjCA,KAAS,OAAa,CAAA,KACV,MAAM,QAAQA,CAAK,IAAIA,IAAQ,CAACA,CAAK,GAElD,QAAQ,CAACC,MAAU;AAClB,MAAIA,KAAS,KAAM,QAAO,CAAA;AAC1B,MAAI,MAAM,QAAQA,CAAK,EAAG,QAAOA;AACjC,MAAI,OAAOA,KAAU,YAAYA,MAAU,QAAQ,WAAWA,GAAO;AACnE,UAAMC,IAAaD,EAA6B;AAChD,WAAO,MAAM,QAAQC,CAAS,IAAIA,IAAY,CAACA,CAAS;AAAA,EAC1D;AACA,SAAO,CAACD,CAAK;AACf,CAAC,EACA,OAAO,CAACA,MAAUA,KAAS,IAAI,EAC/B,IAAI,CAACA,MAAU,OAAOA,CAAK,CAAC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=25.4,s=12;function u(o,t){const e=o/f;if(Number.isFinite(t)){const r=Math.max(0,t),c=Math.pow(10,r);return Math.round(e*c)/c}return e}function m(o,t={}){const{roundInches:e=!0,precision:r}=t,c=u(o);let i=Math.floor(c/s),n=c-i*s;if(e)n=Math.round(n);else if(Number.isFinite(r)){const a=Math.max(0,r),h=Math.pow(10,a);n=Math.round(n*h)/h}return n>=s&&(i+=1,n-=s),{feet:i,inches:n}}function M(o){const{feet:t,inches:e}=o;return t===0?`${e}"`:e===0?`${t}'`:`${t}' ${e}"`}exports.formatFeetInches=M;exports.mmToFeetInches=m;exports.mmToInches=u;
|
|
2
|
+
//# sourceMappingURL=dimensions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimensions.cjs","sources":["../../src/utils/dimensions.ts"],"sourcesContent":["/**\n * Units + formatting helpers for converting millimeters to US customary units.\n */\n\nconst MM_PER_INCH = 25.4;\nconst INCHES_PER_FOOT = 12;\n\n/**\n * Convert millimeters to inches.\n * @param mm - Value in millimeters\n * @param precision - Optional decimal places to round to (no rounding if undefined)\n */\nexport function mmToInches(mm: number, precision?: number): number {\n const inches = mm / MM_PER_INCH;\n if (Number.isFinite(precision)) {\n const p = Math.max(0, precision as number);\n const factor = Math.pow(10, p);\n return Math.round(inches * factor) / factor;\n }\n return inches;\n}\n\nexport interface FeetInches {\n feet: number;\n inches: number; // remainder inches (0..11 when rounding to whole inches)\n}\n\n/**\n * Convert millimeters to feet and inches.\n *\n * By default, inches are rounded to the nearest whole inch. If the rounded\n * inches value equals 12, it carries over to the feet value.\n *\n * @param mm - Value in millimeters\n * @param options.roundInches - Round inches to a whole number (default: true)\n * @param options.precision - If provided and roundInches is false, round inches to N decimals\n */\nexport function mmToFeetInches(\n mm: number,\n options: { roundInches?: boolean; precision?: number } = {},\n): FeetInches {\n const { roundInches = true, precision } = options;\n const totalInches = mmToInches(mm);\n let feet = Math.floor(totalInches / INCHES_PER_FOOT);\n let inches = totalInches - feet * INCHES_PER_FOOT;\n\n if (roundInches) {\n inches = Math.round(inches);\n } else if (Number.isFinite(precision)) {\n const p = Math.max(0, precision as number);\n const factor = Math.pow(10, p);\n inches = Math.round(inches * factor) / factor;\n }\n\n // Carry over if inches rounds to 12\n if (inches >= INCHES_PER_FOOT) {\n feet += 1;\n inches -= INCHES_PER_FOOT;\n }\n\n return { feet, inches };\n}\n\n/**\n * Format a feet/inches object as a human-readable string.\n * Examples: 5' 8\", 12\" (when feet is 0)\n */\nexport function formatFeetInches(value: FeetInches): string {\n const { feet, inches } = value;\n if (feet === 0) return `${inches}\\\"`;\n if (inches === 0) return `${feet}'`;\n return `${feet}' ${inches}\\\"`;\n}\n\n"],"names":["MM_PER_INCH","INCHES_PER_FOOT","mmToInches","mm","precision","inches","p","factor","mmToFeetInches","options","roundInches","totalInches","feet","formatFeetInches","value"],"mappings":"gFAIA,MAAMA,EAAc,KACdC,EAAkB,GAOjB,SAASC,EAAWC,EAAYC,EAA4B,CACjE,MAAMC,EAASF,EAAKH,EACpB,GAAI,OAAO,SAASI,CAAS,EAAG,CAC9B,MAAME,EAAI,KAAK,IAAI,EAAGF,CAAmB,EACnCG,EAAS,KAAK,IAAI,GAAID,CAAC,EAC7B,OAAO,KAAK,MAAMD,EAASE,CAAM,EAAIA,CACvC,CACA,OAAOF,CACT,CAiBO,SAASG,EACdL,EACAM,EAAyD,GAC7C,CACZ,KAAM,CAAE,YAAAC,EAAc,GAAM,UAAAN,CAAA,EAAcK,EACpCE,EAAcT,EAAWC,CAAE,EACjC,IAAIS,EAAO,KAAK,MAAMD,EAAcV,CAAe,EAC/CI,EAASM,EAAcC,EAAOX,EAElC,GAAIS,EACFL,EAAS,KAAK,MAAMA,CAAM,UACjB,OAAO,SAASD,CAAS,EAAG,CACrC,MAAME,EAAI,KAAK,IAAI,EAAGF,CAAmB,EACnCG,EAAS,KAAK,IAAI,GAAID,CAAC,EAC7BD,EAAS,KAAK,MAAMA,EAASE,CAAM,EAAIA,CACzC,CAGA,OAAIF,GAAUJ,IACZW,GAAQ,EACRP,GAAUJ,GAGL,CAAE,KAAAW,EAAM,OAAAP,CAAA,CACjB,CAMO,SAASQ,EAAiBC,EAA2B,CAC1D,KAAM,CAAE,KAAAF,EAAM,OAAAP,CAAA,EAAWS,EACzB,OAAIF,IAAS,EAAU,GAAGP,CAAM,IAC5BA,IAAW,EAAU,GAAGO,CAAI,IACzB,GAAGA,CAAI,KAAKP,CAAM,GAC3B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Units + formatting helpers for converting millimeters to US customary units.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert millimeters to inches.
|
|
6
|
+
* @param mm - Value in millimeters
|
|
7
|
+
* @param precision - Optional decimal places to round to (no rounding if undefined)
|
|
8
|
+
*/
|
|
9
|
+
export declare function mmToInches(mm: number, precision?: number): number;
|
|
10
|
+
export interface FeetInches {
|
|
11
|
+
feet: number;
|
|
12
|
+
inches: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Convert millimeters to feet and inches.
|
|
16
|
+
*
|
|
17
|
+
* By default, inches are rounded to the nearest whole inch. If the rounded
|
|
18
|
+
* inches value equals 12, it carries over to the feet value.
|
|
19
|
+
*
|
|
20
|
+
* @param mm - Value in millimeters
|
|
21
|
+
* @param options.roundInches - Round inches to a whole number (default: true)
|
|
22
|
+
* @param options.precision - If provided and roundInches is false, round inches to N decimals
|
|
23
|
+
*/
|
|
24
|
+
export declare function mmToFeetInches(mm: number, options?: {
|
|
25
|
+
roundInches?: boolean;
|
|
26
|
+
precision?: number;
|
|
27
|
+
}): FeetInches;
|
|
28
|
+
/**
|
|
29
|
+
* Format a feet/inches object as a human-readable string.
|
|
30
|
+
* Examples: 5' 8", 12" (when feet is 0)
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatFeetInches(value: FeetInches): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function u(o, t) {
|
|
2
|
+
const n = o / 25.4;
|
|
3
|
+
if (Number.isFinite(t)) {
|
|
4
|
+
const c = Math.max(0, t), r = Math.pow(10, c);
|
|
5
|
+
return Math.round(n * r) / r;
|
|
6
|
+
}
|
|
7
|
+
return n;
|
|
8
|
+
}
|
|
9
|
+
function f(o, t = {}) {
|
|
10
|
+
const { roundInches: n = !0, precision: c } = t, r = u(o);
|
|
11
|
+
let s = Math.floor(r / 12), e = r - s * 12;
|
|
12
|
+
if (n)
|
|
13
|
+
e = Math.round(e);
|
|
14
|
+
else if (Number.isFinite(c)) {
|
|
15
|
+
const h = Math.max(0, c), i = Math.pow(10, h);
|
|
16
|
+
e = Math.round(e * i) / i;
|
|
17
|
+
}
|
|
18
|
+
return e >= 12 && (s += 1, e -= 12), { feet: s, inches: e };
|
|
19
|
+
}
|
|
20
|
+
function a(o) {
|
|
21
|
+
const { feet: t, inches: n } = o;
|
|
22
|
+
return t === 0 ? `${n}"` : n === 0 ? `${t}'` : `${t}' ${n}"`;
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
a as formatFeetInches,
|
|
26
|
+
f as mmToFeetInches,
|
|
27
|
+
u as mmToInches
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=dimensions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dimensions.mjs","sources":["../../src/utils/dimensions.ts"],"sourcesContent":["/**\n * Units + formatting helpers for converting millimeters to US customary units.\n */\n\nconst MM_PER_INCH = 25.4;\nconst INCHES_PER_FOOT = 12;\n\n/**\n * Convert millimeters to inches.\n * @param mm - Value in millimeters\n * @param precision - Optional decimal places to round to (no rounding if undefined)\n */\nexport function mmToInches(mm: number, precision?: number): number {\n const inches = mm / MM_PER_INCH;\n if (Number.isFinite(precision)) {\n const p = Math.max(0, precision as number);\n const factor = Math.pow(10, p);\n return Math.round(inches * factor) / factor;\n }\n return inches;\n}\n\nexport interface FeetInches {\n feet: number;\n inches: number; // remainder inches (0..11 when rounding to whole inches)\n}\n\n/**\n * Convert millimeters to feet and inches.\n *\n * By default, inches are rounded to the nearest whole inch. If the rounded\n * inches value equals 12, it carries over to the feet value.\n *\n * @param mm - Value in millimeters\n * @param options.roundInches - Round inches to a whole number (default: true)\n * @param options.precision - If provided and roundInches is false, round inches to N decimals\n */\nexport function mmToFeetInches(\n mm: number,\n options: { roundInches?: boolean; precision?: number } = {},\n): FeetInches {\n const { roundInches = true, precision } = options;\n const totalInches = mmToInches(mm);\n let feet = Math.floor(totalInches / INCHES_PER_FOOT);\n let inches = totalInches - feet * INCHES_PER_FOOT;\n\n if (roundInches) {\n inches = Math.round(inches);\n } else if (Number.isFinite(precision)) {\n const p = Math.max(0, precision as number);\n const factor = Math.pow(10, p);\n inches = Math.round(inches * factor) / factor;\n }\n\n // Carry over if inches rounds to 12\n if (inches >= INCHES_PER_FOOT) {\n feet += 1;\n inches -= INCHES_PER_FOOT;\n }\n\n return { feet, inches };\n}\n\n/**\n * Format a feet/inches object as a human-readable string.\n * Examples: 5' 8\", 12\" (when feet is 0)\n */\nexport function formatFeetInches(value: FeetInches): string {\n const { feet, inches } = value;\n if (feet === 0) return `${inches}\\\"`;\n if (inches === 0) return `${feet}'`;\n return `${feet}' ${inches}\\\"`;\n}\n\n"],"names":["mmToInches","mm","precision","inches","p","factor","mmToFeetInches","options","roundInches","totalInches","feet","formatFeetInches","value"],"mappings":"AAYO,SAASA,EAAWC,GAAYC,GAA4B;AACjE,QAAMC,IAASF,IAAK;AACpB,MAAI,OAAO,SAASC,CAAS,GAAG;AAC9B,UAAME,IAAI,KAAK,IAAI,GAAGF,CAAmB,GACnCG,IAAS,KAAK,IAAI,IAAID,CAAC;AAC7B,WAAO,KAAK,MAAMD,IAASE,CAAM,IAAIA;AAAA,EACvC;AACA,SAAOF;AACT;AAiBO,SAASG,EACdL,GACAM,IAAyD,IAC7C;AACZ,QAAM,EAAE,aAAAC,IAAc,IAAM,WAAAN,EAAA,IAAcK,GACpCE,IAAcT,EAAWC,CAAE;AACjC,MAAIS,IAAO,KAAK,MAAMD,IAAc,EAAe,GAC/CN,IAASM,IAAcC,IAAO;AAElC,MAAIF;AACF,IAAAL,IAAS,KAAK,MAAMA,CAAM;AAAA,WACjB,OAAO,SAASD,CAAS,GAAG;AACrC,UAAME,IAAI,KAAK,IAAI,GAAGF,CAAmB,GACnCG,IAAS,KAAK,IAAI,IAAID,CAAC;AAC7B,IAAAD,IAAS,KAAK,MAAMA,IAASE,CAAM,IAAIA;AAAA,EACzC;AAGA,SAAIF,KAAU,OACZO,KAAQ,GACRP,KAAU,KAGL,EAAE,MAAAO,GAAM,QAAAP,EAAA;AACjB;AAMO,SAASQ,EAAiBC,GAA2B;AAC1D,QAAM,EAAE,MAAAF,GAAM,QAAAP,EAAA,IAAWS;AACzB,SAAIF,MAAS,IAAU,GAAGP,CAAM,MAC5BA,MAAW,IAAU,GAAGO,CAAI,MACzB,GAAGA,CAAI,KAAKP,CAAM;AAC3B;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./errors.cjs");let n="strict",r;function c(e){e.mode&&(n=e.mode),r=e.onIssue}function l(e,o,t){const i=e.safeParse(o);if(i.success)return i.data;const a=i.error.flatten();if(r==null||r(t,a),n==="strict")throw new s.SchemaMismatchError(`ORM schema mismatch in ${t}`,a);return n==="warn"&&console.warn(`ORM schema mismatch in ${t}`,a),null}exports.configureValidation=c;exports.validate=l;
|
|
2
|
+
//# sourceMappingURL=validation.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.cjs","sources":["../src/validation.ts"],"sourcesContent":["// src/validation.ts\nimport type { z } from \"zod\";\nimport { SchemaMismatchError } from \"./errors\";\n\nexport type ValidationMode = \"strict\" | \"warn\" | \"silent\";\nlet mode: ValidationMode = \"strict\";\nlet onIssue: ((ctx: string, details: unknown) => void) | undefined;\n\nexport function configureValidation(opts: {\n mode?: ValidationMode;\n onIssue?: (ctx: string, details: unknown) => void;\n}) {\n if (opts.mode) mode = opts.mode;\n onIssue = opts.onIssue;\n}\n\nexport function validate<T>(\n schema: z.ZodType<T>,\n value: unknown,\n ctx: string,\n): T | null {\n const res = schema.safeParse(value);\n if (res.success) return res.data;\n\n const details = res.error.flatten();\n onIssue?.(ctx, details);\n\n if (mode === \"strict\")\n throw new SchemaMismatchError(`ORM schema mismatch in ${ctx}`, details);\n if (mode === \"warn\") console.warn(`ORM schema mismatch in ${ctx}`, details); // eslint-disable-line no-console\n return null; // silent/warn → let caller decide how to proceed\n}\n"],"names":["mode","onIssue","configureValidation","opts","validate","schema","value","ctx","res","details","SchemaMismatchError"],"mappings":"gHAKA,IAAIA,EAAuB,SACvBC,EAEG,SAASC,EAAoBC,EAGjC,CACGA,EAAK,OAAMH,EAAOG,EAAK,MAC3BF,EAAUE,EAAK,OACjB,CAEO,SAASC,EACdC,EACAC,EACAC,EACU,CACV,MAAMC,EAAMH,EAAO,UAAUC,CAAK,EAClC,GAAIE,EAAI,QAAS,OAAOA,EAAI,KAE5B,MAAMC,EAAUD,EAAI,MAAM,QAAA,EAG1B,GAFAP,GAAA,MAAAA,EAAUM,EAAKE,GAEXT,IAAS,SACX,MAAM,IAAIU,EAAAA,oBAAoB,0BAA0BH,CAAG,GAAIE,CAAO,EACxE,OAAIT,IAAS,QAAQ,QAAQ,KAAK,0BAA0BO,CAAG,GAAIE,CAAO,EACnE,IACT"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SchemaMismatchError as s } from "./errors.mjs";
|
|
2
|
+
let n = "strict", r;
|
|
3
|
+
function m(e) {
|
|
4
|
+
e.mode && (n = e.mode), r = e.onIssue;
|
|
5
|
+
}
|
|
6
|
+
function f(e, o, t) {
|
|
7
|
+
const i = e.safeParse(o);
|
|
8
|
+
if (i.success) return i.data;
|
|
9
|
+
const a = i.error.flatten();
|
|
10
|
+
if (r == null || r(t, a), n === "strict")
|
|
11
|
+
throw new s(`ORM schema mismatch in ${t}`, a);
|
|
12
|
+
return n === "warn" && console.warn(`ORM schema mismatch in ${t}`, a), null;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
m as configureValidation,
|
|
16
|
+
f as validate
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=validation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.mjs","sources":["../src/validation.ts"],"sourcesContent":["// src/validation.ts\nimport type { z } from \"zod\";\nimport { SchemaMismatchError } from \"./errors\";\n\nexport type ValidationMode = \"strict\" | \"warn\" | \"silent\";\nlet mode: ValidationMode = \"strict\";\nlet onIssue: ((ctx: string, details: unknown) => void) | undefined;\n\nexport function configureValidation(opts: {\n mode?: ValidationMode;\n onIssue?: (ctx: string, details: unknown) => void;\n}) {\n if (opts.mode) mode = opts.mode;\n onIssue = opts.onIssue;\n}\n\nexport function validate<T>(\n schema: z.ZodType<T>,\n value: unknown,\n ctx: string,\n): T | null {\n const res = schema.safeParse(value);\n if (res.success) return res.data;\n\n const details = res.error.flatten();\n onIssue?.(ctx, details);\n\n if (mode === \"strict\")\n throw new SchemaMismatchError(`ORM schema mismatch in ${ctx}`, details);\n if (mode === \"warn\") console.warn(`ORM schema mismatch in ${ctx}`, details); // eslint-disable-line no-console\n return null; // silent/warn → let caller decide how to proceed\n}\n"],"names":["mode","onIssue","configureValidation","opts","validate","schema","value","ctx","res","details","SchemaMismatchError"],"mappings":";AAKA,IAAIA,IAAuB,UACvBC;AAEG,SAASC,EAAoBC,GAGjC;AACD,EAAIA,EAAK,SAAMH,IAAOG,EAAK,OAC3BF,IAAUE,EAAK;AACjB;AAEO,SAASC,EACdC,GACAC,GACAC,GACU;AACV,QAAMC,IAAMH,EAAO,UAAUC,CAAK;AAClC,MAAIE,EAAI,QAAS,QAAOA,EAAI;AAE5B,QAAMC,IAAUD,EAAI,MAAM,QAAA;AAG1B,MAFAP,KAAA,QAAAA,EAAUM,GAAKE,IAEXT,MAAS;AACX,UAAM,IAAIU,EAAoB,0BAA0BH,CAAG,IAAIE,CAAO;AACxE,SAAIT,MAAS,UAAQ,QAAQ,KAAK,0BAA0BO,CAAG,IAAIE,CAAO,GACnE;AACT;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superbright/indexeddb-orm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Vite + TypeScript starter for an IndexedDB ORM (Dexie + Zod) with playground.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
13
|
"import": "./dist/index.mjs",
|
|
14
14
|
"require": "./dist/index.cjs"
|
|
15
|
+
},
|
|
16
|
+
"./utils/dimensions": {
|
|
17
|
+
"types": "./dist/utils/dimensions.d.ts",
|
|
18
|
+
"import": "./dist/utils/dimensions.mjs",
|
|
19
|
+
"require": "./dist/utils/dimensions.cjs"
|
|
15
20
|
}
|
|
16
21
|
},
|
|
17
22
|
"sideEffects": false,
|
|
@@ -20,7 +25,6 @@
|
|
|
20
25
|
],
|
|
21
26
|
"dependencies": {
|
|
22
27
|
"dexie": "^4.0.8",
|
|
23
|
-
"mixpanel-browser": "^2.67.0",
|
|
24
28
|
"zod": "^3.23.8"
|
|
25
29
|
},
|
|
26
30
|
"devDependencies": {
|
|
@@ -29,6 +33,7 @@
|
|
|
29
33
|
"concurrently": "^9.0.0",
|
|
30
34
|
"docusaurus-plugin-typedoc": "^1.4.2",
|
|
31
35
|
"fake-indexeddb": "^5.0.2",
|
|
36
|
+
"mixpanel-browser": "^2.67.0",
|
|
32
37
|
"prettier": "^3.6.2",
|
|
33
38
|
"prettier-plugin-packagejson": "^2.5.19",
|
|
34
39
|
"react": "^18.3.1",
|
|
@@ -37,11 +42,18 @@
|
|
|
37
42
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
38
43
|
"typescript": "^5.4.5",
|
|
39
44
|
"vite": "^5.4.0",
|
|
45
|
+
"vite-bundle-analyzer": "^1.2.3",
|
|
40
46
|
"vitest": "^2.0.5",
|
|
41
47
|
"zustand": "^5.0.8"
|
|
42
48
|
},
|
|
43
49
|
"peerDependencies": {
|
|
44
|
-
"react": "^18.0.0"
|
|
50
|
+
"react": "^18.0.0",
|
|
51
|
+
"mixpanel-browser": "^2.67.0"
|
|
52
|
+
},
|
|
53
|
+
"peerDependenciesMeta": {
|
|
54
|
+
"mixpanel-browser": {
|
|
55
|
+
"optional": true
|
|
56
|
+
}
|
|
45
57
|
},
|
|
46
58
|
"scripts": {
|
|
47
59
|
"clean": "rimraf dist",
|
|
@@ -55,6 +67,8 @@
|
|
|
55
67
|
"test:watch": "vitest",
|
|
56
68
|
"format": "pnpm format:write",
|
|
57
69
|
"format:write": "prettier --write .",
|
|
58
|
-
"format:check": "prettier --check ."
|
|
70
|
+
"format:check": "prettier --check .",
|
|
71
|
+
"docs:api": "typedoc --plugin typedoc-plugin-markdown --entryPoints src/docs/property.ts src/docs/unit.ts src/docs/filters.ts --tsconfig tsconfig.json --out autodocs/docs/api/schema --readme none",
|
|
72
|
+
"analyze": "pnpm clean && ANALYZE=1 vite build && tsc -p tsconfig.build.json"
|
|
59
73
|
}
|
|
60
74
|
}
|