@getv.design/embed 0.0.0-stage → 0.1.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.
- package/LICENSE +173 -0
- package/README.md +422 -2
- package/THIRD_PARTY_NOTICES.txt +850 -0
- package/dist/chunks/chunk-622PUN2F.js +2 -0
- package/dist/chunks/chunk-EPAA36UG.js +2 -0
- package/dist/chunks/chunk-ZCGIXCW3.js +8 -0
- package/dist/chunks/chunk-ZF2CPBI7.js +2 -0
- package/dist/chunks/fonts.js +4 -0
- package/dist/edit.d.ts +5 -0
- package/dist/edit.js +2381 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +2 -0
- package/dist/static.d.ts +7 -0
- package/dist/static.js +2 -0
- package/dist/types.d.ts +223 -0
- package/dist/version.d.ts +8 -0
- package/dist/view.d.ts +5 -0
- package/dist/view.js +100 -0
- package/edit.css +2185 -0
- package/fonts/Inter-Black.woff2 +0 -0
- package/fonts/Inter-BlackItalic.woff2 +0 -0
- package/fonts/Inter-Bold.woff2 +0 -0
- package/fonts/Inter-BoldItalic.woff2 +0 -0
- package/fonts/Inter-ExtraBold.woff2 +0 -0
- package/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter-ExtraLight.woff2 +0 -0
- package/fonts/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter-Italic.woff2 +0 -0
- package/fonts/Inter-Light.woff2 +0 -0
- package/fonts/Inter-LightItalic.woff2 +0 -0
- package/fonts/Inter-Medium.woff2 +0 -0
- package/fonts/Inter-MediumItalic.woff2 +0 -0
- package/fonts/Inter-Regular.woff2 +0 -0
- package/fonts/Inter-SemiBold.woff2 +0 -0
- package/fonts/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter-Thin.woff2 +0 -0
- package/fonts/Inter-ThinItalic.woff2 +0 -0
- package/fonts/OFL.txt +92 -0
- package/package.json +51 -4
- package/view.css +98 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/fonts/OFL.txt
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
-----------------------------------------------------------
|
|
8
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
PREAMBLE
|
|
12
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
13
|
+
development of collaborative font projects, to support the font creation
|
|
14
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
15
|
+
open framework in which fonts may be shared and improved in partnership
|
|
16
|
+
with others.
|
|
17
|
+
|
|
18
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
19
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
20
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
21
|
+
redistributed and/or sold with any software provided that any reserved
|
|
22
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
23
|
+
however, cannot be released under any other type of license. The
|
|
24
|
+
requirement for fonts to remain under this license does not apply
|
|
25
|
+
to any document created using the fonts or their derivatives.
|
|
26
|
+
|
|
27
|
+
DEFINITIONS
|
|
28
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
29
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
30
|
+
include source files, build scripts and documentation.
|
|
31
|
+
|
|
32
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
33
|
+
copyright statement(s).
|
|
34
|
+
|
|
35
|
+
"Original Version" refers to the collection of Font Software components as
|
|
36
|
+
distributed by the Copyright Holder(s).
|
|
37
|
+
|
|
38
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
39
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
40
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
41
|
+
new environment.
|
|
42
|
+
|
|
43
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
44
|
+
writer or other person who contributed to the Font Software.
|
|
45
|
+
|
|
46
|
+
PERMISSION AND CONDITIONS
|
|
47
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
48
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
49
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
50
|
+
Software, subject to the following conditions:
|
|
51
|
+
|
|
52
|
+
1) Neither the Font Software nor any of its individual components,
|
|
53
|
+
in Original or Modified Versions, may be sold by itself.
|
|
54
|
+
|
|
55
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
56
|
+
redistributed and/or sold with any software, provided that each copy
|
|
57
|
+
contains the above copyright notice and this license. These can be
|
|
58
|
+
included either as stand-alone text files, human-readable headers or
|
|
59
|
+
in the appropriate machine-readable metadata fields within text or
|
|
60
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
61
|
+
|
|
62
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
63
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
64
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
65
|
+
presented to the users.
|
|
66
|
+
|
|
67
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
68
|
+
Software shall not be used to promote, endorse or advertise any
|
|
69
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
70
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
71
|
+
permission.
|
|
72
|
+
|
|
73
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
74
|
+
must be distributed entirely under this license, and must not be
|
|
75
|
+
distributed under any other license. The requirement for fonts to
|
|
76
|
+
remain under this license does not apply to any document created
|
|
77
|
+
using the Font Software.
|
|
78
|
+
|
|
79
|
+
TERMINATION
|
|
80
|
+
This license becomes null and void if any of the above conditions are
|
|
81
|
+
not met.
|
|
82
|
+
|
|
83
|
+
DISCLAIMER
|
|
84
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
85
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
86
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
87
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
88
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
89
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
90
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
91
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
92
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getv.design/embed",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Render, present and edit vDesign (.vd) documents in any web page. Free to use.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Sagar Saini",
|
|
8
|
+
"email": "sagar@getv.design"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://getv.design/docs/embed/",
|
|
11
|
+
"private": false,
|
|
12
|
+
"type": "module",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"prepublishOnly": "node ./scripts/gate.mjs"
|
|
15
|
+
},
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"*.css"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./static": {
|
|
25
|
+
"types": "./dist/static.d.ts",
|
|
26
|
+
"default": "./dist/static.js"
|
|
27
|
+
},
|
|
28
|
+
"./view": {
|
|
29
|
+
"types": "./dist/view.d.ts",
|
|
30
|
+
"default": "./dist/view.js"
|
|
31
|
+
},
|
|
32
|
+
"./edit": {
|
|
33
|
+
"types": "./dist/edit.d.ts",
|
|
34
|
+
"default": "./dist/edit.js"
|
|
35
|
+
},
|
|
36
|
+
"./view.css": "./view.css",
|
|
37
|
+
"./edit.css": "./edit.css",
|
|
38
|
+
"./fonts/*": "./fonts/*"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist/**/*.js",
|
|
42
|
+
"dist/**/*.d.ts",
|
|
43
|
+
"view.css",
|
|
44
|
+
"edit.css",
|
|
45
|
+
"fonts/Inter-*.woff2",
|
|
46
|
+
"fonts/OFL.txt",
|
|
47
|
+
"THIRD_PARTY_NOTICES.txt",
|
|
48
|
+
"LICENSE"
|
|
49
|
+
],
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=22.3"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/view.css
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
|
|
2
|
+
.vd-viewer {
|
|
3
|
+
position: relative;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
touch-action: none;
|
|
6
|
+
user-select: none;
|
|
7
|
+
background: var(--vd-surface, #1b1b1f);
|
|
8
|
+
}
|
|
9
|
+
.vd-viewer__surface {
|
|
10
|
+
display: block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
/* Text was measured against real faces; a synthesised bold or slant is not
|
|
14
|
+
one of them, and would draw wider or narrower than it was laid out. */
|
|
15
|
+
font-synthesis: none;
|
|
16
|
+
}
|
|
17
|
+
/* Every space layout measured, drawn. `xml:space="preserve"` is also set, but
|
|
18
|
+
Chromium ignores it when set through setAttribute rather than parsed from
|
|
19
|
+
markup, and collapsed double spaces shifted the rest of the line. */
|
|
20
|
+
.vd-viewer__surface text {
|
|
21
|
+
white-space: pre;
|
|
22
|
+
}
|
|
23
|
+
.vd-viewer__camera {
|
|
24
|
+
/* Hints the compositor that this subtree is about to be transformed. */
|
|
25
|
+
will-change: transform;
|
|
26
|
+
}
|
|
27
|
+
.vd-viewer__page {
|
|
28
|
+
/* An embedder with a no-shadow brand sets --vd-page-shadow: none. */
|
|
29
|
+
filter: var(--vd-page-shadow, drop-shadow(0 6px 24px rgb(0 0 0 / 0.35)));
|
|
30
|
+
}
|
|
31
|
+
/* An asset whose bytes are not here. Visible, and obviously not a design choice. */
|
|
32
|
+
.vd-viewer__missing {
|
|
33
|
+
fill: none;
|
|
34
|
+
stroke: #94a3b8;
|
|
35
|
+
stroke-width: 1;
|
|
36
|
+
stroke-dasharray: 4 4;
|
|
37
|
+
}
|
|
38
|
+
/* The player: black around the slide, and nothing else on screen. */
|
|
39
|
+
.vd-player {
|
|
40
|
+
outline: none;
|
|
41
|
+
cursor: default;
|
|
42
|
+
}
|
|
43
|
+
/* A button or a link under the pointer. Before idle, which wins when both apply. */
|
|
44
|
+
.vd-player--link {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
}
|
|
47
|
+
.vd-player--idle {
|
|
48
|
+
cursor: none;
|
|
49
|
+
}
|
|
50
|
+
/* Positioned, so a transition's still of the page being left can go under or
|
|
51
|
+
over it by document order alone. */
|
|
52
|
+
.vd-player .vd-viewer__surface {
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
55
|
+
/* The page being left, frozen for a transition. Opaque, or the new page would
|
|
56
|
+
show through it. More specific than the rule above, which it also matches. */
|
|
57
|
+
.vd-player .vd-player__still {
|
|
58
|
+
position: absolute;
|
|
59
|
+
inset: 0;
|
|
60
|
+
background: #000;
|
|
61
|
+
pointer-events: none;
|
|
62
|
+
}
|
|
63
|
+
/* Not on screen yet, or gone already: what motion is holding back. */
|
|
64
|
+
.vd-player [data-vd-hidden] {
|
|
65
|
+
visibility: hidden;
|
|
66
|
+
}
|
|
67
|
+
.vd-player .vd-viewer__page {
|
|
68
|
+
filter: none;
|
|
69
|
+
}
|
|
70
|
+
.vd-player__mask {
|
|
71
|
+
pointer-events: none;
|
|
72
|
+
}
|
|
73
|
+
.vd-player__counter {
|
|
74
|
+
position: absolute;
|
|
75
|
+
right: 16px;
|
|
76
|
+
bottom: 16px;
|
|
77
|
+
padding: 4px 10px;
|
|
78
|
+
border-radius: 8px;
|
|
79
|
+
background: rgb(0 0 0 / 0.6);
|
|
80
|
+
color: #fff;
|
|
81
|
+
font: 500 12px/1.4 system-ui, sans-serif;
|
|
82
|
+
font-variant-numeric: tabular-nums;
|
|
83
|
+
opacity: 0;
|
|
84
|
+
transition: opacity 200ms;
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
}
|
|
87
|
+
.vd-player__counter--shown {
|
|
88
|
+
opacity: 1;
|
|
89
|
+
}
|
|
90
|
+
@media (prefers-reduced-motion: reduce) {
|
|
91
|
+
.vd-player__counter {
|
|
92
|
+
transition: none;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/* Blur filters re-rasterise at every scale; drop it while the camera moves. */
|
|
96
|
+
.vd-viewer--interacting .vd-viewer__page {
|
|
97
|
+
filter: none;
|
|
98
|
+
}
|