@netless/forge-slide 0.1.1-alpha.9 → 1.0.0-alpha.1
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/FoorerView.d.ts +23 -0
- package/dist/FoorerView.d.ts.map +1 -0
- package/dist/FooterView.d.ts +9 -2
- package/dist/FooterView.d.ts.map +1 -1
- package/dist/SiderBarView.d.ts +16 -0
- package/dist/SiderBarView.d.ts.map +1 -1
- package/dist/SlideApplication.d.ts +5 -2
- package/dist/SlideApplication.d.ts.map +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.d.ts.map +1 -1
- package/dist/index.esm.js +3571 -2361
- package/dist/index.esm.js.map +4 -4
- package/dist/index.js +3568 -2358
- package/dist/index.js.map +4 -4
- package/dist/utils.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/FooterView.ts +50 -18
- package/src/SiderBarView.ts +125 -45
- package/src/SlideApplication.ts +96 -62
- package/src/icons.ts +38 -19
- package/src/utils.ts +2 -2
package/src/icons.ts
CHANGED
|
@@ -1,26 +1,45 @@
|
|
|
1
|
+
// const prevPage = (color: string) => `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none">
|
|
2
|
+
// <rect opacity="0.01" width="24" height="24" fill="white"/>
|
|
3
|
+
// <path d="M15 4L15.4419 3.55806C15.3247 3.44085 15.1658 3.375 15 3.375V4ZM19 8H19.625C19.625 7.83424 19.5592 7.67527 19.4419 7.55806L19 8ZM6 4.625H15V3.375H6V4.625ZM14.5581 4.44194L18.5581 8.44194L19.4419 7.55806L15.4419 3.55806L14.5581 4.44194ZM18.375 8V13H19.625V8H18.375ZM18.375 13V19H19.625V13H18.375ZM18 19.375H12V20.625H18V19.375ZM5.625 13V5H4.375V13H5.625ZM18.375 19C18.375 19.2071 18.2071 19.375 18 19.375V20.625C18.8975 20.625 19.625 19.8975 19.625 19H18.375ZM6 3.375C5.10254 3.375 4.375 4.10254 4.375 5H5.625C5.625 4.79289 5.79289 4.625 6 4.625V3.375Z" fill="${color}" />
|
|
4
|
+
// <path d="M14.375 4V7H15.625V4H14.375ZM16 8.625H19V7.375H16V8.625ZM14.375 7C14.375 7.89746 15.1025 8.625 16 8.625V7.375C15.7929 7.375 15.625 7.20711 15.625 7H14.375Z" fill="${color}"/>
|
|
5
|
+
// <path d="M13 16H5" stroke="${color}" stroke-width="1.25" stroke-linejoin="round"/>
|
|
6
|
+
// <path d="M9 12L7 14L5 16L7 18L9 20" stroke="${color}" stroke-width="1.25" stroke-linejoin="round"/>
|
|
7
|
+
// </svg>`;
|
|
1
8
|
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
// const nextPage = (color: string) => `
|
|
10
|
+
// <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none">
|
|
11
|
+
// <rect opacity="0.01" width="24" height="24" fill="white"/>
|
|
12
|
+
// <path d="M15 4L15.4419 3.55806C15.3247 3.44085 15.1658 3.375 15 3.375V4ZM19 8H19.625C19.625 7.83424 19.5592 7.67527 19.4419 7.55806L19 8ZM6 4.625H15V3.375H6V4.625ZM14.5581 4.44194L18.5581 8.44194L19.4419 7.55806L15.4419 3.55806L14.5581 4.44194ZM5.625 19V5H4.375V19H5.625ZM12 19.375H6V20.625H12V19.375ZM18.375 8V13H19.625V8H18.375ZM4.375 19C4.375 19.8975 5.10254 20.625 6 20.625V19.375C5.79289 19.375 5.625 19.2071 5.625 19H4.375ZM6 3.375C5.10254 3.375 4.375 4.10254 4.375 5H5.625C5.625 4.79289 5.79289 4.625 6 4.625V3.375Z" fill="${color}"/>
|
|
13
|
+
// <path d="M14.375 4V7H15.625V4H14.375ZM16 8.625H19V7.375H16V8.625ZM14.375 7C14.375 7.89746 15.1025 8.625 16 8.625V7.375C15.7929 7.375 15.625 7.20711 15.625 7H14.375Z" fill="${color}"/>
|
|
14
|
+
// <path d="M11 16H19" stroke="${color}" stroke-width="1.25" stroke-linejoin="round"/>
|
|
15
|
+
// <path d="M15 12L17 14L19 16L17 18L15 20" stroke="${color}" stroke-width="1.25" stroke-linejoin="round"/>
|
|
16
|
+
// </svg>`;
|
|
17
|
+
const prevPage = (color: string) => `
|
|
18
|
+
<svg class="netless-app-slide-footer-icon-arrow-left" viewBox="0 0 500 500">
|
|
19
|
+
<path fill=${color} d="M177.81 249.959L337.473 90.295c2.722-2.865 2.651-7.378-.143-10.1-2.793-2.65-7.163-2.65-9.956 0l-164.75 164.75c-2.793 2.793-2.793 7.306 0 10.1l164.75 164.75c2.865 2.722 7.378 2.65 10.099-.143 2.651-2.794 2.651-7.163 0-9.957L177.809 249.959z"></path>
|
|
20
|
+
</svg>
|
|
21
|
+
`;
|
|
9
22
|
|
|
10
23
|
const nextPage = (color: string) => `
|
|
11
|
-
<svg
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<path d="M15 12L17 14L19 16L17 18L15 20" stroke="${color}" stroke-width="1.25" stroke-linejoin="round"/>
|
|
17
|
-
</svg>`;
|
|
18
|
-
const prevStep = (color: string) => `<svg style="width:100%;height:100%;padding:2px;box-sizing:border-box;" viewBox="0 0 12.3926 16.9629"><g><rect height="16.9629" opacity="0" width="12.3926" x="0" y="0"/><path d="M0 8.47656C0 8.7207 0.0878906 8.93555 0.273438 9.12109L8.01758 16.6895C8.18359 16.8652 8.39844 16.9531 8.65234 16.9531C9.16016 16.9531 9.55078 16.5723 9.55078 16.0645C9.55078 15.8105 9.44336 15.5957 9.28711 15.4297L2.17773 8.47656L9.28711 1.52344C9.44336 1.35742 9.55078 1.13281 9.55078 0.888672C9.55078 0.380859 9.16016 0 8.65234 0C8.39844 0 8.18359 0.0878906 8.01758 0.253906L0.273438 7.83203C0.0878906 8.00781 0 8.23242 0 8.47656Z" fill="${color}"/></g></svg>`;
|
|
19
|
-
const nextStep = (color: string) => `<svg style="width:100%;height:100%;padding:2px;box-sizing:border-box;" viewBox="0 0 11.6895 16.9629"><g><rect height="16.9629" opacity="0" width="11.6895" x="0" y="0"/><path d="M11.6895 8.47656C11.6895 8.23242 11.5918 8.00781 11.4062 7.83203L3.67188 0.253906C3.49609 0.0878906 3.28125 0 3.02734 0C2.5293 0 2.13867 0.380859 2.13867 0.888672C2.13867 1.13281 2.23633 1.35742 2.39258 1.52344L9.50195 8.47656L2.39258 15.4297C2.23633 15.5957 2.13867 15.8105 2.13867 16.0645C2.13867 16.5723 2.5293 16.9531 3.02734 16.9531C3.28125 16.9531 3.49609 16.8652 3.67188 16.6895L11.4062 9.12109C11.5918 8.93555 11.6895 8.7207 11.6895 8.47656Z" fill="${color}"/></g></svg>`;
|
|
24
|
+
<svg class="netless-app-slide-footer-icon-arrow-right" viewBox="0 0 500 500">
|
|
25
|
+
<path fill=${color} d="M322.19 250.041L162.527 409.705c-2.722 2.865-2.651 7.378.143 10.1 2.793 2.65 7.163 2.65 9.956 0l164.75-164.75c2.793-2.793 2.793-7.306 0-10.1l-164.75-164.75c-2.865-2.722-7.378-2.65-10.099.143-2.651 2.794-2.651 7.163 0 9.957l159.664 159.736z"></path>
|
|
26
|
+
</svg>
|
|
27
|
+
`;
|
|
28
|
+
|
|
20
29
|
const sideBar = (color: string) => `<svg style="width:100%;height:100%;padding:2px;box-sizing:border-box;" viewBox="0 0 23.3887 17.998"><g><rect height="17.998" opacity="0" width="23.3887" x="0" y="0"/><path d="M3.06641 17.998L19.9609 17.998C22.0117 17.998 23.0273 16.9824 23.0273 14.9707L23.0273 3.04688C23.0273 1.03516 22.0117 0.0195312 19.9609 0.0195312L3.06641 0.0195312C1.02539 0.0195312 0 1.02539 0 3.04688L0 14.9707C0 16.9922 1.02539 17.998 3.06641 17.998ZM3.08594 16.4258C2.10938 16.4258 1.57227 15.9082 1.57227 14.8926L1.57227 3.125C1.57227 2.10938 2.10938 1.5918 3.08594 1.5918L19.9414 1.5918C20.9082 1.5918 21.4551 2.10938 21.4551 3.125L21.4551 14.8926C21.4551 15.9082 20.9082 16.4258 19.9414 16.4258ZM7.44141 16.7285L8.97461 16.7285L8.97461 1.29883L7.44141 1.29883ZM5.56641 5.21484C5.85938 5.21484 6.12305 4.95117 6.12305 4.66797C6.12305 4.375 5.85938 4.12109 5.56641 4.12109L3.4668 4.12109C3.17383 4.12109 2.91992 4.375 2.91992 4.66797C2.91992 4.95117 3.17383 5.21484 3.4668 5.21484ZM5.56641 7.74414C5.85938 7.74414 6.12305 7.48047 6.12305 7.1875C6.12305 6.89453 5.85938 6.65039 5.56641 6.65039L3.4668 6.65039C3.17383 6.65039 2.91992 6.89453 2.91992 7.1875C2.91992 7.48047 3.17383 7.74414 3.4668 7.74414ZM5.56641 10.2637C5.85938 10.2637 6.12305 10.0195 6.12305 9.72656C6.12305 9.43359 5.85938 9.17969 5.56641 9.17969L3.4668 9.17969C3.17383 9.17969 2.91992 9.43359 2.91992 9.72656C2.91992 10.0195 3.17383 10.2637 3.4668 10.2637Z" fill="${color}"/></g></svg>`;
|
|
21
30
|
|
|
31
|
+
const nextStep = (color: string) => `
|
|
32
|
+
<svg class="netless-app-slide-footer-icon-play" viewBox="0 0 500 500">
|
|
33
|
+
<path fill=${color} d="M418.158 257.419L174.663 413.33c-6.017 3.919-15.708 3.772-21.291-.29-2.791-2.018-4.295-4.483-4.295-7.084V94.109c0-5.65 6.883-10.289 15.271-10.289 4.298 0 8.391 1.307 11.181 3.332l242.629 155.484c6.016 3.917 6.451 10.292.649 14.491-.216.154-.432.154-.649.292zM170.621 391.288l223.116-141.301L170.71 107.753l-.089 283.535z"></path>
|
|
34
|
+
</svg>
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const pause = (color: string) => `
|
|
38
|
+
<svg class="netless-app-slide-footer-icon-pause" viewBox="0 0 500 500">
|
|
39
|
+
<path fill=${color} d="M312.491 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261zM165.257 78.261c0-6.159 4.893-11.213 11.04-11.213 6.158 0 11.211 5.054 11.211 11.213v343.478c0 6.159-5.053 11.213-11.211 11.213-6.147 0-11.04-5.054-11.04-11.213V78.261z"></path>
|
|
40
|
+
</svg>
|
|
41
|
+
`;
|
|
42
|
+
|
|
22
43
|
export const Icons = {
|
|
23
|
-
prevPage, nextPage,
|
|
24
|
-
prevStep, nextStep,
|
|
25
|
-
sideBar,
|
|
44
|
+
prevPage, nextPage, nextStep, pause, sideBar,
|
|
26
45
|
};
|
package/src/utils.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function deepEqual(a: any, b: any, excludeKeys: string[] = ['
|
|
1
|
+
export function deepEqual(a: any, b: any, excludeKeys: string[] = ['mediaState']) {
|
|
2
2
|
// 严格相等检查
|
|
3
3
|
if (a === b) return true;
|
|
4
4
|
|
|
@@ -59,4 +59,4 @@ function arrayEqual(arr1: any[], arr2: any[]) {
|
|
|
59
59
|
return true;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export async function delay(time: number): Promise<void> { return new Promise(resolve => setTimeout(resolve, time)); }
|
|
62
|
+
export async function delay(time: number): Promise<void> { return new Promise(resolve => setTimeout(resolve, time)); }
|