Files
masonry/.idea/copilotDiffState.xml

27 lines
32 KiB
XML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CopilotDiffPersistence">
<option name="pendingDiffs">
<map>
<entry key="$PROJECT_DIR$/debug.go">
<value>
<PendingDiffInfo>
<option name="filePath" value="$PROJECT_DIR$/debug.go" />
<option name="originalContent" value="package main&#10;&#10;import (&#10;&#9;&quot;fmt&quot;&#10;&#9;&quot;masonry/lang&quot;&#10;)&#10;&#10;func main() {&#10;&#9;// Test the complete DSL with servers, entities, endpoints, and pages&#10;&#9;input := `server MyApp host &quot;localhost&quot; port 8080&#10;&#9;&#10;&#9;entity User desc &quot;User account management&quot;&#10;&#9;&#9;id: uuid required unique&#10;&#9;&#9;email: string required validate email&#10;&#9;&#9;name: string default &quot;Anonymous&quot;&#10;&#9;&#9;&#10;&#9;endpoint GET &quot;/users&quot; for User desc &quot;List users&quot; auth&#10;&#9;&#9;param page: int from query&#10;&#9;&#9;param limit: int from query&#10;&#9;&#9;returns list as &quot;json&quot; fields [id, email, name]&#10;&#9;&#9;&#10;&#9;endpoint POST &quot;/users&quot; for User desc &quot;Create user&quot;&#10;&#9;&#9;param user_data: object required from body&#10;&#9;&#9;returns object fields [id, email, name]&#10;&#9;&#9;&#10;&#9;page UserManagement at &quot;/admin/users&quot; layout AdminLayout title &quot;User Management&quot; auth&#10;&#9;&#9;meta description &quot;Manage system users&quot;&#10;&#9;&#9;meta keywords &quot;users, admin, management&quot;&#10;&#9;&#9;&#10;&#9;&#9;component Table for User&#10;&#9;&#9;&#9;fields [email, name, id]&#10;&#9;&#9;&#9;actions [edit via &quot;/users/{id}&quot;, delete via &quot;/users/{id}&quot;, create via &quot;/users&quot;]&#10;&#9;&#9;&#9;data from &quot;/users&quot;&#10;&#9;&#9;&#9;style modern classes [&quot;table-striped&quot;, &quot;table-hover&quot;]&#10;&#9;&#9;&#9;pagination size 20&#10;&#9;&#9;&#9;filters [email as text label &quot;Search email&quot;, name as text label &quot;Search name&quot;]&#10;&#9;&#9;&#9;validate&#10;&#9;&#9;&#9;&#10;&#9;&#9;component Form for User&#10;&#9;&#9;&#9;fields [email, name]&#10;&#9;&#9;&#9;actions [save via &quot;/users&quot;, cancel]&#10;&#9;&#9;&#9;style clean&#10;&#9;&#9;&#9;validate&#10;&#9;&#9;&#9;&#10;&#9;page UserList at &quot;/users&quot; layout MainLayout title &quot;Users&quot;&#10;&#9;&#9;component Table for User&#10;&#9;&#9;&#9;fields [email, name]&#10;&#9;&#9;&#9;data from &quot;/users&quot;&#10;&#9;&#9;&#9;pagination size 10`&#10;&#10;&#9;ast, err := lang.ParseInput(input)&#10;&#9;if err != nil {&#10;&#9;&#9;fmt.Printf(&quot;Error: %v\n&quot;, err)&#10;&#9;} else {&#10;&#9;&#9;fmt.Printf(&quot; Successfully parsed complete DSL with pages!\n\n&quot;)&#10;&#10;&#9;&#9;for _, def := range ast.Definitions {&#10;&#9;&#9;&#9;if def.Server != nil {&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Server: %s\n&quot;, def.Server.Name)&#10;&#9;&#9;&#9;&#9;for _, setting := range def.Server.Settings {&#10;&#9;&#9;&#9;&#9;&#9;if setting.Host != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; host: %s\n&quot;, *setting.Host)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;if setting.Port != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; port: %d\n&quot;, *setting.Port)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;if def.Entity != nil {&#10;&#9;&#9;&#9;&#9;entity := def.Entity&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Entity: %s&quot;, entity.Name)&#10;&#9;&#9;&#9;&#9;if entity.Description != nil {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; - %s&quot;, *entity.Description)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#10;&#9;&#9;&#9;&#9;for _, field := range entity.Fields {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; %s: %s&quot;, field.Name, field.Type)&#10;&#9;&#9;&#9;&#9;&#9;if field.Required {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; (required)&quot;)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;if field.Unique {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; (unique)&quot;)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;if field.Default != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; default=%s&quot;, *field.Default)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;if def.Endpoint != nil {&#10;&#9;&#9;&#9;&#9;endpoint := def.Endpoint&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Endpoint: %s %s&quot;, endpoint.Method, endpoint.Path)&#10;&#9;&#9;&#9;&#9;if endpoint.Entity != nil {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; (for %s)&quot;, *endpoint.Entity)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;if endpoint.Description != nil {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; - %s&quot;, *endpoint.Description)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;if endpoint.Auth {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; [AUTH]&quot;)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n\n&quot;)&#10;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;if def.Page != nil {&#10;&#9;&#9;&#9;&#9;page := def.Page&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Page: %s at %s&quot;, page.Name, page.Path)&#10;&#9;&#9;&#9;&#9;if page.Title != nil {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; - %s&quot;, *page.Title)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;if page.Auth {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; [AUTH]&quot;)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Layout: %s\n&quot;, page.Layout)&#10;&#10;&#9;&#9;&#9;&#9;for _, meta := range page.Meta {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Meta %s: %s\n&quot;, meta.Name, meta.Content)&#10;&#9;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;&#9;for _, comp := range page.Components {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Component: %s&quot;, comp.Type)&#10;&#9;&#9;&#9;&#9;&#9;if comp.Entity != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; for %s&quot;, *comp.Entity)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#10;&#9;&#9;&#9;&#9;&#9;for _, attr := range comp.Config {&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Fields != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; fields: %v\n&quot;, attr.Fields.Fields)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Actions != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; actions: &quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;for i, action := range attr.Actions.Actions {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if i &gt; 0 {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;, &quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;%s&quot;, action.Name)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if action.Endpoint != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; via %s&quot;, *action.Endpoint)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.DataSource != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; data from: %s\n&quot;, attr.DataSource.Endpoint)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Style != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; style: %s&quot;, *attr.Style.Theme)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if len(attr.Style.Classes) &gt; 0 {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; classes: %v&quot;, attr.Style.Classes)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Pagination != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; pagination: enabled&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Pagination.PageSize != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; size %d&quot;, *attr.Pagination.PageSize)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Filters != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; filters: &quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;for i, filter := range attr.Filters.Filters {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if i &gt; 0 {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;, &quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;%s as %s&quot;, filter.Field, filter.Type)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if filter.Label != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; (%s)&quot;, *filter.Label)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Validation {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; validation: enabled\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;}&#10;&#9;&#9;}&#10;&#9;}&#10;}&#10;" />
<option name="updatedContent" value="package main&#10;&#10;import (&#10;&#9;&quot;fmt&quot;&#10;&#9;&quot;io/ioutil&quot;&#10;&#9;&quot;masonry/lang&quot;&#10;)&#10;&#10;func main() {&#10;&#9;// Read the example.masonry file&#10;&#9;content, err := ioutil.ReadFile(&quot;example.masonry&quot;)&#10;&#9;if err != nil {&#10;&#9;&#9;fmt.Printf(&quot;Error reading example.masonry: %v\n&quot;, err)&#10;&#9;&#9;return&#10;&#9;}&#10;&#10;&#9;input := string(content)&#10;&#10;&#9;ast, err := lang.ParseInput(input)&#10;&#9;if err != nil {&#10;&#9;&#9;fmt.Printf(&quot;Error: %v\n&quot;, err)&#10;&#9;} else {&#10;&#9;&#9;fmt.Printf(&quot; Successfully parsed complete DSL with pages!\n\n&quot;)&#10;&#10;&#9;&#9;for _, def := range ast.Definitions {&#10;&#9;&#9;&#9;if def.Server != nil {&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Server: %s\n&quot;, def.Server.Name)&#10;&#9;&#9;&#9;&#9;for _, setting := range def.Server.Settings {&#10;&#9;&#9;&#9;&#9;&#9;if setting.Host != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; host: %s\n&quot;, *setting.Host)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;if setting.Port != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; port: %d\n&quot;, *setting.Port)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;if def.Entity != nil {&#10;&#9;&#9;&#9;&#9;entity := def.Entity&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Entity: %s&quot;, entity.Name)&#10;&#9;&#9;&#9;&#9;if entity.Description != nil {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; - %s&quot;, *entity.Description)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#10;&#9;&#9;&#9;&#9;for _, field := range entity.Fields {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; %s: %s&quot;, field.Name, field.Type)&#10;&#9;&#9;&#9;&#9;&#9;if field.Required {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; (required)&quot;)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;if field.Unique {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; (unique)&quot;)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;if field.Default != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; default=%s&quot;, *field.Default)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;if def.Endpoint != nil {&#10;&#9;&#9;&#9;&#9;endpoint := def.Endpoint&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Endpoint: %s %s&quot;, endpoint.Method, endpoint.Path)&#10;&#9;&#9;&#9;&#9;if endpoint.Entity != nil {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; (for %s)&quot;, *endpoint.Entity)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;if endpoint.Description != nil {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; - %s&quot;, *endpoint.Description)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;if endpoint.Auth {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; [AUTH]&quot;)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n\n&quot;)&#10;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;if def.Page != nil {&#10;&#9;&#9;&#9;&#9;page := def.Page&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Page: %s at %s&quot;, page.Name, page.Path)&#10;&#9;&#9;&#9;&#9;if page.Title != nil {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; - %s&quot;, *page.Title)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;if page.Auth {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; [AUTH]&quot;)&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Layout: %s\n&quot;, page.Layout)&#10;&#10;&#9;&#9;&#9;&#9;for _, meta := range page.Meta {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Meta %s: %s\n&quot;, meta.Name, meta.Content)&#10;&#9;&#9;&#9;&#9;}&#10;&#10;&#9;&#9;&#9;&#9;for _, comp := range page.Components {&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; Component: %s&quot;, comp.Type)&#10;&#9;&#9;&#9;&#9;&#9;if comp.Entity != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; for %s&quot;, *comp.Entity)&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#10;&#9;&#9;&#9;&#9;&#9;for _, attr := range comp.Config {&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Fields != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; fields: %v\n&quot;, attr.Fields.Fields)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Actions != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; actions: &quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;for i, action := range attr.Actions.Actions {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if i &gt; 0 {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;, &quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;%s&quot;, action.Name)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if action.Endpoint != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; via %s&quot;, *action.Endpoint)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.DataSource != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; data from: %s\n&quot;, attr.DataSource.Endpoint)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Style != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; style: %s&quot;, *attr.Style.Theme)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if len(attr.Style.Classes) &gt; 0 {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; classes: %v&quot;, attr.Style.Classes)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Pagination != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; pagination: enabled&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Pagination.PageSize != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; size %d&quot;, *attr.Pagination.PageSize)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Filters != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; filters: &quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;for i, filter := range attr.Filters.Filters {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if i &gt; 0 {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;, &quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;%s as %s&quot;, filter.Field, filter.Type)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;if filter.Label != nil {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; (%s)&quot;, *filter.Label)&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;&#9;if attr.Validation {&#10;&#9;&#9;&#9;&#9;&#9;&#9;&#9;fmt.Printf(&quot; validation: enabled\n&quot;)&#10;&#9;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;}&#10;&#9;&#9;&#9;&#9;fmt.Printf(&quot;\n&quot;)&#10;&#9;&#9;&#9;}&#10;&#9;&#9;}&#10;&#9;}&#10;}" />
</PendingDiffInfo>
</value>
</entry>
<entry key="$PROJECT_DIR$/examples/lang/example.masonry">
<value>
<PendingDiffInfo>
<option name="filePath" value="$PROJECT_DIR$/examples/lang/example.masonry" />
<option name="originalContent" value="// Example Masonry DSL definition&#10;// This demonstrates the comprehensive language structure&#10;&#10;// Server configuration&#10;server MyApp host &quot;localhost&quot; port 8080&#10;&#10;// Entity definitions with various field types and relationships&#10;entity User desc &quot;User account management&quot;&#10;&#9;id: uuid required unique&#10;&#9;email: string required validate email validate min_length &quot;5&quot;&#10;&#9;name: string default &quot;Anonymous&quot;&#10;&#9;created_at: timestamp default &quot;now()&quot;&#10;&#9;profile_id: uuid relates to Profile as one via &quot;user_id&quot;&#10;&#10;entity Profile desc &quot;User profile information&quot;&#10;&#9;id: uuid required unique&#10;&#9;user_id: uuid required relates to User as one&#10;&#9;bio: text validate max_length &quot;500&quot;&#10;&#9;avatar_url: string validate url&#10;&#9;updated_at: timestamp&#10;&#9;posts: uuid relates to Post as many&#10;&#10;entity Post desc &quot;Blog posts&quot;&#10;&#9;id: uuid required unique&#10;&#9;title: string required validate min_length &quot;1&quot; validate max_length &quot;200&quot;&#10;&#9;content: text required&#10;&#9;author_id: uuid required relates to User as one&#10;&#9;published: boolean default &quot;false&quot;&#10;&#9;created_at: timestamp default &quot;now()&quot;&#10;&#9;tags: uuid relates to Tag as many through &quot;post_tags&quot;&#10;&#10;entity Tag desc &quot;Content tags&quot;&#10;&#9;id: uuid required unique&#10;&#9;name: string required unique validate min_length &quot;1&quot; validate max_length &quot;50&quot;&#10;&#9;slug: string required unique indexed&#10;&#9;created_at: timestamp default &quot;now()&quot;&#10;&#10;// API Endpoints with different HTTP methods and parameter sources&#10;endpoint GET &quot;/users&quot; for User desc &quot;List users&quot; auth&#10;&#9;param page: int from query&#10;&#9;param limit: int required from query&#10;&#9;returns list as &quot;json&quot; fields [id, email, name]&#10;&#10;endpoint POST &quot;/users&quot; for User desc &quot;Create user&quot;&#10;&#9;param user_data: object required from body&#10;&#9;returns object as &quot;json&quot; fields [id, email, name]&#10;&#10;endpoint PUT &quot;/users/{id}&quot; for User desc &quot;Update user&quot;&#10;&#9;param id: uuid required from path&#10;&#9;param user_data: object required from body&#10;&#9;returns object&#10;&#9;custom &quot;update_user_logic&quot;&#10;&#10;endpoint DELETE &quot;/users/{id}&quot; for User desc &quot;Delete user&quot; auth&#10;&#9;param id: uuid required from path&#10;&#9;returns object&#10;&#10;endpoint GET &quot;/posts&quot; for Post desc &quot;List posts&quot;&#10;&#9;param author_id: uuid from query&#10;&#9;param published: boolean from query&#10;&#9;param page: int from query&#10;&#9;returns list as &quot;json&quot; fields [id, title, author_id, published]&#10;&#10;endpoint POST &quot;/posts&quot; for Post desc &quot;Create post&quot; auth&#10;&#9;param post_data: object required from body&#10;&#9;returns object fields [id, title, content, author_id]&#10;&#10;// Frontend pages with components&#10;page UserManagement at &quot;/admin/users&quot; layout AdminLayout title &quot;User Management&quot; auth&#10;&#9;meta description &quot;Manage system users&quot;&#10;&#9;meta keywords &quot;users, admin, management&quot;&#10;&#10;&#9;component Table for User&#10;&#9;&#9;fields [email, name, id]&#10;&#9;&#9;actions [edit via &quot;/users/{id}&quot;, delete via &quot;/users/{id}&quot;, create via &quot;/users&quot;]&#10;&#9;&#9;data from &quot;/users&quot;&#10;&#9;&#9;style modern classes [&quot;table-striped&quot;, &quot;table-hover&quot;]&#10;&#9;&#9;pagination size 20&#10;&#9;&#9;filters [email as text label &quot;Search email&quot;, name as text label &quot;Search name&quot;]&#10;&#9;&#9;validate&#10;&#10;&#9;component Form for User&#10;&#9;&#9;fields [email, name]&#10;&#9;&#9;actions [save via &quot;/users&quot;, cancel]&#10;&#9;&#9;style clean&#10;&#9;&#9;validate&#10;&#10;page UserList at &quot;/users&quot; layout MainLayout title &quot;Users&quot;&#10;&#9;meta description &quot;Browse all users&quot;&#10;&#10;&#9;component Table for User&#10;&#9;&#9;fields [email, name]&#10;&#9;&#9;data from &quot;/users&quot;&#10;&#9;&#9;pagination size 10&#10;&#9;&#9;filters [name as text label &quot;Search by name&quot;]&#10;&#10;page PostManagement at &quot;/admin/posts&quot; layout AdminLayout title &quot;Post Management&quot; auth&#10;&#9;meta description &quot;Manage blog posts&quot;&#10;&#9;meta keywords &quot;posts, blog, content&quot;&#10;&#10;&#9;component Table for Post&#10;&#9;&#9;fields [title, author_id, published, created_at]&#10;&#9;&#9;actions [edit via &quot;/posts/{id}&quot;, delete via &quot;/posts/{id}&quot;, create via &quot;/posts&quot;]&#10;&#9;&#9;data from &quot;/posts&quot;&#10;&#9;&#9;style modern&#10;&#9;&#9;pagination size 15&#10;&#9;&#9;filters [title as text label &quot;Search title&quot;, published as select label &quot;Published status&quot;]&#10;&#9;&#9;validate&#10;&#10;page CreatePost at &quot;/posts/new&quot; layout MainLayout title &quot;Create Post&quot; auth&#10;&#9;component Form for Post&#10;&#9;&#9;fields [title, content]&#10;&#9;&#9;actions [save via &quot;/posts&quot;, cancel]&#10;&#9;&#9;style clean&#10;&#9;&#9;validate&#10;&#10;page BlogList at &quot;/blog&quot; layout PublicLayout title &quot;Blog Posts&quot;&#10;&#9;meta description &quot;Read our latest blog posts&quot;&#10;&#9;meta keywords &quot;blog, articles, content&quot;&#10;&#10;&#9;component Table for Post&#10;&#9;&#9;fields [title, created_at]&#10;&#9;&#9;data from &quot;/posts&quot;&#10;&#9;&#9;pagination size 5&#10;&#9;&#9;filters [title as text label &quot;Search posts&quot;]&#10;&#10;&#10;&#10;&#10;&#10;&#10;" />
<option name="updatedContent" value="// Enhanced Masonry DSL example demonstrating new features&#10;// This shows the comprehensive language structure with containers, detailed fields, and layouts&#10;&#10;// Server configuration&#10;server MyApp host &quot;localhost&quot; port 8080&#10;&#10;// Entity definitions with various field types and relationships&#10;entity User desc &quot;User account management&quot;&#10;&#9;id: uuid required unique&#10;&#9;email: string required validate email validate min_length &quot;5&quot;&#10;&#9;name: string default &quot;Anonymous&quot;&#10;&#9;created_at: timestamp default &quot;now()&quot;&#10;&#9;profile_id: uuid relates to Profile as one via &quot;user_id&quot;&#10;&#10;entity Profile desc &quot;User profile information&quot;&#10;&#9;id: uuid required unique&#10;&#9;user_id: uuid required relates to User as one&#10;&#9;bio: text validate max_length &quot;500&quot;&#10;&#9;avatar_url: string validate url&#10;&#9;updated_at: timestamp&#10;&#9;posts: uuid relates to Post as many&#10;&#10;entity Post desc &quot;Blog posts&quot;&#10;&#9;id: uuid required unique&#10;&#9;title: string required validate min_length &quot;1&quot; validate max_length &quot;200&quot;&#10;&#9;content: text required&#10;&#9;author_id: uuid required relates to User as one&#10;&#9;published: boolean default &quot;false&quot;&#10;&#9;created_at: timestamp default &quot;now()&quot;&#10;&#9;tags: uuid relates to Tag as many through &quot;post_tags&quot;&#10;&#10;entity Tag desc &quot;Content tags&quot;&#10;&#9;id: uuid required unique&#10;&#9;name: string required unique validate min_length &quot;1&quot; validate max_length &quot;50&quot;&#10;&#9;slug: string required unique indexed&#10;&#9;created_at: timestamp default &quot;now()&quot;&#10;&#10;// API Endpoints with different HTTP methods and parameter sources&#10;endpoint GET &quot;/users&quot; for User desc &quot;List users&quot; auth&#10;&#9;param page: int from query&#10;&#9;param limit: int required from query&#10;&#9;returns list as &quot;json&quot; fields [id, email, name]&#10;&#10;endpoint POST &quot;/users&quot; for User desc &quot;Create user&quot;&#10;&#9;param user_data: object required from body&#10;&#9;returns object as &quot;json&quot; fields [id, email, name]&#10;&#10;endpoint PUT &quot;/users/{id}&quot; for User desc &quot;Update user&quot;&#10;&#9;param id: uuid required from path&#10;&#9;param user_data: object required from body&#10;&#9;returns object&#10;&#9;custom &quot;update_user_logic&quot;&#10;&#10;endpoint DELETE &quot;/users/{id}&quot; for User desc &quot;Delete user&quot; auth&#10;&#9;param id: uuid required from path&#10;&#9;returns object&#10;&#10;endpoint GET &quot;/posts&quot; for Post desc &quot;List posts&quot;&#10;&#9;param author_id: uuid from query&#10;&#9;param published: boolean from query&#10;&#9;param page: int from query&#10;&#9;returns list as &quot;json&quot; fields [id, title, author_id, published]&#10;&#10;endpoint POST &quot;/posts&quot; for Post desc &quot;Create post&quot; auth&#10;&#9;param post_data: object required from body&#10;&#9;returns object fields [id, title, content, author_id]&#10;&#10;// Enhanced User Management page with container layout&#10;page UserManagement at &quot;/admin/users&quot; layout AdminLayout title &quot;User Management&quot; auth&#10;&#9;meta description &quot;Manage system users&quot;&#10;&#9;meta keywords &quot;users, admin, management&quot;&#10;&#10;&#9;container main class &quot;grid grid-cols-3 gap-4&quot;&#10;&#9;&#9;section sidebar class &quot;col-span-1&quot;&#10;&#9;&#9;&#9;component UserStats for User&#10;&#9;&#9;&#9;&#9;data from &quot;/users/stats&quot;&#10;&#10;&#9;&#9;section content class &quot;col-span-2&quot;&#10;&#9;&#9;&#9;component UserTable for User&#10;&#9;&#9;&#9;&#9;fields [email, name, role, created_at]&#10;&#9;&#9;&#9;&#9;actions [edit, delete, view]&#10;&#9;&#9;&#9;&#9;data from &quot;/users&quot;&#10;&#10;&#9;&#9;&#9;panel UserEditPanel for User trigger &quot;edit&quot; position &quot;slide-right&quot;&#10;&#9;&#9;&#9;&#9;component UserForm for User&#10;&#9;&#9;&#9;&#9;&#9;field email type text label &quot;Email&quot; required&#10;&#9;&#9;&#9;&#9;&#9;field name type text label &quot;Name&quot; required&#10;&#9;&#9;&#9;&#9;&#9;field role type select options [&quot;admin&quot;, &quot;user&quot;]&#10;&#9;&#9;&#9;&#9;&#9;button save label &quot;Save User&quot; style &quot;primary&quot; via &quot;/users/{id}&quot;&#10;&#9;&#9;&#9;&#9;&#9;button cancel label &quot;Cancel&quot; style &quot;secondary&quot;&#10;&#10;// Enhanced Form component with detailed field configurations&#10;page UserFormPage at &quot;/admin/users/new&quot; layout AdminLayout title &quot;Create User&quot; auth&#10;&#9;component Form for User&#10;&#9;&#9;field email type text label &quot;Email Address&quot; placeholder &quot;Enter your email&quot; required validate email&#10;&#9;&#9;field name type text label &quot;Full Name&quot; placeholder &quot;Enter your full name&quot; required&#10;&#9;&#9;field role type select label &quot;User Role&quot; options [&quot;admin&quot;, &quot;user&quot;, &quot;moderator&quot;] default &quot;user&quot;&#10;&#9;&#9;field avatar type file label &quot;Profile Picture&quot; accept &quot;image/*&quot;&#10;&#9;&#9;field bio type textarea label &quot;Biography&quot; placeholder &quot;Tell us about yourself&quot; rows 4&#10;&#10;&#9;&#9;when role equals &quot;admin&quot;&#10;&#9;&#9;&#9;field permissions type multiselect label &quot;Permissions&quot;&#10;&#9;&#9;&#9;&#9;options [&quot;users.manage&quot;, &quot;posts.manage&quot;, &quot;system.config&quot;]&#10;&#10;&#9;&#9;section actions&#10;&#9;&#9;&#9;button save label &quot;Save User&quot; style &quot;primary&quot; loading &quot;Saving...&quot; via &quot;/users&quot;&#10;&#9;&#9;&#9;button cancel label &quot;Cancel&quot; style &quot;secondary&quot;&#10;&#10;// Dashboard with tabbed interface&#10;page Dashboard at &quot;/dashboard&quot; layout MainLayout title &quot;Dashboard&quot;&#10;&#9;container tabs&#10;&#9;&#9;tab overview label &quot;Overview&quot; active&#10;&#9;&#9;&#9;component StatsCards&#10;&#9;&#9;&#9;component RecentActivity&#10;&#10;&#9;&#9;tab users label &quot;Users&quot;&#10;&#9;&#9;&#9;component UserTable for User&#10;&#9;&#9;&#9;&#9;data from &quot;/users&quot;&#10;&#10;&#9;&#9;tab posts label &quot;Posts&quot;&#10;&#9;&#9;&#9;component PostTable for Post&#10;&#9;&#9;&#9;&#9;data from &quot;/posts&quot;&#10;&#10;&#9;modal CreateUserModal trigger &quot;create-user&quot;&#10;&#9;&#9;component UserForm for User&#10;&#9;&#9;&#9;field email type text label &quot;Email&quot; required&#10;&#9;&#9;&#9;field name type text label &quot;Name&quot; required&#10;&#9;&#9;&#9;button save label &quot;Create&quot; via &quot;/users&quot;&#10;&#9;&#9;&#9;button cancel label &quot;Cancel&quot;&#10;&#10;// Post Management with master-detail layout&#10;page PostManagement at &quot;/admin/posts&quot; layout AdminLayout title &quot;Post Management&quot; auth&#10;&#9;layout &quot;master-detail&quot;&#10;&#10;&#9;master PostList&#10;&#9;&#9;component Table for Post&#10;&#9;&#9;&#9;field title type text label &quot;Title&quot; sortable&#10;&#9;&#9;&#9;field author type relation label &quot;Author&quot; display &quot;name&quot; relates to User&#10;&#9;&#9;&#9;field status type badge label &quot;Status&quot;&#10;&#10;&#9;detail PostEditor trigger &quot;edit&quot;&#10;&#9;&#9;component Form for Post&#10;&#9;&#9;&#9;section basic class &quot;mb-4&quot;&#10;&#9;&#9;&#9;&#9;field title type text label &quot;Post Title&quot; required&#10;&#9;&#9;&#9;&#9;field content type richtext label &quot;Content&quot; required&#10;&#10;&#9;&#9;&#9;section metadata class &quot;grid grid-cols-2 gap-4&quot;&#10;&#9;&#9;&#9;&#9;field author_id type autocomplete label &quot;Author&quot;&#10;&#9;&#9;&#9;&#9;&#9;source &quot;/users&quot; display &quot;name&quot; value &quot;id&quot;&#10;&#9;&#9;&#9;&#9;field published type toggle label &quot;Published&quot; default &quot;false&quot;&#10;&#9;&#9;&#9;&#9;field tags type multiselect label &quot;Tags&quot;&#10;&#9;&#9;&#9;&#9;&#9;source &quot;/tags&quot; display &quot;name&quot; value &quot;id&quot;&#10;&#10;// Simple table component with smart defaults&#10;page SimpleUserList at &quot;/users&quot; layout MainLayout title &quot;Users&quot;&#10;&#9;component SimpleTable for User&#10;&#9;&#9;fields [email, name, created_at]&#10;&#9;&#9;actions [edit, delete]&#10;&#9;&#9;data from &quot;/users&quot;&#10;&#10;// Detailed table when more control is needed&#10;page DetailedUserList at &quot;/admin/users/detailed&quot; layout AdminLayout title &quot;Detailed User Management&quot; auth&#10;&#9;component DetailedTable for User&#10;&#9;&#9;field email type text label &quot;Email Address&quot;&#10;&#9;&#9;field name type text label &quot;Full Name&quot; &#10;&#10;&#9;&#9;data from &quot;/users&quot;&#10;&#9;&#9;pagination size 20&#10;&#10;// Conditional rendering example&#10;page ConditionalForm at &quot;/conditional&quot; layout MainLayout title &quot;Conditional Form&quot;&#10;&#9;component UserForm for User&#10;&#9;&#9;field email type text label &quot;Email&quot; required&#10;&#9;&#9;field role type select options [&quot;admin&quot;, &quot;user&quot;, &quot;moderator&quot;]&#10;&#10;&#9;&#9;when role equals &quot;admin&quot;&#10;&#9;&#9;&#9;field permissions type multiselect label &quot;Admin Permissions&quot;&#10;&#9;&#9;&#9;&#9;options [&quot;users.manage&quot;, &quot;posts.manage&quot;, &quot;system.config&quot;]&#10;&#10;&#9;&#9;when role equals &quot;moderator&quot;&#10;&#9;&#9;&#9;field moderation_level type select label &quot;Moderation Level&quot;&#10;&#9;&#9;&#9;&#9;options [&quot;basic&quot;, &quot;advanced&quot;, &quot;full&quot;]&#10;&#10;&#9;&#9;section actions&#10;&#9;&#9;&#9;button save label &quot;Save User&quot; style &quot;primary&quot; loading &quot;Saving...&quot;&#10;&#9;&#9;&#9;button cancel label &quot;Cancel&quot; style &quot;secondary&quot;" />
</PendingDiffInfo>
</value>
</entry>
</map>
</option>
</component>
</project>