@instructure/platform-cohorts 0.1.0 → 0.2.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/i18n.d.ts +4 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/package.json +15 -15
package/dist/i18n.d.ts
CHANGED
|
@@ -5,7 +5,10 @@ export type CohortsTranslationKey = keyof typeof en;
|
|
|
5
5
|
export type PluralForms = Partial<Record<Intl.LDMLPluralRule, string>>;
|
|
6
6
|
/** A host supplies as few or as many keys as it likes; the rest fall back to English. */
|
|
7
7
|
export type CohortsTranslations = Partial<Record<CohortsTranslationKey, PluralForms | string>>;
|
|
8
|
-
export type
|
|
8
|
+
export type TranslateOptions = {
|
|
9
|
+
count?: number;
|
|
10
|
+
} & Record<string, string | number>;
|
|
11
|
+
export type TranslateFunction = (key: CohortsTranslationKey, options?: TranslateOptions) => string;
|
|
9
12
|
export declare const DEFAULT_LOCALE = "en-US";
|
|
10
13
|
export declare function createTranslate(translations?: CohortsTranslations, locale?: string): TranslateFunction;
|
|
11
14
|
export declare const defaultTranslate: TranslateFunction;
|
package/dist/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAA;AAC1E,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAEnC,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,EAAE,CAAA;AAEnD,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAA;AAEtE,yFAAyF;AACzF,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC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AE,MAAM,CAAA;IACjB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,GACT,EAAE,wBAAwB,GAAG,SAAS,CAMtC;AAED,wBAAgB,cAAc,IAAI,WAAW,CAE5C"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { CohortsHelloWorld } from './components/CohortsHelloWorld';
|
|
2
|
-
export { type CohortsI18n, CohortsI18nProvider, type CohortsI18nProviderProps, type CohortsTranslationKey, type CohortsTranslations,
|
|
2
|
+
export { type CohortsI18n, CohortsI18nProvider, type CohortsI18nProviderProps, type CohortsTranslationKey, type CohortsTranslations, type PluralForms, type TranslateFunction, type TranslateOptions, useCohortsI18n, } from './i18n';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EACL,KAAK,WAAW,EAChB,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EACL,KAAK,WAAW,EAChB,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,cAAc,GACf,MAAM,QAAQ,CAAA"}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/platform-cohorts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -16,25 +16,15 @@
|
|
|
16
16
|
"dist",
|
|
17
17
|
"locales"
|
|
18
18
|
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "vite build",
|
|
21
|
-
"dev": "vite build --watch",
|
|
22
|
-
"pack:tarball": "pnpm build && pnpm pack",
|
|
23
|
-
"test": "vitest run --coverage",
|
|
24
|
-
"test:watch": "vitest",
|
|
25
|
-
"type-check": "tsgo -p tsconfig.check.json"
|
|
26
|
-
},
|
|
27
19
|
"peerDependencies": {
|
|
28
|
-
"@instructure/platform-provider": "workspace:*",
|
|
29
20
|
"@instructure/ui-text": "^11.0.0",
|
|
30
21
|
"@instructure/ui-view": "^11.0.0",
|
|
31
22
|
"@tanstack/react-query": "^5.0.0",
|
|
32
23
|
"react": "^18.0.0",
|
|
33
|
-
"react-dom": "^18.0.0"
|
|
24
|
+
"react-dom": "^18.0.0",
|
|
25
|
+
"@instructure/platform-provider": "0.5.2"
|
|
34
26
|
},
|
|
35
27
|
"devDependencies": {
|
|
36
|
-
"@instructure/platform-provider": "workspace:*",
|
|
37
|
-
"@instructure/platform-test-utils": "workspace:*",
|
|
38
28
|
"@instructure/ui-text": "11.7.4",
|
|
39
29
|
"@instructure/ui-view": "11.7.4",
|
|
40
30
|
"@storybook/react": "^10.0.8",
|
|
@@ -50,6 +40,16 @@
|
|
|
50
40
|
"typescript": "^5.3.0",
|
|
51
41
|
"vite": "^6.0.0",
|
|
52
42
|
"vite-plugin-dts": "^4.0.0",
|
|
53
|
-
"vitest": "^4.0.0"
|
|
43
|
+
"vitest": "^4.0.0",
|
|
44
|
+
"@instructure/platform-provider": "0.5.2",
|
|
45
|
+
"@instructure/platform-test-utils": "0.2.5"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "vite build",
|
|
49
|
+
"dev": "vite build --watch",
|
|
50
|
+
"pack:tarball": "pnpm build && pnpm pack",
|
|
51
|
+
"test": "vitest run --coverage",
|
|
52
|
+
"test:watch": "vitest",
|
|
53
|
+
"type-check": "tsgo -p tsconfig.check.json"
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
}
|