@allyhub/sdk 0.15.2 → 0.17.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 (131) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/node_modules/@allyhub/audio/dist/index.d.ts +1 -0
  3. package/dist/node_modules/@allyhub/audio/dist/index.js +1 -1
  4. package/dist/node_modules/@allyhub/audio/dist/place.d.ts +26 -0
  5. package/dist/node_modules/@allyhub/audio/dist/place.js +2 -0
  6. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  7. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  8. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  9. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +15 -3
  10. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  11. package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
  12. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +70 -11
  13. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  14. package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +15 -4
  15. package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
  16. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +4 -0
  17. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  18. package/dist/node_modules/@allyhub/image-draw/dist/stage.js +1 -1
  19. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  20. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  21. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  22. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  23. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  24. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +15 -0
  25. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -0
  26. package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
  27. package/dist/node_modules/@allyhub/piece/dist/page/runtimes.d.ts +9 -0
  28. package/dist/node_modules/@allyhub/piece/dist/page/runtimes.js +2 -0
  29. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +53 -10
  30. package/dist/node_modules/@allyhub/piece/dist/source.js +1 -1
  31. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  32. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +10 -11
  33. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  34. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +7 -0
  35. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  36. package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +9 -0
  37. package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
  38. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +2 -0
  39. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  40. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +77 -0
  41. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +2 -0
  42. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +39 -9
  43. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  44. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +15 -15
  45. package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +441 -5
  46. package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
  47. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -2
  48. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +4 -1
  49. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  50. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +8 -0
  51. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  52. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +5 -5
  53. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +45 -0
  54. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
  55. package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +134 -0
  56. package/dist/node_modules/@allyhub/protocol/dist/paywall.js +2 -0
  57. package/dist/node_modules/@allyhub/protocol/dist/place.js +1 -1
  58. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +3 -3
  59. package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +47 -0
  60. package/dist/node_modules/@allyhub/protocol/dist/purposes.js +2 -0
  61. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  62. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +52 -5
  63. package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
  64. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +34 -0
  65. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +2 -0
  66. package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +1 -0
  67. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +21 -52
  68. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  69. package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +264 -0
  70. package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +2 -0
  71. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +18 -0
  72. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +2 -0
  73. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +97 -0
  74. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +2 -0
  75. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +3 -2
  76. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  77. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +26 -20
  78. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  79. package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +71 -0
  80. package/dist/node_modules/@allyhub/protocol/dist/turns.js +2 -0
  81. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  82. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  83. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  84. package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
  85. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.d.ts +12 -0
  86. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  87. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
  88. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
  89. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/dynamic.js +1 -1
  90. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
  91. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/logical.js +1 -1
  92. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
  93. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
  94. package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
  95. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.d.ts +1 -1
  96. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  97. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  98. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  99. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  100. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  101. package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +10 -0
  102. package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
  103. package/dist/node_modules/@allyhub/slides-core/dist/api.js +1 -1
  104. package/dist/node_modules/@allyhub/slides-core/dist/components.js +1 -1
  105. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +3 -1
  106. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +5 -0
  107. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  108. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  109. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  110. package/dist/node_modules/@allyhub/video-sdk/dist/free.d.ts +1 -1
  111. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  112. package/docs/batches.md +4 -4
  113. package/docs/contract.md +5 -5
  114. package/docs/defaults.md +2 -2
  115. package/docs/docs.md +16 -5
  116. package/docs/footage.md +8 -8
  117. package/docs/image.md +5 -5
  118. package/docs/layers.md +12 -10
  119. package/docs/linkedin.md +1 -1
  120. package/docs/modeling.md +3 -3
  121. package/docs/pictures.md +4 -4
  122. package/docs/project.md +11 -7
  123. package/docs/scenery.md +3 -3
  124. package/docs/sheets.md +5 -5
  125. package/docs/slides.md +3 -3
  126. package/docs/sound.md +7 -7
  127. package/docs/speech.md +7 -7
  128. package/docs/video.md +3 -3
  129. package/docs/websites.md +3 -3
  130. package/docs/x.md +2 -2
  131. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  Feature highlights from each AllyHub release.
4
4
 
5
+ ## 0.17.0
6
+
7
+ - **Turn into.** Beside Download, make another kind of what is on show, such as a deck into a video, and say how in your own words before you send it.
8
+ - **One piece can use another.** A sheet's table in a deck or a doc, a video on a slide, a deck in a video: change the source and every piece that uses it follows.
9
+ - **Your own Claude Code and Codex, whatever their version.** Studio uses the newest one on your Mac.
10
+ - **Conversation titles are your words**, never what Studio adds for the agent.
11
+ - **Projects are deleted in the sidebar alone.** Cloud storage in Settings shows what takes room and clears what is no longer in use.
12
+
13
+ ## 0.16.0
14
+
15
+ - **One Studio on your Mac and in the cloud.** The app opens the same Studio as AllyHub in the cloud, with your projects and conversations as they were.
16
+ - **Your files open in Studio.** CSV, Excel, PowerPoint and Word files open to read, and everything has Download.
17
+ - **Delete from the sidebar.** What you delete goes to the project's trash, where your agent can bring it back.
18
+ - **Pictures you add stay in the project.** Your agent can use a photo you paste in what it makes, not only look at it, and it answers in the language you write in.
19
+ - **Your PowerPoint and Excel files stay editable.** One you give your agent becomes a deck or a sheet you can edit, downloaded as the file again.
20
+ - **An example project to start from**, with a doc, a sheet, a deck, images and a video.
21
+
22
+ ## 0.15.3
23
+
24
+ - **The editor keeps running after the agent's turn ends.** `allyhub dev` now returns once the page is up and serves in the background; `allyhub dev --stop` stops it, and `--foreground` serves until Ctrl+C as before.
25
+ - **The editor page comes back by itself** when it is started again. If it stops, the page says so and gives you a sentence to send your agent.
26
+ - **The agent asks you to sign in before it starts**, when you are signed out, and says which of AllyHub's tools the work would use.
27
+ - **The agent starts from the work skill for the job**, looking up AllyHub's work skills first.
28
+
5
29
  ## 0.15.2
6
30
 
7
31
  - **The agent hands work over in its editor.** It makes each piece in AllyHub, shows it open in its editor for you to look at and mark up, and exports a PowerPoint, Word or Excel file when you say it is final.
@@ -1,4 +1,5 @@
1
1
  export { SAMPLE_RATE, type FootageClip, type GainPoint, type MixPlan, type MusicPlay, type MusicSegment, type PartSpan, type Segment, type SfxPlay, type SpeechClip, type Stereo, type VoicePlan, } from "./plan.js";
2
+ export { mergePlans, placePlan, type PlacedSound } from "./place.js";
2
3
  export { addEnvelopes, duckEnvelope, equalPower, gainAt, speechEnvelope, speechSpans, type Span, } from "./envelope.js";
3
4
  export { clipSource, decodeKey, decodings, speechHow, type DecodeAs, type SoundOf, } from "./decode.js";
4
5
  export { renderMix, playSfx, type RenderOptions } from "./render.js";
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export{SAMPLE_RATE}from"./plan.js";export{addEnvelopes,duckEnvelope,equalPower,gainAt,speechEnvelope,speechSpans}from"./envelope.js";export{clipSource,decodeKey,decodings,speechHow}from"./decode.js";export{renderMix,playSfx}from"./render.js";export{playMusic}from"./music.js";export{hashSeed,SFX_HIT,synthSfx}from"./sfx.js";export{addSpeech,playVoice,sumSpeech,voiceGroups}from"./voice.js";export{limitPeaks,masterMix,previewMaster}from"./master.js";export{drySpeech,recordedSpeech}from"./recorded.js";export{db,levelCurve,silenceBands,soundAtCut,waveColumns}from"./at-cut.js";export{MASTER_DEFAULTS,MASTER_MECHANICS,MIX_DEFAULTS,resolveMaster,resolveMix}from"./levels.js";export{BAND_TYPES,bandAt,COMPRESS_DEFAULTS,shapeProblem,shapes,shapeSound,soundFilterProblem,soundLevel}from"./shape.js";export*from"./recording/index.js";export{biquad,biquadGain,BUTTERWORTH_Q,chainGain,fromDb,runBiquads,toDb}from"./recording/filters.js";export{convolve,fft,magnitudes,minimumPhase,nextPow2}from"./recording/fft.js";export{agc,compress,deess,gainComputer}from"./recording/dynamics.js";
2
+ export{SAMPLE_RATE}from"./plan.js";export{mergePlans,placePlan}from"./place.js";export{addEnvelopes,duckEnvelope,equalPower,gainAt,speechEnvelope,speechSpans}from"./envelope.js";export{clipSource,decodeKey,decodings,speechHow}from"./decode.js";export{renderMix,playSfx}from"./render.js";export{playMusic}from"./music.js";export{hashSeed,SFX_HIT,synthSfx}from"./sfx.js";export{addSpeech,playVoice,sumSpeech,voiceGroups}from"./voice.js";export{limitPeaks,masterMix,previewMaster}from"./master.js";export{drySpeech,recordedSpeech}from"./recorded.js";export{db,levelCurve,silenceBands,soundAtCut,waveColumns}from"./at-cut.js";export{MASTER_DEFAULTS,MASTER_MECHANICS,MIX_DEFAULTS,resolveMaster,resolveMix}from"./levels.js";export{BAND_TYPES,bandAt,COMPRESS_DEFAULTS,shapeProblem,shapes,shapeSound,soundFilterProblem,soundLevel}from"./shape.js";export*from"./recording/index.js";export{biquad,biquadGain,BUTTERWORTH_Q,chainGain,fromDb,runBiquads,toDb}from"./recording/filters.js";export{convolve,fft,magnitudes,minimumPhase,nextPow2}from"./recording/fft.js";export{agc,compress,deess,gainComputer}from"./recording/dynamics.js";
@@ -0,0 +1,26 @@
1
+ import type { MixPlan } from "./plan.js";
2
+ /** Where a film's sound plays inside another's. */
3
+ export interface PlacedSound {
4
+ /** The outer film's second it starts at. */
5
+ at: number;
6
+ /** Its own seconds it plays from and to (its trim); default all of it. */
7
+ begin?: number;
8
+ end?: number;
9
+ /** Played again from `begin` each time it reaches `end`, till `until`. */
10
+ loop?: boolean;
11
+ /** The outer film's second it stops at, wherever it is (the slide goes). */
12
+ until?: number;
13
+ }
14
+ /**
15
+ * A film's plan where it plays inside another: its stretch from `begin` to
16
+ * `end`, from the outer second `at`, again where it loops, never past
17
+ * `until`.
18
+ */
19
+ export declare function placePlan(plan: MixPlan, where: PlacedSound): MixPlan;
20
+ /**
21
+ * A film's plan with others' laid beside it: their speech, footage and
22
+ * sounds with its own; their music and voice where it has none (the
23
+ * first's), and its length the longest.
24
+ */
25
+ export declare function mergePlans(base: MixPlan, others: readonly MixPlan[]): MixPlan;
26
+ //# sourceMappingURL=place.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ function r(e,c,t,o){const i=Math.max(e.at,c),a=Math.min(e.at+e.dur,t);if(!(a<=i))return{...e,at:i+o,from:e.from+(i-e.at)*(e.speed??1),dur:a-i}}function f(e,c,t,o){const i=e.filter(a=>a.t<=c).at(-1);return[...i?[{t:c+o,db:i.db}]:[],...e.filter(a=>a.t>c&&a.t<t).map(a=>({t:a.t+o,db:a.db}))]}function m(e,c,t,o){const i=e.music&&{...e.music,segments:e.music.segments.flatMap(s=>{const n=r(s,c,t,o);return n?[n]:[]}),duck:f(e.music.duck,c,t,o),until:Math.min(e.music.until??e.duration,t)+o},a=(e.voice?.spans??[]).flatMap(s=>{const n=Math.max(s.start,c),u=Math.min(s.end,t);return u>n?[{...s,start:n+o,end:u+o}]:[]});return{duration:t+o,speech:e.speech.flatMap(s=>{const n=r(s,c,t,o);return n?[n]:[]}),footage:e.footage.flatMap(s=>{const n=r(s,c,t,o);return n?[{...n,...s.envelope?{envelope:f(s.envelope,c,t,o)}:{}}]:[]}),sfx:e.sfx.flatMap(s=>{if(s.at<c||s.at>=t)return[];const n=t-s.at;return[{...s,at:s.at+o,...s.file===void 0?{}:{length:Math.min(s.length??n,n)}}]}),...i&&i.segments.length>0?{music:i}:{},...e.speechGain?{speechGain:f(e.speechGain,c,t,o)}:{},...e.voice?{voice:{...e.voice,spans:a}}:{}}}export function placePlan(e,c){const t=Math.max(0,c.begin??0),o=Math.min(e.duration,c.end??e.duration),i=o-t,a=c.until??1/0,s=[];for(let n=c.at;i>0&&n<a&&(s.length===0||c.loop===!0);n+=i){const u=Math.min(o,t+(a-n));if(s.push(m(e,t,u,n-t)),s.length>=1e3)break}return mergePlans({duration:0,speech:[],footage:[],sfx:[]},s)}export function mergePlans(e,c){let t={...e};for(const o of c){const i=t.music??o.music,a=t.voice?o.voice?.seed===t.voice.seed?{...t.voice,spans:[...t.voice.spans,...o.voice.spans]}:t.voice:o.voice,s=t.speechGain&&o.speechGain?[...t.speechGain,...o.speechGain].sort((n,u)=>n.t-u.t):t.speechGain??o.speechGain;t={duration:Math.max(t.duration,o.duration),speech:[...t.speech,...o.speech],footage:[...t.footage,...o.footage],sfx:[...t.sfx,...o.sfx],...i?{music:i}:{},...s?{speechGain:s}:{},...a?{voice:a}:{}}}return t}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/audio",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/chart",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/diagnostics",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -982,8 +982,8 @@ export type PlaybackFile = z.infer<typeof PlaybackSchema>;
982
982
  /**
983
983
  * A shape on a slide, by its name. Without a kind it changes a shape the
984
984
  * slide has already (a layout's placeholder, a generator's shape); with
985
- * one (`textbox`, `picture`, `movie`, `geometry`, `component`) it is a
986
- * shape of the slide's own.
985
+ * one (`textbox`, `picture`, `movie`, `geometry`, `component`, `item`) it
986
+ * is a shape of the slide's own.
987
987
  */
988
988
  export declare const ShapeSchema: z.ZodObject<{
989
989
  frame: z.ZodOptional<z.ZodObject<{
@@ -1495,6 +1495,7 @@ export declare const ShapeSchema: z.ZodObject<{
1495
1495
  }, z.core.$strict>>;
1496
1496
  movie: z.ZodOptional<z.ZodString>;
1497
1497
  audio: z.ZodOptional<z.ZodString>;
1498
+ item: z.ZodOptional<z.ZodString>;
1498
1499
  poster: z.ZodOptional<z.ZodNumber>;
1499
1500
  playback: z.ZodOptional<z.ZodObject<{
1500
1501
  start: z.ZodOptional<z.ZodEnum<{
@@ -1895,6 +1896,9 @@ export declare const ShapeSchema: z.ZodObject<{
1895
1896
  rows: z.ZodOptional<z.ZodInt>;
1896
1897
  columns: z.ZodOptional<z.ZodInt>;
1897
1898
  }, z.core.$strip>>>;
1899
+ data: z.ZodOptional<z.ZodString>;
1900
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1901
+ head: z.ZodOptional<z.ZodBoolean>;
1898
1902
  style: z.ZodOptional<z.ZodString>;
1899
1903
  first_row: z.ZodOptional<z.ZodBoolean>;
1900
1904
  last_row: z.ZodOptional<z.ZodBoolean>;
@@ -2205,7 +2209,7 @@ export declare function showJumpOf(link: string): ShowJump | undefined;
2205
2209
  /** A link's slide (`#<id>`), if it is one. */
2206
2210
  export declare const slideLinkOf: (link: string) => string | undefined;
2207
2211
  /** The kinds a shape of the slide's own is, by the field that makes it. */
2208
- export declare const SHAPE_KINDS: readonly ["textbox", "picture", "movie", "audio", "geometry", "path", "table", "chart", "component"];
2212
+ export declare const SHAPE_KINDS: readonly ["textbox", "picture", "movie", "audio", "geometry", "path", "table", "chart", "component", "item"];
2209
2213
  /** How a slide comes on from the one before, by PowerPoint's transitions. */
2210
2214
  export declare const SLIDE_TRANSITIONS: readonly ["fade", "push", "wipe", "split", "reveal", "cut", "cover", "uncover", "zoom", "morph"];
2211
2215
  export type SlideTransitionType = (typeof SLIDE_TRANSITIONS)[number];
@@ -2836,6 +2840,7 @@ export declare const SlideSchema: z.ZodObject<{
2836
2840
  }, z.core.$strict>>;
2837
2841
  movie: z.ZodOptional<z.ZodString>;
2838
2842
  audio: z.ZodOptional<z.ZodString>;
2843
+ item: z.ZodOptional<z.ZodString>;
2839
2844
  poster: z.ZodOptional<z.ZodNumber>;
2840
2845
  playback: z.ZodOptional<z.ZodObject<{
2841
2846
  start: z.ZodOptional<z.ZodEnum<{
@@ -3236,6 +3241,9 @@ export declare const SlideSchema: z.ZodObject<{
3236
3241
  rows: z.ZodOptional<z.ZodInt>;
3237
3242
  columns: z.ZodOptional<z.ZodInt>;
3238
3243
  }, z.core.$strip>>>;
3244
+ data: z.ZodOptional<z.ZodString>;
3245
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
3246
+ head: z.ZodOptional<z.ZodBoolean>;
3239
3247
  style: z.ZodOptional<z.ZodString>;
3240
3248
  first_row: z.ZodOptional<z.ZodBoolean>;
3241
3249
  last_row: z.ZodOptional<z.ZodBoolean>;
@@ -4216,6 +4224,7 @@ export declare const SlidesFileSchema: z.ZodObject<{
4216
4224
  }, z.core.$strict>>;
4217
4225
  movie: z.ZodOptional<z.ZodString>;
4218
4226
  audio: z.ZodOptional<z.ZodString>;
4227
+ item: z.ZodOptional<z.ZodString>;
4219
4228
  poster: z.ZodOptional<z.ZodNumber>;
4220
4229
  playback: z.ZodOptional<z.ZodObject<{
4221
4230
  start: z.ZodOptional<z.ZodEnum<{
@@ -4616,6 +4625,9 @@ export declare const SlidesFileSchema: z.ZodObject<{
4616
4625
  rows: z.ZodOptional<z.ZodInt>;
4617
4626
  columns: z.ZodOptional<z.ZodInt>;
4618
4627
  }, z.core.$strip>>>;
4628
+ data: z.ZodOptional<z.ZodString>;
4629
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
4630
+ head: z.ZodOptional<z.ZodBoolean>;
4619
4631
  style: z.ZodOptional<z.ZodString>;
4620
4632
  first_row: z.ZodOptional<z.ZodBoolean>;
4621
4633
  last_row: z.ZodOptional<z.ZodBoolean>;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as o}from"zod";import{SCRIPT_NAME as _}from"./script.js";const h=o.string().regex(_,"A name is letters, digits, _ and -.");export const THEME_COLORS=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],TEXT_ALIGNS=["l","ctr","r","just"],SHAPE_GEOMETRIES=["line","lineInv","triangle","rtTriangle","rect","diamond","parallelogram","trapezoid","nonIsoscelesTrapezoid","pentagon","hexagon","heptagon","octagon","decagon","dodecagon","star4","star5","star6","star7","star8","star10","star12","star16","star24","star32","roundRect","round1Rect","round2SameRect","round2DiagRect","snipRoundRect","snip1Rect","snip2SameRect","snip2DiagRect","plaque","ellipse","teardrop","homePlate","chevron","pieWedge","pie","blockArc","donut","noSmoking","rightArrow","leftArrow","upArrow","downArrow","stripedRightArrow","notchedRightArrow","bentUpArrow","leftRightArrow","upDownArrow","leftUpArrow","leftRightUpArrow","quadArrow","leftArrowCallout","rightArrowCallout","upArrowCallout","downArrowCallout","leftRightArrowCallout","upDownArrowCallout","quadArrowCallout","bentArrow","uturnArrow","circularArrow","leftCircularArrow","leftRightCircularArrow","curvedRightArrow","curvedLeftArrow","curvedUpArrow","curvedDownArrow","swooshArrow","cube","can","lightningBolt","heart","sun","moon","smileyFace","irregularSeal1","irregularSeal2","foldedCorner","bevel","frame","halfFrame","corner","diagStripe","chord","arc","leftBracket","rightBracket","leftBrace","rightBrace","bracketPair","bracePair","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5","callout1","callout2","callout3","accentCallout1","accentCallout2","accentCallout3","borderCallout1","borderCallout2","borderCallout3","accentBorderCallout1","accentBorderCallout2","accentBorderCallout3","wedgeRectCallout","wedgeRoundRectCallout","wedgeEllipseCallout","cloudCallout","cloud","ribbon","ribbon2","ellipseRibbon","ellipseRibbon2","leftRightRibbon","verticalScroll","horizontalScroll","wave","doubleWave","plus","flowChartProcess","flowChartDecision","flowChartInputOutput","flowChartPredefinedProcess","flowChartInternalStorage","flowChartDocument","flowChartMultidocument","flowChartTerminator","flowChartPreparation","flowChartManualInput","flowChartManualOperation","flowChartConnector","flowChartPunchedCard","flowChartPunchedTape","flowChartSummingJunction","flowChartOr","flowChartCollate","flowChartSort","flowChartExtract","flowChartMerge","flowChartOfflineStorage","flowChartOnlineStorage","flowChartMagneticTape","flowChartMagneticDisk","flowChartMagneticDrum","flowChartDisplay","flowChartDelay","flowChartAlternateProcess","flowChartOffpageConnector","actionButtonBlank","actionButtonHome","actionButtonHelp","actionButtonInformation","actionButtonForwardNext","actionButtonBackPrevious","actionButtonEnd","actionButtonBeginning","actionButtonReturn","actionButtonDocument","actionButtonSound","actionButtonMovie","gear6","gear9","funnel","mathPlus","mathMinus","mathMultiply","mathDivide","mathEqual","mathNotEqual","cornerTabs","squareTabs","plaqueTabs","chartX","chartStar","chartPlus"],ANIMATION_EFFECTS=["appear","fade","fly-in","float-in","split","wipe","zoom","disappear","fade-out","fly-out","float-out","split-out","wipe-out","zoom-out","pulse","grow-shrink","spin","transparency","path"],ANIMATE_TEXT=["word","letter"],ANIMATION_REPEATS=["until-next-click","until-end-of-slide"],ANIMATION_STARTS=["on-click","with-previous","after-previous"],ANIMATION_DIRECTIONS=["from-bottom","from-top","from-left","from-right","from-top-right","from-bottom-right","from-top-left","from-bottom-left","vertical-out","vertical-in","horizontal-out","horizontal-in","in","out","rotate","up","down","clockwise","counterclockwise","both","horizontal","vertical"],LINE_DASHES=["solid","sysDot","sysDash","dash","dashDot","lgDash","lgDashDot","lgDashDotDot","dot","sysDashDot","sysDashDotDot"],LINE_CAPS=["flat","rnd","sq"],LINE_JOINS=["round","bevel","miter"],LINE_COMPOUNDS=["sng","dbl","thickThin","thinThick","tri"],LINE_ENDS=["none","triangle","arrow","stealth","diamond","oval"],ARROW_SIZES=["sm","med","lg"],LineEndSizeSchema=o.strictObject({w:o.enum(ARROW_SIZES).optional(),len:o.enum(ARROW_SIZES).optional()}),FrameSchema=o.strictObject({x:o.number(),y:o.number(),w:o.number().nonnegative(),h:o.number().nonnegative()}),MAPPED_COLORS=["tx1","bg1","tx2","bg2"],COLOR_NAMES=[...THEME_COLORS,...MAPPED_COLORS],COLOR_TRANSFORMS=["tint","shade","lumMod","lumOff","lum","satMod","satOff","sat","hueMod","hueOff","hue","alpha","alphaMod","alphaOff"];const C=`(?:${COLOR_NAMES.join("|")})`,k=`(?:${COLOR_TRANSFORMS.join("|")}) -?\\d+(?:\\.\\d+)?(?:%|°)`,A=new RegExp(`^(${C}) (lighter|darker) (100(?:\\.0{1,3})?|[1-9]?\\d(?:\\.\\d{1,3})?)%$`,"u"),v=new RegExp(`^(${C}|#[0-9A-Fa-f]{6})((?: ${k})+)$`,"u"),O=/^#[0-9A-Fa-f]{6}$/u,g=t=>COLOR_NAMES.includes(t),E=t=>COLOR_TRANSFORMS.includes(t),y=new Set(["hue","hueOff"]);export function colorOfFile(t){if(g(t))return t;if(O.test(t))return{rgb:t.toUpperCase()};const e=v.exec(t);if(e){const[,l="",p=""]=e,m=[];for(const w of p.matchAll(/ (\w+) (-?[\d.]+)(%|°)/gu)){const[,u="",D="",x]=w;if(!E(u)||x==="°"!==y.has(u))return;const S=Number(D);m.push({name:u,value:x==="%"?Math.round(S*1e3)/1e5:S})}return g(l)?{theme_color:l,transforms:m}:{rgb:l.toUpperCase(),transforms:m}}const r=A.exec(t),[,n="",i,s=""]=r??[],a=Math.round(Number(s)*1e3);if(!(!r||!g(n)||a<=0||a>1e5))return{theme_color:n,brightness:(i==="lighter"?a:-a)/1e5}}const P=t=>y.has(t.name)?`${t.name} ${String(Math.round(t.value*1e3)/1e3)}°`:`${t.name} ${String(Math.round(t.value*1e5)/1e3)}%`;export function colorFile(t){if(typeof t=="string")return t;if("rgb"in t)return t.transforms&&t.transforms.length>0?`${t.rgb} ${t.transforms.map(P).join(" ")}`:t.rgb;if("transforms"in t)return t.transforms.length===0?t.theme_color:`${t.theme_color} ${t.transforms.map(P).join(" ")}`;const e=Math.round(Math.abs(t.brightness)*1e5)/1e3;return e===0?t.theme_color:`${t.theme_color} ${t.brightness>0?"lighter":"darker"} ${String(e)}%`}const d=`A colour is one of the theme's (${THEME_COLORS.join(", ")}) or the colour map's (${MAPPED_COLORS.join(", ")}), one of them lighter or darker by a share over 0 up to 100% ("accent1 lighter 40%", "dk1 darker 25%"), #RRGGBB, or one of them with DrawingML's transforms in order ("accent1 lumMod 75% lumOff 25%", "#4472C4 alpha 50%", "accent2 hueOff 30°": ${COLOR_TRANSFORMS.join(", ")}).`;export const ColorFileSchema=o.union([o.enum(COLOR_NAMES),o.string().regex(A,d),o.string().regex(O,d),o.string().regex(v,d)]).refine(t=>colorOfFile(t)!==void 0,d),NUMBERINGS=["alphaLcParenBoth","alphaUcParenBoth","alphaLcParenR","alphaUcParenR","alphaLcPeriod","alphaUcPeriod","arabicParenBoth","arabicParenR","arabicPeriod","arabicPlain","romanLcParenBoth","romanUcParenBoth","romanLcParenR","romanUcParenR","romanLcPeriod","romanUcPeriod","circleNumDbPlain","circleNumWdBlackPlain","circleNumWdWhitePlain","arabicDbPeriod","arabicDbPlain","ea1ChsPeriod","ea1ChsPlain","ea1ChtPeriod","ea1ChtPlain","ea1JpnChsDbPeriod","ea1JpnKorPlain","ea1JpnKorPeriod","arabic1Minus","arabic2Minus","hebrew2Minus","thaiAlphaPeriod","thaiAlphaParenR","thaiAlphaParenBoth","thaiNumPeriod","thaiNumParenR","thaiNumParenBoth","hindiAlphaPeriod","hindiNumPeriod","hindiNumParenR","hindiAlpha1Period"],UNDERLINES=["sng","dbl","heavy","dotted","dottedHeavy","dash","dashHeavy","dashLong","dashLongHeavy","dotDash","dotDashHeavy","dotDotDash","dotDotDashHeavy","wavy","wavyHeavy","wavyDbl","words"],STRIKES=["sngStrike","dblStrike"],CAPS=["all","small","none"],TEXT_ORIENTATIONS=["horz","vert","vert270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"],TEXT_ANCHORS=["t","ctr","b"],ParagraphSpaceSchema=o.union([o.number().min(0).max(1584),o.object({lines:o.number().min(0).max(100)})]),TextStyleSchema=o.strictObject({size:o.number().positive().max(4e3).optional(),bold:o.boolean().optional(),italic:o.boolean().optional(),underline:o.union([o.boolean(),o.enum(UNDERLINES)]).optional(),strike:o.union([o.boolean(),o.enum(STRIKES)]).optional(),caps:o.enum(CAPS).optional(),color:ColorFileSchema.optional(),font:o.string().min(1).optional(),align:o.enum(TEXT_ALIGNS).optional(),line_spacing:o.number().positive().max(10).optional(),space_before:ParagraphSpaceSchema.optional(),space_after:ParagraphSpaceSchema.optional(),anchor:o.enum(TEXT_ANCHORS).optional(),orientation:o.enum(TEXT_ORIENTATIONS).optional(),bullet:o.union([o.literal(!1),o.string().min(1).max(2)]).optional(),numbered:o.enum(NUMBERINGS).optional(),bullet_color:ColorFileSchema.optional(),bullet_size:o.number().min(.25).max(4).optional(),start_at:o.int().min(1).max(32767).optional()});const T=o.strictObject({left:o.number().lt(1).optional(),top:o.number().lt(1).optional(),right:o.number().lt(1).optional(),bottom:o.number().lt(1).optional()}).refine(t=>(t.left??0)+(t.right??0)<1,{message:"left and right together cut the whole picture away"}).refine(t=>(t.top??0)+(t.bottom??0)<1,{message:"top and bottom together cut the whole picture away"}),b=o.lazy(()=>o.union([o.string(),o.number(),o.boolean(),o.null(),o.array(b),o.record(o.string(),b)]));export const CHART_TYPES=["column-clustered","column-stacked","column-stacked-100","bar-clustered","bar-stacked","bar-stacked-100","line","line-markers","area","area-stacked","area-stacked-100","pie","doughnut"],SHEET_CHART_TYPES=[...CHART_TYPES,"scatter","scatter-lines","scatter-smooth"],CHART_LEGEND_POSITIONS=["bottom","top","left","right"],CHART_COMBINED_TYPES=["column-clustered","column-stacked","column-stacked-100","line","line-markers","area","area-stacked","area-stacked-100"];const f=o.strictObject({min:o.number().optional(),max:o.number().optional(),major:o.number().positive().optional(),gridlines:o.boolean().optional(),visible:o.boolean().optional(),format:o.string().min(1).optional(),reverse:o.boolean().optional(),gridline_color:ColorFileSchema.optional(),line_color:ColorFileSchema.optional()});export const ChartSchema=o.strictObject({type:o.enum(SHEET_CHART_TYPES),data:o.string().min(1).optional(),categories:o.union([o.string().min(1),o.array(o.string())]).optional(),series:o.array(o.union([o.string().min(1),o.strictObject({name:o.string().min(1),values:o.array(o.number().nullable()).optional(),x:o.array(o.number().nullable()).optional(),color:ColorFileSchema.optional(),format:o.string().min(1).optional(),smooth:o.boolean().optional(),line_width:o.number().positive().optional(),marker_size:o.number().int().min(2).max(72).optional(),type:o.enum(CHART_COMBINED_TYPES).optional(),secondary:o.boolean().optional()})])).min(1),legend:o.enum(CHART_LEGEND_POSITIONS).optional(),labels:o.union([o.boolean(),o.strictObject({value:o.boolean().optional(),percentage:o.boolean().optional(),category:o.boolean().optional(),series:o.boolean().optional(),format:o.string().min(1).optional(),position:o.enum(["outEnd","inEnd","ctr","inBase","t","b","l","r","bestFit"]).optional(),size:o.number().positive().optional(),color:ColorFileSchema.optional()})]).optional(),gap_width:o.number().min(0).max(500).optional(),overlap:o.number().min(-100).max(100).optional(),vary_by_categories:o.boolean().optional(),category_colors:o.array(ColorFileSchema).min(1).optional(),hole_size:o.number().min(10).max(90).optional(),value_axis:f.optional(),category_axis:f.optional(),secondary_axis:f.optional(),size:o.number().positive().optional(),title_size:o.number().positive().optional(),color:ColorFileSchema.optional()});const c=o.number().min(0).max(1);export const GRADIENT_PATHS=["circle","rect","shape"],GradientSchema=o.strictObject({angle:o.number().min(0).max(360).optional(),path:o.enum(GRADIENT_PATHS).optional(),focus:o.strictObject({left:o.number().optional(),top:o.number().optional(),right:o.number().optional(),bottom:o.number().optional()}).optional(),stops:o.array(o.strictObject({at:c,color:ColorFileSchema,transparency:c.optional()})).min(2).max(10)}),PATTERNS=["pct5","pct10","pct20","pct25","pct30","pct40","pct50","pct60","pct70","pct75","pct80","pct90","horz","vert","ltHorz","ltVert","dkHorz","dkVert","narHorz","narVert","dashHorz","dashVert","cross","dnDiag","upDiag","ltDnDiag","ltUpDiag","dkDnDiag","dkUpDiag","wdDnDiag","wdUpDiag","dashDnDiag","dashUpDiag","diagCross","smCheck","lgCheck","smGrid","lgGrid","dotGrid","smConfetti","lgConfetti","horzBrick","diagBrick","solidDmnd","openDmnd","dotDmnd","plaid","sphere","weave","divot","shingle","wave","trellis","zigZag"],PatternSchema=o.strictObject({preset:o.enum(PATTERNS),fg:ColorFileSchema.optional(),bg:ColorFileSchema.optional()}),TILE_ALIGNMENTS=["tl","t","tr","l","ctr","r","bl","b","br"],PictureFillSchema=o.strictObject({path:o.string().min(1),tile:o.strictObject({scale_x:o.number().positive().max(100).optional(),scale_y:o.number().positive().max(100).optional(),x:o.number().optional(),y:o.number().optional(),align:o.enum(TILE_ALIGNMENTS).optional()}).optional(),transparency:c.optional()}),BackgroundSchema=o.strictObject({fill:ColorFileSchema.optional(),gradient:GradientSchema.optional(),picture:o.string().min(1).optional()}).refine(t=>[t.fill,t.gradient,t.picture].filter(e=>e!==void 0).length===1,{message:"A background is a fill, a gradient or a picture: one of them."}),ShadowSchema=o.strictObject({color:ColorFileSchema.optional(),blur:o.number().min(0).max(100).optional(),distance:o.number().min(0).max(200).optional(),angle:o.number().min(0).max(360).optional(),transparency:c.optional()}),InnerShadowSchema=o.strictObject({color:ColorFileSchema.optional(),blur:o.number().min(0).max(100).optional(),distance:o.number().min(0).max(200).optional(),angle:o.number().min(0).max(360).optional(),transparency:c.optional()}),GlowSchema=o.strictObject({color:ColorFileSchema.optional(),size:o.number().min(0).max(150).optional(),transparency:c.optional()}),ReflectionSchema=o.strictObject({transparency:c.optional(),size:c.optional(),distance:o.number().min(0).max(100).optional(),blur:o.number().min(0).max(100).optional()});const R=o.union([o.strictObject({shape:o.string().min(1),site:o.int().min(0)}),o.literal("none")]);export const MergedCellsSchema=o.object({row:o.int().min(0),column:o.int().min(0),rows:o.int().min(1).optional(),columns:o.int().min(1).optional()});function N(t,e,r,n){const i=t.rows??1,s=t.columns??1;if(i*s<2)return"A merge takes two cells or more.";if(t.row+i>e||t.column+s>r)return`A merge from row ${String(t.row)}, column ${String(t.column)} goes past the table's ${String(e)} rows and ${String(r)} columns.`;for(let a=t.row;a<t.row+i;a++)for(let l=t.column;l<t.column+s;l++){const p=`${String(a)},${String(l)}`;if(n.has(p))return`Two merges take the cell at row ${String(a)}, column ${String(l)}.`;n.add(p)}}export const MEDIA_STARTS=["auto","on-click"],PlaybackSchema=o.strictObject({start:o.enum(MEDIA_STARTS).optional(),trim:o.strictObject({start:o.number().min(0).optional(),end:o.number().positive().optional()}).refine(t=>t.start===void 0||t.end===void 0||t.end>t.start,{message:"A trim ends after it starts."}).optional(),loop:o.boolean().optional(),volume:o.number().min(0).max(1).optional(),fullscreen:o.boolean().optional(),hide:o.boolean().optional()}),ShapeSchema=o.strictObject({frame:FrameSchema.optional(),rotation:o.number().min(0).lt(360).optional(),flip_h:o.literal(!0).optional(),flip_v:o.literal(!0).optional(),connect:o.strictObject({begin:R.optional(),end:R.optional()}).optional(),z:o.int().optional(),fill:o.union([ColorFileSchema,o.literal("none")]).optional(),fill_transparency:c.optional(),gradient:GradientSchema.optional(),pattern:PatternSchema.optional(),picture_fill:PictureFillSchema.optional(),shadow:ShadowSchema.optional(),inner_shadow:InnerShadowSchema.optional(),glow:GlowSchema.optional(),soft_edges:o.number().positive().max(100).optional(),reflection:ReflectionSchema.optional(),line:o.union([ColorFileSchema,o.literal("none")]).optional(),line_width:o.number().positive().max(1584).optional(),line_dash:o.enum(LINE_DASHES).optional(),line_cap:o.enum(LINE_CAPS).optional(),line_join:o.enum(LINE_JOINS).optional(),line_compound:o.enum(LINE_COMPOUNDS).optional(),line_begin:o.enum(LINE_ENDS).optional(),line_end:o.enum(LINE_ENDS).optional(),line_begin_size:LineEndSizeSchema.optional(),line_end_size:LineEndSizeSchema.optional(),text:TextStyleSchema.optional(),textbox:o.literal(!0).optional(),picture:o.string().min(1).optional(),crop:T.optional(),movie:o.string().min(1).optional(),audio:o.string().min(1).optional(),poster:o.number().min(0).optional(),playback:PlaybackSchema.optional(),geometry:o.enum(SHAPE_GEOMETRIES).optional(),adjustments:o.array(o.number()).max(8).optional(),path:o.strictObject({w:o.number().positive(),h:o.number().positive(),d:o.string().min(1)}).optional(),table:o.strictObject({columns:o.array(o.number().positive()).min(1),rows:o.array(o.strictObject({height:o.number().positive(),fill:ColorFileSchema.optional(),text:TextStyleSchema.optional(),line:ColorFileSchema.optional()})).min(1),merged:o.array(MergedCellsSchema).optional(),style:o.string().min(1).optional(),first_row:o.boolean().optional(),last_row:o.boolean().optional(),first_col:o.boolean().optional(),last_col:o.boolean().optional(),horz_banding:o.boolean().optional(),vert_banding:o.boolean().optional()}).superRefine((t,e)=>{const r=new Set;(t.merged??[]).forEach((n,i)=>{const s=N(n,t.rows.length,t.columns.length,r);s!==void 0&&e.addIssue({code:"custom",path:["merged",i],message:s})})}).optional(),chart:ChartSchema.optional(),link:o.string().trim().min(1).optional(),group:o.string().regex(/^[A-Za-z0-9_-]+(?:\/[A-Za-z0-9_-]+)*$/u,"A group is a name of letters, digits, _ and -; a group in a group is outer/inner.").optional(),locked:o.literal(!0).optional(),component:o.union([h,o.string().regex(/^[^#\s]+\.[cm]?[jt]sx?(?:#[A-Za-z_$][\w$]*)?$/u,"A component is a name the deck's module registers, or a module's path and export: ../ui.ts#Dialog.")]).optional(),props:o.record(o.string(),b).optional(),dur:o.number().positive().optional()}),groupLevels=t=>t.split("/").map((e,r,n)=>n.slice(0,r+1).join("/")),inGroup=(t,e)=>t!==void 0&&(t===e||t.startsWith(`${e}/`)),SHOW_JUMPS=["firstslide","lastslide","nextslide","previousslide","endshow"],showJumpLink=t=>`ppaction://hlinkshowjump?jump=${t}`;export function showJumpOf(t){const e=/^ppaction:\/\/hlinkshowjump\?jump=([a-z]+)$/u.exec(t);return SHOW_JUMPS.find(r=>r===e?.[1])}export const slideLinkOf=t=>t.startsWith("#")&&t.length>1?t.slice(1):void 0,SHAPE_KINDS=["textbox","picture","movie","audio","geometry","path","table","chart","component"],SLIDE_TRANSITIONS=["fade","push","wipe","split","reveal","cut","cover","uncover","zoom","morph"],TransitionSchema=o.strictObject({type:o.enum(SLIDE_TRANSITIONS),direction:o.enum(ANIMATION_DIRECTIONS).optional(),through_black:o.literal(!0).optional(),duration:o.number().min(0).optional()}),AnimationSchema=o.strictObject({shape:o.string().min(1),paragraph:o.int().min(0).optional(),effect:o.enum(ANIMATION_EFFECTS),direction:o.enum(ANIMATION_DIRECTIONS).optional(),amount:o.number().positive().max(36e3).optional(),start:o.enum(ANIMATION_STARTS).optional(),duration:o.number().min(0).optional(),delay:o.number().min(0).optional(),path:o.string().min(1).optional(),animate_text:o.enum(ANIMATE_TEXT).optional(),text_delay:o.number().min(0).max(100).optional(),repeat:o.union([o.number().min(1).max(1e4),o.enum(ANIMATION_REPEATS)]).optional(),rewind:o.literal(!0).optional()}),SlideSchema=o.strictObject({id:h,layout:o.string().min(1).optional(),generate:h.optional(),hidden:o.union([o.literal(!0),o.array(o.string())]).optional(),shapes:o.record(o.string().min(1),ShapeSchema).optional(),animations:o.array(AnimationSchema).optional(),transition:TransitionSchema.optional(),advance_after:o.number().min(0).max(86400).optional(),background:BackgroundSchema.optional(),section:o.string().trim().min(1).max(255).optional()}),SlidesFileSchema=o.strictObject({slides:o.array(SlideSchema).default([])}).superRefine((t,e)=>{const r=new Set;t.slides.forEach((n,i)=>{r.has(n.id)&&e.addIssue({code:"custom",path:["slides",i,"id"],message:`Two slides are "${n.id}".`}),r.add(n.id),(n.layout===void 0?0:1)+(n.generate===void 0?0:1)!==1&&e.addIssue({code:"custom",path:["slides",i],message:`Slide ${n.id} has a layout or a generator: one of them.`}),n.hidden!==void 0&&n.generate===void 0&&n.hidden!==!0&&e.addIssue({code:"custom",path:["slides",i,"hidden"],message:`Slide ${n.id} is hidden (true); a list of ids is a generated block's.`});for(const[a,l]of Object.entries(n.shapes??{})){const p=SHAPE_KINDS.filter(u=>l[u]!==void 0);p.length>1&&e.addIssue({code:"custom",path:["slides",i,"shapes",a],message:`Shape ${a} is one kind of shape, not ${p.join(" and ")}.`});const m=a.includes("/")?a.split("/"):[a];(!(m.length<=2&&m.every(u=>_.test(u)))||m.length===2&&n.generate===void 0)&&e.addIssue({code:"custom",path:["slides",i,"shapes",a],message:"A shape's name is letters, digits, _ and -; <slide>/<shape> only in a generated block."})}})});
2
+ import{z as o}from"zod";import{SCRIPT_NAME as _}from"./script.js";const h=o.string().regex(_,"A name is letters, digits, _ and -.");export const THEME_COLORS=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],TEXT_ALIGNS=["l","ctr","r","just"],SHAPE_GEOMETRIES=["line","lineInv","triangle","rtTriangle","rect","diamond","parallelogram","trapezoid","nonIsoscelesTrapezoid","pentagon","hexagon","heptagon","octagon","decagon","dodecagon","star4","star5","star6","star7","star8","star10","star12","star16","star24","star32","roundRect","round1Rect","round2SameRect","round2DiagRect","snipRoundRect","snip1Rect","snip2SameRect","snip2DiagRect","plaque","ellipse","teardrop","homePlate","chevron","pieWedge","pie","blockArc","donut","noSmoking","rightArrow","leftArrow","upArrow","downArrow","stripedRightArrow","notchedRightArrow","bentUpArrow","leftRightArrow","upDownArrow","leftUpArrow","leftRightUpArrow","quadArrow","leftArrowCallout","rightArrowCallout","upArrowCallout","downArrowCallout","leftRightArrowCallout","upDownArrowCallout","quadArrowCallout","bentArrow","uturnArrow","circularArrow","leftCircularArrow","leftRightCircularArrow","curvedRightArrow","curvedLeftArrow","curvedUpArrow","curvedDownArrow","swooshArrow","cube","can","lightningBolt","heart","sun","moon","smileyFace","irregularSeal1","irregularSeal2","foldedCorner","bevel","frame","halfFrame","corner","diagStripe","chord","arc","leftBracket","rightBracket","leftBrace","rightBrace","bracketPair","bracePair","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5","callout1","callout2","callout3","accentCallout1","accentCallout2","accentCallout3","borderCallout1","borderCallout2","borderCallout3","accentBorderCallout1","accentBorderCallout2","accentBorderCallout3","wedgeRectCallout","wedgeRoundRectCallout","wedgeEllipseCallout","cloudCallout","cloud","ribbon","ribbon2","ellipseRibbon","ellipseRibbon2","leftRightRibbon","verticalScroll","horizontalScroll","wave","doubleWave","plus","flowChartProcess","flowChartDecision","flowChartInputOutput","flowChartPredefinedProcess","flowChartInternalStorage","flowChartDocument","flowChartMultidocument","flowChartTerminator","flowChartPreparation","flowChartManualInput","flowChartManualOperation","flowChartConnector","flowChartPunchedCard","flowChartPunchedTape","flowChartSummingJunction","flowChartOr","flowChartCollate","flowChartSort","flowChartExtract","flowChartMerge","flowChartOfflineStorage","flowChartOnlineStorage","flowChartMagneticTape","flowChartMagneticDisk","flowChartMagneticDrum","flowChartDisplay","flowChartDelay","flowChartAlternateProcess","flowChartOffpageConnector","actionButtonBlank","actionButtonHome","actionButtonHelp","actionButtonInformation","actionButtonForwardNext","actionButtonBackPrevious","actionButtonEnd","actionButtonBeginning","actionButtonReturn","actionButtonDocument","actionButtonSound","actionButtonMovie","gear6","gear9","funnel","mathPlus","mathMinus","mathMultiply","mathDivide","mathEqual","mathNotEqual","cornerTabs","squareTabs","plaqueTabs","chartX","chartStar","chartPlus"],ANIMATION_EFFECTS=["appear","fade","fly-in","float-in","split","wipe","zoom","disappear","fade-out","fly-out","float-out","split-out","wipe-out","zoom-out","pulse","grow-shrink","spin","transparency","path"],ANIMATE_TEXT=["word","letter"],ANIMATION_REPEATS=["until-next-click","until-end-of-slide"],ANIMATION_STARTS=["on-click","with-previous","after-previous"],ANIMATION_DIRECTIONS=["from-bottom","from-top","from-left","from-right","from-top-right","from-bottom-right","from-top-left","from-bottom-left","vertical-out","vertical-in","horizontal-out","horizontal-in","in","out","rotate","up","down","clockwise","counterclockwise","both","horizontal","vertical"],LINE_DASHES=["solid","sysDot","sysDash","dash","dashDot","lgDash","lgDashDot","lgDashDotDot","dot","sysDashDot","sysDashDotDot"],LINE_CAPS=["flat","rnd","sq"],LINE_JOINS=["round","bevel","miter"],LINE_COMPOUNDS=["sng","dbl","thickThin","thinThick","tri"],LINE_ENDS=["none","triangle","arrow","stealth","diamond","oval"],ARROW_SIZES=["sm","med","lg"],LineEndSizeSchema=o.strictObject({w:o.enum(ARROW_SIZES).optional(),len:o.enum(ARROW_SIZES).optional()}),FrameSchema=o.strictObject({x:o.number(),y:o.number(),w:o.number().nonnegative(),h:o.number().nonnegative()}),MAPPED_COLORS=["tx1","bg1","tx2","bg2"],COLOR_NAMES=[...THEME_COLORS,...MAPPED_COLORS],COLOR_TRANSFORMS=["tint","shade","lumMod","lumOff","lum","satMod","satOff","sat","hueMod","hueOff","hue","alpha","alphaMod","alphaOff"];const C=`(?:${COLOR_NAMES.join("|")})`,k=`(?:${COLOR_TRANSFORMS.join("|")}) -?\\d+(?:\\.\\d+)?(?:%|°)`,A=new RegExp(`^(${C}) (lighter|darker) (100(?:\\.0{1,3})?|[1-9]?\\d(?:\\.\\d{1,3})?)%$`,"u"),v=new RegExp(`^(${C}|#[0-9A-Fa-f]{6})((?: ${k})+)$`,"u"),O=/^#[0-9A-Fa-f]{6}$/u,g=t=>COLOR_NAMES.includes(t),E=t=>COLOR_TRANSFORMS.includes(t),y=new Set(["hue","hueOff"]);export function colorOfFile(t){if(g(t))return t;if(O.test(t))return{rgb:t.toUpperCase()};const e=v.exec(t);if(e){const[,l="",p=""]=e,m=[];for(const w of p.matchAll(/ (\w+) (-?[\d.]+)(%|°)/gu)){const[,u="",D="",x]=w;if(!E(u)||x==="°"!==y.has(u))return;const S=Number(D);m.push({name:u,value:x==="%"?Math.round(S*1e3)/1e5:S})}return g(l)?{theme_color:l,transforms:m}:{rgb:l.toUpperCase(),transforms:m}}const r=A.exec(t),[,n="",i,s=""]=r??[],a=Math.round(Number(s)*1e3);if(!(!r||!g(n)||a<=0||a>1e5))return{theme_color:n,brightness:(i==="lighter"?a:-a)/1e5}}const P=t=>y.has(t.name)?`${t.name} ${String(Math.round(t.value*1e3)/1e3)}°`:`${t.name} ${String(Math.round(t.value*1e5)/1e3)}%`;export function colorFile(t){if(typeof t=="string")return t;if("rgb"in t)return t.transforms&&t.transforms.length>0?`${t.rgb} ${t.transforms.map(P).join(" ")}`:t.rgb;if("transforms"in t)return t.transforms.length===0?t.theme_color:`${t.theme_color} ${t.transforms.map(P).join(" ")}`;const e=Math.round(Math.abs(t.brightness)*1e5)/1e3;return e===0?t.theme_color:`${t.theme_color} ${t.brightness>0?"lighter":"darker"} ${String(e)}%`}const d=`A colour is one of the theme's (${THEME_COLORS.join(", ")}) or the colour map's (${MAPPED_COLORS.join(", ")}), one of them lighter or darker by a share over 0 up to 100% ("accent1 lighter 40%", "dk1 darker 25%"), #RRGGBB, or one of them with DrawingML's transforms in order ("accent1 lumMod 75% lumOff 25%", "#4472C4 alpha 50%", "accent2 hueOff 30°": ${COLOR_TRANSFORMS.join(", ")}).`;export const ColorFileSchema=o.union([o.enum(COLOR_NAMES),o.string().regex(A,d),o.string().regex(O,d),o.string().regex(v,d)]).refine(t=>colorOfFile(t)!==void 0,d),NUMBERINGS=["alphaLcParenBoth","alphaUcParenBoth","alphaLcParenR","alphaUcParenR","alphaLcPeriod","alphaUcPeriod","arabicParenBoth","arabicParenR","arabicPeriod","arabicPlain","romanLcParenBoth","romanUcParenBoth","romanLcParenR","romanUcParenR","romanLcPeriod","romanUcPeriod","circleNumDbPlain","circleNumWdBlackPlain","circleNumWdWhitePlain","arabicDbPeriod","arabicDbPlain","ea1ChsPeriod","ea1ChsPlain","ea1ChtPeriod","ea1ChtPlain","ea1JpnChsDbPeriod","ea1JpnKorPlain","ea1JpnKorPeriod","arabic1Minus","arabic2Minus","hebrew2Minus","thaiAlphaPeriod","thaiAlphaParenR","thaiAlphaParenBoth","thaiNumPeriod","thaiNumParenR","thaiNumParenBoth","hindiAlphaPeriod","hindiNumPeriod","hindiNumParenR","hindiAlpha1Period"],UNDERLINES=["sng","dbl","heavy","dotted","dottedHeavy","dash","dashHeavy","dashLong","dashLongHeavy","dotDash","dotDashHeavy","dotDotDash","dotDotDashHeavy","wavy","wavyHeavy","wavyDbl","words"],STRIKES=["sngStrike","dblStrike"],CAPS=["all","small","none"],TEXT_ORIENTATIONS=["horz","vert","vert270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"],TEXT_ANCHORS=["t","ctr","b"],ParagraphSpaceSchema=o.union([o.number().min(0).max(1584),o.object({lines:o.number().min(0).max(100)})]),TextStyleSchema=o.strictObject({size:o.number().positive().max(4e3).optional(),bold:o.boolean().optional(),italic:o.boolean().optional(),underline:o.union([o.boolean(),o.enum(UNDERLINES)]).optional(),strike:o.union([o.boolean(),o.enum(STRIKES)]).optional(),caps:o.enum(CAPS).optional(),color:ColorFileSchema.optional(),font:o.string().min(1).optional(),align:o.enum(TEXT_ALIGNS).optional(),line_spacing:o.number().positive().max(10).optional(),space_before:ParagraphSpaceSchema.optional(),space_after:ParagraphSpaceSchema.optional(),anchor:o.enum(TEXT_ANCHORS).optional(),orientation:o.enum(TEXT_ORIENTATIONS).optional(),bullet:o.union([o.literal(!1),o.string().min(1).max(2)]).optional(),numbered:o.enum(NUMBERINGS).optional(),bullet_color:ColorFileSchema.optional(),bullet_size:o.number().min(.25).max(4).optional(),start_at:o.int().min(1).max(32767).optional()});const T=o.strictObject({left:o.number().lt(1).optional(),top:o.number().lt(1).optional(),right:o.number().lt(1).optional(),bottom:o.number().lt(1).optional()}).refine(t=>(t.left??0)+(t.right??0)<1,{message:"left and right together cut the whole picture away"}).refine(t=>(t.top??0)+(t.bottom??0)<1,{message:"top and bottom together cut the whole picture away"}),b=o.lazy(()=>o.union([o.string(),o.number(),o.boolean(),o.null(),o.array(b),o.record(o.string(),b)]));export const CHART_TYPES=["column-clustered","column-stacked","column-stacked-100","bar-clustered","bar-stacked","bar-stacked-100","line","line-markers","area","area-stacked","area-stacked-100","pie","doughnut"],SHEET_CHART_TYPES=[...CHART_TYPES,"scatter","scatter-lines","scatter-smooth"],CHART_LEGEND_POSITIONS=["bottom","top","left","right"],CHART_COMBINED_TYPES=["column-clustered","column-stacked","column-stacked-100","line","line-markers","area","area-stacked","area-stacked-100"];const f=o.strictObject({min:o.number().optional(),max:o.number().optional(),major:o.number().positive().optional(),gridlines:o.boolean().optional(),visible:o.boolean().optional(),format:o.string().min(1).optional(),reverse:o.boolean().optional(),gridline_color:ColorFileSchema.optional(),line_color:ColorFileSchema.optional()});export const ChartSchema=o.strictObject({type:o.enum(SHEET_CHART_TYPES),data:o.string().min(1).optional(),categories:o.union([o.string().min(1),o.array(o.string())]).optional(),series:o.array(o.union([o.string().min(1),o.strictObject({name:o.string().min(1),values:o.array(o.number().nullable()).optional(),x:o.array(o.number().nullable()).optional(),color:ColorFileSchema.optional(),format:o.string().min(1).optional(),smooth:o.boolean().optional(),line_width:o.number().positive().optional(),marker_size:o.number().int().min(2).max(72).optional(),type:o.enum(CHART_COMBINED_TYPES).optional(),secondary:o.boolean().optional()})])).min(1),legend:o.enum(CHART_LEGEND_POSITIONS).optional(),labels:o.union([o.boolean(),o.strictObject({value:o.boolean().optional(),percentage:o.boolean().optional(),category:o.boolean().optional(),series:o.boolean().optional(),format:o.string().min(1).optional(),position:o.enum(["outEnd","inEnd","ctr","inBase","t","b","l","r","bestFit"]).optional(),size:o.number().positive().optional(),color:ColorFileSchema.optional()})]).optional(),gap_width:o.number().min(0).max(500).optional(),overlap:o.number().min(-100).max(100).optional(),vary_by_categories:o.boolean().optional(),category_colors:o.array(ColorFileSchema).min(1).optional(),hole_size:o.number().min(10).max(90).optional(),value_axis:f.optional(),category_axis:f.optional(),secondary_axis:f.optional(),size:o.number().positive().optional(),title_size:o.number().positive().optional(),color:ColorFileSchema.optional()});const c=o.number().min(0).max(1);export const GRADIENT_PATHS=["circle","rect","shape"],GradientSchema=o.strictObject({angle:o.number().min(0).max(360).optional(),path:o.enum(GRADIENT_PATHS).optional(),focus:o.strictObject({left:o.number().optional(),top:o.number().optional(),right:o.number().optional(),bottom:o.number().optional()}).optional(),stops:o.array(o.strictObject({at:c,color:ColorFileSchema,transparency:c.optional()})).min(2).max(10)}),PATTERNS=["pct5","pct10","pct20","pct25","pct30","pct40","pct50","pct60","pct70","pct75","pct80","pct90","horz","vert","ltHorz","ltVert","dkHorz","dkVert","narHorz","narVert","dashHorz","dashVert","cross","dnDiag","upDiag","ltDnDiag","ltUpDiag","dkDnDiag","dkUpDiag","wdDnDiag","wdUpDiag","dashDnDiag","dashUpDiag","diagCross","smCheck","lgCheck","smGrid","lgGrid","dotGrid","smConfetti","lgConfetti","horzBrick","diagBrick","solidDmnd","openDmnd","dotDmnd","plaid","sphere","weave","divot","shingle","wave","trellis","zigZag"],PatternSchema=o.strictObject({preset:o.enum(PATTERNS),fg:ColorFileSchema.optional(),bg:ColorFileSchema.optional()}),TILE_ALIGNMENTS=["tl","t","tr","l","ctr","r","bl","b","br"],PictureFillSchema=o.strictObject({path:o.string().min(1),tile:o.strictObject({scale_x:o.number().positive().max(100).optional(),scale_y:o.number().positive().max(100).optional(),x:o.number().optional(),y:o.number().optional(),align:o.enum(TILE_ALIGNMENTS).optional()}).optional(),transparency:c.optional()}),BackgroundSchema=o.strictObject({fill:ColorFileSchema.optional(),gradient:GradientSchema.optional(),picture:o.string().min(1).optional()}).refine(t=>[t.fill,t.gradient,t.picture].filter(e=>e!==void 0).length===1,{message:"A background is a fill, a gradient or a picture: one of them."}),ShadowSchema=o.strictObject({color:ColorFileSchema.optional(),blur:o.number().min(0).max(100).optional(),distance:o.number().min(0).max(200).optional(),angle:o.number().min(0).max(360).optional(),transparency:c.optional()}),InnerShadowSchema=o.strictObject({color:ColorFileSchema.optional(),blur:o.number().min(0).max(100).optional(),distance:o.number().min(0).max(200).optional(),angle:o.number().min(0).max(360).optional(),transparency:c.optional()}),GlowSchema=o.strictObject({color:ColorFileSchema.optional(),size:o.number().min(0).max(150).optional(),transparency:c.optional()}),ReflectionSchema=o.strictObject({transparency:c.optional(),size:c.optional(),distance:o.number().min(0).max(100).optional(),blur:o.number().min(0).max(100).optional()});const R=o.union([o.strictObject({shape:o.string().min(1),site:o.int().min(0)}),o.literal("none")]);export const MergedCellsSchema=o.object({row:o.int().min(0),column:o.int().min(0),rows:o.int().min(1).optional(),columns:o.int().min(1).optional()});function N(t,e,r,n){const i=t.rows??1,s=t.columns??1;if(i*s<2)return"A merge takes two cells or more.";if(t.row+i>e||t.column+s>r)return`A merge from row ${String(t.row)}, column ${String(t.column)} goes past the table's ${String(e)} rows and ${String(r)} columns.`;for(let a=t.row;a<t.row+i;a++)for(let l=t.column;l<t.column+s;l++){const p=`${String(a)},${String(l)}`;if(n.has(p))return`Two merges take the cell at row ${String(a)}, column ${String(l)}.`;n.add(p)}}export const MEDIA_STARTS=["auto","on-click"],PlaybackSchema=o.strictObject({start:o.enum(MEDIA_STARTS).optional(),trim:o.strictObject({start:o.number().min(0).optional(),end:o.number().positive().optional()}).refine(t=>t.start===void 0||t.end===void 0||t.end>t.start,{message:"A trim ends after it starts."}).optional(),loop:o.boolean().optional(),volume:o.number().min(0).max(1).optional(),fullscreen:o.boolean().optional(),hide:o.boolean().optional()}),ShapeSchema=o.strictObject({frame:FrameSchema.optional(),rotation:o.number().min(0).lt(360).optional(),flip_h:o.literal(!0).optional(),flip_v:o.literal(!0).optional(),connect:o.strictObject({begin:R.optional(),end:R.optional()}).optional(),z:o.int().optional(),fill:o.union([ColorFileSchema,o.literal("none")]).optional(),fill_transparency:c.optional(),gradient:GradientSchema.optional(),pattern:PatternSchema.optional(),picture_fill:PictureFillSchema.optional(),shadow:ShadowSchema.optional(),inner_shadow:InnerShadowSchema.optional(),glow:GlowSchema.optional(),soft_edges:o.number().positive().max(100).optional(),reflection:ReflectionSchema.optional(),line:o.union([ColorFileSchema,o.literal("none")]).optional(),line_width:o.number().positive().max(1584).optional(),line_dash:o.enum(LINE_DASHES).optional(),line_cap:o.enum(LINE_CAPS).optional(),line_join:o.enum(LINE_JOINS).optional(),line_compound:o.enum(LINE_COMPOUNDS).optional(),line_begin:o.enum(LINE_ENDS).optional(),line_end:o.enum(LINE_ENDS).optional(),line_begin_size:LineEndSizeSchema.optional(),line_end_size:LineEndSizeSchema.optional(),text:TextStyleSchema.optional(),textbox:o.literal(!0).optional(),picture:o.string().min(1).optional(),crop:T.optional(),movie:o.string().min(1).optional(),audio:o.string().min(1).optional(),item:o.string().min(1).optional(),poster:o.number().min(0).optional(),playback:PlaybackSchema.optional(),geometry:o.enum(SHAPE_GEOMETRIES).optional(),adjustments:o.array(o.number()).max(8).optional(),path:o.strictObject({w:o.number().positive(),h:o.number().positive(),d:o.string().min(1)}).optional(),table:o.strictObject({columns:o.array(o.number().positive()).min(1),rows:o.array(o.strictObject({height:o.number().positive(),fill:ColorFileSchema.optional(),text:TextStyleSchema.optional(),line:ColorFileSchema.optional()})).min(1),merged:o.array(MergedCellsSchema).optional(),data:o.string().min(1).optional(),fields:o.array(o.string().min(1)).min(1).optional(),head:o.boolean().optional(),style:o.string().min(1).optional(),first_row:o.boolean().optional(),last_row:o.boolean().optional(),first_col:o.boolean().optional(),last_col:o.boolean().optional(),horz_banding:o.boolean().optional(),vert_banding:o.boolean().optional()}).superRefine((t,e)=>{const r=new Set;t.data===void 0&&(t.fields!==void 0||t.head!==void 0)&&e.addIssue({code:"custom",path:[t.fields===void 0?"head":"fields"],message:"fields and head say how a table shows its data: give it data."}),(t.merged??[]).forEach((n,i)=>{const s=N(n,t.rows.length,t.columns.length,r);s!==void 0&&e.addIssue({code:"custom",path:["merged",i],message:s})})}).optional(),chart:ChartSchema.optional(),link:o.string().trim().min(1).optional(),group:o.string().regex(/^[A-Za-z0-9_-]+(?:\/[A-Za-z0-9_-]+)*$/u,"A group is a name of letters, digits, _ and -; a group in a group is outer/inner.").optional(),locked:o.literal(!0).optional(),component:o.union([h,o.string().regex(/^[^#\s]+\.[cm]?[jt]sx?(?:#[A-Za-z_$][\w$]*)?$/u,"A component is a name the deck's module registers, or a module's path and export: ../ui.ts#Dialog.")]).optional(),props:o.record(o.string(),b).optional(),dur:o.number().positive().optional()}),groupLevels=t=>t.split("/").map((e,r,n)=>n.slice(0,r+1).join("/")),inGroup=(t,e)=>t!==void 0&&(t===e||t.startsWith(`${e}/`)),SHOW_JUMPS=["firstslide","lastslide","nextslide","previousslide","endshow"],showJumpLink=t=>`ppaction://hlinkshowjump?jump=${t}`;export function showJumpOf(t){const e=/^ppaction:\/\/hlinkshowjump\?jump=([a-z]+)$/u.exec(t);return SHOW_JUMPS.find(r=>r===e?.[1])}export const slideLinkOf=t=>t.startsWith("#")&&t.length>1?t.slice(1):void 0,SHAPE_KINDS=["textbox","picture","movie","audio","geometry","path","table","chart","component","item"],SLIDE_TRANSITIONS=["fade","push","wipe","split","reveal","cut","cover","uncover","zoom","morph"],TransitionSchema=o.strictObject({type:o.enum(SLIDE_TRANSITIONS),direction:o.enum(ANIMATION_DIRECTIONS).optional(),through_black:o.literal(!0).optional(),duration:o.number().min(0).optional()}),AnimationSchema=o.strictObject({shape:o.string().min(1),paragraph:o.int().min(0).optional(),effect:o.enum(ANIMATION_EFFECTS),direction:o.enum(ANIMATION_DIRECTIONS).optional(),amount:o.number().positive().max(36e3).optional(),start:o.enum(ANIMATION_STARTS).optional(),duration:o.number().min(0).optional(),delay:o.number().min(0).optional(),path:o.string().min(1).optional(),animate_text:o.enum(ANIMATE_TEXT).optional(),text_delay:o.number().min(0).max(100).optional(),repeat:o.union([o.number().min(1).max(1e4),o.enum(ANIMATION_REPEATS)]).optional(),rewind:o.literal(!0).optional()}),SlideSchema=o.strictObject({id:h,layout:o.string().min(1).optional(),generate:h.optional(),hidden:o.union([o.literal(!0),o.array(o.string())]).optional(),shapes:o.record(o.string().min(1),ShapeSchema).optional(),animations:o.array(AnimationSchema).optional(),transition:TransitionSchema.optional(),advance_after:o.number().min(0).max(86400).optional(),background:BackgroundSchema.optional(),section:o.string().trim().min(1).max(255).optional()}),SlidesFileSchema=o.strictObject({slides:o.array(SlideSchema).default([])}).superRefine((t,e)=>{const r=new Set;t.slides.forEach((n,i)=>{r.has(n.id)&&e.addIssue({code:"custom",path:["slides",i,"id"],message:`Two slides are "${n.id}".`}),r.add(n.id),(n.layout===void 0?0:1)+(n.generate===void 0?0:1)!==1&&e.addIssue({code:"custom",path:["slides",i],message:`Slide ${n.id} has a layout or a generator: one of them.`}),n.hidden!==void 0&&n.generate===void 0&&n.hidden!==!0&&e.addIssue({code:"custom",path:["slides",i,"hidden"],message:`Slide ${n.id} is hidden (true); a list of ids is a generated block's.`});for(const[a,l]of Object.entries(n.shapes??{})){const p=SHAPE_KINDS.filter(u=>l[u]!==void 0);p.length>1&&e.addIssue({code:"custom",path:["slides",i,"shapes",a],message:`Shape ${a} is one kind of shape, not ${p.join(" and ")}.`});const m=a.includes("/")?a.split("/"):[a];(!(m.length<=2&&m.every(u=>_.test(u)))||m.length===2&&n.generate===void 0)&&e.addIssue({code:"custom",path:["slides",i,"shapes",a],message:"A shape's name is letters, digits, _ and -; <slide>/<shape> only in a generated block."})}})});
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as t}from"zod";export const WEBSITE_FILE="website.json",WebsiteFileSchema=t.strictObject({$schema:t.string().optional(),title:t.string().min(1).optional().describe("The website's name where people see it (Studio's list of a project's work); none: its entry file's name."),dev:t.string().min(1).optional().describe("The command that serves the website while it is made, run in its folder by a shell. It listens on $PORT at $HOST, which the host sets (`astro dev --port $PORT --host $HOST --ignore-lock`), and allows the hosts in $ALLYHUB_PREVIEW_HOSTS when its server checks the Host header. None: the output folder is served as it is."),build:t.string().min(1).optional().describe("The command that builds the website into its output folder (`astro build`). None: it is not built."),output:t.string().min(1).describe("The folder that is the built website, from the website's folder (`dist`); `.` for a website of plain files."),site:t.string().min(1).optional().describe("The hosted site this website publishes to, written by `allyhub site deploy` the first time, so the folder publishes to the same site from any computer.")});export function parseWebsite(o){let i;try{i=JSON.parse(o)}catch(e){return{ok:!1,problems:[`is not JSON: ${e instanceof Error?e.message:String(e)}`]}}const s=WebsiteFileSchema.safeParse(i);return s.success?{ok:!0,value:s.data}:{ok:!1,problems:s.error.issues.map(e=>e.path.length===0?e.message:`${e.path.join(".")}: ${e.message}`)}}
2
+ import{z as t}from"zod";export const WEBSITE_FILE="website.json",WebsiteFileSchema=t.strictObject({$schema:t.string().optional(),title:t.string().min(1).optional().describe("The website's name where people see it (Studio's list of a project's work); none: its entry file's name."),dev:t.string().min(1).optional().describe("The command that serves the website while it is made, run in its folder by a shell. It listens on $PORT at $HOST, which the host sets (`astro dev --port $PORT --host $HOST --ignore-lock`), and allows the hosts in $ALLYHUB_PREVIEW_HOSTS when its server checks the Host header. None: the output folder is served as it is."),build:t.string().min(1).optional().describe("The command that builds the website into its output folder (`astro build`). None: the output folder is used as it is."),output:t.string().min(1).describe("The folder that is the built website, from the website's folder (`dist`); `.` for a website of plain files."),site:t.string().min(1).optional().describe("The hosted site this website publishes to, written by `allyhub site deploy` the first time, so the folder publishes to the same site from any computer.")});export function parseWebsite(o){let i;try{i=JSON.parse(o)}catch(e){return{ok:!1,problems:[`is not JSON: ${e instanceof Error?e.message:String(e)}`]}}const s=WebsiteFileSchema.safeParse(i);return s.success?{ok:!0,value:s.data}:{ok:!1,problems:s.error.issues.map(e=>e.path.length===0?e.message:`${e.path.join(".")}: ${e.message}`)}}
@@ -68,6 +68,10 @@ export interface KindSpec {
68
68
  } | undefined;
69
69
  /** What a new item of it starts as (KindStarter); none for a kind a person does not make new. */
70
70
  readonly starter?: KindStarter | undefined;
71
+ /** Its place among the kinds where they are listed for people (its contribution's `shown.order`, lower first); none: after those that have one. */
72
+ readonly order?: number | undefined;
73
+ /** Turn into does not offer it (its contribution's `turnInto: false`); absent: it does, where a person makes it new. */
74
+ readonly turnInto?: false | undefined;
71
75
  /** Whether an item of it is shared alone: a read-only link to it, its view served from the project's snapshot. */
72
76
  readonly share?: boolean | undefined;
73
77
  /**
@@ -142,28 +146,51 @@ export interface Item {
142
146
  */
143
147
  files?: ItemFile[];
144
148
  /**
145
- * The other items' made files it uses (docs/design/x.md §2), as the
146
- * build resolved them once its kind read it; absent before, and for an
147
- * item that uses none.
149
+ * The other items it uses (docs/design/references.md): their data,
150
+ * their drawing live or their made files, as the build resolved them
151
+ * once its kind read it; absent before, and for an item that uses none.
148
152
  */
149
153
  uses?: ItemUse[];
150
154
  }
151
155
  /**
152
- * Another item's made file an item uses, resolved by the build: the
153
- * reference as its file writes it (`./hero.ts#main`), the item it names,
154
- * the part after `#` when there is one, and the type it is made as (the
155
- * first of the types the using kind takes that the used kind renders).
156
+ * The forms a use takes an item as besides a made file's type
157
+ * (docs/design/references.md §3.2): its values, which its kind lends
158
+ * (`data`), and its drawing by its own kind's runtime inside the using
159
+ * item's page (`live`). Any other form is a file type (`png`, `mp4`).
160
+ */
161
+ export declare const USE_FORMS: {
162
+ readonly data: "data";
163
+ readonly live: "live";
164
+ };
165
+ /** Whether a use's form is a made file's type, which an export makes, rather than `data` or `live`. */
166
+ export declare const isFileForm: (form: string) => boolean;
167
+ /**
168
+ * Another item an item uses, resolved by the build: the reference as its
169
+ * file writes it (`./hero.ts#main`), the item it names, the part after
170
+ * `#` when there is one, and the form it is taken as (the first of the
171
+ * forms the using kind takes that the used item gives). A form read here
172
+ * may be one a later version added: a reader skips one it does not know.
156
173
  */
157
174
  export interface ItemUse {
158
175
  /** The reference as written. */
159
176
  of: string;
160
177
  /** The file that writes it, a project path. */
161
178
  from: string;
179
+ /** Its line in that file, when its kind said it. */
180
+ line?: number | undefined;
162
181
  /** The used item's id. */
163
182
  item: string;
164
183
  /** The part after `#` (a board's key), when the reference names one. */
165
184
  part?: string | undefined;
185
+ /** The form it is taken as: `data`, `live` or a file type (USE_FORMS). */
166
186
  type: string;
187
+ /**
188
+ * Where `type` is `live`: the file type it is made as for a file that
189
+ * cannot hold it live (a deck's PowerPoint file), when both kinds have one.
190
+ */
191
+ file?: string | undefined;
192
+ /** The using item's types that hold `file` (`pptx`); absent, every type. */
193
+ madeFor?: string[] | undefined;
167
194
  /** What it is to the using item, in its kind's own words (`media`). */
168
195
  role?: string | undefined;
169
196
  }
@@ -185,18 +212,42 @@ export declare function listsFile(files: readonly ItemFile[], path: string): boo
185
212
  export declare const itemFiles: (item: Pick<Item, "entry" | "files">) => ItemFile[];
186
213
  /** An item's id: its file without its extension. */
187
214
  export declare const itemIdOf: (file: string) => string;
188
- /** An item's name for people: its title as listed, else the one its file says, else its file's name. */
215
+ /**
216
+ * A file's id where the list names it with no kind: its path, extension
217
+ * and all (`research/insights.csv`), as a file the list does not name is
218
+ * opened by. It never takes an item's id (`research/insights`, of
219
+ * `research/insights.mdx`), nor that of another file of its name
220
+ * (`research/insights.xlsx`). Versions before gave it its path without
221
+ * its extension, as an item's; `listedPieceByIdOrFormerId` still finds it
222
+ * by that.
223
+ */
224
+ export declare const listedFileIdOf: (file: string) => string;
225
+ /** A piece's name for people: its title as listed, else the one its file says, else its id's last part (a file listed with no kind: its file's name, extension and all). */
189
226
  export declare const itemNameOf: (item: {
190
227
  id: string;
191
228
  title?: string | undefined;
192
229
  }, own?: string) => string;
230
+ /**
231
+ * The piece of a list an id names, whichever version of AllyHub gave the
232
+ * id: by its id; else a file listed with no kind (no `kind`) by the id the
233
+ * other version gives it: its path, where the list was made by a version
234
+ * before a file's id kept its extension; its path without its extension
235
+ * (`itemIdOf`), where the id was kept from then (an address, what a window
236
+ * or a machine remembers), the first such file in the list's order. None
237
+ * where nothing has it.
238
+ */
239
+ export declare function listedPieceByIdOrFormerId<P extends {
240
+ id: string;
241
+ entry: string;
242
+ kind?: string | undefined;
243
+ }>(pieces: readonly P[], id: string): P | undefined;
193
244
  /**
194
245
  * A piece the list names with no kind: a file an editor opens by its name
195
246
  * (a canvas), with the editor whose pattern matches it. It has the names an
196
247
  * item has and nothing of a kind (no versions, no Export, no Share).
197
248
  */
198
249
  export interface ListedFile {
199
- /** What names it: its file without its extension, unique among the items and files of the list. */
250
+ /** What names it: its file, extension and all (`listedFileIdOf`), unique among the items and files of the list. */
200
251
  id: string;
201
252
  /** The folder its file is in, a project path ("" at the root). */
202
253
  dir: string;
@@ -226,7 +277,7 @@ export type ItemProblem =
226
277
  code: "missing";
227
278
  file: string;
228
279
  }
229
- /** Two listed files of one id (`a.ts`, `a.mdx`), or one file listed twice. */
280
+ /** Two listed files of one id (`a.ts` and `a.mdx`, both of a kind), or one file listed twice: the first of them is kept. */
230
281
  | {
231
282
  code: "same-id";
232
283
  id: string;
@@ -250,7 +301,15 @@ export declare const isListedFile: (piece: Item | ListedFile) => piece is Listed
250
301
  * file not there, an id twice). A piece listed with no kind is a file an
251
302
  * editor opens by its name: with `editors` (the file editors loaded), each
252
303
  * is found its editor or is a problem; without them (the build, which
253
- * reads kinds only), it is left out, unchecked.
304
+ * reads kinds only), it is left out, unchecked. Of the pieces of one id
305
+ * the first is kept, as a tolerant reader keeps what it can read, and the
306
+ * id is the problem.
254
307
  */
255
308
  export declare function itemsOf(work: WorkFile, kinds: KindTable, files?: ReadonlySet<string>, editors?: FileEditorTable): ItemScan;
309
+ /** What a data file's rows as shown are asked by, beside the rows themselves (DataFile.shown). */
310
+ export declare const SHOWN_DATA = "\0shown";
311
+ /** The path a reader asks a data file's rows as shown by. */
312
+ export declare const shownPath: (path: string) => string;
313
+ /** The data file a path asks the rows as shown of; undefined for a path that asks the rows. */
314
+ export declare const shownOf: (path: string) => string | undefined;
256
315
  //# sourceMappingURL=items.d.ts.map
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{listedWork as x}from"./data/work.js";import{fileEditorIn as O}from"./files.js";import{baseOf as m,dirOf as k}from"./layout.js";export function pointEntriesIn(t,e,n){return t.find(s=>s.id===e)?.points?.[n]??[]}export const LOCALE_MARK="{locale}";export function listsFile(t,e){return t.some(n=>{const s=n.path.indexOf(LOCALE_MARK);if(s<0)return n.path===e;const r=n.path.slice(0,s),d=n.path.slice(s+LOCALE_MARK.length);return e.length>r.length+d.length&&e.startsWith(r)&&e.endsWith(d)})}export const itemFiles=t=>t.files??[{path:t.entry,role:"entry"}],itemIdOf=t=>{const e=m(t),n=e.lastIndexOf(".");return n<=0?t:t.slice(0,t.length-(e.length-n))},itemNameOf=(t,e)=>t.title??e??m(t.id),isListedFile=t=>"editor"in t;export function itemsOf(t,e,n,s){const r=[],d=[],f=new Map;for(const i of x(t)){const o=i.file.replace(/^\.\//u,""),c=i.kind;let p;if(c===void 0){if(s===void 0)continue;const l=O(s,o)?.id;if(l===void 0){r.push({code:"no-editor",file:o});continue}p={editor:l}}else if(e.some(l=>l.id===c))p={kind:c};else{r.push({code:"unknown-kind",kind:c,file:o});continue}if(n!==void 0&&!n.has(o)){r.push({code:"missing",file:o});continue}const h=itemIdOf(o);f.set(h,[...f.get(h)??[],o]);const g={id:h,dir:k(o),entry:o,...i.title===void 0?{}:{title:i.title},groups:i.groups};d.push({...g,...p})}const a=new Set;for(const[i,o]of f)o.length>1&&(a.add(i),r.push({code:"same-id",id:i,files:o}));const u=d.filter(i=>!a.has(i.id));return{items:u.filter(i=>!isListedFile(i)),files:u.filter(isListedFile),listed:u,problems:r}}
2
+ import{listedWork as O}from"./data/work.js";import{fileEditorIn as g}from"./files.js";import{baseOf as m,dirOf as k}from"./layout.js";export function pointEntriesIn(t,e,i){return t.find(n=>n.id===e)?.points?.[i]??[]}export const USE_FORMS={data:"data",live:"live"},isFileForm=t=>t!==USE_FORMS.data&&t!==USE_FORMS.live,LOCALE_MARK="{locale}";export function listsFile(t,e){return t.some(i=>{const n=i.path.indexOf(LOCALE_MARK);if(n<0)return i.path===e;const r=i.path.slice(0,n),d=i.path.slice(n+LOCALE_MARK.length);return e.length>r.length+d.length&&e.startsWith(r)&&e.endsWith(d)})}export const itemFiles=t=>t.files??[{path:t.entry,role:"entry"}],itemIdOf=t=>{const e=m(t),i=e.lastIndexOf(".");return i<=0?t:t.slice(0,t.length-(e.length-i))},listedFileIdOf=t=>t,itemNameOf=(t,e)=>t.title??e??m(t.id);export function listedPieceByIdOrFormerId(t,e){const i=t.filter(n=>n.kind===void 0);return t.find(n=>n.id===e)??i.find(n=>n.entry===e)??i.find(n=>itemIdOf(n.entry)===e)}export const isListedFile=t=>"editor"in t;export function itemsOf(t,e,i,n){const r=[],d=[],u=new Map;for(const s of O(t)){const o=s.file.replace(/^\.\//u,""),l=s.kind;let c;if(l===void 0){if(n===void 0)continue;const f=g(n,o)?.id;if(f===void 0){r.push({code:"no-editor",file:o});continue}c={editor:f}}else if(e.some(f=>f.id===l))c={kind:l};else{r.push({code:"unknown-kind",kind:l,file:o});continue}if(i!==void 0&&!i.has(o)){r.push({code:"missing",file:o});continue}const a="kind"in c?itemIdOf(o):listedFileIdOf(o);u.set(a,[...u.get(a)??[],o]);const x={id:a,dir:k(o),entry:o,...s.title===void 0?{}:{title:s.title},groups:s.groups};d.push({...x,...c})}for(const[s,o]of u)o.length>1&&r.push({code:"same-id",id:s,files:o});const h=new Set,p=d.filter(s=>h.has(s.id)?!1:(h.add(s.id),!0));return{items:p.filter(s=>!isListedFile(s)),files:p.filter(isListedFile),listed:p,problems:r}}export const SHOWN_DATA="\0shown",shownPath=t=>`${t}${SHOWN_DATA}`,shownOf=t=>t.endsWith(SHOWN_DATA)?t.slice(0,-SHOWN_DATA.length):void 0;
@@ -12,7 +12,12 @@ export declare const TEXTURES_DIR = "assets/media/textures";
12
12
  export declare const COMPONENTS_DIR = "components";
13
13
  /** 3D sceneries a registry adds, a folder each (`sceneries/<name>/`), as shadcn puts a type of item in its own folder. */
14
14
  export declare const SCENERIES_DIR = "sceneries";
15
- /** This computer's only, never shared: a framework's build folder. */
15
+ /**
16
+ * AllyHub's own folder in a project, as `.next/` and `.astro/` are: made
17
+ * again, never saved and never in Git (`GITIGNORE`, core/protocol's
18
+ * `SNAPSHOT_SKIPPED`). What each place in a project is: docs/architecture.md,
19
+ * 4.1, "A project's folders".
20
+ */
16
21
  export declare const LOCAL_DIR = ".allyhub";
17
22
  /** The agent's working files, free to throw away. */
18
23
  export declare const WORK_DIR = ".allyhub/work";
@@ -32,10 +37,16 @@ export declare const CACHE_DIR = ".allyhub/cache";
32
37
  export declare function partCacheLimit(): number;
33
38
  /** Scenery bakes: a file each, named by its scene's digest and the renderer it was made on. */
34
39
  export declare const BAKE_DIR = ".allyhub/cache/bake";
40
+ /**
41
+ * The agents' folder in a project (the Agent Skills standard's: skills in
42
+ * `.agents/skills/`), saved with it. What the agents keep of the project
43
+ * beside its work goes here, never in `.allyhub/`, which is made again.
44
+ */
45
+ export declare const AGENTS_DIR = ".agents";
35
46
  /** What a person deleted, kept until they empty it. */
36
- export declare const TRASH_DIR = ".allyhub/trash";
37
- /** An agent's notes on the project, kept on this computer (AllyHub's own agent: docs/skills-schedules-memory.md). */
38
- export declare const MEMORY_DIR = ".allyhub/memory";
47
+ export declare const TRASH_DIR = ".agents/trash";
48
+ /** An agent's notes on the project (AllyHub's own agent: docs/skills-schedules-memory.md). */
49
+ export declare const MEMORY_DIR = ".agents/memory";
39
50
  export declare const PACKAGE_FILE = "package.json";
40
51
  export declare const TSCONFIG_FILE = "tsconfig.json";
41
52
  export declare const AGENTS_FILE = "AGENTS.md";
@@ -1,5 +1,5 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export const ASSETS_DIR="assets",MEDIA_DIR="assets/media",DATA_DIR="assets/data",TEXT_DIR="assets/text",FONTS_DIR="assets/fonts",MODELS_DIR="assets/media/models",ENVIRONMENTS_DIR="assets/media/environments",TEXTURES_DIR="assets/media/textures",COMPONENTS_DIR="components",SCENERIES_DIR="sceneries",LOCAL_DIR=".allyhub",WORK_DIR=".allyhub/work",REFERENCE_DIR=".allyhub/work/reference",DEV_FILE=".allyhub/dev.json",OUT_DIR=".allyhub/out",CACHE_DIR=".allyhub/cache";export function partCacheLimit(){const t=globalThis.process?.env,e=Number(t?.ALLYHUB_PART_CACHE_MB);return(Number.isFinite(e)&&e>=0?e:4096)*1024*1024}export const BAKE_DIR=".allyhub/cache/bake",TRASH_DIR=".allyhub/trash",MEMORY_DIR=".allyhub/memory",PACKAGE_FILE="package.json",TSCONFIG_FILE="tsconfig.json",AGENTS_FILE="AGENTS.md",CLAUDE_FILE="CLAUDE.md",CONFIG_FILES=["allyhub.config.ts","allyhub.config.mts","allyhub.config.js","allyhub.config.mjs"],GITIGNORE=`node_modules/
2
+ export const ASSETS_DIR="assets",MEDIA_DIR="assets/media",DATA_DIR="assets/data",TEXT_DIR="assets/text",FONTS_DIR="assets/fonts",MODELS_DIR="assets/media/models",ENVIRONMENTS_DIR="assets/media/environments",TEXTURES_DIR="assets/media/textures",COMPONENTS_DIR="components",SCENERIES_DIR="sceneries",LOCAL_DIR=".allyhub",WORK_DIR=".allyhub/work",REFERENCE_DIR=".allyhub/work/reference",DEV_FILE=".allyhub/dev.json",OUT_DIR=".allyhub/out",CACHE_DIR=".allyhub/cache";export function partCacheLimit(){const t=globalThis.process?.env,e=Number(t?.ALLYHUB_PART_CACHE_MB);return(Number.isFinite(e)&&e>=0?e:4096)*1024*1024}export const BAKE_DIR=".allyhub/cache/bake",AGENTS_DIR=".agents",TRASH_DIR=".agents/trash",MEMORY_DIR=".agents/memory",PACKAGE_FILE="package.json",TSCONFIG_FILE="tsconfig.json",AGENTS_FILE="AGENTS.md",CLAUDE_FILE="CLAUDE.md",CONFIG_FILES=["allyhub.config.ts","allyhub.config.mts","allyhub.config.js","allyhub.config.mjs"],GITIGNORE=`node_modules/
3
3
  ${LOCAL_DIR}/
4
4
  .playwright-cli/
5
5
  `;export function unscanned(t){return t.split("/").some(e=>e.startsWith(".")||e==="node_modules")}export function projectPath(t){return t.replaceAll("\\","/").replace(/^(?:\.\/)+/u,"").replace(/\/+$/u,"").replace(/\/{2,}/gu,"/")}export function dirOf(t){const e=t.lastIndexOf("/");return e<0?"":t.slice(0,e)}export function baseOf(t){return t.slice(t.lastIndexOf("/")+1)}export function within(t,e){return e===""||t===e||t.startsWith(`${e}/`)}
@@ -2367,6 +2367,7 @@ export declare const DATA_FILES: {
2367
2367
  }, z.core.$strict>>;
2368
2368
  movie: z.ZodOptional<z.ZodString>;
2369
2369
  audio: z.ZodOptional<z.ZodString>;
2370
+ item: z.ZodOptional<z.ZodString>;
2370
2371
  poster: z.ZodOptional<z.ZodNumber>;
2371
2372
  playback: z.ZodOptional<z.ZodObject<{
2372
2373
  start: z.ZodOptional<z.ZodEnum<{
@@ -2767,6 +2768,9 @@ export declare const DATA_FILES: {
2767
2768
  rows: z.ZodOptional<z.ZodInt>;
2768
2769
  columns: z.ZodOptional<z.ZodInt>;
2769
2770
  }, z.core.$strip>>>;
2771
+ data: z.ZodOptional<z.ZodString>;
2772
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
2773
+ head: z.ZodOptional<z.ZodBoolean>;
2770
2774
  style: z.ZodOptional<z.ZodString>;
2771
2775
  first_row: z.ZodOptional<z.ZodBoolean>;
2772
2776
  last_row: z.ZodOptional<z.ZodBoolean>;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/formats",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{problem as $}from"@allyhub/diagnostics";import{addLayerRule as L,lookCss as P}from"@allyhub/piece";import{selectorOf as E}from"./inspect.js";import{pictureHint as x,pictureWaiter as A,watchPictures as H}from"./pictures.js";import{rejectedMessage as K,watchStyles as M}from"./styles.js";const p=c=>c.toString(16).padStart(2,"0");export function createStage(c,n){const{options:m,embed:g}=c,f=m.purpose==="check"&&!g,b=f?M():void 0,v=f?H(n):void 0,h=[],R=A(n,t=>{h.some(o=>o.el===t.el&&o.src===t.src)||h.push(t)}),y=new Set,S=t=>!n.contains(t.target)&&!(t.target instanceof HTMLElement&&t.target.dataset.akHolder===""),w=f?new MutationObserver(t=>{for(const o of t)S(o)&&y.add(o.target.nodeName.toLowerCase())}):void 0;let u=!1;const C=t=>{const o=document.createElement("div");o.style.color=t,n.append(o);const i=getComputedStyle(o).color;o.remove();const s=document.createElement("canvas");s.width=1,s.height=1;const a=s.getContext("2d",{willReadFrequently:!0});if(!a)return"#000000";a.fillStyle=i,a.fillRect(0,0,1,1);const[e=0,r=0,d=0,l=255]=a.getImageData(0,0,1,1).data;return`#${p(e)}${p(r)}${p(d)}${l===255?"":p(l)}`},O=()=>{w?.takeRecords().forEach(t=>{S(t)&&y.add(t.target.nodeName.toLowerCase())})};return{el:n,styles:b,picturesDrawn:R,get clear(){return u},async sweep(){await v?.sweep()},cssColor:C,takeOutside:O,dress(t){const{dims:o,look:i}=t;u=m.purpose==="render"&&!g||t.options.transparent===!0,n.replaceChildren(),L(n.ownerDocument),n.dataset.format=t.format,c.lang!==void 0&&(n.lang=c.lang),Object.assign(n.style,{position:"relative",width:`${String(o.width)}px`,height:`${String(o.height)}px`,overflow:"hidden",background:u?"transparent":"var(--ak-color-bg)",color:"var(--ak-color-fg)",fontFamily:"var(--ak-font-body)"});for(const[e,r]of Object.entries(P(i)))n.style.setProperty(e,r);const a=t.options.transparent===!0?"transparent":C("var(--ak-color-bg)");return u&&m.purpose!=="play"&&!g&&(document.documentElement.style.background="transparent",document.body.style.background="transparent"),w?.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),a},problems(t){O();const o=[...y].map(e=>$("AK-R003",`Piece code changed <${e}> outside the stage. Draw only inside each layer's own element.`)),i=(b?.rejected()??[]).map(e=>{const r=e.el&&n.contains(e.el)?E(e.el,n):void 0;return $("AK-R004",K(e,r?` on ${r}`:""),{part:e.part,...r?{where:{selector:r}}:{}})}),s=v?.broken()??[],a=[...s,...h.filter(e=>!s.some(r=>r.el===e.el&&r.src===e.src))].map(e=>{const r=t.find(k=>k.el.contains(e.el)),d=r?.layers.find(k=>k.el.contains(e.el)),l=n.contains(e.el)?E(e.el,n):void 0,j=d?`${d.spec.component} (layer ${String(d.index+1)}) in part ${r?.part.key??""}`:r?`Part ${r.part.key}`:"The stage",D=e.via==="img"?`<img src="${e.src}">`:`a background image, url("${e.src}")`;return $("AK-A005",`${j} draws a picture that does not load: ${D}. ${x(e.src)}`,{...r?{part:r.part.key}:{},...l?{where:{selector:l}}:{}})});return[...o,...i,...a]},dispose(){w?.disconnect(),n.replaceChildren()}}}
2
+ import{problem as $}from"@allyhub/diagnostics";import{addLayerRule as L,lookCss as P}from"@allyhub/piece";import{selectorOf as E}from"./inspect.js";import{pictureHint as x,pictureWaiter as A,watchPictures as H}from"./pictures.js";import{rejectedMessage as K,watchStyles as M}from"./styles.js";const m=c=>c.toString(16).padStart(2,"0");export function createStage(c,n){const{options:u}=c,g=c.embed!==void 0||u.inside!==void 0,f=u.purpose==="check"&&!g,b=f?M():void 0,v=f?H(n):void 0,h=[],R=A(n,t=>{h.some(o=>o.el===t.el&&o.src===t.src)||h.push(t)}),y=new Set,S=t=>!n.contains(t.target)&&!(t.target instanceof HTMLElement&&t.target.dataset.akHolder===""),w=f?new MutationObserver(t=>{for(const o of t)S(o)&&y.add(o.target.nodeName.toLowerCase())}):void 0;let p=!1;const C=t=>{const o=document.createElement("div");o.style.color=t,n.append(o);const i=getComputedStyle(o).color;o.remove();const a=document.createElement("canvas");a.width=1,a.height=1;const s=a.getContext("2d",{willReadFrequently:!0});if(!s)return"#000000";s.fillStyle=i,s.fillRect(0,0,1,1);const[e=0,r=0,d=0,l=255]=s.getImageData(0,0,1,1).data;return`#${m(e)}${m(r)}${m(d)}${l===255?"":m(l)}`},O=()=>{w?.takeRecords().forEach(t=>{S(t)&&y.add(t.target.nodeName.toLowerCase())})};return{el:n,styles:b,picturesDrawn:R,get clear(){return p},async sweep(){await v?.sweep()},cssColor:C,takeOutside:O,dress(t){const{dims:o,look:i}=t;p=u.purpose==="render"&&!g||t.options.transparent===!0,n.replaceChildren(),L(n.ownerDocument),n.dataset.format=t.format,c.lang!==void 0&&(n.lang=c.lang),Object.assign(n.style,{position:"relative",width:`${String(o.width)}px`,height:`${String(o.height)}px`,overflow:"hidden",background:p?"transparent":"var(--ak-color-bg)",color:"var(--ak-color-fg)",fontFamily:"var(--ak-font-body)"});for(const[e,r]of Object.entries(P(i)))n.style.setProperty(e,r);const s=t.options.transparent===!0?"transparent":C("var(--ak-color-bg)");return p&&u.purpose!=="play"&&!g&&(document.documentElement.style.background="transparent",document.body.style.background="transparent"),w?.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),s},problems(t){O();const o=[...y].map(e=>$("AK-R003",`Piece code changed <${e}> outside the stage. Draw only inside each layer's own element.`)),i=(b?.rejected()??[]).map(e=>{const r=e.el&&n.contains(e.el)?E(e.el,n):void 0;return $("AK-R004",K(e,r?` on ${r}`:""),{part:e.part,...r?{where:{selector:r}}:{}})}),a=v?.broken()??[],s=[...a,...h.filter(e=>!a.some(r=>r.el===e.el&&r.src===e.src))].map(e=>{const r=t.find(k=>k.el.contains(e.el)),d=r?.layers.find(k=>k.el.contains(e.el)),l=n.contains(e.el)?E(e.el,n):void 0,j=d?`${d.spec.component} (layer ${String(d.index+1)}) in part ${r?.part.key??""}`:r?`Part ${r.part.key}`:"The stage",D=e.via==="img"?`<img src="${e.src}">`:`a background image, url("${e.src}")`;return $("AK-A005",`${j} draws a picture that does not load: ${D}. ${x(e.src)}`,{...r?{part:r.part.key}:{},...l?{where:{selector:l}}:{}})});return[...o,...i,...s]},dispose(){w?.disconnect(),n.replaceChildren()}}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-draw",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-measure",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-sdk",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {