@aastrika/ai-elements 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,151 @@ see at a glance what to expect when they upgrade.
6
6
  Versions follow semver: a **minor** adds something, a **patch** fixes something,
7
7
  and neither removes anything a host was using.
8
8
 
9
+ ## 0.7.0
10
+
11
+ A screen redesign rather than API: the tags, attributes and events are
12
+ unchanged, so a host upgrades without touching a line.
13
+
14
+ **Added**
15
+ - Hear a voice before choosing it: the Voice picker (setup, and "Change the plan
16
+ with AI") is a menu of voices grouped by language, each with a play button
17
+ that speaks a short sample in the video's language without choosing it.
18
+ Needs the service's new `GET /v1/studio/list-voices/:voiceId/sample?lang=` — on an
19
+ older service the play buttons hide themselves and choosing works as before
20
+
21
+ **Changed**
22
+ - Clearer actions across the three screens: one way to change a finished video
23
+ (Make changes, beside it); Assessment's first tab is "Create assessment", as
24
+ Studio's is "Create video"; the usage list says Watch and Excel, as the
25
+ assessment list does; "Regenerate plan" says it starts over; costs always
26
+ show two decimals ("$0.50", not "$0.5")
27
+ - Usage & spend has the other screens' look: glass figure tiles with the spend
28
+ split, a "Showing" picker, pill tabs, style names in colour instead of ids,
29
+ coloured status tags, creator initials, and quieter row actions pinned in
30
+ view on narrow screens
31
+ - The Usage "Showing" picker is a menu of people with what each made and
32
+ spent, instead of a plain dropdown; it works by keyboard and closes on
33
+ Escape or a click outside
34
+ - A video opened from My videos can be changed again: Make changes reopens its
35
+ scene plan, and Regenerate redoes only the scenes that changed
36
+ - The render's technical log is hidden unless the host sets
37
+ `technical-log="on"` (new, optional attribute; default off)
38
+ - Content Studio has the assessment screen's layout and look: Create video and
39
+ My videos tabs, a five-step stepper, the form beside a sticky summary with the
40
+ one action, style cards with a picture of each style, and the cost shown
41
+ beside the scene plan before anything is spent
42
+ - Generate scene plan opens the plan screen at once, so the wait shows where the
43
+ scenes will appear; Edit setup reopens the form over the plan
44
+ - Content Studio caps at 1600px and centres, as the assessment screen does
45
+ - Content Studio offers the same languages as the assessment screen, read from
46
+ the service's one shared list (`GET /v1/quiz/languages`); if that list cannot
47
+ be fetched it keeps Hindi, English, Kannada and Telugu
48
+ - Content Studio uses the assessment screen's compact type scale, so titles,
49
+ labels, buttons and the stepper are the same size on both
50
+ - Content Studio's plan: a compact planning card with five named stages; each
51
+ scene shows its picture and title overlay, its words, and the picture's
52
+ description side by side
53
+ - Content Studio's render shows the five stages on one line that fills as it
54
+ moves, what is being made beside the progress, and a tile per scene (voiced,
55
+ drawn, being made)
56
+ - My videos uses the assessment list's layout — a search, then one row a video
57
+ with its style's picture as a thumbnail — and each row can show the settings
58
+ the video was made with (material, style, language, voice, format, scenes,
59
+ references, cost and the brief)
60
+ - A finished video offers New video at the top of the screen, beside Edit setup
61
+
62
+ **Fixed**
63
+ - The creator's name now reaches the service: `configure({ creatorName })` was
64
+ dropped inside the elements, so every row was saved with no name and the
65
+ usage report showed the id instead
66
+ - My videos showed the uploaded file's name instead of the video's title
67
+ - Create video, after watching a finished or past video, kept showing that
68
+ video instead of opening a fresh form
69
+ - The render no longer sits on "Drawing scenes · 11 of 11" while the video is
70
+ being joined; it moves to "Putting it together" as soon as every scene is drawn
71
+ - The Content Studio title now shows in hosts whose router passes no `heading`
72
+ value, as the assessment screen's already did
73
+
74
+ ## 0.6.2
75
+
76
+ Adds behaviour and a screen redesign rather than API: `configure()`, the tags,
77
+ attributes and events are unchanged, so a host upgrades without touching a line.
78
+
79
+ **Added**
80
+ - Stop a generation you started by mistake. Assessment shows a Cancel button
81
+ while it runs; the run stops at its next step and the form comes back with
82
+ your sources and settings still in place. A model call already in flight
83
+ finishes and is still paid for — there is no way to un-send one
84
+ - Your own history, under each feature. "Your assessments" and "Your videos"
85
+ list what the signed-in person created — open one to review, edit or download
86
+ again. Filtered to that person, so nobody sees another's work
87
+ - The source a question came from now reads as a labelled chip, and difficulty
88
+ and Bloom's level are colour-coded (green/amber/red, and violet), so a long
89
+ set sorts at a glance
90
+
91
+ **Changed**
92
+ - One **Download Excel** button in place of the old Save / Excel / CSV trio.
93
+ Edits now save on their own a moment after you type and when you leave, and the
94
+ download always saves the latest first. CSV is dropped: Excel already carries
95
+ every language on its own sheet, where CSV carried one and looked like it lost
96
+ the others
97
+ - The Assessment screen is rebuilt into smaller parts with a Material → Settings
98
+ → Review track, a sticky summary, and a more compact layout. Every existing
99
+ feature and API call works exactly as before
100
+
101
+ **Fixed**
102
+ - In an exported sheet, the Correct Answer column is the option **number**
103
+ (1, 2, 3, 4), not the option text — a grader reads it against the numbered
104
+ columns, and a number stays valid in every translation
105
+ - The element now carries its own font. It named Inter but did not ship it, so
106
+ in a host that loads a different font (CBP ships Roboto) it fell back to the
107
+ system font and looked unlike the demo. The Latin subset of Inter is now
108
+ bundled and injected once, so the type is identical in every host with no
109
+ font loading, no `<link>`, and no CSP to satisfy. Adds ~100KB. Hindi keeps
110
+ using the system Devanagari font, as it always did — Inter has no Devanagari
111
+ - Headings and icon-beside-text rows sat misaligned inside a host whose global
112
+ typography (Material, in CBP) set a taller line-height and a different heading
113
+ font: line-height inherits, and a bare `h2` lost to the host's `h1..h6` rule.
114
+ The element now states its own line-height on the root and its font on every
115
+ heading class, so it reads the same in any host with no host CSS
116
+ - On a wide host (like the portal), the assessment screen stretched full-bleed —
117
+ the two-column steps put the label at one edge and the control at the other.
118
+ It now caps at 1600px and centres, the same in every host, with no host CSS;
119
+ `--aastrika-max-width` still overrides it
120
+ - A question's source read backwards when it was a topic, not a file:
121
+ "Definition · Understanding the Fourth Stage of Labor" led with the subtopic
122
+ and buried the topic. A topic-shaped reference is now shown whole, in its
123
+ natural order; a real document still leads with its section
124
+
125
+ **Removed**
126
+ - The "past video's script" source picker in Assessment. It is not part of a
127
+ host's integration surface, so nothing a host configures changes
128
+
129
+ Cancel and history need the service on this branch's backend build: cancel posts
130
+ `status: 'cancelled'` to the quiz update endpoint, and history reads a `creator`
131
+ filter on the list endpoints. On an older service, the Cancel button's request
132
+ is rejected and history comes back empty — nothing else is affected.
133
+
134
+ ## 0.6.1
135
+
136
+ **Fixed**
137
+ - The usage report showed one person's figures instead of the whole
138
+ organisation's — and nothing at all when the signed-in name did not match the
139
+ name recorded on their content. Every request body was given the signed-in
140
+ `creator`, including the report, where that field means "filter to this
141
+ person" rather than "this is who I am". The report is no longer given one; the
142
+ dashboard's own picker still filters as before
143
+
144
+ **Added**
145
+ - `creatorName` in `configure()` — the signed-in person's display name, shown in
146
+ the report while `creator` stays what it groups by. A host can now use a
147
+ stable handle as `creator` and let people rename themselves without splitting
148
+ their history across two creators. Optional: omit it and the report shows
149
+ `creator`, exactly as today
150
+
151
+ Needs the service to be on a build that stores `creator_name`; on an older one
152
+ the field is ignored and nothing changes.
153
+
9
154
  ## 0.6.0
10
155
 
11
156
  Adds behaviour rather than API: the tags, attributes and events are exactly
@@ -43,8 +43,20 @@ export interface AastrikaConfig {
43
43
  apiBase: string;
44
44
  /** Headers proving the caller may use the service. Called before every request. */
45
45
  getAuthHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
46
- /** The username signed into YOUR application. Attribution, never verified. */
46
+ /**
47
+ * A STABLE key for whoever is signed into YOUR application — a login handle
48
+ * or an id, never a display name. The usage report groups and filters by it,
49
+ * so renaming somebody must not change it. Attribution, never verified.
50
+ */
47
51
  creator?: () => string | null;
52
+ /**
53
+ * The same person's display name, e.g. "Prince Gupta". Shown in the usage
54
+ * report; `creator` remains what it groups by, so people can rename
55
+ * themselves without splitting their history. Optional — omit it and the
56
+ * report shows `creator`, so send one whenever `creator` is an opaque id,
57
+ * or the report fills with UUIDs.
58
+ */
59
+ creatorName?: () => string | null;
48
60
  /** Called whenever a request fails, so your monitoring hears about it. */
49
61
  onError?: (error: AastrikaError) => void;
50
62
  }
@@ -92,6 +104,13 @@ interface AastrikaContentStudioElement extends HTMLElement {
92
104
  * same-origin host.
93
105
  */
94
106
  editMode?: 'on' | 'off';
107
+ /**
108
+ * `'on'` lets the render's technical log be opened. Defaults to `'off'`.
109
+ *
110
+ * The log is for support and admin pages; a creator sees the same progress
111
+ * in plain words without it.
112
+ */
113
+ technicalLog?: 'on' | 'off';
95
114
  /** Language the form opens on, e.g. `'hi'`, `'en'`, `'kn'`, `'te'`. */
96
115
  defaultLanguage?: string;
97
116
  /** `'16:9'` or `'9:16'`. */