@wodira/browser 0.1.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/README.md +140 -0
- package/dist/index.cjs +174 -0
- package/dist/index.d.ts +118 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +133 -0
- package/dist/types.d.ts +263 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/ui/components.d.ts +376 -0
- package/dist/ui/components.d.ts.map +1 -0
- package/dist/ui/events.d.ts +4 -0
- package/dist/ui/events.d.ts.map +1 -0
- package/dist/ui/i18n.d.ts +3 -0
- package/dist/ui/i18n.d.ts.map +1 -0
- package/dist/ui/index.d.ts +28 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +3309 -0
- package/dist/ui/styles.d.ts +2 -0
- package/dist/ui/styles.d.ts.map +1 -0
- package/dist/ui/validators.d.ts +21 -0
- package/dist/ui/validators.d.ts.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,yBAsL1B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { WodiraFieldType } from '../types';
|
|
2
|
+
export type WodiraUiValidationResult = {
|
|
3
|
+
valid: true;
|
|
4
|
+
} | {
|
|
5
|
+
valid: false;
|
|
6
|
+
reason: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function isBlank(value: unknown): boolean;
|
|
9
|
+
export declare function isEmail(value: string): boolean;
|
|
10
|
+
export declare function isHttpUrl(value: string): boolean;
|
|
11
|
+
export declare function validateRequiredText(value: unknown): WodiraUiValidationResult;
|
|
12
|
+
export declare function validateEmail(value: string, required: boolean): WodiraUiValidationResult;
|
|
13
|
+
export declare function validateHttpUrl(value: string, required: boolean): WodiraUiValidationResult;
|
|
14
|
+
export declare function validateDate(value: string, required: boolean): WodiraUiValidationResult;
|
|
15
|
+
export declare function validateNumber(value: unknown, required: boolean): WodiraUiValidationResult;
|
|
16
|
+
export declare function validateSelect(value: unknown, options: readonly string[], required: boolean): WodiraUiValidationResult;
|
|
17
|
+
export declare function validateCheckbox(value: unknown, required: boolean): WodiraUiValidationResult;
|
|
18
|
+
export declare function validateGender(value: string): WodiraUiValidationResult;
|
|
19
|
+
export declare function validateCustomFieldValue(value: unknown, type: WodiraFieldType, options: readonly string[], required: boolean): WodiraUiValidationResult;
|
|
20
|
+
export declare function normalizeLimit(value: number, fallback: number, max: number): number;
|
|
21
|
+
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/ui/validators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,UAAU,CAAC;AAE9D,MAAM,MAAM,wBAAwB,GAAG;IAAE,KAAK,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAI1F,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAO/C;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE9C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOhD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,wBAAwB,CAE7E;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,wBAAwB,CAGxF;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,wBAAwB,CAG1F;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,wBAAwB,CAIvF;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,wBAAwB,CAI1F;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,QAAQ,EAAE,OAAO,GAChB,wBAAwB,CAI1B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,wBAAwB,CAE5F;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAEtE;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,QAAQ,EAAE,OAAO,GAChB,wBAAwB,CAO1B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wodira/browser",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Browser SDK for WODira publishable keys and external Stripe Checkout registration sessions.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"browser",
|
|
7
|
+
"publishable-key",
|
|
8
|
+
"sdk",
|
|
9
|
+
"stripe-checkout",
|
|
10
|
+
"wodira"
|
|
11
|
+
],
|
|
12
|
+
"license": "UNLICENSED",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"require": "./dist/index.cjs",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./package.json": "./package.json",
|
|
30
|
+
"./ui": {
|
|
31
|
+
"types": "./dist/ui/index.d.ts",
|
|
32
|
+
"import": "./dist/ui/index.js",
|
|
33
|
+
"default": "./dist/ui/index.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "bun run clean && bun build ./src/index.ts --target=browser --format=esm --outfile=dist/index.js && bun build ./src/index.ts --target=node --format=cjs --outfile=dist/index.cjs && bun build ./src/ui/index.ts --target=browser --format=esm --outfile=dist/ui/index.js && tsc -p tsconfig.build.json",
|
|
41
|
+
"clean": "rm -rf dist",
|
|
42
|
+
"type-check": "tsc --noEmit -p tsconfig.json",
|
|
43
|
+
"test": "bun test"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"lit": "3.3.3"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/bun": "1.3.14",
|
|
50
|
+
"happy-dom": "20.9.0",
|
|
51
|
+
"typescript": "6.0.3"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"bun": ">=1.3.1",
|
|
55
|
+
"node": ">=20"
|
|
56
|
+
}
|
|
57
|
+
}
|