labellife-design-tool 2.5.7 → 2.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.
@@ -5,6 +5,9 @@ function _arrayLikeToArray(r, a) {
5
5
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
6
6
  return n;
7
7
  }
8
+ function _arrayWithoutHoles(r) {
9
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
10
+ }
8
11
  function _createForOfIteratorHelper(r, e) {
9
12
  var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
10
13
  if (!t) {
@@ -61,6 +64,12 @@ function _defineProperty(e, r, t) {
61
64
  writable: true
62
65
  }) : e[r] = t, e;
63
66
  }
67
+ function _iterableToArray(r) {
68
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
69
+ }
70
+ function _nonIterableSpread() {
71
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
72
+ }
64
73
  function ownKeys(e, r) {
65
74
  var t = Object.keys(e);
66
75
  if (Object.getOwnPropertySymbols) {
@@ -82,6 +91,9 @@ function _objectSpread2(e) {
82
91
  }
83
92
  return e;
84
93
  }
94
+ function _toConsumableArray(r) {
95
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
96
+ }
85
97
  function _toPrimitive(t, r) {
86
98
  if ("object" != typeof t || !t) return t;
87
99
  var e = t[Symbol.toPrimitive];
@@ -168,6 +180,207 @@ function t(key, defaultValue) {
168
180
  return defaultValue || key;
169
181
  }
170
182
 
183
+ // src/model/activity-log.js
184
+ //
185
+ // Turns what the user does into plain English sentences. Pure functions on
186
+ // plain snapshot objects: no MST, no React, so it runs under plain node tests.
187
+ // Never writes image data or URLs into a sentence.
188
+
189
+ var DEFAULT_OPTIONS = {
190
+ includeTextContent: true,
191
+ maxTextLength: 40,
192
+ maxEntries: 300,
193
+ maxSentenceLength: 200,
194
+ mergeWindowMs: 1500
195
+ };
196
+ function clip(text, max) {
197
+ var s = String(text == null ? '' : text);
198
+ return s.length > max ? "".concat(s.slice(0, max), "\u2026") : s;
199
+ }
200
+ function imageSource(src) {
201
+ var s = String(src || '');
202
+ if (s.startsWith('data:') || s.startsWith('blob:')) return 'uploaded';
203
+ if (s.toLowerCase().includes('unsplash')) return 'stock photo';
204
+ return '';
205
+ }
206
+ var _short = function _short(v) {
207
+ var s = String(v == null ? '' : v);
208
+ return "".concat(s.length, ":").concat(s.slice(0, 40));
209
+ };
210
+ var isLocked = function isLocked(el) {
211
+ return el.draggable === false && el.resizable === false && el.contentEditable === false && el.styleEditable === false;
212
+ };
213
+ var quotedText = function quotedText(el, n, opts) {
214
+ return opts.includeTextContent && el.text ? "\"".concat(clip(el.text, opts.maxTextLength), "\"") : n;
215
+ };
216
+
217
+ // One row per property group: how to read its value, and how to word the change.
218
+ // A new property is one new row. `render(ctx)` returns (from, to) => sentence so a
219
+ // merged entry can be re-worded with its first `from` and last `to`.
220
+ var ROWS = [{
221
+ key: 'text',
222
+ props: ['text'],
223
+ render: function render(_ref8) {
224
+ var opts = _ref8.opts;
225
+ return function (f, t) {
226
+ return opts.includeTextContent ? "Changed the text \"".concat(clip(f, opts.maxTextLength), "\" to \"").concat(clip(t, opts.maxTextLength), "\".") : 'Changed the text.';
227
+ };
228
+ }
229
+ }, {
230
+ key: 'fontFamily',
231
+ props: ['fontFamily'],
232
+ render: function render(_ref9) {
233
+ var n = _ref9.n;
234
+ return function (f, t) {
235
+ return "Changed the font of ".concat(n, " to ").concat(t, ".");
236
+ };
237
+ }
238
+ }, {
239
+ key: 'fontSize',
240
+ props: ['fontSize'],
241
+ render: function render(_ref0) {
242
+ var n = _ref0.n;
243
+ return function (f, t) {
244
+ return "Changed the font size of ".concat(n, " from ").concat(f, " to ").concat(t, ".");
245
+ };
246
+ }
247
+ }, {
248
+ key: 'fill',
249
+ props: ['fill'],
250
+ render: function render(_ref1) {
251
+ var n = _ref1.n;
252
+ return function (f, t) {
253
+ return "Changed the colour of ".concat(n, " to ").concat(t, ".");
254
+ };
255
+ }
256
+ }, {
257
+ key: 'position',
258
+ props: ['x', 'y'],
259
+ render: function render(_ref10) {
260
+ var n = _ref10.n;
261
+ return function () {
262
+ return "Moved ".concat(n, ".");
263
+ };
264
+ }
265
+ }, {
266
+ key: 'size',
267
+ props: ['width', 'height'],
268
+ render: function render(_ref11) {
269
+ var n = _ref11.n;
270
+ return function () {
271
+ return "Resized ".concat(n, ".");
272
+ };
273
+ }
274
+ }, {
275
+ key: 'rotation',
276
+ props: ['rotation'],
277
+ render: function render(_ref12) {
278
+ var n = _ref12.n;
279
+ return function (f, t) {
280
+ return "Rotated ".concat(n, " to ").concat(t, " degrees.");
281
+ };
282
+ }
283
+ }, {
284
+ key: 'visible',
285
+ props: ['visible'],
286
+ render: function render(_ref13) {
287
+ var n = _ref13.n;
288
+ return function (f, t) {
289
+ return t ? "Showed ".concat(n, ".") : "Hid ".concat(n, ".");
290
+ };
291
+ }
292
+ }, {
293
+ key: 'lock',
294
+ props: ['draggable', 'resizable', 'contentEditable', 'styleEditable'],
295
+ value: isLocked,
296
+ render: function render(_ref14) {
297
+ var n = _ref14.n;
298
+ return function (f, t) {
299
+ return t ? "Locked ".concat(n, ".") : "Unlocked ".concat(n, ".");
300
+ };
301
+ }
302
+ }, {
303
+ key: 'crop',
304
+ props: ['cropX', 'cropY', 'cropWidth', 'cropHeight'],
305
+ render: function render(_ref15) {
306
+ var n = _ref15.n;
307
+ return function () {
308
+ return "Cropped ".concat(n, ".");
309
+ };
310
+ }
311
+ }, {
312
+ key: 'clipSrc',
313
+ props: ['clipSrc'],
314
+ render: function render(_ref16) {
315
+ var n = _ref16.n;
316
+ return function (f, t) {
317
+ return t ? "Applied a mask to ".concat(n, ".") : "Removed the mask from ".concat(n, ".");
318
+ };
319
+ }
320
+ }, {
321
+ key: 'curveEnabled',
322
+ props: ['curveEnabled'],
323
+ render: function render(_ref17) {
324
+ var n = _ref17.n,
325
+ next = _ref17.next,
326
+ opts = _ref17.opts;
327
+ return function (f, t) {
328
+ return t ? "Applied curved text to ".concat(quotedText(next, n, opts), ".") : "Removed the curve from ".concat(n, ".");
329
+ };
330
+ }
331
+ }, {
332
+ key: 'shadowEnabled',
333
+ props: ['shadowEnabled'],
334
+ render: function render(_ref18) {
335
+ var n = _ref18.n;
336
+ return function (f, t) {
337
+ return t ? "Added a shadow to ".concat(n, ".") : "Removed the shadow from ".concat(n, ".");
338
+ };
339
+ }
340
+ }, {
341
+ key: 'grayscaleEnabled',
342
+ props: ['grayscaleEnabled'],
343
+ render: function render(_ref19) {
344
+ var n = _ref19.n;
345
+ return function (f, t) {
346
+ return t ? "Made ".concat(n, " grayscale.") : "Removed the grayscale from ".concat(n, ".");
347
+ };
348
+ }
349
+ }, {
350
+ key: 'src',
351
+ props: ['src'],
352
+ value: function value(el) {
353
+ return _short(el.src);
354
+ },
355
+ render: function render(_ref20) {
356
+ var n = _ref20.n,
357
+ next = _ref20.next;
358
+ return function () {
359
+ var source = imageSource(next.src);
360
+ var note = source === 'uploaded' ? ' (uploaded by the user)' : source ? " (".concat(source, ")") : '';
361
+ return "Replaced ".concat(n).concat(note, ".");
362
+ };
363
+ }
364
+ }];
365
+ new Set(['id', 'type', 'custom', 'children'].concat(_toConsumableArray(ROWS.flatMap(function (r) {
366
+ return r.props;
367
+ }))));
368
+
369
+ // ── Options singleton ───────────────────────────────────────────────
370
+ // Window-level, like the other config: each Rollup output bundle gets its own
371
+ // copy of this module, so a closure variable set from one would never be seen
372
+ // by another.
373
+
374
+ var OPTIONS_KEY = '__labellife_activity_log_options__';
375
+ function setActivityLogOptions(options) {
376
+ if (typeof window === 'undefined') return;
377
+ window[OPTIONS_KEY] = _objectSpread2(_objectSpread2({}, window[OPTIONS_KEY] || {}), options || {});
378
+ }
379
+ function getActivityLogOptions() {
380
+ var set = typeof window !== 'undefined' && window[OPTIONS_KEY] || {};
381
+ return _objectSpread2(_objectSpread2({}, DEFAULT_OPTIONS), set);
382
+ }
383
+
171
384
  var _theme = 'light';
172
385
  var _customTheme = {};
173
386
  function setTranslations(translations) {
@@ -226,12 +439,14 @@ function getInputFieldsConfig() {
226
439
  return typeof window !== 'undefined' && window[INPUT_FIELDS_CONFIG_KEY] || {};
227
440
  }
228
441
 
442
+ exports.getActivityLogOptions = getActivityLogOptions;
229
443
  exports.getCustomTheme = getCustomTheme;
230
444
  exports.getInputFieldsConfig = getInputFieldsConfig;
231
445
  exports.getTheme = getTheme;
232
446
  exports.getTranslations = getTranslations;
233
447
  exports.getUnsplashSearchUrl = getUnsplashSearchUrl;
234
448
  exports.getUnsplashTrackDownloadUrl = getUnsplashTrackDownloadUrl;
449
+ exports.setActivityLogOptions = setActivityLogOptions;
235
450
  exports.setCustomTheme = setCustomTheme;
236
451
  exports.setInputFieldsConfig = setInputFieldsConfig;
237
452
  exports.setTheme = setTheme;
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../src/utils/l10n.js","../../src/config.js"],"sourcesContent":["// Use a window-level singleton so that all Rollup bundles (config, toolbar,\n// side-panel, canvas) share the same translations object. Without this each\n// bundle gets its own copy of this module with a separate local variable.\nconst GLOBAL_KEY = '__labellife_translations__';\nif (typeof window !== 'undefined' && !window[GLOBAL_KEY]) {\n window[GLOBAL_KEY] = {};\n}\n\nfunction _get() {\n return (typeof window !== 'undefined' && window[GLOBAL_KEY]) || {};\n}\n\nfunction deepMerge(target, source) {\n const result = { ...target };\n for (const key of Object.keys(source)) {\n if (\n source[key] &&\n typeof source[key] === 'object' &&\n !Array.isArray(source[key]) &&\n target[key] &&\n typeof target[key] === 'object' &&\n !Array.isArray(target[key])\n ) {\n result[key] = deepMerge(target[key], source[key]);\n } else {\n result[key] = source[key];\n }\n }\n return result;\n}\n\nexport function setTranslations(newTranslations) {\n if (typeof window !== 'undefined') {\n window[GLOBAL_KEY] = deepMerge(_get(), newTranslations);\n }\n}\n\nexport function getTranslations() {\n return _get();\n}\n\nexport function t(key, defaultValue) {\n // Support dot-notation paths like 'toolbar.duration'\n const parts = key.split('.');\n let current = _get();\n for (const part of parts) {\n if (current == null || typeof current !== 'object') {\n return defaultValue || key;\n }\n current = current[part];\n }\n if (current !== undefined && current !== null && typeof current !== 'object') {\n return current;\n }\n return defaultValue || key;\n}\n","import { setTranslations as _setTranslations, getTranslations, t } from './utils/l10n';\n\nlet _theme = 'light';\nlet _customTheme = {};\n\nexport function setTranslations(translations) {\n _setTranslations(translations);\n}\n\nexport { getTranslations, t };\n\nexport function setTheme(theme) {\n _theme = theme;\n}\n\nexport function getTheme() {\n return _theme;\n}\n\nexport function setCustomTheme(customTheme) {\n _customTheme = { ..._customTheme, ...customTheme };\n}\n\nexport function getCustomTheme() {\n return _customTheme;\n}\n\n// ── Unsplash proxy endpoints (used by background-panel.js) ───────────────────\n// The host app supplies the full endpoint URLs; the library only appends the query string.\n// Window-level singletons, same reasoning as translations/input-fields config above:\n// each Rollup output bundle (index, side-panel, toolbar, canvas...) gets its own copy\n// of this module, so a plain closure variable set from one bundle (e.g. via the host\n// app's top-level `labellife-design-tool/config` import) would never be seen by another\n// bundle (e.g. background-panel.js, built into the side-panel bundle).\nconst UNSPLASH_SEARCH_URL_KEY = '__labellife_unsplash_search_url__';\nconst UNSPLASH_TRACK_DOWNLOAD_URL_KEY = '__labellife_unsplash_track_download_url__';\n\nexport function setUnsplashSearchUrl(url) {\n if (typeof window !== 'undefined') {\n window[UNSPLASH_SEARCH_URL_KEY] = url || '';\n }\n}\n\nexport function getUnsplashSearchUrl() {\n return (typeof window !== 'undefined' && window[UNSPLASH_SEARCH_URL_KEY]) || '';\n}\n\nexport function setUnsplashTrackDownloadUrl(url) {\n if (typeof window !== 'undefined') {\n window[UNSPLASH_TRACK_DOWNLOAD_URL_KEY] = url || '';\n }\n}\n\nexport function getUnsplashTrackDownloadUrl() {\n return (typeof window !== 'undefined' && window[UNSPLASH_TRACK_DOWNLOAD_URL_KEY]) || '';\n}\n\n// ── Input Fields Dialog Config ───────────────────────────────────────\nconst INPUT_FIELDS_CONFIG_KEY = '__labellife_input_fields_config__';\nif (typeof window !== 'undefined' && !window[INPUT_FIELDS_CONFIG_KEY]) {\n window[INPUT_FIELDS_CONFIG_KEY] = {};\n}\n\nexport function setInputFieldsConfig(config) {\n if (typeof window !== 'undefined') {\n window[INPUT_FIELDS_CONFIG_KEY] = { ...window[INPUT_FIELDS_CONFIG_KEY], ...config };\n }\n}\n\nexport function getInputFieldsConfig() {\n return (typeof window !== 'undefined' && window[INPUT_FIELDS_CONFIG_KEY]) || {};\n}\n"],"names":["GLOBAL_KEY","window","_get","deepMerge","target","source","result","_objectSpread","_i","_Object$keys","Object","keys","length","key","_typeof","Array","isArray","setTranslations","newTranslations","getTranslations","t","defaultValue","parts","split","current","_iterator","_createForOfIteratorHelper","_step","s","n","done","part","value","err","e","f","undefined","_theme","_customTheme","translations","_setTranslations","setTheme","theme","getTheme","setCustomTheme","customTheme","getCustomTheme","UNSPLASH_SEARCH_URL_KEY","UNSPLASH_TRACK_DOWNLOAD_URL_KEY","setUnsplashSearchUrl","url","getUnsplashSearchUrl","setUnsplashTrackDownloadUrl","getUnsplashTrackDownloadUrl","INPUT_FIELDS_CONFIG_KEY","setInputFieldsConfig","config","getInputFieldsConfig"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,IAAMA,UAAU,GAAG,4BAA4B;AAC/C,IAAI,OAAOC,MAAM,KAAK,WAAW,IAAI,CAACA,MAAM,CAACD,UAAU,CAAC,EAAE;AACxDC,EAAAA,MAAM,CAACD,UAAU,CAAC,GAAG,EAAE;AACzB;AAEA,SAASE,IAAIA,GAAG;EACd,OAAQ,OAAOD,MAAM,KAAK,WAAW,IAAIA,MAAM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CAAC,GAAA/C,cAAA,CAAAA,cAAA,CAAA,EAAA,EAAQN,MAAM,CAACqD,uBAAuB,CAAC,CAAA,EAAKE,MAAM,CAAE;AACrF,EAAA;AACF;AAEO,SAASC,oBAAoBA,GAAG;EACrC,OAAQ,OAAOxD,MAAM,KAAK,WAAW,IAAIA,MAAM,CAACqD,uBAAuB,CAAC,IAAK,EAAE;AACjF;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../src/utils/l10n.js","../../src/model/activity-log.js","../../src/config.js"],"sourcesContent":["// Use a window-level singleton so that all Rollup bundles (config, toolbar,\n// side-panel, canvas) share the same translations object. Without this each\n// bundle gets its own copy of this module with a separate local variable.\nconst GLOBAL_KEY = '__labellife_translations__';\nif (typeof window !== 'undefined' && !window[GLOBAL_KEY]) {\n window[GLOBAL_KEY] = {};\n}\n\nfunction _get() {\n return (typeof window !== 'undefined' && window[GLOBAL_KEY]) || {};\n}\n\nfunction deepMerge(target, source) {\n const result = { ...target };\n for (const key of Object.keys(source)) {\n if (\n source[key] &&\n typeof source[key] === 'object' &&\n !Array.isArray(source[key]) &&\n target[key] &&\n typeof target[key] === 'object' &&\n !Array.isArray(target[key])\n ) {\n result[key] = deepMerge(target[key], source[key]);\n } else {\n result[key] = source[key];\n }\n }\n return result;\n}\n\nexport function setTranslations(newTranslations) {\n if (typeof window !== 'undefined') {\n window[GLOBAL_KEY] = deepMerge(_get(), newTranslations);\n }\n}\n\nexport function getTranslations() {\n return _get();\n}\n\nexport function t(key, defaultValue) {\n // Support dot-notation paths like 'toolbar.duration'\n const parts = key.split('.');\n let current = _get();\n for (const part of parts) {\n if (current == null || typeof current !== 'object') {\n return defaultValue || key;\n }\n current = current[part];\n }\n if (current !== undefined && current !== null && typeof current !== 'object') {\n return current;\n }\n return defaultValue || key;\n}\n","// src/model/activity-log.js\n//\n// Turns what the user does into plain English sentences. Pure functions on\n// plain snapshot objects: no MST, no React, so it runs under plain node tests.\n// Never writes image data or URLs into a sentence.\n\nexport const DEFAULT_OPTIONS = {\n includeTextContent: true,\n maxTextLength: 40,\n maxEntries: 300,\n maxSentenceLength: 200,\n mergeWindowMs: 1500,\n};\n\nexport function clip(text, max) {\n const s = String(text == null ? '' : text);\n return s.length > max ? `${s.slice(0, max)}…` : s;\n}\n\nexport function imageSource(src) {\n const s = String(src || '');\n if (s.startsWith('data:') || s.startsWith('blob:')) return 'uploaded';\n if (s.toLowerCase().includes('unsplash')) return 'stock photo';\n return '';\n}\n\nexport function describeElement(el, opts = DEFAULT_OPTIONS) {\n const type = el && el.type;\n switch (type) {\n case 'text': {\n const text = el.text == null ? '' : String(el.text);\n if (!opts.includeTextContent || !text) return 'the text';\n return `the text \"${clip(text, opts.maxTextLength)}\"`;\n }\n case 'image':\n return 'the image';\n case 'figure':\n return el.subType ? `the shape (${el.subType})` : 'the shape';\n case 'line':\n return 'the line';\n case 'group':\n return 'the group';\n case 'svg':\n return 'the graphic';\n default:\n return 'the element';\n }\n}\n\n// ── Start, final and popup sentences ────────────────────────────────\n\nconst MAX_LISTED_TEXTS = 5;\nconst HIDDEN_VALUE = '(value hidden)';\n\nfunction walk(children, fn) {\n (children || []).forEach((child) => {\n if (!child) return;\n fn(child);\n if (child.children) walk(child.children, fn);\n });\n}\n\nfunction allElements(snapshot) {\n const out = [];\n ((snapshot && snapshot.pages) || []).forEach((page) => walk(page && page.children, (el) => out.push(el)));\n return out;\n}\n\nconst num = (n) => String(Number.isFinite(+n) ? +(+n).toFixed(2) : n);\n\nexport function describeSize(snapshot) {\n const s = snapshot || {};\n return `${num(s.width)} x ${num(s.height)} ${s.unit || 'px'}`;\n}\n\nconst plural = (n, word) => `${n} ${word}${n === 1 ? '' : 's'}`;\n\nconst COUNTED = [\n ['text', 'text'],\n ['image', 'image'],\n ['figure', 'shape'],\n ['line', 'line'],\n ['svg', 'graphic'],\n];\n\nfunction countParts(elements) {\n return COUNTED.map(([type, word]) => [elements.filter((e) => e.type === type).length, word])\n .filter(([n]) => n > 0)\n .map(([n, word]) => plural(n, word));\n}\n\nfunction joinWithAnd(parts) {\n if (parts.length <= 1) return parts.join('');\n return `${parts.slice(0, -1).join(', ')} and ${parts[parts.length - 1]}`;\n}\n\nexport function variableName(el) {\n const custom = (el && el.custom) || {};\n return custom.variableName || custom.promptText || 'the field';\n}\n\nexport function describeStart(snapshot, opts = DEFAULT_OPTIONS) {\n const elements = allElements(snapshot);\n const size = describeSize(snapshot);\n if (elements.length === 0) return [`Started from a blank label, ${size}.`];\n\n const parts = countParts(elements);\n const texts = elements.filter((e) => e.type === 'text' && e.text);\n if (opts.includeTextContent && texts.length && parts[0].endsWith(texts.length === 1 ? ' text' : ' texts')) {\n const listed = texts\n .slice(0, MAX_LISTED_TEXTS)\n .map((e) => `\"${clip(e.text, opts.maxTextLength)}\"`)\n .join(', ');\n parts[0] = `${parts[0]} (${listed})`;\n }\n const pages = ((snapshot && snapshot.pages) || []).length || 1;\n const sentences = [`Started from a template, ${size}, ${plural(pages, 'page')}, with ${joinWithAnd(parts)}.`];\n\n const vars = elements.filter((e) => e.custom && e.custom.inputField);\n if (vars.length) {\n const named = vars.map((e) => `\"${variableName(e)}\" (${e.custom.inputType || 'text'})`).join(', ');\n sentences.push(`The template asked for ${plural(vars.length, 'variable')}: ${named}.`);\n }\n return sentences;\n}\n\nexport function describeFinal(snapshot) {\n const parts = countParts(allElements(snapshot));\n return `Final label: ${[...(parts.length ? parts : ['empty']), describeSize(snapshot)].join(', ')}.`;\n}\n\nexport function describePopup({ action, field, value } = {}, opts = DEFAULT_OPTIONS) {\n if (action === 'finish') return 'User finished the variable questions.';\n const custom = (field && field.custom) || {};\n const name = variableName(field);\n const shown = (v) => (opts.includeTextContent ? clip(v, opts.maxTextLength) : HIDDEN_VALUE);\n switch (action) {\n case 'skip':\n return custom.removeIfSkipped\n ? `User skipped variable \"${name}\"; the element was removed from the label.`\n : `User skipped variable \"${name}\".`;\n case 'back':\n return `User went back to change variable \"${name}\".`;\n case 'submit':\n break;\n default:\n return `User answered variable \"${name}\".`;\n }\n switch (custom.inputType) {\n case 'radio': {\n const isOption = Array.isArray(custom.options) && custom.options.includes(value);\n return isOption\n ? `User chose \"${shown(value)}\" for variable \"${name}\".`\n : `User typed their own answer \"${shown(value)}\" for variable \"${name}\".`;\n }\n case 'list': {\n const picked = String(value == null ? '' : value)\n .split(', ')\n .filter(Boolean)\n .map((v) => `\"${shown(v)}\"`)\n .join(', ');\n return `User selected ${picked} for variable \"${name}\".`;\n }\n case 'date':\n return `User picked the date \"${shown(value)}\" for variable \"${name}\".`;\n case 'integer':\n return `User entered the number ${shown(value)} for variable \"${name}\".`;\n case 'image':\n return `User uploaded an image for variable \"${name}\".`;\n default:\n return `User entered \"${shown(value)}\" for variable \"${name}\".`;\n }\n}\n\n// ── Diff: snapshot → sentences ──────────────────────────────────────\n\nconst words = (prop) =>\n String(prop)\n .replace(/([A-Z])/g, ' $1')\n .toLowerCase()\n .trim();\n\nconst short = (v) => {\n const s = String(v == null ? '' : v);\n return `${s.length}:${s.slice(0, 40)}`;\n};\n\nconst isLocked = (el) =>\n el.draggable === false && el.resizable === false && el.contentEditable === false && el.styleEditable === false;\n\nconst quotedText = (el, n, opts) =>\n opts.includeTextContent && el.text ? `\"${clip(el.text, opts.maxTextLength)}\"` : n;\n\n// One row per property group: how to read its value, and how to word the change.\n// A new property is one new row. `render(ctx)` returns (from, to) => sentence so a\n// merged entry can be re-worded with its first `from` and last `to`.\nconst ROWS = [\n {\n key: 'text',\n props: ['text'],\n render: ({ opts }) => (f, t) =>\n opts.includeTextContent\n ? `Changed the text \"${clip(f, opts.maxTextLength)}\" to \"${clip(t, opts.maxTextLength)}\".`\n : 'Changed the text.',\n },\n { key: 'fontFamily', props: ['fontFamily'], render: ({ n }) => (f, t) => `Changed the font of ${n} to ${t}.` },\n {\n key: 'fontSize',\n props: ['fontSize'],\n render: ({ n }) => (f, t) => `Changed the font size of ${n} from ${f} to ${t}.`,\n },\n { key: 'fill', props: ['fill'], render: ({ n }) => (f, t) => `Changed the colour of ${n} to ${t}.` },\n { key: 'position', props: ['x', 'y'], render: ({ n }) => () => `Moved ${n}.` },\n { key: 'size', props: ['width', 'height'], render: ({ n }) => () => `Resized ${n}.` },\n { key: 'rotation', props: ['rotation'], render: ({ n }) => (f, t) => `Rotated ${n} to ${t} degrees.` },\n { key: 'visible', props: ['visible'], render: ({ n }) => (f, t) => (t ? `Showed ${n}.` : `Hid ${n}.`) },\n {\n key: 'lock',\n props: ['draggable', 'resizable', 'contentEditable', 'styleEditable'],\n value: isLocked,\n render: ({ n }) => (f, t) => (t ? `Locked ${n}.` : `Unlocked ${n}.`),\n },\n {\n key: 'crop',\n props: ['cropX', 'cropY', 'cropWidth', 'cropHeight'],\n render: ({ n }) => () => `Cropped ${n}.`,\n },\n {\n key: 'clipSrc',\n props: ['clipSrc'],\n render: ({ n }) => (f, t) => (t ? `Applied a mask to ${n}.` : `Removed the mask from ${n}.`),\n },\n {\n key: 'curveEnabled',\n props: ['curveEnabled'],\n render: ({ n, next, opts }) => (f, t) =>\n t ? `Applied curved text to ${quotedText(next, n, opts)}.` : `Removed the curve from ${n}.`,\n },\n {\n key: 'shadowEnabled',\n props: ['shadowEnabled'],\n render: ({ n }) => (f, t) => (t ? `Added a shadow to ${n}.` : `Removed the shadow from ${n}.`),\n },\n {\n key: 'grayscaleEnabled',\n props: ['grayscaleEnabled'],\n render: ({ n }) => (f, t) => (t ? `Made ${n} grayscale.` : `Removed the grayscale from ${n}.`),\n },\n {\n key: 'src',\n props: ['src'],\n value: (el) => short(el.src),\n render: ({ n, next }) => () => {\n const source = imageSource(next.src);\n const note = source === 'uploaded' ? ' (uploaded by the user)' : source ? ` (${source})` : '';\n return `Replaced ${n}${note}.`;\n },\n },\n];\n\nconst HANDLED = new Set(['id', 'type', 'custom', 'children', ...ROWS.flatMap((r) => r.props)]);\n\nfunction rowValue(row, el) {\n if (row.value) return row.value(el);\n return row.props.length === 1 ? el[row.props[0]] : row.props.map((p) => el[p]).join(',');\n}\n\nfunction indexSnapshot(snapshot) {\n const pages = new Map();\n const elements = new Map();\n const orders = new Map();\n ((snapshot && snapshot.pages) || []).forEach((page) => {\n if (!page) return;\n pages.set(page.id, page);\n const visit = (children, parentId) => {\n orders.set(parentId, (children || []).filter(Boolean).map((c) => c.id));\n (children || []).forEach((child) => {\n if (!child) return;\n elements.set(child.id, { el: child, parentId });\n if (child.children) visit(child.children, child.id);\n });\n };\n visit(page.children, page.id);\n });\n return { pages, elements, orders };\n}\n\nfunction indefinite(el, opts) {\n switch (el.type) {\n case 'text':\n return opts.includeTextContent && el.text ? `a text \"${clip(el.text, opts.maxTextLength)}\"` : 'a text';\n case 'image': {\n const source = imageSource(el.src);\n const note = source === 'uploaded' ? ' (uploaded by the user)' : source ? ` (${source})` : '';\n return `an image${note}`;\n }\n case 'figure':\n return el.subType ? `a shape (${el.subType})` : 'a shape';\n case 'line':\n return 'a line';\n case 'group':\n return 'a group';\n case 'svg':\n return 'a graphic';\n default:\n return 'an element';\n }\n}\n\nconst BACKGROUND_IMAGE = /^(https?:|data:|blob:|url\\()/;\n\nexport function diffToEntries(prev, next, opts = DEFAULT_OPTIONS) {\n if (!prev || !next) return [];\n const a = indexSnapshot(prev);\n const b = indexSnapshot(next);\n const out = [];\n\n // Label size\n const sizeFrom = describeSize(prev);\n const sizeTo = describeSize(next);\n if (sizeFrom !== sizeTo) {\n out.push({\n key: 'label:size',\n from: sizeFrom,\n to: sizeTo,\n render: (f, t) => `Changed the label size from ${f} to ${t}.`,\n sentence: `Changed the label size from ${sizeFrom} to ${sizeTo}.`,\n });\n }\n\n // Pages\n const addedPages = new Set([...b.pages.keys()].filter((id) => !a.pages.has(id)));\n const removedPages = new Set([...a.pages.keys()].filter((id) => !b.pages.has(id)));\n addedPages.forEach((id) => out.push({ key: `${id}:added`, sentence: 'Added a page.' }));\n removedPages.forEach((id) => out.push({ key: `${id}:removed`, sentence: 'Removed a page.' }));\n\n // Added and removed elements (only the top of an added/removed subtree)\n const added = new Set([...b.elements.keys()].filter((id) => !a.elements.has(id)));\n const removed = new Set([...a.elements.keys()].filter((id) => !b.elements.has(id)));\n added.forEach((id) => {\n const { el, parentId } = b.elements.get(id);\n if (added.has(parentId) || addedPages.has(parentId)) return;\n out.push({ key: `${id}:added`, sentence: `Added ${indefinite(el, opts)}.` });\n });\n removed.forEach((id) => {\n const { el, parentId } = a.elements.get(id);\n if (removed.has(parentId) || removedPages.has(parentId)) return;\n out.push({ key: `${id}:removed`, sentence: `Removed ${describeElement(el, opts)}.` });\n });\n\n // Changed elements\n b.elements.forEach(({ el: nextEl }, id) => {\n const before = a.elements.get(id);\n if (!before) return;\n const prevEl = before.el;\n const ctx = { n: describeElement(nextEl, opts), prev: prevEl, next: nextEl, opts };\n ROWS.forEach((row) => {\n const from = rowValue(row, prevEl);\n const to = rowValue(row, nextEl);\n if (from === to || (from === undefined && to === undefined)) return;\n const render = row.render(ctx);\n out.push({ key: `${id}:${row.key}`, from, to, render, sentence: render(from, to) });\n });\n const props = new Set([...Object.keys(prevEl), ...Object.keys(nextEl)]);\n props.forEach((prop) => {\n if (HANDLED.has(prop)) return;\n const from = JSON.stringify(prevEl[prop]);\n const to = JSON.stringify(nextEl[prop]);\n if (from === to) return;\n out.push({ key: `${id}:${prop}`, from, to, sentence: `Changed the ${words(prop)} of ${ctx.n}.` });\n });\n });\n\n // Layer order within each parent, for elements present before and after\n b.orders.forEach((nextIds, parentId) => {\n const prevIds = a.orders.get(parentId);\n if (!prevIds) return;\n const common = new Set(nextIds.filter((id) => prevIds.includes(id)));\n const pOrder = prevIds.filter((id) => common.has(id));\n const nOrder = nextIds.filter((id) => common.has(id));\n if (pOrder.join('|') === nOrder.join('|')) return;\n const mover = nOrder.find((c) => {\n const p = pOrder.filter((id) => id !== c).join('|');\n const n = nOrder.filter((id) => id !== c).join('|');\n return p === n;\n });\n if (!mover) {\n out.push({ key: `${parentId}:order`, sentence: 'Changed the layer order.' });\n return;\n }\n const name = describeElement(b.elements.get(mover).el, opts);\n const pos = nOrder.indexOf(mover);\n const sentence =\n pos === nOrder.length - 1\n ? `Brought ${name} to the front.`\n : pos === 0\n ? `Sent ${name} to the back.`\n : `Changed the layer order of ${name}.`;\n out.push({ key: `${mover}:order`, sentence });\n });\n\n // Page background\n b.pages.forEach((page, id) => {\n const before = a.pages.get(id);\n if (!before) return;\n const from = before.background || '';\n const to = page.background || '';\n if (from === to) return;\n const sentence = !to\n ? 'Removed the background.'\n : BACKGROUND_IMAGE.test(to)\n ? 'Set an image as the background.'\n : `Changed the background colour to ${to}.`;\n out.push({ key: `${id}:background`, sentence });\n });\n\n return out;\n}\n\n// ── Tracker: keeps the log, merges quick repeats, caps the size ─────\n\nexport class ActivityTracker {\n constructor(getOptions = () => DEFAULT_OPTIONS, now = Date.now) {\n this._getOptions = getOptions;\n this._now = now;\n this.clear();\n }\n\n get _opts() {\n return { ...DEFAULT_OPTIONS, ...(this._getOptions() || {}) };\n }\n\n clear() {\n this._start = [];\n this._actions = [];\n this._dropped = false;\n this._baseline = null;\n }\n\n reset(snapshot, extra = []) {\n this.clear();\n if (!snapshot) return;\n this._baseline = snapshot;\n this._start = [...describeStart(snapshot, this._opts), ...extra];\n }\n\n rebaseline(snapshot) {\n if (snapshot) this._baseline = snapshot;\n }\n\n // The canvas sometimes rewrites an element by itself (e.g. re-measuring a text's height once a\n // font has loaded). That is not something the user did, so fold it into the baseline for just\n // that element: the next commit then won't report it, and the user's own pending changes stay.\n patchBaseline(id, attrs) {\n if (!id || !this._baseline) return;\n const patch = (children) =>\n (children || []).map((child) => {\n if (!child) return child;\n if (child.id === id) return { ...child, ...attrs };\n return child.children ? { ...child, children: patch(child.children) } : child;\n });\n this._baseline = {\n ...this._baseline,\n pages: (this._baseline.pages || []).map((page) => (page ? { ...page, children: patch(page.children) } : page)),\n };\n }\n\n onCommit(snapshot) {\n if (!snapshot) return;\n const previous = this._baseline;\n this._baseline = snapshot;\n if (!previous) return;\n diffToEntries(previous, snapshot, this._opts).forEach((entry) => this._add(entry));\n }\n\n record(sentence, key) {\n this._add({ key, sentence: String(sentence) });\n }\n\n undone(snapshot) {\n this._add({ sentence: 'Undid the last change.' });\n this.rebaseline(snapshot);\n }\n\n redone(snapshot) {\n this._add({ sentence: 'Redid the last change.' });\n this.rebaseline(snapshot);\n }\n\n getLog(finalSnapshot) {\n const { maxSentenceLength } = this._opts;\n const lines = [...this._start];\n if (this._dropped) lines.push('Earlier actions were left out.');\n this._actions.forEach((a) => lines.push(a.sentence));\n if (finalSnapshot) lines.push(describeFinal(finalSnapshot));\n return lines.map((line) => clip(line, maxSentenceLength));\n }\n\n _add(entry) {\n const at = this._now();\n const last = this._actions[this._actions.length - 1];\n const { mergeWindowMs, maxEntries } = this._opts;\n if (entry.key && last && last.key === entry.key && at - last.at <= mergeWindowMs) {\n if (entry.render && last.render) {\n if (last.from === entry.to) {\n this._actions.pop();\n return;\n }\n this._actions[this._actions.length - 1] = {\n ...entry,\n from: last.from,\n at,\n sentence: entry.render(last.from, entry.to),\n };\n } else {\n this._actions[this._actions.length - 1] = { ...entry, at };\n }\n return;\n }\n this._actions.push({ ...entry, at });\n if (this._actions.length > maxEntries) {\n this._actions.shift();\n this._dropped = true;\n }\n }\n}\n\n// ── Options singleton ───────────────────────────────────────────────\n// Window-level, like the other config: each Rollup output bundle gets its own\n// copy of this module, so a closure variable set from one would never be seen\n// by another.\n\nconst OPTIONS_KEY = '__labellife_activity_log_options__';\n\nexport function setActivityLogOptions(options) {\n if (typeof window === 'undefined') return;\n window[OPTIONS_KEY] = { ...(window[OPTIONS_KEY] || {}), ...(options || {}) };\n}\n\nexport function getActivityLogOptions() {\n const set = (typeof window !== 'undefined' && window[OPTIONS_KEY]) || {};\n return { ...DEFAULT_OPTIONS, ...set };\n}\n","import { setTranslations as _setTranslations, getTranslations, t } from './utils/l10n';\n\nlet _theme = 'light';\nlet _customTheme = {};\n\nexport function setTranslations(translations) {\n _setTranslations(translations);\n}\n\nexport { getTranslations, t };\n\nexport function setTheme(theme) {\n _theme = theme;\n}\n\nexport function getTheme() {\n return _theme;\n}\n\nexport function setCustomTheme(customTheme) {\n _customTheme = { ..._customTheme, ...customTheme };\n}\n\nexport function getCustomTheme() {\n return _customTheme;\n}\n\n// ── Unsplash proxy endpoints (used by background-panel.js) ───────────────────\n// The host app supplies the full endpoint URLs; the library only appends the query string.\n// Window-level singletons, same reasoning as translations/input-fields config above:\n// each Rollup output bundle (index, side-panel, toolbar, canvas...) gets its own copy\n// of this module, so a plain closure variable set from one bundle (e.g. via the host\n// app's top-level `labellife-design-tool/config` import) would never be seen by another\n// bundle (e.g. background-panel.js, built into the side-panel bundle).\nconst UNSPLASH_SEARCH_URL_KEY = '__labellife_unsplash_search_url__';\nconst UNSPLASH_TRACK_DOWNLOAD_URL_KEY = '__labellife_unsplash_track_download_url__';\n\nexport function setUnsplashSearchUrl(url) {\n if (typeof window !== 'undefined') {\n window[UNSPLASH_SEARCH_URL_KEY] = url || '';\n }\n}\n\nexport function getUnsplashSearchUrl() {\n return (typeof window !== 'undefined' && window[UNSPLASH_SEARCH_URL_KEY]) || '';\n}\n\nexport function setUnsplashTrackDownloadUrl(url) {\n if (typeof window !== 'undefined') {\n window[UNSPLASH_TRACK_DOWNLOAD_URL_KEY] = url || '';\n }\n}\n\nexport function getUnsplashTrackDownloadUrl() {\n return (typeof window !== 'undefined' && window[UNSPLASH_TRACK_DOWNLOAD_URL_KEY]) || '';\n}\n\n// ── Input Fields Dialog Config ───────────────────────────────────────\nconst INPUT_FIELDS_CONFIG_KEY = '__labellife_input_fields_config__';\nif (typeof window !== 'undefined' && !window[INPUT_FIELDS_CONFIG_KEY]) {\n window[INPUT_FIELDS_CONFIG_KEY] = {};\n}\n\nexport function setInputFieldsConfig(config) {\n if (typeof window !== 'undefined') {\n window[INPUT_FIELDS_CONFIG_KEY] = { ...window[INPUT_FIELDS_CONFIG_KEY], ...config };\n }\n}\n\nexport function getInputFieldsConfig() {\n return (typeof window !== 'undefined' && window[INPUT_FIELDS_CONFIG_KEY]) || {};\n}\n\n// ── Activity log options (see model/activity-log.js) ─────────────────\nexport { setActivityLogOptions, getActivityLogOptions } from './model/activity-log';\n"],"names":["GLOBAL_KEY","window","_get","deepMerge","target","source","result","_objectSpread","_i","_Object$keys","Object","keys","length","key","_typeof","Array","isArray","setTranslations","newTranslations","getTranslations","t","defaultValue","parts","split","current","_iterator","_createForOfIteratorHelper","_step","s","n","done","part","value","err","e","f","undefined","DEFAULT_OPTIONS","includeTextContent","maxTextLength","maxEntries","maxSentenceLength","mergeWindowMs","clip","text","max","String","concat","slice","imageSource","src","startsWith","toLowerCase","includes","short","v","isLocked","el","draggable","resizable","contentEditable","styleEditable","quotedText","opts","ROWS","props","render","_ref8","_ref9","_ref0","_ref1","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","_ref17","next","_ref18","_ref19","_ref20","note","Set","_toConsumableArray","flatMap","r","OPTIONS_KEY","setActivityLogOptions","options","getActivityLogOptions","set","_theme","_customTheme","translations","_setTranslations","setTheme","theme","getTheme","setCustomTheme","customTheme","getCustomTheme","UNSPLASH_SEARCH_URL_KEY","UNSPLASH_TRACK_DOWNLOAD_URL_KEY","setUnsplashSearchUrl","url","getUnsplashSearchUrl","setUnsplashTrackDownloadUrl","getUnsplashTrackDownloadUrl","INPUT_FIELDS_CONFIG_KEY","setInputFieldsConfig","config","getInputFieldsConfig"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,IAAMA,UAAU,GAAG,4BAA4B;AAC/C,IAAI,OAAOC,MAAM,KAAK,WAAW,IAAI,CAACA,MAAM,CAACD,UAAU,CAAC,EAAE;AACxDC,EAAAA,MAAM,CAACD,UAAU,CAAC,GAAG,EAAE;AACzB;AAEA,SAASE,IAAIA,GAAG;EACd,OAAQ,OAAOD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