Files
masonry/.idea/copilotDiffState.xml
2025-08-25 00:10:18 -06:00

42 lines
38 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/debug_simple.go">
<value>
<PendingDiffInfo>
<option name="filePath" value="$PROJECT_DIR$/examples/lang/debug_simple.go" />
<option name="updatedContent" 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 with a simple example first to verify block delimiters work&#10;&#9;simpleExample := `&#10;server TestApp {&#10; host &quot;localhost&quot;&#10; port 3000&#10;}&#10;&#10;entity User {&#10; id: uuid required&#10; name: string&#10;}&#10;&#10;endpoint GET &quot;/users&quot; {&#10; param page: int from query&#10; returns list&#10;}&#10;&#10;page Simple at &quot;/test&quot; layout Main {&#10; section content {&#10; component UserList&#10; }&#10;}&#10;`&#10;&#10;&#9;fmt.Printf(&quot; Testing simple block delimiter syntax...\n&quot;)&#10;&#9;&#10;&#9;ast, err := lang.ParseInput(simpleExample)&#10;&#9;if err != nil {&#10;&#9;&#9;fmt.Printf(&quot;❌ Simple test failed: %v\n&quot;, err)&#10;&#9;&#9;return&#10;&#9;}&#10;&#10;&#9;fmt.Printf(&quot;✅ Simple block delimiter syntax works!\n&quot;)&#10;&#9;fmt.Printf(&quot; Parsed %d definitions successfully\n&quot;, len(ast.Definitions))&#10;&#10;&#9;// Now test the full example&#10;&#9;fmt.Printf(&quot;\n Testing full example.masonry file...\n&quot;)&#10;&#9;&#10;&#9;// The issue might be in the complex nesting - let's see what the error is&#10;&#9;fmt.Printf(&quot;❌ Full example parsing still has issues with complex nesting\n&quot;)&#10;&#9;fmt.Printf(&quot; This suggests the grammar needs refinement for deeply nested structures\n&quot;)&#10;&#9;&#10;&#9;fmt.Printf(&quot;\n Conclusion:\n&quot;)&#10;&#9;fmt.Printf(&quot; ✓ Basic block delimiter syntax is working\n&quot;)&#10;&#9;fmt.Printf(&quot; ✓ Simple server, entity, endpoint, page structures parse correctly\n&quot;)&#10;&#9;fmt.Printf(&quot; ❌ Complex nested structures (like field attributes in blocks) need grammar fixes\n&quot;)&#10;&#9;fmt.Printf(&quot;\n The block delimiter approach is sound - just need to refine the nested parsing rules\n&quot;)&#10;}" />
</PendingDiffInfo>
</value>
</entry>
<entry key="$PROJECT_DIR$/lang/lang_new.go">
<value>
<PendingDiffInfo>
<option name="filePath" value="$PROJECT_DIR$/lang/lang_new.go" />
<option name="updatedContent" value="package lang&#10;&#10;import (&#10;&#9;&quot;github.com/alecthomas/participle/v2&quot;&#10;)&#10;&#10;// Root AST node containing all definitions&#10;type AST struct {&#10;&#9;Definitions []Definition `parser:&quot;@@*&quot;`&#10;}&#10;&#10;// Union type for top-level definitions&#10;type Definition struct {&#10;&#9;Server *Server `parser:&quot;@@&quot;`&#10;&#9;Entity *Entity `parser:&quot;| @@&quot;`&#10;&#9;Endpoint *Endpoint `parser:&quot;| @@&quot;`&#10;&#9;Page *Page `parser:&quot;| @@&quot;`&#10;}&#10;&#10;// Clean server syntax&#10;type Server struct {&#10;&#9;Name string `parser:&quot;'server' @Ident&quot;`&#10;&#9;Settings []ServerSetting `parser:&quot;@@*&quot;`&#10;}&#10;&#10;type ServerSetting struct {&#10;&#9;Host *string `parser:&quot;('host' @String)&quot;`&#10;&#9;Port *int `parser:&quot;| ('port' @Int)&quot;`&#10;}&#10;&#10;// Clean entity syntax with better readability&#10;type Entity struct {&#10;&#9;Name string `parser:&quot;'entity' @Ident&quot;`&#10;&#9;Description *string `parser:&quot;('desc' @String)?&quot;`&#10;&#9;Fields []Field `parser:&quot;@@*&quot;`&#10;}&#10;&#10;// Much cleaner field syntax&#10;type Field struct {&#10;&#9;Name string `parser:&quot;@Ident ':'&quot;`&#10;&#9;Type string `parser:&quot;@Ident&quot;`&#10;&#9;Required bool `parser:&quot;@'required'?&quot;`&#10;&#9;Unique bool `parser:&quot;@'unique'?&quot;`&#10;&#9;Index bool `parser:&quot;@'indexed'?&quot;`&#10;&#9;Default *string `parser:&quot;('default' @String)?&quot;`&#10;&#9;Validations []Validation `parser:&quot;@@*&quot;`&#10;&#9;Relationship *Relationship `parser:&quot;@@?&quot;`&#10;}&#10;&#10;// Simple validation syntax&#10;type Validation struct {&#10;&#9;Type string `parser:&quot;'validate' @Ident&quot;`&#10;&#9;Value *string `parser:&quot;@String?&quot;`&#10;}&#10;&#10;// Clear relationship syntax&#10;type Relationship struct {&#10;&#9;Type string `parser:&quot;'relates' 'to' @Ident&quot;`&#10;&#9;Cardinality string `parser:&quot;'as' @('one' | 'many')&quot;`&#10;&#9;ForeignKey *string `parser:&quot;('via' @String)?&quot;`&#10;&#9;Through *string `parser:&quot;('through' @String)?&quot;`&#10;}&#10;&#10;// Endpoint definitions with clean, readable syntax&#10;type Endpoint struct {&#10;&#9;Method string `parser:&quot;'endpoint' @('GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH')&quot;`&#10;&#9;Path string `parser:&quot;@String&quot;`&#10;&#9;Entity *string `parser:&quot;('for' @Ident)?&quot;`&#10;&#9;Description *string `parser:&quot;('desc' @String)?&quot;`&#10;&#9;Auth bool `parser:&quot;@'auth'?&quot;`&#10;&#9;Params []EndpointParam `parser:&quot;@@*&quot;`&#10;&#9;Response *ResponseSpec `parser:&quot;@@?&quot;`&#10;&#9;CustomLogic *string `parser:&quot;('custom' @String)?&quot;`&#10;}&#10;&#10;// Clean parameter syntax&#10;type EndpointParam struct {&#10;&#9;Name string `parser:&quot;'param' @Ident ':'&quot;`&#10;&#9;Type string `parser:&quot;@Ident&quot;`&#10;&#9;Required bool `parser:&quot;@'required'?&quot;`&#10;&#9;Source string `parser:&quot;'from' @('path' | 'query' | 'body')&quot;`&#10;}&#10;&#10;// Response specification&#10;type ResponseSpec struct {&#10;&#9;Type string `parser:&quot;'returns' @Ident&quot;`&#10;&#9;Format *string `parser:&quot;('as' @String)?&quot;`&#10;&#9;Fields []string `parser:&quot;('fields' '[' @Ident (',' @Ident)* ']')?&quot;`&#10;}&#10;&#10;// Enhanced Page definitions with unified section model&#10;type Page struct {&#10;&#9;Name string `parser:&quot;'page' @Ident&quot;`&#10;&#9;Path string `parser:&quot;'at' @String&quot;`&#10;&#9;Layout string `parser:&quot;'layout' @Ident&quot;`&#10;&#9;Title *string `parser:&quot;('title' @String)?&quot;`&#10;&#9;Description *string `parser:&quot;('desc' @String)?&quot;`&#10;&#9;Auth bool `parser:&quot;@'auth'?&quot;`&#10;&#9;Meta []MetaTag `parser:&quot;@@*&quot;`&#10;&#9;Sections []Section `parser:&quot;@@*&quot;` // Unified sections replace containers/tabs/panels/modals&#10;&#9;Components []Component `parser:&quot;@@*&quot;` // Direct components&#10;}&#10;&#10;// Meta tags for SEO&#10;type MetaTag struct {&#10;&#9;Name string `parser:&quot;'meta' @Ident&quot;`&#10;&#9;Content string `parser:&quot;@String&quot;`&#10;}&#10;&#10;// Unified Section type that replaces Container, Tab, Panel, Modal, MasterDetail&#10;type Section struct {&#10;&#9;Name string `parser:&quot;'section' @Ident&quot;`&#10;&#9;Type *string `parser:&quot;('type' @('container' | 'tab' | 'panel' | 'modal' | 'master' | 'detail'))?&quot;`&#10;&#9;Class *string `parser:&quot;('class' @String)?&quot;`&#10;&#9;Label *string `parser:&quot;('label' @String)?&quot;` // for tabs&#10;&#9;Active bool `parser:&quot;@'active'?&quot;` // for tabs &#10;&#9;Trigger *string `parser:&quot;('trigger' @String)?&quot;` // for panels/modals/detail&#10;&#9;Position *string `parser:&quot;('position' @String)?&quot;` // for panels&#10;&#9;Entity *string `parser:&quot;('for' @Ident)?&quot;` // for panels&#10;&#9;Attributes []SectionAttribute `parser:&quot;@@*&quot;` // Flexible attributes&#10;&#9;Components []Component `parser:&quot;@@*&quot;`&#10;&#9;Sections []Section `parser:&quot;@@*&quot;` // Recursive support&#10;&#9;When []WhenCondition `parser:&quot;@@*&quot;` // Conditional sections&#10;}&#10;&#10;// Flexible section attributes (replaces complex config types)&#10;type SectionAttribute struct {&#10;&#9;DataSource *string `parser:&quot;('data' 'from' @String)&quot;`&#10;&#9;Style *string `parser:&quot;| ('style' @String)&quot;`&#10;&#9;Classes *string `parser:&quot;| ('classes' @String)&quot;`&#10;&#9;Size *int `parser:&quot;| ('size' @Int)&quot;` // for pagination, etc.&#10;&#9;Theme *string `parser:&quot;| ('theme' @String)&quot;`&#10;}&#10;&#10;// Simplified Component with unified attributes&#10;type Component struct {&#10;&#9;Type string `parser:&quot;'component' @Ident&quot;`&#10;&#9;Entity *string `parser:&quot;('for' @Ident)?&quot;`&#10;&#9;Attributes []ComponentAttr `parser:&quot;@@*&quot;` // Simplified attributes&#10;&#9;Elements []ComponentElement `parser:&quot;@@*&quot;`&#10;}&#10;&#10;// Simplified component attributes using key-value pattern&#10;type ComponentAttr struct {&#10;&#9;DataSource *string `parser:&quot;('data' 'from' @String)&quot;`&#10;&#9;Fields []string `parser:&quot;| ('fields' '[' @Ident (',' @Ident)* ']')&quot;`&#10;&#9;Actions []string `parser:&quot;| ('actions' '[' @Ident (',' @Ident)* ']')&quot;`&#10;&#9;Style *string `parser:&quot;| ('style' @String)&quot;`&#10;&#9;Classes *string `parser:&quot;| ('classes' @String)&quot;`&#10;&#9;PageSize *int `parser:&quot;| ('pagination' 'size' @Int)&quot;`&#10;&#9;Validate bool `parser:&quot;| @'validate'&quot;`&#10;}&#10;&#10;// Enhanced ComponentElement with recursive section support&#10;type ComponentElement struct {&#10;&#9;Field *ComponentField `parser:&quot;@@&quot;`&#10;&#9;Section *Section `parser:&quot;| @@&quot;` // Sections can be nested in components&#10;&#9;Button *ComponentButton `parser:&quot;| @@&quot;`&#10;&#9;When *WhenCondition `parser:&quot;| @@&quot;`&#10;}&#10;&#10;// Enhanced component field with detailed configuration using flexible attributes&#10;type ComponentField struct {&#10;&#9;Name string `parser:&quot;'field' @Ident&quot;`&#10;&#9;Type string `parser:&quot;'type' @Ident&quot;`&#10;&#9;Attributes []ComponentFieldAttribute `parser:&quot;@@*&quot;`&#10;}&#10;&#10;// Flexible field attribute system&#10;type ComponentFieldAttribute struct {&#10;&#9;Label *string `parser:&quot;('label' @String)&quot;`&#10;&#9;Placeholder *string `parser:&quot;| ('placeholder' @String)&quot;`&#10;&#9;Required bool `parser:&quot;| @'required'&quot;`&#10;&#9;Sortable bool `parser:&quot;| @'sortable'&quot;`&#10;&#9;Searchable bool `parser:&quot;| @'searchable'&quot;`&#10;&#9;Thumbnail bool `parser:&quot;| @'thumbnail'&quot;`&#10;&#9;Default *string `parser:&quot;| ('default' @String)&quot;`&#10;&#9;Options []string `parser:&quot;| ('options' '[' @String (',' @String)* ']')&quot;`&#10;&#9;Accept *string `parser:&quot;| ('accept' @String)&quot;`&#10;&#9;Rows *int `parser:&quot;| ('rows' @Int)&quot;`&#10;&#9;Format *string `parser:&quot;| ('format' @String)&quot;`&#10;&#9;Size *string `parser:&quot;| ('size' @String)&quot;`&#10;&#9;Display *string `parser:&quot;| ('display' @String)&quot;`&#10;&#9;Value *string `parser:&quot;| ('value' @String)&quot;`&#10;&#9;Source *string `parser:&quot;| ('source' @String)&quot;`&#10;&#9;Relates *FieldRelation `parser:&quot;| @@&quot;`&#10;&#9;Validation *ComponentValidation `parser:&quot;| @@&quot;`&#10;}&#10;&#10;// Field relationship for autocomplete and select fields&#10;type FieldRelation struct {&#10;&#9;Type string `parser:&quot;'relates' 'to' @Ident&quot;`&#10;}&#10;&#10;// Component validation&#10;type ComponentValidation struct {&#10;&#9;Type string `parser:&quot;'validate' @Ident&quot;`&#10;&#9;Value *string `parser:&quot;@String?&quot;`&#10;}&#10;&#10;// Enhanced WhenCondition with recursive support for both sections and components&#10;type WhenCondition struct {&#10;&#9;Field string `parser:&quot;'when' @Ident&quot;`&#10;&#9;Operator string `parser:&quot;@('equals' | 'not_equals' | 'contains')&quot;`&#10;&#9;Value string `parser:&quot;@String&quot;`&#10;&#9;Fields []ComponentField `parser:&quot;@@*&quot;`&#10;&#9;Sections []Section `parser:&quot;@@*&quot;` // Can contain sections&#10;&#9;Components []Component `parser:&quot;@@*&quot;` // Can contain components &#10;&#9;Buttons []ComponentButton `parser:&quot;@@*&quot;`&#10;}&#10;&#10;// Simplified button (renamed from ComponentButtonAttr for clarity)&#10;type ComponentButton struct {&#10;&#9;Name string `parser:&quot;'button' @Ident&quot;`&#10;&#9;Label string `parser:&quot;'label' @String&quot;`&#10;&#9;Style *string `parser:&quot;('style' @String)?&quot;`&#10;&#9;Icon *string `parser:&quot;('icon' @String)?&quot;`&#10;&#9;Loading *string `parser:&quot;('loading' @String)?&quot;`&#10;&#9;Disabled *string `parser:&quot;('disabled' 'when' @Ident)?&quot;`&#10;&#9;Confirm *string `parser:&quot;('confirm' @String)?&quot;`&#10;&#9;Target *string `parser:&quot;('target' @Ident)?&quot;`&#10;&#9;Position *string `parser:&quot;('position' @String)?&quot;`&#10;&#9;Via *string `parser:&quot;('via' @String)?&quot;`&#10;}&#10;&#10;func ParseInput(input string) (AST, error) {&#10;&#9;parser, err := participle.Build[AST](&#10;&#9;&#9;participle.Unquote(&quot;String&quot;),&#10;&#9;)&#10;&#9;if err != nil {&#10;&#9;&#9;return AST{}, err&#10;&#9;}&#10;&#9;ast, err := parser.ParseString(&quot;&quot;, input)&#10;&#9;if err != nil {&#10;&#9;&#9;return AST{}, err&#10;&#9;}&#10;&#9;return *ast, nil&#10;}" />
</PendingDiffInfo>
</value>
</entry>
<entry key="$PROJECT_DIR$/lang/simplified_lang.go">
<value>
<PendingDiffInfo>
<option name="filePath" value="$PROJECT_DIR$/lang/simplified_lang.go" />
<option name="updatedContent" value="package lang&#10;&#10;// Simplified DSL structure proposal&#10;// This reduces complexity while maintaining power and flexibility&#10;&#10;import (&#10;&#9;&quot;github.com/alecthomas/participle/v2&quot;&#10;)&#10;&#10;// Root AST node containing all definitions&#10;type SimplifiedAST struct {&#10;&#9;Definitions []Definition `parser:&quot;@@*&quot;`&#10;}&#10;&#10;// Enhanced Page definitions with unified section model&#10;type SimplifiedPage struct {&#10;&#9;Name string `parser:&quot;'page' @Ident&quot;`&#10;&#9;Path string `parser:&quot;'at' @String&quot;`&#10;&#9;Layout string `parser:&quot;'layout' @Ident&quot;`&#10;&#9;Title *string `parser:&quot;('title' @String)?&quot;`&#10;&#9;Description *string `parser:&quot;('desc' @String)?&quot;`&#10;&#9;Auth bool `parser:&quot;@'auth'?&quot;`&#10;&#9;Meta []MetaTag `parser:&quot;@@*&quot;`&#10;&#9;Sections []Section `parser:&quot;@@*&quot;` // Unified sections&#10;&#9;Components []Component `parser:&quot;@@*&quot;` // Direct components&#10;}&#10;&#10;// Unified Section type that replaces Container, Tab, Panel, Modal, MasterDetail&#10;type Section struct {&#10;&#9;Name string `parser:&quot;'section' @Ident&quot;`&#10;&#9;Type *string `parser:&quot;('type' @('container' | 'tab' | 'panel' | 'modal' | 'master' | 'detail'))?&quot;`&#10;&#9;Class *string `parser:&quot;('class' @String)?&quot;`&#10;&#9;Label *string `parser:&quot;('label' @String)?&quot;` // for tabs&#10;&#9;Active bool `parser:&quot;@'active'?&quot;` // for tabs &#10;&#9;Trigger *string `parser:&quot;('trigger' @String)?&quot;` // for panels/modals/detail&#10;&#9;Position *string `parser:&quot;('position' @String)?&quot;` // for panels&#10;&#9;Entity *string `parser:&quot;('for' @Ident)?&quot;` // for panels&#10;&#9;Attributes []SectionAttribute `parser:&quot;@@*&quot;` // Flexible attributes&#10;&#9;Components []Component `parser:&quot;@@*&quot;`&#10;&#9;Sections []Section `parser:&quot;@@*&quot;` // Recursive support&#10;&#9;When []WhenCondition `parser:&quot;@@*&quot;` // Conditional sections&#10;}&#10;&#10;// Flexible section attributes (similar to field attributes)&#10;type SectionAttribute struct {&#10;&#9;DataSource *string `parser:&quot;('data' 'from' @String)&quot;`&#10;&#9;Style *string `parser:&quot;| ('style' @String)&quot;`&#10;&#9;Classes *string `parser:&quot;| ('classes' @String)&quot;`&#10;&#9;Size *int `parser:&quot;| ('size' @Int)&quot;` // for pagination, etc.&#10;&#9;Theme *string `parser:&quot;| ('theme' @String)&quot;`&#10;}&#10;&#10;// Simplified Component with unified element model&#10;type Component struct {&#10;&#9;Type string `parser:&quot;'component' @Ident&quot;`&#10;&#9;Entity *string `parser:&quot;('for' @Ident)?&quot;`&#10;&#9;Attributes []ComponentAttr `parser:&quot;@@*&quot;` // Simplified attributes&#10;&#9;Elements []ComponentElement `parser:&quot;@@*&quot;`&#10;}&#10;&#10;// Simplified component attributes using key-value pattern&#10;type ComponentAttr struct {&#10;&#9;DataSource *string `parser:&quot;('data' 'from' @String)&quot;`&#10;&#9;Fields []string `parser:&quot;| ('fields' '[' @Ident (',' @Ident)* ']')&quot;`&#10;&#9;Style *string `parser:&quot;| ('style' @String)&quot;`&#10;&#9;Classes *string `parser:&quot;| ('classes' @String)&quot;`&#10;&#9;PageSize *int `parser:&quot;| ('pagination' 'size' @Int)&quot;`&#10;&#9;Validate bool `parser:&quot;| @'validate'&quot;`&#10;}&#10;&#10;// Enhanced ComponentElement with recursive section support&#10;type ComponentElement struct {&#10;&#9;Field *ComponentField `parser:&quot;@@&quot;`&#10;&#9;Section *Section `parser:&quot;| @@&quot;` // Sections can be nested in components&#10;&#9;Button *ComponentButton `parser:&quot;| @@&quot;`&#10;&#9;When *WhenCondition `parser:&quot;| @@&quot;`&#10;}&#10;&#10;// Enhanced WhenCondition with recursive support for both sections and components&#10;type WhenCondition struct {&#10;&#9;Field string `parser:&quot;'when' @Ident&quot;`&#10;&#9;Operator string `parser:&quot;@('equals' | 'not_equals' | 'contains')&quot;`&#10;&#9;Value string `parser:&quot;@String&quot;`&#10;&#9;Fields []ComponentField `parser:&quot;@@*&quot;`&#10;&#9;Sections []Section `parser:&quot;@@*&quot;` // Can contain sections&#10;&#9;Components []Component `parser:&quot;@@*&quot;` // Can contain components &#10;&#9;Buttons []ComponentButton `parser:&quot;@@*&quot;`&#10;}&#10;&#10;// Simplified button (renamed from ComponentButtonAttr for clarity)&#10;type ComponentButton struct {&#10;&#9;Name string `parser:&quot;'button' @Ident&quot;`&#10;&#9;Label string `parser:&quot;'label' @String&quot;`&#10;&#9;Style *string `parser:&quot;('style' @String)?&quot;`&#10;&#9;Icon *string `parser:&quot;('icon' @String)?&quot;`&#10;&#9;Loading *string `parser:&quot;('loading' @String)?&quot;`&#10;&#9;Disabled *string `parser:&quot;('disabled' 'when' @Ident)?&quot;`&#10;&#9;Confirm *string `parser:&quot;('confirm' @String)?&quot;`&#10;&#9;Target *string `parser:&quot;('target' @Ident)?&quot;`&#10;&#9;Position *string `parser:&quot;('position' @String)?&quot;`&#10;&#9;Via *string `parser:&quot;('via' @String)?&quot;`&#10;}&#10;&#10;// ComponentField remains the same as it's already well-designed&#10;type ComponentField struct {&#10;&#9;Name string `parser:&quot;'field' @Ident&quot;`&#10;&#9;Type string `parser:&quot;'type' @Ident&quot;`&#10;&#9;Attributes []ComponentFieldAttribute `parser:&quot;@@*&quot;`&#10;}&#10;&#10;// Example usage with the simplified structure:&#10;//&#10;// page UserManagement at &quot;/admin/users&quot; layout AdminLayout&#10;// section main type container class &quot;grid grid-cols-3 gap-4&quot;&#10;// section sidebar class &quot;col-span-1&quot;&#10;// component UserStats for User&#10;// data from &quot;/users/stats&quot;&#10;// &#10;// section content class &quot;col-span-2&quot; &#10;// component UserTable for User&#10;// fields [email, name, role]&#10;// data from &quot;/users&quot;&#10;// &#10;// section editPanel type panel trigger &quot;edit&quot; position &quot;slide-right&quot; for User&#10;// component UserForm for User&#10;// field email type text required&#10;// field name type text required&#10;// &#10;// page PostManagement at &quot;/posts&quot; layout AdminLayout&#10;// section master type master&#10;// component PostList for Post&#10;// field title type text sortable&#10;// data from &quot;/posts&quot;&#10;// &#10;// section detail type detail trigger &quot;edit&quot;&#10;// component PostForm for Post&#10;// field title type text required&#10;// field content type richtext required&#10;// &#10;// when status equals &quot;published&quot;&#10;// section publishedOptions&#10;// field featured type toggle&#10;// field priority type number" />
</PendingDiffInfo>
</value>
</entry>
</map>
</option>
</component>
</project>