@punica/editor 1.10.3 → 1.10.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punica/editor",
3
- "version": "1.10.3",
3
+ "version": "1.10.5",
4
4
  "description": "Punica Editor",
5
5
  "private": false,
6
6
  "type": "module",
@@ -124,48 +124,36 @@ declare module 'punica' {
124
124
 
125
125
  interface ButtonOptions {
126
126
  variant?: 'filled' | 'outlined' | 'text';
127
- color?: 'primary' | 'secondary' | 'error';
127
+ color?:
128
+ | 'primary'
129
+ | 'secondary'
130
+ | 'error'
131
+ | 'warning'
132
+ | 'info'
133
+ | 'success'
134
+ | 'ghost';
128
135
  size?: 'small' | 'medium' | 'large';
129
136
  disabled?: boolean;
130
137
  rounded?: boolean;
131
138
  icon?: string;
132
139
  fullwidth?: boolean;
140
+ attrs?: Record<string, string>;
141
+ style?: Record<string, string> | string;
142
+ className?: string;
133
143
  }
134
144
 
135
145
  interface IconButtonOptions {
136
146
  title?: string;
137
- size?: 'x-small' | 'small' | 'medium';
147
+ size?: 'x-small' | 'small' | 'medium' | 'large';
138
148
  variant?: 'text' | 'outlined' | 'filled';
139
149
  disabled?: boolean;
140
150
  attrs?: Record<string, string>;
141
151
  style?: Record<string, string> | string;
142
152
  className?: string;
143
- /**
144
- * Finished icon markup, for the cases the positional `iconClass`
145
- * cannot express — a toolbar action declares its icon as ready
146
- * `<i>`/`<svg>` markup rather than a class name, so wrapping it in
147
- * another `<i class=…>` would nest it wrongly.
148
- *
149
- * Same contract as `IconOptions`: a non-empty `iconClass` wins, and
150
- * this is used only when the caller passes an empty one.
151
- */
152
153
  innerHTML?: string;
153
154
  }
154
155
 
155
156
  interface TypographyOptions {
156
- /**
157
- * Every variant `punica-typography` ships a `:host([variant=…])`
158
- * rule for, and nothing else.
159
- *
160
- * This list was previously `'h1'..'h6' | 'body' | 'caption'`, of
161
- * which only `caption` was real. An unknown variant is not a
162
- * harmless no-op: the component stamps `variant="body1"` on any
163
- * element created *without* one, so passing a name it does not
164
- * implement suppresses that default and leaves the text at the
165
- * inherited size, `inline`, with no `role=heading` and no
166
- * `aria-level`. `createTypography` therefore drops anything outside
167
- * this list rather than writing it to the DOM.
168
- */
169
157
  variant?:
170
158
  | 'headline1'
171
159
  | 'headline2'
@@ -181,7 +169,18 @@ declare module 'punica' {
181
169
  | 'caption'
182
170
  | 'overline';
183
171
  color?: 'primary' | 'secondary' | 'error';
184
- fontWeight?: 'normal' | 'bold';
172
+ /**
173
+ * The six weights `punica-typography` ships a rule for. `normal` was
174
+ * never one of them, so it resolved to no rule at all; `regular` is
175
+ * the component's spelling for the same intent.
176
+ */
177
+ fontWeight?:
178
+ | 'thin'
179
+ | 'regular'
180
+ | 'medium'
181
+ | 'semi-bold'
182
+ | 'bold'
183
+ | 'extra-bold';
185
184
  style?: Record<string, string> | string;
186
185
  className?: string;
187
186
  attrs?: Record<string, string>;
@@ -496,6 +495,11 @@ declare module 'punica' {
496
495
  * `onClick` receives the click event. It was declared `() => void`,
497
496
  * which no handler that needs the event (to stop propagation, or to
498
497
  * position a flyout off the cursor) could satisfy.
498
+ *
499
+ * A `label` containing `<` is written as **markup**, not text — an
500
+ * activity-bar entry declares its icon that way. Any label that comes
501
+ * from an LLM, a file path or user input must not go through it: pass
502
+ * an empty label and a `createTypography` child instead.
499
503
  */
500
504
  function createButton(
501
505
  label: string,