@rise-x/apps-sdk 0.11.1 → 0.15.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.
Files changed (83) hide show
  1. package/README.md +903 -19
  2. package/build/_internal.d.ts +4 -1
  3. package/build/_internal.js +67 -0
  4. package/build/cli/index.d.ts +7 -1
  5. package/build/cli/index.js +68 -14
  6. package/build/cli/scan.d.ts +60 -0
  7. package/build/cli/scan.js +725 -0
  8. package/build/cli/validate.d.ts +33 -0
  9. package/build/cli/validate.js +169 -0
  10. package/build/connectors/agents.d.ts +10 -6
  11. package/build/connectors/agents.js +59 -44
  12. package/build/connectors/attachments.d.ts +51 -0
  13. package/build/connectors/attachments.js +76 -0
  14. package/build/connectors/errors.js +24 -0
  15. package/build/connectors/flows.d.ts +13 -2
  16. package/build/connectors/flows.js +64 -19
  17. package/build/connectors/index.d.ts +5 -1
  18. package/build/connectors/index.js +14 -2
  19. package/build/connectors/integrations.d.ts +29 -0
  20. package/build/connectors/integrations.js +32 -0
  21. package/build/connectors/offline.d.ts +34 -0
  22. package/build/connectors/offline.js +135 -0
  23. package/build/connectors/readPolicy.d.ts +29 -0
  24. package/build/connectors/readPolicy.js +105 -0
  25. package/build/connectors/types.d.ts +75 -0
  26. package/build/connectors/types.js +128 -0
  27. package/build/connectors/vectorStores.d.ts +45 -0
  28. package/build/connectors/vectorStores.js +199 -0
  29. package/build/connectors/work.d.ts +14 -2
  30. package/build/connectors/work.js +43 -19
  31. package/build/dependencies/bound.d.ts +87 -0
  32. package/build/dependencies/bound.js +207 -0
  33. package/build/dependencies/index.d.ts +2 -0
  34. package/build/dependencies/index.js +13 -0
  35. package/build/dependencyRegistry.d.ts +15 -0
  36. package/build/dependencyRegistry.js +28 -0
  37. package/build/index.d.ts +2 -1
  38. package/build/index.js +12 -1
  39. package/build/lifecycle.d.ts +10 -1
  40. package/build/manifest.d.ts +69 -0
  41. package/build/manifest.js +229 -0
  42. package/build/manifestSource.d.ts +27 -0
  43. package/build/manifestSource.js +99 -0
  44. package/build/mockShell.d.ts +2 -0
  45. package/build/mockShell.js +13 -0
  46. package/build/query/client.js +9 -1
  47. package/build/query/dependencies.d.ts +22 -0
  48. package/build/query/dependencies.js +73 -0
  49. package/build/query/flows.d.ts +8 -8
  50. package/build/query/index.d.ts +1 -0
  51. package/build/query/index.js +4 -2
  52. package/build/query/layer.d.ts +9 -9
  53. package/build/query/shared.js +10 -0
  54. package/build/query/work.d.ts +4 -4
  55. package/build/rsbuild/index.d.ts +3 -1
  56. package/build/rsbuild/index.js +35 -1
  57. package/build/rsbuild/riseAppManifestPlugin.d.ts +19 -0
  58. package/build/rsbuild/riseAppManifestPlugin.js +79 -0
  59. package/build/shell/installShellBridge.d.ts +2 -0
  60. package/build/shell/installShellBridge.js +3 -1
  61. package/build/shellBridge.d.ts +233 -1
  62. package/build/shellBridge.js +8 -7
  63. package/build/ui/components/app-frame.d.ts +1 -1
  64. package/build/ui/demo.html +365 -360
  65. package/build/ui/shadcn.css +629 -0
  66. package/build/ui/standalone.js +16 -15
  67. package/build/ui/styles.css +1 -1
  68. package/build/ui/tailwind.css +12 -0
  69. package/build/ui/theme.css +412 -0
  70. package/build/ui/tw-animate.css +1 -0
  71. package/build/webpack/index.d.ts +1 -0
  72. package/build/webpack/index.js +7 -0
  73. package/build/webpack/riseAppManifestPlugin.d.ts +61 -0
  74. package/build/webpack/riseAppManifestPlugin.js +103 -0
  75. package/dependencies/package.json +8 -0
  76. package/package.json +17 -4
  77. package/template/AGENTS.md +34 -4
  78. package/template/README.md +85 -2
  79. package/template/package.json +4 -0
  80. package/template/rise-x-app.json +4 -0
  81. package/template/src/App.tsx +7 -17
  82. package/template/src/styles.css +5 -0
  83. package/webpack/package.json +8 -0
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Utilities-only entry for a federated app's own Tailwind build.
3
+ * No preflight/base and no tokens.css: the host owns the reset and tokens, apps inherit them by cascade.
4
+ * `source(none)` so only the app's own `@source` paths are scanned.
5
+ * Utilities go in `utilities.app`, a sublayer of the host's `utilities`, so a design-system
6
+ * rule wins any collision with an app utility whatever order the sheets load.
7
+ * Shipped as `@rise-x/apps-sdk/ui/tailwind.css`.
8
+ */
9
+ @layer theme, base, components, utilities;
10
+ @import 'tailwindcss/theme.css' layer(theme);
11
+ @import 'tailwindcss/utilities.css' layer(utilities.app) source(none);
12
+ @import './theme.css';
@@ -0,0 +1,412 @@
1
+ /*
2
+ * Build-time theme layer — import from EVERY Tailwind consumer (shell + apps)
3
+ * so utility classes resolve against the Rise-X token contract.
4
+ * Runtime token VALUES live in tokens.css: the shell injects those once on the
5
+ * top document; federated apps must NOT import tokens.css — they inherit the
6
+ * CSS variables from the shell by cascade (incl. live dark-mode switching).
7
+ */
8
+ @import './tw-animate.css';
9
+ @import './shadcn.css';
10
+
11
+ @custom-variant dark (&:is(.dark *));
12
+
13
+ /* AI activity motion. Both are gated behind motion-safe: at the call site —
14
+ * these run only while Diana is working, and a user who asked for reduced
15
+ * motion should get a static placeholder rather than a frozen loop. */
16
+ @keyframes aiBlip {
17
+ 0%,
18
+ 100% {
19
+ opacity: 0.35;
20
+ transform: translateY(0);
21
+ }
22
+ 50% {
23
+ opacity: 1;
24
+ transform: translateY(-2px);
25
+ }
26
+ }
27
+ @keyframes aiSweep {
28
+ from {
29
+ transform: translateX(-100%);
30
+ }
31
+ to {
32
+ transform: translateX(100%);
33
+ }
34
+ }
35
+
36
+ /* Shimmering TEXT for Diana's live activity — the label of AiActivity. Its
37
+ * two neighbours cover neither case: AiWorking is a pill with dots, and
38
+ * AiShimmer blanks its text to act as a value placeholder — here the words
39
+ * have to stay readable while they glow. Built from the design system's own
40
+ * --ai-grad / --ai-text tokens rather than new colours. */
41
+ @keyframes aiTextSweep {
42
+ from {
43
+ background-position: 180% 0;
44
+ }
45
+ to {
46
+ background-position: -80% 0;
47
+ }
48
+ }
49
+
50
+ /* Dark text, light sweep — the band reads as a glare passing over the words,
51
+ * not a shadow. Base leans on --foreground so the label reads at full
52
+ * strength while live; the peak pulls --ai-text toward --background (toward
53
+ * --foreground in dark, where "whiter" points the other way) so the glare
54
+ * keeps a hint of berry. The finished state is plain --muted-foreground gray
55
+ * (AiExplainSummary), so the contrast drop marks "done". */
56
+ .ai-text-shimmer {
57
+ --shimmer-base: color-mix(in srgb, var(--foreground) 80%, var(--background));
58
+ --shimmer-peak: color-mix(in srgb, var(--background) 65%, var(--ai-text));
59
+ background-image: linear-gradient(
60
+ 90deg,
61
+ var(--shimmer-base) 0%,
62
+ var(--shimmer-base) 34%,
63
+ var(--shimmer-peak) 50%,
64
+ var(--shimmer-base) 66%,
65
+ var(--shimmer-base) 100%
66
+ );
67
+ background-size: 220% 100%;
68
+ background-clip: text;
69
+ -webkit-background-clip: text;
70
+ color: transparent;
71
+ }
72
+
73
+ .dark .ai-text-shimmer {
74
+ --shimmer-base: color-mix(in srgb, var(--foreground) 72%, var(--background));
75
+ --shimmer-peak: color-mix(in srgb, var(--foreground) 70%, var(--ai-text));
76
+ }
77
+
78
+ /* Reduced motion keeps the tint, drops the sweep — a frozen loop reads as a
79
+ * bug, a static tinted label still reads as "working". */
80
+ @media (prefers-reduced-motion: no-preference) {
81
+ .ai-text-shimmer {
82
+ animation: aiTextSweep 1.9s linear infinite;
83
+ }
84
+ }
85
+
86
+ /* Diana's thinking glyph (ThinkingRings): the contour rings counter-rotate at
87
+ * different speeds, so the mark reads as churn while the model works. Ring
88
+ * geometry keeps a clear radial gap at every relative angle, so the rings
89
+ * never touch mid-spin. Reduced motion keeps the still mark, same trade as
90
+ * the shimmer above. */
91
+ @keyframes aiRingsSpin {
92
+ to {
93
+ transform: rotate(1turn);
94
+ }
95
+ }
96
+
97
+ .ai-thinking-rings path {
98
+ /* view-box, not fill-box: each ring's own bounds sit slightly off-centre,
99
+ * so rotating around them would wobble the whole mark. */
100
+ transform-box: view-box;
101
+ transform-origin: 50% 50%;
102
+ }
103
+
104
+ @media (prefers-reduced-motion: no-preference) {
105
+ .ai-thinking-rings path:nth-child(1) {
106
+ animation: aiRingsSpin 5.5s linear infinite;
107
+ }
108
+ .ai-thinking-rings path:nth-child(2) {
109
+ animation: aiRingsSpin 3.8s linear infinite reverse;
110
+ }
111
+ .ai-thinking-rings path:nth-child(3) {
112
+ animation: aiRingsSpin 2.4s linear infinite;
113
+ }
114
+ .ai-thinking-rings path:nth-child(4) {
115
+ animation: aiRingsSpin 1.4s linear infinite reverse;
116
+ }
117
+ }
118
+
119
+ /* Ripple variant (ThinkingRings variant="ripple"): the rings pulse scale and
120
+ * opacity with an inner-first stagger (equal negative-delay steps across one
121
+ * period), so a wave radiates from the centre while the whole mark turns
122
+ * slowly — sonar from the mark's core. The path rules follow the flat-spin
123
+ * block so they win the cascade at equal specificity. */
124
+ @keyframes aiRingsRipple {
125
+ 0%,
126
+ 100% {
127
+ transform: scale(0.93);
128
+ opacity: 0.55;
129
+ }
130
+ 50% {
131
+ transform: scale(1.05);
132
+ opacity: 1;
133
+ }
134
+ }
135
+
136
+ @media (prefers-reduced-motion: no-preference) {
137
+ .ai-thinking-rings-ripple {
138
+ animation: aiRingsSpin 7s linear infinite;
139
+ }
140
+ .ai-thinking-rings-ripple path:nth-child(1) {
141
+ animation: aiRingsRipple 1.2s ease-in-out 0s infinite;
142
+ }
143
+ .ai-thinking-rings-ripple path:nth-child(2) {
144
+ animation: aiRingsRipple 1.2s ease-in-out -0.2s infinite;
145
+ }
146
+ .ai-thinking-rings-ripple path:nth-child(3) {
147
+ animation: aiRingsRipple 1.2s ease-in-out -0.4s infinite;
148
+ }
149
+ .ai-thinking-rings-ripple path:nth-child(4) {
150
+ animation: aiRingsRipple 1.2s ease-in-out -0.6s infinite;
151
+ }
152
+ }
153
+
154
+ @theme inline {
155
+ --color-background: var(--background);
156
+ --color-foreground: var(--foreground);
157
+ --color-card: var(--card);
158
+ --color-card-foreground: var(--card-foreground);
159
+ --color-popover: var(--popover);
160
+ --color-popover-foreground: var(--popover-foreground);
161
+ --color-primary: var(--primary);
162
+ --color-primary-foreground: var(--primary-foreground);
163
+ --color-secondary: var(--secondary);
164
+ --color-secondary-foreground: var(--secondary-foreground);
165
+ --color-muted: var(--muted);
166
+ --color-muted-foreground: var(--muted-foreground);
167
+ --color-accent: var(--accent);
168
+ --color-accent-foreground: var(--accent-foreground);
169
+ --color-destructive: var(--destructive);
170
+ --color-destructive-foreground: var(--destructive-foreground);
171
+ --color-border: var(--border);
172
+ --color-input: var(--input);
173
+ --color-ring: var(--ring);
174
+ /* Radius HIERARCHY. With --radius: 10px this arithmetic lands exactly on the
175
+ * design library's five steps, so nesting reads as nesting:
176
+ * sm 6 (badge) · md 8 (menu item) · lg 10 (control) · xl 14 (card)
177
+ * 2xl 18 (grouped surface) · full (chip, avatar)
178
+ * Anything above 2xl is a pill by another name — use rounded-full. */
179
+ /* xs was the one step still on Tailwind's rem default. It belongs HERE rather
180
+ * than in the px block at the end of the file: `inline` puts the expression in
181
+ * the utility, so it resolves at the element and a --radius override on any
182
+ * subtree reaches it. Emitted as a variable instead, it would resolve once at
183
+ * :root and silently miss every themed subtree the siblings still follow. */
184
+ --radius-xs: calc(var(--radius) - 8px);
185
+ --radius-sm: calc(var(--radius) - 4px);
186
+ --radius-md: calc(var(--radius) - 2px);
187
+ --radius-lg: var(--radius);
188
+ --radius-xl: calc(var(--radius) + 4px);
189
+ --font-sans: 'Inter Variable', 'Inter', system-ui, sans-serif;
190
+ --font-heading: var(--font-sans);
191
+
192
+ /* Dense-UI type sizes. Tailwind's scale has no 13px or 11px step, and the
193
+ * library's chrome is set at both. Added as their own names — text-sm /
194
+ * text-xs keep their standard sizes (pinned to px in the block at the end
195
+ * of this file). `ui` = buttons, inputs, table cells. `micro` = badges,
196
+ * eyebrows. */
197
+ /* Base leading is 1.5 everywhere, including the 12px step — Tailwind ships
198
+ * text-xs at 1.33, which makes a 12px line 2px tighter than every other size
199
+ * and quietly breaks vertical rhythm wherever the two sit side by side. */
200
+ --text-ui: 13px;
201
+ --text-ui--line-height: 1.5;
202
+ --text-micro: 11px;
203
+ --text-micro--line-height: 1.5;
204
+ --text-xs--line-height: 1.5;
205
+ --color-sidebar-ring: var(--sidebar-ring);
206
+ --color-sidebar-border: var(--sidebar-border);
207
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
208
+ --color-sidebar-accent: var(--sidebar-accent);
209
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
210
+ --color-sidebar-primary: var(--sidebar-primary);
211
+ --color-sidebar-foreground: var(--sidebar-foreground);
212
+ --color-sidebar: var(--sidebar);
213
+ --color-chart-6: var(--chart-6);
214
+ --color-chart-5: var(--chart-5);
215
+ --color-chart-4: var(--chart-4);
216
+ --color-chart-3: var(--chart-3);
217
+ --color-chart-2: var(--chart-2);
218
+ --color-chart-1: var(--chart-1);
219
+ --radius-2xl: calc(var(--radius) * 1.8);
220
+ --radius-3xl: calc(var(--radius) * 2.2);
221
+ --radius-4xl: calc(var(--radius) * 2.6);
222
+
223
+ /* ---- text + border ramps beyond shadcn's two levels ---- */
224
+ --color-subtle: var(--text-subtle);
225
+ --color-border-subtle: var(--border-subtle);
226
+ --color-border-strong: var(--border-strong);
227
+ --color-ring-control: var(--ring-control);
228
+
229
+ /* ---- translucent fills (bg-fill-1, …). One token per tier works on light,
230
+ * dark and tinted backgrounds, which a solid grey cannot do. ---- */
231
+ --color-fill-0: var(--fill-0);
232
+ --color-fill-1: var(--fill-1);
233
+ --color-fill-2: var(--fill-2);
234
+ --color-fill-3: var(--fill-3);
235
+
236
+ /* ---- brand as a COMPLEMENTARY accent — never the default action ---- */
237
+ --color-brand: var(--brand);
238
+ --color-brand-text: var(--brand-text);
239
+ --color-brand-tint: var(--brand-tint);
240
+
241
+ /* ---- semantic status. Separate from brand on purpose: a purple-branded
242
+ * ecosystem must still get a green success state. ---- */
243
+ --color-success: var(--success);
244
+ --color-success-text: var(--success-text);
245
+ --color-warning: var(--warning);
246
+ --color-warning-text: var(--warning-text);
247
+ --color-error: var(--error);
248
+ --color-error-text: var(--error-text);
249
+ --color-error-solid: var(--error-solid);
250
+ --color-info: var(--info);
251
+ --color-info-text: var(--info-text);
252
+ --color-neutral: var(--neutral);
253
+
254
+ /* ---- categorical hues (avatars, tags, tonal surfaces) ---- */
255
+ --color-tango: var(--tango);
256
+ --color-tango-text: var(--tango-text);
257
+ --color-amber: var(--amber);
258
+ --color-berry: var(--berry);
259
+ --color-berry-text: var(--berry-text);
260
+ --color-blue: var(--blue);
261
+ --color-slate-hue: var(--slate);
262
+
263
+ /* ---- AI. Berry marks ACTIVITY, not authorship: the gradient while Diana is
264
+ * working, flat berry for provenance, nothing at all on a finished answer. */
265
+ --color-ai: var(--ai);
266
+ --color-ai-text: var(--ai-text);
267
+ --color-ai-tint: var(--ai-tint);
268
+ --color-ai-edge: var(--ai-edge);
269
+ --color-ai-wash: var(--ai-wash);
270
+
271
+ /* ---- control heights, so h-control reads as intent not arithmetic ---- */
272
+ --spacing-control-xs: var(--h-xs);
273
+ --spacing-control-sm: var(--h-sm);
274
+ --spacing-control: var(--h-md);
275
+ --spacing-control-lg: var(--h-lg);
276
+
277
+ --ease-decelerate: var(--ease);
278
+
279
+ /* Rise-X brand colors as utilities (bg-rx-green, text-rx-warning, …) */
280
+ --color-rx-green: var(--rx-green);
281
+ --color-rx-green-dark: var(--rx-green-dark);
282
+ --color-rx-green-light: var(--rx-green-light);
283
+ --color-rx-green-muted: var(--rx-green-muted-bg);
284
+ --color-rx-warning: var(--rx-warning);
285
+ --color-rx-info: var(--rx-info);
286
+
287
+ /* Depth is two-layer and quiet: a tight contact shadow plus a wider ambient
288
+ * one. Cards get no outline at all — a surface plus a whisper of depth is
289
+ * enough, and an outline inside an outline is a box in a box. */
290
+ --shadow-pill: 0 1px 2px rgb(16 24 40 / 0.04);
291
+ --shadow-card: 0 1px 2px rgb(16 24 40 / 0.04), 0 2px 8px -2px rgb(16 24 40 / 0.05);
292
+ --shadow-pop:
293
+ 0 8px 28px -6px rgb(16 24 40 / 0.16), 0 2px 6px -2px rgb(16 24 40 / 0.08),
294
+ 0 0 0 1px rgb(16 24 40 / 0.04);
295
+ --shadow-panel: -8px 0 72px rgb(72 78 82 / 0.12);
296
+ }
297
+
298
+ /*
299
+ * ROOT-INDEPENDENT SIZING — everything below is px on purpose.
300
+ *
301
+ * Tailwind's own scale is rem, and rem resolves against <html> only. The
302
+ * classic host sets `html { font-size: 14px }` (@diana/mui CssBaseline,
303
+ * dianaTheme.tsx), so every rem-based utility rendered at 0.875x there while
304
+ * the kit's OWN tokens — px already: --text-ui 13, --text-micro 11, --h-md 32,
305
+ * --radius 10 — held their size. The result was not uniformly small, it was
306
+ * internally inconsistent: a 13px button label beside a 10.5px `text-xs`
307
+ * caption, 12.25px padding on a 32px control. Because rem is root-relative,
308
+ * no wrapper or subtree override in a consuming app can correct it; pinning
309
+ * the scale here is the only place the fix can live.
310
+ *
311
+ * Pinned to px, every utility renders identically whatever the host puts on
312
+ * <html> — 14px in ClientApp, the browser default in the Shell (which pins no
313
+ * root font size) — and matches the design library's specimens. The pin
314
+ * covers the UTILITY scale only: text with no text-* class still inherits the
315
+ * host's root size, which is why kit content slots (CardTitle, table heads,
316
+ * dialog text) set their own step and consumer-authored children should too.
317
+ *
318
+ * TRADE-OFF: the kit no longer scales with the browser's default-font-size
319
+ * preference. ClientApp's px root already ignored that preference, so the
320
+ * Shell — which honoured it until this block — is where it is actually given
321
+ * up. Browser zoom, what nearly everyone actually uses, still works.
322
+ *
323
+ * --breakpoint-* deliberately stays rem: inside a media query rem resolves
324
+ * against the INITIAL font size — the USER's default, 16px out of the box —
325
+ * never against <html>. So a host cannot rescale breakpoints, which is why
326
+ * they were never part of this bug and must not be converted.
327
+ *
328
+ * Note what that leaves: after this block, breakpoints are the only part of the
329
+ * UTILITY scale still tracking the default-font-size preference the TRADE-OFF
330
+ * above gives up (unclassed inherited text still tracks it too — see the
331
+ * paragraph above, and --tracking-* / --leading-* ride along with it). At a
332
+ * 20px user default, sm: fires at 800px rather than 640px, so a 700px window
333
+ * takes the mobile branch while every type size, gutter and container cap
334
+ * stays at its desktop px value. Deliberate — media queries are the one place
335
+ * the preference still reaches — but it is a reachable state, not an
336
+ * impossible one.
337
+ *
338
+ * Keep this block px. One rem value added here silently brings the bug back.
339
+ */
340
+ @theme {
341
+ /* Drives p-*, m-*, gap-*, w-*, h-*, size-*, inset-*, space-*, translate-*. */
342
+ --spacing: 4px;
343
+
344
+ --text-xs: 12px;
345
+ --text-sm: 14px;
346
+ --text-base: 16px;
347
+ --text-lg: 18px;
348
+ --text-xl: 20px;
349
+ --text-2xl: 24px;
350
+ --text-3xl: 30px;
351
+ --text-4xl: 36px;
352
+ --text-5xl: 48px;
353
+ --text-6xl: 60px;
354
+ --text-7xl: 72px;
355
+ --text-8xl: 96px;
356
+ --text-9xl: 128px;
357
+
358
+ /* max-w-*, min-w-*, w-* and @container sizes. */
359
+ --container-3xs: 256px;
360
+ --container-2xs: 288px;
361
+ --container-xs: 320px;
362
+ --container-sm: 384px;
363
+ --container-md: 448px;
364
+ --container-lg: 512px;
365
+ --container-xl: 576px;
366
+ --container-2xl: 672px;
367
+ --container-3xl: 768px;
368
+ --container-4xl: 896px;
369
+ --container-5xl: 1024px;
370
+ --container-6xl: 1152px;
371
+ --container-7xl: 1280px;
372
+ }
373
+
374
+ /*
375
+ * FORCED COLORS — put a real outline back.
376
+ *
377
+ * Every operable control in the kit sets `outline-none` and draws focus with a
378
+ * ring, which is a box-shadow. Windows High Contrast Mode (forced-colors)
379
+ * discards box-shadows entirely, so those controls had no focus indicator there
380
+ * at all — the ring vanishes and the outline it replaced was already suppressed.
381
+ *
382
+ * One rule covers the kit rather than each component re-stating it, and it is
383
+ * scoped to :focus-visible so it never paints on a mouse click. CanvasText is a
384
+ * system colour, so it stays legible under whichever contrast theme is active.
385
+ *
386
+ * Deliberately un-layered: it has to outrank the `outline-none` / `outline-hidden`
387
+ * utilities that suppressed the outline in the first place, and un-layered
388
+ * declarations beat every cascade layer. The blast radius is bounded by the media
389
+ * query — outside forced-colors mode this rule does not exist, so it cannot
390
+ * shadow a normal focus style the way an un-layered shadow override would.
391
+ */
392
+ @media (forced-colors: active) {
393
+ :where(
394
+ a,
395
+ button,
396
+ input,
397
+ select,
398
+ textarea,
399
+ summary,
400
+ [tabindex],
401
+ [role='button'],
402
+ [role='tab'],
403
+ [role='option'],
404
+ [role='menuitem'],
405
+ [role='switch'],
406
+ [role='checkbox'],
407
+ [role='radio']
408
+ ):focus-visible {
409
+ outline: 2px solid CanvasText;
410
+ outline-offset: 2px;
411
+ }
412
+ }
@@ -0,0 +1 @@
1
+ @property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@theme inline{--animation-delay-0: 0s; --animation-delay-75: 75ms; --animation-delay-100: .1s; --animation-delay-150: .15s; --animation-delay-200: .2s; --animation-delay-300: .3s; --animation-delay-500: .5s; --animation-delay-700: .7s; --animation-delay-1000: 1s; --animation-repeat-0: 0; --animation-repeat-1: 1; --animation-repeat-infinite: infinite; --animation-direction-normal: normal; --animation-direction-reverse: reverse; --animation-direction-alternate: alternate; --animation-direction-alternate-reverse: alternate-reverse; --animation-fill-mode-none: none; --animation-fill-mode-forwards: forwards; --animation-fill-mode-backwards: backwards; --animation-fill-mode-both: both; --percentage-0: 0; --percentage-5: .05; --percentage-10: .1; --percentage-15: .15; --percentage-20: .2; --percentage-25: .25; --percentage-30: .3; --percentage-35: .35; --percentage-40: .4; --percentage-45: .45; --percentage-50: .5; --percentage-55: .55; --percentage-60: .6; --percentage-65: .65; --percentage-70: .7; --percentage-75: .75; --percentage-80: .8; --percentage-85: .85; --percentage-90: .9; --percentage-95: .95; --percentage-100: 1; --percentage-translate-full: 1; --animate-in: enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-out: exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes enter { from { opacity: var(--tw-enter-opacity,1); transform: translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0)); filter: blur(var(--tw-enter-blur,0)); }}@keyframes exit { to { opacity: var(--tw-exit-opacity,1); transform: translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0)); filter: blur(var(--tw-exit-blur,0)); }}--animate-accordion-down: accordion-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-accordion-up: accordion-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-down: collapsible-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-up: collapsible-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes accordion-down { from { height: 0; }to { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }}@keyframes accordion-up { from { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }to { height: 0; }}@keyframes collapsible-down { from { height: 0; }to { height: var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto)))); }}@keyframes collapsible-up { from { height: var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto)))); }to { height: 0; }}--animate-caret-blink: caret-blink 1.25s ease-out infinite; @keyframes caret-blink { 0%,70%,100% { opacity: 1; }20%,50% { opacity: 0; }}}@utility animation-duration-*{--tw-animation-duration: calc(--value(number)*1ms); --tw-animation-duration: --value(--animation-duration-*,[duration],"initial",[*]); animation-duration: calc(--value(number)*1ms); animation-duration: --value(--animation-duration-*,[duration],"initial",[*]);}@utility delay-*{animation-delay: calc(--value(number)*1ms); animation-delay: --value(--animation-delay-*,[duration],"initial",[*]); --tw-animation-delay: calc(--value(number)*1ms); --tw-animation-delay: --value(--animation-delay-*,[duration],"initial",[*]);}@utility repeat-*{animation-iteration-count: --value(--animation-repeat-*,number,"initial",[*]); --tw-animation-iteration-count: --value(--animation-repeat-*,number,"initial",[*]);}@utility direction-*{animation-direction: --value(--animation-direction-*,"initial",[*]); --tw-animation-direction: --value(--animation-direction-*,"initial",[*]);}@utility fill-mode-*{animation-fill-mode: --value(--animation-fill-mode-*,"initial",[*]); --tw-animation-fill-mode: --value(--animation-fill-mode-*,"initial",[*]);}@utility running{animation-play-state: running;}@utility paused{animation-play-state: paused;}@utility play-state-*{animation-play-state: --value("initial",[*]);}@utility blur-in{--tw-enter-blur: 20px;}@utility blur-in-*{--tw-enter-blur: calc(--value(number)*1px); --tw-enter-blur: --value(--blur-*,[*]);}@utility blur-out{--tw-exit-blur: 20px;}@utility blur-out-*{--tw-exit-blur: calc(--value(number)*1px); --tw-exit-blur: --value(--blur-*,[*]);}@utility fade-in{--tw-enter-opacity: 0;}@utility fade-in-*{--tw-enter-opacity: calc(--value(number)/100); --tw-enter-opacity: --value(--percentage-*,[*]);}@utility fade-out{--tw-exit-opacity: 0;}@utility fade-out-*{--tw-exit-opacity: calc(--value(number)/100); --tw-exit-opacity: --value(--percentage-*,[*]);}@utility zoom-in{--tw-enter-scale: 0;}@utility zoom-in-*{--tw-enter-scale: calc(--value(number)*1%); --tw-enter-scale: calc(--value(ratio)); --tw-enter-scale: --value(--percentage-*,[*]);}@utility -zoom-in-*{--tw-enter-scale: calc(--value(number)*-1%); --tw-enter-scale: calc(--value(ratio)*-1); --tw-enter-scale: --value(--percentage-*,[*]);}@utility zoom-out{--tw-exit-scale: 0;}@utility zoom-out-*{--tw-exit-scale: calc(--value(number)*1%); --tw-exit-scale: calc(--value(ratio)); --tw-exit-scale: --value(--percentage-*,[*]);}@utility -zoom-out-*{--tw-exit-scale: calc(--value(number)*-1%); --tw-exit-scale: calc(--value(ratio)*-1); --tw-exit-scale: --value(--percentage-*,[*]);}@utility spin-in{--tw-enter-rotate: 30deg;}@utility spin-in-*{--tw-enter-rotate: calc(--value(number)*1deg); --tw-enter-rotate: calc(--value(ratio)*360deg); --tw-enter-rotate: --value(--rotate-*,[*]);}@utility -spin-in{--tw-enter-rotate: -30deg;}@utility -spin-in-*{--tw-enter-rotate: calc(--value(number)*-1deg); --tw-enter-rotate: calc(--value(ratio)*-360deg); --tw-enter-rotate: --value(--rotate-*,[*]);}@utility spin-out{--tw-exit-rotate: 30deg;}@utility spin-out-*{--tw-exit-rotate: calc(--value(number)*1deg); --tw-exit-rotate: calc(--value(ratio)*360deg); --tw-exit-rotate: --value(--rotate-*,[*]);}@utility -spin-out{--tw-exit-rotate: -30deg;}@utility -spin-out-*{--tw-exit-rotate: calc(--value(number)*-1deg); --tw-exit-rotate: calc(--value(ratio)*-360deg); --tw-exit-rotate: --value(--rotate-*,[*]);}@utility slide-in-from-top{--tw-enter-translate-y: -100%;}@utility slide-in-from-top-*{--tw-enter-translate-y: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-enter-translate-y: calc(--value(ratio)*-100%); --tw-enter-translate-y: calc(--value(--translate-*,[percentage],[length])*-1);}@utility slide-in-from-bottom{--tw-enter-translate-y: 100%;}@utility slide-in-from-bottom-*{--tw-enter-translate-y: calc(--value(integer)*var(--spacing)); --tw-enter-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-enter-translate-y: calc(--value(ratio)*100%); --tw-enter-translate-y: --value(--translate-*,[percentage],[length]);}@utility slide-in-from-left{--tw-enter-translate-x: -100%;}@utility slide-in-from-left-*{--tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-enter-translate-x: calc(--value(ratio)*-100%); --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1);}@utility slide-in-from-right{--tw-enter-translate-x: 100%;}@utility slide-in-from-right-*{--tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-enter-translate-x: calc(--value(ratio)*100%); --tw-enter-translate-x: --value(--translate-*,[percentage],[length]);}@utility slide-in-from-start{&:dir(ltr){ --tw-enter-translate-x: -100%; }&:dir(rtl){ --tw-enter-translate-x: 100%; }}@utility slide-in-from-start-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-enter-translate-x: calc(--value(ratio)*-100%); --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-enter-translate-x: calc(--value(ratio)*100%); --tw-enter-translate-x: --value(--translate-*,[percentage],[length]); }}@utility slide-in-from-end{&:dir(ltr){ --tw-enter-translate-x: 100%; }&:dir(rtl){ --tw-enter-translate-x: -100%; }}@utility slide-in-from-end-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-enter-translate-x: calc(--value(ratio)*100%); --tw-enter-translate-x: --value(--translate-*,[percentage],[length]); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-enter-translate-x: calc(--value(ratio)*-100%); --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1); }}@utility slide-out-to-top{--tw-exit-translate-y: -100%;}@utility slide-out-to-top-*{--tw-exit-translate-y: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-exit-translate-y: calc(--value(ratio)*-100%); --tw-exit-translate-y: calc(--value(--translate-*,[percentage],[length])*-1);}@utility slide-out-to-bottom{--tw-exit-translate-y: 100%;}@utility slide-out-to-bottom-*{--tw-exit-translate-y: calc(--value(integer)*var(--spacing)); --tw-exit-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-exit-translate-y: calc(--value(ratio)*100%); --tw-exit-translate-y: --value(--translate-*,[percentage],[length]);}@utility slide-out-to-left{--tw-exit-translate-x: -100%;}@utility slide-out-to-left-*{--tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-exit-translate-x: calc(--value(ratio)*-100%); --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1);}@utility slide-out-to-right{--tw-exit-translate-x: 100%;}@utility slide-out-to-right-*{--tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-exit-translate-x: calc(--value(ratio)*100%); --tw-exit-translate-x: --value(--translate-*,[percentage],[length]);}@utility slide-out-to-start{&:dir(ltr){ --tw-exit-translate-x: -100%; }&:dir(rtl){ --tw-exit-translate-x: 100%; }}@utility slide-out-to-start-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-exit-translate-x: calc(--value(ratio)*-100%); --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-exit-translate-x: calc(--value(ratio)*100%); --tw-exit-translate-x: --value(--translate-*,[percentage],[length]); }}@utility slide-out-to-end{&:dir(ltr){ --tw-exit-translate-x: 100%; }&:dir(rtl){ --tw-exit-translate-x: -100%; }}@utility slide-out-to-end-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-exit-translate-x: calc(--value(ratio)*100%); --tw-exit-translate-x: --value(--translate-*,[percentage],[length]); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-exit-translate-x: calc(--value(ratio)*-100%); --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1); }}
@@ -0,0 +1 @@
1
+ export { RiseAppManifestPlugin, type RiseAppManifestPluginOptions, } from "./riseAppManifestPlugin";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RiseAppManifestPlugin = void 0;
4
+ // Build-time entry point (`@rise-x/apps-sdk/webpack`). Kept out of the root
5
+ // barrel so an app's runtime bundle never pulls in node:fs.
6
+ var riseAppManifestPlugin_1 = require("./riseAppManifestPlugin");
7
+ Object.defineProperty(exports, "RiseAppManifestPlugin", { enumerable: true, get: function () { return riseAppManifestPlugin_1.RiseAppManifestPlugin; } });
@@ -0,0 +1,61 @@
1
+ import { MANIFEST_GLOBAL_EXPRESSION } from "../manifestSource";
2
+ export { MANIFEST_GLOBAL_EXPRESSION };
3
+ interface CompilationLike {
4
+ errors: Error[];
5
+ fileDependencies: {
6
+ add(file: string): void;
7
+ };
8
+ missingDependencies: {
9
+ add(file: string): void;
10
+ };
11
+ emitAsset(name: string, source: object): void;
12
+ hooks: {
13
+ processAssets: {
14
+ tap(options: {
15
+ name: string;
16
+ stage: number;
17
+ }, fn: () => void): void;
18
+ };
19
+ };
20
+ }
21
+ interface DefinePluginLike {
22
+ new (definitions: Record<string, unknown>): {
23
+ apply(compiler: CompilerLike): void;
24
+ };
25
+ runtimeValue(fn: () => string, options: {
26
+ fileDependencies: string[];
27
+ }): unknown;
28
+ }
29
+ interface CompilerLike {
30
+ context: string;
31
+ webpack: {
32
+ sources: {
33
+ RawSource: new (value: string) => object;
34
+ };
35
+ Compilation: {
36
+ PROCESS_ASSETS_STAGE_ADDITIONAL: number;
37
+ };
38
+ DefinePlugin: DefinePluginLike;
39
+ };
40
+ hooks: {
41
+ thisCompilation: {
42
+ tap(name: string, fn: (compilation: CompilationLike) => void): void;
43
+ };
44
+ };
45
+ }
46
+ export interface RiseAppManifestPluginOptions {
47
+ context?: string;
48
+ environment?: string;
49
+ }
50
+ /**
51
+ * Resolves the app's `rise-x-app.json` for one environment, emits the result
52
+ * into the bundle (so the backend can read the app's dependencies out of the
53
+ * deployed zip), and injects it into the code as a compile-time constant (so
54
+ * `getAppDependencies()` can read it at runtime). No-ops when the app declares
55
+ * no manifest.
56
+ */
57
+ export declare class RiseAppManifestPlugin {
58
+ private readonly options;
59
+ constructor(options?: RiseAppManifestPluginOptions);
60
+ apply(compiler: CompilerLike): void;
61
+ }
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.RiseAppManifestPlugin = exports.MANIFEST_GLOBAL_EXPRESSION = void 0;
37
+ const fs = __importStar(require("node:fs"));
38
+ const manifest_1 = require("../manifest");
39
+ const manifestSource_1 = require("../manifestSource");
40
+ Object.defineProperty(exports, "MANIFEST_GLOBAL_EXPRESSION", { enumerable: true, get: function () { return manifestSource_1.MANIFEST_GLOBAL_EXPRESSION; } });
41
+ const PLUGIN_NAME = "RiseAppManifestPlugin";
42
+ /**
43
+ * Resolves the app's `rise-x-app.json` for one environment, emits the result
44
+ * into the bundle (so the backend can read the app's dependencies out of the
45
+ * deployed zip), and injects it into the code as a compile-time constant (so
46
+ * `getAppDependencies()` can read it at runtime). No-ops when the app declares
47
+ * no manifest.
48
+ */
49
+ class RiseAppManifestPlugin {
50
+ constructor(options = {}) {
51
+ this.options = options;
52
+ }
53
+ apply(compiler) {
54
+ const sourcePath = (0, manifestSource_1.appManifestPath)(this.options.context || compiler.context);
55
+ const environment = (0, manifestSource_1.targetAppEnvironment)(this.options.environment);
56
+ // Injected as a per-bundle compile-time constant rather than assigned to a
57
+ // real runtime global: several federated apps share one page, and a real
58
+ // global would let the last one loaded serve its ids to all of them.
59
+ new compiler.webpack.DefinePlugin({
60
+ [manifestSource_1.MANIFEST_GLOBAL_EXPRESSION]: compiler.webpack.DefinePlugin.runtimeValue(() => {
61
+ try {
62
+ const resolved = (0, manifestSource_1.readResolvedAppManifest)(sourcePath, environment);
63
+ return resolved ? JSON.stringify(resolved) : "undefined";
64
+ }
65
+ catch {
66
+ // The compilation tap below reports the problem as a build error;
67
+ // throwing here would bury it under a webpack internal stack.
68
+ return "undefined";
69
+ }
70
+ }, { fileDependencies: [sourcePath] }),
71
+ }).apply(compiler);
72
+ compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
73
+ // Read per compilation so watch mode picks up edits. Register the path
74
+ // either way, so creating a missing manifest also triggers a rebuild.
75
+ if (!fs.existsSync(sourcePath)) {
76
+ compilation.missingDependencies.add(sourcePath);
77
+ return;
78
+ }
79
+ compilation.fileDependencies.add(sourcePath);
80
+ let contents;
81
+ try {
82
+ const resolved = (0, manifestSource_1.readResolvedAppManifest)(sourcePath, environment);
83
+ // Only if the file went away between the check above and the read.
84
+ if (!resolved)
85
+ return;
86
+ contents = (0, manifestSource_1.formatResolvedAppManifest)(resolved);
87
+ }
88
+ catch (err) {
89
+ // A compilation error rather than a throw: watch mode has to survive
90
+ // an invalid edit and recover on the next save.
91
+ compilation.errors.push(new Error(`${PLUGIN_NAME}: ${err.message}`));
92
+ return;
93
+ }
94
+ compilation.hooks.processAssets.tap({
95
+ name: PLUGIN_NAME,
96
+ stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL,
97
+ }, () => {
98
+ compilation.emitAsset(manifest_1.APP_MANIFEST_FILENAME, new compiler.webpack.sources.RawSource(contents));
99
+ });
100
+ });
101
+ }
102
+ }
103
+ exports.RiseAppManifestPlugin = RiseAppManifestPlugin;
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@rise-x/apps-sdk/dependencies",
3
+ "description": "Legacy-resolution stub for the dependencies subpath. See parent package.json `exports` for the canonical wiring.",
4
+ "main": "../build/dependencies/index.js",
5
+ "module": "../build/dependencies/index.js",
6
+ "types": "../build/dependencies/index.d.ts",
7
+ "private": true
8
+ }