Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ test-tab-interaction: app copyshare
test-node: app copyshare
$(TARGET) -test=tests/test_node.lua

test-lisp: app copyshare
$(TARGET) -test=tests/test_lisp.lua

test: test-headless test-properties test-styles test-filesystem test-editor test-text-layout test-stack-layout test-grid-layout test-interaction test-tab-interaction test-node
$(TARGET) -test=tests/test.xml

Expand Down Expand Up @@ -367,5 +370,6 @@ test-headless: unite test-properties test-styles test-filesystem test-message-re
$(TARGET) -test=tests/test_parsers.lua
$(TARGET) -test=tests/test_object_hierarchy.lua
$(TARGET) -test=tests/test_tabbar.lua
$(TARGET) -test=tests/test_lisp.lua

include Makefile.webgl
7 changes: 7 additions & 0 deletions samples/Example/Prefabs/FeatureCard.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(StackView Name="FeatureCard" Direction="Vertical" Spacing=10 BackgroundColor="$card-background" Padding=28
(TextBlock Name="FeatureCardIcon" FontSize=20 Width=44 Height=40
TextHorizontalAlignment="Center" TextVerticalAlignment="Center"
Text="{../Card.Icon}" ForegroundColor="{../Card.PrimaryColor}" BackgroundColor="{../Card.IconBackground}")
(Node2D Name="FeatureCardSpacer" Height=8)
(TextBlock Name="FeatureCardTitle" FontSize=16 ForegroundColor="$text-primary" Text="{../Card.Title}")
(TextBlock Name="FeatureCardBody" FontSize=13 ForegroundColor="$text-dim" WordWrap="true" Text="{../Card.Body}"))
6 changes: 3 additions & 3 deletions samples/Example/Prefabs/FeatureCard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<StackView Name="FeatureCard" Direction="Vertical" Spacing="10" BackgroundColor="$card-background" Padding="28">
<TextBlock Name="FeatureCardIcon" FontSize="20" Width="44" Height="40"
TextHorizontalAlignment="Center" TextVerticalAlignment="Center"
Text="{Binding ../Card.Icon}" ForegroundColor="{Binding ../Card.PrimaryColor}" BackgroundColor="{Binding ../Card.IconBackground}"/>
Text="{../Card.Icon}" ForegroundColor="{../Card.PrimaryColor}" BackgroundColor="{../Card.IconBackground}"/>
<Node2D Name="FeatureCardSpacer" Height="8"/>
<TextBlock Name="FeatureCardTitle" FontSize="16" ForegroundColor="$text-primary" Text="{Binding ../Card.Title}"/>
<TextBlock Name="FeatureCardBody" FontSize="13" ForegroundColor="$text-dim" WordWrap="true" Text="{Binding ../Card.Body}"/>
<TextBlock Name="FeatureCardTitle" FontSize="16" ForegroundColor="$text-primary" Text="{../Card.Title}"/>
<TextBlock Name="FeatureCardBody" FontSize="13" ForegroundColor="$text-dim" WordWrap="true" Text="{../Card.Body}"/>
</StackView>
4 changes: 4 additions & 0 deletions samples/Example/Prefabs/FeatureImageCard.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(StackView Name="FeatureImageCard" Direction="Vertical" Spacing=12 BackgroundColor="$card-background" Padding=28
(ImageView Name="FeatureImageCardIcon" Width=40 Height=40 Source="{Card.Icon}" ForegroundColor="{Card.PrimaryColor}")
(TextBlock Name="FeatureImageCardTitle" Text="{Card.Title}" FontSize=16 ForegroundColor="$text-primary")
(TextBlock Name="FeatureImageCardBody" Text="{Card.Body}" FontSize=13 ForegroundColor="$text-dim" WordWrap="true"))
6 changes: 3 additions & 3 deletions samples/Example/Prefabs/FeatureImageCard.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="FeatureImageCard" Direction="Vertical" Spacing="12" BackgroundColor="$card-background" Padding="28">
<ImageView Name="FeatureImageCardIcon" Width="40" Height="40" Source="{Binding Card.Icon}" ForegroundColor="{Binding Card.PrimaryColor}"/>
<TextBlock Name="FeatureImageCardTitle" Text="{Binding Card.Title}" FontSize="16" ForegroundColor="$text-primary"/>
<TextBlock Name="FeatureImageCardBody" Text="{Binding Card.Body}" FontSize="13" ForegroundColor="$text-dim" WordWrap="true"/>
<ImageView Name="FeatureImageCardIcon" Width="40" Height="40" Source="{Card.Icon}" ForegroundColor="{Card.PrimaryColor}"/>
<TextBlock Name="FeatureImageCardTitle" Text="{Card.Title}" FontSize="16" ForegroundColor="$text-primary"/>
<TextBlock Name="FeatureImageCardBody" Text="{Card.Body}" FontSize="13" ForegroundColor="$text-dim" WordWrap="true"/>
</StackView>
5 changes: 5 additions & 0 deletions samples/Example/Prefabs/GalleryCard.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(StackView Name="GalleryCard" Direction="Vertical" Spacing=0 BackgroundColor="$card-background"
(ImageView Name="GalleryCardImage" Height=180 Stretch="UniformToFill" Source="{../Card.Image}")
(StackView Name="GalleryCardCaption" Direction="Vertical" Spacing=4 Padding=16
(TextBlock Name="GalleryCardTitle" FontSize=15 ForegroundColor="$text-primary" Text="{../../Card.Title}")
(TextBlock Name="GalleryCardBody" FontSize=12 ForegroundColor="$text-dim" WordWrap="true" Text="{../../Card.Subtitle}")))
6 changes: 3 additions & 3 deletions samples/Example/Prefabs/GalleryCard.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="GalleryCard" Direction="Vertical" Spacing="0" BackgroundColor="$card-background">
<ImageView Name="GalleryCardImage" Height="180" Stretch="UniformToFill" Source="{Binding ../Card.Image}"/>
<ImageView Name="GalleryCardImage" Height="180" Stretch="UniformToFill" Source="{../Card.Image}"/>
<StackView Name="GalleryCardCaption" Direction="Vertical" Spacing="4" Padding="16">
<TextBlock Name="GalleryCardTitle" FontSize="15" ForegroundColor="$text-primary" Text="{Binding ../../Card.Title}"/>
<TextBlock Name="GalleryCardBody" FontSize="12" ForegroundColor="$text-dim" WordWrap="true" Text="{Binding ../../Card.Subtitle}"/>
<TextBlock Name="GalleryCardTitle" FontSize="15" ForegroundColor="$text-primary" Text="{../../Card.Title}"/>
<TextBlock Name="GalleryCardBody" FontSize="12" ForegroundColor="$text-dim" WordWrap="true" Text="{../../Card.Subtitle}"/>
</StackView>
</StackView>
6 changes: 6 additions & 0 deletions samples/Example/Prefabs/IconCard.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(StackView Name="IconCard" Direction="Vertical" Spacing=10 BackgroundColor="$card-background" Padding=28
(StackView Name="IconCardHeader" Direction="Horizontal" Spacing=12 AlignItems="Center"
(StackView Name="IconCardBadge" Width=48 Height=48 AlignItems="Center" JustifyContent="Center" BackgroundColor="{../../Card.IconBackground}"
(ImageView Name="IconCardImage" Width=24 Height=24 Stretch="Uniform" Source="{../../../Card.Icon}" ForegroundColor="{../../../Card.PrimaryColor}"))
(TextBlock Name="IconCardTitle" FontSize=16 ForegroundColor="$text-primary" Text="{../../Card.Title}"))
(TextBlock Name="IconCardBody" FontSize=13 ForegroundColor="$text-dim" WordWrap="true" Text="{../Card.Body}"))
8 changes: 4 additions & 4 deletions samples/Example/Prefabs/IconCard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="IconCard" Direction="Vertical" Spacing="10" BackgroundColor="$card-background" Padding="28">
<StackView Name="IconCardHeader" Direction="Horizontal" Spacing="12" AlignItems="Center">
<StackView Name="IconCardBadge" Width="48" Height="48" AlignItems="Center" JustifyContent="Center" BackgroundColor="{Binding ../../Card.IconBackground}">
<ImageView Name="IconCardImage" Width="24" Height="24" Stretch="Uniform" Source="{Binding ../../../Card.Icon}" ForegroundColor="{Binding ../../../Card.PrimaryColor}"/>
<StackView Name="IconCardBadge" Width="48" Height="48" AlignItems="Center" JustifyContent="Center" BackgroundColor="{../../Card.IconBackground}">
<ImageView Name="IconCardImage" Width="24" Height="24" Stretch="Uniform" Source="{../../../Card.Icon}" ForegroundColor="{../../../Card.PrimaryColor}"/>
</StackView>
<TextBlock Name="IconCardTitle" FontSize="16" ForegroundColor="$text-primary" Text="{Binding ../../Card.Title}"/>
<TextBlock Name="IconCardTitle" FontSize="16" ForegroundColor="$text-primary" Text="{../../Card.Title}"/>
</StackView>
<TextBlock Name="IconCardBody" FontSize="13" ForegroundColor="$text-dim" WordWrap="true" Text="{Binding ../Card.Body}"/>
<TextBlock Name="IconCardBody" FontSize="13" ForegroundColor="$text-dim" WordWrap="true" Text="{../Card.Body}"/>
</StackView>
3 changes: 3 additions & 0 deletions samples/Example/Prefabs/ImageCaptionCard.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(StackView Name="ImageCaptionCard" Direction="Vertical" Spacing=8 BackgroundColor="$panel-background" Padding=16
(ImageView Name="ImageCaptionCardImage" Height=160 Stretch="UniformToFill" Source="{Card.Image}")
(TextBlock Name="ImageCaptionCardTitle" Text="{Card.Title}" FontSize=13 ForegroundColor="$text-secondary"))
4 changes: 2 additions & 2 deletions samples/Example/Prefabs/ImageCaptionCard.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="ImageCaptionCard" Direction="Vertical" Spacing="8" BackgroundColor="$panel-background" Padding="16">
<ImageView Name="ImageCaptionCardImage" Height="160" Stretch="UniformToFill" Source="{Binding Card.Image}"/>
<TextBlock Name="ImageCaptionCardTitle" Text="{Binding Card.Title}" FontSize="13" ForegroundColor="$text-secondary"/>
<ImageView Name="ImageCaptionCardImage" Height="160" Stretch="UniformToFill" Source="{Card.Image}"/>
<TextBlock Name="ImageCaptionCardTitle" Text="{Card.Title}" FontSize="13" ForegroundColor="$text-secondary"/>
</StackView>
4 changes: 2 additions & 2 deletions samples/Example/Prefabs/Mertic.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="MetricUsers" Direction="Vertical" Spacing="4" BackgroundColor="$panel-background" Padding="20" Width="120">
<TextBlock Name="MetricUsersValue" FontSize="28" ForegroundColor="{Binding ../Card.PrimaryColor}" Text="{Binding ../Card.Title}"/>
<TextBlock Name="MetricUsersLabel" FontSize="11" ForegroundColor="$text-dim" Text="{Binding ../Card.Subtitle}"/>
<TextBlock Name="MetricUsersValue" FontSize="28" ForegroundColor="{../Card.PrimaryColor}" Text="{../Card.Title}"/>
<TextBlock Name="MetricUsersLabel" FontSize="11" ForegroundColor="$text-dim" Text="{../Card.Subtitle}"/>
</StackView>
3 changes: 3 additions & 0 deletions samples/Example/Prefabs/Metric.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(StackView Name="MetricUsers" Direction="Vertical" Spacing=4 BackgroundColor="$panel-background" Padding=20 Width=120
(TextBlock Name="MetricUsersValue" FontSize=28 ForegroundColor="{../Card.PrimaryColor}" Text="{../Card.Title}")
(TextBlock Name="MetricUsersLabel" FontSize=11 ForegroundColor="$text-dim" Text="{../Card.Subtitle}"))
6 changes: 6 additions & 0 deletions samples/Example/Prefabs/Quote.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(StackView Name="Quote" Direction="Vertical" Spacing=16 BackgroundColor="$card-background" Padding=28
(TextBlock Name="QuoteMark" Text="“" FontSize=48 ForegroundColor="{../Card.PrimaryColor}")
(TextBlock Name="QuoteText" FontSize=13 ForegroundColor="$text-secondary" WordWrap="true" Text="{../Card.Body}")
(StackView Name="QuoteAuthor" Direction="Horizontal" Spacing=12 AlignItems="Center"
(TextBlock Name="QuoteAuthorName" FontSize=13 ForegroundColor="$text-primary" Text="{../../Card.Title}")
(TextBlock Name="QuoteAuthorRole" FontSize=11 ForegroundColor="$text-dim" Text="{../../Card.Subtitle}")))
8 changes: 4 additions & 4 deletions samples/Example/Prefabs/Quote.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="Quote" Direction="Vertical" Spacing="16" BackgroundColor="$card-background" Padding="28">
<TextBlock Name="QuoteMark" Text="&#x201C;" FontSize="48" ForegroundColor="{Binding ../Card.PrimaryColor}"/>
<TextBlock Name="QuoteText" FontSize="13" ForegroundColor="$text-secondary" WordWrap="true" Text="{Binding ../Card.Body}"/>
<TextBlock Name="QuoteMark" Text="&#x201C;" FontSize="48" ForegroundColor="{../Card.PrimaryColor}"/>
<TextBlock Name="QuoteText" FontSize="13" ForegroundColor="$text-secondary" WordWrap="true" Text="{../Card.Body}"/>
<StackView Name="QuoteAuthor" Direction="Horizontal" Spacing="12" AlignItems="Center">
<TextBlock Name="QuoteAuthorName" FontSize="13" ForegroundColor="$text-primary" Text="{Binding ../../Card.Title}"/>
<TextBlock Name="QuoteAuthorRole" FontSize="11" ForegroundColor="$text-dim" Text="{Binding ../../Card.Subtitle}"/>
<TextBlock Name="QuoteAuthorName" FontSize="13" ForegroundColor="$text-primary" Text="{../../Card.Title}"/>
<TextBlock Name="QuoteAuthorRole" FontSize="11" ForegroundColor="$text-dim" Text="{../../Card.Subtitle}"/>
</StackView>
</StackView>
5 changes: 5 additions & 0 deletions samples/Example/Prefabs/SignalCard.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(StackView Name="SignalCard" Direction="Horizontal" Spacing=12 BackgroundColor="$panel-background" Padding=16 AlignItems="Center"
(ImageView Name="SignalCardIcon" Source="{Card.Icon}" Width=28 Height=28 ForegroundColor="{Card.PrimaryColor}")
(StackView Name="SignalCardCopy" Direction="Vertical" Spacing=2
(TextBlock Name="SignalCardTitle" Text="{Card.Title}" FontSize=14 ForegroundColor="$text-primary")
(TextBlock Name="SignalCardBody" Text="{Card.Body}" FontSize=12 ForegroundColor="$text-muted")))
6 changes: 3 additions & 3 deletions samples/Example/Prefabs/SignalCard.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="SignalCard" Direction="Horizontal" Spacing="12" BackgroundColor="$panel-background" Padding="16" AlignItems="Center">
<ImageView Name="SignalCardIcon" Source="{Binding Card.Icon}" Width="28" Height="28" ForegroundColor="{Binding Card.PrimaryColor}"/>
<ImageView Name="SignalCardIcon" Source="{Card.Icon}" Width="28" Height="28" ForegroundColor="{Card.PrimaryColor}"/>
<StackView Name="SignalCardCopy" Direction="Vertical" Spacing="2">
<TextBlock Name="SignalCardTitle" Text="{Binding Card.Title}" FontSize="14" ForegroundColor="$text-primary"/>
<TextBlock Name="SignalCardBody" Text="{Binding Card.Body}" FontSize="12" ForegroundColor="$text-muted"/>
<TextBlock Name="SignalCardTitle" Text="{Card.Title}" FontSize="14" ForegroundColor="$text-primary"/>
<TextBlock Name="SignalCardBody" Text="{Card.Body}" FontSize="12" ForegroundColor="$text-muted"/>
</StackView>
</StackView>
3 changes: 3 additions & 0 deletions samples/Example/Prefabs/TabPanelHeader.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(StackView Name="TabPanelHeader" Direction="Horizontal" Spacing=12 AlignItems="Center"
(ImageView Name="TabPanelHeaderIcon" Width=26 Height=26 Source="{Card.Icon}" ForegroundColor="{Card.PrimaryColor}")
(TextBlock Name="TabPanelHeaderTitle" Text="{Card.Title}" FontSize=24 ForegroundColor="$text-primary"))
4 changes: 2 additions & 2 deletions samples/Example/Prefabs/TabPanelHeader.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="TabPanelHeader" Direction="Horizontal" Spacing="12" AlignItems="Center">
<ImageView Name="TabPanelHeaderIcon" Width="26" Height="26" Source="{Binding Card.Icon}" ForegroundColor="{Binding Card.PrimaryColor}"/>
<TextBlock Name="TabPanelHeaderTitle" Text="{Binding Card.Title}" FontSize="24" ForegroundColor="$text-primary"/>
<ImageView Name="TabPanelHeaderIcon" Width="26" Height="26" Source="{Card.Icon}" ForegroundColor="{Card.PrimaryColor}"/>
<TextBlock Name="TabPanelHeaderTitle" Text="{Card.Title}" FontSize="24" ForegroundColor="$text-primary"/>
</StackView>
4 changes: 4 additions & 0 deletions samples/Example/Prefabs/WorkflowStep.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(StackView Name="WorkflowStep" Direction="Vertical" Spacing=12 BackgroundColor="$card-background" Padding=24
(TextBlock Name="WorkflowStepNumber" FontSize=32 Text="{../Card.Title}" ForegroundColor="{../Card.PrimaryColor}")
(TextBlock Name="WorkflowStepTitle" FontSize=15 ForegroundColor="$text-primary" Text="{../Card.Subtitle}")
(TextBlock Name="WorkflowStepBody" FontSize=12 ForegroundColor="$text-dim" WordWrap="true" Text="{../Card.Body}"))
6 changes: 3 additions & 3 deletions samples/Example/Prefabs/WorkflowStep.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="WorkflowStep" Direction="Vertical" Spacing="12" BackgroundColor="$card-background" Padding="24">
<TextBlock Name="WorkflowStepNumber" FontSize="32" Text="{Binding ../Card.Title}" ForegroundColor="{Binding ../Card.PrimaryColor}"/>
<TextBlock Name="WorkflowStepTitle" FontSize="15" ForegroundColor="$text-primary" Text="{Binding ../Card.Subtitle}"/>
<TextBlock Name="WorkflowStepBody" FontSize="12" ForegroundColor="$text-dim" WordWrap="true" Text="{Binding ../Card.Body}"/>
<TextBlock Name="WorkflowStepNumber" FontSize="32" Text="{../Card.Title}" ForegroundColor="{../Card.PrimaryColor}"/>
<TextBlock Name="WorkflowStepTitle" FontSize="15" ForegroundColor="$text-primary" Text="{../Card.Subtitle}"/>
<TextBlock Name="WorkflowStepBody" FontSize="12" ForegroundColor="$text-dim" WordWrap="true" Text="{../Card.Body}"/>
</StackView>
3 changes: 3 additions & 0 deletions samples/Example/Prefabs/XmlModelNode.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(StackView Name="XmlModelNode" Direction="Horizontal" Spacing=10 AlignItems="Center"
(ImageView Name="XmlModelNodeIcon" Width=20 Height=20 Source="{Card.Icon}" ForegroundColor="{Card.PrimaryColor}")
(TextBlock Name="XmlModelNodeText" Text="{Card.Title}" FontSize=14 ForegroundColor="{Card.PrimaryColor}"))
4 changes: 2 additions & 2 deletions samples/Example/Prefabs/XmlModelNode.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE StackView SYSTEM "https://corepunch.github.io/orca/schemas/orca.dtd">
<StackView Name="XmlModelNode" Direction="Horizontal" Spacing="10" AlignItems="Center">
<ImageView Name="XmlModelNodeIcon" Width="20" Height="20" Source="{Binding Card.Icon}" ForegroundColor="{Binding Card.PrimaryColor}"/>
<TextBlock Name="XmlModelNodeText" Text="{Binding Card.Title}" FontSize="14" ForegroundColor="{Binding Card.PrimaryColor}"/>
<ImageView Name="XmlModelNodeIcon" Width="20" Height="20" Source="{Card.Icon}" ForegroundColor="{Card.PrimaryColor}"/>
<TextBlock Name="XmlModelNodeText" Text="{Card.Title}" FontSize="14" ForegroundColor="{Card.PrimaryColor}"/>
</StackView>
Loading