Gavin Nishizawa
eba687fbbe
don't use xmain.State in imgbundler library
2023-10-19 16:06:12 -07:00
Eng Zer Jun
5c2d468058
lib/color: avoid unnecessary byte/string conversion
...
We can use `(*regexp.Regexp).MatchString` instead of
`(*regexp.Regexp).Match([]byte(...))` to avoid unnecessary `[]byte`
conversions and reduce allocations.
Example benchmark:
func BenchmarkMatch(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := themeColorRegex.Match([]byte("N1")); !match {
b.Fail()
}
}
}
func BenchmarkMatchString(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := themeColorRegex.MatchString("N1"); !match {
b.Fail()
}
}
}
goos: linux
goarch: amd64
pkg: oss.terrastruct.com/d2/lib/color
cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics
BenchmarkMatch-16 9894165 114.3 ns/op 2 B/op 1 allocs/op
BenchmarkMatchString-16 13439838 83.61 ns/op 0 B/op 0 allocs/op
PASS
ok oss.terrastruct.com/d2/lib/color 3.306s
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-10-18 23:30:11 +08:00
Alexander Wang
5e94849543
bump d2 version to 0.6.1
2023-09-25 13:16:55 -07:00
Gavin Nishizawa
477015d408
inject nested graph, fit, spacing
2023-09-21 13:17:17 -07:00
Alexander Wang
e1cb60c91e
fix mixed md
2023-08-08 11:51:16 -07:00
Alexander Wang
fc5e80bc2e
bump version
2023-07-22 09:42:39 -07:00
gavin-ts
6b65f298b2
Merge pull request #1453 from gavin-ts/dagre-label-positions
...
dagre adjustments for custom label positions
2023-07-20 16:01:10 -07:00
Gavin Nishizawa
a8cc241c22
move overlaps func to d2
2023-07-19 17:32:33 -07:00
Gavin Nishizawa
b1cb08027e
update tracing to label box
2023-07-14 13:25:30 -07:00
Alexander Wang
92d87b553f
new implementation
2023-07-11 17:19:34 -07:00
Gavin Nishizawa
af32907a8a
user-specified label/icon positions
2023-06-22 19:17:56 -07:00
Gavin Nishizawa
14300dc9f8
update leading/trailing accounting
2023-06-19 17:09:36 -07:00
Gavin Nishizawa
14afd8c433
improve code measurement and rendering
2023-06-19 17:09:36 -07:00
Gavin Nishizawa
fcd4fefb64
move to timelib.WithTimeout
2023-06-14 13:06:40 -07:00
Gavin Nishizawa
19cc5ee0e2
util func for overriding default timeout according to env var
2023-06-13 17:37:24 -07:00
Gavin Nishizawa
7547d51727
configure timeout with D2_TIMEOUT
2023-06-12 15:46:38 -07:00
Alexander Wang
1cfa97b759
bump tests
2023-06-09 20:50:58 -07:00
Alexander Wang
947a5cd5dc
bump
2023-06-08 19:49:09 -07:00
Alexander Wang
79e192f9c1
fmt
2023-06-06 11:33:00 -07:00
Alexander Wang
afdc90f1f8
add test for cache
2023-06-06 11:17:02 -07:00
Alexander Wang
df7d6536e9
flag
2023-06-06 11:09:19 -07:00
Alexander Wang
b37b5571e1
logs
2023-06-06 10:56:44 -07:00
Alexander Wang
c40dc7ec34
img optimizations
2023-06-06 10:43:52 -07:00
Gavin Nishizawa
4015a48664
fix dagre shifting connection start past 2nd point
2023-06-02 15:52:06 -07:00
Alexander Wang
8edf2987bc
test
2023-06-01 00:13:40 -07:00
Alexander Wang
25fd96c0fc
add testdata for urlenc
2023-06-01 00:07:57 -07:00
Alexander Wang
4d5d9e65ad
remove redundant keywords in compression dict
2023-05-31 23:32:22 -07:00
Bernard Xie
b22959213e
Update subsetFont.go
2023-05-31 18:37:14 -07:00
Bernard Xie
0e5da2fa56
Update subsetFont.go
2023-05-31 18:30:21 -07:00
Bernard Xie
73cd05f9e9
new comment
2023-05-31 18:28:53 -07:00
Bernard Xie
dedf9e2d55
more accurate
2023-05-31 16:58:10 -07:00
Bernard Xie
62a4d52b47
better way
2023-05-31 16:46:11 -07:00
Bernard Xie
8de7711e68
fix
2023-05-31 16:30:11 -07:00
Gavin Nishizawa
ee70180a87
fixes
2023-05-25 18:35:58 -07:00
Gavin Nishizawa
53709d641a
export connection truncate decimals along route
2023-05-25 16:22:04 -07:00
Alexander Wang
cd6c6b6fda
bump tests
2023-05-01 13:53:19 -07:00
Gavin Nishizawa
ae6618a195
update get point at distance
2023-05-01 13:24:56 -07:00
Júlio César Batista
56af2f41e3
search for white index
2023-04-28 18:53:29 -03:00
Júlio César Batista
129d51a1e6
fix gif pallete
2023-04-28 18:26:25 -03:00
Alexander Wang
648161fbea
bump version
2023-04-17 18:47:47 -07:00
gavin-ts
eae415a206
Merge pull request #1207 from gavin-ts/arrowhead-label-dimensions
...
Update arrowhead label positioning and use label dimensions
2023-04-17 15:26:57 -07:00
Gavin Nishizawa
4b931f7aec
cleanup
2023-04-17 14:46:10 -07:00
Gavin Nishizawa
6e4faefb4b
position arrowhead labels
2023-04-17 13:01:38 -07:00
Júlio César Batista
ee93929750
Merge pull request #1204 from ejulio-ts/gh-1199-navbar
...
GH 1199: navbar links
2023-04-17 16:06:17 -03:00
Júlio César Batista
ac1ea5f9e5
Merge pull request #1200 from ejulio-ts/gh-1151-gif
...
GH 1151: export GIF
2023-04-17 14:47:27 -03:00
Júlio César Batista
18494bee45
show message while generating gif
2023-04-17 10:25:40 -03:00
Júlio César Batista
7918f265d4
navbar on pptx
2023-04-14 19:25:01 -03:00
Júlio César Batista
6f18b232b9
navbar on pdfs
2023-04-14 17:02:40 -03:00
Júlio César Batista
d1bb3cc575
Update lib/xgif/xgif.go
...
Co-authored-by: gavin-ts <85081687+gavin-ts@users.noreply.github.com>
2023-04-14 15:52:50 -03:00
Júlio César Batista
492db16e92
package docs
2023-04-14 11:06:22 -03:00
Júlio César Batista
34b74388a2
add test
2023-04-14 10:52:27 -03:00
Júlio César Batista
8b3fea259c
export gifs
2023-04-14 10:35:14 -03:00
Andreas Deininger
6ae417cde9
Fixing typos
...
Signed-off-by: Andreas Deininger <andreas@deininger.net>
2023-04-14 07:48:22 +02:00
Júlio César Batista
588398a4df
convert png boards to gif
2023-04-13 18:16:53 -03:00
Bernard Xie
51077e0b82
Update generate_png.js
2023-04-13 13:40:58 -07:00
Gavin Nishizawa
d02e1ebb52
update markdown text measurement and rendering to use font-size
2023-04-12 20:14:45 -07:00
Júlio César Batista
9b3b43eb50
Merge pull request #1168 from ejulio-ts/gh-821-ppt-links
...
GH 821: links on pptx
2023-04-11 14:54:13 -03:00
Júlio César Batista
1b8122b0f9
set scale when generating png
2023-04-11 14:38:44 -03:00
Júlio César Batista
cbd1afeaef
pr comments
2023-04-11 10:25:04 -03:00
Gavin Nishizawa
3c832d36f6
measure with semibold
2023-04-10 15:06:26 -07:00
Júlio César Batista
989c3f88ac
add blank line
2023-04-10 17:24:34 -03:00
Júlio César Batista
8322261d24
fix conflicts
2023-04-10 17:18:22 -03:00
Júlio César Batista
ac0c9105ff
Merge branch 'gh-821-ppt' into gh-821-ppt-links
2023-04-10 16:40:46 -03:00
Júlio César Batista
442f61331e
move to a single file
2023-04-10 15:47:37 -03:00
Júlio César Batista
0fad458858
generate files from templates
2023-04-10 15:45:10 -03:00
Júlio César Batista
e39b9c15c2
move xml to templates
2023-04-10 13:49:30 -03:00
Júlio César Batista
6993c0e557
PR comments
2023-04-10 11:45:04 -03:00
Júlio César Batista
38cafc9d40
Merge branch 'master' into gh-821-ppt
2023-04-10 11:05:24 -03:00
Júlio César Batista
7c06d1bc2e
fix links in keynote
2023-04-10 10:35:54 -03:00
Júlio César Batista
da14037466
add links to pptx
2023-04-09 20:29:27 -03:00
Alexander Wang
7fe562fd82
[ci-base] bump version
2023-04-07 21:03:33 -07:00
Júlio César Batista
ff7438fc2a
Merge branch 'master' into gh-821-ppt
2023-04-07 18:12:50 -03:00
Júlio César Batista
944fb0c476
fix image resizing
2023-04-07 11:00:25 -03:00
Júlio César Batista
37c46b7435
add CLI test
2023-04-06 15:16:32 -03:00
Júlio César Batista
e4bbc26959
minor fixes for MS PowerPoint
2023-04-06 11:01:44 -03:00
Júlio César Batista
356ab93941
fix image size
2023-04-05 16:09:33 -03:00
Júlio César Batista
eb2518c0e4
rename and docs
2023-04-05 15:35:03 -03:00
Júlio César Batista
f0adecf1dc
metadata
2023-04-05 15:22:12 -03:00
Júlio César Batista
ace4715f04
update title
2023-04-05 11:40:21 -03:00
Júlio César Batista
2976c9b0a2
todos
2023-04-04 19:26:50 -03:00
Júlio César Batista
0f362c3024
slide title
2023-04-04 18:47:22 -03:00
Júlio César Batista
3a5c389d2b
fix size and position
2023-04-04 18:00:45 -03:00
Júlio César Batista
b9ce8324a4
base ppt export
2023-04-04 15:30:33 -03:00
Alexander Wang
7d301be3a2
atan2
2023-04-03 12:49:14 -07:00
Patrick Conti
0c9fc13466
Truncate to 32-bit precision to avoid floating-point arithmetic divergence between platforms
2023-04-03 19:05:03 +02:00
Toyam Cox
3228ae4a0d
fix builds on 32bit
...
If you put the uint32 type at the top instead of later, 32 bit builds
All credit @ahesford
2023-03-31 19:31:20 -04:00
Alexander Wang
c42e2cd06a
[ci-force] bump src version
2023-03-29 20:40:59 -07:00
Bernard Xie
fe80fd27f5
comment
2023-03-29 12:00:55 -07:00
Bernard Xie
70b4fd8912
copy byte slice first
2023-03-28 13:58:53 -07:00
Bernard Xie
ffc414260e
refactor
2023-03-27 19:26:49 -07:00
Bernard Xie
48a7472667
add and fix utf8cutfont
2023-03-27 19:19:12 -07:00
Bernard Xie
62faa1ef33
remove unused
2023-03-27 15:02:25 -07:00
Bernard Xie
ff1ef999a3
tests still borken
2023-03-27 14:46:03 -07:00
Bernard Xie
02673d423d
subset test 2
2023-03-27 14:22:58 -07:00
Bernard Xie
7a137227e7
test without woff
2023-03-27 14:17:48 -07:00
Bernard Xie
7c146dd213
subset fonts
2023-03-24 19:50:16 -07:00
Bernard Xie
5f2958ef88
add sfnt to woff font converter
2023-03-24 13:33:15 -07:00
Alexander Wang
2684f3bfde
[ci-base] bump version in src
2023-03-20 11:57:25 -07:00
Alexander Wang
c253287fb8
Merge pull request #1058 from alixander/png-still-working
...
print msg when png or layout takes a long time
2023-03-18 15:33:25 -07:00
Alexander Wang
579bbace03
print msg when png and layout in progress
2023-03-18 15:29:46 -07:00