{"id":20509734,"url":"https://github.com/semantic-org/module-examples","last_synced_at":"2025-04-13T22:25:32.965Z","repository":{"id":31133994,"uuid":"34693695","full_name":"Semantic-Org/Module-Examples","owner":"Semantic-Org","description":"Annotated source of Semantic UI Module Format","archived":false,"fork":false,"pushed_at":"2015-04-27T22:47:39.000Z","size":428,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T12:47:00.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://semantic-org.github.io/Module-Examples/docs/module.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Semantic-Org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-27T22:04:48.000Z","updated_at":"2019-03-17T10:39:57.000Z","dependencies_parsed_at":"2022-09-10T04:14:11.912Z","dependency_job_id":null,"html_url":"https://github.com/Semantic-Org/Module-Examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Semantic-Org%2FModule-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Semantic-Org%2FModule-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Semantic-Org%2FModule-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Semantic-Org%2FModule-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Semantic-Org","download_url":"https://codeload.github.com/Semantic-Org/Module-Examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248790104,"owners_count":21161943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:26:16.513Z","updated_at":"2025-04-13T22:25:32.928Z","avatar_url":"https://github.com/Semantic-Org.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What's Here\n\nThis is the annotated source of the standard module format used to power UI modules in Semantic UI.\n\nYou can view the [annotated source](http://semantic-org.github.io/Module-Examples/docs/module.html) online.\n\n## Standard Features\n\n* Standardizes element lifecycle, initialize, bind events, instantiate, destroy, refresh, etc.\n* Built in debug tools designed to make developer comments appear as traces during execution\n* Built in performance logging that shows diffed time in milliseconds between debug logs\n* Designed so that css selectors, metadata, regular expresions, even error messages are passed through as settings and user-editable\n\n## Advanced Features\n\n### Method Lookup\nMethod invocation automatically converts sentence case to camelCase or nested object during method lookup\n```javascript\n$('.component').component('set text', 'Foobar');\n```\n\nInternally matches against methods\n```javascript\nset: {\n  text: function(text) {\n     // do something\n  }\n}\n```\n\nAs well as\n```javascript\nsetText: function(Text) {\n  // do something\n}\n```\n\n### Mutation Observers\n\nElements use [DOM Mutation Observers](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) to allow refreshing cached values after changes\n```javascript\nif('MutationObserver' in window) {\n  observer = new MutationObserver(function(mutations) {\n    module.debug('Element updated refreshing selectors');\n    module.refresh();\n  });\n  observer.observe(element, {\n    childList : true,\n    subtree   : true\n  });\n  module.debug('Setting up mutation observer', observer);\n}\n```\n\n## Building Docs\n\n\n```bash\n# to get docco\nnpm install -g docco\n# to build\ndocco src/*.js --css src/css/docco\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemantic-org%2Fmodule-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemantic-org%2Fmodule-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemantic-org%2Fmodule-examples/lists"}