Skip to content

Commit 9036a5b

Browse files
authored
Merge pull request #1 from pie-framework/develop
first merge/ deploy
2 parents ed340dc + 3c66ef3 commit 9036a5b

1,759 files changed

Lines changed: 170400 additions & 40923 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"@pie-element/hotspot",
1616
"@pie-element/number-line",
1717
"@pie-element/multiple-choice",
18+
"@pie-element/math-inline",
19+
"@pie-element/math-templated",
1820
"@pie-lib/categorize",
1921
"@pie-lib/charting",
2022
"@pie-lib/config-ui",

.changeset/smart-pens-juggle.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@pie-element/element-player": patch
3+
"@pie-element/print-player": patch
4+
"@pie-element/bundler-shared": patch
5+
---
6+
7+
Prepare the player and bundler packages for the next publish cycle.
8+
Includes release updates for `element-player`, `print-player`, and `bundler-shared`.

.claude/instructions.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@
1212
- **Feature parity**: Must match all 21 QTI 2.2 interaction types from original pie-elements
1313
- **Strict TypeScript**: No `any` allowed (enforced by Biome)
1414

15-
## Sibling Project Dependencies
15+
## Upstream Sync (Maintainers Only)
1616

17-
**IMPORTANT**: This project relies on sibling repositories during the migration phase:
17+
**For maintainers syncing from upstream:**
1818

1919
- **pie-elements**: Must be checked out at `../pie-elements` (sibling directory)
2020
- **pie-lib**: Must be checked out at `../pie-lib` (sibling directory)
2121

22-
The project should always attempt to read from these sibling directories when they exist. CLI upstream commands (`upstream:update`, `upstream:check`, `upstream:sync`, etc.) depend on finding `pie-elements` and `pie-lib` as a siblings. This is a temporary requirement during migration and will be removed once the migration is complete. The `upstream:update` command will copy the files that are ready from `../pie-elements` to `elements-react` and from `../pie-lib` to `lib-react`, which are both ignored by git for now. Once we officialy migrated, these directories will be included in git. That also means that until then, any fixes this project need to the `../pie-elements` and `../pie-lib` projects should go into the upstream script(s), though to test things out changing code directly in the target directories is acceptable.
22+
CLI upstream commands (`upstream:update`, `upstream:check`, `upstream:sync`, etc.) depend on finding `pie-elements` and `pie-lib` as siblings. These commands copy files from `../pie-elements` to `packages/elements-react` and from `../pie-lib` to `packages/lib-react`.
23+
24+
**For regular developers:**
25+
26+
The synced packages (`packages/elements-react/*` and `packages/lib-react/*`) are committed to git. You don't need to check out pie-elements or pie-lib - just `git pull` to get the latest synced packages.
2327

2428
## Technology Stack
2529

@@ -35,7 +39,7 @@ The project should always attempt to read from these sibling directories when th
3539
## Monorepo Structure
3640

3741
```text
38-
pie-elements-ng/
42+
pie-element/
3943
├── packages/
4044
│ ├── core/ # Core PIE interfaces & types
4145
│ ├── cli/ # oclif-based CLI tools
@@ -62,8 +66,7 @@ pie-elements-ng/
6266
│ │ └── ui/ # General UI components
6367
│ └── lib-react/ # React shared libraries (25+ packages)
6468
└── apps/
65-
├── examples-svelte/ # SvelteKit demo
66-
├── examples-react/ # React demo
69+
├── element-demo/ # Shared element demo
6770
└── esm-player-test/ # ESM player testing
6871
```
6972

@@ -73,7 +76,7 @@ pie-elements-ng/
7376

7477
1. Run Biome with auto-fix: `bun run lint:fix` or `npx @biomejs/biome check --write .`
7578
2. Run TypeScript type checking: `bunx tsc --noEmit`
76-
3. Run Svelte type checking: `bunx svelte-check --workspace packages/components`
79+
3. Run Svelte type checking: `bunx svelte-check` (from `apps/element-demo`)
7780
4. Fix all errors and warnings before marking the task as complete
7881

7982
These checks ensure:

.compatibility/report.json

Lines changed: 989 additions & 1098 deletions
Large diffs are not rendered by default.

.cursor/mcp.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
"command": "npx",
1010
"args": ["-y", "@playwright/mcp"],
1111
"env": {}
12+
},
13+
"imagen": {
14+
"command": "node",
15+
"args": ["mcp-imagen/dist/index.js"],
16+
"env": {
17+
"GOOGLE_API_KEY": "${GOOGLE_API_KEY}"
18+
}
1219
}
1320
}
1421
}

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
.git
3+
.github
4+
dist
5+
*.log
6+
.DS_Store
7+
coverage
8+
test-results
9+
playwright-report
10+
.turbo

.github/workflows/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [main, develop]
5+
branches: [master, develop]
66
pull_request:
7-
branches: [main, develop]
7+
branches: [master, develop]
88

99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
@@ -37,6 +37,7 @@ jobs:
3737
packages/*/dist
3838
packages/*/esm
3939
apps/*/build
40+
if-no-files-found: warn
4041

4142
test:
4243
runs-on: ubuntu-latest
@@ -46,12 +47,13 @@ jobs:
4647
with:
4748
bun-version: 1.3.6
4849
- run: bun install --frozen-lockfile
49-
# Vitest runs from a clean checkout; build the shared workspace packages that are
50-
# consumed via package exports (dist/*) before running tests.
51-
- run: bunx turbo run build --filter=@pie-elements-ng/shared-types --filter=@pie-elements-ng/shared-utils --filter=@pie-elements-ng/shared-test-utils
50+
- run: bun x svelte-kit sync
51+
working-directory: apps/element-demo
52+
# Tests include package output validation, so build workspace outputs first.
53+
- run: bun run build
5254
- run: bun run test
5355
- uses: codecov/codecov-action@v4
5456
if: always()
5557
with:
5658
files: ./coverage/coverage-final.json
57-
token: ${{ secrets.CODECOV_TOKEN }}
59+
fail_ci_if_error: false

.github/workflows/e2e.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
11
name: E2E Tests
22

33
on:
4-
push:
5-
branches: [main, develop]
6-
pull_request:
7-
branches: [main, develop]
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
89

910
jobs:
1011
test-e2e:
11-
timeout-minutes: 15
12+
timeout-minutes: 25
1213
runs-on: ubuntu-latest
1314
steps:
1415
- uses: actions/checkout@v4
1516
- uses: oven-sh/setup-bun@v2
1617
with:
1718
bun-version: 1.3.6
1819
- run: bun install --frozen-lockfile
19-
- run: bunx playwright install --with-deps
20+
- run: bun x svelte-kit sync
21+
working-directory: apps/element-demo
22+
- run: bun run --cwd apps/element-demo generate-imports
23+
# Build workspace outputs before app build so package exports resolve in CI.
2024
- run: bun run build
21-
- run: bun run test:e2e
25+
- run: bunx playwright install --with-deps
26+
- run: bun run --cwd apps/element-demo test:e2e
2227
- uses: actions/upload-artifact@v4
2328
if: always()
2429
with:
2530
name: playwright-report
26-
path: apps/example/playwright-report/
31+
path: apps/element-demo/playwright-report/
32+
if-no-files-found: warn
2733
retention-days: 30
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
name: PR Notifications
2+
3+
on:
4+
pull_request:
5+
types: [opened, closed, reopened]
6+
pull_request_review:
7+
types: [submitted]
8+
9+
jobs:
10+
notify:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Notify Slack on PR Opened
14+
if: github.event.action == 'opened'
15+
uses: slackapi/slack-github-action@v1.27.0
16+
with:
17+
payload: |
18+
{
19+
"text": "🔔 New PR in pie-elements-ng",
20+
"blocks": [
21+
{
22+
"type": "header",
23+
"text": {
24+
"type": "plain_text",
25+
"text": "🔔 New Pull Request"
26+
}
27+
},
28+
{
29+
"type": "section",
30+
"fields": [
31+
{
32+
"type": "mrkdwn",
33+
"text": "*Repository:*\n${{ github.repository }}"
34+
},
35+
{
36+
"type": "mrkdwn",
37+
"text": "*PR:*\n<${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}>"
38+
},
39+
{
40+
"type": "mrkdwn",
41+
"text": "*Author:*\n${{ github.event.pull_request.user.login }}"
42+
},
43+
{
44+
"type": "mrkdwn",
45+
"text": "*Base:*\n${{ github.event.pull_request.base.ref }}"
46+
},
47+
{
48+
"type": "mrkdwn",
49+
"text": "*Head:*\n${{ github.event.pull_request.head.ref }}"
50+
}
51+
]
52+
}
53+
]
54+
}
55+
env:
56+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PR_WEBHOOK_URL }}
57+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
58+
59+
- name: Notify Slack on PR Merged
60+
if: github.event.action == 'closed' && github.event.pull_request.merged == true
61+
uses: slackapi/slack-github-action@v1.27.0
62+
with:
63+
payload: |
64+
{
65+
"text": "✅ PR Merged in pie-elements-ng",
66+
"blocks": [
67+
{
68+
"type": "header",
69+
"text": {
70+
"type": "plain_text",
71+
"text": "✅ Pull Request Merged"
72+
}
73+
},
74+
{
75+
"type": "section",
76+
"fields": [
77+
{
78+
"type": "mrkdwn",
79+
"text": "*Repository:*\n${{ github.repository }}"
80+
},
81+
{
82+
"type": "mrkdwn",
83+
"text": "*PR:*\n<${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}>"
84+
},
85+
{
86+
"type": "mrkdwn",
87+
"text": "*Author:*\n${{ github.event.pull_request.user.login }}"
88+
},
89+
{
90+
"type": "mrkdwn",
91+
"text": "*Merged by:*\n${{ github.event.pull_request.merged_by.login }}"
92+
},
93+
{
94+
"type": "mrkdwn",
95+
"text": "*Into:*\n${{ github.event.pull_request.base.ref }}"
96+
}
97+
]
98+
}
99+
]
100+
}
101+
env:
102+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PR_WEBHOOK_URL }}
103+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
104+
105+
- name: Notify Slack on PR Closed (not merged)
106+
if: github.event.action == 'closed' && github.event.pull_request.merged == false
107+
uses: slackapi/slack-github-action@v1.27.0
108+
with:
109+
payload: |
110+
{
111+
"text": "❌ PR Closed in pie-elements-ng",
112+
"blocks": [
113+
{
114+
"type": "header",
115+
"text": {
116+
"type": "plain_text",
117+
"text": "❌ Pull Request Closed"
118+
}
119+
},
120+
{
121+
"type": "section",
122+
"fields": [
123+
{
124+
"type": "mrkdwn",
125+
"text": "*Repository:*\n${{ github.repository }}"
126+
},
127+
{
128+
"type": "mrkdwn",
129+
"text": "*PR:*\n<${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}>"
130+
},
131+
{
132+
"type": "mrkdwn",
133+
"text": "*Author:*\n${{ github.event.pull_request.user.login }}"
134+
}
135+
]
136+
}
137+
]
138+
}
139+
env:
140+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PR_WEBHOOK_URL }}
141+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
142+
143+
- name: Notify Slack on PR Review
144+
if: github.event_name == 'pull_request_review'
145+
uses: slackapi/slack-github-action@v1.27.0
146+
with:
147+
payload: |
148+
{
149+
"text": "👀 PR Review in pie-elements-ng",
150+
"blocks": [
151+
{
152+
"type": "header",
153+
"text": {
154+
"type": "plain_text",
155+
"text": "${{ github.event.review.state == 'approved' && '✅ PR Approved' || github.event.review.state == 'changes_requested' && '🔄 Changes Requested' || '💬 PR Reviewed' }}"
156+
}
157+
},
158+
{
159+
"type": "section",
160+
"fields": [
161+
{
162+
"type": "mrkdwn",
163+
"text": "*Repository:*\n${{ github.repository }}"
164+
},
165+
{
166+
"type": "mrkdwn",
167+
"text": "*PR:*\n<${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}>"
168+
},
169+
{
170+
"type": "mrkdwn",
171+
"text": "*Reviewer:*\n${{ github.event.review.user.login }}"
172+
},
173+
{
174+
"type": "mrkdwn",
175+
"text": "*State:*\n${{ github.event.review.state }}"
176+
}
177+
]
178+
}
179+
]
180+
}
181+
env:
182+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PR_WEBHOOK_URL }}
183+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 commit comments

Comments
 (0)