@instructure/platform-rubrics 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 ADDED
@@ -0,0 +1,19 @@
1
+ # @instructure/platform-rubrics
2
+
3
+ Rubrics UI shared between Canvas LMS and Foundation.
4
+
5
+ Shared business logic (hooks, queries, types) lives in `src/_internal/` and is consumed by both `src/canvas/` and `src/foundation/`.
6
+
7
+ ## Entry points
8
+
9
+ | Import path | What it is |
10
+ |---|---|
11
+ | `@instructure/platform-rubrics` | Shared types, hooks, and other host-agnostic exports |
12
+ | `@instructure/platform-rubrics/canvas` | Canvas-flavored components |
13
+ | `@instructure/platform-rubrics/foundation` | Foundation-flavored components |
14
+
15
+ Never import from `src/_internal/` outside this package — it is not part of the published surface.
16
+
17
+ ## Splitting later
18
+
19
+ If canvas and foundation rubrics diverge (different InstUI major, independent release cadence, separate ownership), the internal layout mirrors what a package split would look like: `_internal/` → `platform-rubrics-core`, `canvas/` → `platform-rubrics`, `foundation/` → `platform-foundation-rubrics`. Keep flavor-specific imports going through their own subpath so the split stays mechanical.
@@ -0,0 +1,3 @@
1
+ export type RubricsHost = 'canvas' | 'foundation';
2
+ export declare const getHelloWorldMessage: (host: RubricsHost) => string;
3
+ //# sourceMappingURL=helloWorld.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helloWorld.d.ts","sourceRoot":"","sources":["../../src/_internal/helloWorld.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,YAAY,CAAA;AAEjD,eAAO,MAAM,oBAAoB,GAAI,MAAM,WAAW,KAAG,MAChB,CAAA"}
@@ -0,0 +1,5 @@
1
+ export interface Rubric {
2
+ id: string;
3
+ title: string;
4
+ }
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/_internal/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd"}
@@ -0,0 +1,3 @@
1
+ /** Smoke-tests the `/canvas` entry point's bundling and InstUI peer deps. */
2
+ export declare const HelloWorld: () => React.ReactElement;
3
+ //# sourceMappingURL=HelloWorld.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelloWorld.d.ts","sourceRoot":"","sources":["../../src/canvas/HelloWorld.tsx"],"names":[],"mappings":"AAIA,6EAA6E;AAC7E,eAAO,MAAM,UAAU,QAAO,KAAK,CAAC,YAInC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export type { Rubric } from '../_internal/types';
2
+ export { HelloWorld } from './HelloWorld';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/canvas/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
package/dist/canvas.js ADDED
@@ -0,0 +1,8 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Heading as r } from "@instructure/ui-heading";
3
+ import { View as e } from "@instructure/ui-view";
4
+ import { getHelloWorldMessage as l } from "./index.js";
5
+ const s = () => /* @__PURE__ */ o(e, { as: "div", padding: "small", children: /* @__PURE__ */ o(r, { level: "h2", children: l("canvas") }) });
6
+ export {
7
+ s as HelloWorld
8
+ };
@@ -0,0 +1,3 @@
1
+ /** Smoke-tests the `/foundation` entry point's bundling and InstUI peer deps. */
2
+ export declare const HelloWorld: () => React.ReactElement;
3
+ //# sourceMappingURL=HelloWorld.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelloWorld.d.ts","sourceRoot":"","sources":["../../src/foundation/HelloWorld.tsx"],"names":[],"mappings":"AAIA,iFAAiF;AACjF,eAAO,MAAM,UAAU,QAAO,KAAK,CAAC,YAInC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export type { Rubric } from '../_internal/types';
2
+ export { HelloWorld } from './HelloWorld';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundation/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Heading as r } from "@instructure/ui-heading";
3
+ import { View as e } from "@instructure/ui-view";
4
+ import { getHelloWorldMessage as l } from "./index.js";
5
+ const n = () => /* @__PURE__ */ o(e, { as: "div", padding: "small", children: /* @__PURE__ */ o(r, { level: "h2", children: l("foundation") }) });
6
+ export {
7
+ n as HelloWorld
8
+ };
@@ -0,0 +1,4 @@
1
+ export type { Rubric } from './_internal/types';
2
+ export { getHelloWorldMessage } from './_internal/helloWorld';
3
+ export type { RubricsHost } from './_internal/helloWorld';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ const e = (o) => `Hello from platform-rubrics (${o})`;
2
+ export {
3
+ e as getHelloWorldMessage
4
+ };
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@instructure/platform-rubrics",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ },
16
+ "./canvas": {
17
+ "types": "./dist/canvas/index.d.ts",
18
+ "import": "./dist/canvas.js"
19
+ },
20
+ "./foundation": {
21
+ "types": "./dist/foundation/index.d.ts",
22
+ "import": "./dist/foundation.js"
23
+ }
24
+ },
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "scripts": {
29
+ "build": "vite build",
30
+ "dev": "vite build --watch",
31
+ "test": "vitest run",
32
+ "test:watch": "vitest",
33
+ "test:coverage": "vitest run --coverage",
34
+ "type-check": "tsc --noEmit",
35
+ "pack:tarball": "pnpm build && pnpm pack"
36
+ },
37
+ "peerDependencies": {
38
+ "@instructure/platform-provider": "workspace:*",
39
+ "@instructure/ui-a11y-content": "^11.0.0",
40
+ "@instructure/ui-buttons": "^11.0.0",
41
+ "@instructure/ui-flex": "^11.0.0",
42
+ "@instructure/ui-heading": "^11.0.0",
43
+ "@instructure/ui-icons": "^11.0.0",
44
+ "@instructure/ui-text": "^11.0.0",
45
+ "@instructure/ui-view": "^11.0.0",
46
+ "@tanstack/react-query": "^5.0.0",
47
+ "react": "^18.0.0",
48
+ "react-dom": "^18.0.0"
49
+ },
50
+ "devDependencies": {
51
+ "@instructure/platform-provider": "workspace:*",
52
+ "@instructure/ui-a11y-content": "11.7.4",
53
+ "@instructure/ui-buttons": "11.7.4",
54
+ "@instructure/ui-flex": "11.7.4",
55
+ "@instructure/ui-heading": "11.7.4",
56
+ "@instructure/ui-icons": "11.7.4",
57
+ "@instructure/ui-text": "11.7.4",
58
+ "@instructure/ui-view": "11.7.4",
59
+ "@tanstack/react-query": "^5.90.7",
60
+ "@testing-library/jest-dom": "^6.9.1",
61
+ "@testing-library/react": "^16.3.0",
62
+ "@testing-library/user-event": "^14.0.0",
63
+ "@types/react": "^18.3.0",
64
+ "@types/react-dom": "^18.3.0",
65
+ "@vitejs/plugin-react": "^4.2.0",
66
+ "@vitest/coverage-v8": "^4.0.17",
67
+ "jsdom": "^25.0.0",
68
+ "msw": "^2.7.0",
69
+ "typescript": "^5.3.0",
70
+ "vite": "^6.0.0",
71
+ "vite-plugin-dts": "^4.0.0",
72
+ "vitest": "^4.0.0"
73
+ }
74
+ }