@imfusion/web-ui 0.6.1-dev.1.g23386714 → 0.6.1-dev.14.g8fac1dfb

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.
Files changed (50) hide show
  1. package/README.md +102 -151
  2. package/dist/{code-Blo48PGr.js → code-C_56u-Vk.js} +2 -2
  3. package/dist/components/toast/index.d.ts +2 -0
  4. package/dist/components/toast/toast.d.ts +197 -0
  5. package/dist/components/toast/toast.meta.d.ts +2 -0
  6. package/dist/icons/icon-config.d.ts +12 -0
  7. package/dist/{icons-wBmF0U2x.js → icons-Cy1HAosO.js} +1 -1
  8. package/dist/icons.js +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.js +992 -829
  11. package/dist/integrations/code-highlight.js +2 -2
  12. package/dist/integrations/image-display-options.js +1 -1
  13. package/dist/provider/web-ui-provider.d.ts +3 -3
  14. package/dist/style.css +1 -1
  15. package/package.json +3 -2
  16. package/src/docgen/doc.gen.json +381 -0
  17. package/src/llms/install-templates/AGENTS.md +15 -18
  18. package/src/llms/llms.gen.txt +39 -33
  19. package/src/llms/skills/imf-web-ui/SKILL.md +29 -39
  20. package/src/llms/skills/imf-web-ui-audit/SKILL.md +50 -102
  21. package/src/llms/skills/imf-web-ui-components/SKILL.md +47 -104
  22. package/src/llms/skills/imf-web-ui-conventions/SKILL.md +39 -52
  23. package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +1 -0
  24. package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +40 -62
  25. package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +11 -12
  26. package/src/llms/skills/imf-web-ui-conventions/topics/authentication.md +31 -46
  27. package/src/llms/skills/imf-web-ui-conventions/topics/class-names.md +18 -23
  28. package/src/llms/skills/imf-web-ui-conventions/topics/components.md +20 -69
  29. package/src/llms/skills/imf-web-ui-conventions/topics/data.md +50 -146
  30. package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +17 -23
  31. package/src/llms/skills/imf-web-ui-conventions/topics/git.md +15 -20
  32. package/src/llms/skills/imf-web-ui-conventions/topics/library-boundary.md +28 -19
  33. package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +20 -16
  34. package/src/llms/skills/imf-web-ui-conventions/topics/npm-project.md +28 -42
  35. package/src/llms/skills/imf-web-ui-conventions/topics/project-structure.md +28 -30
  36. package/src/llms/skills/imf-web-ui-conventions/topics/react.md +28 -74
  37. package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +65 -62
  38. package/src/llms/skills/imf-web-ui-conventions/topics/testing.md +12 -14
  39. package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +9 -4
  40. package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +40 -68
  41. package/src/llms/skills/imf-web-ui-conventions/topics/typescript.md +26 -50
  42. package/src/llms/skills/imf-web-ui-conventions/topics/validation.md +19 -25
  43. package/src/llms/skills/imf-web-ui-setup/SKILL.md +43 -64
  44. package/src/llms/skills/imf-web-ui-update/SKILL.md +48 -114
  45. package/src/llms/skills/imf-web-ui-ux/SKILL.md +64 -92
  46. package/src/llms/skills/imf-web-ui-ux/references/forms.md +16 -36
  47. package/src/llms/skills/imf-web-ui-ux/references/usability-heuristics.md +14 -27
  48. package/src/llms/skills/imf-web-ui-ux/references/visual-design.md +22 -38
  49. package/dist/icons/icon-config-provider.d.ts +0 -8
  50. package/dist/icons/icon-context.d.ts +0 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imfusion/web-ui",
3
- "version": "0.6.1-dev.1.g23386714",
3
+ "version": "0.6.1-dev.14.g8fac1dfb",
4
4
  "description": "The official Web UI component library for ImFusion web apps",
5
5
  "author": "ImFusion GmbH",
6
6
  "license": "UNLICENSED",
@@ -59,6 +59,7 @@
59
59
  "dev:lib": "concurrently -n codegen,lib -c yellow,blue \"npm run codegen:watch\" \"vite build --watch\"",
60
60
  "build": "npm run codegen && rm -rf dist && vite build && npm run codegen:docgen && npm run codegen:llms && npm run codegen:tokens",
61
61
  "build:storybook": "npm run codegen:storybook && storybook build",
62
+ "ci:status": "teamcity run list --job WebSDK_WebUI_BuildTest --limit 3",
62
63
  "storybook": "npm run codegen:storybook && storybook dev -p 6006 --no-open",
63
64
  "storybook:free-ports": "tsx scripts/free-storybook-ports.ts",
64
65
  "codegen": "tsx src/codegen/run.ts",
@@ -76,7 +77,7 @@
76
77
  "verify:icons": "tsx scripts/verify/icons-public-api.ts",
77
78
  "verify:changelog": "tsx scripts/verify/changelog.ts",
78
79
  "verify:staged": "tsx scripts/verify/staged.ts",
79
- "verify:full": "tsx scripts/verify/full.ts && npm run verify:tests",
80
+ "verify:full": "tsx scripts/verify/full.ts",
80
81
  "release": "tsx scripts/release.ts",
81
82
  "format": "prettier --write .",
82
83
  "lint": "eslint . --cache --fix",
@@ -4180,6 +4180,387 @@
4180
4180
  }
4181
4181
  ]
4182
4182
  },
4183
+ "toast": {
4184
+ "root": {
4185
+ "name": "Toast.Root",
4186
+ "description": "Toast.Root — one toast surface. Carries the upstream state as data attributes\n(`data-starting-style`, `data-ending-style`, `data-expanded`, `data-limited`,\n`data-swiping`) which the stylesheet uses for stack and exit motion.",
4187
+ "props": [
4188
+ {
4189
+ "name": "className",
4190
+ "required": false,
4191
+ "type": "string | ((state: ToastRootState) => string)",
4192
+ "defaultValue": null,
4193
+ "description": ""
4194
+ },
4195
+ {
4196
+ "name": "render",
4197
+ "required": false,
4198
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToastRootState>",
4199
+ "defaultValue": null,
4200
+ "description": ""
4201
+ },
4202
+ {
4203
+ "name": "swipeDirection",
4204
+ "required": false,
4205
+ "type": "| \"up\"\n| \"down\"\n| \"left\"\n| \"right\"\n| (\"up\" | \"down\" | \"left\" | \"right\")[]",
4206
+ "defaultValue": "['down', 'right']",
4207
+ "description": ""
4208
+ },
4209
+ {
4210
+ "name": "toast",
4211
+ "required": true,
4212
+ "type": "ToastRootToastObject<any>",
4213
+ "defaultValue": null,
4214
+ "description": "The toast object from the manager's `toasts` array."
4215
+ },
4216
+ {
4217
+ "name": "variant",
4218
+ "required": false,
4219
+ "type": "| \"neutral\"\n| \"info\"\n| \"success\"\n| \"warning\"\n| \"error\"\n| null",
4220
+ "defaultValue": "neutral",
4221
+ "description": "Semantic treatment for the toast surface."
4222
+ }
4223
+ ]
4224
+ },
4225
+ "subComponents": [
4226
+ {
4227
+ "name": "Toast.Action",
4228
+ "description": "Toast.Action — the toast's single affordance, typically an undo. Its behavior\ncomes from `actionProps` on the toast object passed to the manager.",
4229
+ "props": [
4230
+ {
4231
+ "name": "className",
4232
+ "required": false,
4233
+ "type": "string | ((state: ToastActionState) => string)",
4234
+ "defaultValue": null,
4235
+ "description": ""
4236
+ },
4237
+ {
4238
+ "name": "nativeButton",
4239
+ "required": false,
4240
+ "type": "boolean",
4241
+ "defaultValue": "true",
4242
+ "description": ""
4243
+ },
4244
+ {
4245
+ "name": "render",
4246
+ "required": false,
4247
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToastActionState>",
4248
+ "defaultValue": null,
4249
+ "description": ""
4250
+ }
4251
+ ]
4252
+ },
4253
+ {
4254
+ "name": "Toast.Arrow",
4255
+ "description": "Toast.Arrow — pointer joining an anchored toast to its anchor. Receives `data-side` for orientation.",
4256
+ "props": [
4257
+ {
4258
+ "name": "className",
4259
+ "required": false,
4260
+ "type": "string | ((state: ToastArrowState) => string)",
4261
+ "defaultValue": null,
4262
+ "description": ""
4263
+ },
4264
+ {
4265
+ "name": "render",
4266
+ "required": false,
4267
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToastArrowState>",
4268
+ "defaultValue": null,
4269
+ "description": ""
4270
+ }
4271
+ ]
4272
+ },
4273
+ {
4274
+ "name": "Toast.Close",
4275
+ "description": "Toast.Close — dismisses the toast it sits in.",
4276
+ "props": [
4277
+ {
4278
+ "name": "className",
4279
+ "required": false,
4280
+ "type": "string | ((state: ToastCloseState) => string)",
4281
+ "defaultValue": null,
4282
+ "description": ""
4283
+ },
4284
+ {
4285
+ "name": "nativeButton",
4286
+ "required": false,
4287
+ "type": "boolean",
4288
+ "defaultValue": "true",
4289
+ "description": ""
4290
+ },
4291
+ {
4292
+ "name": "render",
4293
+ "required": false,
4294
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToastCloseState>",
4295
+ "defaultValue": null,
4296
+ "description": ""
4297
+ }
4298
+ ]
4299
+ },
4300
+ {
4301
+ "name": "Toast.Content",
4302
+ "description": "Toast.Content — lays out title, description, action, and close. Fades out on\nthe toasts stacked behind the frontmost one via `data-behind`.",
4303
+ "props": [
4304
+ {
4305
+ "name": "className",
4306
+ "required": false,
4307
+ "type": "string | ((state: ToastContentState) => string)",
4308
+ "defaultValue": null,
4309
+ "description": ""
4310
+ },
4311
+ {
4312
+ "name": "render",
4313
+ "required": false,
4314
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToastContentState>",
4315
+ "defaultValue": null,
4316
+ "description": ""
4317
+ }
4318
+ ]
4319
+ },
4320
+ {
4321
+ "name": "Toast.Description",
4322
+ "description": "Toast.Description — supporting copy. Falls back to the toast object's `description` when given no children.",
4323
+ "props": [
4324
+ {
4325
+ "name": "className",
4326
+ "required": false,
4327
+ "type": "| string\n| ((state: ToastDescriptionState) => string)",
4328
+ "defaultValue": null,
4329
+ "description": ""
4330
+ },
4331
+ {
4332
+ "name": "render",
4333
+ "required": false,
4334
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToastDescriptionState>",
4335
+ "defaultValue": null,
4336
+ "description": ""
4337
+ }
4338
+ ]
4339
+ },
4340
+ {
4341
+ "name": "Toast.Portal",
4342
+ "description": "Toast.Portal — moves the viewport out of the page flow so toasts float above the app.",
4343
+ "props": [
4344
+ {
4345
+ "name": "className",
4346
+ "required": false,
4347
+ "type": "string | ((state: any) => string)",
4348
+ "defaultValue": null,
4349
+ "description": ""
4350
+ },
4351
+ {
4352
+ "name": "container",
4353
+ "required": false,
4354
+ "type": "| HTMLElement\n| ShadowRoot\n| RefObject<HTMLElement | ShadowRoot | null>\n| null",
4355
+ "defaultValue": null,
4356
+ "description": ""
4357
+ },
4358
+ {
4359
+ "name": "render",
4360
+ "required": false,
4361
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, any>",
4362
+ "defaultValue": null,
4363
+ "description": ""
4364
+ }
4365
+ ]
4366
+ },
4367
+ {
4368
+ "name": "Toast.Positioner",
4369
+ "description": "Toast.Positioner — anchors a toast to an element instead of the stack, for\nfeedback that belongs next to the control that caused it. Wrap a `Root` in it\nand the root switches to the compact content-sized surface.",
4370
+ "props": [
4371
+ {
4372
+ "name": "align",
4373
+ "required": false,
4374
+ "type": "Align",
4375
+ "defaultValue": "'center'",
4376
+ "description": ""
4377
+ },
4378
+ {
4379
+ "name": "alignOffset",
4380
+ "required": false,
4381
+ "type": "number | OffsetFunction",
4382
+ "defaultValue": "0",
4383
+ "description": ""
4384
+ },
4385
+ {
4386
+ "name": "anchor",
4387
+ "required": false,
4388
+ "type": "Element | null",
4389
+ "defaultValue": null,
4390
+ "description": ""
4391
+ },
4392
+ {
4393
+ "name": "arrowPadding",
4394
+ "required": false,
4395
+ "type": "number",
4396
+ "defaultValue": "5",
4397
+ "description": ""
4398
+ },
4399
+ {
4400
+ "name": "className",
4401
+ "required": false,
4402
+ "type": "| string\n| ((state: ToastPositionerState) => string)",
4403
+ "defaultValue": null,
4404
+ "description": ""
4405
+ },
4406
+ {
4407
+ "name": "collisionAvoidance",
4408
+ "required": false,
4409
+ "type": "CollisionAvoidance",
4410
+ "defaultValue": null,
4411
+ "description": ""
4412
+ },
4413
+ {
4414
+ "name": "collisionBoundary",
4415
+ "required": false,
4416
+ "type": "Boundary",
4417
+ "defaultValue": "'clipping-ancestors'",
4418
+ "description": ""
4419
+ },
4420
+ {
4421
+ "name": "collisionPadding",
4422
+ "required": false,
4423
+ "type": "Padding",
4424
+ "defaultValue": "5",
4425
+ "description": ""
4426
+ },
4427
+ {
4428
+ "name": "disableAnchorTracking",
4429
+ "required": false,
4430
+ "type": "boolean",
4431
+ "defaultValue": "false",
4432
+ "description": ""
4433
+ },
4434
+ {
4435
+ "name": "positionMethod",
4436
+ "required": false,
4437
+ "type": "\"absolute\" | \"fixed\"",
4438
+ "defaultValue": "'absolute'",
4439
+ "description": ""
4440
+ },
4441
+ {
4442
+ "name": "render",
4443
+ "required": false,
4444
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToastPositionerState>",
4445
+ "defaultValue": null,
4446
+ "description": ""
4447
+ },
4448
+ {
4449
+ "name": "side",
4450
+ "required": false,
4451
+ "type": "Side",
4452
+ "defaultValue": "'top'",
4453
+ "description": ""
4454
+ },
4455
+ {
4456
+ "name": "sideOffset",
4457
+ "required": false,
4458
+ "type": "number | OffsetFunction",
4459
+ "defaultValue": "0",
4460
+ "description": ""
4461
+ },
4462
+ {
4463
+ "name": "sticky",
4464
+ "required": false,
4465
+ "type": "boolean",
4466
+ "defaultValue": "false",
4467
+ "description": ""
4468
+ },
4469
+ {
4470
+ "name": "toast",
4471
+ "required": true,
4472
+ "type": "ToastObject<any>",
4473
+ "defaultValue": null,
4474
+ "description": "The toast object from the manager's `toasts` array."
4475
+ }
4476
+ ]
4477
+ },
4478
+ {
4479
+ "name": "Toast.Provider",
4480
+ "description": "Toast.Provider — owns the toast queue for its subtree. Renders no DOM element.\n\n`WebUIProvider` already mounts one, so most applications never write this\npart. Use it for a scoped queue or to attach an external manager.",
4481
+ "props": [
4482
+ {
4483
+ "name": "limit",
4484
+ "required": false,
4485
+ "type": "number",
4486
+ "defaultValue": "3",
4487
+ "description": ""
4488
+ },
4489
+ {
4490
+ "name": "timeout",
4491
+ "required": false,
4492
+ "type": "number",
4493
+ "defaultValue": "5000",
4494
+ "description": ""
4495
+ },
4496
+ {
4497
+ "name": "toastManager",
4498
+ "required": false,
4499
+ "type": "ToastManager<any>",
4500
+ "defaultValue": null,
4501
+ "description": ""
4502
+ }
4503
+ ]
4504
+ },
4505
+ {
4506
+ "name": "Toast.Title",
4507
+ "description": "Toast.Title — the message heading. Falls back to the toast object's `title` when given no children.",
4508
+ "props": [
4509
+ {
4510
+ "name": "className",
4511
+ "required": false,
4512
+ "type": "string | ((state: ToastTitleState) => string)",
4513
+ "defaultValue": null,
4514
+ "description": ""
4515
+ },
4516
+ {
4517
+ "name": "render",
4518
+ "required": false,
4519
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToastTitleState>",
4520
+ "defaultValue": null,
4521
+ "description": ""
4522
+ }
4523
+ ]
4524
+ },
4525
+ {
4526
+ "name": "Toast.Provider",
4527
+ "description": "Toast.createToastManager — creates a manager that lives outside React so\nnon-component code can add toasts. Pass it to a `Toast.Provider` via\n`toastManager`.",
4528
+ "props": []
4529
+ },
4530
+ {
4531
+ "name": "Toast.useToastManager",
4532
+ "description": "Toast.useToastManager — reads the queue and the add/close/update/promise\nmethods from the surrounding provider. Must run inside a provider; the one\n`WebUIProvider` mounts satisfies that for the standard setup.",
4533
+ "props": []
4534
+ },
4535
+ {
4536
+ "name": "Toast.Viewport",
4537
+ "description": "Toast.Viewport — the fixed layer that holds the stack. Hovering or focusing it\nexpands the collapsed toasts; it ignores pointer events except on the toasts\nthemselves so the app underneath stays clickable.",
4538
+ "props": [
4539
+ {
4540
+ "name": "className",
4541
+ "required": false,
4542
+ "type": "string | ((state: ToastViewportState) => string)",
4543
+ "defaultValue": null,
4544
+ "description": ""
4545
+ },
4546
+ {
4547
+ "name": "position",
4548
+ "required": false,
4549
+ "type": "| \"top-left\"\n| \"top-center\"\n| \"top-right\"\n| \"bottom-left\"\n| \"bottom-center\"\n| \"bottom-right\"\n| null",
4550
+ "defaultValue": "bottom-center",
4551
+ "description": "Which edge or corner of the screen the stack anchors to."
4552
+ },
4553
+ {
4554
+ "name": "render",
4555
+ "required": false,
4556
+ "type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ToastViewportState>",
4557
+ "defaultValue": null,
4558
+ "description": ""
4559
+ }
4560
+ ]
4561
+ }
4562
+ ]
4563
+ },
4183
4564
  "toggle": {
4184
4565
  "root": {
4185
4566
  "name": "Toggle",
@@ -1,34 +1,31 @@
1
- # AGENTS.md
1
+ # Agent instructions
2
2
 
3
- <Keep this file lean — target ~50 lines. Decision test for every line: would the agent make a costly mistake without it? If
4
- it would just need to read a file first, cut it. Dev commands, path aliases, and tool config are discoverable from the files
5
- themselves.>
3
+ <Keep this file short. Include only rules that prevent a costly mistake. Point to the repository's own docs for everything
4
+ else.>
6
5
 
7
- <One paragraph: what the app is and the stack in one line.>
6
+ <One paragraph describing the app, its package, and its stack.>
8
7
 
9
- Scripts, deps, and setup: [`README.md`](./README.md) and [`package.json`](./package.json) are the source of truth. Check the
10
- `package.json` scripts before running or suggesting a command — don't infer one exists by pattern-matching a sibling.
8
+ Setup and commands: [`README.md`](./README.md) and [`package.json`](./package.json). Read the package scripts before running
9
+ or suggesting a command.
11
10
 
12
- ## Read before you write
11
+ ## Read before writing
13
12
 
14
- <One bullet per doc in docs/, each with when to read it, e.g.:>
13
+ <Add one pointer for each repository-specific document.>
15
14
 
16
- - [`docs/<topic>.md`](./docs/<topic>.md) — <what it covers>. Read before <the change it governs>.
15
+ - [`docs/<topic>.md`](./docs/<topic>.md) — <what it covers and when to read it>.
17
16
 
18
- [`docs/index.md`](./docs/index.md) registers all of them.
17
+ [`docs/index.md`](./docs/index.md) lists the documents.
19
18
 
20
19
  ## Working here
21
20
 
22
- <The fenced block below is the only part of this file `npx web-ui-install` touches: its content comes from this template and
23
- is refreshed on every skills install. Everything else in the file is scaffolded once by the setup skill and then owned by the
24
- repo.>
21
+ <The installer owns only the fenced block below. It refreshes that block on every install; the rest belongs to the project.>
25
22
 
26
23
  <!-- imf-web-ui:begin — managed by `npx web-ui-install`; edits inside the fence are overwritten -->
27
24
 
28
- `.agents/skills/imf-web-ui-*` is vendored from `@imfusion/web-ui` and resynced with `npx web-ui-install`. Don't edit it and
29
- don't put repo conventions there. Load the matching `imf-web-ui-*` skill before writing code, styles, data fetching, or docs;
30
- repo docs hold only what is unique to this repo.
25
+ `.agents/skills/imf-web-ui-*` is vendored from `@imfusion/web-ui` and resynced with `npx web-ui-install`. Do not edit the
26
+ vendored copy or put project-specific conventions there. Load the matching skill before changing UI, styles, data, tests, or
27
+ docs.
31
28
 
32
29
  <!-- imf-web-ui:end -->
33
30
 
34
- <Repo-specific agent guidance: generated files that are committed, tools to verify APIs against, things never to touch.>
31
+ <Add project-specific rules here: generated files, API lookup tools, and paths the agent must not touch.>