@fileverse-dev/fortune-react 1.0.2-mod-36 → 1.0.2-mod-37

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.
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import "./duneChartsInputModal.css";
3
+ interface DuneChartsInputModalProps {
4
+ isOpen: boolean;
5
+ onClose: () => void;
6
+ onSubmit: (value: string) => void;
7
+ icon: string;
8
+ submitText?: string;
9
+ placeholder?: string;
10
+ }
11
+ declare const DuneChartsInputModal: ({ isOpen, onClose, onSubmit, icon, submitText, placeholder, }: DuneChartsInputModalProps) => React.JSX.Element | null;
12
+ export default DuneChartsInputModal;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import "./index.css";
3
+ interface DunePreviewProps {
4
+ url: string;
5
+ position: {
6
+ left: number;
7
+ top: number;
8
+ };
9
+ onKeepAsLink: () => void;
10
+ onEmbed: () => void;
11
+ }
12
+ declare const DunePreview: React.FC<DunePreviewProps>;
13
+ export default DunePreview;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const IframeBoxs: React.FC;
3
+ export default IframeBoxs;
@@ -55,6 +55,14 @@ export declare function generateAPIs(context: Context, setContext: (recipe: (ctx
55
55
  data?: CellMatrix | undefined;
56
56
  id?: string | undefined;
57
57
  images?: import("@fileverse-dev/fortune-core").Image[] | undefined;
58
+ iframes?: {
59
+ id: string;
60
+ src: string;
61
+ left: number;
62
+ top: number;
63
+ width: number;
64
+ height: number;
65
+ }[] | undefined;
58
66
  zoomRatio?: number | undefined;
59
67
  column?: number | undefined;
60
68
  row?: number | undefined;
@@ -62,6 +62,14 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
62
62
  data?: CellMatrix | undefined;
63
63
  id?: string | undefined;
64
64
  images?: import("@fileverse-dev/fortune-core").Image[] | undefined;
65
+ iframes?: {
66
+ id: string;
67
+ src: string;
68
+ left: number;
69
+ top: number;
70
+ width: number;
71
+ height: number;
72
+ }[] | undefined;
65
73
  zoomRatio?: number | undefined;
66
74
  column?: number | undefined;
67
75
  row?: number | undefined;
package/dist/index.css CHANGED
@@ -2778,6 +2778,99 @@ label {
2778
2778
  overflow-y: scroll;
2779
2779
  }
2780
2780
 
2781
+ .custom-overlay {
2782
+ position: absolute;
2783
+ top: 0;
2784
+ left: 0;
2785
+ z-index: 50;
2786
+ height: 100vh;
2787
+ width: 100%;
2788
+ display: grid;
2789
+ place-items: center;
2790
+ }
2791
+
2792
+ .input-modal {
2793
+ position: fixed;
2794
+ top: 25%;
2795
+ left: 50%;
2796
+ transform: translateX(-50%);
2797
+ border-radius: 0.75rem;
2798
+ background-color: #ffffff;
2799
+ padding: 0;
2800
+ border: none;
2801
+ box-shadow: 0px 8px 32px 0px #00000026;
2802
+ animation: fadeIn 0.2s ease-in-out;
2803
+ }
2804
+
2805
+ .modal-header {
2806
+ display: flex;
2807
+ gap: 0.5rem;
2808
+ align-items: center;
2809
+ padding: 0.75rem;
2810
+ border-bottom: 1px solid #e5e7eb;
2811
+ }
2812
+
2813
+ .fetch-url-button {
2814
+ cursor: pointer;
2815
+ }
2816
+
2817
+ .modal-input {
2818
+ border: none;
2819
+ padding: 0;
2820
+ outline: none;
2821
+ -webkit-user-select: text;
2822
+ -moz-user-select: text;
2823
+ user-select: text;
2824
+ max-width: 150px;
2825
+ flex: 1;
2826
+ }
2827
+
2828
+ @media (min-width: 768px) {
2829
+ .modal-input {
2830
+ max-width: 400px;
2831
+ width: 380px !important;
2832
+ }
2833
+ }
2834
+
2835
+ .modal-input:disabled {
2836
+ opacity: 1;
2837
+ }
2838
+
2839
+ @keyframes fadeIn {
2840
+ from {
2841
+ opacity: 0;
2842
+ transform: translateX(-50%) scale(0.95);
2843
+ }
2844
+ to {
2845
+ opacity: 1;
2846
+ transform: translateX(-50%) scale(1);
2847
+ }
2848
+ }
2849
+
2850
+ .modal-footer {
2851
+ display: flex;
2852
+ justify-content: flex-end;
2853
+ padding: 8px 16px;
2854
+ }
2855
+
2856
+ .modal-button {
2857
+ width: 100%;
2858
+ margin: 8px;
2859
+ }
2860
+
2861
+ .modal-error-message {
2862
+ color: #ef4e2f;
2863
+ background: #fff5f5;
2864
+ margin: 8px 16px;
2865
+ padding: 4px 8px;
2866
+ border-radius: 4px;
2867
+ display: flex;
2868
+ align-items: center;
2869
+ gap: 8px;
2870
+ font-size: 12px;
2871
+ font-weight: 400;
2872
+ }
2873
+
2781
2874
  .fortune-fx-editor {
2782
2875
  display: flex;
2783
2876
  flex-direction: row;
@@ -3637,3 +3730,67 @@ label {
3637
3730
  display: inline-block;
3638
3731
  margin-left: 15px;
3639
3732
  }
3733
+
3734
+ .fortune-dune-preview {
3735
+ position: absolute;
3736
+ background-color: #fff;
3737
+ border: 1px solid #e5e5e5;
3738
+ border-radius: 8px;
3739
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3740
+ width: 270px;
3741
+ height: 250px;
3742
+ z-index: 1000;
3743
+ display: flex;
3744
+ flex-direction: column;
3745
+ padding: 8px;
3746
+ gap: 8px;
3747
+ }
3748
+
3749
+ .fortune-dune-preview-header {
3750
+ display: flex;
3751
+ justify-content: space-between;
3752
+ align-items: center;
3753
+ }
3754
+
3755
+ .fortune-dune-preview-title {
3756
+ font-size: 14px;
3757
+ font-weight: 500;
3758
+ color: #363b3f;
3759
+ }
3760
+
3761
+ .fortune-dune-preview-content {
3762
+ flex: 1;
3763
+ overflow: hidden;
3764
+ position: relative;
3765
+ border-radius: 4px;
3766
+ border: 1px solid #f8f9fa;
3767
+ }
3768
+
3769
+ .fortune-dune-preview-footer {
3770
+ display: flex;
3771
+ justify-content: flex-end;
3772
+ gap: 8px;
3773
+ padding: 8px;
3774
+ }
3775
+
3776
+ .fortune-dune-preview-button {
3777
+ padding: 6px 12px;
3778
+ border-radius: 4px;
3779
+ font-size: 14px;
3780
+ cursor: pointer;
3781
+ transition: all 0.2s ease;
3782
+ }
3783
+
3784
+ .fortune-dune-preview-button:hover {
3785
+ background-color: #f5f5f5;
3786
+ }
3787
+
3788
+ .fortune-dune-preview-button-primary {
3789
+ background-color: #1e1870;
3790
+ border-color: #1e1870;
3791
+ color: #fff;
3792
+ }
3793
+
3794
+ .fortune-dune-preview-button-primary:hover {
3795
+ background-color: #2a2379;
3796
+ }
@@ -2778,6 +2778,99 @@ label {
2778
2778
  overflow-y: scroll;
2779
2779
  }
2780
2780
 
2781
+ .custom-overlay {
2782
+ position: absolute;
2783
+ top: 0;
2784
+ left: 0;
2785
+ z-index: 50;
2786
+ height: 100vh;
2787
+ width: 100%;
2788
+ display: grid;
2789
+ place-items: center;
2790
+ }
2791
+
2792
+ .input-modal {
2793
+ position: fixed;
2794
+ top: 25%;
2795
+ left: 50%;
2796
+ transform: translateX(-50%);
2797
+ border-radius: 0.75rem;
2798
+ background-color: #ffffff;
2799
+ padding: 0;
2800
+ border: none;
2801
+ box-shadow: 0px 8px 32px 0px #00000026;
2802
+ animation: fadeIn 0.2s ease-in-out;
2803
+ }
2804
+
2805
+ .modal-header {
2806
+ display: flex;
2807
+ gap: 0.5rem;
2808
+ align-items: center;
2809
+ padding: 0.75rem;
2810
+ border-bottom: 1px solid #e5e7eb;
2811
+ }
2812
+
2813
+ .fetch-url-button {
2814
+ cursor: pointer;
2815
+ }
2816
+
2817
+ .modal-input {
2818
+ border: none;
2819
+ padding: 0;
2820
+ outline: none;
2821
+ -webkit-user-select: text;
2822
+ -moz-user-select: text;
2823
+ user-select: text;
2824
+ max-width: 150px;
2825
+ flex: 1;
2826
+ }
2827
+
2828
+ @media (min-width: 768px) {
2829
+ .modal-input {
2830
+ max-width: 400px;
2831
+ width: 380px !important;
2832
+ }
2833
+ }
2834
+
2835
+ .modal-input:disabled {
2836
+ opacity: 1;
2837
+ }
2838
+
2839
+ @keyframes fadeIn {
2840
+ from {
2841
+ opacity: 0;
2842
+ transform: translateX(-50%) scale(0.95);
2843
+ }
2844
+ to {
2845
+ opacity: 1;
2846
+ transform: translateX(-50%) scale(1);
2847
+ }
2848
+ }
2849
+
2850
+ .modal-footer {
2851
+ display: flex;
2852
+ justify-content: flex-end;
2853
+ padding: 8px 16px;
2854
+ }
2855
+
2856
+ .modal-button {
2857
+ width: 100%;
2858
+ margin: 8px;
2859
+ }
2860
+
2861
+ .modal-error-message {
2862
+ color: #ef4e2f;
2863
+ background: #fff5f5;
2864
+ margin: 8px 16px;
2865
+ padding: 4px 8px;
2866
+ border-radius: 4px;
2867
+ display: flex;
2868
+ align-items: center;
2869
+ gap: 8px;
2870
+ font-size: 12px;
2871
+ font-weight: 400;
2872
+ }
2873
+
2781
2874
  .fortune-fx-editor {
2782
2875
  display: flex;
2783
2876
  flex-direction: row;
@@ -3637,3 +3730,67 @@ label {
3637
3730
  display: inline-block;
3638
3731
  margin-left: 15px;
3639
3732
  }
3733
+
3734
+ .fortune-dune-preview {
3735
+ position: absolute;
3736
+ background-color: #fff;
3737
+ border: 1px solid #e5e5e5;
3738
+ border-radius: 8px;
3739
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3740
+ width: 270px;
3741
+ height: 250px;
3742
+ z-index: 1000;
3743
+ display: flex;
3744
+ flex-direction: column;
3745
+ padding: 8px;
3746
+ gap: 8px;
3747
+ }
3748
+
3749
+ .fortune-dune-preview-header {
3750
+ display: flex;
3751
+ justify-content: space-between;
3752
+ align-items: center;
3753
+ }
3754
+
3755
+ .fortune-dune-preview-title {
3756
+ font-size: 14px;
3757
+ font-weight: 500;
3758
+ color: #363b3f;
3759
+ }
3760
+
3761
+ .fortune-dune-preview-content {
3762
+ flex: 1;
3763
+ overflow: hidden;
3764
+ position: relative;
3765
+ border-radius: 4px;
3766
+ border: 1px solid #f8f9fa;
3767
+ }
3768
+
3769
+ .fortune-dune-preview-footer {
3770
+ display: flex;
3771
+ justify-content: flex-end;
3772
+ gap: 8px;
3773
+ padding: 8px;
3774
+ }
3775
+
3776
+ .fortune-dune-preview-button {
3777
+ padding: 6px 12px;
3778
+ border-radius: 4px;
3779
+ font-size: 14px;
3780
+ cursor: pointer;
3781
+ transition: all 0.2s ease;
3782
+ }
3783
+
3784
+ .fortune-dune-preview-button:hover {
3785
+ background-color: #f5f5f5;
3786
+ }
3787
+
3788
+ .fortune-dune-preview-button-primary {
3789
+ background-color: #1e1870;
3790
+ border-color: #1e1870;
3791
+ color: #fff;
3792
+ }
3793
+
3794
+ .fortune-dune-preview-button-primary:hover {
3795
+ background-color: #2a2379;
3796
+ }