mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
NODEX
This commit is contained in:
1 parent
26ebb69f81
commit
6390acc340
208 files changed
+18856
-6
No files matched your search
@@ -45,4 +45,3 @@ src/main/resources/assets/customnpcs/api
|
||||
df/
|
||||
tmp/
|
||||
src/test
|
||||
|
||||
@@ -45,6 +45,17 @@ dependencies {
|
||||
|
||||
shadowImplementation(project.files("tools/standalone-JaninoLoader-1.0.1-ALPHA.jar"))
|
||||
annotationProcessor(project.files("tools/standalone-JaninoLoader-1.0.1-ALPHA.jar"))
|
||||
|
||||
// JavaFX editor stack (Nodex-style popup IDE window)
|
||||
shadowImplementation("org.fxmisc.richtext:richtextfx:0.8.1")
|
||||
|
||||
// JavaFX classes are required at compile-time for the optional Nodex-style editor.
|
||||
// The legacy 1.7.10 toolchain JDK may not ship JavaFX, so we wire a local jfxrt.jar when present.
|
||||
def localJfxRt = file("C:/Program Files/Java/jdk1.8.0_202/jre/lib/ext/jfxrt.jar")
|
||||
if (localJfxRt.exists()) {
|
||||
compileOnly(files(localJfxRt))
|
||||
runtimeOnlyNonPublishable(files(localJfxRt))
|
||||
}
|
||||
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# https://help.github.com/articles/dealing-with-line-endings/
|
||||
#
|
||||
# Linux start script should use lf
|
||||
/gradlew text eol=lf
|
||||
|
||||
# These are Windows script files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve Datapack IDE
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior
|
||||
|
||||
**Expected behavior**
|
||||
A clear description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Operating System:**
|
||||
- [Linux, Windows, MacOS, etc.]
|
||||
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for Datapack IDE
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe it and that the solution would be.**
|
||||
A clear description of what the problem is and your ideal solution or alternative use!
|
||||
|
||||
**Describe brand new feature you've considered**
|
||||
A clear description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
# Automatically build the project and run any configured tests for every push
|
||||
# and submitted pull request. This can help catch issues that only occur on
|
||||
# certain platforms or Java versions, and provides a first line of defence
|
||||
# against bad commits.
|
||||
|
||||
name: build
|
||||
on: [pull_request, push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: validate gradle wrapper
|
||||
uses: gradle/actions/wrapper-validation@v4
|
||||
- name: setup jdk
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'microsoft'
|
||||
|
||||
- name: make gradle wrapper executable
|
||||
if: runner.os != 'Windows'
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: build
|
||||
run: ./gradlew build
|
||||
|
||||
- name: capture build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Artifacts-${{ runner.os }}
|
||||
path: build/libs/
|
||||
@@ -0,0 +1,41 @@
|
||||
# gradle
|
||||
|
||||
.gradle/
|
||||
build/
|
||||
out/
|
||||
classes/
|
||||
|
||||
# eclipse
|
||||
|
||||
*.launch
|
||||
|
||||
# idea
|
||||
|
||||
.idea/**/*.*
|
||||
!.idea/icon.svg
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# vscode
|
||||
|
||||
.settings/
|
||||
.vscode/
|
||||
bin/
|
||||
.classpath
|
||||
.project
|
||||
|
||||
# macos
|
||||
|
||||
*.DS_Store
|
||||
|
||||
# fabric
|
||||
|
||||
run/
|
||||
|
||||
# java
|
||||
|
||||
hs_err_*.log
|
||||
replay_*.log
|
||||
*.hprof
|
||||
*.jfr
|
||||
Generated
+507
@@ -0,0 +1,507 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="111.20968mm"
|
||||
height="111.20968mm"
|
||||
viewBox="0 0 111.20968 111.20968"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient3"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
<linearGradient
|
||||
id="linearGradient1">
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:1;"
|
||||
offset="0.41473991"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:0.54562044;"
|
||||
offset="0.81502891"
|
||||
id="stop2" />
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:0.18613139;"
|
||||
offset="0.99855489"
|
||||
id="stop3" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient6"
|
||||
gradientTransform="scale(0.93067071,1.0744939)"
|
||||
x1="83.748772"
|
||||
y1="132.62811"
|
||||
x2="134.92821"
|
||||
y2="132.62811"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:1;"
|
||||
offset="0.41473991"
|
||||
id="stop4" />
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:0.54562044;"
|
||||
offset="0.81502891"
|
||||
id="stop5" />
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:0.18613139;"
|
||||
offset="0.99855489"
|
||||
id="stop6" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient17"
|
||||
id="linearGradient19"
|
||||
x1="129.90135"
|
||||
y1="94.800224"
|
||||
x2="129.90135"
|
||||
y2="172.73756"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient17">
|
||||
<stop
|
||||
style="stop-color:#ff3131;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop20" />
|
||||
<stop
|
||||
style="stop-color:#f2f9ff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop21" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient24"
|
||||
id="linearGradient21"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="149.38574"
|
||||
y1="100.02102"
|
||||
x2="110.41704"
|
||||
y2="167.5168" />
|
||||
<linearGradient
|
||||
id="linearGradient24">
|
||||
<stop
|
||||
style="stop-color:#ff3131;stop-opacity:1;"
|
||||
offset="0.10401891"
|
||||
id="stop23" />
|
||||
<stop
|
||||
style="stop-color:#f2f9ff;stop-opacity:0;"
|
||||
offset="0.64984226"
|
||||
id="stop24" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient17-1"
|
||||
id="linearGradient22"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="110.41702"
|
||||
y1="100.02103"
|
||||
x2="149.38568"
|
||||
y2="167.51675" />
|
||||
<linearGradient
|
||||
id="linearGradient17-1">
|
||||
<stop
|
||||
style="stop-color:#ff3131;stop-opacity:1;"
|
||||
offset="0.10638298"
|
||||
id="stop19" />
|
||||
<stop
|
||||
style="stop-color:#f2f9ff;stop-opacity:0;"
|
||||
offset="0.59936911"
|
||||
id="stop22" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient851"
|
||||
id="linearGradient852"
|
||||
x1="118.77145"
|
||||
y1="158.73622"
|
||||
x2="105.73347"
|
||||
y2="181.31865"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient851">
|
||||
<stop
|
||||
style="stop-color:#cd2e2e;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop851" />
|
||||
<stop
|
||||
style="stop-color:#5f74cc;stop-opacity:0;"
|
||||
offset="0.82742316"
|
||||
id="stop852" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient854"
|
||||
id="linearGradient855"
|
||||
x1="107.26515"
|
||||
y1="143.39305"
|
||||
x2="107.89261"
|
||||
y2="146.41925"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0.12583549,0,1,0,-12.622806)" />
|
||||
<linearGradient
|
||||
id="linearGradient854">
|
||||
<stop
|
||||
style="stop-color:#b02f23;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop854" />
|
||||
<stop
|
||||
style="stop-color:#511510;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop855" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient8"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient9"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient10"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient11"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
</defs>
|
||||
<g
|
||||
id="layer1"
|
||||
style="display:none"
|
||||
transform="translate(-43.988069,-70.819257)">
|
||||
<rect
|
||||
style="opacity:0;fill:#ffffff;stroke-width:6.00001;stroke-linejoin:round"
|
||||
id="rect7"
|
||||
width="139.48326"
|
||||
height="110.04089"
|
||||
x="80.230484"
|
||||
y="34.474258"
|
||||
ry="30.730484" />
|
||||
<g
|
||||
id="layer1-8"
|
||||
transform="translate(-25.980751,-10.009155)">
|
||||
<rect
|
||||
style="display:inline;opacity:0;fill:#222034;fill-opacity:1;stroke:none;stroke-width:2.75941;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect857"
|
||||
width="138.564"
|
||||
height="138.564"
|
||||
x="60.621765"
|
||||
y="66.587502" />
|
||||
<g
|
||||
id="g90"
|
||||
style="display:inline">
|
||||
<path
|
||||
d="m 134.23418,72.499967 v 54.999743 l 47.6312,-27.49961 z"
|
||||
style="display:inline;fill:url(#linearGradient8);stroke-width:5.56644"
|
||||
id="path90" />
|
||||
<path
|
||||
d="m 186.19535,107.4999 -47.63068,27.50013 47.63068,27.50013 z"
|
||||
style="display:inline;fill:url(#linearGradient9);stroke-width:5.56644"
|
||||
id="path89" />
|
||||
<path
|
||||
d="m 181.86538,169.99996 -47.6312,-27.49961 v 54.99974 z"
|
||||
style="display:inline;fill:url(#linearGradient10);stroke-width:5.56644"
|
||||
id="path88" />
|
||||
<path
|
||||
d="M 125.57373,197.50009 V 142.5081 l -47.631201,27.49186 z"
|
||||
style="display:inline;fill:url(#linearGradient6);stroke-width:5.56644"
|
||||
id="path87" />
|
||||
<path
|
||||
d="m 125.5634,127.49403 0.01,-54.994063 -47.630681,27.500133 z"
|
||||
style="display:inline;fill:url(#linearGradient11);stroke-width:5.56644"
|
||||
id="path86" />
|
||||
<path
|
||||
d="M 73.612044,162.50016 121.24376,135.00003 73.612044,107.4999 Z"
|
||||
style="display:inline;fill:url(#linearGradient3);stroke-width:5.56644"
|
||||
id="path85" />
|
||||
</g>
|
||||
<g
|
||||
id="g1143"
|
||||
style="display:inline"
|
||||
clip-path="none">
|
||||
<g
|
||||
id="g1102"
|
||||
style="display:inline;fill:#d6dcf3;fill-opacity:1;stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(-1.0004925,0,0,-1.0004925,259.87158,290.0947)">
|
||||
<path
|
||||
id="path1099"
|
||||
style="display:inline;fill:#f2f9ff;stroke-width:0.001"
|
||||
d="M 110.41813,64.55551 83.582326,80.121872 110.41813,95.688834 137.25394,80.122472 Z m -35.780716,20.755507 -4.47299,2.594572 v 46.700251 l 35.781256,20.7556 v -51.88888 z m 71.561966,8.5e-5 -31.30826,18.161468 v 51.88888 l 35.78072,-20.75551 V 87.905685 Z"
|
||||
transform="matrix(-0.96766441,1.1437994e-6,0,-0.96311437,236.7516,252.17524)" />
|
||||
<path
|
||||
id="path1100"
|
||||
style="display:inline;fill:#d6dcf3;fill-opacity:1;stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 168.85547,167.51218 5.1e-4,-44.97768 -34.62424,-19.98997 v 44.97769 z" />
|
||||
<path
|
||||
id="path1101"
|
||||
style="display:inline;fill:#d6dcf3;fill-opacity:1;stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 90.951823,167.51218 125.57555,147.52222 V 102.54453 L 90.951823,122.5345 Z" />
|
||||
<path
|
||||
id="path1102"
|
||||
style="display:inline;fill:#f2f9ff;fill-opacity:1;stroke:none;stroke-width:0.00099951;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 129.9039,189.98966 25.96444,-14.98292 -25.96444,-14.99066 -25.96495,14.99066 z m 34.6227,-19.97912 4.32938,-2.49836 -34.62424,-19.98996 v 4.99723 z m -69.245907,0 30.294857,-17.49109 v -4.99723 l -34.623727,19.98996 z" />
|
||||
</g>
|
||||
<path
|
||||
id="path1947"
|
||||
style="baseline-shift:baseline;display:inline;overflow:visible;opacity:0.07;vector-effect:none;fill:#6e1b1b;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 125.78354,102.3891 -0.40153,0.23151 4.1212,2.37918 -3.92896,2.26808 -4.12172,-2.3797 -0.40204,0.23203 4.12223,2.3797 -3.92896,2.26808 -4.12274,-2.38022 -0.40153,0.23203 4.12275,2.38021 -3.92845,2.26808 -4.12378,-2.38073 -0.40204,0.23151 4.1243,2.38125 -3.92896,2.26808 -4.12481,-2.38177 -0.40153,0.23203 4.12481,2.38125 -3.92844,2.26859 -4.12585,-2.38228 -0.20102,0.11576 25.97723,14.99805 25.97722,-14.99805 -0.2005,-0.11576 -4.12585,2.38228 -3.92947,-2.26859 4.12533,-2.38177 -0.40101,-0.23099 -4.12481,2.38125 -3.92948,-2.2686 4.12378,-2.38073 -0.40049,-0.23151 -4.1243,2.38125 -3.92948,-2.26911 4.12327,-2.38022 -0.40101,-0.23151 -4.12275,2.38022 -3.92947,-2.26808 4.12171,-2.3797 -0.40101,-0.23151 -4.12171,2.3797 -3.92948,-2.26911 4.12068,-2.37867 -0.40049,-0.23099 -4.12016,2.37866 z m 4.11964,2.8422 3.92948,2.2686 -3.92844,2.26808 -3.92948,-2.2686 z m -4.32997,2.50011 3.92948,2.26859 -3.92896,2.26808 -3.92948,-2.26859 z m 8.66046,0 3.92947,2.26808 -3.92896,2.26859 -3.92947,-2.26859 z m -12.99094,2.49959 3.92947,2.26859 -3.92895,2.2686 -3.92896,-2.2686 z m 17.32142,0 3.92948,2.26859 -3.92948,2.2686 -3.92947,-2.2686 z m -8.66097,5.1e-4 3.92948,2.26808 -3.92896,2.2686 -3.92896,-2.2686 z m -12.99042,2.49959 3.92948,2.2686 -3.92896,2.26859 -3.92948,-2.26859 z m 8.66045,0 3.92948,2.2686 -3.92948,2.26859 -3.92896,-2.26859 z m 8.66046,0 3.92947,2.2686 -3.92896,2.26859 -3.92947,-2.26859 z m 8.66045,0 3.92948,2.2686 -3.92896,2.26859 -3.92948,-2.26859 z m -30.31133,2.50011 3.92948,2.26859 -3.92896,2.26808 -3.92948,-2.26859 z m 8.66046,0 3.92947,2.26859 -3.92947,2.2686 -3.92896,-2.2686 z m 8.66045,0 3.92947,2.26859 -3.92947,2.2686 -3.92948,-2.2686 z m 8.66045,0 3.92948,2.26859 -3.92948,2.2686 -3.92947,-2.2686 z m 8.66046,0 3.92947,2.26859 -3.92999,2.2686 -3.92896,-2.2686 z m -21.6514,2.49959 3.93,2.26911 -3.92948,2.2686 -3.92999,-2.26912 z m 8.66046,0 3.92999,2.26911 -3.92999,2.2686 -3.92948,-2.2686 z m 8.66045,0 3.92948,2.26859 -3.92948,2.26912 -3.92948,-2.2686 z m -25.98136,5.2e-4 3.92948,2.26859 -3.92896,2.26808 -3.92896,-2.2686 z m 47.6312,2.26911 -30.30978,17.4997 v 0.23048 l 4.13102,2.38487 v 4.76818 l -3.93206,2.27015 v -4.65398 a 0.20002,0.20002 0 0 0 -0.0992,-0.17363 l -0.0997,-0.0574 v 45.23083 l 0.19896,-0.11473 v -4.76818 l 3.93206,-2.27015 v 4.76819 l 0.39842,-0.23048 v -4.76767 l 3.93155,-2.26962 v 4.76766 l 0.39842,-0.22996 v -4.76818 l 3.93154,-2.26963 v 4.76767 l 0.39843,-0.22996 v -4.76767 l 3.93154,-2.27015 v 4.76819 l 0.39843,-0.22996 v -4.76819 l 3.93154,-2.27014 v 4.76818 l 0.39843,-0.22996 v -4.76818 l 3.93206,-2.27015 v 4.76819 l 0.39842,-0.22996 v -4.76819 l 3.93154,-2.27014 v 4.76818 l 0.39843,-0.22996 v -4.76818 l 4.13101,-2.38487 v -0.4625 l -4.13101,2.38486 v -4.53771 l 4.13101,-2.38486 v -0.46251 l -4.13101,2.38487 v -4.53719 l 4.13101,-2.38487 v -0.4625 l -4.13101,2.38487 v -4.53771 l 4.13101,-2.38487 v -0.4625 l -4.13101,2.38486 v -4.53719 l 4.13101,-2.38486 v -0.46251 l -4.13101,2.38487 v -4.53771 l 4.13101,-2.38487 v -0.46353 l -4.13101,2.38486 v -4.53615 l 4.13101,-2.38487 v -0.46405 l -4.13101,2.38486 v -4.53615 l 4.13101,-2.38487 v -0.46354 l -4.13101,2.38487 v -4.65295 a 0.20002,0.20002 0 0 0 -0.0997,-0.17415 l -4.02817,-2.32595 4.12894,-2.38332 z m -69.280007,5.1e-4 -0.200505,0.11576 4.127913,2.3828 -4.029211,2.32647 a 0.20002,0.20002 0 0 0 -0.09973,0.17415 v 4.65346 l -4.129464,-2.38435 v 0.46251 l 4.129464,2.38435 v 4.53771 l -4.129464,-2.38435 v 0.46198 l 4.129464,2.38435 v 4.53771 l -4.129464,-2.38435 v 0.46199 l 4.129464,2.38435 v 4.53822 l -4.129464,-2.38435 v 0.46199 l 4.129464,2.38435 v 4.53771 l -4.129981,-2.38435 v 0.46198 l 4.129981,2.38435 v 4.53823 l -4.129981,-2.38435 v 0.46199 l 4.129981,2.38435 v 4.5377 l -4.129981,-2.38435 v 0.46199 l 4.129981,2.38435 v 4.53823 l -4.129981,-2.38435 v 0.46198 l 4.129981,2.38435 v 4.7687 l 0.400492,0.23151 v -4.7687 l 3.929476,2.2686 v 4.7687 l 0.400492,0.23099 v -4.7687 l 3.93,2.26911 v 4.76871 l 0.39996,0.23099 v -4.7687 l 3.93001,2.26911 v 4.76818 l 0.40049,0.23152 v -4.76871 l 3.92947,2.2686 v 4.7687 l 0.4005,0.23151 v -4.7687 l 3.92946,2.2686 v 4.7687 l 0.40049,0.23099 v -4.7687 l 3.92948,2.26859 v 4.76871 l 0.4005,0.23151 v -4.76871 l 3.93,2.2686 v 4.7687 l 0.2005,0.11576 v -45.23083 l -0.0992,0.0574 a 0.20002,0.20002 0 0 0 -0.10128,0.17363 v 4.65346 l -3.93,-2.26859 v -4.76922 l 4.1305,-2.38435 v -0.231 z m 25.979297,0.22996 3.92947,2.2686 -3.92896,2.26859 -3.92999,-2.26859 z m 8.66045,0 3.92947,2.2686 -3.92947,2.26911 -3.92948,-2.26911 z m 8.66045,0 3.92948,2.2686 -3.92999,2.26911 -3.92948,-2.26911 z m -38.971779,2.50011 3.929479,2.2686 -4.029732,2.32647 a 0.20002,0.20002 0 0 0 -0.09974,0.17415 v 4.65294 l -3.929476,-2.26859 v -4.76922 z m 25.981359,0 3.92948,2.2686 -3.92948,2.26859 -3.92948,-2.26859 z m 8.66045,0 3.92948,2.2686 -3.92999,2.26859 -3.92948,-2.26859 z m 25.98188,0 4.12946,2.38435 v 4.76767 l -3.93154,2.27014 v -4.65294 a 0.20002,0.20002 0 0 0 -0.0997,-0.17415 l -4.0287,-2.32596 z m -56.2932,2.5001Line truncated
|
||||
<g
|
||||
id="g1129"
|
||||
style="display:inline;opacity:0.280928;fill:url(#linearGradient19);stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(-1.0004925,0,0,-1.0004925,259.87158,290.0947)">
|
||||
<path
|
||||
id="path1128"
|
||||
style="display:inline;fill:url(#linearGradient21);stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 168.85598,167.51218 V 122.5345 l -34.62424,-19.98997 v 44.97769 z" />
|
||||
<path
|
||||
id="path1129"
|
||||
style="display:inline;fill:url(#linearGradient22);stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 90.951823,167.51218 125.57555,147.52222 V 102.54453 L 90.951823,122.5345 Z" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g1142"
|
||||
style="display:inline"
|
||||
transform="matrix(1.6267457,0.71704367,0,1.6267457,-54.654511,-149.52689)">
|
||||
<path
|
||||
style="display:inline;opacity:0.707373;fill:url(#linearGradient852);fill-opacity:1;stroke:none;stroke-width:5.26899;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 99.214593,152.71842 0.333574,20.32055 25.980763,13.54745 -0.23851,-21.70879 z"
|
||||
id="path1130"
|
||||
transform="matrix(0.61472424,-0.23659226,0,0.61472424,32.560227,73.198412)" />
|
||||
<path
|
||||
style="display:inline;fill:url(#linearGradient855);fill-opacity:1"
|
||||
d="m 100.134,135.26491 c 0.22489,-0.1966 0.506,-0.32988 0.84332,-0.39987 0.33732,-0.07 0.67466,-0.0276 1.01199,0.12738 0.33733,0.15489 0.61844,0.35892 0.84333,0.61211 0.22489,0.25319 0.44977,0.50637 0.67466,0.75957 l 0.67466,0.75956 c 0.22489,0.25318 0.44978,0.50636 0.67467,0.75955 0.22489,0.25319 0.44977,0.50637 0.67466,0.75957 l 0.67466,0.75955 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75955 0.22489,0.2532 0.44977,0.50639 0.67466,0.75957 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75956 0.22489,0.25319 0.39355,0.55553 0.506,0.907 0.11244,0.35148 0.16866,0.75211 0.16866,1.20188 0,0.44978 -0.0562,0.83626 -0.16866,1.15944 -0.11245,0.32319 -0.28111,0.58307 -0.506,0.77966 -0.22489,0.19659 -0.44978,0.39318 -0.67467,0.58977 l -0.67466,0.58976 -0.67466,0.58976 c -0.22489,0.1966 -0.506,0.32989 -0.84333,0.39989 -0.33733,0.07 -0.67467,0.14 -1.012,0.20999 -0.33733,0.07 -0.61844,0.20328 -0.84333,0.39988 -0.22489,0.19658 -0.506,0.32987 -0.84333,0.39987 -0.33733,0.07 -0.73088,0.0767 -1.18066,0.0201 l -1.34931,-0.16974 c -0.44977,-0.0566 -0.843334,-0.16232 -1.180664,-0.31723 -0.33733,-0.1549 -0.61844,-0.35893 -0.843328,-0.61212 -0.224887,-0.25318 -0.505997,-0.45722 -0.843329,-0.61212 -0.337331,-0.15489 -0.674663,-0.30978 -1.011995,-0.46468 -0.337332,-0.15488 -0.618442,-0.35892 -0.843329,-0.61212 L 95.411351,146.14 94.736688,145.38044 c -0.224888,-0.25319 -0.449776,-0.50637 -0.674663,-0.75957 -0.224888,-0.25318 -0.393554,-0.55552 -0.505998,-0.907 -0.112444,-0.35147 -0.168666,-0.75211 -0.168666,-1.20189 0,-0.44977 0.05622,-0.83624 0.168666,-1.15943 0.112444,-0.32318 0.28111,-0.58306 0.505998,-0.77966 l 0.674663,-0.58976 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 c 0.224887,-0.1966 0.449775,-0.39318 0.674663,-0.58978 l 0.674663,-0.58976 0.674668,-0.58976 c 0.22488,-0.1966 0.44977,-0.39318 0.674664,-0.58977"
|
||||
id="path1131" />
|
||||
<path
|
||||
style="display:inline;fill:#94291e;fill-opacity:1"
|
||||
d="m 98.962644,136.28074 c 0.224888,-0.1966 0.505998,-0.32988 0.843329,-0.39987 0.337327,-0.07 0.674667,-0.0276 1.011997,0.12738 0.33733,0.15489 0.61844,0.35893 0.84333,0.61211 0.22489,0.25319 0.44977,0.50639 0.67466,0.75957 l 0.67466,0.75956 c 0.22489,0.25318 0.44978,0.50636 0.67467,0.75956 0.22489,0.25318 0.44977,0.50637 0.67466,0.75956 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50636 0.67467,0.75956 0.22489,0.25318 0.44977,0.50637 0.67466,0.75956 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50636 0.67467,0.75956 0.22489,0.25318 0.39355,0.55552 0.506,0.90699 0.11244,0.35148 0.16866,0.75211 0.16866,1.20188 0,0.44978 -0.0562,0.83626 -0.16866,1.15944 -0.11245,0.32319 -0.28111,0.58307 -0.506,0.77967 -0.22489,0.19658 -0.44978,0.39318 -0.67467,0.58977 l -0.67466,0.58976 -0.67466,0.58977 c -0.22489,0.19658 -0.506,0.32988 -0.84333,0.39988 -0.33733,0.07 -0.67467,0.13999 -1.012,0.20998 -0.33733,0.07 -0.61844,0.20328 -0.84333,0.39988 -0.22489,0.19658 -0.506,0.32988 -0.84333,0.39988 -0.33733,0.0699 -0.73088,0.0767 -1.18066,0.0201 l -1.349323,-0.16984 c -0.449775,-0.0566 -0.843329,-0.16232 -1.180661,-0.31723 -0.337331,-0.1549 -0.618441,-0.35892 -0.843329,-0.61212 -0.224887,-0.25318 -0.505997,-0.45722 -0.843329,-0.61212 -0.337331,-0.15489 -0.674663,-0.30978 -1.011995,-0.46467 -0.337332,-0.15489 -0.618442,-0.35893 -0.843329,-0.61213 L 94.24,147.15574 93.565337,146.39618 c -0.224888,-0.25319 -0.449776,-0.50637 -0.674663,-0.75956 -0.224888,-0.25319 -0.393554,-0.55553 -0.505998,-0.907 -0.112444,-0.35148 -0.168666,-0.7521 -0.168666,-1.20188 0,-0.44977 0.05622,-0.83626 0.168666,-1.15944 0.112444,-0.32319 0.28111,-0.58307 0.505998,-0.77966 l 0.674663,-0.58977 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 c 0.224887,-0.19659 0.449775,-0.39318 0.674663,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 c 0.224887,-0.1966 0.449775,-0.39318 0.674663,-0.58977"
|
||||
id="path1132" />
|
||||
<g
|
||||
id="g1141"
|
||||
style="display:inline;opacity:1">
|
||||
<path
|
||||
style="display:inline;fill:#2d0000;fill-opacity:1"
|
||||
d="m 98.962644,136.28074 c 0.224888,-0.19659 0.505998,-0.32988 0.843329,-0.39987 0.337327,-0.07 0.674667,-0.0275 1.011997,0.12738 0.33733,0.15489 0.61844,0.35893 0.84333,0.61211 0.22489,0.25319 0.44977,0.50638 0.67466,0.75957 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75956 l 0.67466,0.75956 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75956 0.22489,0.25319 0.44977,0.50638 0.67466,0.75956 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75956 0.22489,0.25319 0.39355,0.55552 0.506,0.90699 0.11244,0.35148 0.16866,0.75211 0.16866,1.20188 0,0.44978 -0.0562,0.83626 -0.16866,1.15944 -0.11245,0.32319 -0.28111,0.58308 -0.506,0.77967 l -0.67467,0.58977 -0.67466,0.58976 c -0.22489,0.19659 -0.44977,0.39318 -0.67466,0.58977 -0.22489,0.19659 -0.506,0.32989 -0.84333,0.39988 l -1.012,0.20998 c -0.33733,0.07 -0.61844,0.20329 -0.84333,0.39988 -0.22489,0.19659 -0.506,0.32988 -0.84333,0.39988 -0.33733,0.07 -0.73088,0.0767 -1.18066,0.0201 -0.44977,-0.0566 -0.89955,-0.11321 -1.349323,-0.16984 -0.449775,-0.0566 -0.843329,-0.16234 -1.180661,-0.31723 -0.337331,-0.15489 -0.618441,-0.35893 -0.843329,-0.61212 -0.224887,-0.25319 -0.505997,-0.45723 -0.843329,-0.61212 l -1.011995,-0.46467 c -0.337332,-0.15489 -0.618442,-0.35894 -0.843329,-0.61213 -0.224888,-0.25318 -0.449776,-0.50636 -0.674664,-0.75955 l -0.674663,-0.75956 -0.674663,-0.75956 c -0.224888,-0.25319 -0.393554,-0.55552 -0.505998,-0.907 -0.112444,-0.35147 -0.168666,-0.7521 -0.168666,-1.20188 0,-0.44977 0.05622,-0.83625 0.168666,-1.15944 0.112444,-0.32318 0.28111,-0.58307 0.505998,-0.77966 l 0.674663,-0.58977 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 c 0.224887,-0.19659 0.449775,-0.39318 0.674663,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 0.674663,-0.58977"
|
||||
id="path1133" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#720000;fill-opacity:1"
|
||||
d="m 96.949099,142.3149 4.674871,-3.598 0.52221,0.17818 c 0.36268,0.12375 0.63952,0.34051 0.86441,0.5937 l 0.67467,0.75955 0.67466,0.75956 c 0.22489,0.25319 0.44977,0.50638 0.67466,0.75956 0.22489,0.25319 0.44978,0.50638 0.67467,0.75955 l 0.67466,0.75956 c 0.22489,0.25319 0.39355,0.55553 0.506,0.907 0.11244,0.35149 0.16866,0.75212 0.16866,1.20189 0,0.44978 -0.0562,0.83626 -0.16866,1.15943 -0.11245,0.32319 -0.28111,0.58307 -0.506,0.77966 -0.22489,0.19659 -0.44977,0.39318 -0.67466,0.58977 -0.22489,0.1966 -0.506,0.32989 -0.84333,0.39988 l -1.012,0.21 c -0.33733,0.07 -0.61844,0.20328 -0.84333,0.39987 -0.22489,0.19659 -0.506,0.32988 -0.84333,0.39987 -0.33733,0.07 -0.73088,0.0767 -1.18066,0.0201 -0.44977,-0.0566 -0.89955,-0.11318 -1.349323,-0.16974 -0.449775,-0.0566 -0.843329,-0.16235 -1.180661,-0.31724 -0.337331,-0.15489 -0.569247,-0.41598 -0.695746,-0.78329 l -0.189749,-0.55097"
|
||||
id="path1134" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#ff0000;fill-opacity:1"
|
||||
d="m 101.6613,139.99364 0.50599,0.23235 c 0.33733,0.15489 0.506,0.34477 0.506,0.56966 0,0.22489 -0.16164,0.36619 -0.48491,0.4239 l -0.48492,0.0866 c 0.0234,0.16648 -0.53328,-0.11289 -0.71162,-0.0337 -0.73806,0.32779 -0.68181,-1.45805 -0.31617,-0.63988"
|
||||
id="path1135" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#aa0f01;fill-opacity:1"
|
||||
d="m 98.962644,137.63007 c 0.224888,-0.19659 0.505998,-0.32989 0.843329,-0.39988 0.337327,-0.07 0.674667,-0.0275 1.011997,0.12738 0.33733,0.1549 0.56222,0.40809 0.67466,0.75957 0.11245,0.35147 0.16867,0.7521 0.16867,1.20188 v 1.34932 c 0,0.44978 0.0562,0.85041 0.16866,1.20189 0.11245,0.35148 0.28111,0.65381 0.506,0.907 0.22489,0.25319 0.33733,0.49223 0.33733,0.71712 0,0.22489 -0.11244,0.43562 -0.33733,0.63221 -0.22489,0.19659 -0.33733,0.40732 -0.33733,0.63221 0,0.22489 0.11244,0.46393 0.33733,0.71712 0.22489,0.25319 0.33733,0.49222 0.33733,0.71711 0,0.22489 -0.11244,0.32318 -0.33733,0.29488 -0.22489,-0.0283 -0.44977,-0.16908 -0.67466,-0.42223 -0.22489,-0.25318 -0.44978,-0.39392 -0.67467,-0.42222 -0.22489,-0.0283 -0.44977,0.0558 -0.67466,0.25243 l -0.674663,0.58976 -0.674663,0.58978 c -0.224888,0.19659 -0.505998,0.32987 -0.843329,0.39986 -0.337332,0.07 -0.730886,0.0767 -1.180661,0.0201 -0.449775,-0.0566 -0.843329,-0.16234 -1.180661,-0.31723 -0.337332,-0.15489 -0.618442,-0.35893 -0.843329,-0.61212 -0.224888,-0.25318 -0.449776,-0.50637 -0.674664,-0.75956 -0.224887,-0.25319 -0.393553,-0.55552 -0.505997,-0.90701 -0.112444,-0.35147 -0.168666,-0.7521 -0.168666,-1.20188 0,-0.44977 0.05622,-0.83625 0.168666,-1.15944 0.112444,-0.32317 0.28111,-0.58306 0.505997,-0.77965 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58977 l 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58977 0.224887,-0.19659 0.449775,-0.39318 0.674663,-0.58977 l 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58977 l 0.674663,-0.58976"
|
||||
id="path1136" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#ff0000;fill-opacity:1"
|
||||
d="m 98.962644,138.9794 c 0.224888,-0.19659 0.449776,-0.28074 0.674663,-0.25244 0.224888,0.0283 0.337332,0.15493 0.337332,0.37978 0,0.22489 -0.112444,0.43562 -0.337332,0.63221 -0.224887,0.19659 -0.337331,0.40732 -0.337331,0.63221 0,0.22489 0.112444,0.46393 0.337331,0.71712 l 0.674663,0.75956 0.67466,0.75956 c 0.22489,0.25319 0.33734,0.49223 0.33734,0.71712 0,0.22489 -0.16867,0.37232 -0.506,0.44231 -0.80645,0.16734 -0.0911,0.0189 0.253,-0.0526 l -0.253,0.0526 c -0.16868,0.0351 -0.33733,0.0418 -0.506,0.0205 -0.067,-0.19237 -0.16867,-0.48465 -0.16867,-0.48465 -0.11253,-0.32331 -0.337327,-0.56251 -0.674658,-0.7174 l -0.505998,-0.23234 -0.168666,-0.52722 c -0.112444,-0.35148 -0.28111,-0.65381 -0.505997,-0.907 -0.224888,-0.25319 -0.337332,-0.49223 -0.337332,-0.71712 0,-0.22489 0.112444,-0.43562 0.337332,-0.63221 l 0.674663,-0.58976"
|
||||
id="path1137" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#720000;fill-opacity:1"
|
||||
d="m 98.962644,142.35294 0.505998,0.23211 c 0.337406,0.15477 0.562208,0.39403 0.674658,0.7174 l 0.16867,0.48505 c 0,0 -0.208,-0.0264 -0.318594,-0.0735 -0.07203,-0.0269 -0.142118,-0.0519 -0.206391,-0.0833 -0.337331,-0.15494 -0.543231,-0.39921 -0.655675,-0.75069"
|
||||
id="path1138" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#ff0000;fill-opacity:1"
|
||||
d="m 95.251995,142.56044 q 0,-0.33733 0.337332,-0.29488 0.337332,0.0425 0.337332,0.37978 0,0.33733 -0.337332,0.29488 -0.337332,-0.0425 -0.337332,-0.37978"
|
||||
id="path1139" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#aa0f01;fill-opacity:1"
|
||||
d="m 104.69728,143.749 q 0,-0.33733 0.33733,-0.29488 0.33734,0.0425 0.33734,0.37978 0,0.33733 -0.33734,0.29488 -0.33733,-0.0425 -0.33733,-0.37978"
|
||||
id="path1140" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#ff0000;fill-opacity:1"
|
||||
d="m 97.613317,144.2069 q 0.337332,-0.29488 0.674664,-0.25243 0.337331,0.0425 0.337331,0.37978 0,0.33734 -0.337331,0.63222 -0.337332,0.29488 -0.674664,0.58976 -0.337331,0.29488 -0.674663,0.25243 -0.337332,-0.0425 -0.337332,-0.37977 0,-0.33733 0.337332,-0.63222 0.337332,-0.29488 0.674663,-0.58977"
|
||||
id="path1141" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<rect
|
||||
style="display:none;opacity:1;fill:#404040;fill-opacity:1;stroke-width:8.34074;stroke-linejoin:round"
|
||||
id="rect4"
|
||||
width="111.20969"
|
||||
height="111.20969"
|
||||
x="5.8899391e-06"
|
||||
y="3.3410672e-06" />
|
||||
<g
|
||||
id="g4"
|
||||
style="display:inline"
|
||||
transform="translate(-43.988069,-70.819257)">
|
||||
<path
|
||||
id="path16"
|
||||
style="display:none;opacity:1;fill:#ffffff;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 103.81913,95.103806 56.291647,122.60634 8.7641612,95.10381 8.764161,40.09874 56.291647,12.596207 103.81913,40.09874 Z"
|
||||
transform="matrix(1.184402,0,0,1.1817093,37.251106,45.114943)" />
|
||||
<path
|
||||
style="display:none;opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 51.961523,99.999997 43.301269,105 v 55 l 47.631396,27.49999 8.660254,-5 L 51.961527,155 Z"
|
||||
id="path24" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#c19053;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 56.29165,110.5 8.660253,-5.00001 v 31.80263 L 56.29165,152.5 Z"
|
||||
id="path23" />
|
||||
<path
|
||||
id="path19"
|
||||
style="display:none;opacity:1;fill:#5886f0;fill-opacity:1;stroke-width:6.00629;stroke-linejoin:round"
|
||||
d="m 151.55444,152.49999 -47.63139,27.5 -47.6314,-27.5 V 97.499997 l 47.6314,-27.499998 47.63139,27.499998 z" />
|
||||
<path
|
||||
id="path20"
|
||||
style="display:inline;opacity:1;fill:#d29463;fill-opacity:1;stroke-width:4.91424;stroke-linejoin:round"
|
||||
d="M 142.89419,147.5 103.92305,170 64.951901,147.5 v -45 L 103.92305,79.999998 142.89419,102.5 Z" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#c37954;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 64.9519,102.5 3e-6,44.99999 38.971137,22.5 v -45 z"
|
||||
id="path4" />
|
||||
<g
|
||||
id="g36"
|
||||
style="display:inline;opacity:0.286449">
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#f1e1c8;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 95.262781,130 -21.65063,-12.5 v 24.99999 l 21.65063,12.5 z"
|
||||
id="path37" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 103.05702,130.5 -4.330135,-7.5 -7.79423,4.49999 4.33013,2.50001 v 5 z"
|
||||
id="path33" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 77.942275,119.99999 70.148045,106.5 l -4.33012,2.5 7.79423,13.49999 V 117.5 Z"
|
||||
id="path34" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 65.817925,142 4.33012,7.5 7.79423,-4.50001 -4.33012,-2.5 V 137.5 Z"
|
||||
id="path35" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 95.262785,149.99999 7.794235,13.50001 -4.330135,2.5 -7.79423,-13.50001 4.33013,2.5 z"
|
||||
id="path36" />
|
||||
</g>
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#edca55;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 56.29165,110.5 43.301273,25 v 15 l -4.330127,2.5 -4e-6,22 -38.971142,-22.5 z"
|
||||
id="path22" />
|
||||
<g
|
||||
id="g10"
|
||||
style="display:none">
|
||||
<path
|
||||
style="opacity:1;fill:#c37954;fill-opacity:1;stroke-width:3.75001;stroke-linejoin:round"
|
||||
d="M 113.44932,158.49999 118.64548,155.5 v -4 l 10.3923,-6 v 3.99999 L 134.23393,146.5 v -10 l -5.19615,3 v -7 l -10.3923,6 v 7 l -5.19068,3 z"
|
||||
id="path8" />
|
||||
<path
|
||||
style="opacity:1;fill:#c37954;fill-opacity:1;stroke-width:3.75001;stroke-linejoin:round"
|
||||
d="m 118.64548,138.5 v -12 l -11.25833,6.5 v 12 z"
|
||||
id="path9" />
|
||||
<path
|
||||
style="opacity:1;fill:#c37954;fill-opacity:1;stroke-width:3.75001;stroke-linejoin:round"
|
||||
d="m 129.03778,132.5 v -12 l 10.39231,-6 v 12 z"
|
||||
id="path10" />
|
||||
</g>
|
||||
<g
|
||||
id="g32">
|
||||
<path
|
||||
style="opacity:1;fill:#f1e1c8;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 112.5833,130 21.65063,-12.5 v 24.99999 l -21.65063,12.5 z"
|
||||
id="path11" />
|
||||
<path
|
||||
style="opacity:1;fill:#d87c7c;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 122.10958,135.49999 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path12" />
|
||||
<path
|
||||
style="opacity:1;fill:#edca55;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 116.91343,138.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path13" />
|
||||
<path
|
||||
style="opacity:1;fill:#c94b4b;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 127.30573,132.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path14" />
|
||||
<path
|
||||
style="opacity:1;fill:#ae3535;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 122.10958,129.49999 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path15" />
|
||||
<path
|
||||
style="opacity:1;fill:#ce5e5e;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 116.91343,132.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path17" />
|
||||
<path
|
||||
style="opacity:1;fill:#31a252;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 127.30573,126.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path25" />
|
||||
<path
|
||||
style="opacity:1;fill:#59c94b;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 122.10958,141.49999 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path26" />
|
||||
<path
|
||||
style="opacity:1;fill:#c94b4b;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 116.91343,144.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path27" />
|
||||
<path
|
||||
style="opacity:1;fill:#c9764b;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 127.30573,138.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path28" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 104.78907,130.5 4.33013,-7.5 7.79423,4.49999 L 112.5833,130 v 5 z"
|
||||
id="path29" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 129.90381,119.99999 7.79423,-13.49999 4.33012,2.5 -7.79423,13.49999 V 117.5 Z"
|
||||
id="path30" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 142.02816,142 -4.33012,7.5 -7.79423,-4.50001 4.33012,-2.5 V 137.5 Z"
|
||||
id="path31" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 112.5833,149.99999 -7.79423,13.50001 4.33013,2.5 7.79423,-13.50001 -4.33013,2.5 z"
|
||||
id="path32" />
|
||||
</g>
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#f1e1c8;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 119.5115,88.999997 7.79423,4.5 L 88.33459,116 v 10 l -7.79423,-4.5 v -10 z"
|
||||
id="path21" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#dcc5a5;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 88.33459,116 v 10 l -7.79423,-4.5 v -10 z"
|
||||
id="path5" />
|
||||
</g>
|
||||
<g
|
||||
id="g3"
|
||||
style="display:none"
|
||||
transform="translate(-43.988069,-70.819257)">
|
||||
<path
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 103.92304,79.999998 119.5115,88.999996 80.540359,111.5 l 1e-6,5 -15.588457,-9 v -5.00001 z"
|
||||
id="path1" />
|
||||
<path
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 88.334589,121 -2e-6,-5.00001 38.971143,-22.499993 15.58846,8.999993 v 45 l -38.97115,22.5 L 100.45894,168 v -16 l 3.46411,-2 v -20 z"
|
||||
id="path2" />
|
||||
<path
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 95.262792,175 56.29165,151.5 v -44 l 43.301267,25 v 14.99999 l -4.330126,2.5 z"
|
||||
id="path3" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 41 KiB |
+504
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random
|
||||
Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<img width="100" alt="datapack_color" src="docs/README_Pictures/Nodex_IconSVG.svg" />
|
||||
<br>
|
||||
Nodex
|
||||
</h1>
|
||||
<h4 align="center">A work in progress minecraft in-game IDE mod for datapack development.</h4>
|
||||
<div align="center">
|
||||
|
||||
[](https://discord.com/invite/qZ885qTvkx)
|
||||
[](https://github.com/Frostzie/DataPack-IDE/releases)
|
||||
|
||||
[](https://fabricmc.net/)
|
||||
[](https://kotlinlang.org/)
|
||||
[](https://jdk.java.net/21/)
|
||||
|
||||
<code style="color: red"> This mod is currently in alpha and is in active development</code> <br>
|
||||
<code style="color: red"> many features of this mod have not been fully implemented</code>
|
||||
</div>
|
||||
|
||||
## 📝 Overview
|
||||
|
||||
Nodex is a minecraft mod that allows in game data pack editing with a built-in text editor.<br>
|
||||
**These screenshots are OLD**
|
||||
|
||||
| GUI | Menu |
|
||||
|:---------------------------------------------------------------------------:|:-----------------------------------------------------------------------------:|
|
||||
|  |  |
|
||||
|
||||
The goal of this mod aside from basic coding functionality expected from vscode is:
|
||||
- To provide in-game tools for debugging or fast implementation to speed up datapack development.
|
||||
- To provide a collaborative datapack programming environment (multiplayer support).
|
||||
|
||||
## ✅ What's implemented?
|
||||
|
||||
* Saving, loading, editing datapack files
|
||||
* Code Editor with JSON Syntax highlighting
|
||||
* [AtlantaFX themes](https://mkpaz.github.io/atlantafx/) support
|
||||
* File Tree
|
||||
* Project manager
|
||||
* Universal folders for datapacks and configs
|
||||
* Datapack Mirroring to a world
|
||||
|
||||
## 👷 Future plans
|
||||
* Multiplayer support
|
||||
* Plugin system
|
||||
* [SpyglassMC](https://github.com/SpyglassMC/Spyglass) plugin
|
||||
* [Beet](https://github.com/mcbeet/beet) plugin
|
||||
* [Datapack Icons](https://github.com/FuncFusion/mc-dp-icons) plugin
|
||||
|
||||
|
||||
## 🧪 Want to test out the mod?
|
||||
<details>
|
||||
<summary><b>click to view process to get experimental build for play testing</b></summary>
|
||||
<hr>
|
||||
go to Actions -> go to the latest workflow shown on top
|
||||
<img width="667" height="343" alt="image" src="https://github.com/user-attachments/assets/cec35fa7-c6ec-46b4-8ac1-407a5b29733e" />
|
||||
|
||||
Then download Artifacts.
|
||||
Unzip Artifact folder upon download and drag the jar file into your mod folder make sure to install the appropriate dependencies, such as [Fabric Language Kotlin](https://modrinth.com/mod/fabric-language-kotlin) and [Fabric API](https://modrinth.com/mod/fabric-api). Then you should be good to go!
|
||||
|
||||
Warning that this version isn't a stable build as it is a dev build, if the current artifact build is having issues, feel free to file a issue report.<br>
|
||||
If you are only interested in running a build for your own use, try older artifacts if the lastest isn't working.
|
||||
</details>
|
||||
<hr>
|
||||
|
||||
## ❓FAQ
|
||||
|
||||
#### Will we support other loaders?
|
||||
We plan on supporting all loaders as well as any server software. Support for other loaders will come while beta is being released and fabric will be the default until then and will be focused on first!
|
||||
|
||||
#### When will it be FULLY released?
|
||||
The beta release isn't expected any time soon as there isn't any exact set date. If you are looking for updates, check up on our discord where we have regular updates on our progress posted up on there.
|
||||
|
||||
#### What versions of minecraft will you be supporting?
|
||||
Currently supporting versions from 1.20.5 to newest!<br>
|
||||
Check the modrinth versions page for more info [here](https://modrinth.com/project/XlilVGvF).
|
||||
|
||||
## 🖐️ Want to support the project?
|
||||
Here's a donation link:<br>
|
||||
[](https://buymeacoffee.com/frostzie)
|
||||
<br>
|
||||
All proceeds goes to frostzie
|
||||
|
||||
## ☝️ Want to give feedback or request features?
|
||||
Any input is appreciated here
|
||||
<h4 align="left">
|
||||
<a href="https://github.com/Frostzie/DataPack-IDE/issues/new?title=Feedback%3A+&labels=feedback%2C&assignees=Frostzie%2C">🗒️ Open Feedback Issue</a>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://github.com/Frostzie/DataPack-IDE/issues/new?title=Feature%20Request%3A+&labels=featurerequest%2C&assignees=Frostzie%2C">💡 Open Feature Issue</a>
|
||||
</h4>
|
||||
|
||||
## License & Dependencies
|
||||
|
||||
Nodex is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; **either version 2.1 of the License, or
|
||||
(at your option) any later version**.
|
||||
|
||||
A copy of the GNU LGPL is provided in the [LICENSE](LICENSE) file.<br>
|
||||
|
||||
Dependencies used: [List](docs/SOFTWARE_USED.md)
|
||||
@@ -0,0 +1,167 @@
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import kotlin.String
|
||||
|
||||
plugins {
|
||||
id("fabric-loom")
|
||||
java
|
||||
`maven-publish`
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.javafx)
|
||||
}
|
||||
|
||||
val mcVersion = property("mcVersion")!!.toString()
|
||||
|
||||
val javafx = libs.versions.javafxapp.get()
|
||||
// http://insecure.repo1.maven.org/maven2/org/openjfx/javafx-base/21.0.8/
|
||||
val javafxClassifiers = listOf(
|
||||
"win",
|
||||
"mac",
|
||||
"mac-aarch64",
|
||||
"linux"
|
||||
)
|
||||
|
||||
fun javafxDep(module: String, classifier: String) =
|
||||
"org.openjfx:javafx-$module:$javafx:$classifier"
|
||||
|
||||
// Naming examples
|
||||
// Version Name: 0.0.1-fabric+mc1.20.5-1.21.8
|
||||
// Jar Name: Nodex-0.0.1-fabric+mc1.20.5-1.21.8.jar
|
||||
version = "${property("mod.version")}-fabric+mc${property("mod.mc_targets").toString().replace(" ", "-")}"
|
||||
group = project.findProperty("maven_group") as String
|
||||
|
||||
base.archivesName = property("mod.id") as String
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1")
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft("com.mojang:minecraft:$mcVersion")
|
||||
|
||||
mappings(loom.officialMojangMappings())
|
||||
|
||||
modImplementation("net.fabricmc:fabric-loader:${property("deps.fabric_loader")}")
|
||||
|
||||
modImplementation("net.fabricmc.fabric-api:fabric-api:${property("deps.fabric_api")}")
|
||||
|
||||
modImplementation(libs.fabric.kotlin)
|
||||
modRuntimeOnly(libs.devauth)
|
||||
|
||||
// Style and icon packs
|
||||
implementation(libs.atlantaFX)
|
||||
implementation(libs.ikonliJavaFX)
|
||||
implementation(libs.ikonliCore)
|
||||
implementation(libs.material2)
|
||||
implementation(libs.feather)
|
||||
|
||||
include(libs.atlantaFX)
|
||||
include(libs.ikonliJavaFX)
|
||||
include(libs.ikonliCore)
|
||||
include(libs.material2)
|
||||
include(libs.feather)
|
||||
|
||||
// RichTextFX and it's dependencies
|
||||
implementation(libs.richTextFX)
|
||||
implementation(libs.flowless)
|
||||
implementation(libs.reactFX)
|
||||
implementation(libs.undofx)
|
||||
implementation(libs.wellbehavedfx)
|
||||
|
||||
include(libs.richTextFX)
|
||||
include(libs.flowless)
|
||||
include(libs.reactFX)
|
||||
include(libs.undofx)
|
||||
include(libs.wellbehavedfx)
|
||||
|
||||
implementation(libs.jacksonCore)
|
||||
implementation(libs.directoryWatcher)
|
||||
implementation(libs.jsvg)
|
||||
include(libs.jsvg)
|
||||
include(libs.directoryWatcher)
|
||||
include(libs.jacksonCore)
|
||||
|
||||
// JavaFX
|
||||
for (classifier in javafxClassifiers) {
|
||||
implementation(javafxDep("base", classifier))
|
||||
implementation(javafxDep("graphics", classifier))
|
||||
implementation(javafxDep("web", classifier))
|
||||
implementation(javafxDep("media", classifier))
|
||||
implementation(javafxDep("controls", classifier))
|
||||
|
||||
include(javafxDep("base", classifier))
|
||||
include(javafxDep("graphics", classifier))
|
||||
include(javafxDep("web", classifier))
|
||||
include(javafxDep("media", classifier))
|
||||
include(javafxDep("controls", classifier))
|
||||
}
|
||||
}
|
||||
|
||||
// Taken from Stonecutter template
|
||||
loom {
|
||||
runConfigs.all {
|
||||
ideConfigGenerated(true)
|
||||
vmArgs("-Dmixin.debug.export=true") // Exports transformed classes for debugging
|
||||
runDir = "../../run" // Shares the run directory between versions
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named<ProcessResources>("processResources") {
|
||||
inputs.property("id", project.findProperty("mod.id"))
|
||||
inputs.property("name", project.findProperty("mod.name"))
|
||||
inputs.property("version", project.findProperty("mod.version"))
|
||||
inputs.property("minecraft", project.findProperty("mod.mc_dep"))
|
||||
|
||||
val props = mapOf(
|
||||
"id" to project.property("mod.id"),
|
||||
"name" to project.property("mod.name"),
|
||||
"version" to project.property("mod.version"),
|
||||
"minecraft" to project.property("mod.mc_dep")
|
||||
)
|
||||
|
||||
filesMatching("fabric.mod.json") { expand(props) }
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.release.set(21)
|
||||
}
|
||||
|
||||
tasks.named<Jar>("jar") {
|
||||
from(rootProject.file("LICENSE")) {
|
||||
rename { "${it}_${project.findProperty("archives_base_name")}" }
|
||||
}
|
||||
from(rootProject.file("docs")) {
|
||||
into("docs")
|
||||
exclude("README_Pictures")
|
||||
}
|
||||
exclude("module-info.class")
|
||||
exclude("**/module-info.class")
|
||||
exclude("META-INF/MANIFEST.MF")
|
||||
exclude("META-INF/*.SF")
|
||||
exclude("META-INF/*.DSA")
|
||||
exclude("META-INF/*.RSA")
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
tasks.named("remapJar") {
|
||||
doLast {
|
||||
copy {
|
||||
from(outputs.files)
|
||||
into(rootProject.file("build/libs"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("mavenJava") {
|
||||
artifactId = project.findProperty("archives_base_name") as String
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
# Nodex Changelog
|
||||
|
||||
## [0.0.1]
|
||||
|
||||
### Added
|
||||
- Initial release of DataPack IDE.
|
||||
- In-game IDE for editing datapack files.
|
||||
- UI built with JavaFX and AtlantaFX theme library.
|
||||
- Features include:
|
||||
- File tree view with directory selection and file moving.
|
||||
- Tabbed text editor with RichTextFX for code editing.
|
||||
- Dirty file indicators (suffix and color).
|
||||
- Customizable themes and font sizes.
|
||||
- Minecraft integration:
|
||||
- `/datapack-ide` command to open the IDE.
|
||||
- Keybinding to toggle the IDE window.
|
||||
- "Reload Datapack" button to execute `/reload`.
|
||||
|
||||
## [0.0.2]
|
||||
|
||||
**Rebrand from "Datapack IDE" to "Nodex"**
|
||||
|
||||
### Added
|
||||
- Updated to Minecraft version 1.21.11
|
||||
- Project Manager Screen with a recent project list.
|
||||
- Datapack validation and previews.
|
||||
- Universal Folder System for config and project sync between instances.
|
||||
- Datapack Mirroring System for universal folders.
|
||||
- JSON and mcmeta syntax highlighting (Non IntelliSense).
|
||||
- Custom Theme CSS editing and live reloading.
|
||||
- Toggle to show a button on the start and pause screen.
|
||||
- Added Notification when reloading datapack.
|
||||
- The Folder Button in LeftBar now collapses the FileTree.
|
||||
|
||||
### Fixes
|
||||
- TopBar's buttons adding white background.
|
||||
- Fixed crash with too much text in the settings search field.
|
||||
- Line & Column count always stays at 0.
|
||||
- Curser should be more visible by default on light themes.
|
||||
- Disabled non-functional buttons from being pressed.
|
||||
- Made TopBar buttons actually work.
|
||||
- Fixed Text Area and Fields not having limits causing crashes.
|
||||
- TextEditor not gaining focus on file open.
|
||||
- Curser not saving location.
|
||||
- Text no longer pushes buttons out in settings.
|
||||
|
||||
### Technical Changes
|
||||
- Migrated to mojang mappings.
|
||||
- Added Stonecutter for version control.
|
||||
- Removed ModMenu dependency.
|
||||
- Added support for SVG icons.
|
||||
- Added styles to Notification, Message, and Tab controls.
|
||||
- Massively improved file system watcher.
|
||||
- Removed multiple unused UI Screens.
|
||||
- Removed Assets folder from mods configs.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) [2022] [mkpaz]
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2023 Cole Bemis
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,23 @@
|
||||
Copyright (c) 2014, TomasMikula
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,392 @@
|
||||
|
||||
GNU General Public License, version 2,
|
||||
with the Classpath Exception
|
||||
|
||||
The GNU General Public License (GPL)
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share
|
||||
and change it. By contrast, the GNU General Public License is intended to
|
||||
guarantee your freedom to share and change free software--to make sure the
|
||||
software is free for all its users. This General Public License applies to
|
||||
most of the Free Software Foundation's software and to any other program whose
|
||||
authors commit to using it. (Some other Free Software Foundation software is
|
||||
covered by the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our
|
||||
General Public Licenses are designed to make sure that you have the freedom to
|
||||
distribute copies of free software (and charge for this service if you wish),
|
||||
that you receive source code or can get it if you want it, that you can change
|
||||
the software or use pieces of it in new free programs; and that you know you
|
||||
can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny
|
||||
you these rights or to ask you to surrender the rights. These restrictions
|
||||
translate to certain responsibilities for you if you distribute copies of the
|
||||
software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for
|
||||
a fee, you must give the recipients all the rights that you have. You must
|
||||
make sure that they, too, receive or can get the source code. And you must
|
||||
show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
offer you this license which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that
|
||||
everyone understands that there is no warranty for this free software. If the
|
||||
software is modified by someone else and passed on, we want its recipients to
|
||||
know that what they have is not the original, so that any problems introduced
|
||||
by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We
|
||||
wish to avoid the danger that redistributors of a free program will
|
||||
individually obtain patent licenses, in effect making the program proprietary.
|
||||
To prevent this, we have made it clear that any patent must be licensed for
|
||||
everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification
|
||||
follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice
|
||||
placed by the copyright holder saying it may be distributed under the terms of
|
||||
this General Public License. The "Program", below, refers to any such program
|
||||
or work, and a "work based on the Program" means either the Program or any
|
||||
derivative work under copyright law: that is to say, a work containing the
|
||||
Program or a portion of it, either verbatim or with modifications and/or
|
||||
translated into another language. (Hereinafter, translation is included
|
||||
without limitation in the term "modification".) Each licensee is addressed as
|
||||
"you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by
|
||||
this License; they are outside its scope. The act of running the Program is
|
||||
not restricted, and the output from the Program is covered only if its contents
|
||||
constitute a work based on the Program (independent of having been made by
|
||||
running the Program). Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code as
|
||||
you receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice and
|
||||
disclaimer of warranty; keep intact all the notices that refer to this License
|
||||
and to the absence of any warranty; and give any other recipients of the
|
||||
Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may
|
||||
at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, thus
|
||||
forming a work based on the Program, and copy and distribute such modifications
|
||||
or work under the terms of Section 1 above, provided that you also meet all of
|
||||
these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating
|
||||
that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or
|
||||
in part contains or is derived from the Program or any part thereof, to be
|
||||
licensed as a whole at no charge to all third parties under the terms of
|
||||
this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run,
|
||||
you must cause it, when started running for such interactive use in the
|
||||
most ordinary way, to print or display an announcement including an
|
||||
appropriate copyright notice and a notice that there is no warranty (or
|
||||
else, saying that you provide a warranty) and that users may redistribute
|
||||
the program under these conditions, and telling the user how to view a copy
|
||||
of this License. (Exception: if the Program itself is interactive but does
|
||||
not normally print such an announcement, your work based on the Program is
|
||||
not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable
|
||||
sections of that work are not derived from the Program, and can be reasonably
|
||||
considered independent and separate works in themselves, then this License, and
|
||||
its terms, do not apply to those sections when you distribute them as separate
|
||||
works. But when you distribute the same sections as part of a whole which is a
|
||||
work based on the Program, the distribution of the whole must be on the terms
|
||||
of this License, whose permissions for other licensees extend to the entire
|
||||
whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your
|
||||
rights to work written entirely by you; rather, the intent is to exercise the
|
||||
right to control the distribution of derivative or collective works based on
|
||||
the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with the
|
||||
Program (or with a work based on the Program) on a volume of a storage or
|
||||
distribution medium does not bring the other work under the scope of this
|
||||
License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under
|
||||
Section 2) in object code or executable form under the terms of Sections 1 and
|
||||
2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source
|
||||
code, which must be distributed under the terms of Sections 1 and 2 above
|
||||
on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to
|
||||
give any third party, for a charge no more than your cost of physically
|
||||
performing source distribution, a complete machine-readable copy of the
|
||||
corresponding source code, to be distributed under the terms of Sections 1
|
||||
and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to
|
||||
distribute corresponding source code. (This alternative is allowed only
|
||||
for noncommercial distribution and only if you received the program in
|
||||
object code or executable form with such an offer, in accord with
|
||||
Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making
|
||||
modifications to it. For an executable work, complete source code means all
|
||||
the source code for all modules it contains, plus any associated interface
|
||||
definition files, plus the scripts used to control compilation and installation
|
||||
of the executable. However, as a special exception, the source code
|
||||
distributed need not include anything that is normally distributed (in either
|
||||
source or binary form) with the major components (compiler, kernel, and so on)
|
||||
of the operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the source
|
||||
code from the same place counts as distribution of the source code, even though
|
||||
third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except as
|
||||
expressly provided under this License. Any attempt otherwise to copy, modify,
|
||||
sublicense or distribute the Program is void, and will automatically terminate
|
||||
your rights under this License. However, parties who have received copies, or
|
||||
rights, from you under this License will not have their licenses terminated so
|
||||
long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed it.
|
||||
However, nothing else grants you permission to modify or distribute the Program
|
||||
or its derivative works. These actions are prohibited by law if you do not
|
||||
accept this License. Therefore, by modifying or distributing the Program (or
|
||||
any work based on the Program), you indicate your acceptance of this License to
|
||||
do so, and all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program),
|
||||
the recipient automatically receives a license from the original licensor to
|
||||
copy, distribute or modify the Program subject to these terms and conditions.
|
||||
You may not impose any further restrictions on the recipients' exercise of the
|
||||
rights granted herein. You are not responsible for enforcing compliance by
|
||||
third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues), conditions
|
||||
are imposed on you (whether by court order, agreement or otherwise) that
|
||||
contradict the conditions of this License, they do not excuse you from the
|
||||
conditions of this License. If you cannot distribute so as to satisfy
|
||||
simultaneously your obligations under this License and any other pertinent
|
||||
obligations, then as a consequence you may not distribute the Program at all.
|
||||
For example, if a patent license would not permit royalty-free redistribution
|
||||
of the Program by all those who receive copies directly or indirectly through
|
||||
you, then the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply and
|
||||
the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or
|
||||
other property right claims or to contest validity of any such claims; this
|
||||
section has the sole purpose of protecting the integrity of the free software
|
||||
distribution system, which is implemented by public license practices. Many
|
||||
people have made generous contributions to the wide range of software
|
||||
distributed through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing to
|
||||
distribute software through any other system and a licensee cannot impose that
|
||||
choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a
|
||||
consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain
|
||||
countries either by patents or by copyrighted interfaces, the original
|
||||
copyright holder who places the Program under this License may add an explicit
|
||||
geographical distribution limitation excluding those countries, so that
|
||||
distribution is permitted only in or among countries not thus excluded. In
|
||||
such case, this License incorporates the limitation as if written in the body
|
||||
of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of the
|
||||
General Public License from time to time. Such new versions will be similar in
|
||||
spirit to the present version, but may differ in detail to address new problems
|
||||
or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any later
|
||||
version", you have the option of following the terms and conditions either of
|
||||
that version or of any later version published by the Free Software Foundation.
|
||||
If the Program does not specify a version number of this License, you may
|
||||
choose any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs
|
||||
whose distribution conditions are different, write to the author to ask for
|
||||
permission. For software which is copyrighted by the Free Software Foundation,
|
||||
write to the Free Software Foundation; we sometimes make exceptions for this.
|
||||
Our decision will be guided by the two goals of preserving the free status of
|
||||
all derivatives of our free software and of promoting the sharing and reuse of
|
||||
software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
||||
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
||||
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
|
||||
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
|
||||
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
|
||||
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
|
||||
PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
||||
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
|
||||
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
|
||||
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible
|
||||
use to the public, the best way to achieve this is to make it free software
|
||||
which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach
|
||||
them to the start of each source file to most effectively convey the exclusion
|
||||
of warranty; and each file should have at least the "copyright" line and a
|
||||
pointer to where the full notice is found.
|
||||
|
||||
One line to give the program's name and a brief idea of what it does.
|
||||
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc., 59
|
||||
Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when it
|
||||
starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
|
||||
with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
|
||||
software, and you are welcome to redistribute it under certain conditions;
|
||||
type 'show c' for details.
|
||||
|
||||
The hypothetical commands 'show w' and 'show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may be
|
||||
called something other than 'show w' and 'show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
|
||||
is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
'Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989
|
||||
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General Public
|
||||
License instead of this License.
|
||||
|
||||
|
||||
"CLASSPATH" EXCEPTION TO THE GPL
|
||||
|
||||
Certain source files distributed by Oracle America and/or its affiliates are
|
||||
subject to the following clarification and special exception to the GPL, but
|
||||
only where Oracle has expressly included in the particular source file's header
|
||||
the words "Oracle designates this particular file as subject to the "Classpath"
|
||||
exception as provided by Oracle in the LICENSE file that accompanied this code."
|
||||
|
||||
Linking this library statically or dynamically with other modules is making
|
||||
a combined work based on this library. Thus, the terms and conditions of
|
||||
the GNU General Public License cover the whole combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent modules,
|
||||
and to copy and distribute the resulting executable under terms of your
|
||||
choice, provided that you also meet, for each linked independent module,
|
||||
the terms and conditions of the license of that module. An independent
|
||||
module is a module which is not derived from or based on this library. If
|
||||
you modify this library, you may extend this exception to your version of
|
||||
the library, but you are not obligated to do so. If you do not wish to do
|
||||
so, delete this exception statement from your version.
|
||||
|
||||
|
||||
|
||||
|
||||
ADDITIONAL INFORMATION ABOUT LICENSING
|
||||
|
||||
Certain files distributed by Oracle America, Inc. and/or its affiliates are
|
||||
subject to the following clarification and special exception to the GPLv2,
|
||||
based on the GNU Project exception for its Classpath libraries, known as the
|
||||
GNU Classpath Exception.
|
||||
|
||||
Note that Oracle includes multiple, independent programs in this software
|
||||
package. Some of those programs are provided under licenses deemed
|
||||
incompatible with the GPLv2 by the Free Software Foundation and others.
|
||||
For example, the package includes programs licensed under the Apache
|
||||
License, Version 2.0 and may include FreeType. Such programs are licensed
|
||||
to you under their original licenses.
|
||||
|
||||
Oracle facilitates your further distribution of this package by adding the
|
||||
Classpath Exception to the necessary parts of its GPLv2 code, which permits
|
||||
you to use that code in combination with other independent modules not
|
||||
licensed under the GPLv2. However, note that this would not permit you to
|
||||
commingle code under an incompatible license with Oracle's GPLv2 licensed
|
||||
code by, for example, cutting and pasting such code into a file also
|
||||
containing Oracle's GPLv2 licensed code and then distributing the result.
|
||||
|
||||
Additionally, if you were to remove the Classpath Exception from any of the
|
||||
files to which it applies and distribute the result, you would likely be
|
||||
required to license some or all of the other code in that distribution under
|
||||
the GPLv2 as well, and since the GPLv2 is incompatible with the license terms
|
||||
of some items included in the distribution by Oracle, removing the Classpath
|
||||
Exception could therefore effectively compromise your ability to further
|
||||
distribute the package.
|
||||
|
||||
Failing to distribute notices associated with some files may also create
|
||||
unexpected legal consequences.
|
||||
|
||||
Proceed with caution and we recommend that you obtain the advice of a lawyer
|
||||
skilled in open source matters before removing the Classpath Exception or
|
||||
making modifications to this package which may subsequently be redistributed
|
||||
and/or involve the use of third party software.
|
||||
@@ -0,0 +1,10 @@
|
||||
Copyright (c) 2013-2014, Tomas Mikula
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,10 @@
|
||||
Copyright (c) 2013-2023, Tomas Mikula and contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,23 @@
|
||||
Copyright (c) 2014, TomasMikula
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,23 @@
|
||||
Copyright (c) 2014, TomasMikula
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,177 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-2024 Jannis Weis
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
@@ -0,0 +1,507 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="111.20968mm"
|
||||
height="111.20968mm"
|
||||
viewBox="0 0 111.20968 111.20968"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient3"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
<linearGradient
|
||||
id="linearGradient1">
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:1;"
|
||||
offset="0.41473991"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:0.54562044;"
|
||||
offset="0.81502891"
|
||||
id="stop2" />
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:0.18613139;"
|
||||
offset="0.99855489"
|
||||
id="stop3" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient6"
|
||||
gradientTransform="scale(0.93067071,1.0744939)"
|
||||
x1="83.748772"
|
||||
y1="132.62811"
|
||||
x2="134.92821"
|
||||
y2="132.62811"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:1;"
|
||||
offset="0.41473991"
|
||||
id="stop4" />
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:0.54562044;"
|
||||
offset="0.81502891"
|
||||
id="stop5" />
|
||||
<stop
|
||||
style="stop-color:#d03831;stop-opacity:0.18613139;"
|
||||
offset="0.99855489"
|
||||
id="stop6" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient17"
|
||||
id="linearGradient19"
|
||||
x1="129.90135"
|
||||
y1="94.800224"
|
||||
x2="129.90135"
|
||||
y2="172.73756"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient17">
|
||||
<stop
|
||||
style="stop-color:#ff3131;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop20" />
|
||||
<stop
|
||||
style="stop-color:#f2f9ff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop21" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient24"
|
||||
id="linearGradient21"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="149.38574"
|
||||
y1="100.02102"
|
||||
x2="110.41704"
|
||||
y2="167.5168" />
|
||||
<linearGradient
|
||||
id="linearGradient24">
|
||||
<stop
|
||||
style="stop-color:#ff3131;stop-opacity:1;"
|
||||
offset="0.10401891"
|
||||
id="stop23" />
|
||||
<stop
|
||||
style="stop-color:#f2f9ff;stop-opacity:0;"
|
||||
offset="0.64984226"
|
||||
id="stop24" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient17-1"
|
||||
id="linearGradient22"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="110.41702"
|
||||
y1="100.02103"
|
||||
x2="149.38568"
|
||||
y2="167.51675" />
|
||||
<linearGradient
|
||||
id="linearGradient17-1">
|
||||
<stop
|
||||
style="stop-color:#ff3131;stop-opacity:1;"
|
||||
offset="0.10638298"
|
||||
id="stop19" />
|
||||
<stop
|
||||
style="stop-color:#f2f9ff;stop-opacity:0;"
|
||||
offset="0.59936911"
|
||||
id="stop22" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient851"
|
||||
id="linearGradient852"
|
||||
x1="118.77145"
|
||||
y1="158.73622"
|
||||
x2="105.73347"
|
||||
y2="181.31865"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient851">
|
||||
<stop
|
||||
style="stop-color:#cd2e2e;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop851" />
|
||||
<stop
|
||||
style="stop-color:#5f74cc;stop-opacity:0;"
|
||||
offset="0.82742316"
|
||||
id="stop852" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient854"
|
||||
id="linearGradient855"
|
||||
x1="107.26515"
|
||||
y1="143.39305"
|
||||
x2="107.89261"
|
||||
y2="146.41925"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0.12583549,0,1,0,-12.622806)" />
|
||||
<linearGradient
|
||||
id="linearGradient854">
|
||||
<stop
|
||||
style="stop-color:#b02f23;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop854" />
|
||||
<stop
|
||||
style="stop-color:#511510;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop855" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient8"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient9"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient10"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient11"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="129.8987"
|
||||
y1="181.99385"
|
||||
x2="129.8987"
|
||||
y2="109.6276" />
|
||||
</defs>
|
||||
<g
|
||||
id="layer1"
|
||||
style="display:none"
|
||||
transform="translate(-43.988069,-70.819257)">
|
||||
<rect
|
||||
style="opacity:0;fill:#ffffff;stroke-width:6.00001;stroke-linejoin:round"
|
||||
id="rect7"
|
||||
width="139.48326"
|
||||
height="110.04089"
|
||||
x="80.230484"
|
||||
y="34.474258"
|
||||
ry="30.730484" />
|
||||
<g
|
||||
id="layer1-8"
|
||||
transform="translate(-25.980751,-10.009155)">
|
||||
<rect
|
||||
style="display:inline;opacity:0;fill:#222034;fill-opacity:1;stroke:none;stroke-width:2.75941;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect857"
|
||||
width="138.564"
|
||||
height="138.564"
|
||||
x="60.621765"
|
||||
y="66.587502" />
|
||||
<g
|
||||
id="g90"
|
||||
style="display:inline">
|
||||
<path
|
||||
d="m 134.23418,72.499967 v 54.999743 l 47.6312,-27.49961 z"
|
||||
style="display:inline;fill:url(#linearGradient8);stroke-width:5.56644"
|
||||
id="path90" />
|
||||
<path
|
||||
d="m 186.19535,107.4999 -47.63068,27.50013 47.63068,27.50013 z"
|
||||
style="display:inline;fill:url(#linearGradient9);stroke-width:5.56644"
|
||||
id="path89" />
|
||||
<path
|
||||
d="m 181.86538,169.99996 -47.6312,-27.49961 v 54.99974 z"
|
||||
style="display:inline;fill:url(#linearGradient10);stroke-width:5.56644"
|
||||
id="path88" />
|
||||
<path
|
||||
d="M 125.57373,197.50009 V 142.5081 l -47.631201,27.49186 z"
|
||||
style="display:inline;fill:url(#linearGradient6);stroke-width:5.56644"
|
||||
id="path87" />
|
||||
<path
|
||||
d="m 125.5634,127.49403 0.01,-54.994063 -47.630681,27.500133 z"
|
||||
style="display:inline;fill:url(#linearGradient11);stroke-width:5.56644"
|
||||
id="path86" />
|
||||
<path
|
||||
d="M 73.612044,162.50016 121.24376,135.00003 73.612044,107.4999 Z"
|
||||
style="display:inline;fill:url(#linearGradient3);stroke-width:5.56644"
|
||||
id="path85" />
|
||||
</g>
|
||||
<g
|
||||
id="g1143"
|
||||
style="display:inline"
|
||||
clip-path="none">
|
||||
<g
|
||||
id="g1102"
|
||||
style="display:inline;fill:#d6dcf3;fill-opacity:1;stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(-1.0004925,0,0,-1.0004925,259.87158,290.0947)">
|
||||
<path
|
||||
id="path1099"
|
||||
style="display:inline;fill:#f2f9ff;stroke-width:0.001"
|
||||
d="M 110.41813,64.55551 83.582326,80.121872 110.41813,95.688834 137.25394,80.122472 Z m -35.780716,20.755507 -4.47299,2.594572 v 46.700251 l 35.781256,20.7556 v -51.88888 z m 71.561966,8.5e-5 -31.30826,18.161468 v 51.88888 l 35.78072,-20.75551 V 87.905685 Z"
|
||||
transform="matrix(-0.96766441,1.1437994e-6,0,-0.96311437,236.7516,252.17524)" />
|
||||
<path
|
||||
id="path1100"
|
||||
style="display:inline;fill:#d6dcf3;fill-opacity:1;stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 168.85547,167.51218 5.1e-4,-44.97768 -34.62424,-19.98997 v 44.97769 z" />
|
||||
<path
|
||||
id="path1101"
|
||||
style="display:inline;fill:#d6dcf3;fill-opacity:1;stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 90.951823,167.51218 125.57555,147.52222 V 102.54453 L 90.951823,122.5345 Z" />
|
||||
<path
|
||||
id="path1102"
|
||||
style="display:inline;fill:#f2f9ff;fill-opacity:1;stroke:none;stroke-width:0.00099951;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 129.9039,189.98966 25.96444,-14.98292 -25.96444,-14.99066 -25.96495,14.99066 z m 34.6227,-19.97912 4.32938,-2.49836 -34.62424,-19.98996 v 4.99723 z m -69.245907,0 30.294857,-17.49109 v -4.99723 l -34.623727,19.98996 z" />
|
||||
</g>
|
||||
<path
|
||||
id="path1947"
|
||||
style="baseline-shift:baseline;display:inline;overflow:visible;opacity:0.07;vector-effect:none;fill:#6e1b1b;stroke-linejoin:round;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 125.78354,102.3891 -0.40153,0.23151 4.1212,2.37918 -3.92896,2.26808 -4.12172,-2.3797 -0.40204,0.23203 4.12223,2.3797 -3.92896,2.26808 -4.12274,-2.38022 -0.40153,0.23203 4.12275,2.38021 -3.92845,2.26808 -4.12378,-2.38073 -0.40204,0.23151 4.1243,2.38125 -3.92896,2.26808 -4.12481,-2.38177 -0.40153,0.23203 4.12481,2.38125 -3.92844,2.26859 -4.12585,-2.38228 -0.20102,0.11576 25.97723,14.99805 25.97722,-14.99805 -0.2005,-0.11576 -4.12585,2.38228 -3.92947,-2.26859 4.12533,-2.38177 -0.40101,-0.23099 -4.12481,2.38125 -3.92948,-2.2686 4.12378,-2.38073 -0.40049,-0.23151 -4.1243,2.38125 -3.92948,-2.26911 4.12327,-2.38022 -0.40101,-0.23151 -4.12275,2.38022 -3.92947,-2.26808 4.12171,-2.3797 -0.40101,-0.23151 -4.12171,2.3797 -3.92948,-2.26911 4.12068,-2.37867 -0.40049,-0.23099 -4.12016,2.37866 z m 4.11964,2.8422 3.92948,2.2686 -3.92844,2.26808 -3.92948,-2.2686 z m -4.32997,2.50011 3.92948,2.26859 -3.92896,2.26808 -3.92948,-2.26859 z m 8.66046,0 3.92947,2.26808 -3.92896,2.26859 -3.92947,-2.26859 z m -12.99094,2.49959 3.92947,2.26859 -3.92895,2.2686 -3.92896,-2.2686 z m 17.32142,0 3.92948,2.26859 -3.92948,2.2686 -3.92947,-2.2686 z m -8.66097,5.1e-4 3.92948,2.26808 -3.92896,2.2686 -3.92896,-2.2686 z m -12.99042,2.49959 3.92948,2.2686 -3.92896,2.26859 -3.92948,-2.26859 z m 8.66045,0 3.92948,2.2686 -3.92948,2.26859 -3.92896,-2.26859 z m 8.66046,0 3.92947,2.2686 -3.92896,2.26859 -3.92947,-2.26859 z m 8.66045,0 3.92948,2.2686 -3.92896,2.26859 -3.92948,-2.26859 z m -30.31133,2.50011 3.92948,2.26859 -3.92896,2.26808 -3.92948,-2.26859 z m 8.66046,0 3.92947,2.26859 -3.92947,2.2686 -3.92896,-2.2686 z m 8.66045,0 3.92947,2.26859 -3.92947,2.2686 -3.92948,-2.2686 z m 8.66045,0 3.92948,2.26859 -3.92948,2.2686 -3.92947,-2.2686 z m 8.66046,0 3.92947,2.26859 -3.92999,2.2686 -3.92896,-2.2686 z m -21.6514,2.49959 3.93,2.26911 -3.92948,2.2686 -3.92999,-2.26912 z m 8.66046,0 3.92999,2.26911 -3.92999,2.2686 -3.92948,-2.2686 z m 8.66045,0 3.92948,2.26859 -3.92948,2.26912 -3.92948,-2.2686 z m -25.98136,5.2e-4 3.92948,2.26859 -3.92896,2.26808 -3.92896,-2.2686 z m 47.6312,2.26911 -30.30978,17.4997 v 0.23048 l 4.13102,2.38487 v 4.76818 l -3.93206,2.27015 v -4.65398 a 0.20002,0.20002 0 0 0 -0.0992,-0.17363 l -0.0997,-0.0574 v 45.23083 l 0.19896,-0.11473 v -4.76818 l 3.93206,-2.27015 v 4.76819 l 0.39842,-0.23048 v -4.76767 l 3.93155,-2.26962 v 4.76766 l 0.39842,-0.22996 v -4.76818 l 3.93154,-2.26963 v 4.76767 l 0.39843,-0.22996 v -4.76767 l 3.93154,-2.27015 v 4.76819 l 0.39843,-0.22996 v -4.76819 l 3.93154,-2.27014 v 4.76818 l 0.39843,-0.22996 v -4.76818 l 3.93206,-2.27015 v 4.76819 l 0.39842,-0.22996 v -4.76819 l 3.93154,-2.27014 v 4.76818 l 0.39843,-0.22996 v -4.76818 l 4.13101,-2.38487 v -0.4625 l -4.13101,2.38486 v -4.53771 l 4.13101,-2.38486 v -0.46251 l -4.13101,2.38487 v -4.53719 l 4.13101,-2.38487 v -0.4625 l -4.13101,2.38487 v -4.53771 l 4.13101,-2.38487 v -0.4625 l -4.13101,2.38486 v -4.53719 l 4.13101,-2.38486 v -0.46251 l -4.13101,2.38487 v -4.53771 l 4.13101,-2.38487 v -0.46353 l -4.13101,2.38486 v -4.53615 l 4.13101,-2.38487 v -0.46405 l -4.13101,2.38486 v -4.53615 l 4.13101,-2.38487 v -0.46354 l -4.13101,2.38487 v -4.65295 a 0.20002,0.20002 0 0 0 -0.0997,-0.17415 l -4.02817,-2.32595 4.12894,-2.38332 z m -69.280007,5.1e-4 -0.200505,0.11576 4.127913,2.3828 -4.029211,2.32647 a 0.20002,0.20002 0 0 0 -0.09973,0.17415 v 4.65346 l -4.129464,-2.38435 v 0.46251 l 4.129464,2.38435 v 4.53771 l -4.129464,-2.38435 v 0.46198 l 4.129464,2.38435 v 4.53771 l -4.129464,-2.38435 v 0.46199 l 4.129464,2.38435 v 4.53822 l -4.129464,-2.38435 v 0.46199 l 4.129464,2.38435 v 4.53771 l -4.129981,-2.38435 v 0.46198 l 4.129981,2.38435 v 4.53823 l -4.129981,-2.38435 v 0.46199 l 4.129981,2.38435 v 4.5377 l -4.129981,-2.38435 v 0.46199 l 4.129981,2.38435 v 4.53823 l -4.129981,-2.38435 v 0.46198 l 4.129981,2.38435 v 4.7687 l 0.400492,0.23151 v -4.7687 l 3.929476,2.2686 v 4.7687 l 0.400492,0.23099 v -4.7687 l 3.93,2.26911 v 4.76871 l 0.39996,0.23099 v -4.7687 l 3.93001,2.26911 v 4.76818 l 0.40049,0.23152 v -4.76871 l 3.92947,2.2686 v 4.7687 l 0.4005,0.23151 v -4.7687 l 3.92946,2.2686 v 4.7687 l 0.40049,0.23099 v -4.7687 l 3.92948,2.26859 v 4.76871 l 0.4005,0.23151 v -4.76871 l 3.93,2.2686 v 4.7687 l 0.2005,0.11576 v -45.23083 l -0.0992,0.0574 a 0.20002,0.20002 0 0 0 -0.10128,0.17363 v 4.65346 l -3.93,-2.26859 v -4.76922 l 4.1305,-2.38435 v -0.231 z m 25.979297,0.22996 3.92947,2.2686 -3.92896,2.26859 -3.92999,-2.26859 z m 8.66045,0 3.92947,2.2686 -3.92947,2.26911 -3.92948,-2.26911 z m 8.66045,0 3.92948,2.2686 -3.92999,2.26911 -3.92948,-2.26911 z m -38.971779,2.50011 3.929479,2.2686 -4.029732,2.32647 a 0.20002,0.20002 0 0 0 -0.09974,0.17415 v 4.65294 l -3.929476,-2.26859 v -4.76922 z m 25.981359,0 3.92948,2.2686 -3.92948,2.26859 -3.92948,-2.26859 z m 8.66045,0 3.92948,2.2686 -3.92999,2.26859 -3.92948,-2.26859 z m 25.98188,0 4.12946,2.38435 v 4.76767 l -3.93154,2.27014 v -4.65294 a 0.20002,0.20002 0 0 0 -0.0997,-0.17415 l -4.0287,-2.32596 z m -56.2932,2.5001Line truncated
|
||||
<g
|
||||
id="g1129"
|
||||
style="display:inline;opacity:0.280928;fill:url(#linearGradient19);stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="matrix(-1.0004925,0,0,-1.0004925,259.87158,290.0947)">
|
||||
<path
|
||||
id="path1128"
|
||||
style="display:inline;fill:url(#linearGradient21);stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 168.85598,167.51218 V 122.5345 l -34.62424,-19.98997 v 44.97769 z" />
|
||||
<path
|
||||
id="path1129"
|
||||
style="display:inline;fill:url(#linearGradient22);stroke:none;stroke-width:5.56644;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 90.951823,167.51218 125.57555,147.52222 V 102.54453 L 90.951823,122.5345 Z" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g1142"
|
||||
style="display:inline"
|
||||
transform="matrix(1.6267457,0.71704367,0,1.6267457,-54.654511,-149.52689)">
|
||||
<path
|
||||
style="display:inline;opacity:0.707373;fill:url(#linearGradient852);fill-opacity:1;stroke:none;stroke-width:5.26899;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 99.214593,152.71842 0.333574,20.32055 25.980763,13.54745 -0.23851,-21.70879 z"
|
||||
id="path1130"
|
||||
transform="matrix(0.61472424,-0.23659226,0,0.61472424,32.560227,73.198412)" />
|
||||
<path
|
||||
style="display:inline;fill:url(#linearGradient855);fill-opacity:1"
|
||||
d="m 100.134,135.26491 c 0.22489,-0.1966 0.506,-0.32988 0.84332,-0.39987 0.33732,-0.07 0.67466,-0.0276 1.01199,0.12738 0.33733,0.15489 0.61844,0.35892 0.84333,0.61211 0.22489,0.25319 0.44977,0.50637 0.67466,0.75957 l 0.67466,0.75956 c 0.22489,0.25318 0.44978,0.50636 0.67467,0.75955 0.22489,0.25319 0.44977,0.50637 0.67466,0.75957 l 0.67466,0.75955 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75955 0.22489,0.2532 0.44977,0.50639 0.67466,0.75957 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75956 0.22489,0.25319 0.39355,0.55553 0.506,0.907 0.11244,0.35148 0.16866,0.75211 0.16866,1.20188 0,0.44978 -0.0562,0.83626 -0.16866,1.15944 -0.11245,0.32319 -0.28111,0.58307 -0.506,0.77966 -0.22489,0.19659 -0.44978,0.39318 -0.67467,0.58977 l -0.67466,0.58976 -0.67466,0.58976 c -0.22489,0.1966 -0.506,0.32989 -0.84333,0.39989 -0.33733,0.07 -0.67467,0.14 -1.012,0.20999 -0.33733,0.07 -0.61844,0.20328 -0.84333,0.39988 -0.22489,0.19658 -0.506,0.32987 -0.84333,0.39987 -0.33733,0.07 -0.73088,0.0767 -1.18066,0.0201 l -1.34931,-0.16974 c -0.44977,-0.0566 -0.843334,-0.16232 -1.180664,-0.31723 -0.33733,-0.1549 -0.61844,-0.35893 -0.843328,-0.61212 -0.224887,-0.25318 -0.505997,-0.45722 -0.843329,-0.61212 -0.337331,-0.15489 -0.674663,-0.30978 -1.011995,-0.46468 -0.337332,-0.15488 -0.618442,-0.35892 -0.843329,-0.61212 L 95.411351,146.14 94.736688,145.38044 c -0.224888,-0.25319 -0.449776,-0.50637 -0.674663,-0.75957 -0.224888,-0.25318 -0.393554,-0.55552 -0.505998,-0.907 -0.112444,-0.35147 -0.168666,-0.75211 -0.168666,-1.20189 0,-0.44977 0.05622,-0.83624 0.168666,-1.15943 0.112444,-0.32318 0.28111,-0.58306 0.505998,-0.77966 l 0.674663,-0.58976 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 c 0.224887,-0.1966 0.449775,-0.39318 0.674663,-0.58978 l 0.674663,-0.58976 0.674668,-0.58976 c 0.22488,-0.1966 0.44977,-0.39318 0.674664,-0.58977"
|
||||
id="path1131" />
|
||||
<path
|
||||
style="display:inline;fill:#94291e;fill-opacity:1"
|
||||
d="m 98.962644,136.28074 c 0.224888,-0.1966 0.505998,-0.32988 0.843329,-0.39987 0.337327,-0.07 0.674667,-0.0276 1.011997,0.12738 0.33733,0.15489 0.61844,0.35893 0.84333,0.61211 0.22489,0.25319 0.44977,0.50639 0.67466,0.75957 l 0.67466,0.75956 c 0.22489,0.25318 0.44978,0.50636 0.67467,0.75956 0.22489,0.25318 0.44977,0.50637 0.67466,0.75956 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50636 0.67467,0.75956 0.22489,0.25318 0.44977,0.50637 0.67466,0.75956 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50636 0.67467,0.75956 0.22489,0.25318 0.39355,0.55552 0.506,0.90699 0.11244,0.35148 0.16866,0.75211 0.16866,1.20188 0,0.44978 -0.0562,0.83626 -0.16866,1.15944 -0.11245,0.32319 -0.28111,0.58307 -0.506,0.77967 -0.22489,0.19658 -0.44978,0.39318 -0.67467,0.58977 l -0.67466,0.58976 -0.67466,0.58977 c -0.22489,0.19658 -0.506,0.32988 -0.84333,0.39988 -0.33733,0.07 -0.67467,0.13999 -1.012,0.20998 -0.33733,0.07 -0.61844,0.20328 -0.84333,0.39988 -0.22489,0.19658 -0.506,0.32988 -0.84333,0.39988 -0.33733,0.0699 -0.73088,0.0767 -1.18066,0.0201 l -1.349323,-0.16984 c -0.449775,-0.0566 -0.843329,-0.16232 -1.180661,-0.31723 -0.337331,-0.1549 -0.618441,-0.35892 -0.843329,-0.61212 -0.224887,-0.25318 -0.505997,-0.45722 -0.843329,-0.61212 -0.337331,-0.15489 -0.674663,-0.30978 -1.011995,-0.46467 -0.337332,-0.15489 -0.618442,-0.35893 -0.843329,-0.61213 L 94.24,147.15574 93.565337,146.39618 c -0.224888,-0.25319 -0.449776,-0.50637 -0.674663,-0.75956 -0.224888,-0.25319 -0.393554,-0.55553 -0.505998,-0.907 -0.112444,-0.35148 -0.168666,-0.7521 -0.168666,-1.20188 0,-0.44977 0.05622,-0.83626 0.168666,-1.15944 0.112444,-0.32319 0.28111,-0.58307 0.505998,-0.77966 l 0.674663,-0.58977 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 c 0.224887,-0.19659 0.449775,-0.39318 0.674663,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 c 0.224887,-0.1966 0.449775,-0.39318 0.674663,-0.58977"
|
||||
id="path1132" />
|
||||
<g
|
||||
id="g1141"
|
||||
style="display:inline;opacity:1">
|
||||
<path
|
||||
style="display:inline;fill:#2d0000;fill-opacity:1"
|
||||
d="m 98.962644,136.28074 c 0.224888,-0.19659 0.505998,-0.32988 0.843329,-0.39987 0.337327,-0.07 0.674667,-0.0275 1.011997,0.12738 0.33733,0.15489 0.61844,0.35893 0.84333,0.61211 0.22489,0.25319 0.44977,0.50638 0.67466,0.75957 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75956 l 0.67466,0.75956 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75956 0.22489,0.25319 0.44977,0.50638 0.67466,0.75956 l 0.67466,0.75956 c 0.22489,0.25319 0.44978,0.50637 0.67467,0.75956 0.22489,0.25319 0.39355,0.55552 0.506,0.90699 0.11244,0.35148 0.16866,0.75211 0.16866,1.20188 0,0.44978 -0.0562,0.83626 -0.16866,1.15944 -0.11245,0.32319 -0.28111,0.58308 -0.506,0.77967 l -0.67467,0.58977 -0.67466,0.58976 c -0.22489,0.19659 -0.44977,0.39318 -0.67466,0.58977 -0.22489,0.19659 -0.506,0.32989 -0.84333,0.39988 l -1.012,0.20998 c -0.33733,0.07 -0.61844,0.20329 -0.84333,0.39988 -0.22489,0.19659 -0.506,0.32988 -0.84333,0.39988 -0.33733,0.07 -0.73088,0.0767 -1.18066,0.0201 -0.44977,-0.0566 -0.89955,-0.11321 -1.349323,-0.16984 -0.449775,-0.0566 -0.843329,-0.16234 -1.180661,-0.31723 -0.337331,-0.15489 -0.618441,-0.35893 -0.843329,-0.61212 -0.224887,-0.25319 -0.505997,-0.45723 -0.843329,-0.61212 l -1.011995,-0.46467 c -0.337332,-0.15489 -0.618442,-0.35894 -0.843329,-0.61213 -0.224888,-0.25318 -0.449776,-0.50636 -0.674664,-0.75955 l -0.674663,-0.75956 -0.674663,-0.75956 c -0.224888,-0.25319 -0.393554,-0.55552 -0.505998,-0.907 -0.112444,-0.35147 -0.168666,-0.7521 -0.168666,-1.20188 0,-0.44977 0.05622,-0.83625 0.168666,-1.15944 0.112444,-0.32318 0.28111,-0.58307 0.505998,-0.77966 l 0.674663,-0.58977 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 c 0.224887,-0.19659 0.449775,-0.39318 0.674663,-0.58978 l 0.674663,-0.58976 0.674664,-0.58976 0.674663,-0.58977"
|
||||
id="path1133" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#720000;fill-opacity:1"
|
||||
d="m 96.949099,142.3149 4.674871,-3.598 0.52221,0.17818 c 0.36268,0.12375 0.63952,0.34051 0.86441,0.5937 l 0.67467,0.75955 0.67466,0.75956 c 0.22489,0.25319 0.44977,0.50638 0.67466,0.75956 0.22489,0.25319 0.44978,0.50638 0.67467,0.75955 l 0.67466,0.75956 c 0.22489,0.25319 0.39355,0.55553 0.506,0.907 0.11244,0.35149 0.16866,0.75212 0.16866,1.20189 0,0.44978 -0.0562,0.83626 -0.16866,1.15943 -0.11245,0.32319 -0.28111,0.58307 -0.506,0.77966 -0.22489,0.19659 -0.44977,0.39318 -0.67466,0.58977 -0.22489,0.1966 -0.506,0.32989 -0.84333,0.39988 l -1.012,0.21 c -0.33733,0.07 -0.61844,0.20328 -0.84333,0.39987 -0.22489,0.19659 -0.506,0.32988 -0.84333,0.39987 -0.33733,0.07 -0.73088,0.0767 -1.18066,0.0201 -0.44977,-0.0566 -0.89955,-0.11318 -1.349323,-0.16974 -0.449775,-0.0566 -0.843329,-0.16235 -1.180661,-0.31724 -0.337331,-0.15489 -0.569247,-0.41598 -0.695746,-0.78329 l -0.189749,-0.55097"
|
||||
id="path1134" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#ff0000;fill-opacity:1"
|
||||
d="m 101.6613,139.99364 0.50599,0.23235 c 0.33733,0.15489 0.506,0.34477 0.506,0.56966 0,0.22489 -0.16164,0.36619 -0.48491,0.4239 l -0.48492,0.0866 c 0.0234,0.16648 -0.53328,-0.11289 -0.71162,-0.0337 -0.73806,0.32779 -0.68181,-1.45805 -0.31617,-0.63988"
|
||||
id="path1135" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#aa0f01;fill-opacity:1"
|
||||
d="m 98.962644,137.63007 c 0.224888,-0.19659 0.505998,-0.32989 0.843329,-0.39988 0.337327,-0.07 0.674667,-0.0275 1.011997,0.12738 0.33733,0.1549 0.56222,0.40809 0.67466,0.75957 0.11245,0.35147 0.16867,0.7521 0.16867,1.20188 v 1.34932 c 0,0.44978 0.0562,0.85041 0.16866,1.20189 0.11245,0.35148 0.28111,0.65381 0.506,0.907 0.22489,0.25319 0.33733,0.49223 0.33733,0.71712 0,0.22489 -0.11244,0.43562 -0.33733,0.63221 -0.22489,0.19659 -0.33733,0.40732 -0.33733,0.63221 0,0.22489 0.11244,0.46393 0.33733,0.71712 0.22489,0.25319 0.33733,0.49222 0.33733,0.71711 0,0.22489 -0.11244,0.32318 -0.33733,0.29488 -0.22489,-0.0283 -0.44977,-0.16908 -0.67466,-0.42223 -0.22489,-0.25318 -0.44978,-0.39392 -0.67467,-0.42222 -0.22489,-0.0283 -0.44977,0.0558 -0.67466,0.25243 l -0.674663,0.58976 -0.674663,0.58978 c -0.224888,0.19659 -0.505998,0.32987 -0.843329,0.39986 -0.337332,0.07 -0.730886,0.0767 -1.180661,0.0201 -0.449775,-0.0566 -0.843329,-0.16234 -1.180661,-0.31723 -0.337332,-0.15489 -0.618442,-0.35893 -0.843329,-0.61212 -0.224888,-0.25318 -0.449776,-0.50637 -0.674664,-0.75956 -0.224887,-0.25319 -0.393553,-0.55552 -0.505997,-0.90701 -0.112444,-0.35147 -0.168666,-0.7521 -0.168666,-1.20188 0,-0.44977 0.05622,-0.83625 0.168666,-1.15944 0.112444,-0.32317 0.28111,-0.58306 0.505997,-0.77965 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58977 l 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58977 0.224887,-0.19659 0.449775,-0.39318 0.674663,-0.58977 l 0.674663,-0.58976 c 0.224888,-0.19659 0.449776,-0.39318 0.674664,-0.58977 l 0.674663,-0.58976"
|
||||
id="path1136" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#ff0000;fill-opacity:1"
|
||||
d="m 98.962644,138.9794 c 0.224888,-0.19659 0.449776,-0.28074 0.674663,-0.25244 0.224888,0.0283 0.337332,0.15493 0.337332,0.37978 0,0.22489 -0.112444,0.43562 -0.337332,0.63221 -0.224887,0.19659 -0.337331,0.40732 -0.337331,0.63221 0,0.22489 0.112444,0.46393 0.337331,0.71712 l 0.674663,0.75956 0.67466,0.75956 c 0.22489,0.25319 0.33734,0.49223 0.33734,0.71712 0,0.22489 -0.16867,0.37232 -0.506,0.44231 -0.80645,0.16734 -0.0911,0.0189 0.253,-0.0526 l -0.253,0.0526 c -0.16868,0.0351 -0.33733,0.0418 -0.506,0.0205 -0.067,-0.19237 -0.16867,-0.48465 -0.16867,-0.48465 -0.11253,-0.32331 -0.337327,-0.56251 -0.674658,-0.7174 l -0.505998,-0.23234 -0.168666,-0.52722 c -0.112444,-0.35148 -0.28111,-0.65381 -0.505997,-0.907 -0.224888,-0.25319 -0.337332,-0.49223 -0.337332,-0.71712 0,-0.22489 0.112444,-0.43562 0.337332,-0.63221 l 0.674663,-0.58976"
|
||||
id="path1137" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#720000;fill-opacity:1"
|
||||
d="m 98.962644,142.35294 0.505998,0.23211 c 0.337406,0.15477 0.562208,0.39403 0.674658,0.7174 l 0.16867,0.48505 c 0,0 -0.208,-0.0264 -0.318594,-0.0735 -0.07203,-0.0269 -0.142118,-0.0519 -0.206391,-0.0833 -0.337331,-0.15494 -0.543231,-0.39921 -0.655675,-0.75069"
|
||||
id="path1138" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#ff0000;fill-opacity:1"
|
||||
d="m 95.251995,142.56044 q 0,-0.33733 0.337332,-0.29488 0.337332,0.0425 0.337332,0.37978 0,0.33733 -0.337332,0.29488 -0.337332,-0.0425 -0.337332,-0.37978"
|
||||
id="path1139" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#aa0f01;fill-opacity:1"
|
||||
d="m 104.69728,143.749 q 0,-0.33733 0.33733,-0.29488 0.33734,0.0425 0.33734,0.37978 0,0.33733 -0.33734,0.29488 -0.33733,-0.0425 -0.33733,-0.37978"
|
||||
id="path1140" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#ff0000;fill-opacity:1"
|
||||
d="m 97.613317,144.2069 q 0.337332,-0.29488 0.674664,-0.25243 0.337331,0.0425 0.337331,0.37978 0,0.33734 -0.337331,0.63222 -0.337332,0.29488 -0.674664,0.58976 -0.337331,0.29488 -0.674663,0.25243 -0.337332,-0.0425 -0.337332,-0.37977 0,-0.33733 0.337332,-0.63222 0.337332,-0.29488 0.674663,-0.58977"
|
||||
id="path1141" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<rect
|
||||
style="display:none;opacity:1;fill:#404040;fill-opacity:1;stroke-width:8.34074;stroke-linejoin:round"
|
||||
id="rect4"
|
||||
width="111.20969"
|
||||
height="111.20969"
|
||||
x="5.8899391e-06"
|
||||
y="3.3410672e-06" />
|
||||
<g
|
||||
id="g4"
|
||||
style="display:inline"
|
||||
transform="translate(-43.988069,-70.819257)">
|
||||
<path
|
||||
id="path16"
|
||||
style="display:none;opacity:1;fill:#ffffff;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 103.81913,95.103806 56.291647,122.60634 8.7641612,95.10381 8.764161,40.09874 56.291647,12.596207 103.81913,40.09874 Z"
|
||||
transform="matrix(1.184402,0,0,1.1817093,37.251106,45.114943)" />
|
||||
<path
|
||||
style="display:none;opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 51.961523,99.999997 43.301269,105 v 55 l 47.631396,27.49999 8.660254,-5 L 51.961527,155 Z"
|
||||
id="path24" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#c19053;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 56.29165,110.5 8.660253,-5.00001 v 31.80263 L 56.29165,152.5 Z"
|
||||
id="path23" />
|
||||
<path
|
||||
id="path19"
|
||||
style="display:none;opacity:1;fill:#5886f0;fill-opacity:1;stroke-width:6.00629;stroke-linejoin:round"
|
||||
d="m 151.55444,152.49999 -47.63139,27.5 -47.6314,-27.5 V 97.499997 l 47.6314,-27.499998 47.63139,27.499998 z" />
|
||||
<path
|
||||
id="path20"
|
||||
style="display:inline;opacity:1;fill:#d29463;fill-opacity:1;stroke-width:4.91424;stroke-linejoin:round"
|
||||
d="M 142.89419,147.5 103.92305,170 64.951901,147.5 v -45 L 103.92305,79.999998 142.89419,102.5 Z" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#c37954;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 64.9519,102.5 3e-6,44.99999 38.971137,22.5 v -45 z"
|
||||
id="path4" />
|
||||
<g
|
||||
id="g36"
|
||||
style="display:inline;opacity:0.286449">
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#f1e1c8;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 95.262781,130 -21.65063,-12.5 v 24.99999 l 21.65063,12.5 z"
|
||||
id="path37" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 103.05702,130.5 -4.330135,-7.5 -7.79423,4.49999 4.33013,2.50001 v 5 z"
|
||||
id="path33" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 77.942275,119.99999 70.148045,106.5 l -4.33012,2.5 7.79423,13.49999 V 117.5 Z"
|
||||
id="path34" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 65.817925,142 4.33012,7.5 7.79423,-4.50001 -4.33012,-2.5 V 137.5 Z"
|
||||
id="path35" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 95.262785,149.99999 7.794235,13.50001 -4.330135,2.5 -7.79423,-13.50001 4.33013,2.5 z"
|
||||
id="path36" />
|
||||
</g>
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#edca55;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 56.29165,110.5 43.301273,25 v 15 l -4.330127,2.5 -4e-6,22 -38.971142,-22.5 z"
|
||||
id="path22" />
|
||||
<g
|
||||
id="g10"
|
||||
style="display:none">
|
||||
<path
|
||||
style="opacity:1;fill:#c37954;fill-opacity:1;stroke-width:3.75001;stroke-linejoin:round"
|
||||
d="M 113.44932,158.49999 118.64548,155.5 v -4 l 10.3923,-6 v 3.99999 L 134.23393,146.5 v -10 l -5.19615,3 v -7 l -10.3923,6 v 7 l -5.19068,3 z"
|
||||
id="path8" />
|
||||
<path
|
||||
style="opacity:1;fill:#c37954;fill-opacity:1;stroke-width:3.75001;stroke-linejoin:round"
|
||||
d="m 118.64548,138.5 v -12 l -11.25833,6.5 v 12 z"
|
||||
id="path9" />
|
||||
<path
|
||||
style="opacity:1;fill:#c37954;fill-opacity:1;stroke-width:3.75001;stroke-linejoin:round"
|
||||
d="m 129.03778,132.5 v -12 l 10.39231,-6 v 12 z"
|
||||
id="path10" />
|
||||
</g>
|
||||
<g
|
||||
id="g32">
|
||||
<path
|
||||
style="opacity:1;fill:#f1e1c8;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 112.5833,130 21.65063,-12.5 v 24.99999 l -21.65063,12.5 z"
|
||||
id="path11" />
|
||||
<path
|
||||
style="opacity:1;fill:#d87c7c;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 122.10958,135.49999 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path12" />
|
||||
<path
|
||||
style="opacity:1;fill:#edca55;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 116.91343,138.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path13" />
|
||||
<path
|
||||
style="opacity:1;fill:#c94b4b;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 127.30573,132.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path14" />
|
||||
<path
|
||||
style="opacity:1;fill:#ae3535;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 122.10958,129.49999 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path15" />
|
||||
<path
|
||||
style="opacity:1;fill:#ce5e5e;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 116.91343,132.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path17" />
|
||||
<path
|
||||
style="opacity:1;fill:#31a252;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 127.30573,126.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path25" />
|
||||
<path
|
||||
style="opacity:1;fill:#59c94b;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 122.10958,141.49999 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path26" />
|
||||
<path
|
||||
style="opacity:1;fill:#c94b4b;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 116.91343,144.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path27" />
|
||||
<path
|
||||
style="opacity:1;fill:#c9764b;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 127.30573,138.5 2.59807,-1.5 v 3 l -2.59807,1.5 z"
|
||||
id="path28" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 104.78907,130.5 4.33013,-7.5 7.79423,4.49999 L 112.5833,130 v 5 z"
|
||||
id="path29" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 129.90381,119.99999 7.79423,-13.49999 4.33012,2.5 -7.79423,13.49999 V 117.5 Z"
|
||||
id="path30" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 142.02816,142 -4.33012,7.5 -7.79423,-4.50001 4.33012,-2.5 V 137.5 Z"
|
||||
id="path31" />
|
||||
<path
|
||||
style="opacity:1;fill:#daa488;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 112.5833,149.99999 -7.79423,13.50001 4.33013,2.5 7.79423,-13.50001 -4.33013,2.5 z"
|
||||
id="path32" />
|
||||
</g>
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#f1e1c8;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 119.5115,88.999997 7.79423,4.5 L 88.33459,116 v 10 l -7.79423,-4.5 v -10 z"
|
||||
id="path21" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#dcc5a5;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 88.33459,116 v 10 l -7.79423,-4.5 v -10 z"
|
||||
id="path5" />
|
||||
</g>
|
||||
<g
|
||||
id="g3"
|
||||
style="display:none"
|
||||
transform="translate(-43.988069,-70.819257)">
|
||||
<path
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 103.92304,79.999998 119.5115,88.999996 80.540359,111.5 l 1e-6,5 -15.588457,-9 v -5.00001 z"
|
||||
id="path1" />
|
||||
<path
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="m 88.334589,121 -2e-6,-5.00001 38.971143,-22.499993 15.58846,8.999993 v 45 l -38.97115,22.5 L 100.45894,168 v -16 l 3.46411,-2 v -20 z"
|
||||
id="path2" />
|
||||
<path
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:6.00001;stroke-linejoin:round"
|
||||
d="M 95.262792,175 56.29165,151.5 v -44 l 43.301267,25 v 14.99999 l -4.330126,2.5 z"
|
||||
id="path3" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 41 KiB |
@@ -0,0 +1,25 @@
|
||||
# Libraries Used
|
||||
|
||||
Datapack IDE relies on the following software:
|
||||
|
||||
| Software | License | Included In Jar |
|
||||
|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|-----------------|
|
||||
| [GSON](https://github.com/google/gson) | [Apache 2.0](https://github.com/google/gson/blob/master/LICENSE) | |
|
||||
| [Fabric API](https://github.com/FabricMC/fabric) | [Apache 2.0](https://github.com/FabricMC/fabric/blob/1.21.6/LICENSE) | |
|
||||
| [Fabric Language Kotlin](https://github.com/FabricMC/fabric-language-kotlin/) | [Apache 2.0](https://github.com/FabricMC/fabric-language-kotlin/blob/master/LICENSE) | |
|
||||
| [Fabric Loom](https://github.com/FabricMC/fabric-loom) | [MIT](https://github.com/FabricMC/fabric-loom/blob/dev/1.10/LICENSE) | |
|
||||
| [DevAuth](https://github.com/DJtheRedstoner/DevAuth) | [MIT](https://github.com/DJtheRedstoner/DevAuth/blob/master/LICENSE) | |
|
||||
| [JavaFX](https://openjfx.io/) | [GPL v2 with Classpath Exception](https://openjdk.org/legal/gplv2+ce.html) | ✅ |
|
||||
| [AtlantaFX](https://github.com/mkpaz/atlantafx) | [MIT](https://github.com/mkpaz/atlantafx/blob/master/LICENSE) | ✅ |
|
||||
| [Ikonli](https://github.com/kordamp/ikonli/) | [Apache 2.0](https://github.com/kordamp/ikonli/blob/master/LICENSE) | ✅ |
|
||||
| [Material2](https://github.com/material-icons/material-icons-font) | [Apache 2.0](https://github.com/material-icons/material-icons-font/blob/master/LICENSE) | ✅ |
|
||||
| [Feather](https://github.com/feathericons/feather/) | [Apache 2.0](https://github.com/feathericons/feather/blob/main/LICENSE) | ✅ |
|
||||
| [RichTextFX](https://github.com/FXMisc/RichTextFX/) | [BSD 2-Clause](https://github.com/FXMisc/RichTextFX/blob/master/LICENSE) | ✅ |
|
||||
| [Flowless](https://github.com/FXMisc/Flowless) | [BSD 2-Clause](https://github.com/FXMisc/Flowless/blob/master/LICENSE) | ✅ |
|
||||
| [ReactFX](https://github.com/TomasMikula/ReactFX) | [BSD 2-Clause](https://github.com/TomasMikula/ReactFX/blob/master/LICENSE) | ✅ |
|
||||
| [UndoFX](https://github.com/FXMisc/UndoFX) | [BSD 2-Clause](https://github.com/FXMisc/UndoFX/blob/master/LICENSE) | ✅ |
|
||||
| [WellBehavedFX](https://github.com/FXMisc/WellBehavedFX) | [BSD 2-Clause](https://github.com/FXMisc/WellBehavedFX/blob/master/LICENSE) | ✅ |
|
||||
| [Stonecutter](https://stonecutter.kikugie.dev/) | [LGPL-3.0](https://codeberg.org/stonecutter/stonecutter/src/branch/0.7/LICENSE) | |
|
||||
| [Directory Watcher](https://github.com/gmethvin/directory-watcher) | [Apache 2.0](https://github.com/gmethvin/directory-watcher/blob/main/LICENSE) | ✅ |
|
||||
| [JSVG](https://github.com/weisJ/jsvg) | [MIT](https://github.com/weisJ/jsvg/blob/master/LICENSE) | ✅ |
|
||||
| [Jackson Core](https://github.com/FasterXML/jackson-core/) | [Apache 2.0](https://github.com/FasterXML/jackson-core/blob/2.x/LICENSE) | ✅ |
|
||||
@@ -0,0 +1,15 @@
|
||||
org.gradle.jvmargs=-Xmx4G
|
||||
org.gradle.parallel=true
|
||||
|
||||
loom.platform=fabric
|
||||
maven_group=io.github.frostzie.nodex
|
||||
archives_base_name=Nodex
|
||||
|
||||
# Mod properties
|
||||
mod.version=0.0.2
|
||||
mod.group=io.github.frostzie.nodex
|
||||
mod.id=nodex
|
||||
mod.name=Nodex
|
||||
|
||||
deps.fabric_loader = 0.18.1
|
||||
deps.fabric_kotlin = 1.13.4+kotlin.2.2.0
|
||||
@@ -0,0 +1,38 @@
|
||||
[versions]
|
||||
kotlin = "2.1.0"
|
||||
fabric_kotlin = "1.13.4+kotlin.2.2.0"
|
||||
devauth = "1.2.1"
|
||||
javafxapp = "21.0.8"
|
||||
javafx_plugin = "0.1.0"
|
||||
atlantafx-base = "2.1.0"
|
||||
ikonli = "12.4.0"
|
||||
richTextFXv = "0.11.6"
|
||||
flowlessv = "0.7.4"
|
||||
reactFXv = "2.0-M5"
|
||||
undoFXv = "2.1.1"
|
||||
wellbehavedFXv = "0.3.3"
|
||||
directoryWatcherV = "0.19.1"
|
||||
jsvgV = "2.0.0"
|
||||
jacksonCoreV = "2.17.1"
|
||||
|
||||
[libraries]
|
||||
fabric_kotlin = { module = "net.fabricmc:fabric-language-kotlin", version.ref = "fabric_kotlin" }
|
||||
devauth = { module = "me.djtheredstoner:DevAuth-fabric", version.ref = "devauth" }
|
||||
|
||||
jacksonCore = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jacksonCoreV" }
|
||||
directoryWatcher = { module = "io.methvin:directory-watcher", version.ref = "directoryWatcherV" }
|
||||
jsvg = { module = "com.github.weisj:jsvg", version.ref = "jsvgV" }
|
||||
richTextFX = { module = "org.fxmisc.richtext:richtextfx", version.ref = "richTextFXv"}
|
||||
flowless = { module = "org.fxmisc.flowless:flowless", version.ref = "flowlessv" }
|
||||
reactFX = { module = "org.reactfx:reactfx", version.ref = "reactFXv" }
|
||||
undofx = { module = "org.fxmisc.undo:undofx", version.ref = "undoFXv" }
|
||||
wellbehavedfx = { module = "org.fxmisc.wellbehaved:wellbehavedfx", version.ref = "wellbehavedFXv" }
|
||||
atlantaFX = { module = "io.github.mkpaz:atlantafx-base", version.ref = "atlantafx-base" }
|
||||
ikonliJavaFX = { module = "org.kordamp.ikonli:ikonli-javafx", version.ref = "ikonli"}
|
||||
ikonliCore = { module = "org.kordamp.ikonli:ikonli-core", version.ref = "ikonli"}
|
||||
material2 = { module = "org.kordamp.ikonli:ikonli-material2-pack", version.ref = "ikonli"}
|
||||
feather = { module = "org.kordamp.ikonli:ikonli-feather-pack", version.ref = "ikonli"}
|
||||
|
||||
[plugins]
|
||||
kotlin_jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
javafx = { id = "org.openjfx.javafxplugin", version.ref = "javafx_plugin" }
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
Vendored
+251
@@ -0,0 +1,251 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+94
@@ -0,0 +1,94 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,25 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven("https://maven.fabricmc.net")
|
||||
maven("https://maven.quiltmc.org/repository/release")
|
||||
maven("https://maven.kikugie.dev/snapshots")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
plugins {
|
||||
id("dev.kikugie.stonecutter") version "0.7.11"
|
||||
}
|
||||
|
||||
stonecutter {
|
||||
kotlinController = true
|
||||
centralScript = "build.gradle.kts"
|
||||
shared {
|
||||
versions("1.21.8", "1.21.10")
|
||||
}
|
||||
create(rootProject)
|
||||
}
|
||||
|
||||
rootProject.name = "Nodex"
|
||||
@@ -0,0 +1,109 @@
|
||||
package io.github.frostzie.nodex;
|
||||
|
||||
// Taken from https://github.com/iliareshetov/rich-json-fx/blob/main/src/main/java/com/github/iliareshetov/RichJsonFX.java
|
||||
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import org.fxmisc.richtext.CodeArea;
|
||||
import org.fxmisc.richtext.model.StyleSpans;
|
||||
import org.fxmisc.richtext.model.StyleSpansBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
public class RichJsonFX {
|
||||
private final JsonFactory jsonFactory;
|
||||
|
||||
public RichJsonFX() {
|
||||
jsonFactory = new JsonFactory();
|
||||
}
|
||||
|
||||
public static String jsonTokenToClassName(JsonToken jsonToken) {
|
||||
if (jsonToken == null) {
|
||||
return "";
|
||||
}
|
||||
return switch (jsonToken) {
|
||||
case FIELD_NAME -> "json-property";
|
||||
case VALUE_STRING -> "json-string";
|
||||
case START_OBJECT -> "json-start-object";
|
||||
case END_OBJECT -> "json-end-object";
|
||||
case VALUE_NUMBER_FLOAT -> "json-float";
|
||||
case VALUE_NUMBER_INT -> "json-int";
|
||||
case VALUE_TRUE -> "json-true";
|
||||
case VALUE_FALSE -> "json-false";
|
||||
case START_ARRAY -> "json-start-array";
|
||||
case END_ARRAY -> "json-end-array";
|
||||
case VALUE_EMBEDDED_OBJECT -> "json-embedded";
|
||||
case VALUE_NULL -> "json-null";
|
||||
default -> "";
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Highlights json by applying styles to different tokens.
|
||||
*
|
||||
* @param json The json to be highlighted.
|
||||
* @return StyleSpans containing the highlighted tokens.
|
||||
*/
|
||||
public StyleSpans<Collection<String>> highlight(String json) throws IOException {
|
||||
List<Match> matches = new ArrayList<>();
|
||||
|
||||
JsonParser parser = jsonFactory.createParser(json);
|
||||
while (!parser.isClosed()) {
|
||||
JsonToken jsonToken = parser.nextToken();
|
||||
int start = (int) parser.currentTokenLocation().getCharOffset();
|
||||
int end = start + parser.getTextLength();
|
||||
|
||||
// add surrounding ""
|
||||
if (jsonToken == JsonToken.VALUE_STRING || jsonToken == JsonToken.FIELD_NAME) {
|
||||
end += 2;
|
||||
}
|
||||
|
||||
String className = jsonTokenToClassName(jsonToken);
|
||||
if (!className.isEmpty()) {
|
||||
matches.add(new Match(className, start, end));
|
||||
}
|
||||
}
|
||||
|
||||
StyleSpansBuilder<Collection<String>> spansBuilder = new StyleSpansBuilder<>();
|
||||
int lastPos = 0;
|
||||
for (Match match : matches) {
|
||||
if (match.start() > lastPos) {
|
||||
spansBuilder.add(Collections.emptyList(), match.start() - lastPos);
|
||||
}
|
||||
|
||||
spansBuilder.add(Collections.singleton(match.kind()), match.end() - match.start());
|
||||
lastPos = match.end();
|
||||
}
|
||||
|
||||
if (lastPos < json.length()) {
|
||||
spansBuilder.add(Collections.emptyList(), json.length() - lastPos);
|
||||
}
|
||||
|
||||
return spansBuilder.create();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to highlight JSON in a CodeArea.
|
||||
*
|
||||
* @param codeArea the CodeArea containing JSON text.
|
||||
*/
|
||||
public void highlightCodeArea(CodeArea codeArea) throws IOException {
|
||||
String text = codeArea.getText();
|
||||
if (text != null && !text.isEmpty()) {
|
||||
StyleSpans<Collection<String>> highlighting = highlight(text);
|
||||
codeArea.setStyleSpans(0, highlighting);
|
||||
}
|
||||
}
|
||||
|
||||
public record Match(String kind, int start, int end) implements Comparable<Match> {
|
||||
|
||||
@Override
|
||||
public int compareTo(Match match) {
|
||||
return Integer.compare(start, match.start);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package io.github.frostzie.nodex.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||
import com.mojang.brigadier.tree.CommandNode;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
// Taken from Firmament
|
||||
@Mixin(value = CommandNode.class, remap = false)
|
||||
public class CaseInsensitiveCommandMapMixin<S> {
|
||||
@WrapOperation(
|
||||
method = "getRelevantNodes",
|
||||
at = @At(value = "INVOKE", target = "Ljava/util/Map;get(Ljava/lang/Object;)Ljava/lang/Object;"),
|
||||
remap = false
|
||||
)
|
||||
public Object modifyCommandLookup(Map map, Object text, Operation<Object> op) {
|
||||
var original = op.call(map, text);
|
||||
if (original == null && text instanceof String) {
|
||||
return map.get(((String) text).toLowerCase(Locale.ROOT));
|
||||
}
|
||||
return original;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package io.github.frostzie.nodex.mixin;
|
||||
|
||||
import io.github.frostzie.nodex.screen.MainApplication;
|
||||
import io.github.frostzie.nodex.settings.categories.MinecraftConfig;
|
||||
import io.github.frostzie.nodex.utils.JavaFXInitializer;
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider;
|
||||
import net.minecraft.client.gui.screens.PauseScreen;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(PauseScreen.class)
|
||||
public abstract class PauseScreenMixin extends Screen {
|
||||
|
||||
@Unique
|
||||
private final @NotNull Logger logger = LoggerProvider.INSTANCE.getLogger("PauseScreenMixin");
|
||||
protected PauseScreenMixin() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
@Inject(method = "init", at = @At("TAIL"))
|
||||
private void onInit(CallbackInfo ci) {
|
||||
if (!MinecraftConfig.INSTANCE.getOnScreenButton().get()) {
|
||||
return;
|
||||
}
|
||||
|
||||
PauseScreen self = (PauseScreen)(Object)this;
|
||||
|
||||
Button button = Button.builder(Component.literal("IDE"), b -> {
|
||||
if (JavaFXInitializer.INSTANCE.isJavaFXAvailable()) {
|
||||
MainApplication.Companion.showMainWindow();
|
||||
} else {
|
||||
logger.error("Cannot open IDE window - JavaFX is not available");
|
||||
}
|
||||
}).bounds(self.width / 2 + 72, self.height / 4 - 16, 30, 20).build();
|
||||
|
||||
this.addRenderableWidget(button);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package io.github.frostzie.nodex.mixin;
|
||||
|
||||
import io.github.frostzie.nodex.screen.MainApplication;
|
||||
import io.github.frostzie.nodex.settings.categories.MinecraftConfig;
|
||||
import io.github.frostzie.nodex.utils.JavaFXInitializer;
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.client.gui.screens.TitleScreen;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(TitleScreen.class)
|
||||
public abstract class TitleScreenMixin extends Screen {
|
||||
|
||||
@Unique
|
||||
private final @NotNull Logger logger = LoggerProvider.INSTANCE.getLogger("TitleScreenMixin");
|
||||
protected TitleScreenMixin() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
@Inject(method = "init", at = @At("TAIL"))
|
||||
private void onInit(CallbackInfo ci) {
|
||||
if (!MinecraftConfig.INSTANCE.getOnScreenButton().get()) {
|
||||
return;
|
||||
}
|
||||
|
||||
TitleScreen self = (TitleScreen)(Object)this;
|
||||
|
||||
Button button = Button.builder(Component.literal("IDE"), b -> {
|
||||
if (JavaFXInitializer.INSTANCE.isJavaFXAvailable()) {
|
||||
MainApplication.Companion.showMainWindow();
|
||||
} else {
|
||||
logger.error("Cannot open IDE window - JavaFX is not available");
|
||||
}
|
||||
}).bounds(self.width / 2 + 128, self.height / 4 + 132, 30, 20).build();
|
||||
|
||||
this.addRenderableWidget(button);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package io.github.frostzie.nodex.svg_icon;
|
||||
|
||||
public class SVGException extends RuntimeException {
|
||||
|
||||
public SVGException() {
|
||||
}
|
||||
|
||||
public SVGException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public SVGException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package io.github.frostzie.nodex.svg_icon;
|
||||
|
||||
import com.github.weisj.jsvg.SVGDocument;
|
||||
import com.github.weisj.jsvg.parser.LoaderContext;
|
||||
import com.github.weisj.jsvg.parser.SVGLoader;
|
||||
import com.github.weisj.jsvg.view.ViewBox;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.PixelFormat;
|
||||
import javafx.scene.image.PixelWriter;
|
||||
import javafx.scene.image.WritableImage;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.DataBufferInt;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.Objects;
|
||||
|
||||
public class SVGImage {
|
||||
|
||||
// should be either TYPE_INT_ARGB or TYPE_INT_ARGB_PRE,
|
||||
// otherwise SwingFXUtils.toFXImage() will convert it to the TYPE_INT_ARGB_PRE
|
||||
public static final int BUFFERED_IMAGE_TYPE = BufferedImage.TYPE_INT_ARGB_PRE;
|
||||
|
||||
protected final SVGDocument svgDocument;
|
||||
|
||||
protected SVGImage(SVGDocument svgDocument) {
|
||||
this.svgDocument = svgDocument;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return (int) svgDocument.size().getWidth();
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return (int) svgDocument.size().getHeight();
|
||||
}
|
||||
|
||||
public BufferedImage toBufferedImage(int width, int height) {
|
||||
var image = new BufferedImage(width, height, BUFFERED_IMAGE_TYPE);
|
||||
|
||||
Graphics2D graphics = image.createGraphics();
|
||||
graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
graphics.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
||||
graphics.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
|
||||
|
||||
svgDocument.render(null, graphics, new ViewBox(width, height));
|
||||
graphics.dispose();
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// Removed SwingFXUtils usage here - Frostzie
|
||||
public Image toImage(int width, int height) {
|
||||
BufferedImage bufferedImage = toBufferedImage(width, height);
|
||||
WritableImage wr = new WritableImage(width, height);
|
||||
PixelWriter pw = wr.getPixelWriter();
|
||||
int[] data = ((DataBufferInt) bufferedImage.getRaster().getDataBuffer()).getData();
|
||||
pw.setPixels(0, 0, width, height, PixelFormat.getIntArgbPreInstance(), data, 0, width);
|
||||
return wr;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
|
||||
public static SVGImage of(ImageInputStream input) throws IOException {
|
||||
var loader = new SVGLoader();
|
||||
|
||||
var bos = new ByteArrayOutputStream();
|
||||
var buf = new byte[8192];
|
||||
|
||||
int bytesRead;
|
||||
while ((bytesRead = input.read(buf)) != -1) {
|
||||
bos.write(buf, 0, bytesRead);
|
||||
}
|
||||
|
||||
var svgDocument = loader.load(
|
||||
new ByteArrayInputStream(bos.toByteArray()), null, LoaderContext.createDefault()
|
||||
);
|
||||
|
||||
Objects.requireNonNull(svgDocument, "Unable to read SVG from ImageInputStream");
|
||||
|
||||
return new SVGImage(svgDocument);
|
||||
}
|
||||
|
||||
public static SVGImage of(InputStream input) throws IOException {
|
||||
var loader = new SVGLoader();
|
||||
|
||||
var svgDocument = loader.load(
|
||||
input, null, LoaderContext.createDefault()
|
||||
);
|
||||
|
||||
Objects.requireNonNull(svgDocument, "Unable to read SVG from InputStream");
|
||||
|
||||
return new SVGImage(svgDocument);
|
||||
}
|
||||
|
||||
public static SVGImage of(URL url) {
|
||||
var svgDocument = new SVGLoader().load(url);
|
||||
|
||||
Objects.requireNonNull(svgDocument, "Unable to read SVG from URL");
|
||||
|
||||
return new SVGImage(svgDocument);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package io.github.frostzie.nodex.svg_icon;
|
||||
|
||||
import javax.imageio.ImageReadParam;
|
||||
import javax.imageio.ImageReader;
|
||||
import javax.imageio.ImageTypeSpecifier;
|
||||
import javax.imageio.metadata.IIOMetadata;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
|
||||
|
||||
public class SVGImageReader extends ImageReader {
|
||||
|
||||
protected SVGImage svgImage;
|
||||
|
||||
protected SVGImageReader(SVGImageReaderSpi spi) {
|
||||
super(spi);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumImages(boolean allowSearch) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWidth(int imageIndex) {
|
||||
return svgImage != null ? svgImage.getWidth() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeight(int imageIndex) {
|
||||
return svgImage != null ? svgImage.getHeight() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) {
|
||||
return Collections.singletonList(
|
||||
ImageTypeSpecifier.createFromBufferedImageType(SVGImage.BUFFERED_IMAGE_TYPE)
|
||||
).iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIOMetadata getStreamMetadata() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIOMetadata getImageMetadata(int imageIndex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BufferedImage read(int imageIndex, ImageReadParam param) {
|
||||
Dimension size = null;
|
||||
|
||||
if (param != null) {
|
||||
size = param.getSourceRenderSize();
|
||||
}
|
||||
|
||||
if (size == null) {
|
||||
size = new Dimension(getWidth(imageIndex), getHeight(imageIndex));
|
||||
}
|
||||
|
||||
if (svgImage == null) {
|
||||
throw new SVGException("You must set input before reading the image");
|
||||
}
|
||||
|
||||
return svgImage.toBufferedImage((int) size.getWidth(), (int) size.getHeight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata) {
|
||||
super.setInput(input, true, true);
|
||||
|
||||
try {
|
||||
if (input instanceof ImageInputStream iis) {
|
||||
svgImage = SVGImage.of(iis);
|
||||
} else {
|
||||
throw new SVGException("Unexpected input type: " + input.getClass().getCanonicalName());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new SVGException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImageReadParam getDefaultReadParam() {
|
||||
return new SVGImageReadParam();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
svgImage = null;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
|
||||
protected static final class SVGImageReadParam extends ImageReadParam {
|
||||
|
||||
@Override
|
||||
public boolean canSetSourceRenderSize() {
|
||||
// Image cannot be adjusted to the available frame size here
|
||||
// https://mail.openjdk.org/pipermail/openjfx-dev/2025-July/055365.html
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package io.github.frostzie.nodex.svg_icon;
|
||||
|
||||
import javax.imageio.ImageReader;
|
||||
import javax.imageio.spi.ImageReaderSpi;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
|
||||
public class SVGImageReaderSpi extends ImageReaderSpi {
|
||||
|
||||
protected static final String[] FORMAT_NAMES = {"svg", "SVG"};
|
||||
protected static final String[] EXTENSIONS = {"svg"};
|
||||
protected static final String[] MIME_TYPES = {"image/svg", "image/x-svg", "image/svg+xml", "image/svg-xml"};
|
||||
|
||||
public SVGImageReaderSpi() {
|
||||
super(
|
||||
"jsvgfx",
|
||||
"1.0",
|
||||
FORMAT_NAMES,
|
||||
EXTENSIONS,
|
||||
MIME_TYPES,
|
||||
"jsvgfx.SVGImageReader",
|
||||
new Class<?>[]{ImageInputStream.class},
|
||||
null,
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription(Locale locale) {
|
||||
return "Scalable Vector Graphics (SVG) format image reader";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDecodeInput(Object input) throws IOException {
|
||||
return input instanceof ImageInputStream iis && canDecode(iis);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImageReader createReaderInstance(Object extension) {
|
||||
return new SVGImageReader(this);
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
|
||||
@SuppressWarnings("StatementWithEmptyBody")
|
||||
protected boolean canDecode(ImageInputStream iis) throws IOException {
|
||||
try {
|
||||
iis.mark();
|
||||
|
||||
int b;
|
||||
while (Character.isWhitespace((char) (b = iis.read()))) {
|
||||
// skip leading whitespaces
|
||||
}
|
||||
|
||||
return b == '<';
|
||||
} catch (EOFException ignore) {
|
||||
return false;
|
||||
} finally {
|
||||
iis.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package io.github.frostzie.nodex.svg_icon;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.transform.OutputKeys;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
import javax.xml.xpath.XPath;
|
||||
import javax.xml.xpath.XPathConstants;
|
||||
import javax.xml.xpath.XPathExpressionException;
|
||||
import javax.xml.xpath.XPathFactory;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.StringWriter;
|
||||
|
||||
public class SVGTransformer {
|
||||
|
||||
public static final String SVG_WIDTH_EXPR = "/svg/@width";
|
||||
public static final String SVG_HEIGHT_EXPR = "/svg/@height";
|
||||
|
||||
protected final XPath xPath = XPathFactory.newInstance().newXPath();
|
||||
protected final Document document;
|
||||
|
||||
public SVGTransformer(String path) {
|
||||
try {
|
||||
var builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
||||
document = builder.parse(path);
|
||||
} catch (Exception e) {
|
||||
throw new SVGException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
public SVGTransformer setWidth(int width) {
|
||||
return setNodeValue(SVG_WIDTH_EXPR, String.valueOf(width));
|
||||
}
|
||||
|
||||
public SVGTransformer setHeight(int height) {
|
||||
return setNodeValue(SVG_HEIGHT_EXPR, String.valueOf(height));
|
||||
}
|
||||
|
||||
public SVGTransformer setNodeValue(String xpathExpression, String value) {
|
||||
try {
|
||||
var nodes = (NodeList) xPath.evaluate(xpathExpression, document, XPathConstants.NODESET);
|
||||
for (int i = 0; i < nodes.getLength(); i++) {
|
||||
nodes.item(i).setNodeValue(value);
|
||||
}
|
||||
} catch (XPathExpressionException e) {
|
||||
throw new SVGException(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public InputStream toInputStream() {
|
||||
try {
|
||||
var transformer = TransformerFactory.newInstance().newTransformer();
|
||||
|
||||
try (var bos = new ByteArrayOutputStream()) {
|
||||
var result = new StreamResult(bos);
|
||||
transformer.transform(new DOMSource(document), result);
|
||||
|
||||
return new ByteArrayInputStream(bos.toByteArray());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new SVGException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
try {
|
||||
var transformer = TransformerFactory.newInstance().newTransformer();
|
||||
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
|
||||
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
|
||||
transformer.setOutputProperty(OutputKeys.METHOD, "xml");
|
||||
|
||||
var writer = new StringWriter();
|
||||
transformer.transform(new DOMSource(document), new StreamResult(writer));
|
||||
|
||||
return writer.getBuffer().toString();
|
||||
} catch (Exception e) {
|
||||
throw new SVGException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
The classes inside package (`io.github.frostzie.nodex.svg_icon`) are from **jsvgfx** by **mkpaz** slightly modified by Frostzie <br>
|
||||
|
||||
### Original Source
|
||||
- **Repository:** https://github.com/mkpaz/jsvgfx/
|
||||
- **License:** [MIT](https://github.com/mkpaz/jsvgfx/blob/master/LICENSE)
|
||||
|
||||
### Original README.md:
|
||||
|
||||
A simple project demonstrating loading SVG images with [jsvg](https://github.com/weisJ/jsvg)
|
||||
and JavaFX [pluggable image loading](https://bugs.openjdk.org/browse/JDK-8306707) via javax.imageio.
|
||||
|
||||
To run the demo:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/mkpaz/jsvgfx
|
||||
cd jsvgfx
|
||||
|
||||
# if your system JVM version < 24
|
||||
JAVA_HOME=/path/to/jdk/24
|
||||
|
||||
./mvnw javafx:run
|
||||
```
|
||||
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/mkpaz/jsvgfx/master/.screenshots/readme.png" alt=""/>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package io.github.frostzie.nodex
|
||||
|
||||
import io.github.frostzie.nodex.ingame.DefaultCommands
|
||||
import io.github.frostzie.nodex.config.ConfigManager
|
||||
import io.github.frostzie.nodex.loader.fabric.Keybinds
|
||||
import io.github.frostzie.nodex.modules.universal.UniversalWorldIntegration
|
||||
import io.github.frostzie.nodex.screen.MainApplication
|
||||
import io.github.frostzie.nodex.settings.SettingsLoader
|
||||
import io.github.frostzie.nodex.utils.JavaFXInitializer
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import net.fabricmc.api.ModInitializer
|
||||
|
||||
class Nodex : ModInitializer {
|
||||
private val logger = LoggerProvider.getLogger("Nodex")
|
||||
|
||||
override fun onInitialize() {
|
||||
System.setProperty("javafx.allowSystemPropertiesAccess", "true")
|
||||
System.setProperty("javafx.platform", "desktop")
|
||||
|
||||
if (JavaFXInitializer.isJavaFXAvailable()) {
|
||||
logger.info("Pre-initializing JavaFX platform...")
|
||||
MainApplication.initializeJavaFX()
|
||||
} else {
|
||||
logger.warn("JavaFX is not available - GUI features will be disabled")
|
||||
}
|
||||
|
||||
ConfigManager.initialize() // Loads config file management and Layout system and Workspace data
|
||||
SettingsLoader.initialize() // Loads settings and their builder and universal logic
|
||||
DefaultCommands.registerCommands() // Loads commands
|
||||
Keybinds.register() // Loads Minecraft (Fabric) keybinds
|
||||
UniversalWorldIntegration.initialize() // Loads world detection for universal datapacks
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package io.github.frostzie.nodex.config
|
||||
|
||||
import com.google.gson.GsonBuilder
|
||||
import io.github.frostzie.nodex.loader.fabric.Folders
|
||||
import io.github.frostzie.nodex.project.WorkspaceManager
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import java.io.FileReader
|
||||
import java.io.FileWriter
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import java.nio.file.Paths
|
||||
import kotlin.io.path.exists
|
||||
|
||||
/**
|
||||
* The Main configuration manager for DataPack IDE
|
||||
* Handles initialization and management of all config subsystems
|
||||
*/
|
||||
object ConfigManager {
|
||||
|
||||
private val logger = LoggerProvider.getLogger("ConfigManager")
|
||||
private val gson = GsonBuilder().setPrettyPrinting().create()
|
||||
|
||||
// The default configuration dir
|
||||
private val defaultConfigDir: Path = Folders.configDir.resolve("nodex")
|
||||
|
||||
// File that determines the actual config location
|
||||
private val locationFile: Path = defaultConfigDir.resolve("config_location.json")
|
||||
|
||||
// The active configuration directory
|
||||
private var _configDir: Path? = null
|
||||
val configDir: Path
|
||||
get() {
|
||||
if (_configDir == null) _configDir = resolveConfigDir()
|
||||
return _configDir!!
|
||||
}
|
||||
|
||||
private data class LocationConfig(var customConfigPath: String? = null)
|
||||
|
||||
private fun resolveConfigDir(): Path {
|
||||
// Ensure the default directory exists so we can read/write the locationFile
|
||||
if (!defaultConfigDir.exists()) {
|
||||
defaultConfigDir.toFile().mkdirs()
|
||||
}
|
||||
|
||||
if (locationFile.exists()) {
|
||||
try {
|
||||
FileReader(locationFile.toFile()).use { reader ->
|
||||
val config = gson.fromJson(reader, LocationConfig::class.java)
|
||||
if (!config.customConfigPath.isNullOrBlank()) {
|
||||
val customPath = Paths.get(config.customConfigPath!!)
|
||||
logger.debug("Using custom config directory: {}", customPath)
|
||||
return customPath
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to read config location file, falling back to default.", e)
|
||||
}
|
||||
}
|
||||
return defaultConfigDir
|
||||
}
|
||||
|
||||
fun initialize() {
|
||||
// TODO: Enable migration when switching to "Nodex"
|
||||
// migrateLegacyConfig()
|
||||
|
||||
if (!configDir.toFile().exists()) {
|
||||
configDir.toFile().mkdirs()
|
||||
logger.debug("Created config directory: {}", configDir)
|
||||
}
|
||||
|
||||
LayoutManager.initialize()
|
||||
WorkspaceManager.initialize()
|
||||
}
|
||||
|
||||
fun reload() {
|
||||
_configDir = resolveConfigDir()
|
||||
if (!configDir.toFile().exists()) {
|
||||
configDir.toFile().mkdirs()
|
||||
}
|
||||
logger.debug("Config directory reloaded: {}", configDir)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a custom configuration path and saves it to the locationFile.
|
||||
*/
|
||||
fun setCustomConfigPath(path: Path?) {
|
||||
try {
|
||||
if (!defaultConfigDir.exists()) defaultConfigDir.toFile().mkdirs()
|
||||
|
||||
val config = LocationConfig(path?.toAbsolutePath()?.toString())
|
||||
FileWriter(locationFile.toFile()).use { writer ->
|
||||
gson.toJson(config, writer)
|
||||
}
|
||||
logger.debug("Updated config location. New path: {}", path ?: "Default")
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to save config location file.", e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun migrateLegacyConfig() {
|
||||
val legacyDir = Folders.configDir.resolve("datapack-ide")
|
||||
val newDir = Folders.configDir.resolve("Nodex")
|
||||
|
||||
if (legacyDir.exists() && !newDir.exists()) {
|
||||
try {
|
||||
Files.move(legacyDir, newDir)
|
||||
logger.info("Migrated legacy config directory from 'datapack-ide' to 'Nodex'")
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to migrate legacy config directory", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package io.github.frostzie.nodex.config
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.GsonBuilder
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import io.github.frostzie.nodex.utils.UIConstants
|
||||
import java.io.FileReader
|
||||
import java.io.FileWriter
|
||||
import java.nio.file.Files
|
||||
|
||||
data class LayoutConfig(
|
||||
// Main IDE Window
|
||||
var x: Double = -1.0,
|
||||
var y: Double = -1.0,
|
||||
var width: Double = UIConstants.DEFAULT_WINDOW_WIDTH,
|
||||
var height: Double = UIConstants.DEFAULT_WINDOW_HEIGHT,
|
||||
|
||||
// Project Manager Screen
|
||||
var projectManagerViewX: Double = -1.0,
|
||||
var projectManagerViewY: Double = -1.0,
|
||||
var projectManagerViewWidth: Double = 810.0,
|
||||
var projectManagerViewHeight: Double = 812.0
|
||||
)
|
||||
|
||||
object LayoutManager {
|
||||
private val logger = LoggerProvider.getLogger("LayoutManager")
|
||||
private val gson: Gson = GsonBuilder().setPrettyPrinting().create()
|
||||
private val layoutFile get() = ConfigManager.configDir.resolve("layout.json")
|
||||
|
||||
var config = LayoutConfig()
|
||||
private set
|
||||
|
||||
fun initialize() {
|
||||
load()
|
||||
}
|
||||
|
||||
fun load() {
|
||||
if (Files.exists(layoutFile)) {
|
||||
try {
|
||||
FileReader(layoutFile.toFile()).use { reader ->
|
||||
val loadedConfig = gson.fromJson(reader, LayoutConfig::class.java)
|
||||
if (loadedConfig != null) {
|
||||
config = loadedConfig
|
||||
}
|
||||
logger.debug("Loaded layout from {}", layoutFile)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to load layout file, using defaults.", e)
|
||||
config = LayoutConfig()
|
||||
}
|
||||
} else {
|
||||
logger.info("Layout file not found, using defaults.")
|
||||
config = LayoutConfig()
|
||||
}
|
||||
}
|
||||
|
||||
fun save() {
|
||||
try {
|
||||
FileWriter(layoutFile.toFile()).use { writer ->
|
||||
gson.toJson(config, writer)
|
||||
logger.debug("Saved layout to {}", layoutFile)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to save layout file.", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
data class UpdateCursorLabel(val text: String)
|
||||
data class UpdateEncodingLabel(val text: String)
|
||||
data class UpdateIdeVersionLabel(val text: String)
|
||||
@@ -0,0 +1,15 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
import java.nio.file.Path
|
||||
|
||||
class EditorCopy
|
||||
class EditorCut
|
||||
class EditorPaste
|
||||
class EditorUndo
|
||||
class EditorRedo
|
||||
class EditorSelectAll
|
||||
class EditorCloseTab
|
||||
class EditorFind
|
||||
|
||||
data class EditorCursorPosition(val line: Int, val column: Int)
|
||||
class ActiveTabChangedEvent(val path: Path?)
|
||||
@@ -0,0 +1,81 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.reflect.full.findAnnotation
|
||||
import kotlin.reflect.full.memberFunctions
|
||||
import kotlin.reflect.jvm.isAccessible
|
||||
|
||||
object EventBus {
|
||||
val logger = LoggerProvider.getLogger("EventBus")
|
||||
private val listeners = ConcurrentHashMap<Class<*>, CopyOnWriteArrayList<(Any) -> Unit>>()
|
||||
private val handlerMap = ConcurrentHashMap<Any, MutableList<Pair<Class<*>, (Any) -> Unit>>>()
|
||||
|
||||
fun register(handler: Any) {
|
||||
if (handlerMap.containsKey(handler)) {
|
||||
logger.warn("Handler ${handler::class.simpleName} is already registered")
|
||||
return
|
||||
}
|
||||
|
||||
val methods = handler::class.memberFunctions.filter {
|
||||
it.findAnnotation<SubscribeEvent>() != null
|
||||
}
|
||||
|
||||
val registered = mutableListOf<Pair<Class<*>, (Any) -> Unit>>()
|
||||
|
||||
for (method in methods) {
|
||||
val parameters = method.parameters
|
||||
if (parameters.size != 2) continue
|
||||
|
||||
val eventType = parameters[1].type.classifier as? KClass<*> ?: continue
|
||||
val eventClass = eventType.java
|
||||
|
||||
method.isAccessible = true
|
||||
val fn: (Any) -> Unit = { event -> method.call(handler, event) }
|
||||
|
||||
listeners.getOrPut(eventClass) { CopyOnWriteArrayList() }.add(fn)
|
||||
registered += eventClass to fn
|
||||
|
||||
logger.debug("Registered listener ${method.name} for event ${eventClass.simpleName}")
|
||||
}
|
||||
|
||||
handlerMap[handler] = registered
|
||||
logger.debug("Registered handler ${handler::class.simpleName} with ${registered.size} subscribers")
|
||||
}
|
||||
|
||||
fun unregister(handler: Any) {
|
||||
val registered = handlerMap.remove(handler) ?: return
|
||||
for ((eventClass, fn) in registered) {
|
||||
listeners[eventClass]?.remove(fn)
|
||||
if (listeners[eventClass]?.isEmpty() == true) listeners.remove(eventClass)
|
||||
}
|
||||
logger.debug("Unregistered handler ${handler::class.simpleName}")
|
||||
}
|
||||
|
||||
fun post(event: Any) {
|
||||
listeners[event::class.java]?.forEach { l ->
|
||||
try {
|
||||
l(event)
|
||||
} catch (t: Throwable) {
|
||||
logger.error("Error delivering ${event::class.simpleName} to a subscriber", t)
|
||||
}
|
||||
}
|
||||
logger.debug("Posted Event: ${event::class.simpleName}")
|
||||
}
|
||||
|
||||
fun clear() {
|
||||
listeners.clear()
|
||||
handlerMap.clear()
|
||||
logger.debug("Cleared all event listeners")
|
||||
}
|
||||
|
||||
/**
|
||||
* Call when the component is no longer needed
|
||||
*/
|
||||
fun cleanup() {
|
||||
clear()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
import java.nio.file.Path
|
||||
|
||||
class ChooseDirectory
|
||||
data class DirectorySelected(val directoryPath: Path)
|
||||
|
||||
class NewFile
|
||||
data class MoveFile(val sourcePath: Path, val targetPath: Path)
|
||||
data class RequestMoveConfirmation(val sourcePath: Path, val targetPath: Path)
|
||||
data class RequestFileOverride(val sourcePath: Path, val targetPath: Path)
|
||||
|
||||
class CopyFile
|
||||
class CutFile
|
||||
class PasteFile
|
||||
|
||||
class CopyPath
|
||||
class OpenWith
|
||||
|
||||
class SaveFile
|
||||
class SaveAsFile
|
||||
class SaveAllFiles
|
||||
|
||||
data class OpenFile(val path: Path)
|
||||
|
||||
|
||||
data class FileMoved(val oldPath: Path, val newPath: Path)
|
||||
data class FileModified(val path: Path)
|
||||
data class FileDeleted(val path: Path)
|
||||
data class FileOverrideConfirmed(val sourcePath: Path, val targetPath: Path)
|
||||
@@ -0,0 +1,8 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
class ToggleMenuControls
|
||||
class GitHubLink
|
||||
class DiscordLink
|
||||
class ReportBugLink
|
||||
class BuyMeACoffeeLink
|
||||
class ModrinthLink
|
||||
@@ -0,0 +1,4 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
class Version
|
||||
class VersionUpdate
|
||||
@@ -0,0 +1,27 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
import io.github.frostzie.nodex.settings.data.CategoryItem
|
||||
import io.github.frostzie.nodex.settings.data.ConfigField
|
||||
import io.github.frostzie.nodex.settings.data.SearchResult
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
class SettingsWindowOpen
|
||||
|
||||
// Settings events
|
||||
class SettingsSave
|
||||
class CloseSettingsEvent
|
||||
data class SettingsSearchQueryChanged(val query: String)
|
||||
data class SettingsSearchResultsAvailable(val query: String, val results: List<SearchResult>)
|
||||
data class SettingsSearchResultSelected(val result: SearchResult)
|
||||
|
||||
data class SettingsCategorySelected(val item: CategoryItem)
|
||||
data class SelectTreeItem(val categoryIndex: Int, val subCategory: String?)
|
||||
|
||||
class RequestSettingsCategories
|
||||
data class CategoryData(val name: String, val configClass: KClass<*>, val subCategories: List<String>)
|
||||
data class SettingsCategoriesAvailable(val categories: List<CategoryData>)
|
||||
|
||||
data class SectionData(val name: String, val description: String?, val fields: List<ConfigField>)
|
||||
data class SettingsContentUpdate(val title: String, val sections: List<SectionData>, val filterFields: Set<ConfigField>? = null)
|
||||
|
||||
data class HighlightField(val field: ConfigField)
|
||||
@@ -0,0 +1,13 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
/**
|
||||
* Event for WindowControls
|
||||
*/
|
||||
//TODO: check usage of each event and if they are still needed
|
||||
class MainWindowClose
|
||||
class MainWindowMinimize
|
||||
class MainWindowMaximize
|
||||
class MainWindowToggleMaximize
|
||||
class MainWindowRestore
|
||||
|
||||
data class MainWindowMaximizedStateChanged(val isMaximized: Boolean)
|
||||
@@ -0,0 +1,10 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
import java.nio.file.Path
|
||||
|
||||
class ReloadThemeEvent
|
||||
class ThemeChangeEvent(val themeName: String)
|
||||
class ImportThemeEvent
|
||||
class OpenThemeEvent
|
||||
class ThemeEditingSessionClosedEvent
|
||||
class SaveFileEvent(val path: Path)
|
||||
@@ -0,0 +1,3 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
class ToggleFileTree
|
||||
@@ -0,0 +1,23 @@
|
||||
package io.github.frostzie.nodex.events
|
||||
|
||||
import io.github.frostzie.nodex.project.Workspace
|
||||
|
||||
/**
|
||||
* Fired when the workspace configuration changes (project added/removed).
|
||||
*/
|
||||
data class WorkspaceUpdated(val workspace: Workspace)
|
||||
|
||||
/**
|
||||
* Event fired to request a complete reset of the workspace and session history.
|
||||
*/
|
||||
class ResetWorkspaceEvent
|
||||
|
||||
/**
|
||||
* Event fired to open the project manager.
|
||||
*/
|
||||
class OpenProjectManagerEvent
|
||||
|
||||
/**
|
||||
* Event fired to open folder of the currently active workspace
|
||||
*/
|
||||
class OpenWorkspaceFolder
|
||||
@@ -0,0 +1,46 @@
|
||||
package io.github.frostzie.nodex.features
|
||||
|
||||
import io.github.frostzie.nodex.features.editor.CaretColor
|
||||
import io.github.frostzie.nodex.features.editor.DirtyTabDecorator
|
||||
import io.github.frostzie.nodex.features.editor.EditorTabDecorator
|
||||
import io.github.frostzie.nodex.features.editor.FileIconDecorator
|
||||
import io.github.frostzie.nodex.styling.tabs.TabStyleManager
|
||||
import io.github.frostzie.nodex.styling.tabs.TabStyler
|
||||
import io.github.frostzie.nodex.styling.tabs.rules.ConfigRule
|
||||
import io.github.frostzie.nodex.styling.tabs.rules.DefaultRule
|
||||
import io.github.frostzie.nodex.styling.tabs.rules.DirtyStateRule
|
||||
import io.github.frostzie.nodex.styling.messages.MessageStyleManager
|
||||
import io.github.frostzie.nodex.styling.messages.rules.CustomIconRule
|
||||
import io.github.frostzie.nodex.styling.messages.rules.DefaultMessageRule
|
||||
import io.github.frostzie.nodex.styling.messages.rules.SeverityMessageRule
|
||||
|
||||
/**
|
||||
* A central registry for discovering and accessing all feature services.
|
||||
*/
|
||||
object FeatureRegistry {
|
||||
|
||||
/**
|
||||
* A list of all services that can decorate an editor tab.
|
||||
* To add a new tab feature, create a class that implements [EditorTabDecorator]
|
||||
* and add an instance of it to this list.
|
||||
*/
|
||||
//TODO: split up
|
||||
val editorTabDecorators: List<EditorTabDecorator> = listOf(
|
||||
TabStyler(),
|
||||
DirtyTabDecorator(),
|
||||
FileIconDecorator(),
|
||||
CaretColor()
|
||||
)
|
||||
|
||||
init {
|
||||
//Register the style rules with the central TabStyleManager.
|
||||
TabStyleManager.registerRule(DefaultRule())
|
||||
TabStyleManager.registerRule(DirtyStateRule())
|
||||
TabStyleManager.registerRule(ConfigRule())
|
||||
|
||||
// Register message style rules
|
||||
MessageStyleManager.registerRule(DefaultMessageRule())
|
||||
MessageStyleManager.registerRule(SeverityMessageRule())
|
||||
MessageStyleManager.registerRule(CustomIconRule())
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package io.github.frostzie.nodex.features.dev.showcase
|
||||
|
||||
import io.github.frostzie.nodex.settings.categories.ExampleConfig
|
||||
import io.github.frostzie.nodex.styling.common.IconSource
|
||||
import io.github.frostzie.nodex.styling.messages.MessageFactory
|
||||
import io.github.frostzie.nodex.styling.messages.MessageSeverity
|
||||
import io.github.frostzie.nodex.styling.messages.NotificationPosition
|
||||
import org.kordamp.ikonli.material2.Material2OutlinedMZ
|
||||
|
||||
object MessageShowcase {
|
||||
|
||||
fun showExampleMessage() {
|
||||
val title = ExampleConfig.messageTitle.get()
|
||||
val description = ExampleConfig.messageDescription.get()
|
||||
|
||||
val severity = try {
|
||||
MessageSeverity.valueOf(ExampleConfig.messageSeverity.get())
|
||||
} catch (e: Exception) {
|
||||
MessageSeverity.REGULAR
|
||||
}
|
||||
|
||||
val position = try {
|
||||
NotificationPosition.valueOf(ExampleConfig.messagePosition.get())
|
||||
} catch (e: Exception) {
|
||||
NotificationPosition.BOTTOM_RIGHT
|
||||
}
|
||||
|
||||
val duration = ExampleConfig.messageDuration.get().toLong()
|
||||
|
||||
val widthVal = ExampleConfig.messageWidth.get()
|
||||
val width = if (widthVal > 0.0) widthVal else null
|
||||
|
||||
val heightVal = ExampleConfig.messageHeight.get()
|
||||
val height = if (heightVal > 0.0) heightVal else null
|
||||
|
||||
val iconName = ExampleConfig.messageIcon.get()
|
||||
val icon = try {
|
||||
if (iconName.isNotBlank()) {
|
||||
IconSource.IkonIcon(Material2OutlinedMZ.valueOf(iconName.trim().uppercase()))
|
||||
} else null
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
}
|
||||
|
||||
MessageFactory.createAndShow(
|
||||
title = title,
|
||||
description = description,
|
||||
severity = severity,
|
||||
position = position,
|
||||
durationMillis = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
icon = icon
|
||||
)
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package io.github.frostzie.nodex.features.dev.showcase
|
||||
|
||||
import io.github.frostzie.nodex.settings.categories.ExampleConfig
|
||||
import io.github.frostzie.nodex.styling.common.IconSource
|
||||
import io.github.frostzie.nodex.styling.messages.MessageSeverity
|
||||
import io.github.frostzie.nodex.styling.messages.NotificationPosition
|
||||
import io.github.frostzie.nodex.styling.notifications.NotificationFactory
|
||||
import javafx.scene.control.Button
|
||||
import javafx.scene.control.MenuItem
|
||||
import org.kordamp.ikonli.material2.Material2OutlinedMZ
|
||||
|
||||
object NotificationShowcase {
|
||||
|
||||
fun showExampleNotification() {
|
||||
val text = ExampleConfig.notificationText.get()
|
||||
|
||||
val severity = try {
|
||||
MessageSeverity.valueOf(ExampleConfig.notificationSeverity.get())
|
||||
} catch (e: Exception) {
|
||||
MessageSeverity.REGULAR
|
||||
}
|
||||
|
||||
val position = try {
|
||||
NotificationPosition.valueOf(ExampleConfig.notificationPosition.get())
|
||||
} catch (e: Exception) {
|
||||
NotificationPosition.BOTTOM_RIGHT
|
||||
}
|
||||
|
||||
val duration = ExampleConfig.notificationDuration.get().toLong()
|
||||
|
||||
val widthVal = ExampleConfig.notificationWidth.get()
|
||||
val width = if (widthVal > 0.0) widthVal else null
|
||||
|
||||
val heightVal = ExampleConfig.notificationHeight.get()
|
||||
val height = if (heightVal > 0.0) heightVal else null
|
||||
|
||||
val iconName = ExampleConfig.notificationIcon.get()
|
||||
val icon = try {
|
||||
if (iconName.isNotBlank()) {
|
||||
IconSource.IkonIcon(Material2OutlinedMZ.valueOf(iconName.trim().uppercase()))
|
||||
} else null
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
}
|
||||
|
||||
val msg = NotificationFactory.createAndShow(
|
||||
text = text,
|
||||
severity = severity,
|
||||
position = position,
|
||||
durationMillis = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
icon = icon
|
||||
)
|
||||
|
||||
if (ExampleConfig.notificationShowActions.get()) {
|
||||
val yesBtn = Button("Yes")
|
||||
yesBtn.isDefaultButton = true
|
||||
|
||||
val noBtn = Button("No")
|
||||
|
||||
msg.setPrimaryActions(yesBtn, noBtn)
|
||||
msg.setSecondaryActions(
|
||||
MenuItem("Item 1"),
|
||||
MenuItem("Item 2")
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package io.github.frostzie.nodex.features.editor
|
||||
|
||||
import atlantafx.base.controls.Tab
|
||||
import io.github.frostzie.nodex.modules.main.TextEditorViewModel
|
||||
import io.github.frostzie.nodex.settings.categories.MainConfig
|
||||
import javafx.beans.value.ChangeListener
|
||||
import org.fxmisc.richtext.CodeArea
|
||||
|
||||
/**
|
||||
* An implementation of [EditorTabDecorator] that changes the caret color
|
||||
* based on user settings.
|
||||
*/
|
||||
class CaretColor : EditorTabDecorator {
|
||||
|
||||
override fun decorate(tab: Tab, codeArea: CodeArea, tabData: TextEditorViewModel.TabData): () -> Unit {
|
||||
val configListener = ChangeListener<Any> { _, _, _ ->
|
||||
// Only update if it has focus.
|
||||
if (codeArea.isFocused) {
|
||||
updateCaretColor(codeArea)
|
||||
}
|
||||
}
|
||||
|
||||
val focusListener = ChangeListener<Boolean> { _, _, isFocused ->
|
||||
if (isFocused) {
|
||||
updateCaretColor(codeArea)
|
||||
}
|
||||
}
|
||||
|
||||
MainConfig.enableCaretColor.addListener(configListener)
|
||||
MainConfig.caretColor.addListener(configListener)
|
||||
codeArea.focusedProperty().addListener(focusListener)
|
||||
|
||||
// Set initial color if it's already focused (e.g. first tab)
|
||||
if (codeArea.isFocused) {
|
||||
updateCaretColor(codeArea)
|
||||
}
|
||||
|
||||
// Return cleanup function
|
||||
return {
|
||||
MainConfig.enableCaretColor.removeListener(configListener)
|
||||
MainConfig.caretColor.removeListener(configListener)
|
||||
codeArea.focusedProperty().removeListener(focusListener)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateCaretColor(codeArea: CodeArea) {
|
||||
val caret = codeArea.lookup(".caret")
|
||||
if (MainConfig.enableCaretColor.get()) {
|
||||
val color = MainConfig.caretColor.get()
|
||||
caret?.style = "-fx-stroke: $color;"
|
||||
} else {
|
||||
caret?.style = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package io.github.frostzie.nodex.features.editor
|
||||
|
||||
import atlantafx.base.controls.Tab
|
||||
import io.github.frostzie.nodex.modules.main.TextEditorViewModel
|
||||
import io.github.frostzie.nodex.settings.categories.MainConfig
|
||||
import javafx.beans.value.ChangeListener
|
||||
import javafx.scene.control.Label
|
||||
import javafx.scene.layout.HBox
|
||||
import org.fxmisc.richtext.CodeArea
|
||||
|
||||
/**
|
||||
* An implementation of [EditorTabDecorator] that adds a "dirty" suffix
|
||||
* to a tab when its file has unsaved changes.
|
||||
*/
|
||||
class DirtyTabDecorator : EditorTabDecorator {
|
||||
|
||||
override fun decorate(tab: Tab, codeArea: CodeArea, tabData: TextEditorViewModel.TabData): () -> Unit {
|
||||
// This listener reacts to both the dirty status and changes to the indicator setting itself.
|
||||
val listener = ChangeListener<Any> { _, _, _ ->
|
||||
updateTab(tab, tabData)
|
||||
}
|
||||
|
||||
tabData.isDirty.addListener(listener)
|
||||
MainConfig.dirtyIndicator.addListener(listener)
|
||||
|
||||
// Set the initial state correctly
|
||||
updateTab(tab, tabData)
|
||||
|
||||
// Cleanup when the tab is closed
|
||||
return {
|
||||
tabData.isDirty.removeListener(listener)
|
||||
MainConfig.dirtyIndicator.removeListener(listener)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateTab(tab: Tab, tabData: TextEditorViewModel.TabData) {
|
||||
val graphic = tab.graphic as? HBox ?: return
|
||||
val label = graphic.children.find { it is Label } as? Label ?: return
|
||||
|
||||
val isDirty = tabData.isDirty.get()
|
||||
label.text = if (isDirty) {
|
||||
"${tabData.displayName}${MainConfig.dirtyIndicator.get()}"
|
||||
} else {
|
||||
tabData.displayName
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package io.github.frostzie.nodex.features.editor
|
||||
|
||||
import atlantafx.base.controls.Tab
|
||||
import io.github.frostzie.nodex.modules.main.TextEditorViewModel
|
||||
import org.fxmisc.richtext.CodeArea
|
||||
|
||||
/**
|
||||
* Defines a contract for features that wish to decorate or add behavior to an editor tab.
|
||||
*/
|
||||
interface EditorTabDecorator {
|
||||
/**
|
||||
* Applies decorations to the given tab based on the tab's data.
|
||||
*
|
||||
* @param tab The UI Tab control from AtlantaFX.
|
||||
* @param codeArea The CodeArea containing the text editor for this tab.
|
||||
* @param tabData The view model's data for this tab.
|
||||
* @return A cleanup function (lambda) that will be called when the tab is closed.
|
||||
* This is for removing listeners and preventing memory leaks.
|
||||
*/
|
||||
fun decorate(tab: Tab, codeArea: CodeArea, tabData: TextEditorViewModel.TabData): () -> Unit
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.github.frostzie.nodex.features.editor
|
||||
|
||||
import atlantafx.base.controls.Tab
|
||||
import io.github.frostzie.nodex.modules.main.TextEditorViewModel
|
||||
import io.github.frostzie.nodex.settings.categories.MainConfig
|
||||
import javafx.beans.value.ChangeListener
|
||||
import javafx.scene.layout.HBox
|
||||
import org.fxmisc.richtext.CodeArea
|
||||
import org.kordamp.ikonli.javafx.FontIcon
|
||||
|
||||
/**
|
||||
* An implementation of [EditorTabDecorator] that toggles the visibility of the file
|
||||
* icon in a tab based on the "Show File Icons" setting.
|
||||
*/
|
||||
class FileIconDecorator : EditorTabDecorator {
|
||||
override fun decorate(tab: Tab, codeArea: CodeArea, tabData: TextEditorViewModel.TabData): () -> Unit {
|
||||
val graphic = tab.graphic as? HBox ?: return { }
|
||||
val icon = graphic.children.find { it is FontIcon } as? FontIcon ?: return { }
|
||||
|
||||
val listener = ChangeListener { _, _, show ->
|
||||
icon.isVisible = show
|
||||
icon.isManaged = show
|
||||
}
|
||||
MainConfig.showFileIcons.addListener(listener)
|
||||
|
||||
val initialVisibility = MainConfig.showFileIcons.get()
|
||||
icon.isVisible = initialVisibility
|
||||
icon.isManaged = initialVisibility
|
||||
|
||||
return {
|
||||
MainConfig.showFileIcons.removeListener(listener)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package io.github.frostzie.nodex.handlers.bars
|
||||
|
||||
import io.github.frostzie.nodex.events.EditorCursorPosition
|
||||
import io.github.frostzie.nodex.modules.bars.BottomBarModule
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
|
||||
@Suppress("unused")
|
||||
class BottomBarHandler(private val bottomBarModule: BottomBarModule) {
|
||||
@SubscribeEvent
|
||||
fun onCursorPositionChanged(event: EditorCursorPosition) {
|
||||
bottomBarModule.updateCursorPosition(event.line, event.column)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package io.github.frostzie.nodex.handlers.bars
|
||||
|
||||
import io.github.frostzie.nodex.modules.bars.LeftBarModule
|
||||
|
||||
@Suppress("unused")
|
||||
class LeftBarHandler(private val leftBarModule: LeftBarModule) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package io.github.frostzie.nodex.handlers.bars.top
|
||||
|
||||
import io.github.frostzie.nodex.events.*
|
||||
import io.github.frostzie.nodex.modules.bars.top.TopBarViewModel
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
import io.github.frostzie.nodex.utils.OpenLinks
|
||||
|
||||
@Suppress("unused")
|
||||
class TopBarHandler(private val topBarViewModel: TopBarViewModel) {
|
||||
|
||||
@SubscribeEvent
|
||||
fun onMinimize(event: MainWindowMinimize) {
|
||||
topBarViewModel.minimize()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onMaximize(event: MainWindowMaximize) {
|
||||
topBarViewModel.maximize()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onToggleMaximize(event: MainWindowToggleMaximize) {
|
||||
topBarViewModel.toggleMaximize()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onRestoreBack(event: MainWindowRestore) {
|
||||
topBarViewModel.restore()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onClose(event: MainWindowClose) {
|
||||
topBarViewModel.hideWindow()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun openDatapackFolder(event: OpenWorkspaceFolder) {
|
||||
topBarViewModel.openWorkspaceFolder()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onDiscordLink(event: DiscordLink) {
|
||||
OpenLinks.discordLink()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onGitHubLink(event: GitHubLink) {
|
||||
OpenLinks.gitHubLink()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onReportBugLink(event: ReportBugLink) {
|
||||
OpenLinks.reportBugLink()
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package io.github.frostzie.nodex.handlers.popup.file
|
||||
|
||||
import io.github.frostzie.nodex.events.RequestFileOverride
|
||||
import io.github.frostzie.nodex.events.RequestMoveConfirmation
|
||||
import io.github.frostzie.nodex.modules.popup.file.FilePopupModule
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
|
||||
class FilePopupHandler(private val filePopupModule: FilePopupModule) {
|
||||
@SubscribeEvent
|
||||
fun onMoveFileRequested(event: RequestMoveConfirmation) {
|
||||
filePopupModule.showMoveConfirmation(event.sourcePath, event.targetPath)
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onFileOverrideRequested(event: RequestFileOverride) {
|
||||
filePopupModule.showFileOverrideDialog(event.sourcePath, event.targetPath)
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package io.github.frostzie.nodex.handlers.popup.settings
|
||||
|
||||
import io.github.frostzie.nodex.events.*
|
||||
import io.github.frostzie.nodex.modules.popup.settings.SettingsModule
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
|
||||
@Suppress("unused")
|
||||
class SettingsHandler(private val settingsModule: SettingsModule) {
|
||||
|
||||
@SubscribeEvent
|
||||
fun onShowSettingsWindow(event: SettingsWindowOpen) {
|
||||
settingsModule.showSettingsWindow()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onSettingsSearchQueryChanged(event: SettingsSearchQueryChanged) {
|
||||
settingsModule.search(event.query)
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onSettingsCategorySelected(event: SettingsCategorySelected) {
|
||||
settingsModule.selectCategory(event.item)
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onSettingsSearchResultSelected(event: SettingsSearchResultSelected) {
|
||||
settingsModule.selectSearchResult(event.result)
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onSettingsSave(event: SettingsSave) {
|
||||
settingsModule.saveSettings()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onRequestSettingsCategories(event: RequestSettingsCategories) {
|
||||
settingsModule.loadAndSendCategories()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onOpenProjectManager(event: OpenProjectManagerEvent) {
|
||||
settingsModule.close()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onResetWorkspace(event: ResetWorkspaceEvent) {
|
||||
settingsModule.close()
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package io.github.frostzie.nodex.handlers.popup.settings
|
||||
|
||||
import io.github.frostzie.nodex.events.*
|
||||
import io.github.frostzie.nodex.modules.popup.settings.ThemeModule
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
|
||||
class ThemeHandler(private val themeModule: ThemeModule) {
|
||||
|
||||
@SubscribeEvent
|
||||
fun onThemeChange(event: ThemeChangeEvent) {
|
||||
themeModule.changeTheme(event.themeName)
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onReloadTheme(event: ReloadThemeEvent) {
|
||||
themeModule.reloadStyles()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onOpenTheme(event: OpenThemeEvent) {
|
||||
themeModule.openTheme(event)
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onThemeEditingSessionClosed(event: ThemeEditingSessionClosedEvent) {
|
||||
themeModule.closeEditingSession()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onActiveTabChanged(event: ActiveTabChangedEvent) {
|
||||
themeModule.onActiveTabChanged(event.path)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.github.frostzie.nodex.ingame
|
||||
|
||||
import io.github.frostzie.nodex.loader.fabric.CommandRegistration
|
||||
import io.github.frostzie.nodex.loader.minecraft.MCInterface
|
||||
import io.github.frostzie.nodex.modules.universal.UniversalPackManager
|
||||
import io.github.frostzie.nodex.project.WorkspaceManager
|
||||
import io.github.frostzie.nodex.screen.MainApplication
|
||||
import io.github.frostzie.nodex.settings.categories.MainConfig
|
||||
|
||||
object DefaultCommands {
|
||||
fun registerCommands() {
|
||||
CommandRegistration.register("nodex") {
|
||||
executes {
|
||||
MainApplication.showMainWindow()
|
||||
1
|
||||
}
|
||||
|
||||
// Mirrors current project to world. //TODO: Support any universal project mirroring
|
||||
literal("internal") {
|
||||
literal("mirror_current") {
|
||||
executes {
|
||||
if (!MainConfig.universalFolderToggle.get() || !MainConfig.universalDatapackToggle.get()) return@executes 0
|
||||
|
||||
val root = WorkspaceManager.currentWorkspaceRoot
|
||||
if (root != null && UniversalPackManager.isUniversalProject(root)) {
|
||||
if (UniversalPackManager.mirrorToWorld(root)) {
|
||||
// Execute reload to apply changes
|
||||
MCInterface.sendCommand("reload")
|
||||
}
|
||||
}
|
||||
1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package io.github.frostzie.nodex.ingame
|
||||
|
||||
import io.github.frostzie.nodex.loader.minecraft.MCInterface
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
|
||||
object ReloadDataPacksCommand {
|
||||
|
||||
private val logger = LoggerProvider.getLogger("ReloadDataPacksCommand")
|
||||
|
||||
/**
|
||||
* Executes the `/reload` command in Minecraft.
|
||||
*/
|
||||
fun reload() {
|
||||
MCInterface.sendCommand("reload")
|
||||
logger.debug("Sent /reload with button press")
|
||||
}
|
||||
|
||||
/**
|
||||
* Placeholder for executing the `/reload` command via a hotkey.
|
||||
*/
|
||||
fun executeCommandHotKey() {
|
||||
//TODO: Add a hotkey to execute the command
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package io.github.frostzie.nodex.loader.fabric
|
||||
|
||||
import io.github.frostzie.nodex.loader.minecraft.CaseInsensitiveLiteralCommandNode
|
||||
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
|
||||
|
||||
/**
|
||||
* A DSL wrapper around Brigadier's LiteralArgumentBuilder to simplify command registration
|
||||
* and enforce case-insensitive matching by default.
|
||||
*/
|
||||
class CommandBuilder(internal val builder: CaseInsensitiveLiteralCommandNode.Builder<FabricClientCommandSource>) {
|
||||
|
||||
/**
|
||||
* Adds a child literal command node.
|
||||
*/
|
||||
fun literal(name: String, block: CommandBuilder.() -> Unit) {
|
||||
val childBuilder = CommandUtils.caseInsensitiveLiteral(name)
|
||||
val childWrapper = CommandBuilder(childBuilder)
|
||||
childWrapper.block()
|
||||
builder.then(childWrapper.builder)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the execution logic for this command node.
|
||||
* The action should return 1 for success, 0 for failure (standard Brigadier convention).
|
||||
*/
|
||||
fun executes(action: () -> Int) {
|
||||
builder.executes { _ -> action() }
|
||||
}
|
||||
}
|
||||
|
||||
object CommandRegistration {
|
||||
/**
|
||||
* Registers a new root command with the given name.
|
||||
*/
|
||||
fun register(name: String, block: CommandBuilder.() -> Unit) {
|
||||
ClientCommandRegistrationCallback.EVENT.register { dispatcher, _ ->
|
||||
val rootBuilder = CommandUtils.caseInsensitiveLiteral(name)
|
||||
val wrapper = CommandBuilder(rootBuilder)
|
||||
wrapper.block()
|
||||
dispatcher.register(rootBuilder)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.github.frostzie.nodex.loader.fabric
|
||||
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder
|
||||
import io.github.frostzie.nodex.loader.minecraft.CaseInsensitiveLiteralCommandNode
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
|
||||
|
||||
object CommandUtils {
|
||||
|
||||
fun caseInsensitiveLiteral(name: String): CaseInsensitiveLiteralCommandNode.Builder<FabricClientCommandSource> {
|
||||
return CaseInsensitiveLiteralCommandNode.Builder(name)
|
||||
}
|
||||
|
||||
fun LiteralArgumentBuilder<FabricClientCommandSource>.caseInsensitive(): CaseInsensitiveLiteralCommandNode.Builder<FabricClientCommandSource> {
|
||||
val builder = CaseInsensitiveLiteralCommandNode.Builder<FabricClientCommandSource>(this.literal)
|
||||
|
||||
if (this.command != null) {
|
||||
builder.executes(this.command)
|
||||
}
|
||||
|
||||
if (this.requirement != null) {
|
||||
builder.requires(this.requirement)
|
||||
}
|
||||
|
||||
if (this.redirect != null) {
|
||||
builder.forward(this.redirect, this.redirectModifier, this.isFork)
|
||||
}
|
||||
|
||||
for (argument in this.arguments) {
|
||||
builder.then(argument)
|
||||
}
|
||||
|
||||
return builder
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package io.github.frostzie.nodex.loader.fabric
|
||||
|
||||
import net.fabricmc.loader.api.FabricLoader
|
||||
import java.nio.file.Path
|
||||
|
||||
/**
|
||||
* Simple wrapper to not need to depend on fabric
|
||||
*/
|
||||
object Folders {
|
||||
val configDir: Path
|
||||
get() = FabricLoader.getInstance().configDir
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package io.github.frostzie.nodex.loader.fabric
|
||||
|
||||
import com.mojang.blaze3d.platform.InputConstants
|
||||
import io.github.frostzie.nodex.screen.MainApplication
|
||||
import io.github.frostzie.nodex.utils.JavaFXInitializer
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
|
||||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper
|
||||
import net.minecraft.client.KeyMapping
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import org.lwjgl.glfw.GLFW
|
||||
|
||||
//TODO: Wrap keybind building and move to ingame dir
|
||||
object Keybinds {
|
||||
private val logger = LoggerProvider.getLogger("Keybinds")
|
||||
private var toggleIDEKey: KeyMapping? = null
|
||||
|
||||
fun register() {
|
||||
//? if <=1.21.8 {
|
||||
/*toggleIDEKey = KeyBindingHelper.registerKeyBinding(KeyMapping(
|
||||
"key.nodex.toggle_ide",
|
||||
InputConstants.Type.KEYSYM,
|
||||
GLFW.GLFW_KEY_H,
|
||||
"category.nodex.general"
|
||||
))
|
||||
*///?} else {
|
||||
toggleIDEKey = KeyBindingHelper.registerKeyBinding(
|
||||
KeyMapping(
|
||||
"key.nodex.toggle_ide",
|
||||
InputConstants.Type.KEYSYM,
|
||||
GLFW.GLFW_KEY_H,
|
||||
KeyMapping.Category.register(ResourceLocation.fromNamespaceAndPath("nodex", "general"))
|
||||
))
|
||||
//?}
|
||||
|
||||
ClientTickEvents.END_CLIENT_TICK.register { client ->
|
||||
while (toggleIDEKey?.consumeClick() == true) {
|
||||
logger.info("IDE toggle keybind pressed!")
|
||||
|
||||
if (JavaFXInitializer.isJavaFXAvailable()) {
|
||||
MainApplication.Companion.showMainWindow()
|
||||
} else {
|
||||
logger.error("Cannot open IDE window - JavaFX is not available")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package io.github.frostzie.nodex.loader.fabric
|
||||
|
||||
import net.fabricmc.loader.api.FabricLoader
|
||||
|
||||
object ModVersion {
|
||||
val current: String by lazy {
|
||||
FabricLoader.getInstance()
|
||||
.getModContainer("nodex")
|
||||
.map { it.metadata.version.friendlyString }
|
||||
.orElse("unknown")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package io.github.frostzie.nodex.loader.fabric
|
||||
|
||||
import io.github.frostzie.nodex.loader.minecraft.MCInterface
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents
|
||||
import java.nio.file.Path
|
||||
|
||||
object WorldDetection {
|
||||
/**
|
||||
* Check if player connected to a world
|
||||
*/
|
||||
fun isWorldOpen(): Boolean {
|
||||
return MCInterface.isWorldOpen
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if player connected to singleplayer
|
||||
*/
|
||||
fun isSingleplayer(): Boolean {
|
||||
return MCInterface.isSingleplayer
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if player connected to server
|
||||
*/
|
||||
fun isServer(): Boolean {
|
||||
return MCInterface.isServer
|
||||
}
|
||||
|
||||
/**
|
||||
* Get world path
|
||||
*/
|
||||
fun getWorldPath(): Path? {
|
||||
return MCInterface.getWorldPath()
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a listener for world join events
|
||||
*/
|
||||
fun registerWorldJoinListener(listener: () -> Unit) {
|
||||
ClientPlayConnectionEvents.JOIN.register { _, _, _ ->
|
||||
listener()
|
||||
}
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
package io.github.frostzie.nodex.loader.minecraft
|
||||
|
||||
import com.mojang.brigadier.Command
|
||||
import com.mojang.brigadier.RedirectModifier
|
||||
import com.mojang.brigadier.StringReader
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder
|
||||
import com.mojang.brigadier.context.CommandContextBuilder
|
||||
import com.mojang.brigadier.context.StringRange
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException
|
||||
import com.mojang.brigadier.tree.CommandNode
|
||||
import com.mojang.brigadier.tree.LiteralCommandNode
|
||||
import java.util.function.Predicate
|
||||
|
||||
// Taken and modified from Firmament
|
||||
class CaseInsensitiveLiteralCommandNode<S>(
|
||||
literal: String, command: Command<S>?, requirement: Predicate<S>?,
|
||||
redirect: CommandNode<S>?, modifier: RedirectModifier<S>?, forks: Boolean
|
||||
) : LiteralCommandNode<S>(
|
||||
literal.lowercase(), command, requirement, redirect, modifier, forks
|
||||
) {
|
||||
|
||||
class Builder<S>(literal: String) : LiteralArgumentBuilder<S>(literal) {
|
||||
override fun build(): LiteralCommandNode<S> {
|
||||
val result = CaseInsensitiveLiteralCommandNode(
|
||||
literal,
|
||||
command, requirement, redirect, redirectModifier, isFork
|
||||
)
|
||||
for (argument in arguments) {
|
||||
result.addChild(argument)
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
override fun createBuilder(): LiteralArgumentBuilder<S> {
|
||||
return Builder<S>(literal).also {
|
||||
it.requires(requirement)
|
||||
it.forward(redirect, redirectModifier, isFork)
|
||||
if (command != null)
|
||||
it.executes(command)
|
||||
}
|
||||
}
|
||||
|
||||
override fun parse(reader: StringReader, contextBuilder: CommandContextBuilder<S>) {
|
||||
val start = reader.cursor
|
||||
val end = parse0(reader)
|
||||
if (end > -1) {
|
||||
contextBuilder.withNode(this, StringRange.between(start, end))
|
||||
return
|
||||
}
|
||||
|
||||
throw CommandSyntaxException.BUILT_IN_EXCEPTIONS.literalIncorrect().createWithContext(reader, literal)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "<iliteral $literal>"
|
||||
}
|
||||
|
||||
private fun parse0(reader: StringReader): Int {
|
||||
val start = reader.cursor
|
||||
if (reader.canRead(literal.length)) {
|
||||
val end = start + literal.length
|
||||
if (reader.string.substring(start, end).equals(literal, true)) {
|
||||
reader.cursor = end
|
||||
if (!reader.canRead() || reader.peek() == ' ') {
|
||||
return end
|
||||
} else {
|
||||
reader.cursor = start
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package io.github.frostzie.nodex.loader.minecraft
|
||||
|
||||
import net.minecraft.network.chat.ClickEvent
|
||||
import net.minecraft.network.chat.HoverEvent
|
||||
import net.minecraft.network.chat.Style
|
||||
import net.minecraft.network.chat.Component
|
||||
import net.minecraft.network.chat.MutableComponent
|
||||
import net.minecraft.network.chat.TextColor
|
||||
import java.net.URI
|
||||
|
||||
object ChatMessageBuilder {
|
||||
fun warning(warningMessage: String, copyableText: String = warningMessage) {
|
||||
val fullMessage = buildMessage(warningMessage, copyableText, "WARN", 0xFFA500, "warning")
|
||||
|
||||
MCInterface.runOnRenderThread {
|
||||
MCInterface.displayClientMessage(fullMessage, false)
|
||||
}
|
||||
}
|
||||
|
||||
fun error(errorMessage: String, copyableText: String = errorMessage) {
|
||||
val fullMessage = buildMessage(errorMessage, copyableText, "ERROR", 0xFF5555, "error")
|
||||
|
||||
MCInterface.runOnRenderThread {
|
||||
MCInterface.displayClientMessage(fullMessage, false)
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Allow loading not just current project
|
||||
fun promptUniversalLoad(projectName: String) {
|
||||
val command = "/nodex internal mirror_current"
|
||||
|
||||
val clickable = Component.literal(" [Load into World]")
|
||||
.setStyle(Style.EMPTY
|
||||
.withColor(TextColor.fromRgb(0x55FF55)) // Green
|
||||
.withBold(true)
|
||||
.withClickEvent(ClickEvent.RunCommand(command))
|
||||
.withHoverEvent(HoverEvent.ShowText(Component.literal("§eClick to mirror '$projectName' to this world")))
|
||||
)
|
||||
|
||||
val fullMessage = buildPrefix()
|
||||
.append(Component.literal("Detected Universal Pack: '§b$projectName§r'."))
|
||||
.append(clickable)
|
||||
|
||||
MCInterface.runOnRenderThread {
|
||||
MCInterface.displayClientMessage(fullMessage, false)
|
||||
}
|
||||
}
|
||||
|
||||
fun testWarning() {
|
||||
warning("This is a test warning message.", "Test Warning Copy Text")
|
||||
}
|
||||
|
||||
fun testError() {
|
||||
error("This is a test error message.", "Test Error Copy Text")
|
||||
}
|
||||
|
||||
private fun buildMessage(message: String, copyableText: String, level: String, color: Int, type: String): Component {
|
||||
val styledMessage = Component.literal(message)
|
||||
.setStyle(
|
||||
Style.EMPTY.withColor(TextColor.fromRgb(color))
|
||||
.withClickEvent(ClickEvent.CopyToClipboard(copyableText))
|
||||
.withHoverEvent(HoverEvent.ShowText(Component.literal("§eClick to copy $type message")))
|
||||
)
|
||||
val builder = buildPrefix()
|
||||
.append(Component.literal("[$level]§r ").setStyle(Style.EMPTY.withColor(TextColor.fromRgb(color))))
|
||||
.append(styledMessage)
|
||||
|
||||
if (level == "ERROR") {
|
||||
builder.append(
|
||||
Component.literal("\nPlease report this in the discord server!")
|
||||
.setStyle(
|
||||
Style.EMPTY.withColor(TextColor.fromRgb(0xAAAAAA))
|
||||
.withClickEvent(ClickEvent.OpenUrl(URI("https://discord.gg/qZ885qTvkx")))
|
||||
.withHoverEvent(HoverEvent.ShowText(Component.literal("§eClick to open the Discord server invite")))
|
||||
)
|
||||
)
|
||||
}
|
||||
return builder
|
||||
}
|
||||
|
||||
private fun buildPrefix(): MutableComponent {
|
||||
return Component.empty()
|
||||
.append(MCColorUtils.nodexPrefixChat())
|
||||
.append(Component.literal("§r "))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.github.frostzie.nodex.loader.minecraft
|
||||
|
||||
import net.minecraft.network.chat.Component
|
||||
import net.minecraft.network.chat.MutableComponent
|
||||
import net.minecraft.network.chat.Style
|
||||
import net.minecraft.network.chat.TextColor
|
||||
|
||||
object MCColorUtils {
|
||||
|
||||
/**
|
||||
* Prefix for chat messages sent by the mod.
|
||||
* Looks like: "[Nodex] message
|
||||
*/
|
||||
fun nodexPrefixChat(): MutableComponent {
|
||||
val text = "Nodex"
|
||||
val colors = listOf(
|
||||
0x14EE72, // N
|
||||
0x1AE188, // o
|
||||
0x1FD49E, // d
|
||||
0x25C6B4, // e
|
||||
0x2AB9CA, // x
|
||||
)
|
||||
val result = Component.empty()
|
||||
result.append(Component.literal("§7["))
|
||||
for (i in text.indices) {
|
||||
result.append(
|
||||
Component.literal(text[i].toString())
|
||||
.setStyle(Style.EMPTY.withColor(TextColor.fromRgb(colors[i])))
|
||||
)
|
||||
}
|
||||
result.append(Component.literal("§7]"))
|
||||
return result
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package io.github.frostzie.nodex.loader.minecraft
|
||||
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.network.chat.Component
|
||||
import net.minecraft.world.level.storage.LevelResource
|
||||
import java.nio.file.Path
|
||||
|
||||
/**
|
||||
* Bridge to allow the main project to interact with Minecraft
|
||||
* without direct dependency on its classes.
|
||||
*/
|
||||
object MCInterface {
|
||||
/**
|
||||
* Sends a command as the current player.
|
||||
*/
|
||||
fun sendCommand(command: String) {
|
||||
Minecraft.getInstance().player?.connection?.sendCommand(command)
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a task on the main Minecraft thread.
|
||||
*/
|
||||
fun runOnRenderThread(action: () -> Unit) {
|
||||
Minecraft.getInstance()?.execute(action)
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a client-side chat message to the player.
|
||||
*/
|
||||
fun displayClientMessage(message: Component, actionBar: Boolean = false) {
|
||||
Minecraft.getInstance().player?.displayClientMessage(message, actionBar)
|
||||
}
|
||||
|
||||
// World State Checks
|
||||
val isWorldOpen: Boolean get() = Minecraft.getInstance().level != null
|
||||
val isSingleplayer: Boolean get() = Minecraft.getInstance().singleplayerServer != null
|
||||
val isServer: Boolean get() = Minecraft.getInstance().currentServer != null
|
||||
|
||||
/**
|
||||
* Gets the path to the current world (if in singleplayer).
|
||||
*/
|
||||
fun getWorldPath(): Path? {
|
||||
return Minecraft.getInstance().singleplayerServer?.getWorldPath(LevelResource.ROOT)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the game directory path.
|
||||
*/
|
||||
fun getGamePath(): Path? {
|
||||
return Minecraft.getInstance().gameDirectory?.toPath()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package io.github.frostzie.nodex.modules.bars
|
||||
|
||||
import io.github.frostzie.nodex.loader.fabric.ModVersion
|
||||
import javafx.beans.property.SimpleStringProperty
|
||||
|
||||
object BottomBarModule {
|
||||
|
||||
val cursorPositionProperty = SimpleStringProperty("")
|
||||
val encodingProperty = SimpleStringProperty("UTF-8")
|
||||
val ideVersionProperty = SimpleStringProperty("DataPack IDE v${ModVersion.current}")
|
||||
|
||||
fun updateCursorPosition(line: Int, column: Int) {
|
||||
cursorPositionProperty.set("Ln $line, Col $column")
|
||||
}
|
||||
|
||||
fun updateEncoding(encoding: String) {
|
||||
encodingProperty.set(encoding)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package io.github.frostzie.nodex.modules.bars
|
||||
|
||||
import io.github.frostzie.nodex.events.DirectorySelected
|
||||
import io.github.frostzie.nodex.events.EventBus
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import io.github.frostzie.nodex.utils.file.DirectoryChooseUtils
|
||||
import javafx.stage.DirectoryChooser
|
||||
import javafx.stage.Stage
|
||||
|
||||
class LeftBarModule(private val parentStage: Stage) {
|
||||
private val logger = LoggerProvider.getLogger("LeftBarModule")
|
||||
|
||||
fun openDirectoryChooser() {
|
||||
val directoryChooser = DirectoryChooser().apply {
|
||||
try {
|
||||
val datapackPath = DirectoryChooseUtils.getDatapackPath()
|
||||
if (DirectoryChooseUtils.isSingleplayer() && datapackPath != null) {
|
||||
initialDirectory = datapackPath.toFile()
|
||||
} else {
|
||||
initialDirectory = DirectoryChooseUtils.getInstancePath()?.toFile()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
logger.warn("Could not set initial directory", e)
|
||||
}
|
||||
}
|
||||
|
||||
val selectedDirectory = directoryChooser.showDialog(parentStage)
|
||||
if (selectedDirectory != null) {
|
||||
EventBus.post(DirectorySelected(selectedDirectory.toPath()))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package io.github.frostzie.nodex.modules.bars.top
|
||||
|
||||
import io.github.frostzie.nodex.ingame.ReloadDataPacksCommand
|
||||
import io.github.frostzie.nodex.events.EventBus
|
||||
import io.github.frostzie.nodex.events.MainWindowMaximizedStateChanged
|
||||
import io.github.frostzie.nodex.modules.universal.UniversalPackManager
|
||||
import io.github.frostzie.nodex.project.WorkspaceManager
|
||||
import io.github.frostzie.nodex.screen.MainApplication
|
||||
import io.github.frostzie.nodex.settings.categories.MainConfig
|
||||
import javafx.geometry.Rectangle2D
|
||||
import javafx.stage.Screen
|
||||
import javafx.stage.Stage
|
||||
import net.minecraft.Util
|
||||
import java.nio.file.Path
|
||||
|
||||
class TopBarViewModel(private val stage: Stage?) {
|
||||
|
||||
private var previousBounds: Rectangle2D? = null
|
||||
var isMaximized: Boolean = false
|
||||
|
||||
fun minimize() {
|
||||
stage?.isIconified = true
|
||||
}
|
||||
|
||||
fun maximize() {
|
||||
stage?.let {
|
||||
val screen = Screen.getScreensForRectangle(it.x, it.y, it.width, it.height).firstOrNull() ?: Screen.getPrimary()
|
||||
val visualBounds = screen.visualBounds
|
||||
|
||||
previousBounds = Rectangle2D(it.x, it.y, it.width, it.height)
|
||||
it.x = visualBounds.minX
|
||||
it.y = visualBounds.minY
|
||||
it.width = visualBounds.width
|
||||
it.height = visualBounds.height
|
||||
|
||||
isMaximized = true
|
||||
EventBus.post(MainWindowMaximizedStateChanged(true))
|
||||
}
|
||||
}
|
||||
|
||||
fun restore() {
|
||||
previousBounds?.let { bounds ->
|
||||
stage?.let { stg ->
|
||||
stg.x = bounds.minX
|
||||
stg.y = bounds.minY
|
||||
stg.width = bounds.width
|
||||
stg.height = bounds.height
|
||||
|
||||
isMaximized = false
|
||||
EventBus.post(MainWindowMaximizedStateChanged(false))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun toggleMaximize() {
|
||||
if (isMaximized) {
|
||||
restore()
|
||||
} else {
|
||||
maximize()
|
||||
}
|
||||
}
|
||||
|
||||
fun hideWindow() {
|
||||
MainApplication.hideMainWindow()
|
||||
}
|
||||
|
||||
fun reloadDatapacks() {
|
||||
val root = WorkspaceManager.currentWorkspaceRoot
|
||||
if (root != null && MainConfig.universalFolderToggle.get() && MainConfig.universalDatapackToggle.get()) {
|
||||
if (UniversalPackManager.isUniversalProject(root)) {
|
||||
UniversalPackManager.mirrorToWorld(root)
|
||||
}
|
||||
}
|
||||
ReloadDataPacksCommand.reload()
|
||||
}
|
||||
|
||||
fun openWorkspaceFolder() {
|
||||
WorkspaceManager.currentWorkspaceRoot?.let {
|
||||
Util.getPlatform().openFile(it.toFile())
|
||||
}
|
||||
}
|
||||
|
||||
fun importProject(path: Path) {
|
||||
WorkspaceManager.addProject(path)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,353 @@
|
||||
package io.github.frostzie.nodex.modules.main
|
||||
|
||||
import io.github.frostzie.nodex.events.DirectorySelected
|
||||
import io.github.frostzie.nodex.events.EventBus
|
||||
import io.github.frostzie.nodex.events.FileMoved
|
||||
import io.github.frostzie.nodex.events.MoveFile
|
||||
import io.github.frostzie.nodex.events.ToggleFileTree
|
||||
import io.github.frostzie.nodex.events.WorkspaceUpdated
|
||||
import io.github.frostzie.nodex.project.Project
|
||||
import io.github.frostzie.nodex.project.WorkspaceManager
|
||||
import io.github.frostzie.nodex.screen.elements.main.FileTreeItem
|
||||
import io.github.frostzie.nodex.services.FileService
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import io.github.frostzie.nodex.utils.file.FileSystemUpdate
|
||||
import javafx.application.Platform
|
||||
import javafx.beans.property.SimpleBooleanProperty
|
||||
import java.nio.file.Files
|
||||
import javafx.beans.property.SimpleObjectProperty
|
||||
import javafx.scene.control.TreeItem
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.launch
|
||||
import java.nio.file.Path
|
||||
import java.nio.file.Paths
|
||||
import kotlin.io.path.isDirectory
|
||||
|
||||
class FileTreeViewModel {
|
||||
private val logger = LoggerProvider.getLogger("FileTreeViewModel")
|
||||
|
||||
// The invisible root of the TreeView. Its children are the Project roots.
|
||||
val root = SimpleObjectProperty<TreeItem<FileTreeItem>>()
|
||||
val isVisible = SimpleBooleanProperty(true)
|
||||
|
||||
private val scope = CoroutineScope(Dispatchers.Default + SupervisorJob())
|
||||
|
||||
// Track expanded paths for persistence
|
||||
private val expandedPaths = mutableSetOf<Path>()
|
||||
private var isRestoringExpansion = false
|
||||
|
||||
init {
|
||||
val dummyRoot = TreeItem(FileTreeItem(Paths.get("Workspace"), "Workspace"))
|
||||
dummyRoot.isExpanded = true
|
||||
root.set(dummyRoot)
|
||||
|
||||
EventBus.register(this)
|
||||
|
||||
// Initial load if workspace is already ready
|
||||
updateWorkspace(WorkspaceManager.workspace.projects)
|
||||
}
|
||||
|
||||
fun cleanup() {
|
||||
scope.cancel()
|
||||
EventBus.unregister(this)
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
@SubscribeEvent
|
||||
fun onToggleFileTree(event: ToggleFileTree) {
|
||||
isVisible.set(!isVisible.get())
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the "Open Folder" action.
|
||||
*/
|
||||
@Suppress("unused")
|
||||
@SubscribeEvent
|
||||
fun onDirectorySelected(event: DirectorySelected) {
|
||||
logger.info("Opening single directory as project: ${event.directoryPath}")
|
||||
WorkspaceManager.openSingleProject(event.directoryPath)
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
@SubscribeEvent
|
||||
fun onWorkspaceUpdated(event: WorkspaceUpdated) {
|
||||
updateWorkspace(event.workspace.projects)
|
||||
}
|
||||
|
||||
private fun updateWorkspace(projects: List<Project>) {
|
||||
// Run on background thread to avoid blocking UI with IO
|
||||
scope.launch {
|
||||
// Load saved expansion state
|
||||
val state = WorkspaceManager.getCurrentState()
|
||||
isRestoringExpansion = true
|
||||
expandedPaths.clear()
|
||||
expandedPaths.addAll(state.expandedPaths)
|
||||
|
||||
// 2. Update the UI Tree
|
||||
Platform.runLater {
|
||||
val rootNode = root.get()
|
||||
|
||||
// Remove nodes that are no longer in the project list
|
||||
rootNode.children.removeIf { item ->
|
||||
val path = item.value?.path
|
||||
path != null && projects.none { it.path == path }
|
||||
}
|
||||
|
||||
// Add or Update nodes
|
||||
projects.forEach { project ->
|
||||
val existingNode = rootNode.children.find { it.value?.path == project.path }
|
||||
if (existingNode == null) {
|
||||
// Create new project node
|
||||
val projectNode = TreeItem(FileTreeItem(project.path, project.name))
|
||||
projectNode.isExpanded = true // Auto-expand project roots
|
||||
|
||||
// Load children asynchronously
|
||||
scope.launch {
|
||||
val children = loadChildren(project.path)
|
||||
Platform.runLater {
|
||||
projectNode.children.setAll(children)
|
||||
restoreExpandedPaths(projectNode) // Try to restore
|
||||
}
|
||||
}
|
||||
rootNode.children.add(projectNode)
|
||||
|
||||
// Add listener to project root itself
|
||||
addExpansionListener(projectNode, project.path)
|
||||
}
|
||||
}
|
||||
isRestoringExpansion = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun restoreExpandedPaths(node: TreeItem<FileTreeItem>) {
|
||||
if (node.value == null) return
|
||||
|
||||
// Check children
|
||||
node.children.forEach { child ->
|
||||
val childPath = child.value?.path
|
||||
if (childPath != null && childPath in expandedPaths) {
|
||||
child.isExpanded = true
|
||||
restoreExpandedPaths(child)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
@SubscribeEvent
|
||||
fun onFileMoved(event: MoveFile) {
|
||||
logger.debug("Moving file from {}\nto {}", event.sourcePath, event.targetPath)
|
||||
try {
|
||||
WorkspaceManager.ignoreWatcherPath(event.sourcePath)
|
||||
WorkspaceManager.ignoreWatcherPath(event.targetPath)
|
||||
|
||||
FileService.move(event.sourcePath, event.targetPath)
|
||||
|
||||
EventBus.post(FileMoved(event.sourcePath, event.targetPath))
|
||||
|
||||
refreshNode(event.sourcePath.parent)
|
||||
refreshNode(event.targetPath.parent)
|
||||
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to move file: ${event.sourcePath}", e)
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onFileSystemUpdate(event: FileSystemUpdate) {
|
||||
refreshNode(event.path)
|
||||
}
|
||||
|
||||
private fun refreshNode(path: Path?) {
|
||||
if (path == null) return
|
||||
|
||||
// If the path to refresh doesn't exist (it was just renamed/deleted)
|
||||
// refresh its parent to update the tree structure.
|
||||
if (!FileService.isDirectory(path) && !Files.exists(path)) {
|
||||
refreshNode(path.parent)
|
||||
return
|
||||
}
|
||||
|
||||
Platform.runLater {
|
||||
var currentPath = path
|
||||
var targetNode: TreeItem<FileTreeItem>? = null
|
||||
|
||||
// Find the closest existing ancestor node
|
||||
while (currentPath != null && targetNode == null) {
|
||||
targetNode = findNode(root.get(), currentPath)
|
||||
if (targetNode == null) {
|
||||
currentPath = currentPath.parent
|
||||
}
|
||||
}
|
||||
|
||||
if (targetNode != null && targetNode.isExpanded) {
|
||||
val nodeToRefresh = targetNode
|
||||
val pathToRefresh = nodeToRefresh.value.path
|
||||
|
||||
scope.launch {
|
||||
val children = loadChildren(pathToRefresh)
|
||||
Platform.runLater {
|
||||
nodeToRefresh.children.setAll(children)
|
||||
restoreExpandedPaths(nodeToRefresh)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun findNode(root: TreeItem<FileTreeItem>, path: Path): TreeItem<FileTreeItem>? {
|
||||
if (root.value?.path == path) return root
|
||||
|
||||
// Optimization: Check if path belongs to this branch
|
||||
if (root.value?.displayName == "Workspace") {
|
||||
for (child in root.children) {
|
||||
if (path.startsWith(child.value.path)) {
|
||||
return findNode(child, path)
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
for (child in root.children) {
|
||||
val childPath = child.value?.path ?: continue
|
||||
if (path == childPath) return child
|
||||
if (path.startsWith(childPath)) {
|
||||
return findNode(child, path)
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the children for a given directory, sorting them and compacting empty parent directories.
|
||||
*/
|
||||
private fun loadChildren(directory: Path): List<TreeItem<FileTreeItem>> {
|
||||
return try {
|
||||
// This set tracks paths that have been processed as part of a compacted directory
|
||||
// to avoid adding them as duplicate, separate entries in the tree.
|
||||
val processedPaths = mutableSetOf<Path>()
|
||||
FileService.listDirectory(directory)
|
||||
.sortedWith(compareBy<Path> { !it.isDirectory() }.thenComparator { a, b ->
|
||||
naturalOrderComparator.compare(a.fileName.toString(), b.fileName.toString())
|
||||
})
|
||||
.mapNotNull { entry ->
|
||||
if (entry in processedPaths) return@mapNotNull null
|
||||
|
||||
if (entry.isDirectory()) {
|
||||
val (finalPath, displayName) = findCompactedPath(entry)
|
||||
var current = finalPath
|
||||
while (current != entry.parent) {
|
||||
if (current != entry) processedPaths.add(current)
|
||||
current = current.parent ?: break
|
||||
}
|
||||
createNode(FileTreeItem(finalPath, displayName))
|
||||
} else {
|
||||
createNode(FileTreeItem(entry, entry.fileName.toString()))
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to load children for directory: $directory", e)
|
||||
emptyList()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compacts chains of single-child directories into a single, dot-separated display name.
|
||||
* For example, a structure like `src/main/kotlin` where `src` and `main` only contain
|
||||
* one directory will be treated as a single logical node with the display name "src.main.kotlin".
|
||||
*
|
||||
* @param startPath The initial directory to begin compaction from.
|
||||
* @return A Pair containing the final, deepest path in the chain and the compacted display name.
|
||||
*/ //TODO: Add settings to change separation character
|
||||
private fun findCompactedPath(startPath: Path): Pair<Path, String> {
|
||||
var currentPath = startPath
|
||||
val nameParts = mutableListOf(startPath.fileName.toString())
|
||||
|
||||
while (true) {
|
||||
val entries = FileService.listDirectory(currentPath)
|
||||
if (entries.size == 1 && entries.first().isDirectory()) {
|
||||
currentPath = entries.first()
|
||||
nameParts.add(currentPath.fileName.toString())
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return Pair(currentPath, nameParts.joinToString("."))
|
||||
}
|
||||
|
||||
private fun createNode(itemData: FileTreeItem): TreeItem<FileTreeItem> {
|
||||
val treeItem = TreeItem(itemData)
|
||||
|
||||
addExpansionListener(treeItem, itemData.path)
|
||||
|
||||
if (itemData.path.isDirectory()) {
|
||||
treeItem.children.add(TreeItem()) // Fake item for expandability
|
||||
|
||||
treeItem.expandedProperty().addListener { _, _, isExpanded ->
|
||||
if (isExpanded && treeItem.children.firstOrNull()?.value == null) {
|
||||
scope.launch {
|
||||
val children = loadChildren(itemData.path)
|
||||
Platform.runLater {
|
||||
treeItem.children.setAll(children)
|
||||
restoreExpandedPaths(treeItem) // Restore children state
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return treeItem
|
||||
}
|
||||
|
||||
private fun addExpansionListener(item: TreeItem<FileTreeItem>, path: Path) {
|
||||
item.expandedProperty().addListener { _, _, isExpanded ->
|
||||
if (isRestoringExpansion) return@addListener
|
||||
|
||||
if (isExpanded) {
|
||||
expandedPaths.add(path)
|
||||
} else {
|
||||
expandedPaths.remove(path)
|
||||
}
|
||||
WorkspaceManager.updateExpandedPaths(expandedPaths)
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Move to utils
|
||||
private val naturalOrderComparator = Comparator<String> { a, b ->
|
||||
var i = 0
|
||||
var j = 0
|
||||
|
||||
while (i < a.length && j < b.length) {
|
||||
val ca = a[i]
|
||||
val cb = b[j]
|
||||
|
||||
if (ca.isDigit() && cb.isDigit()) {
|
||||
var na = StringBuilder()
|
||||
var nb = StringBuilder()
|
||||
|
||||
while (i < a.length && a[i].isDigit()) {
|
||||
na.append(a[i])
|
||||
i++
|
||||
}
|
||||
while (j < b.length && b[j].isDigit()) {
|
||||
nb.append(b[j])
|
||||
j++
|
||||
}
|
||||
|
||||
val lenDiff = na.length - nb.length
|
||||
val diff = if (lenDiff != 0 ) lenDiff else na.toString().compareTo(nb.toString())
|
||||
if (diff != 0) return@Comparator diff
|
||||
} else {
|
||||
val diff = ca.lowercaseChar() - cb.lowercaseChar()
|
||||
if (diff != 0) return@Comparator diff
|
||||
i++
|
||||
j++
|
||||
}
|
||||
}
|
||||
|
||||
a.length - b.length
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,421 @@
|
||||
package io.github.frostzie.nodex.modules.main
|
||||
|
||||
import io.github.frostzie.nodex.events.*
|
||||
import io.github.frostzie.nodex.modules.bars.BottomBarModule
|
||||
import io.github.frostzie.nodex.project.WorkspaceManager
|
||||
import io.github.frostzie.nodex.services.FileService
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import javafx.application.Platform
|
||||
import javafx.beans.InvalidationListener
|
||||
import javafx.beans.property.BooleanProperty
|
||||
import javafx.beans.property.IntegerProperty
|
||||
import javafx.beans.property.SimpleBooleanProperty
|
||||
import javafx.beans.property.SimpleIntegerProperty
|
||||
import javafx.beans.property.SimpleObjectProperty
|
||||
import javafx.collections.FXCollections
|
||||
import javafx.collections.ObservableList
|
||||
import javafx.beans.value.ChangeListener
|
||||
import javafx.beans.property.SimpleStringProperty
|
||||
import javafx.beans.property.StringProperty
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import java.util.UUID
|
||||
|
||||
/**
|
||||
* ViewModel for the text editor that manages multiple tabs.
|
||||
* Each tab represents an open file with its own CodeArea instance.
|
||||
*/
|
||||
class TextEditorViewModel {
|
||||
private val logger = LoggerProvider.getLogger("TextEditorViewModel")
|
||||
|
||||
enum class EditorAction {
|
||||
UNDO, REDO, CUT, COPY, PASTE, SELECT_ALL
|
||||
}
|
||||
|
||||
val currentAction = SimpleObjectProperty<EditorAction?>(null)
|
||||
|
||||
/**
|
||||
* Data class representing a single editor tab
|
||||
*/
|
||||
data class TabData(
|
||||
val id: String = UUID.randomUUID().toString(),
|
||||
val filePath: Path,
|
||||
val displayName: String,
|
||||
val content: StringProperty = SimpleStringProperty(""),
|
||||
val isDirty: BooleanProperty = SimpleBooleanProperty(false),
|
||||
// Listeners to be managed for cleanup
|
||||
var isDirtyListener: ChangeListener<Boolean>? = null
|
||||
)
|
||||
|
||||
// Observable list of all open tabs
|
||||
val tabs: ObservableList<TabData> = FXCollections.observableArrayList()
|
||||
|
||||
// Currently active tab //TODO: Fix: (External renaming) FileX -> FileY then FolderX -> FolderY then focus app = dir as tab...
|
||||
val activeTab = SimpleObjectProperty<TabData?>()
|
||||
|
||||
// Current line and column of the caret in the active editor
|
||||
val currentLine: IntegerProperty = SimpleIntegerProperty(1)
|
||||
val currentColumn: IntegerProperty = SimpleIntegerProperty(1)
|
||||
|
||||
private var isRestoringSession = false
|
||||
|
||||
init {
|
||||
EventBus.register(this)
|
||||
|
||||
// Listen for tab changes to persist state
|
||||
tabs.addListener(InvalidationListener {
|
||||
persistState()
|
||||
})
|
||||
|
||||
activeTab.addListener { _, _, newTab ->
|
||||
persistState()
|
||||
EventBus.post(ActiveTabChangedEvent(newTab?.filePath))
|
||||
}
|
||||
|
||||
// Initial session restoration for when the VM is created after WorkspaceManager is already ready
|
||||
Platform.runLater {
|
||||
restoreSession()
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onWorkspaceUpdated(event: WorkspaceUpdated) {
|
||||
// Reload open files from session state
|
||||
if (isRestoringSession) return
|
||||
|
||||
Platform.runLater {
|
||||
restoreSession()
|
||||
}
|
||||
}
|
||||
|
||||
private fun restoreSession() {
|
||||
isRestoringSession = true
|
||||
try {
|
||||
val state = WorkspaceManager.getCurrentState()
|
||||
val savedFiles = state.openFiles
|
||||
val lastActive = state.activeFile
|
||||
|
||||
// Close existing tabs that are not in the new session (e.g. on reset or project switch)
|
||||
val toClose = tabs.filter { it.filePath !in savedFiles }
|
||||
|
||||
// Close removed tabs
|
||||
toClose.forEach { closeTab(it, persist = false) }
|
||||
|
||||
// Close tabs that are in the session but missing on disk (prevent resurrection)
|
||||
val missingTabs = tabs.filter { it.filePath in savedFiles && !Files.exists(it.filePath) }
|
||||
missingTabs.forEach { closeTab(it, persist = false, save = false) }
|
||||
|
||||
val currentPaths = tabs.map { it.filePath }.toSet()
|
||||
|
||||
// Open new files
|
||||
savedFiles.forEach { path ->
|
||||
if (path !in currentPaths && Files.exists(path)) {
|
||||
createNewTab(path)
|
||||
}
|
||||
}
|
||||
|
||||
// Restore active tab
|
||||
if (lastActive != null) {
|
||||
val tab = tabs.find { it.filePath == lastActive }
|
||||
if (tab != null) {
|
||||
activeTab.set(tab)
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
isRestoringSession = false
|
||||
}
|
||||
}
|
||||
|
||||
private fun persistState() {
|
||||
if (isRestoringSession) return
|
||||
|
||||
val openPaths = tabs.map { it.filePath }.toSet()
|
||||
val activePath = activeTab.get()?.filePath
|
||||
|
||||
val currentState = WorkspaceManager.getCurrentState()
|
||||
if (openPaths != currentState.openFiles || activePath != currentState.activeFile) {
|
||||
WorkspaceManager.updateOpenFiles(openPaths, activePath)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a file in the editor. If the file is already open, switch to that tab.
|
||||
* Otherwise, create a new tab.
|
||||
*/
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onOpenFile(event: OpenFile) {
|
||||
Platform.runLater {
|
||||
val existingTab = tabs.find { it.filePath == event.path }
|
||||
if (existingTab != null) {
|
||||
logger.info("File already open, switching to tab: ${event.path.fileName}")
|
||||
activeTab.set(existingTab)
|
||||
return@runLater
|
||||
}
|
||||
|
||||
logger.debug("Opening new file in tab: {}", event.path.fileName)
|
||||
createNewTab(event.path)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves all modified files
|
||||
*/
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onSaveAll(event: SaveAllFiles) {
|
||||
logger.debug("Saving all modified files...")
|
||||
tabs.filter { it.isDirty.get() }.forEach { saveFile(it) }
|
||||
}
|
||||
|
||||
// Currently only used for while editing Theme, but overall file saving should move out of this
|
||||
//TODO: should be stricter MVVM
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onSaveFile(event: SaveFileEvent) {
|
||||
Platform.runLater {
|
||||
val tab = tabs.find { it.filePath == event.path }
|
||||
if (tab != null) {
|
||||
saveFile(tab)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onEditorUndo(event: EditorUndo) {
|
||||
currentAction.set(EditorAction.UNDO)
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onEditorRedo(event: EditorRedo) {
|
||||
currentAction.set(EditorAction.REDO)
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onEditorCut(event: EditorCut) {
|
||||
currentAction.set(EditorAction.CUT)
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onEditorCopy(event: EditorCopy) {
|
||||
currentAction.set(EditorAction.COPY)
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onEditorPaste(event: EditorPaste) {
|
||||
currentAction.set(EditorAction.PASTE)
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onEditorSelectAll(event: EditorSelectAll) {
|
||||
currentAction.set(EditorAction.SELECT_ALL)
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onFileModified(event: FileModified) {
|
||||
Platform.runLater {
|
||||
val tab = tabs.find { it.filePath == event.path } ?: return@runLater
|
||||
// Only reload if not dirty to avoid overwriting user changes (Maybe add de-sync notification)
|
||||
if (!tab.isDirty.get()) {
|
||||
try {
|
||||
val newContent = FileService.readText(event.path)
|
||||
tab.content.set(newContent)
|
||||
// Reset dirty state since this is a sync with disk
|
||||
tab.isDirty.set(false)
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to reload modified file: ${event.path}", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onFileDeleted(event: FileDeleted) {
|
||||
Platform.runLater {
|
||||
val tab = tabs.find { it.filePath == event.path } ?: return@runLater
|
||||
// Close the tab without trying to save, as the file is gone
|
||||
closeTab(tab, save = false)
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onFileMoved(event: FileMoved) {
|
||||
Platform.runLater {
|
||||
val oldTab = tabs.find { it.filePath == event.oldPath } ?: return@runLater
|
||||
|
||||
// Detach old listeners
|
||||
oldTab.isDirtyListener?.let { oldTab.isDirty.removeListener(it) }
|
||||
|
||||
// Create new TabData with an updated path but same CodeArea/ID
|
||||
val newTab = oldTab.copy(
|
||||
filePath = event.newPath,
|
||||
displayName = event.newPath.fileName.toString(),
|
||||
isDirtyListener = null
|
||||
)
|
||||
|
||||
// Setup listeners on new tab data
|
||||
setupTabListeners(newTab)
|
||||
|
||||
// Update dirtyFiles set if it was dirty
|
||||
if (oldTab.isDirty.get()) {
|
||||
WorkspaceManager.dirtyFiles.remove(oldTab.filePath)
|
||||
WorkspaceManager.dirtyFiles.add(newTab.filePath)
|
||||
}
|
||||
|
||||
val index = tabs.indexOf(oldTab)
|
||||
if (index != -1) {
|
||||
tabs[index] = newTab
|
||||
}
|
||||
|
||||
// Note: TextEditorView's addTab automatically selects the new tab, so activeTab update is handled there.
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new tab for the given file path
|
||||
*/
|
||||
private fun createNewTab(filePath: Path) {
|
||||
try {
|
||||
// Safety Guard: Never open a directory as a tab
|
||||
if (FileService.isDirectory(filePath)) {
|
||||
logger.warn("Attempted to open a directory as a tab: $filePath")
|
||||
return
|
||||
}
|
||||
|
||||
// Read file content
|
||||
val contentText = FileService.readText(filePath)
|
||||
logger.debug("Read file content: {} ({} characters)", filePath.fileName, contentText.length)
|
||||
|
||||
val tabData = TabData(
|
||||
filePath = filePath,
|
||||
displayName = filePath.fileName.toString(),
|
||||
content = SimpleStringProperty(contentText)
|
||||
)
|
||||
|
||||
setupTabListeners(tabData)
|
||||
|
||||
// Insert after the currently active tab, or at the end if none is active
|
||||
val active = activeTab.get()
|
||||
val index = if (active != null) {
|
||||
val activeIndex = tabs.indexOf(active)
|
||||
if (activeIndex != -1) activeIndex + 1 else tabs.size
|
||||
} else {
|
||||
tabs.size
|
||||
}
|
||||
|
||||
tabs.add(index.coerceIn(0, tabs.size), tabData)
|
||||
|
||||
activeTab.set(tabData)
|
||||
|
||||
logger.debug("Tab created for file: {}", filePath.fileName)
|
||||
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to create tab for file: ${filePath.fileName}", e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupTabListeners(tabData: TabData) {
|
||||
tabData.isDirtyListener = ChangeListener { _, _, isDirty ->
|
||||
if (isDirty) {
|
||||
WorkspaceManager.dirtyFiles.add(tabData.filePath)
|
||||
} else {
|
||||
WorkspaceManager.dirtyFiles.remove(tabData.filePath)
|
||||
}
|
||||
}.also { tabData.isDirty.addListener(it) }
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the line and column properties.
|
||||
*/
|
||||
fun updateLineAndColumn(line: Int, column: Int) {
|
||||
currentLine.set(line)
|
||||
currentColumn.set(column)
|
||||
BottomBarModule.updateCursorPosition(line, column)
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the specified tab and auto-saves before closing
|
||||
*/
|
||||
fun closeTab(tabData: TabData, persist: Boolean = true, save: Boolean = true) {
|
||||
logger.debug("Closing tab: ${tabData.displayName}")
|
||||
|
||||
if (save) {
|
||||
// Auto-save before closing
|
||||
try {
|
||||
saveFile(tabData)
|
||||
logger.debug("Auto-saved file before closing: ${tabData.displayName}")
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to auto-save before closing: ${tabData.displayName}", e)
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure the path is removed from the global dirty set
|
||||
WorkspaceManager.dirtyFiles.remove(tabData.filePath)
|
||||
|
||||
// Remove listeners to prevent memory leaks
|
||||
tabData.isDirtyListener?.let { tabData.isDirty.removeListener(it) }
|
||||
tabData.isDirtyListener = null
|
||||
|
||||
tabs.remove(tabData)
|
||||
|
||||
// If the closed tab was active, switch to another tab
|
||||
if (activeTab.get() == tabData) {
|
||||
activeTab.set(tabs.firstOrNull())
|
||||
}
|
||||
|
||||
if (persist) persistState()
|
||||
}
|
||||
|
||||
// Overload for API compatibility if needed elsewhere
|
||||
fun closeTab(tabData: TabData) {
|
||||
closeTab(tabData, persist = true, save = true)
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the active tab's content
|
||||
*/
|
||||
fun saveActiveTab() {
|
||||
val tab = activeTab.get() ?: return
|
||||
saveFile(tab)
|
||||
logger.info("Manually saved file: ${tab.displayName}")
|
||||
}
|
||||
|
||||
private fun saveFile(tabData: TabData) {
|
||||
try {
|
||||
// Safety guard: Never try to write content to a directory path
|
||||
// This prevents crashes if a tab accidentally points to a directory
|
||||
if (FileService.isDirectory(tabData.filePath)) {
|
||||
logger.warn("Attempted to save to a directory path: ${tabData.filePath}. Aborting save!")
|
||||
tabData.isDirty.set(false)
|
||||
return
|
||||
}
|
||||
|
||||
val content = tabData.content.get()
|
||||
WorkspaceManager.ignoreWatcherPath(tabData.filePath)
|
||||
FileService.writeText(tabData.filePath, content)
|
||||
tabData.isDirty.set(false)
|
||||
logger.debug("File saved: {} ({} characters)", tabData.filePath.fileName, content.length)
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to save file: ${tabData.filePath.fileName}", e)
|
||||
// TODO: Show error notification to user
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup method to be called when the editor is closed
|
||||
*/
|
||||
fun cleanup() {
|
||||
// Auto-save all tabs before cleanup
|
||||
tabs.forEach { tab ->
|
||||
try {
|
||||
saveFile(tab)
|
||||
logger.debug("Auto-saved during cleanup: ${tab.displayName}")
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to auto-save during cleanup: ${tab.displayName}", e)
|
||||
}
|
||||
}
|
||||
|
||||
tabs.clear()
|
||||
activeTab.set(null)
|
||||
EventBus.unregister(this)
|
||||
logger.info("TextEditorViewModel cleaned up")
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package io.github.frostzie.nodex.modules.popup.file
|
||||
|
||||
import io.github.frostzie.nodex.events.EventBus
|
||||
import io.github.frostzie.nodex.events.FileOverrideConfirmed
|
||||
import io.github.frostzie.nodex.events.MoveFile
|
||||
import javafx.beans.property.SimpleStringProperty
|
||||
import java.nio.file.Path
|
||||
|
||||
class FileOverrideDialogViewModel(
|
||||
private val sourcePath: Path,
|
||||
private val targetPath: Path
|
||||
) {
|
||||
val headerText = SimpleStringProperty("Confirm Overwrite")
|
||||
val contentText = SimpleStringProperty()
|
||||
|
||||
init {
|
||||
val fileName = targetPath.fileName?.toString() ?: targetPath.toString()
|
||||
contentText.set("The destination already has a file named \"$fileName\".\nDo you want to replace it?")
|
||||
}
|
||||
|
||||
fun confirm() {
|
||||
EventBus.post(FileOverrideConfirmed(sourcePath, targetPath))
|
||||
EventBus.post(MoveFile(sourcePath, targetPath))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package io.github.frostzie.nodex.modules.popup.file
|
||||
|
||||
import io.github.frostzie.nodex.screen.elements.popup.file.FileOverrideDialogView
|
||||
import io.github.frostzie.nodex.screen.elements.popup.file.MoveConfirmationView
|
||||
import javafx.application.Platform
|
||||
import javafx.stage.Stage
|
||||
import java.nio.file.Path
|
||||
|
||||
/**
|
||||
* A module responsible for creating and managing file-operation-related popups.
|
||||
*
|
||||
* This class acts as a factory for various file dialogs, [MoveConfirmationView]. (More to come)
|
||||
* It is responsible for creating the necessary ViewModels and Views, ensuring that the logic is
|
||||
* decoupled from the event handlers that trigger these dialogs.
|
||||
*
|
||||
* @param parentStage The main application stage, used as the owner for the popups.
|
||||
*/
|
||||
class FilePopupModule(private val parentStage: Stage) {
|
||||
/**
|
||||
* Creates a dialog to confirm a file or directory moval.
|
||||
*
|
||||
* This function sets up the [MoveConfirmationViewModel] with the initial paths
|
||||
* and then constructs and shows the [MoveConfirmationView].
|
||||
*
|
||||
* @param sourcePath The path of the file or directory being moved.
|
||||
* @param targetPath The initial proposed destination path for the item.
|
||||
*/
|
||||
fun showMoveConfirmation(sourcePath: Path, targetPath: Path) {
|
||||
Platform.runLater {
|
||||
val viewModel = MoveConfirmationViewModel(sourcePath)
|
||||
viewModel.targetDirectory.set(targetPath.parent.toString())
|
||||
MoveConfirmationView(viewModel, parentStage).show()
|
||||
}
|
||||
}
|
||||
|
||||
fun showFileOverrideDialog(sourcePath: Path, targetPath: Path) {
|
||||
Platform.runLater {
|
||||
val viewModel = FileOverrideDialogViewModel(sourcePath, targetPath)
|
||||
FileOverrideDialogView(viewModel, parentStage).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package io.github.frostzie.nodex.modules.popup.file
|
||||
|
||||
import io.github.frostzie.nodex.events.EventBus
|
||||
import io.github.frostzie.nodex.events.MoveFile
|
||||
import io.github.frostzie.nodex.events.RequestFileOverride
|
||||
import javafx.beans.property.SimpleStringProperty
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.InvalidPathException
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.isDirectory
|
||||
|
||||
class MoveConfirmationViewModel(
|
||||
private val sourcePath: Path
|
||||
) {
|
||||
val sourcePathLabel = SimpleStringProperty()
|
||||
val targetDirectory = SimpleStringProperty()
|
||||
val error = SimpleStringProperty()
|
||||
|
||||
init {
|
||||
sourcePathLabel.set(buildSourcePathLabel())
|
||||
}
|
||||
|
||||
fun confirm(): Boolean {
|
||||
error.set(null)
|
||||
try {
|
||||
val targetDirValue = targetDirectory.get()?.takeIf { it.isNotBlank() } ?: run {
|
||||
error.set("Target directory cannot be empty")
|
||||
return false
|
||||
}
|
||||
val newTargetDirPath = Path.of(targetDirValue)
|
||||
if (Files.isDirectory(newTargetDirPath)) {
|
||||
val fileName = sourcePath.fileName ?: run {
|
||||
error.set("Invalid file name")
|
||||
return false
|
||||
}
|
||||
val newTargetPath = newTargetDirPath.resolve(fileName)
|
||||
if (Files.exists(newTargetPath)) {
|
||||
EventBus.post(RequestFileOverride(sourcePath, newTargetPath))
|
||||
return true
|
||||
}
|
||||
EventBus.post(MoveFile(sourcePath, newTargetPath))
|
||||
return true
|
||||
} else {
|
||||
//TODO: Add Error and Refactoring move.
|
||||
error.set("Invalid directory: Path does not exist or is not a directory.")
|
||||
return false
|
||||
}
|
||||
} catch (_: InvalidPathException) {
|
||||
error.set("Invalid path format.")
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
private fun buildSourcePathLabel(): String {
|
||||
val label = if (sourcePath.isDirectory()) "Current directory:" else "Current file:"
|
||||
return "$label $sourcePath"
|
||||
}
|
||||
}
|
||||
+256
@@ -0,0 +1,256 @@
|
||||
package io.github.frostzie.nodex.modules.popup.settings
|
||||
|
||||
import io.github.frostzie.nodex.events.*
|
||||
import io.github.frostzie.nodex.screen.elements.popup.settings.SettingsView
|
||||
import io.github.frostzie.nodex.settings.SettingsManager
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
import io.github.frostzie.nodex.settings.data.CategoryItem
|
||||
import io.github.frostzie.nodex.settings.data.CategoryType
|
||||
import io.github.frostzie.nodex.settings.data.ConfigField
|
||||
import io.github.frostzie.nodex.settings.data.SearchResult
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import javafx.scene.control.Dialog
|
||||
import io.github.frostzie.nodex.utils.UIConstants
|
||||
import io.github.frostzie.nodex.utils.ThemeManager
|
||||
import javafx.beans.value.ChangeListener
|
||||
import javafx.event.ActionEvent
|
||||
import javafx.scene.control.Button
|
||||
import javafx.scene.control.ButtonBar
|
||||
import javafx.scene.control.ButtonType
|
||||
import javafx.stage.Stage
|
||||
import io.github.frostzie.nodex.settings.categories.ThemeConfig
|
||||
|
||||
/**
|
||||
* Manages the logic for the settings window, including searching, category selection,
|
||||
* displaying settings content, and saving changes. It acts as an intermediary between
|
||||
* the settings UI elements and the [SettingsManager].
|
||||
*
|
||||
* @param parentStage The parent JavaFX Stage for the settings dialog.
|
||||
*/
|
||||
class SettingsModule(private val parentStage: Stage) {
|
||||
companion object {
|
||||
private val logger = LoggerProvider.getLogger("SettingsModule")
|
||||
// Relevance scores for search
|
||||
private const val EXACT_NAME_SCORE = 100
|
||||
private const val NAME_CONTAINS_SCORE = 50
|
||||
private const val DESC_CONTAINS_SCORE = 25
|
||||
private const val CATEGORY_NAME_SCORE = 15
|
||||
private const val CATEGORY_DESC_SCORE = 10
|
||||
}
|
||||
|
||||
private var currentQuery: String = ""
|
||||
private var settingsDialog: Dialog<ButtonType>? = null
|
||||
|
||||
init {
|
||||
EventBus.register(this)
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onImportTheme(event: ImportThemeEvent) {
|
||||
ThemeManager.importTheme(parentStage)
|
||||
}
|
||||
|
||||
@SubscribeEvent @Suppress("unused")
|
||||
fun onCloseSettings(event: CloseSettingsEvent) {
|
||||
saveSettings()
|
||||
close()
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the settings dialog if it is open.
|
||||
*/
|
||||
fun close() {
|
||||
settingsDialog?.close()
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates a search for settings based on the provided query string.
|
||||
* The search results are then posted as a [SettingsSearchResultsAvailable] event.
|
||||
*
|
||||
* @param query The search string.
|
||||
*/
|
||||
fun search(query: String) {
|
||||
this.currentQuery = query
|
||||
if (query.isBlank()) {
|
||||
EventBus.post(SettingsSearchResultsAvailable(query, emptyList()))
|
||||
} else {
|
||||
val results = searchSettings(query)
|
||||
EventBus.post(SettingsSearchResultsAvailable(query, results))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the selection of a settings category (either main or subcategory) from the navigation tree.
|
||||
* It retrieves the relevant settings fields and updates the content area of the settings window
|
||||
* by posting a [SettingsContentUpdate] event. The order of sections reflects the declaration order.
|
||||
*
|
||||
* @param item The [CategoryItem] representing the selected category.
|
||||
*/
|
||||
fun selectCategory(item: CategoryItem) {
|
||||
val sections = mutableListOf<SectionData>()
|
||||
val title: String
|
||||
var filterFields: Set<ConfigField>? = null
|
||||
|
||||
if (currentQuery.isNotBlank()) {
|
||||
filterFields = searchSettings(currentQuery).map { it.field }.toSet()
|
||||
}
|
||||
|
||||
when (item.type) {
|
||||
CategoryType.MAIN_CATEGORY -> {
|
||||
title = "${item.name} Settings"
|
||||
item.configClass?.let { configClass ->
|
||||
val nestedCategories = SettingsManager.getNestedCategories(configClass)
|
||||
nestedCategories.forEach { (subCategoryName, fields) ->
|
||||
sections.add(SectionData(subCategoryName, fields.firstOrNull()?.category?.desc, fields))
|
||||
}
|
||||
}
|
||||
}
|
||||
CategoryType.SUB_CATEGORY -> {
|
||||
title = "${item.subCategory} Settings"
|
||||
item.configClass?.let { configClass ->
|
||||
item.subCategory?.let { subCategory ->
|
||||
val nestedCategories = SettingsManager.getNestedCategories(configClass)
|
||||
val fields = nestedCategories[subCategory] ?: emptyList()
|
||||
sections.add(SectionData(subCategory, fields.firstOrNull()?.category?.desc, fields))
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> return
|
||||
}
|
||||
|
||||
EventBus.post(SettingsContentUpdate(title, sections, filterFields))
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the selection of a search result, navigating the settings tree to highlight
|
||||
* the corresponding category and field.
|
||||
*
|
||||
* @param result The [SearchResult] that was selected.
|
||||
*/
|
||||
fun selectSearchResult(result: SearchResult) {
|
||||
val categories = SettingsManager.getConfigCategories()
|
||||
val categoryIndex = categories.indexOfFirst { it.first == result.mainCategory }
|
||||
|
||||
if (categoryIndex != -1) {
|
||||
EventBus.post(SelectTreeItem(categoryIndex, result.subCategory))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the main settings window dialog.
|
||||
*/
|
||||
fun showSettingsWindow() {
|
||||
val view = SettingsView()
|
||||
|
||||
settingsDialog = Dialog<ButtonType>().apply {
|
||||
title = "Settings"
|
||||
isResizable = true
|
||||
dialogPane.content = view
|
||||
dialogPane.style = "-fx-font-size: ${ThemeConfig.fontSize.get()}px;"
|
||||
|
||||
initOwner(parentStage)
|
||||
dialogPane.minWidth = UIConstants.SETTINGS_MIN_WIDTH
|
||||
dialogPane.minHeight = UIConstants.SETTINGS_MIN_HEIGHT
|
||||
dialogPane.prefWidth = UIConstants.SETTINGS_WIDTH
|
||||
dialogPane.prefHeight = UIConstants.SETTINGS_HEIGHT
|
||||
|
||||
val applyBtn = ButtonType("Apply", ButtonBar.ButtonData.APPLY)
|
||||
val closeBtn = ButtonType("Close", ButtonBar.ButtonData.CANCEL_CLOSE)
|
||||
dialogPane.buttonTypes.addAll(applyBtn, closeBtn)
|
||||
|
||||
val applyButton = dialogPane.lookupButton(applyBtn) as Button
|
||||
applyButton.isDefaultButton = false
|
||||
applyButton.addEventFilter(ActionEvent.ACTION) { event ->
|
||||
saveSettings()
|
||||
event.consume() // Prevents the dialog from closing
|
||||
}
|
||||
}
|
||||
|
||||
val dialog = settingsDialog ?: return // Should not be null here
|
||||
|
||||
val fontSizeListener = ChangeListener<Number> { _, _, _ ->
|
||||
dialog.dialogPane.style = "-fx-font-size: ${ThemeConfig.fontSize.get()}px;"
|
||||
}
|
||||
ThemeConfig.fontSize.addListener(fontSizeListener)
|
||||
|
||||
dialog.showAndWait()
|
||||
|
||||
ThemeConfig.fontSize.removeListener(fontSizeListener)
|
||||
saveSettings()
|
||||
settingsDialog = null // Cleanup reference
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the available setting categories and their subcategories from the [SettingsManager]
|
||||
* and sends them to the UI components via a [SettingsCategoriesAvailable] event.
|
||||
* This method ensures the categories are sent in their declared order.
|
||||
*/
|
||||
fun loadAndSendCategories() {
|
||||
val categoryDataList = SettingsManager.getConfigCategories().map { (categoryName, configClass) ->
|
||||
// Subcategories are retrieved in their declared order due to the LinkedHashMap in SettingsManager.
|
||||
val subCategories = SettingsManager.getNestedCategories(configClass).keys.toList()
|
||||
CategoryData(categoryName.replaceFirstChar { it.uppercase() }, configClass, subCategories)
|
||||
}
|
||||
EventBus.post(SettingsCategoriesAvailable(categoryDataList))
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers the saving of all current settings values through the [SettingsManager].
|
||||
*/
|
||||
fun saveSettings() {
|
||||
SettingsManager.saveSettings()
|
||||
logger.debug("Settings saved.")
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a search across all registered settings and returns a list of matching [SearchResult]s.
|
||||
* Results are ranked by relevance.
|
||||
*
|
||||
* @param query The search query string.
|
||||
* @return A list of [SearchResult]s, sorted by relevance score in descending order.
|
||||
*/
|
||||
private fun searchSettings(query: String): List<SearchResult> {
|
||||
if (query.isBlank()) return emptyList()
|
||||
|
||||
val lowerQuery = query.lowercase()
|
||||
|
||||
return SettingsManager.getConfigCategories()
|
||||
.flatMap { (categoryName, configClass) ->
|
||||
SettingsManager.getConfigFields(configClass).mapNotNull { field ->
|
||||
val relevanceScore = calculateRelevance(field, lowerQuery)
|
||||
if (relevanceScore > 0) {
|
||||
SearchResult(categoryName, field.category?.name ?: "General", field, relevanceScore)
|
||||
} else null
|
||||
}
|
||||
}
|
||||
.sortedByDescending { it.relevanceScore }
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates a relevance score for a given [ConfigField] against a search query.
|
||||
*
|
||||
* @param field The [ConfigField] to evaluate.
|
||||
* @param query The search query in lowercase.
|
||||
* @return An integer representing the relevance score. Higher scores mean more relevant.
|
||||
*/
|
||||
private fun calculateRelevance(field: ConfigField, query: String): Int {
|
||||
var score = 0
|
||||
|
||||
// Exact name match gets the highest score
|
||||
if (field.name.lowercase() == query) score += EXACT_NAME_SCORE
|
||||
|
||||
// Name contains query
|
||||
if (field.name.lowercase().contains(query)) score += NAME_CONTAINS_SCORE
|
||||
|
||||
// Description contains query
|
||||
if (field.description.lowercase().contains(query)) score += DESC_CONTAINS_SCORE
|
||||
|
||||
// Category name contains query
|
||||
if (field.category?.name?.lowercase()?.contains(query) == true) score += CATEGORY_NAME_SCORE
|
||||
|
||||
// Category description contains query
|
||||
if (field.category?.desc?.lowercase()?.contains(query) == true) score += CATEGORY_DESC_SCORE
|
||||
|
||||
return score
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package io.github.frostzie.nodex.modules.popup.settings
|
||||
|
||||
import atlantafx.base.controls.Notification
|
||||
import io.github.frostzie.nodex.events.*
|
||||
import io.github.frostzie.nodex.settings.categories.ThemeConfig
|
||||
import io.github.frostzie.nodex.styling.messages.MessageSeverity
|
||||
import io.github.frostzie.nodex.styling.notifications.NotificationFactory
|
||||
import io.github.frostzie.nodex.utils.ThemeManager
|
||||
import io.github.frostzie.nodex.utils.ThemeUtils
|
||||
import javafx.scene.Scene
|
||||
import javafx.scene.control.Button
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
|
||||
class ThemeModule {
|
||||
val scenes = mutableSetOf<Scene>()
|
||||
private var editingNotification: Notification? = null
|
||||
private var editingSessionPath: Path? = null
|
||||
private var editingSessionTitle: String? = null
|
||||
|
||||
fun changeTheme(themeName: String) {
|
||||
ThemeUtils.applyTheme(themeName)
|
||||
}
|
||||
|
||||
fun reloadStyles() {
|
||||
changeTheme(ThemeConfig.theme.get())
|
||||
}
|
||||
|
||||
fun openTheme(event: OpenThemeEvent) {
|
||||
ThemeManager.openTheme(event)
|
||||
|
||||
val themeName = ThemeConfig.theme.get()
|
||||
val customThemePath = ThemeManager.customThemesDir.toPath().resolve("$themeName.css")
|
||||
|
||||
if (Files.exists(customThemePath)) {
|
||||
startEditingSession("Theme: $themeName", customThemePath)
|
||||
}
|
||||
}
|
||||
|
||||
fun closeEditingSession() {
|
||||
editingNotification?.let { NotificationFactory.hide(it) }
|
||||
editingNotification = null
|
||||
editingSessionPath = null
|
||||
editingSessionTitle = null
|
||||
}
|
||||
|
||||
private fun startEditingSession(title: String, path: Path) {
|
||||
editingSessionTitle = title
|
||||
editingSessionPath = path
|
||||
showEditingNotification(title, path)
|
||||
}
|
||||
|
||||
fun onActiveTabChanged(path: Path?) {
|
||||
if (editingSessionPath != null) {
|
||||
if (path == editingSessionPath) {
|
||||
if (editingNotification == null) {
|
||||
showEditingNotification(editingSessionTitle ?: "", editingSessionPath!!)
|
||||
}
|
||||
} else {
|
||||
editingNotification?.let { NotificationFactory.hide(it) }
|
||||
editingNotification = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun showEditingNotification(title: String, targetPath: Path) {
|
||||
editingNotification?.let { NotificationFactory.hide(it) }
|
||||
|
||||
val btn = Button("Save & Refresh")
|
||||
btn.setOnAction {
|
||||
EventBus.post(SaveFileEvent(targetPath))
|
||||
EventBus.post(ReloadThemeEvent())
|
||||
}
|
||||
|
||||
val notification = NotificationFactory.createAndShow(
|
||||
text = "Editing $title",
|
||||
severity = MessageSeverity.INFO,
|
||||
durationMillis = -1
|
||||
)
|
||||
notification.setPrimaryActions(btn)
|
||||
notification.setOnClose(null)
|
||||
editingNotification = notification
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
package io.github.frostzie.nodex.modules.project
|
||||
|
||||
import io.github.frostzie.nodex.events.EventBus
|
||||
import io.github.frostzie.nodex.events.WorkspaceUpdated
|
||||
import io.github.frostzie.nodex.project.Project
|
||||
import io.github.frostzie.nodex.project.WorkspaceManager
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
import javafx.application.Platform
|
||||
import javafx.collections.FXCollections
|
||||
import javafx.collections.ObservableList
|
||||
import javafx.scene.control.Alert
|
||||
import javafx.scene.control.ButtonType
|
||||
import java.nio.file.Files
|
||||
|
||||
class ProjectManagerViewModel {
|
||||
val recentProjects: ObservableList<Project> = FXCollections.observableArrayList()
|
||||
|
||||
init {
|
||||
EventBus.register(this)
|
||||
refreshRecents()
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onWorkspaceUpdated(event: WorkspaceUpdated) {
|
||||
Platform.runLater {
|
||||
refreshRecents()
|
||||
}
|
||||
}
|
||||
|
||||
fun refreshRecents() {
|
||||
recentProjects.setAll(WorkspaceManager.recentProjects)
|
||||
}
|
||||
|
||||
fun openProject(project: Project) {
|
||||
if (!Files.exists(project.path)) { //TODO: Actually good UI
|
||||
val removeBtn = ButtonType("Remove")
|
||||
val alert = Alert(
|
||||
Alert.AlertType.ERROR,
|
||||
"The project directory '${project.name}' does not exist.\nIt may have been moved or deleted.",
|
||||
removeBtn, ButtonType.OK
|
||||
)
|
||||
alert.headerText = "Project Not Found"
|
||||
val result = alert.showAndWait()
|
||||
|
||||
if (result.isPresent && result.get() == removeBtn) {
|
||||
WorkspaceManager.removeRecentProject(project)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
WorkspaceManager.openSingleProject(project.path)
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
package io.github.frostzie.nodex.modules.project.preview
|
||||
|
||||
import io.github.frostzie.nodex.project.WorkspaceManager
|
||||
import io.github.frostzie.nodex.project.metadata.DatapackMetadata
|
||||
import io.github.frostzie.nodex.services.ArchiveService
|
||||
import javafx.beans.property.SimpleObjectProperty
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
|
||||
sealed class ProjectPreviewViewModel {
|
||||
abstract val title: String
|
||||
abstract val confirmButtonText: String
|
||||
abstract val isWarning: Boolean
|
||||
|
||||
abstract fun onConfirm(): Path
|
||||
}
|
||||
|
||||
class SingleProjectPreviewViewModel(
|
||||
val path: Path,
|
||||
val metadata: DatapackMetadata
|
||||
) : ProjectPreviewViewModel() {
|
||||
override val title = "Import Project"
|
||||
override val confirmButtonText = "Open Project"
|
||||
override val isWarning = false
|
||||
|
||||
override fun onConfirm(): Path = path
|
||||
}
|
||||
|
||||
class ZipProjectPreviewViewModel(
|
||||
val path: Path,
|
||||
val metadata: DatapackMetadata
|
||||
) : ProjectPreviewViewModel() {
|
||||
override val title = "Import Zip Project"
|
||||
override val confirmButtonText = "Import & Open"
|
||||
override val isWarning = false
|
||||
|
||||
val targetDirectory = SimpleObjectProperty(path.parent)
|
||||
|
||||
fun calculateTargetDir(): Path {
|
||||
val parent = targetDirectory.get() ?: path.parent
|
||||
val folderName = path.fileName.toString().removeSuffix(".zip")
|
||||
return parent.resolve(folderName)
|
||||
}
|
||||
|
||||
fun targetExists(): Boolean {
|
||||
return calculateTargetDir().toFile().exists()
|
||||
}
|
||||
|
||||
override fun onConfirm(): Path {
|
||||
val target = targetDirectory.get() ?: path.parent
|
||||
|
||||
val finalDir = calculateTargetDir()
|
||||
if (Files.exists(finalDir)) {
|
||||
WorkspaceManager.clearProjectHistory(finalDir)
|
||||
}
|
||||
|
||||
return ArchiveService.unzip(path, target)
|
||||
}
|
||||
}
|
||||
|
||||
class WorkspaceProjectPreviewViewModel(
|
||||
val root: Path,
|
||||
val projects: List<Path>
|
||||
) : ProjectPreviewViewModel() {
|
||||
val isZip = root.toString().endsWith(".zip")
|
||||
|
||||
override val title = if (isZip) "Import Workspace Zip" else "Multi-Project Workspace"
|
||||
override val confirmButtonText = if (isZip) "Import & Open" else "Open Workspace"
|
||||
override val isWarning = false
|
||||
|
||||
val targetDirectory = SimpleObjectProperty(root.parent)
|
||||
|
||||
fun calculateTargetDir(): Path {
|
||||
val parent = targetDirectory.get() ?: root.parent
|
||||
val folderName = root.fileName.toString().removeSuffix(".zip")
|
||||
return parent.resolve(folderName)
|
||||
}
|
||||
|
||||
fun targetExists(): Boolean {
|
||||
return calculateTargetDir().toFile().exists()
|
||||
}
|
||||
|
||||
override fun onConfirm(): Path {
|
||||
if (isZip) {
|
||||
val target = targetDirectory.get() ?: root.parent
|
||||
val finalDir = calculateTargetDir()
|
||||
if (Files.exists(finalDir)) {
|
||||
WorkspaceManager.clearProjectHistory(finalDir)
|
||||
}
|
||||
return ArchiveService.unzip(root, target)
|
||||
}
|
||||
return root
|
||||
}
|
||||
}
|
||||
|
||||
class InvalidProjectPreviewViewModel(
|
||||
val path: Path,
|
||||
val reason: String
|
||||
) : ProjectPreviewViewModel() {
|
||||
val isZip = path.toString().endsWith(".zip")
|
||||
|
||||
override val title = "Validation Failed"
|
||||
override val confirmButtonText = if (isZip) "Ignore & Import" else "Ignore & Open"
|
||||
override val isWarning = true
|
||||
|
||||
val targetDirectory = SimpleObjectProperty(path.parent)
|
||||
|
||||
fun calculateTargetDir(): Path {
|
||||
val parent = targetDirectory.get() ?: path.parent
|
||||
val folderName = path.fileName.toString().removeSuffix(".zip")
|
||||
return parent.resolve(folderName)
|
||||
}
|
||||
|
||||
fun targetExists(): Boolean {
|
||||
return calculateTargetDir().toFile().exists()
|
||||
}
|
||||
|
||||
override fun onConfirm(): Path {
|
||||
if (isZip) {
|
||||
val target = targetDirectory.get() ?: path.parent
|
||||
val finalDir = calculateTargetDir()
|
||||
if (Files.exists(finalDir)) {
|
||||
WorkspaceManager.clearProjectHistory(finalDir)
|
||||
}
|
||||
return ArchiveService.unzip(path, target)
|
||||
}
|
||||
return path
|
||||
}
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package io.github.frostzie.nodex.modules.universal
|
||||
|
||||
import io.github.frostzie.nodex.config.ConfigManager
|
||||
import io.github.frostzie.nodex.loader.fabric.Folders
|
||||
import io.github.frostzie.nodex.loader.fabric.WorldDetection
|
||||
import io.github.frostzie.nodex.services.ArchiveService
|
||||
import io.github.frostzie.nodex.utils.LoggerProvider
|
||||
import io.github.frostzie.nodex.utils.file.DirectoryChooseUtils
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import java.nio.file.StandardCopyOption
|
||||
import kotlin.io.path.exists
|
||||
import kotlin.io.path.name
|
||||
|
||||
object UniversalPackManager {
|
||||
private val logger = LoggerProvider.getLogger("UniversalPackManager")
|
||||
|
||||
// Get the root folder: .../Nodex/datapacks
|
||||
private val universalRoot: Path
|
||||
get() {
|
||||
return if (ConfigManager.configDir.endsWith("config")) {
|
||||
ConfigManager.configDir.parent.resolve("datapacks")
|
||||
} else {
|
||||
// Fallback if structure is different
|
||||
Folders.configDir.resolve("Nodex").resolve("datapacks")
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
if (!universalRoot.exists()) {
|
||||
Files.createDirectories(universalRoot)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a specific project path is inside the Universal Folder.
|
||||
*/
|
||||
fun isUniversalProject(path: Path): Boolean {
|
||||
// Ensure absolute paths for comparison
|
||||
return path.toAbsolutePath().startsWith(universalRoot.toAbsolutePath())
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a pack with this name already exists in the Universal Folder.
|
||||
*/
|
||||
fun existsInUniversal(folderName: String): Boolean {
|
||||
return universalRoot.resolve(folderName).exists()
|
||||
}
|
||||
|
||||
/**
|
||||
* Imports a project (Folder or Zip) into the Universal Folder.
|
||||
* @param source The original path (zip or folder).
|
||||
* @param targetName The name to use in the universal folder.
|
||||
* @return The new Path in the universal folder.
|
||||
*/
|
||||
fun importProject(source: Path, targetName: String): Path {
|
||||
val targetDir = universalRoot.resolve(targetName)
|
||||
|
||||
logger.info("Importing project from $source to $targetDir")
|
||||
|
||||
if (Files.isDirectory(source)) {
|
||||
// Copy Directory
|
||||
copyDirectory(source, targetDir)
|
||||
} else {
|
||||
// Unzip
|
||||
ArchiveService.unzip(source, universalRoot)
|
||||
// ArchiveService.unzip uses the zip name. If renamed, need to rename the result.
|
||||
val unzippedPath = universalRoot.resolve(source.fileName.toString().removeSuffix(".zip"))
|
||||
if (unzippedPath != targetDir) {
|
||||
Files.move(unzippedPath, targetDir, StandardCopyOption.REPLACE_EXISTING)
|
||||
}
|
||||
}
|
||||
|
||||
return targetDir
|
||||
}
|
||||
|
||||
/**
|
||||
* Mirrors the given project path to the current World's datapack folder.
|
||||
*/
|
||||
fun mirrorToWorld(projectPath: Path): Boolean {
|
||||
if (!WorldDetection.isSingleplayer()) {
|
||||
logger.warn("Cannot mirror: Not in singleplayer.")
|
||||
return false
|
||||
}
|
||||
|
||||
val datapacksDir = DirectoryChooseUtils.getDatapackPath()
|
||||
if (datapacksDir == null || !datapacksDir.exists()) {
|
||||
logger.error("Cannot find world datapacks directory.")
|
||||
return false
|
||||
}
|
||||
|
||||
val targetDir = datapacksDir.resolve(projectPath.name)
|
||||
|
||||
try {
|
||||
logger.debug("Mirroring {} to {}", projectPath, targetDir)
|
||||
|
||||
// 1. Clean target if exists
|
||||
if (targetDir.exists()) {
|
||||
// Recursive delete
|
||||
targetDir.toFile().deleteRecursively()
|
||||
}
|
||||
|
||||
// 2. Copy
|
||||
copyDirectory(projectPath, targetDir)
|
||||
|
||||
return true
|
||||
} catch (e: Exception) {
|
||||
logger.error("Failed to mirror project to world.", e)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
private fun copyDirectory(source: Path, target: Path) {
|
||||
source.toFile().walkTopDown().forEach { sourceFile ->
|
||||
val relativePath = source.relativize(sourceFile.toPath())
|
||||
val targetFile = target.resolve(relativePath)
|
||||
|
||||
if (sourceFile.isDirectory) {
|
||||
if (!targetFile.exists()) Files.createDirectories(targetFile)
|
||||
} else {
|
||||
Files.copy(sourceFile.toPath(), targetFile, StandardCopyOption.REPLACE_EXISTING)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package io.github.frostzie.nodex.modules.universal
|
||||
|
||||
import io.github.frostzie.nodex.events.EventBus
|
||||
import io.github.frostzie.nodex.events.WorkspaceUpdated
|
||||
import io.github.frostzie.nodex.loader.fabric.WorldDetection
|
||||
import io.github.frostzie.nodex.loader.minecraft.ChatMessageBuilder
|
||||
import io.github.frostzie.nodex.project.WorkspaceManager
|
||||
import io.github.frostzie.nodex.settings.annotations.SubscribeEvent
|
||||
import io.github.frostzie.nodex.settings.categories.MainConfig
|
||||
import kotlin.io.path.name
|
||||
|
||||
object UniversalWorldIntegration {
|
||||
|
||||
fun initialize() {
|
||||
EventBus.register(this)
|
||||
|
||||
// Listen for when the player joins a world
|
||||
WorldDetection.registerWorldJoinListener {
|
||||
checkAndPrompt()
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onWorkspaceUpdated(event: WorkspaceUpdated) {
|
||||
// Listen for when the user switches projects while already in a world
|
||||
checkAndPrompt()
|
||||
}
|
||||
|
||||
private fun checkAndPrompt() {
|
||||
if (!WorldDetection.isSingleplayer()) return
|
||||
|
||||
if (!MainConfig.universalFolderToggle.get() || !MainConfig.universalDatapackToggle.get()) return
|
||||
|
||||
val root = WorkspaceManager.currentWorkspaceRoot ?: return
|
||||
|
||||
// Only prompt if it is a Universal Project
|
||||
if (UniversalPackManager.isUniversalProject(root)) {
|
||||
ChatMessageBuilder.promptUniversalLoad(root.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package io.github.frostzie.nodex.project
|
||||
|
||||
import io.github.frostzie.nodex.project.metadata.DatapackMetadata
|
||||
import io.github.frostzie.nodex.project.metadata.DatapackParser
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.exists
|
||||
|
||||
/**
|
||||
* Represents a single project (datapack) root in the workspace.
|
||||
*/
|
||||
data class Project(
|
||||
val path: Path,
|
||||
val name: String = path.fileName.toString(),
|
||||
var metadata: DatapackMetadata? = null,
|
||||
var iconPath: Path? = null,
|
||||
val additionalPaths: MutableList<Path> = mutableListOf()
|
||||
) {
|
||||
fun loadMetadata() {
|
||||
metadata = DatapackParser.parse(path)
|
||||
|
||||
// It indeed can only have pack.png
|
||||
val pack = path.resolve("pack.png")
|
||||
if (pack.exists()) {
|
||||
iconPath = pack
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 208 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user