@syntrologie/adapt-faq 2.8.0-canary.49 → 2.8.0-canary.50
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/dist/FAQWidget.d.ts +1 -1
- package/dist/FAQWidget.d.ts.map +1 -1
- package/dist/FAQWidget.js +1 -18
- package/dist/cdn.d.ts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/package.json +1 -1
package/dist/FAQWidget.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare const FAQMountableWidget: {
|
|
|
27
27
|
mount(container: HTMLElement, config?: FAQConfig & {
|
|
28
28
|
runtime?: FAQWidgetRuntime;
|
|
29
29
|
instanceId?: string;
|
|
30
|
-
}): () => void;
|
|
30
|
+
}): (() => void) | undefined;
|
|
31
31
|
};
|
|
32
32
|
export default FAQWidget;
|
|
33
33
|
//# sourceMappingURL=FAQWidget.d.ts.map
|
package/dist/FAQWidget.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FAQWidget.d.ts","sourceRoot":"","sources":["../src/FAQWidget.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,KAAK,EAEV,SAAS,EAIV,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA2KpD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,cAAc,2CA8VxE;AAMD;;GAEG;AACH,eAAO,MAAM,kBAAkB;qBAEhB,WAAW,WACb,SAAS,GAAG;QAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;
|
|
1
|
+
{"version":3,"file":"FAQWidget.d.ts","sourceRoot":"","sources":["../src/FAQWidget.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,KAAK,EAEV,SAAS,EAIV,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA2KpD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,cAAc,2CA8VxE;AAMD;;GAEG;AACH,eAAO,MAAM,kBAAkB;qBAEhB,WAAW,WACb,SAAS,GAAG;QAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;CA4B3E,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/FAQWidget.js
CHANGED
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* Demonstrates the compositional action pattern where child actions
|
|
9
9
|
* (faq:question) serve as configuration data for the parent widget.
|
|
10
10
|
*/
|
|
11
|
-
import { purple
|
|
11
|
+
import { purple } from '@syntro/design-system/tokens';
|
|
12
12
|
import { Marked } from 'marked';
|
|
13
13
|
import React, { useCallback, useEffect, useMemo, useReducer, useState } from 'react';
|
|
14
14
|
import { createRoot } from 'react-dom/client';
|
|
@@ -370,23 +370,6 @@ export const FAQMountableWidget = {
|
|
|
370
370
|
root.unmount();
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
// HTML fallback when React is not available
|
|
374
|
-
const questions = faqConfig.actions || [];
|
|
375
|
-
container.innerHTML = `
|
|
376
|
-
<div style="font-family: system-ui; max-width: 800px;">
|
|
377
|
-
${questions
|
|
378
|
-
.map((q) => `
|
|
379
|
-
<div style="margin-bottom: 8px; padding: 16px; background: ${slateGrey[12]}; border-radius: 8px;">
|
|
380
|
-
<strong>${q.config.question}</strong>
|
|
381
|
-
<p style="margin-top: 8px; color: ${slateGrey[6]};">${getAnswerText(q.config.answer)}</p>
|
|
382
|
-
</div>
|
|
383
|
-
`)
|
|
384
|
-
.join('')}
|
|
385
|
-
</div>
|
|
386
|
-
`;
|
|
387
|
-
return () => {
|
|
388
|
-
container.innerHTML = '';
|
|
389
|
-
};
|
|
390
373
|
},
|
|
391
374
|
};
|
|
392
375
|
export default FAQWidget;
|
package/dist/cdn.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare const manifest: {
|
|
|
31
31
|
mount(container: HTMLElement, config?: import("./types").FAQConfig & {
|
|
32
32
|
runtime?: import("./faq-types").FAQWidgetRuntime;
|
|
33
33
|
instanceId?: string;
|
|
34
|
-
}): () => void;
|
|
34
|
+
}): (() => void) | undefined;
|
|
35
35
|
};
|
|
36
36
|
metadata: {
|
|
37
37
|
name: string;
|
package/dist/runtime.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare const runtime: {
|
|
|
38
38
|
mount(container: HTMLElement, config?: import("./types").FAQConfig & {
|
|
39
39
|
runtime?: import("./faq-types").FAQWidgetRuntime;
|
|
40
40
|
instanceId?: string;
|
|
41
|
-
}): () => void;
|
|
41
|
+
}): (() => void) | undefined;
|
|
42
42
|
};
|
|
43
43
|
metadata: {
|
|
44
44
|
name: string;
|
package/package.json
CHANGED