@openfeed-ink/widget 0.1.3

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 (43) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +141 -0
  3. package/dist/npm/AnnouncementBanner-BPo8Jmax.js +75 -0
  4. package/dist/npm/App.d.ts +5 -0
  5. package/dist/npm/ChangelogTab-DBQ5Ip6K.js +18 -0
  6. package/dist/npm/DrawerType-D9YHimv7.js +1184 -0
  7. package/dist/npm/FeatureDialog-BU1c2n3F.js +31 -0
  8. package/dist/npm/FeedbackTab-V7VCrze1.js +71 -0
  9. package/dist/npm/Main.d.ts +5 -0
  10. package/dist/npm/PopoverType-DlyRog2q.js +1863 -0
  11. package/dist/npm/RoadmapTab-DOYJBpgd.js +18 -0
  12. package/dist/npm/WidgetContent-Bs4eY5OF.js +507 -0
  13. package/dist/npm/button-Q2Dh1yK6.js +3086 -0
  14. package/dist/npm/components/AnnouncementBanner.d.ts +4 -0
  15. package/dist/npm/components/ChangelogTab.d.ts +6 -0
  16. package/dist/npm/components/FeatureDialog.d.ts +5 -0
  17. package/dist/npm/components/FeedbackTab.d.ts +8 -0
  18. package/dist/npm/components/NewFeedback.d.ts +9 -0
  19. package/dist/npm/components/RoadmapTab.d.ts +6 -0
  20. package/dist/npm/components/WidgetContent.d.ts +8 -0
  21. package/dist/npm/components/theme-provider.d.ts +8 -0
  22. package/dist/npm/components/triggerType/DrawerType.d.ts +11 -0
  23. package/dist/npm/components/triggerType/PopoverType.d.ts +11 -0
  24. package/dist/npm/components/ui/button.d.ts +10 -0
  25. package/dist/npm/components/ui/dialog.d.ts +11 -0
  26. package/dist/npm/components/ui/drawer.d.ts +10 -0
  27. package/dist/npm/components/ui/popover.d.ts +7 -0
  28. package/dist/npm/components/ui/tabs.d.ts +11 -0
  29. package/dist/npm/context/outsideEvent.d.ts +17 -0
  30. package/dist/npm/context/shadow-root.d.ts +5 -0
  31. package/dist/npm/dialog-5J_RZfbt.js +107 -0
  32. package/dist/npm/hooks/use-local-storage.d.ts +1 -0
  33. package/dist/npm/index-BaBFRQOq.js +1043 -0
  34. package/dist/npm/index-BkmaVINv.js +334 -0
  35. package/dist/npm/index-MTTUickr.js +237 -0
  36. package/dist/npm/index.d.ts +2 -0
  37. package/dist/npm/index.js +6 -0
  38. package/dist/npm/lib/utils.d.ts +2 -0
  39. package/dist/npm/mount.d.ts +7 -0
  40. package/dist/npm/react/OpenFeed.d.ts +7 -0
  41. package/dist/npm/types/index.d.ts +31 -0
  42. package/dist/npm/x-BkA0RvhX.js +9 -0
  43. package/package.json +95 -0
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
3
+ import { D as i, a as n, b as m, c as u } from "./dialog-5J_RZfbt.js";
4
+ import { u as c } from "./index-BkmaVINv.js";
5
+ function h({
6
+ widgetConfig: a,
7
+ theme: r
8
+ }) {
9
+ const { featureId: l, setFeatureId: s } = c();
10
+ return /* @__PURE__ */ e(
11
+ i,
12
+ {
13
+ open: !!l,
14
+ onOpenChange: (t) => !t && s(null),
15
+ children: /* @__PURE__ */ o(n, { className: "max-w-full p-0 md:max-w-xl lg:max-w-3xl", children: [
16
+ /* @__PURE__ */ e(m, { className: "sr-only", children: "Feature details" }),
17
+ /* @__PURE__ */ e(u, { className: "sr-only", children: "Detailed feature information from OpenFeed." }),
18
+ /* @__PURE__ */ e(
19
+ "iframe",
20
+ {
21
+ src: `${a.apiUrl}/pub/${a.projectId}/features/${l}?theme=${r}`,
22
+ className: "h-[73vh] w-full border-0"
23
+ }
24
+ )
25
+ ] })
26
+ }
27
+ );
28
+ }
29
+ export {
30
+ h as default
31
+ };
@@ -0,0 +1,71 @@
1
+ "use client";
2
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
3
+ import { c as u, u as o } from "./index-BkmaVINv.js";
4
+ import { D as i, d as m, a as d, b as h, c as p } from "./dialog-5J_RZfbt.js";
5
+ import { B as f } from "./button-Q2Dh1yK6.js";
6
+ const w = [
7
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
8
+ ["path", { d: "M12 5v14", key: "s699le" }]
9
+ ], b = u("plus", w);
10
+ function y({
11
+ widgetConfig: e,
12
+ color: t,
13
+ backgroundColor: s,
14
+ theme: l
15
+ }) {
16
+ const { newFeatureOpen: n, setNewFeatureOpen: c } = o();
17
+ return /* @__PURE__ */ a(i, { open: n, onOpenChange: c, children: [
18
+ /* @__PURE__ */ r(m, { asChild: !0, children: /* @__PURE__ */ a(
19
+ f,
20
+ {
21
+ size: "lg",
22
+ style: {
23
+ backgroundColor: s,
24
+ color: t
25
+ },
26
+ className: "w-[90%] cursor-pointer",
27
+ children: [
28
+ /* @__PURE__ */ r(b, { className: "mr-2 h-4 w-4" }),
29
+ "Ask for new Feature"
30
+ ]
31
+ }
32
+ ) }),
33
+ /* @__PURE__ */ a(d, { className: "p-0 md:max-w-md lg:max-w-xl", children: [
34
+ /* @__PURE__ */ r(h, { className: "sr-only", children: "Request a new feature" }),
35
+ /* @__PURE__ */ r(p, { className: "sr-only", children: "Submit a feature request to the OpenFeed project board." }),
36
+ /* @__PURE__ */ r(
37
+ "iframe",
38
+ {
39
+ src: `${e.apiUrl}/pub/${e.projectId}/features/new?theme=${l}`,
40
+ className: "h-[55vh] w-full border-0"
41
+ }
42
+ )
43
+ ] })
44
+ ] });
45
+ }
46
+ function j(e) {
47
+ const { iframeKey: t, ready: s, setReady: l } = o();
48
+ return /* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col items-center justify-center space-y-3", children: [
49
+ /* @__PURE__ */ r(
50
+ y,
51
+ {
52
+ color: e.textColor,
53
+ backgroundColor: e.bgColor,
54
+ theme: e.theme,
55
+ widgetConfig: e
56
+ }
57
+ ),
58
+ /* @__PURE__ */ r(
59
+ "iframe",
60
+ {
61
+ src: `${e.apiUrl}/pub/${e.projectId}/features?theme=${e.theme}`,
62
+ className: "h-full w-full border-0",
63
+ onLoad: () => !s && l(!0)
64
+ },
65
+ t
66
+ )
67
+ ] });
68
+ }
69
+ export {
70
+ j as default
71
+ };
@@ -0,0 +1,5 @@
1
+ import { Config, WidgetConfig } from './types';
2
+ export declare const Main: ({ widgetConfig, config, }: {
3
+ widgetConfig: WidgetConfig;
4
+ config?: Config;
5
+ }) => import("react/jsx-runtime").JSX.Element;